/* ============================================================================
   Vahlio · v180 — Escala nativa para 1280×630 px (1920×1080 al 150 %)
   ----------------------------------------------------------------------------
   Capa final (se carga después de estilos-03). No hay zoom: todo se redimensiona
   de forma proporcional con un factor único (~0.83) respecto del diseño de 1600.
     · Tipografía base 15px → toda la escala en rem baja ~6 %.
     · Radios, alturas de control, paddings y gaps reducidos coherentemente.
     · En pantallas mayores a 1280 la app se centra con ancho fijo.
   ============================================================================ */

/* 1 · Tokens del sistema (radios) — se redefinen en :root para ganar al base */
:root{
  --r-sheet:16px; --r-card:13px; --r-row:10px; --r-nav:10px; --r-ctl:9px;
}

/* 2 · Lienzo y tipografía base */
html{font-size:15px}                         /* escala global de la tipografía (rem) */
html{background:var(--canvas)}
/* El contenido llena el ancho disponible con esta densidad compacta y se centra
   más allá de ~1536px, para servir por igual a 150 % (1280), 125 % (1536) y 100 % (1920). */
@media(min-width:1537px){
  html .app{max-width:1536px;margin-inline:auto;box-shadow:0 0 0 1px var(--line)}
}
html .app{grid-template-columns:var(--sbw,204px) minmax(0,1fr);min-height:100vh}

/* 3 · Estructura: barra lateral, shell, barra superior, contenido */
:root{--sbw:204px;--pad-x:13px}
html .sidebar{width:var(--sbw);padding:12px 7px 7px 7px}
html .shell{margin:7px 7px 7px 0;min-height:calc(100vh - 14px)}
html .topbar{height:40px;padding:0 11px;gap:10px}
html .main{padding:4px var(--pad-x) 18px}
html .footer{padding:9px 0 3px}

/* Barra superior: migas, selector de organización, asistente, campana */
html .roundbtn{width:30px;height:30px}
html .roundbtn .i{width:16px;height:16px}
html .org{height:30px;gap:6px;padding:0 10px 0 8px}
html .org .i{width:15px;height:15px}
html .ask{height:30px;padding:0 12px 0 6px;gap:7px}
html .ask .i{width:16px;height:16px}
html .crumb{font-size:12px}

/* Barra lateral */
html .brand{padding:0 4px 8px 6px;row-gap:4px}
html .brand svg{width:126px;height:auto}
html .side-search{height:28px}
html .side-search .i{width:15px;height:15px}
html .side-search kbd{display:none}
html .side-label{padding:0 8px;height:19px}
html .side-label span{font-size:11px}
html .nav{gap:1px}
html .nav-btn{height:27px;padding:0 10px;gap:9px;font-size:12.5px}
html .nav-btn .i{width:16px;height:16px}
html .badgecount{min-width:18px;height:17px;font-size:10.5px;padding:0 5px}
html .side-bottom{padding-top:6px}
html .account{padding:6px}
html .avatar{width:30px;height:30px;font-size:12px}

/* 4 · Encabezado de página */
html .page-head{margin:0 0 10px;gap:12px}
html .page-head h1{font-size:19px;line-height:1.15;letter-spacing:-.012em}
html .head-icon{width:30px;height:30px;border-radius:10px}
html .head-icon .i{width:16px;height:16px}

/* 5 · Controles compartidos (escala ~0.83) */
html .btn{height:30px;padding:0 11px;gap:6px}
html .btn .i{width:15px;height:15px}
html .btn.tiny{height:24px;padding:0 9px}
html .btn.primary{height:30px}
html .select,html .popbtn{height:32px;min-width:118px}
html .searchbox{height:32px;min-width:200px;padding:0 11px;gap:8px}
html .searchbox .i{width:15px;height:15px}
html .input,html textarea.input{min-height:32px}
html .field label{margin-bottom:5px;font-size:12px}
html .seg{padding:3px}
html .seg .i{width:15px;height:15px}
html .chip{height:18px;padding:0 7px}
html .pill,html .filter-pill{height:28px}

/* 6 · Paneles, secciones y tarjetas */
html .panel{padding:12px 14px}
html .section-title{margin-bottom:8px;min-height:0}
html .section-title h2{font-size:15.5px}
html .grid4{gap:9px;margin-bottom:9px}
html .grid72,html .grid7{gap:9px;margin-bottom:9px}
html .kpi{padding:12px 13px}
html .kpi-top{font-size:12.5px;margin-bottom:3px}
html .kpi-icon{width:28px;height:28px}
html .kpi-icon .i{width:16px;height:16px}
html .kpi strong{font-size:1.7rem;margin:7px 0 2px}
html .kpi small{margin-bottom:8px}
html .kpi-note{margin-top:5px}
html .chart-summary{margin:5px 0 7px}

