/* Desktop workspace. Mobile rules remain in the original stylesheets. */
@media (min-width: 1024px) {
  body { display:block; padding:0; background:#f4f5f7; }
  .app-shell { width:100%; min-height:100vh; border-radius:0; overflow:visible; box-shadow:none; background:#f4f5f7; }
  .screen { padding:0 0 32px 224px; }
  .topbar { padding:24px 36px; min-height:100px; }
  .topbar h1 { font-size:28px; }
  .topbar .he-module-switch { position:absolute; right:36px; top:28px; margin:0; cursor:pointer; }
  .content { max-width:1440px; margin:auto; padding:28px 36px; gap:22px; }
  .bottom-nav { top:0; left:0; bottom:0; width:224px; border:0; border-radius:0; background:#111; padding:32px 18px; display:flex; flex-direction:column; gap:10px; }
  .bottom-nav::before { content:'HE CONTROL'; color:#FFD100; font-size:20px; font-weight:800; padding:8px 12px 30px; }
  .bottom-nav .nav { text-align:left; color:#ddd; font-size:14px; padding:15px; min-height:48px; }
  .bottom-nav .nav.active { color:#111; }
  .login { max-width:480px; margin:auto; padding:48px 32px; }
  .login .brand h1 { font-size:30px; }
  .hero { padding:26px; border-radius:16px; }
  .hero strong { font-size:44px; }
  .metrics { gap:18px; }
  .metric { padding:20px; background:white; }
  .metric strong { font-size:28px; }
  .metric span,.request p,.helper,.detail dt,.detail dd,.user p { font-size:13px; }
  .section-title h2,.request h3,.user h3 { font-size:16px; }
  .list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .request { background:white; padding:20px; }
  .request:hover { border-color:#aaa; }
  .toolbar { max-width:720px; }
  .form { width:100%; max-width:760px; }
  .card { padding:22px; }
  .detail div { grid-template-columns:180px 1fr; padding:7px 0; }
  .month-head { padding:16px 20px; font-size:14px; }
  .backdrop { place-items:center; }
  .modal-box { width:min(90vw,600px); padding:28px; max-height:90vh; overflow:auto; }
  .toast { bottom:28px; font-size:14px; }
  .he-module-layer { background:#f4f5f7; }
  .he-module-layer[data-center]::before { text-align:left; padding:12px 36px; font-size:13px; letter-spacing:.05em; }
  .he-module-shell,.he-five-shell { max-width:1600px; min-height:calc(100% - 40px); padding:28px 36px 48px; background:transparent; }
  .he-module-brand,.he-five-top { margin-bottom:28px; }
  .he-module-user strong { font-size:16px; }
  .he-module-hero { padding:36px 40px; margin-bottom:24px; border-radius:20px; }
  .he-module-hero h1 { font-size:36px; }
  .he-global-admin { margin:0 0 24px; padding:22px; max-width:none; }
  .he-global-admin button { width:auto; min-width:260px; }
  .he-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; gap:24px; }
  .he-module-card { padding:28px; border-radius:18px; cursor:pointer; box-shadow:0 5px 16px #11111108; }
  .he-module-card:hover { border-color:#bba100; box-shadow:0 8px 24px #11111112; }
  .he-five-title h1 { font-size:28px; }
  .he-t2-tabs { gap:8px; margin-bottom:24px; background:#fff; border:1px solid #ddd; border-radius:12px; padding:6px; }
  .he-t2-tabs button { padding:14px 22px; border:0; border-radius:8px; font-size:14px; cursor:pointer; }
  .he-t2-tabs button.active { background:#FFD100; }
  #t2Content { min-width:0; }
  .he-module-layer[data-t2-tab="indicators"] #t2Content { display:grid; grid-template-columns:minmax(240px,1fr) minmax(320px,2fr); gap:20px; }
  .he-module-layer[data-t2-tab="indicators"] #t2Content>.he-t2-chart,
  .he-module-layer[data-t2-tab="indicators"] #t2Content>.he-t2-empty { grid-column:1/-1; }
  .he-module-layer[data-t2-tab="indicators"] .he-t2-datebox { margin-bottom:0; }
  .he-module-card { display:flex; flex-direction:column; }
  .he-module-action { margin-top:auto; }
  .he-module-card p { margin-bottom:24px; }

  .he-t2-datebox { background:#fff; color:#111; border:1px solid #ddd; padding:18px 20px; border-radius:12px; }
  .he-t2-datebox label { color:#555; font-size:12px; }
  .he-t2-datebox input,.he-t2-datebox select { max-width:360px; border:1px solid #ccc; background:#fafafa; }
  .he-t2-date-help { color:#666; font-size:12px; }
  .he-t2-operation { grid-template-columns:1fr auto; align-items:center; padding:20px 24px; }
  .he-t2-operation-actions { min-width:360px; }
  .he-t2-operation>button { width:auto; min-width:200px; }
  .he-t2-operation span,.he-t2-operation button { font-size:12px; }
  .he-t2-toolbar,.he-t2-toolbar.admin-menu { display:flex; flex-wrap:wrap; gap:12px; }
  .he-t2-toolbar.admin-menu .he-t2-more { margin-left:auto; }
  .he-t2-toolbar.admin-menu .he-t2-more-button { width:48px; }
  .he-t2-action { font-size:13px; padding:12px 18px; cursor:pointer; }
  .he-t2-summary { gap:18px; }
  .he-t2-summary span { padding:20px; background:#fff; border:1px solid #e1e1e1; font-size:13px; }
  .he-t2-summary b { font-size:30px; }
  .he-t2-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .he-t2-row-main { padding:20px; min-height:112px; }
  .he-t2-row-main strong { font-size:17px; }
  .he-t2-row-main span,.he-t2-row-main small,.he-t2-row-actions button { font-size:12px; }
  .he-t2-row-main>div { min-width:0; overflow-wrap:anywhere; }
  .he-t2-row-main em { font-size:11px; }
  .he-t2-history-table { background:#fff; border-radius:12px; }
  .he-t2-history-table table { font-size:14px; white-space:normal; }
  .he-t2-history-table th { font-size:12px; padding:15px 18px; }
  .he-t2-history-table td { padding:16px 18px; }
  .he-t2-history-table caption { font-size:18px; padding:20px; }
  .he-t2-history-table p { font-size:12px; }
  .he-t2-history-table tbody tr:hover { background:#fffdf0; }
  .he-t2-history-list article { background:#fff; padding:20px; }
  .he-t2-history-list article strong { font-size:16px; }
  .he-t2-history-list article span,.he-t2-history-list article small { font-size:12px; }
  .he-t2-filter-mode { max-width:420px; }
  .he-t2-history-head { max-width:760px; }
  .he-t2-export { width:auto; min-width:220px; }
  .he-t2-status-filter { align-items:center; background:#fff; border:1px solid #ddd; border-radius:12px; padding:0 20px 0 0; margin-bottom:24px; }
  .he-t2-status-filter .he-t2-datebox { margin:0; border:0; background:transparent; }
  .he-t2-status-filter .he-t2-share-icon,#t2RefreshStatus { margin-top:0; }
  #t2StatusResults>.he-t2-date-help { margin:0 0 16px; }
  .he-t2-sic { padding:28px; border-radius:16px; }
  .he-t2-sic-heading h3 { font-size:22px; }
  .he-t2-sic-chart { max-width:1200px; margin:18px auto; }
  .he-t2-sic-chart svg { min-width:0; }
  .he-t2-chart { padding:26px; background:#fff; }
  .he-t2-chart h3 { font-size:20px; }
  .he-t2-chart>p { font-size:13px; }
  .he-t2-mtd-value strong { font-size:56px; }
  .he-t2-mtd-value span { font-size:13px; max-width:360px; }
  .he-t2-bars { height:280px; gap:12px; overflow-x:auto; }
  .he-t2-bar { min-width:25px; }
  .he-t2-bar small,.he-t2-bar b { font-size:11px; }
  .he-t2-modal { align-items:center; padding:32px; }
  .he-t2-sheet { border-radius:20px; padding:24px; max-width:640px; max-height:90vh; overflow:auto; }
  .he-t2-handle { display:none; }
  button:focus-visible { outline:3px solid #b58d00; outline-offset:3px; }
}
@media (min-width:1024px) and (max-width:1279px) {
  .he-t2-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .he-module-grid { gap:16px; }
}

/* Crear usuario: desplazamiento real del modal, incluso con zoom de escritorio,
   campos dinámicos y ventanas con poca altura. No afecta otros formularios. */
#modal .create-user-backdrop {
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:16px;
}
#modal .create-user-modal {
  flex:0 1 600px;
  width:min(100%,600px);
  min-width:0;
  margin:auto 0;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
#modal .create-user-modal .form {min-width:0;}
#modal .create-user-modal .btn-row {
  position:sticky;
  bottom:0;
  z-index:1;
  padding:12px 0 2px;
  background:#fff;
}
@media (max-width:700px) {
  #modal .create-user-modal {width:100%;max-height:calc(100dvh - 32px);}
}
