/* Tema final. Se carga después de los estilos históricos. */
:root[data-theme="light"] { --bg:#edf5ff; --surface:#fff; --surface2:#eaf2ff; --sidebar:#09266c; --accent:#0076db; --accent-dk:#0057b8; --accent-lt:#e0f4ff; --text:#082457; --text2:#365377; --text3:#506887; --border:#d8e4f5; --green:#137846; --green-lt:#e0f8eb; --purple:#6534d9; }
body { font-family:Inter,system-ui,sans-serif; font-size:18px; }
.main { min-width:0; }
.sidebar { width:270px; min-width:270px; overflow-y:auto; background:linear-gradient(165deg,#073677,#111f68); }
.sb-brand-name { font-size:26px; }
.sb-brand-sub,.sb-urole,.nav-lbl { font-size:13px; }
.sb-uname,.nav-item { font-size:18px; }
.nav-item { padding:15px; }
.nav-item.active { background:#007de2; }
.sb-footer { padding:20px 22px 24px; color:#b8d4ed; font-size:15px; line-height:1.7; }
.sb-footer a { display:inline-flex; align-items:center; margin-left:6px; padding:6px 12px; border-radius:8px; color:#fff!important; background:#d94b61; font-size:15px; font-weight:700; text-decoration:none!important; }
.sb-footer a:hover { background:#b9364c; }
.topbar { min-height:76px; height:auto; padding:16px 28px; flex-wrap:wrap; }
.tb-title { font-size:22px; }
.tb-crumb { font-size:16px; }
.content-main { padding:28px; }
.btn,.btn-sm { font-size:16px; min-height:46px; }
.btn-primary { background:#0076db; border-color:#0076db; }
.dashboard-view { max-width:1680px; }
.dashboard-intro { background:linear-gradient(115deg,#00b1f4,#a8ddff); padding:42px; border-radius:24px; margin:0 0 24px; align-items:center; }
.dashboard-intro h1 { font-size:clamp(36px,3.4vw,58px); color:#062460; line-height:1.08; max-width:800px; }
.dashboard-eyebrow { font-size:14px; color:#08336a; }
.dashboard-intro p { font-size:20px; color:#153e6f; max-width:650px; line-height:1.6; }
.dashboard-date { background:#ffffffb3; color:#123365; font-size:15px; }
.dashboard-view > .kpi-grid { gap:22px; margin-bottom:26px!important; }
.dashboard-view > .kpi-grid .kpi { padding:28px; min-height:180px; border:0; border-radius:20px; }
.dashboard-view > .kpi-grid .kpi:nth-child(1) { background:linear-gradient(120deg,#103fbb,#086bdb)!important; }
.dashboard-view > .kpi-grid .kpi:nth-child(2) { background:#fff0f1!important; }
.dashboard-view > .kpi-grid .kpi:nth-child(3) { background:#dcf8eb!important; }
.dashboard-view > .kpi-grid .kpi:nth-child(4) { background:#eee6ff!important; }
.dashboard-view .kpi-grid .kpi .kpi-val { font-family:Inter,system-ui,sans-serif; font-size:clamp(28px,2.5vw,42px)!important; font-weight:700; margin:10px 0; white-space:normal; overflow-wrap:anywhere; }
.dashboard-view .kpi-lbl { font-size:14px; }
.dashboard-view .kpi-grid .kpi .kpi-sub { font-size:17px!important; opacity:1!important; }
.dashboard-view .kpi:first-child .kpi-lbl,.dashboard-view .kpi:first-child .kpi-sub { color:#e1f3ff!important; }
.dashboard-primary { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:24px; margin-bottom:24px; }
.dashboard-secondary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; }
.dashboard-secondary > :nth-child(1) { grid-column:2; grid-row:1; }
.dashboard-secondary > :nth-child(2) { grid-column:1; grid-row:1 / span 2; }
.dashboard-secondary > :nth-child(3) { grid-column:2; }
.dashboard-view .card { padding:28px; border-radius:20px; min-width:0; }
.dashboard-view .card [style*="font-size:"] { font-size:17px!important; }
.dashboard-view .card > div[style*="font-weight:700"],.dashboard-primary > .card:first-child > div:first-child > div:first-child > div:first-child { font-size:24px!important; }
.dashboard-view .card .tl-action { font-size:18px; }
.dashboard-view .card .tl-meta,.dashboard-view .badge { font-size:15px; }
.dashboard-view .monthly-chart { height:280px; width:100%; }
.dashboard-secondary svg { width:150px!important; height:150px!important; }
.dashboard-primary a[style*="border-left"] { padding:16px!important; flex-wrap:wrap; }
table,.tercero-name,.form-input,.form-select,.form-textarea { font-size:17px; }
.form-label,.field-lbl,thead th { font-size:14px; }
a:focus-visible,button:focus-visible { outline:3px solid #00a9ec; outline-offset:3px; }
@media(max-width:1200px) { .sidebar { width:230px; min-width:230px; } .dashboard-primary,.dashboard-secondary { grid-template-columns:minmax(0,1fr); } .dashboard-secondary > :nth-child(n) { grid-column:auto; grid-row:auto; } .dashboard-intro { flex-wrap:wrap; } }
@media(max-width:700px) { .sidebar { width:100%; min-width:0; } .sb-footer { display:block; } .content-main { padding:14px; } .dashboard-intro { padding:26px; } .dashboard-intro p { font-size:18px; } .dashboard-view > .kpi-grid { grid-template-columns:1fr!important; } .dashboard-view .card { padding:20px; } .dashboard-view .monthly-chart { height:210px; } .nav-item { font-size:16px; } }

/* Escala común para todas las vistas de la aplicación. */
body { font-size:17px; line-height:1.55; }
.content-main { font-size:17px; }
.page-title { font-size:26px!important; color:#082457; }
.page-sub { font-size:16px!important; }
.card, .form-card { font-size:17px; border-radius:18px; }
.form-title { font-size:22px!important; }
.form-label, .field-lbl, .sec-head { font-size:13px!important; letter-spacing:.06em; }
.form-input, .form-select, .form-textarea { font-size:17px!important; min-height:48px; }
.form-help, .form-error { font-size:14px!important; }
.form-textarea { min-height:120px; }
.btn { font-size:16px!important; min-height:46px; }
.btn-sm { font-size:15px!important; min-height:42px; }
.btn-xs { font-size:14px!important; min-height:36px; }
.table-toolbar { padding:17px 20px; }
.search-box input, .fsel, .drange { font-size:16px!important; min-height:42px; }
table { font-size:16px!important; }
thead th { font-size:13px!important; padding:14px 16px; }
tbody td { padding:15px 16px; }
.tercero-name { font-size:16px!important; }
.desc-text, .col-date, .col-num, .col-ref { font-size:15px!important; }
.col-money { font-size:16px!important; }
.badge { font-size:14px!important; padding:6px 11px; }
.alert { font-size:16px!important; padding:15px 18px; }
.doc-name { font-size:16px!important; }
.doc-meta, .tl-meta { font-size:14px!important; }
.tl-action { font-size:16px!important; }
.field-val { font-size:17px!important; }
.field-val.mono { font-size:16px!important; }
.field-val.big { font-size:25px!important; }
.upload-zone { font-size:16px!important; padding:26px; }
.folder-path { font-size:14px!important; }
.login-card { width:440px; padding:44px 46px; }
.login-brand-name { font-size:30px; }
.login-brand-sub { font-size:14px; }
.login-card .form-label { font-size:14px!important; }

/* Corrige textos pequeños declarados inline en páginas antiguas. */
.content-main [style*="font-size:9px"], .content-main [style*="font-size:10px"], .content-main [style*="font-size:10.5px"], .content-main [style*="font-size:11px"] { font-size:14px!important; }
.content-main [style*="font-size:11.5px"], .content-main [style*="font-size:12px"], .content-main [style*="font-size:12.5px"] { font-size:15px!important; }
.content-main [style*="font-size:13px"] { font-size:17px!important; }

@media(max-width:700px) {
  body, .content-main { font-size:16px; }
  .page-title { font-size:22px!important; }
  .card, .form-card { padding:20px; }
  table { min-width:760px; }
  .login-card { width:min(94vw,440px); padding:30px 24px; }
}