/* 7 · Tablas (listados) */
html .toolbar{gap:8px;margin-bottom:8px}
html .table th{padding:7px 10px;height:30px;font-size:11.5px}
html .table td{padding:6px 10px;font-size:12.5px}
html .table .sub{font-size:11.5px}
html .pills.seg-status{margin:6px 0 9px}
html .pills .filter-pill{min-width:0;padding:0 13px;font-size:12.5px}

/* Postulaciones: Subgerente y Jefe comercial ocultos por defecto (ver JS) */

/* 8 · Expediente (modal pt-exp) */
html .an-dlg.pt-exp,html .an-dlg.xl{height:calc(100vh - 14px);max-height:calc(100vh - 14px);width:min(1266px,calc(100vw - 14px))}
html .an-dlg.pt-exp .pt-wrap{grid-template-columns:252px minmax(0,1fr)}
html .pt-side{padding:10px;gap:8px}
html .pt-card{padding:12px;border-radius:12px;display:flex;flex-direction:column;gap:6px}
html .pt-idc{padding:12px}
html .pt-idr{gap:10px}
html .pt-side .pt-idc .pt-av{width:56px;height:56px;font-size:18px}
html .pt-side .pt-idc .pt-hn{font-size:18px;line-height:1.2}
html .pt-reg{padding:8px 10px}
html .pt-kick{margin-bottom:6px}
html .pt-f{gap:0}
html .pt-top .pt-bar{height:32px;margin:6px 16px 0}
html .pt-state{padding:10px 14px;gap:8px;margin:8px 16px 0}
html .pt-sh{display:grid;grid-template-columns:minmax(0,250px) minmax(0,1fr);gap:16px;align-items:center}
html .pt-prog{width:auto}
html .pt-dec select,html .pt-dec .popbtn,html .pt-dec .input,html .pt-dec .btn{height:30px}
html .pt-tabs{padding:0 16px}
html .pt-tabs [role=tab]{height:32px}
html .pt-scroll{padding:0 16px 16px}

/* 9 · Modales de análisis a todo el alto útil */
html .an-dlg.doc{height:calc(100vh - 14px);max-height:calc(100vh - 14px);width:min(1266px,calc(100vw - 14px))}
html .an-dlg.lg,html .an-dlg.md{max-height:calc(100vh - 22px)}
html .an-dlg .hv2 h2,html .an-dlg .hv2 .an-nm{font-size:20px}

/* Revisión documental */
html .an-dlg.doc .an-db{padding:10px 14px}
html .an-dlg.doc .an-split{gap:14px;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
html .an-dlg.doc .an-side{overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column}
html .an-dlg.doc .an-ahead,html .an-dlg.doc .an-trz,html .an-dlg.doc .an-dd,html .an-dlg.doc .an-afoot{flex:none}
html .an-ahead{padding-top:0}
html .an-dlg.doc .an-id{margin-top:2px}
html .an-dlg.doc .an-idn h2,html .an-dlg.doc .an-dt h2{font-size:19px}
html .an-trz h4{margin:6px 0 4px;font-size:12.5px}
html .an-dlg.doc .an-trz .an-tz.slim{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html .an-dlg.doc .an-trz .an-tz.slim>div{border:0!important;border-right:1px solid var(--line-strong)!important;padding:6px 10px}
html .an-dlg.doc .an-trz .an-tz.slim>div:last-child{border-right:0!important}
html .an-dlg.doc .an-evt{flex:none;overflow:visible;min-height:0;display:flex;flex-direction:column}
html .an-dlg.doc .an-evt>*{flex:none}
html .an-dlg.doc .an-evt>.an-ev{overflow:visible;max-height:none}
html .an-evt .an-blk{padding:10px 12px;margin-bottom:8px}
html .an-dlg.doc .an-dd{padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:end}
html .an-dlg.doc .an-dd .field{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:3px}
html .an-dlg.doc .an-dd .field label{text-align:left;align-self:flex-start;margin:0}
html .an-dlg.doc .an-dd .field select,html .an-dlg.doc .an-dd .field .popbtn{height:30px}
html .an-dlg.doc .an-dd .btn-row{grid-column:2;grid-row:1;align-self:end;margin:0}
html .an-dlg.doc .an-dd .hint{grid-column:1/-1;grid-row:2;margin:0;font-size:12px}
html .an-dlg.doc .an-afoot{position:sticky;bottom:0;background:var(--surface);z-index:2;padding:6px 14px}
html .an-df{padding:6px 14px}
