:root{
      --g-900:#065f46;
      --g-800:#0f766e;
      --g-700:#15803d;
      --g-600:#16a34a;
      --g-500:#22c55e;

      --g-soft:#e9f7ef;
      --bg:#ffffff;
      --bg-soft:#f8fafc;

      --border:#e5e7eb;
      --text:#0f172a;
      --muted:#64748b;

      --warn:#f59e0b;
      --danger:#b91c1c;

      --shadow: 0 10px 25px rgba(2,6,23,.08);
      --radius: 14px;
    }

    *{box-sizing:border-box}
    body{
      margin:0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background:var(--bg);
      color:var(--text);
    }

    /* Layout */
    .app{
      display:grid;
      grid-template-columns: 280px 1fr;
      min-height:100vh;
    }
    @media (max-width: 980px){
      .app{grid-template-columns: 1fr}
      .sidebar{position:sticky; top:0; z-index: 100;}
    }

    /* Sidebar */
    .sidebar{
      border-right:1px solid var(--border);
      background: linear-gradient(180deg, #fff, var(--g-soft));
      padding:16px;
      overflow-y: auto;
      height: 100vh;
    }
    .brand{
      display:flex; align-items:center; gap:10px;
      padding:12px;
      border:1px solid rgba(34,197,94,.25);
      background: rgba(34,197,94,.10);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      margin-bottom: 20px;
    }
    .logo{
      display:flex;
      align-items:center;
      justify-content:center;
      color:#fff;
      width:42px; height:42px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--g-600), var(--g-900));
      box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
    }
    .logo svg{width:26px; height:26px; display:block}

    .brand h1{margin:0; font-size:14px; letter-spacing:.2px}
    .brand p{margin:2px 0 0 0; font-size:12px; color:var(--muted); line-height:1.2}

    /* Menu Categories */
    details {
      margin-bottom: 8px;
      border-radius: 8px;
      border: 1px solid transparent;
    }
    details[open] {
      background-color: #fff;
      border-color: var(--border);
    }
    summary {
      padding: 10px;
      cursor: pointer;
      font-weight: 600;
      font-size: 13px;
      color: var(--g-800);
      list-style: none;
      border-radius: 8px;
      transition: background 0.2s;
    }
    summary:hover {
      background-color: var(--g-soft);
    }
    summary::after {
      content: '+'; 
      float: right;
      font-weight: bold;
    }
    details[open] summary::after {
      content: '-';
    }
    
    .nav-links{
      list-style:none; padding:0; margin:0;
      display: flex; flex-direction: column; gap: 4px;
      padding: 5px 10px 15px 10px;
    }
    .nav-links li button{
      width:100%;
      text-align:left;
      padding:10px 12px;
      border:none;
      background:transparent;
      border-radius:8px;
      cursor:pointer;
      font-size:13px;
      color:var(--muted);
      transition:all .2s ease;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .nav-links li button:hover{
      background:#f1f5f9;
      color:var(--text);
    }
    .nav-links li button.active{
      background:var(--g-600);
      color:#fff;
      font-weight:500;
      box-shadow: 0 4px 12px rgba(22,163,74,.3);
    }
    .badge{
      background: rgba(0,0,0,0.1);
      padding: 2px 6px;
      border-radius: 10px;
      font-size: 10px;
    }

    /* Main Content */
    .main{
      padding:24px;
      background: var(--bg-soft);
      overflow-y: auto;
      height: 100vh;
    }
    .card{
      background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
      border-radius: 16px;
      border: 1px solid rgba(15, 23, 42, 0.10);
      padding: 18px 20px;
      margin-bottom: 24px;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
      overflow: hidden;
    }
    
    /* Upload Step */
    .upload-area{
      border:2px dashed var(--border);
      border-radius:12px;
      padding:30px;
      text-align:center;
      transition:all .3s;
      background: #fafafa;
    }
    .upload-area:hover{
      border-color:var(--g-500);
      background:var(--g-soft);
    }
    .btn{
      background:var(--text); color:#fff;
      border:none; padding:10px 20px;
      border-radius:8px; cursor:pointer;
      font-weight:500; font-size:14px;
      transition:transform .1s;
    }
    .btn:active{transform:scale(0.97)}
    .btn-primary{
      background: linear-gradient(135deg, var(--g-600), var(--g-800));
    }

    /* Progress Bar */
    #progressContainer {
        margin-top: 15px;
        width: 100%;
        display: none; /* Hidden by default */
        text-align: center;
    }
    progress {
        width: 100%;
        height: 20px;
        border-radius: 10px;
        overflow: hidden;
    }
    progress::-webkit-progress-bar {
        background-color: #eee;
        border-radius: 10px;
    }
    progress::-webkit-progress-value {
        background-color: var(--g-500);
        border-radius: 10px;
        transition: width 0.3s ease;
    }

    /* Tables */
    .table-container{
      overflow-x:hidden;
      border-radius:8px;
      border:1px solid var(--border);
    }

    
    /* SAT (r18): tabla sin scroll horizontal + anchos ajustados */
    #reportCard[data-report="r18"] .table-container{ overflow-x:hidden; }

    #reportCard[data-report="r18"] table{
      width:100%;
      min-width:0;
      table-layout:fixed;
    }
    #reportCard[data-report="r18"] th,
    #reportCard[data-report="r18"] td{
      padding:6px 6px;
      font-size:11px;
      line-height:1.25;
      vertical-align:top;
    }

    
    /* Ajustes de tabla — r14 (Instructor Responsable) */
    #reportCard[data-report="r14"] .table-container{ overflow-x:auto; }
    #reportCard[data-report="r14"] #dataTable{
      width:max-content;
      min-width:90%;
      margin:0 auto;
      table-layout:fixed;
    }
    #reportCard[data-report="r14"] th,
    #reportCard[data-report="r14"] td{
      padding:10px 12px;
      font-size:11px;
      line-height:1.2;
      vertical-align:top;
    }
    #reportCard[data-report="r14"] th{ white-space:normal; word-break:break-word; }
    #reportCard[data-report="r14"] td{ white-space:nowrap; }

    /* Anchos de columnas — r14 (incluye # como primera columna) */
    #reportCard[data-report="r14"] th:nth-child(1),
    #reportCard[data-report="r14"] td:nth-child(1){ width:48px; } /* # */
    #reportCard[data-report="r14"] th:nth-child(2),
    #reportCard[data-report="r14"] td:nth-child(2){ width:240px; } /* Instructor Responsable */
    #reportCard[data-report="r14"] th:nth-child(3),
    #reportCard[data-report="r14"] td:nth-child(3){ width:120px; } /* Cantidad de Fichas */
    #reportCard[data-report="r14"] th:nth-child(4),
    #reportCard[data-report="r14"] td:nth-child(4){ width:120px; } /* Cantidad de horas */
    #reportCard[data-report="r14"] th:nth-child(n+5),
    #reportCard[data-report="r14"] td:nth-child(n+5){ width:58px; } /* Métricas */

    
    /* Columnas ampliadas (x2) — r14 */
    #reportCard[data-report="r14"] th:nth-child(5),
    #reportCard[data-report="r14"] td:nth-child(5),
    #reportCard[data-report="r14"] th:nth-child(6),
    #reportCard[data-report="r14"] td:nth-child(6),
    #reportCard[data-report="r14"] th:nth-child(7),
    #reportCard[data-report="r14"] td:nth-child(7),
    #reportCard[data-report="r14"] th:nth-child(8),
    #reportCard[data-report="r14"] td:nth-child(8),
    #reportCard[data-report="r14"] th:nth-child(9),
    #reportCard[data-report="r14"] td:nth-child(9),
    #reportCard[data-report="r14"] th:nth-child(10),
    #reportCard[data-report="r14"] td:nth-child(10),
    #reportCard[data-report="r14"] th:nth-child(11),
    #reportCard[data-report="r14"] td:nth-child(11),
    #reportCard[data-report="r14"] th:nth-child(12),
    #reportCard[data-report="r14"] td:nth-child(12),
    #reportCard[data-report="r14"] th:nth-child(13),
    #reportCard[data-report="r14"] td:nth-child(13),
    #reportCard[data-report="r14"] th:nth-child(13),
    #reportCard[data-report="r14"] td:nth-child(13){ width:116px; }
/* Ajustes de tabla — r15 (Programa) */
    #reportCard[data-report="r15"] .table-container{ overflow-x:auto; }
    #reportCard[data-report="r15"] #dataTable{
      width:max-content;
      min-width:90%;
      margin:0 auto;
      table-layout:fixed;
    }
    #reportCard[data-report="r15"] th,
    #reportCard[data-report="r15"] td{
      padding:10px 12px;
      font-size:11px;
      line-height:1.2;
      vertical-align:top;
    }
    #reportCard[data-report="r15"] th{ white-space:normal; word-break:break-word; }
    #reportCard[data-report="r15"] td{ white-space:nowrap; }

    
    /* Programa: ajustar texto a la celda */
    #reportCard[data-report="r15"] td:nth-child(2){
      white-space:normal;
      overflow-wrap:anywhere;
      word-break:break-word;
      line-height:1.15;
    }
/* Anchos de columnas — r15 */
    #reportCard[data-report="r15"] th:nth-child(1),
    #reportCard[data-report="r15"] td:nth-child(1){ width:48px; } /* # */
    #reportCard[data-report="r15"] th:nth-child(2),
    #reportCard[data-report="r15"] td:nth-child(2){ width:300px; } /* Programa */
    #reportCard[data-report="r15"] th:nth-child(3),
    #reportCard[data-report="r15"] td:nth-child(3){ width:120px; } /* Cantidad de Fichas */
    #reportCard[data-report="r15"] th:nth-child(n+4),
    #reportCard[data-report="r15"] td:nth-child(n+4){ width:58px; } /* Métricas */

    /* Columnas ampliadas (x2) — r15 */
    #reportCard[data-report="r15"] th:nth-child(4),
    #reportCard[data-report="r15"] td:nth-child(4),
    #reportCard[data-report="r15"] th:nth-child(5),
    #reportCard[data-report="r15"] td:nth-child(5),
    #reportCard[data-report="r15"] th:nth-child(6),
    #reportCard[data-report="r15"] td:nth-child(6),
    #reportCard[data-report="r15"] th:nth-child(7),
    #reportCard[data-report="r15"] td:nth-child(7),
    #reportCard[data-report="r15"] th:nth-child(8),
    #reportCard[data-report="r15"] td:nth-child(8),
    #reportCard[data-report="r15"] th:nth-child(9),
    #reportCard[data-report="r15"] td:nth-child(9),
    #reportCard[data-report="r15"] th:nth-child(10),
    #reportCard[data-report="r15"] td:nth-child(10),
    #reportCard[data-report="r15"] th:nth-child(11),
    #reportCard[data-report="r15"] td:nth-child(11),
    #reportCard[data-report="r15"] th:nth-child(12),
    #reportCard[data-report="r15"] td:nth-child(12),
    #reportCard[data-report="r15"] th:nth-child(13),
    #reportCard[data-report="r15"] td:nth-child(13){ width:116px; }
/* Ajuste de anchos por columna (sin Centro) — porcentajes para evitar scroll */
    #reportCard[data-report="r18"] th:nth-child(1),  #reportCard[data-report="r18"] td:nth-child(1){  width:6%; }  /* Severidad */
    #reportCard[data-report="r18"] th:nth-child(2),  #reportCard[data-report="r18"] td:nth-child(2){  width:4%; }  /* Score */
    #reportCard[data-report="r18"] th:nth-child(3),  #reportCard[data-report="r18"] td:nth-child(3){  width:5%; }  /* Ficha */
    #reportCard[data-report="r18"] th:nth-child(4),  #reportCard[data-report="r18"] td:nth-child(4){  width:11%; } /* Programa */
    #reportCard[data-report="r18"] th:nth-child(5),  #reportCard[data-report="r18"] td:nth-child(5){  width:9%; }  /* Responsable */
    #reportCard[data-report="r18"] th:nth-child(6),  #reportCard[data-report="r18"] td:nth-child(6){  width:5%; }  /* Días a fin */

    /* Columnas numéricas compactas */
    #reportCard[data-report="r18"] th:nth-child(7),  #reportCard[data-report="r18"] td:nth-child(7){  width:5%; }  /* % Con juicio */
    #reportCard[data-report="r18"] th:nth-child(8),  #reportCard[data-report="r18"] td:nth-child(8){  width:5%; }  /* En Tránsito */
    #reportCard[data-report="r18"] th:nth-child(9),  #reportCard[data-report="r18"] td:nth-child(9){  width:5%; }  /* Sin Ruta */
    #reportCard[data-report="r18"] th:nth-child(10), #reportCard[data-report="r18"] td:nth-child(10){ width:6%; }  /* Sin Programar */
    #reportCard[data-report="r18"] th:nth-child(11), #reportCard[data-report="r18"] td:nth-child(11){ width:6%; }  /* Retención % */

    /* Alertas: más espacio para lectura */
    #reportCard[data-report="r18"] th:nth-child(12), #reportCard[data-report="r18"] td:nth-child(12){ width:14%; } /* Alertas */
    #reportCard[data-report="r18"] td:nth-child(12){ white-space:normal; overflow-wrap:anywhere; word-break:break-word; }

    /* Columnas explicativas */
    #reportCard[data-report="r18"] th:nth-child(13), #reportCard[data-report="r18"] td:nth-child(13){ width:9%; }  /* Causa probable */
    #reportCard[data-report="r18"] th:nth-child(14), #reportCard[data-report="r18"] td:nth-child(14){ width:10%; } /* Acción recomendada */
    #reportCard[data-report="r18"] th:nth-child(15), #reportCard[data-report="r18"] td:nth-child(15){ width:7%; }  /* Responsable SAT */
    #reportCard[data-report="r18"] th:nth-child(16), #reportCard[data-report="r18"] td:nth-child(16){ width:5%; }  /* SLA */

    #reportCard[data-report="r18"] td:nth-child(4),
    #reportCard[data-report="r18"] td:nth-child(5),
    #reportCard[data-report="r18"] td:nth-child(13),
    #reportCard[data-report="r18"] td:nth-child(14),
    #reportCard[data-report="r18"] td:nth-child(15){
      white-space:normal;
      overflow-wrap:anywhere;
      word-break:break-word;
    }

/* Compacto y centrado (Resumen/Backlog/Top/Ocupación) */
    .table-container.compact{
      max-width: 1550px;
      margin: 0 auto;
    }
    #dataTable.compact th, 
    #dataTable.compact td{
      text-align:center !important;
      padding:6px 8px;
      font-size:12px;
      line-height:1.25;
    }

    table{
      width:100%;
      border-collapse:collapse;
      font-size:12px;
      table-layout:fixed; /* evita scroll horizontal: ajusta columnas al contenedor */
    }
    th, td{
      padding:8px 10px;
      border-bottom:1px solid var(--border);
      text-align:left;
      white-space:normal;
      overflow-wrap:anywhere;
      word-break:break-word;
      line-height:1.25;
      vertical-align:top;
    }
    th{
      background:#f8fafc;
      font-weight:600;
      color:var(--muted);
      position:sticky; top:0;
    }
    
    .sort-ind{font-size:10px; color:var(--muted); flex-shrink:0;}

    .th-wrap{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:8px;
      white-space:normal;
    }
    /* Compact headers truly centered (fix flex layout) */
    #dataTable.compact th .th-wrap{
      justify-content:center;
      align-items:center;
    }

    /* Charts (similar to tabla.html) */
    .charts-grid{
      display:grid;
      grid-template-columns: 1fr 1fr;
      gap:12px;
      margin-bottom: 18px;
    }
    /* Compact charts (Resumen ejecutivo global y Embudo operativo) */
    .charts-grid.small-charts{
      grid-template-columns: repeat(2, minmax(0, 320px));
      justify-content:center;
      gap:10px;
    }
    @media (max-width: 980px){
      .charts-grid{grid-template-columns:1fr;}
      .charts-grid.small-charts{grid-template-columns:1fr;}
    }
.chart-card{
      border:1px solid var(--border);
      border-radius: 12px;
      background:#fff;
      padding:12px;
      box-shadow: 0 6px 14px rgba(2,6,23,.06);
    }
    .chart-title{
      margin:0 0 8px 0;
      font-size:12px;
      color:var(--muted);
      font-weight:800;
      letter-spacing:.2px;
    }
    .chart-card canvas{max-width:100%;}
    .chart-wrap{
      position:relative;
      height:260px;
      width:100%;
    }
    .chart-wrap.h220{height:220px;}
    .chart-wrap.h230{height:230px;}
    .chart-wrap.h240{height:240px;}
    .chart-wrap.h260{height:260px;}
    .chart-wrap.h280{height:280px;}
        .h360{height:360px;}
        .chart-wrap.hAutoSat{height:auto; max-height:320px; overflow-y:auto; overflow-x:hidden;}
.chart-wrap canvas{
      width:100% !important;
      height:100% !important;
      display:block;
    }
    /* Full-width charts for r13/r17 */
    .charts-grid.full-width{
      grid-template-columns: 1fr 1fr;
      gap:12px;
    }
    @media (max-width: 980px){
      .charts-grid.full-width{grid-template-columns:1fr;}
    }



    
    
    .chart-card.small{
      padding:8px;
      max-width: 320px;
      justify-self:center;
    }
    .chart-card.small .chart-title{
      font-size:12px;
      margin-bottom:6px;
    }
    .sort-controls{
      display:flex;
      gap:6px;
      flex-shrink:0;
    }
    .sort-btn{
      border:1px solid var(--border);
      background:#fff;
      color:var(--muted);
      padding:2px 6px;
      border-radius:6px;
      font-size:10px;
      cursor:pointer;
      line-height:1.2;
    }
    .sort-btn:hover{
      border-color: rgba(22,163,74,.35);
      color: var(--text);
    }
    .sort-btn.active{
      border-color: var(--g-600);
      color: var(--g-900);
      background: rgba(34,197,94,.10);
      font-weight:600;
    }
tr:hover{background:#f1f5f9}
    .num{text-align:right}


    /* Dashboard: KPIs arriba 100% */
    #dashboardArea .dash-kpis{ width:100%; }

    /* KPI cards (v2) */
    #dashboardArea .dash-kpis{
      display:flex;
      flex-direction:column;
      gap:14px;
      margin: 12px 0 14px;
    }
    #dashboardArea .kpi-top-grid{
      display:grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap:12px;
      align-items:stretch;
    }
    @media (max-width: 1400px){
      #dashboardArea .kpi-top-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (max-width: 980px){
      #dashboardArea .kpi-top-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 640px){
      #dashboardArea .kpi-top-grid{ grid-template-columns: 1fr; }
    }
    #dashboardArea .kpi-card{
      border: 1px solid var(--border);
      border-radius: 14px;
      background:#fff;
      padding: 14px 16px 12px;
      min-height: 92px;
      height:100%;
      display:flex;
      justify-content:space-between;
      gap:12px;
      box-shadow: 0 1px 0 rgba(2,6,23,.04);
    }
    #dashboardArea .kpi-left{ min-width:0; }
    #dashboardArea .kpi-title{
      font-size: 12px;
      color: var(--muted);
      font-weight: 800;
      letter-spacing: .01em;
    }
    #dashboardArea .kpi-value{
      margin-top: 6px;
      font-size: 28px;
      font-weight: 950;
      color: var(--text);
      line-height: 1.05;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    #dashboardArea .kpi-meta{
      margin-top: 10px;
      display:flex;
      gap:10px;
      align-items:center;
      flex-wrap:wrap;
      font-size: 11px;
      color: var(--muted);
    }
    #dashboardArea .kpi-pill{
      display:inline-flex;
      align-items:center;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(37,99,235,.08);
      color: rgba(37,99,235,1);
      font-weight: 800;
      border: 1px solid rgba(37,99,235,.12);
    }
    #dashboardArea .kpi-right{
      display:flex;
      flex-direction:column;
      align-items:flex-end;
      justify-content:flex-start;
      gap:8px;
      flex:0 0 auto;
    }
    #dashboardArea .kpi-badge{
      font-size: 12px;
      font-weight: 900;
      line-height:1;
      color: var(--g-700);
    }
    #dashboardArea .kpi-badge.purple{ color: #7c3aed; }
    #dashboardArea .kpi-badge.red{ color: #dc2626; }
    #dashboardArea .kpi-icon{
      width: 36px;
      height: 36px;
      border-radius: 12px;
      display:flex;
      align-items:center;
      justify-content:center;
      background: rgba(100,116,139,.08);
      color: rgba(100,116,139,1);
    }
    #dashboardArea .kpi-progress{
      margin-top: 10px;
      height: 8px;
      background: rgba(226,232,240,1);
      border-radius: 999px;
      overflow:hidden;
    }
    #dashboardArea .kpi-progress > span{
      display:block;
      height:100%;
      background: rgba(34,197,94,1);
      width: 0%;
    }

    /* Embudo */
    #dashboardArea .kpi-embudo{
      border: 1px solid var(--border);
      border-radius: 14px;
      background:#fff;
      padding: 12px 14px 12px;
    }
    #dashboardArea .kpi-embudo-head{
      display:flex;
      align-items:center;
      gap:10px;
      font-weight: 900;
      color: var(--g-900);
    }
    #dashboardArea .kpi-embudo-head .ico{
      color: rgba(16,185,129,1);
      display:inline-flex;
      align-items:center;
    }
    #dashboardArea .kpi-steps{
      margin-top: 12px;
      display:grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap:12px;
      align-items:stretch;
    }
    @media (max-width: 1100px){
      #dashboardArea .kpi-steps{ grid-template-columns: repeat(2, minmax(0,1fr)); }
    }
    @media (max-width: 640px){
      #dashboardArea .kpi-steps{ grid-template-columns: 1fr; }
    }
    #dashboardArea .step-card{
      background: rgba(248,250,252,1);
      border: 1px solid rgba(226,232,240,1);
      border-radius: 14px;
      padding: 12px 14px;
      position: relative;
      overflow: visible;
      min-height: 78px;
    }
    #dashboardArea .step-card::before{
      content:"";
      position:absolute;
      left:0; top:0; bottom:0;
      width:4px;
      border-radius: 14px 0 0 14px;
      background: rgba(59,130,246,1);
    }
    #dashboardArea .step-card:not(:last-child)::after{
      content:"›";
      position:absolute;
      right:-14px;
      top:50%;
      transform: translateY(-50%);
      font-size: 26px;
      color: rgba(203,213,225,1);
      font-weight: 800;
      pointer-events:none;
    }
    #dashboardArea .step-title{
      font-size: 11px;
      font-weight: 900;
      color: rgba(37,99,235,1);
      text-transform: uppercase;
      letter-spacing: .05em;
    }
    #dashboardArea .step-value{
      margin-top: 10px;
      font-size: 22px;
      font-weight: 950;
      color: var(--text);
      line-height: 1.05;
    }
    #dashboardArea .step-sub{
      margin-top: 4px;
      font-size: 11px;
      color: var(--muted);
      font-weight: 700;
    }
    #dashboardArea .step-icon{
      position:absolute;
      right: 10px;
      top: 10px;
      opacity: .55;
      color: rgba(100,116,139,1);
    }
    #dashboardArea .step-card.step-induccion::before{ background: rgba(99,102,241,1); }
    #dashboardArea .step-card.step-induccion .step-title{ color: rgba(79,70,229,1); }
    #dashboardArea .step-card.step-formacion::before{ background: rgba(16,185,129,1); }
    #dashboardArea .step-card.step-formacion .step-title{ color: rgba(5,150,105,1); }
    #dashboardArea .step-card.step-cert::before{ background: rgba(20,184,166,1); }
    #dashboardArea .step-card.step-cert .step-title{ color: rgba(13,148,136,1); }

    /* KPI extra row */
    #dashboardArea .kpi-extra-grid{
      display:grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap:12px;
    }
    @media (max-width: 1200px){
      #dashboardArea .kpi-extra-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 640px){
      #dashboardArea .kpi-extra-grid{ grid-template-columns: 1fr; }
    }
    #dashboardArea .kpi-mini{
      border: 1px solid var(--border);
      border-radius: 14px;
      background:#fff;
      padding: 12px 14px;
      display:flex;
      justify-content:space-between;
      gap:10px;
    }
    #dashboardArea .kpi-mini .t{ font-size:11px; color: var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
    #dashboardArea .kpi-mini .v{ font-size:20px; font-weight:950; color: var(--text); margin-top:6px; line-height:1.05; }


    /* Dashboard: fila única de filtros (en el mismo div, uno seguido del otro) */
    #dashboardArea .dash-inline-filters{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  overflow:visible;
  padding-bottom:0;
  margin-bottom:12px;
}
.dash-inline-filters .dash-search{ flex: 1 1 520px; min-width: 320px; }
.dash-inline-filters .dash-year-dd{ flex: 0 0 180px; width: 180px; }
.dash-inline-filters .dash-date-range{ flex: 1 1 340px; min-width: 320px; }
.dash-inline-filters .dash-date-range .date-field{ min-width: 150px; }
@media (max-width: 700px){
  .dash-inline-filters .dash-date-range{ flex: 1 1 240px; min-width: 240px; }
}
@media (max-width: 700px){
  .dash-inline-filters .dash-year-dd{ flex: 1 1 240px; width: auto; }
}

    #dashboardArea .dash-inline-filters::-webkit-scrollbar{ height:8px; }
    #dashboardArea .dash-inline-filters::-webkit-scrollbar-thumb{ background:rgba(100,116,139,.35); border-radius:999px; }

    #dashboardArea .fblk{
      flex:0 0 auto;
      min-width:180px;
      max-width:240px;
      padding:10px 12px;
      border:1px solid var(--border);
      border-radius:14px;
      background:#fff;
      box-shadow: var(--shadow);
    }
    #dashboardArea .fblk-title{
      font-size:11px;
      font-weight:700;
      color:var(--muted);
      text-transform:uppercase;
      letter-spacing:.04em;
      margin-bottom:8px;
    }

    /* Bloque búsqueda más angosto */
    #dashboardArea .f-search{ min-width:220px; max-width:280px; }
    #dashboardArea .f-search .dash-search{ margin:0; }
    #dashboardArea .f-search input[type=search]{ width:100%; }
    #dashboardArea .f-search details.year-dd{ margin-top:8px; }
    /* Reutiliza estilo slicer dentro de bloques pequeños */
    #dashboardArea .fblk .slicer{ box-shadow:none; border:0; padding:0; }
    #dashboardArea .fblk .slicer-head{ display:none; }

    /* Excepción: Programa/Responsable deben mostrar botón "Nada" */
    #dashboardArea .fblk.f-prog .slicer-head,
    #dashboardArea .fblk.f-resp .slicer-head{
      display:flex;
      align-items:center;
      justify-content:flex-end; /* solo mostrar herramientas */
      gap:8px;
      margin: 0 0 8px 0;
    }
    #dashboardArea .fblk.f-prog .slicer-head .slicer-title,
    #dashboardArea .fblk.f-resp .slicer-head .slicer-title{ display:none; }

    #dashboardArea .fblk.f-prog,
    #dashboardArea .fblk.f-resp{
      min-width:240px;
      max-width:320px;
    }


    /* Agrupación vertical Programa + Responsable */
    #dashboardArea .fblk-stack{
      flex:0 0 auto;
      min-width:240px;
      max-width:320px;
      display:flex;
      flex-direction:column;
      gap:10px;
    }
    #dashboardArea .fblk-stack .fblk{
      width:100%;
      min-width:0;
      max-width:none;
      margin:0;
    }
    #dashboardArea .fblk-stack .fblk.fblk-compact{
      padding:8px 10px;
    }
    #dashboardArea .fblk-stack .slicer-selected{
      max-height:48px;
      overflow:auto;
    }
    #dashboardArea .fblk-stack .slicer-search{
      padding:6px 8px;
    }

    /* Slicers Programa/Responsable con solo barra de búsqueda */
    .slicer-search{
      width:100%;
      padding:8px 10px;
      border:1px solid var(--border);
      border-radius:10px;
      outline:none;
      font-size:12px;
      background:#fff;
    }
    .slicer-search:focus{ border-color: var(--g-500); box-shadow:0 0 0 3px rgba(34,197,94,.18); }
    .slicer-selected{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
    .slicer-chip{
      display:inline-flex; align-items:center; gap:6px;
      padding:4px 8px; border:1px solid var(--border);
      border-radius:999px; background: var(--bg-soft);
      font-size:11px; max-width:100%;
    }
    .slicer-chip span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:240px; }
    .slicer-chip button{ border:0; background:transparent; cursor:pointer; color:var(--muted); font-weight:700; line-height:1; }

    /* Dashboard: grid principal (izquierda resto / derecha contenido) */
    #dashboardArea .dash-grid{ grid-template-columns: 330px 1fr; gap:14px; }
    #dashboardArea .dash-main{ min-width:0; }
    .ctr{text-align:center}
    .th-counter{width:52px; text-align:center}
    .th-counter .th-wrap{justify-content:center}

    
    /* Stats */
    .stats-grid{
      display:grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap:16px;
      margin-bottom:20px;
    }
    .stat-card{
      background:#fff; border:1px solid var(--border);
      padding:16px; border-radius:12px;
    }
    .stat-val{font-size:24px; font-weight:700; color:var(--text)}
    .stat-lbl{font-size:12px; color:var(--muted)}


    /* Table Tools (Búsqueda + filtros + año) */
    .table-tools{
      margin: 0 0 14px 0;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
    }
    .tools-top{
      display:flex;
      gap:12px;
      align-items:center;
      justify-content: space-between;
    }
    .tools-divider{
      height:1px;
      background: rgba(2,6,23,.06);
      margin: 12px 0;
    }

    /* Search */
    .searchbox{
      flex:1;
      display:flex;
      align-items:center;
      gap:10px;
      height: 40px;
      padding: 0 12px;
      border: 1px solid rgba(2,6,23,.10);
      border-radius: 10px;
      background: #fff;
      color: var(--muted);
    }
    .searchbox .icon{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      color: #64748b;
    }
    .searchbox input{
      border:none !important;
      outline:none !important;
      margin:0 !important;
      padding:0 !important;
      height: 38px;
      font-size: 13px;
      color: var(--text);
      background: transparent;
    }

    .searchbox svg{
      width:16px;
      height:16px;
      max-width:16px;
      max-height:16px;
      flex: 0 0 auto;
      display:block;
    }

    /* Pivot-like table (DF-03 Aprendices) */
    .pivot-head th{
      background: rgba(226,232,240,.95);
      color: #0f172a;
      font-weight: 700;
      font-size: 12px;
    }
    .pivot-total td{
      background: rgba(226,232,240,.75);
      font-weight: 700;
      border-top: 2px solid rgba(2,6,23,.12);
    }
    .num{ text-align:right !important; }
    .pivot-caption{
      font-size:12px;
      color: var(--muted);
      margin: 10px 0 8px 0;
    }

    .searchbox.disabled{
      background: rgba(2,6,23,.02);
      opacity: .85;
    }

    /* Year dropdown (multi-select) */
    .year-dd{
      position: relative;
      min-width: 190px;
      border: 1px solid rgba(2,6,23,.10);
      border-radius: 10px;
      background: #fff;
    }
    .year-dd > summary{
      list-style:none;
      cursor:pointer;
      padding: 0 12px;
      height: 40px;
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 12px;
      user-select:none;
      color: var(--text);
      font-size: 13px;
      border-radius: 10px;
    }
    .year-s-left{
      display:flex;
      align-items:center;
      gap:10px;
      color: #111827;
      font-weight: 600;
    }
    .year-dd > summary::-webkit-details-marker{ display:none; }
    .year-dd[open]{
      border-color: rgba(34,197,94,.75);
      box-shadow: 0 0 0 2px rgba(34,197,94,.20);
    }
    .year-panel{
      position:absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 260px;
      padding: 10px 12px;
      border: 1px solid rgba(2,6,23,.10);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 10px 25px rgba(2,6,23,.12);
      z-index: 50;
      max-height: 280px;
      overflow:auto;
    }
    .year-panel-title{
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: #64748b;
      margin-bottom: 8px;
    }
    .year-opt{
      display:flex;
      align-items:center;
      gap:10px;
      padding: 7px 8px;
      border-radius: 10px;
      font-size: 13px;
      color: #0f172a;
      cursor:pointer;
    }
    .year-opt:hover{ background: rgba(2,6,23,.03); }
    .year-opt input{ width:auto; margin:0; }

    /* Filter blocks */
    .filters-block{ margin-top: 10px; }
    .filters-head{
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap:12px;
      margin: 0 0 8px 0;
    }
    .filters-label{
      display:flex;
      align-items:center;
      gap:10px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: #64748b;
    }
    .filters-label::before{
      content:"";
      width: 3px;
      height: 14px;
      border-radius: 999px;
      background: rgba(2,6,23,.12);
      display:inline-block;
    }
    .clear-link{
      background: transparent;
      border: none;
      padding: 0;
      font-size: 12px;
      font-weight: 600;
      color: #16a34a;
      cursor: pointer;
    }
    .clear-link:hover{ text-decoration: underline; }

    .level-filters, .prog-filters{
      display:flex;
      gap:8px;
      flex-wrap: wrap;
    }

    /* Nivel buttons (filled) */
    .level-btn{
      --btn:#0f766e;
      display:inline-flex;
      align-items:center;
      gap:8px;
      padding: 7px 12px;
      border-radius: 999px;
      border: 1px solid rgba(2,6,23,.10);
      background: rgba(2,6,23,.02);
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      cursor:pointer;
      line-height: 1;
      transition: transform .05s, background .15s, border-color .15s, color .15s;
    }
    .level-btn:active{ transform: scale(0.98); }
    .level-btn .check{
      width: 14px;
      display:inline-flex;
      justify-content:center;
      opacity: 0;
      color: #fff;
      font-weight: 800;
    }
    .level-btn.active{
      background: var(--btn);
      border-color: var(--btn);
      color: #fff;
    }
    .level-btn.active .check{ opacity: 1; }

    /* Programa especial (pastel) */
    .prog-btn{
      --btn:#e2e8f0;
      display:inline-flex;
      align-items:center;
      gap:8px;
      padding: 7px 12px;
      border-radius: 999px;
      border:1px solid rgba(2,6,23,.10);
      background: rgba(2,6,23,.02);
      color: #0f172a;
      font-size: 12px;
      cursor: pointer;
      line-height: 1;
      transition: transform .05s, background .15s, border-color .15s, color .15s;
    }
    .prog-btn:active{ transform: scale(0.98); }
    .prog-btn.active{
      background: var(--btn);
      border-color: rgba(2,6,23,.18);
      color: var(--text);
      font-weight: 700;
    }
.chart-card.full-span{ grid-column: 1 / -1; }
/* Utilities */
    .hidden{display:none}
    .grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
    input, select{
      width:100%; padding:8px 12px;
      border:1px solid var(--border);
      border-radius:6px; margin-top:4px;
      font-size:13px;
    }
  
    /* =========================================================
       AJUSTE 1: Archivos esperados + lista de chequeo
       ========================================================= */
    .expected-files{
      margin:0 0 12px 18px;
      color: var(--muted);
      font-size:13px;
      line-height:1.35;
    }
    .expected-files li{ margin: 6px 0; }
    .expected-files strong{ color: var(--text); font-weight: 800; }

    .checklist{
      margin-top: 14px;
      text-align:left;
      max-width: 860px;
      margin-left:auto;
      margin-right:auto;
      border:1px solid var(--border);
      background:#fff;
      border-radius: 12px;
      padding: 12px 14px;
      box-shadow: 0 6px 14px rgba(2,6,23,.05);
    }
    .checklist-title{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:10px;
    }
    .checklist-title h4{
      margin:0;
      font-size:12px;
      color: var(--muted);
      font-weight:800;
      letter-spacing:.08em;
      text-transform:uppercase;
    }
    .checklist-count{
      font-size:12px;
      font-weight:800;
      color: var(--text);
      white-space:nowrap;
    }
    .check-items{
      list-style:none;
      padding:0;
      margin:0;
      display:flex;
      flex-direction:column;
      gap:8px;
    }
    .check-item{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:12px;
      padding:8px 10px;
      border:1px solid rgba(2,6,23,.06);
      border-radius: 10px;
      background: #fafafa;
    }
    .check-name{
      font-size:12px;
      color: var(--text);
      font-weight:700;
      line-height:1.2;
    }
    .check-hint{
      font-size:11px;
      color: var(--muted);
      margin-top:3px;
    }
    .check-status{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:4px 10px;
      border-radius: 999px;
      font-size:11px;
      font-weight:900;
      letter-spacing:.02em;
      flex-shrink:0;
      margin-top:1px;
    }
    .check-status.ok{
      background: rgba(34,197,94,.12);
      color: #15803d;
      border:1px solid rgba(34,197,94,.25);
    }
    .check-status.miss{
      background: rgba(185,28,28,.10);
      color: #b91c1c;
      border:1px solid rgba(185,28,28,.20);
    }
    .check-status.pending{
      background: rgba(2,6,23,.05);
      color: #475569;
      border:1px solid rgba(2,6,23,.08);
    }

    /* =========================================================
       AJUSTE 2: Footer (según imagen)
       ========================================================= */
    .main{ padding-bottom: 120px; }
    .sidebar{ padding-bottom: 120px; }

    .app-footer{
      position:fixed;
      left:0;
      right:0;
      bottom:0;
      padding: 10px 14px;
      background: rgba(255,255,255,.96);
      border-top:1px solid var(--border);
      backdrop-filter: blur(8px);
      z-index: 500;
    }
    .footer-stack{
      width:100%;
      max-width: 520px;
      margin:0 auto;
      text-align:center;
    }
    .footer-title{
      font-size:11px;
      font-weight:900;
      letter-spacing:.22em;
      color: #94a3b8;
      margin-bottom: 8px;
    }
    .footer-pill{
      display:flex;
      align-items:center;
      gap:10px;
      padding: 10px 12px;
      border-radius: 999px;
      border:1px solid rgba(2,6,23,.08);
      background:#fff;
      box-shadow: 0 10px 25px rgba(2,6,23,.12);
    }
    .footer-icon{
      width:34px;
      height:34px;
      border-radius: 999px;
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 34px;
    }
    .footer-icon.left{
      background:#f97316;
      color:#fff;
      font-size:20px;
      font-weight:900;
      line-height:1;
    }
    .footer-icon.right{
      background:#fff;
      border:1px solid rgba(37,99,235,.22);
      color:#2563eb;
    }
    .footer-user{
      flex:1;
      text-align:left;
      line-height:1.1;
    }
    .footer-role{
      font-size:11px;
      font-weight:900;
      letter-spacing:.10em;
      color:#94a3b8;
      text-transform:uppercase;
    }
    .footer-name{
      font-size:13px;
      font-weight:900;
      color:#0f172a;
    }
    .footer-btn{
      border:none;
      background:transparent;
      padding:0;
      cursor:pointer;
    }
    .footer-btn:focus{
      outline:2px solid rgba(37,99,235,.35);
      outline-offset:2px;
      border-radius:999px;
    }
    @media (max-width: 980px){
      .footer-stack{ max-width: 480px; }
    }

    /* =========================
       SAT (Alertas Tempranas)
       ========================= */
    .sat-pill{
      display:inline-flex;
      align-items:center;
      padding:3px 10px;
      border-radius:999px;
      font-size:12px;
      font-weight:800;
      letter-spacing:.2px;
      border:1px solid rgba(15,23,42,.15);
      background:rgba(15,23,42,.05);
      color:#0f172a;
      white-space:nowrap;
    }
    .sat-red{ background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.25); color:#7f1d1d; }
    .sat-orange{ background: rgba(249,115,22,.14); border-color: rgba(249,115,22,.28); color:#7c2d12; }
    .sat-yellow{ background: rgba(234,179,8,.16); border-color: rgba(234,179,8,.30); color:#713f12; }
    .sat-gray{ background: rgba(100,116,139,.12); border-color: rgba(100,116,139,.25); color:#334155; }

    .sat-mini{
      display:inline-block;
      font-size:12px;
      padding:2px 8px;
      border-radius:999px;
      border:1px solid rgba(15,23,42,.12);
      background:rgba(15,23,42,.04);
      white-space:nowrap;
    }

    
    .sat-heatmap{
      width:100%;
      overflow-x:hidden;
      overflow-y:auto;
    }
    .sat-heatmap table{
      width:100%;
      table-layout:fixed;
      border-collapse:separate;
      border-spacing:0;
    }
    .sat-heatmap th, .sat-heatmap td{
      border-bottom:1px solid var(--border);
      border-right:1px solid var(--border);
      padding:8px 8px;
      font-size:12px;
      text-align:center;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .sat-heatmap thead th{
      position:sticky;
      top:0;
      background:#fff;
      z-index:3;
      font-weight:900;
    }
    .sat-heatmap thead th:first-child{ width:52px; }
    .sat-heatmap thead th:nth-child(2){ width:38%; }
    .sat-heatmap thead th:nth-child(n+3){ width:12%; }

    /* Col 1 (#): sticky + centrado */
    .sat-heatmap th:first-child, .sat-heatmap td:first-child{
      position:sticky;
      left:0;
      background:#fff;
      text-align:center;
      font-weight:800;
      z-index:4;
      white-space:nowrap;
    }
    /* Col 2 (Centro): sticky */
    .sat-heatmap th:nth-child(2), .sat-heatmap td:nth-child(2){
      position:sticky;
      left:52px;
      background:#fff;
      text-align:left;
      font-weight:800;
      z-index:3;
      white-space:normal;
      overflow:visible;
      text-overflow:clip;
      word-break:break-word;
    }
    .sat-heatmap td{
      font-variant-numeric: tabular-nums;
    }

  
/* =========================================================
   FICHA ACUMULATIVA (DF-03)
   ========================================================= */
.fa-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top: 12px;
}
@media (max-width: 980px){
  .fa-grid{ grid-template-columns: 1fr; }
}
.fa-panel{
  border:1px solid var(--border);
  border-radius: 12px;
  background:#fff;
  padding:12px;
  box-shadow: 0 6px 14px rgba(2,6,23,.06);
}
.fa-panel h4{
  margin:0 0 10px 0;
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  letter-spacing:.2px;
  text-transform:uppercase;
}
.fa-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:#f8fafc;
  margin-right:6px;
  margin-bottom:6px;
}
.fa-dot{ width:10px; height:10px; border-radius:50%; background: var(--g-500); }
.fa-dot.red{ background: var(--danger); }
.fa-dot.amb{ background: var(--warn); }
.fa-dot.green{ background: var(--g-600); }
.fa-list{
  display:flex; flex-direction:column; gap:8px;
  max-height: 360px;
  overflow:auto;
  padding-right: 6px;
}
.fa-item{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  background:#fff;
}
.fa-item .t{
  font-weight:700; font-size:12px;
  margin-bottom:4px;
}
.fa-item .m{
  font-size:12px; color:var(--muted);
  display:flex; gap:10px; flex-wrap:wrap;
}
.fa-apr-table td, .fa-apr-table th{ font-size:12px; }
.wa-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px;
  border-radius:8px;
  border:1px solid rgba(37,211,102,.35);
  background: rgba(37,211,102,.12);
  color:#0f172a;
  text-decoration:none;
  font-weight:700;
  font-size:12px;
  white-space:nowrap;
}

    /* ===== DF-03 (Ficha Acumulativa) - Datos generales / Competencias ===== */
    #faGeneralArea{margin: 8px 0 14px 0;}
    .fa-general{
      border:1px solid rgba(2,6,23,.08);
      border-radius:14px;
      background: #fff;
      padding:14px;
      box-shadow: 0 10px 24px rgba(2,6,23,.06);
    }
    .fa-general h4{margin:0; font-size:14px; color: var(--g-900);}
    .fa-kv{
      display:grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap:10px;
      margin-top:10px;
    }
    .fa-kv .kv{
      border:1px solid rgba(2,6,23,.06);
      background: rgba(2,6,23,.02);
      border-radius:12px;
      padding:10px;
    }
    .fa-kv .k{
      font-size:11px;
      color: var(--muted);
      font-weight:800;
      letter-spacing:.08em;
      text-transform:uppercase;
    }
    .fa-kv .v{
      font-size:13px;
      font-weight:800;
      color: var(--g-900);
      margin-top:4px;
      word-break: break-word;
    }
    .fa-details{
      margin-top:10px;
      border:1px solid rgba(2,6,23,.08);
      border-radius:14px;
      background:#fff;
      overflow:hidden;
    }
    .fa-details > summary{
      padding:10px 12px;
      cursor:pointer;
      font-weight:900;
      color: var(--g-900);
      background: rgba(2,6,23,.02);
      border-bottom:1px solid rgba(2,6,23,.08);
      list-style:none;
    }
    .fa-details > summary::-webkit-details-marker{display:none;}
    .fa-details > summary::after{content:"";} /* override sidebar plus/minus */
    .fa-details[open] > summary::after{content:"";}
    .fa-tags{
      display:flex;
      flex-wrap:wrap;
      gap:6px;
      padding:10px 12px 12px 12px;
    }
    .fa-tag{
      display:inline-flex;
      align-items:center;
      padding:4px 10px;
      border-radius:999px;
      background: rgba(2,6,23,.03);
      border:1px solid rgba(2,6,23,.10);
      font-size:12px;
      font-weight:800;
      color: var(--g-900);
      max-width:100%;
    }

    /* ===== DF-03 (Ficha Acumulativa) - Diseño tipo "detalle" (estilo dashboard) ===== */
    .fa-general-v2{ padding:18px; }
    .fa-hero{ display:flex; gap:16px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
    .fa-crumb{ display:flex; gap:8px; align-items:center; font-size:12px; color: var(--muted); font-weight:800; }
    .fa-badge{
      display:inline-flex; align-items:center; justify-content:center;
      padding:4px 10px; border-radius:999px;
      border:1px solid rgba(37,211,102,.35);
      background: rgba(37,211,102,.14);
      color: var(--g-900);
      font-weight:900;
      white-space:nowrap;
    }
    .fa-title-lg{ font-size:28px; font-weight:950; color: var(--g-900); margin:6px 0 2px 0; letter-spacing:-.02em; }
    .fa-responsable{ font-size:12px; color: var(--muted); font-weight:700; margin:2px 0 2px 0; }
    .fa-subline{ font-size:12px; color: var(--muted); font-weight:800; }
    .fa-progress-card{
      min-width: 280px;
      border:1px solid rgba(2,6,23,.08);
      border-radius:14px;
      background:#fff;
      padding:12px 14px;
      box-shadow: 0 10px 24px rgba(2,6,23,.06);
    }
    .fa-progress-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .fa-progress-top .t{ font-size:11px; color: var(--muted); font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
    .fa-progress-top .p{ font-size:12px; font-weight:950; color: var(--g-900); }
    .fa-progress-bar{ height:8px; border-radius:999px; background: rgba(2,6,23,.08); overflow:hidden; margin-top:10px; }
    .fa-progress-bar > span{ display:block; height:100%; background: rgba(37,211,102,.95); width:0%; }
    .fa-progress-dates{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; font-size:11px; color: var(--muted); font-weight:800; }
    .fa-kpi-row{
      display:grid;
      grid-template-columns: repeat(4, minmax(210px, 1fr));
      gap:12px;
      margin-top:14px;
    }
    .fa-kpi-card{
      background:#fff;
      border:1px solid rgba(2,6,23,.08);
      border-radius:14px;
      padding:14px;
      box-shadow: 0 10px 24px rgba(2,6,23,.05);
      position:relative;
      min-height:86px;
    }
    .fa-kpi-card .k{ font-size:11px; color: var(--muted); font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
    .fa-kpi-card .v{ font-size:26px; font-weight:950; color: var(--g-900); margin-top:6px; }
    .fa-kpi-card .s{ font-size:12px; color: var(--muted); margin-top:2px; font-weight:800; }
    .fa-kpi-mini{ display:flex; gap:10px; margin-top:8px; font-size:11px; color: var(--muted); font-weight:800; }
    .fa-kpi-mini b{ color: var(--g-900); }
    .fa-detail-grid{
      display:grid;
      grid-template-columns: 1fr;
      gap:12px;
      margin-top:16px;
    }
    .fa-detail-card{
      border:1px solid rgba(2,6,23,.08);
      border-radius:14px;
      background:#fff;
      padding:14px;
    }
    .fa-detail-title{
      display:flex; align-items:center; gap:10px;
      font-weight:950; color: var(--g-900);
      margin-bottom:10px;
    }
    .fa-detail-title .dot{
      width:18px; height:18px; border-radius:999px;
      display:inline-flex; align-items:center; justify-content:center;
      background: rgba(37,211,102,.18);
      border:1px solid rgba(37,211,102,.30);
      color: rgba(15,118,110,1);
      font-size:12px;
      line-height:1;
    }
    @media (max-width: 980px){
      .fa-kpi-row{ grid-template-columns: repeat(2, minmax(210px, 1fr)); }
    }
    @media (max-width: 560px){
      .fa-kpi-row{ grid-template-columns: 1fr; }
      .fa-title-lg{ font-size:22px; }
    }

    .pill-row{display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end;}
    .pill{
      display:inline-flex; align-items:center; gap:6px;
      padding:8px 10px;
      border-radius:999px;
      border:1px solid rgba(2,6,23,.10);
      background: rgba(2,6,23,.02);
      font-weight:800;
      font-size:12px;
      color: var(--g-900);
    }
    @media (max-width: 720px){
      .pill-row{justify-content:flex-start;}
    }



    /* ============================================================
       OVERRIDE r14/r15: sin scroll horizontal, ajustado a la hoja
       ============================================================ */
    #reportCard[data-report="r14"] .table-container,
    #reportCard[data-report="r15"] .table-container{
      overflow-x:hidden !important;
    }

    #reportCard[data-report="r14"] #dataTable,
    #reportCard[data-report="r15"] #dataTable{
      width:100% !important;
      max-width:100% !important;
      min-width:0 !important;
      margin:0 auto !important;
      table-layout:fixed !important;
    }

    #reportCard[data-report="r14"] th,
    #reportCard[data-report="r14"] td,
    #reportCard[data-report="r15"] th,
    #reportCard[data-report="r15"] td{
      white-space:normal !important;
      overflow-wrap:anywhere !important;
      word-break:break-word !important;
    }

    /* r14 (Instructor Responsable): anchos en % para encajar sin scroll */
    #reportCard[data-report="r14"] th:nth-child(1),
    #reportCard[data-report="r14"] td:nth-child(1){ width:3% !important; }
    #reportCard[data-report="r14"] th:nth-child(2),
    #reportCard[data-report="r14"] td:nth-child(2){ width:22% !important; }
    #reportCard[data-report="r14"] th:nth-child(3),
    #reportCard[data-report="r14"] td:nth-child(3){ width:8% !important; }
    #reportCard[data-report="r14"] th:nth-child(4),
    #reportCard[data-report="r14"] td:nth-child(4){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(5),
    #reportCard[data-report="r14"] td:nth-child(5){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(6),
    #reportCard[data-report="r14"] td:nth-child(6){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(7),
    #reportCard[data-report="r14"] td:nth-child(7){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(8),
    #reportCard[data-report="r14"] td:nth-child(8){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(9),
    #reportCard[data-report="r14"] td:nth-child(9){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(10),
    #reportCard[data-report="r14"] td:nth-child(10){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(11),
    #reportCard[data-report="r14"] td:nth-child(11){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(12),
    #reportCard[data-report="r14"] td:nth-child(12){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(13),
    #reportCard[data-report="r14"] td:nth-child(13){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(14),
    #reportCard[data-report="r14"] td:nth-child(14){ width:5.55% !important; }
    #reportCard[data-report="r14"] th:nth-child(15),
    #reportCard[data-report="r14"] td:nth-child(15){ width:5.55% !important; }


    /* r15 (Programa): anchos en % para encajar sin scroll */
    #reportCard[data-report="r15"] th:nth-child(1),
    #reportCard[data-report="r15"] td:nth-child(1){ width:3% !important; }
    #reportCard[data-report="r15"] th:nth-child(2),
    #reportCard[data-report="r15"] td:nth-child(2){ width:24% !important; }
    #reportCard[data-report="r15"] th:nth-child(3),
    #reportCard[data-report="r15"] td:nth-child(3){ width:8% !important; }
    #reportCard[data-report="r15"] th:nth-child(4),
    #reportCard[data-report="r15"] td:nth-child(4){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(5),
    #reportCard[data-report="r15"] td:nth-child(5){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(6),
    #reportCard[data-report="r15"] td:nth-child(6){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(7),
    #reportCard[data-report="r15"] td:nth-child(7){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(8),
    #reportCard[data-report="r15"] td:nth-child(8){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(9),
    #reportCard[data-report="r15"] td:nth-child(9){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(10),
    #reportCard[data-report="r15"] td:nth-child(10){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(11),
    #reportCard[data-report="r15"] td:nth-child(11){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(12),
    #reportCard[data-report="r15"] td:nth-child(12){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(13),
    #reportCard[data-report="r15"] td:nth-child(13){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(14),
    #reportCard[data-report="r15"] td:nth-child(14){ width:5.4% !important; }
    #reportCard[data-report="r15"] th:nth-child(15),
    #reportCard[data-report="r15"] td:nth-child(15){ width:5.4% !important; }


/* =========================
   DF-03 Dropzone (Ficha Acumulativa)
   ========================= */
.card.df03-card{
      border:2px dashed var(--border);
      border-radius:12px;
      padding:30px;
      transition:all .3s;
      background: #fafafa;
      box-shadow:none;
      position:relative;
    }
    .card.df03-card .df03-head{ text-align:left; }
.df03-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}
.df03-title{ display:flex; align-items:flex-start; gap:10px; }
.df03-title-ico{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(2,6,23,.03);
  border:1px solid rgba(2,6,23,.08);
  color: var(--g-800);
  flex:0 0 40px;
}
.df03-h{ font-weight:900; color:var(--g-900); font-size:14px; }
.df03-sub{ color:var(--muted); font-size:12px; margin-top:4px; max-width:62ch; }
.df03-meta{ justify-content:flex-end; margin-top:2px; }

.df03-dropzone{
  margin-top:12px;
  border:2px dashed rgba(2,6,23,.14);
  border-radius:14px;
  padding:34px 18px;
  text-align:center;
  background:#fff;
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  user-select:none;
}
.df03-dropzone:hover{
  border-color: rgba(34,197,94,.55);
  background: rgba(34,197,94,.05);
}
.df03-dropzone.dragover{
  border-color: rgba(34,197,94,.85);
  background: rgba(34,197,94,.08);
  box-shadow: inset 0 0 0 2px rgba(34,197,94,.18);
}
.df03-dropzone:focus{
  outline: 2px solid rgba(34,197,94,.35);
  outline-offset: 2px;
}
.df03-dropzone .dz-icon{
  width:56px;
  height:56px;
  margin: 0 auto 10px auto;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(2,6,23,.03);
  border:1px solid rgba(2,6,23,.08);
  color: var(--g-800);
}
.df03-dropzone .dz-h{
  font-size:14px;
  font-weight:900;
  color: var(--g-900);
  margin:0;
}
.df03-dropzone .dz-p{
  font-size:12px;
  color: var(--muted);
  margin-top:6px;
}
.df03-dropzone .dz-p a{
  color: var(--g-800);
  font-weight:900;
  text-decoration: underline;
}

.df03-filechips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.df03-filechip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(2,6,23,.10);
  background: rgba(2,6,23,.02);
  font-weight:800;
  font-size:12px;
  color: var(--g-900);
  max-width:100%;
}
.df03-filechip .name{
  overflow:hidden;
  text-overflow: ellipsis;
  white-space:nowrap;
  max-width:52ch;
}

.df03-consulta{ margin-top:16px; }
.df03-consulta-title{ font-weight:900; color:var(--g-900); font-size:13px; }
.df03-consulta-box{ position:relative; margin-top:8px; }
.df03-consulta-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.df03-consulta-row input{
  flex:1 1 220px;
  font-size:15px;
  padding:10px;
  border-radius:10px;
  border:2px solid var(--g-soft);
}
.df03-consulta-row input:disabled{
  background: rgba(2,6,23,.03);
  border-color: rgba(2,6,23,.10);
  color: rgba(15,23,42,.65);
}
.df03-consulta-row .btn{ height:44px; }
.df03-consulta-row.disabled{ opacity:.75; }

.df03-consulta-lock{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.lock-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(2,6,23,.10);
  background:#fff;
  box-shadow: 0 10px 25px rgba(2,6,23,.12);
  font-weight:900;
  color:#0f172a;
  font-size:12px;
}
.df03-consulta-hint{ font-size:12px; color: var(--muted); margin-top:6px; }

@media (max-width: 720px){
  .df03-meta{ justify-content:flex-start; }
}

/* =========================
   DASHBOARD (NOVEDADES)
   ========================= */
#dashboardArea{ margin-top: 10px; }
.dash-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.dash-title{ font-weight:900; color:var(--g-900); font-size:18px; letter-spacing:.2px; }
.dash-subtitle{ color:var(--muted); font-size:12px; margin-top:4px; max-width: 920px; line-height:1.35; }
.dash-actions{ display:flex; gap:8px; align-items:center; }
.dash-grid{ display:grid; grid-template-columns: 340px 1fr; gap:14px; }
@media (max-width: 1100px){
  .dash-grid{ grid-template-columns: 1fr; }
}
.dash-left{ display:flex; flex-direction:column; gap:12px; }
.dash-main{ display:flex; flex-direction:column; gap:12px; min-width: 0; }

.dash-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.dash-card-title{ font-weight:800; color:var(--g-900); font-size:13px; margin-bottom:10px; }
.dash-note{ margin-top:8px; font-size:12px; color:var(--muted); }

.dash-search{
  display:flex; align-items:center; gap:8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.dash-search input{
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  background: transparent;
}

.dash-pills{ display:flex; flex-wrap:wrap; gap:6px; }
.dash-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  color: #111;
  cursor: pointer;
  user-select:none;
}
.dash-pill .x{ font-weight:900; color: var(--muted); }
.dash-pill:hover{ border-color: #cfd8e3; }

.dash-quick{ display:flex; flex-direction:column; gap:8px; }
.dash-check{ display:flex; align-items:center; gap:10px; font-size: 12.5px; color:#111; }
.dash-check input{ width: 16px; height: 16px; }

.dash-slicers{ display:flex; flex-direction:column; gap:10px; }
.slicer{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.slicer-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.slicer-title{ font-weight:900; font-size: 12px; color: var(--g-900); text-transform:uppercase; letter-spacing:.4px; }
.slicer-tools{ display:flex; gap:6px; align-items:center; }
.slicer-tools button{
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
}
.slicer-tools button:hover{ border-color:#cfd8e3; }
.slicer-search{
  margin-top: 8px;
  display:flex; align-items:center; gap:8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}
.slicer-search input{ border:none; outline:none; width:100%; font-size:12.5px; }
.slicer-options{ margin-top: 8px; max-height: 220px; overflow:auto; padding-right: 4px; }
/* Compactar slicers específicos */
#dashboardArea .fblk.f-tipo .slicer-options,
#dashboardArea .fblk.f-etapa .slicer-options{ max-height: 120px; }
#slicer_municipio .slicer-options{ max-height: 160px; }

.slicer-opt{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 6px 4px; border-radius: 10px; }
.slicer-opt:hover{ background: #f6f8fb; }
.slicer-opt.disabled{ opacity:.45; }
.slicer-opt label{ display:flex; align-items:center; gap:10px; font-size:12.5px; color:#111; cursor:pointer; min-width:0; }
.slicer-opt input{ width: 16px; height: 16px; }
.slicer-opt .count{ font-size:12px; color: var(--muted); white-space:nowrap; }

.dash-kpis{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px){
  .dash-kpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.kpi .kpi-val{ font-size: 20px; font-weight: 900; color: var(--g-900); line-height: 1.05; }
.kpi .kpi-lab{ font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi .kpi-sub{ font-size: 12px; color: #111; margin-top: 8px; }

.dash-charts{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px){
  .dash-charts{ grid-template-columns: 1fr; }
}
/* Layout: mapa a la izquierda, tres gráficos apilados a la derecha */
.dash-charts-top{ display:grid; grid-template-columns: 50% 50%; gap: 12px; align-items:stretch; }
.dash-chart-card.dash-chart-map{ min-height: 740px; }

.dash-chart-stack{ display:flex; flex-direction:column; gap: 12px; min-width:0; }
@media (max-width: 1100px){
  .dash-charts-top{ grid-template-columns: 50% 50%; }
}
.dash-charts-below{ margin-top: 12px; }
.dash-chart-wrap.h820{ height: 920px; }
.dash-chart-wrap.is-map{ display:flex; flex-direction:column; height:100%; }
.dash-chart-wrap.is-map .dash-map-toolbar{ flex:0 0 auto; }
.dash-chart-wrap.is-map .dash-leafletmap{ flex:1 1 auto; height:auto; }

.dash-map-hover-tip{
  position:absolute;
  z-index: 9999;
  pointer-events:none;
  background:#0f172a;
  color:#fff;
  padding:6px 10px;
  border-radius:10px;
  font-size:12px;
  line-height:1.2;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  white-space:nowrap;
  transform: translate3d(0,0,0);
}


.dash-chart-card{
  border: 1px solid var(--border);
  border-radius: 16px;
  background:#fff;
  padding: 12px;
  min-width:0;
}
.dash-chart-card.full{ grid-column: 1 / -1; }

.dash-chart-split{
  display:flex;
  gap:12px;
  align-items:stretch;
}
.dash-chart-split > .dash-chart-wrap{
  flex:1 1 0;
  position:relative;
}
.dash-mini-title{
  font-size:12px;
  color:#555;
  margin: 0 0 4px 2px;
}
.dash-chart-pane{
  padding-top:16px;
}
.dash-chart-pane .dash-mini-title{
  position:absolute;
  top:0;
  left:2px;
  margin:0;
}
.dash-chart-title{ font-weight: 800; font-size: 13px; color: var(--g-900); margin-bottom: 8px; }
.dash-chart-wrap{ width:100%; }
.dash-chart-wrap.h260{ height:260px; }
.dash-chart-wrap.h320{ height:320px; }
.dash-chart-wrap canvas{ width:100% !important; height:100% !important; }

/* Tile-map (tipo mapa) para Municipios */
.dash-map-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 8px;
}
.dash-map-legend{
  font-size:12px;
  color: var(--muted);
  line-height:1.2;
}
.dash-map-metric{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#111;
}
.dash-map-metric label{ color: var(--muted); font-weight:700; }
.dash-map-metric select{
  border:1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size:12px;
  background:#fff;
}
.dash-tilemap{
  height: calc(100% - 34px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  overflow:auto;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  background: #fff;
}
.dash-tile{
  border: 1px solid rgba(2,6,23,.10);
  border-radius: 14px;
  padding: 10px;
  min-height: 70px;
  cursor:pointer;
  user-select:none;
  position:relative;
  overflow:hidden;
}
.dash-tile:hover{ border-color: rgba(2,6,23,.18); }
.dash-tile.selected{
  outline: 3px solid rgba(34,197,94,.35);
  border-color: rgba(34,197,94,.55);
}
.dash-tile .t-name{
  font-weight: 900;
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.dash-tile .t-val{
  font-weight: 900;
  font-size: 16px;
  color: var(--g-900);
}
.dash-tile .t-sub{
  font-size: 12px;
  color: rgba(15,23,42,.70);
  margin-top: 2px;
}
.dash-tile .t-bar{
  position:absolute;
  left:0; right:0; bottom:0;
  height: 6px;
  background: rgba(34,197,94,.22);
}

.dash-tables{ display:grid; grid-template-columns: 1fr; gap: 12px; }
.dash-table-wrap{ width:100%; overflow:auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.dash-table{ width:100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.dash-table thead th{
  position: sticky; top: 0;
  background: #f7fafc;
  color: var(--g-900);
  font-weight: 900;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dash-table tbody td{
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  white-space: nowrap;
}
.dash-table tbody tr:hover{ background: #f6f8fb; cursor: pointer; }
.dash-table .num{ text-align: right; }
.dash-table-topscroll{ width:100%; overflow-x:auto; overflow-y:hidden; height:14px; border: 1px solid var(--border); border-radius: 14px; background:#fff; }
.dash-table-topscroll-inner{ height:1px; }
.dash-pager{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; flex-wrap:wrap; color:var(--muted); font-size:12px; }
.dash-pager .pages{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.dash-pager button{ border:1px solid var(--border); background:#fff; color:var(--text); padding:6px 10px; border-radius:12px; cursor:pointer; font-size:12px; line-height:1; }
.dash-pager button:hover{ border-color: rgba(22,163,74,.35); }
.dash-pager button.active{ background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.55); font-weight:700; }
.dash-pager button:disabled{ opacity:.55; cursor:not-allowed; }
.dash-pager .meta{ white-space:nowrap; }
.dash-pager .ellipsis{ padding:0 6px; }
/* Dashboard: Overlay selección inicial de años */
.dash-year-overlay{ position:fixed; inset:0; background:rgba(15,23,42,.55); display:flex; align-items:center; justify-content:center; z-index:9999; }
.dash-year-overlay.hidden{ display:none; }
.dash-year-modal{ width:min(620px, calc(100vw - 28px)); background:#fff; border:1px solid rgba(15,23,42,.10); border-radius:18px; padding:18px; box-shadow: 0 20px 60px rgba(2,6,23,.28); }
.dash-year-modal-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.dash-year-modal-title{ font-weight:900; color:var(--text); font-size:16px; letter-spacing:.2px; }
.dash-year-modal-sub{ color:var(--muted); font-size:12px; margin-top:4px; }
.dash-year-actions{ display:flex; align-items:center; gap:8px; margin:12px 0 10px; flex-wrap:wrap; }
.dash-year-selected{ color:var(--muted); font-size:12px; white-space:nowrap; }
.dash-year-list{ border:1px solid var(--border); border-radius:14px; padding:10px 12px; max-height:280px; overflow:auto; }
.dash-year-list .year-opt{ display:flex; align-items:center; gap:10px; padding:8px 8px; border-radius:10px; cursor:pointer; }
.dash-year-list .year-opt:hover{ background: rgba(2,6,23,.03); }
.dash-year-footer{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; flex-wrap:wrap; }
.dash-year-note{ color:var(--muted); font-size:12px; }



/* === Ajustes solicitados (tablas auto-fit + scroll + columnas avanzadas + mapa real) === */
.dash-table-wrap{ overflow-x:auto; }
/* FIX: permitir que el contenedor en CSS Grid se encoja y el scroll horizontal funcione */
.main{ min-width:0; } /* evita que el grid expanda la columna principal por contenido ancho */
.dash-card{ min-width:0; } /* evita que las cards se expandan por tablas anchas */
.dash-table-wrap{ min-width:0; max-width:100%; overflow-x:auto !important; }
.dash-table-wrap::-webkit-scrollbar{ height:10px; }
.dash-table-wrap::-webkit-scrollbar-thumb{ background:rgba(100,116,139,.35); border-radius:999px; }

.dash-table{ width:max-content; min-width:100%; table-layout:auto; }
.dash-table th, .dash-table td{ white-space:nowrap; }
.dash-table td{ max-width: 340px; overflow:hidden; text-overflow:ellipsis; }
.dash-table th.sticky, .dash-table td.sticky{ position:sticky; left:0; background:#fff; z-index:2; }

/* Crit table (Top 25 por atraso): scroll horizontal (muchas columnas) */
#dashTblCrit{
  table-layout:auto !important;
  width:max-content !important;
  min-width:2600px; /* fuerza overflow horizontal para navegar columnas */

  display:inline-table !important;}
#dashTblCrit th, #dashTblCrit td{ white-space:nowrap; }
#dashTblCrit th.num, #dashTblCrit td.num{ min-width:90px; }
#dashTblCrit th:not(.num), #dashTblCrit td:not(.num){ min-width:160px; }
#dashTblCrit th:first-child, #dashTblCrit td:first-child{ min-width:110px; }

#dashTblMunicipio{
  table-layout:auto !important;
  width:max-content !important;
  min-width:2400px;
  display:inline-table !important;
}
#dashTblMunicipio th, #dashTblMunicipio td{ white-space:nowrap; }
#dashTblMunicipio th.num, #dashTblMunicipio td.num{ min-width:90px; }
#dashTblMunicipio th:first-child, #dashTblMunicipio td:first-child{ min-width:180px; }


/* Doble scroll horizontal (arriba + abajo) para Fichas Detalle */
#dashTblCritTopScroll{
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  height:14px; /* muestra scrollbar superior */
}
#dashTblCritTopInner{ height:1px; }

/* Crit table: ordenar por encabezado (A-Z / Z-A) */
#dashTblCrit thead th.crit-sortable{
  cursor:pointer;
  user-select:none;
}
#dashTblCrit thead th.crit-sortable.sorted{
  background: rgba(17,24,39,0.04);
}
#dashTblCrit thead th.crit-sortable[data-sort-dir="asc"]::after{
  content:" ▲";
  font-size:0.78em;
  opacity:0.75;
}
#dashTblCrit thead th.crit-sortable[data-sort-dir="desc"]::after{
  content:" ▼";
  font-size:0.78em;
  opacity:0.75;
}

#dashTblMunicipio thead th.muni-sortable{
  cursor:pointer;
  user-select:none;
}
#dashTblMunicipio thead th.muni-sortable.sorted{
  background: rgba(17,24,39,0.04);
}
#dashTblMunicipio thead th.muni-sortable[data-sort-dir="asc"]::after{
  content:" ▲";
  font-size:0.78em;
  opacity:0.75;
}
#dashTblMunicipio thead th.muni-sortable[data-sort-dir="desc"]::after{
  content:" ▼";
  font-size:0.78em;
  opacity:0.75;
}

.dash-table th.sticky{ z-index:3; }
.dash-table.hide-adv th.adv, .dash-table.hide-adv td.adv{ display:none; }
.dash-card-title-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.btn.btn-sm{ padding:6px 10px; font-size:12px; border-radius:10px; }
.dash-leafletmap{ height: 320px; width:100%; border:1px solid var(--border); border-radius: 12px; overflow:hidden; }
.leaflet-container{ font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:#fff; }


#dashboardArea .dash-grid{ grid-template-columns: 1fr !important; }
.dash-grid{ grid-template-columns: 1fr !important; }


/* Iconos en tarjetas de slicers */
#dashboardArea .slicer-head-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
#dashboardArea .slicer-ico{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(2,6,23,0.08);
}
#dashboardArea .slicer-ico svg{ width:16px; height:16px; }
#dashboardArea .sico-responsable{ background: rgba(59,130,246,0.14); color:#2563eb; }
#dashboardArea .sico-programa{ background: rgba(168,85,247,0.14); color:#7c3aed; }
#dashboardArea .sico-municipio{ background: rgba(239,68,68,0.14); color:#dc2626; }
#dashboardArea .sico-estadoCurso{ background: rgba(16,185,129,0.14); color:#059669; }
#dashboardArea .sico-nivel{ background: rgba(245,158,11,0.16); color:#b45309; }
#dashboardArea .sico-estado{ background: rgba(14,165,233,0.16); color:#0284c7; }
#dashboardArea .sico-modalidad{ background: rgba(20,184,166,0.16); color:#0f766e; }
#dashboardArea .sico-programaEspecial{ background: rgba(236,72,153,0.14); color:#db2777; }
#dashboardArea .sico-tipo{ background: rgba(100,116,139,0.18); color:#475569; }

/* Micro-afinaciones de slicers (sin cambiar funcionalidad) */
#dashboardArea .slicer{
  border-radius: 18px;
  padding: 12px;
}
#dashboardArea .slicer-head{ align-items:flex-start; }
#dashboardArea .slicer-title{ margin-top: 1px; }


.dash-year-dd{ height: 42px; }
.dash-year-dd summary{ height: 42px; display:flex; align-items:center; }

/* Acciones Todo | Nada como enlaces */
.slicer-tools{ gap:0; }
.slicer-tools button{
  border:none;
  background:transparent;
  padding:0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--muted);
}
.slicer-tools button:hover{ color: var(--g-900); }
.slicer-tools button + button{ margin-left: 8px; padding-left: 8px; position:relative; }
.slicer-tools button + button:before{
  content: "|";
  position:absolute;
  left:0;
  top:0;
  color:#cbd5e1;
}

/* Alturas consistentes de tarjetas */
.slicer{ min-height: 250px; }
.slicer-options{ max-height: 170px; overflow:auto; }
#slicer_municipio .slicer-options{ max-height: 190px; }
#slicer_programaEspecial .slicer-options{ max-height: 190px; }
#slicer_responsable .slicer-options{ max-height: 170px; }
#slicer_programa .slicer-options{ max-height: 170px; }
#slicer_estadoCurso .slicer-options{ max-height: 190px; }

.dash-slicers-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
}
@media (max-width: 1100px){
  .dash-slicers-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .dash-slicers-grid{ grid-template-columns: 1fr; }
}


/* Municipio: menor altura + scroll vertical */
#slicer_municipio .slicer-options{ max-height: 140px !important; overflow-y:auto; }
#slicer_municipio .slicer-search{ margin-top: 6px; padding: 6px 8px; }
#slicer_municipio .slicer-selected{ margin-top: 6px; }



/* Ajuste: reducir altura de ETAPA FICHA, TIPO y MODALIDAD */
#slicer_estado, #slicer_tipo, #slicer_modalidad{ min-height: 150px !important; }
#slicer_estado .slicer-options,
#slicer_tipo .slicer-options,
#slicer_modalidad .slicer-options{ max-height: 120px !important; overflow:auto; }


.dash-empty{ text-align:center; padding:14px; opacity:0.75; }

    /* Map details table (Ajuste: detalle por municipio) */
    .dash-chart-wrap.is-map{
      display:flex;
      flex-direction:column;
      gap:10px;
      align-items:stretch;
    }
    .dash-chart-wrap.is-map .dash-map-toolbar{
      flex:0 0 auto;
    }
    .dash-chart-wrap.is-map #dashMapMunicipios{
      flex:1 1 auto;
      min-height: 460px;
      width:100%;
    }
    .dash-map-detail{
      flex:0 0 auto;
      width:100%;
    }
    .dash-map-detail-title{
      font-weight:700;
      font-size:12px;
      color:#0f172a;
      margin:0 0 6px 0;
    }
    .dash-map-detail-scroll{
      max-height: 160px;
      overflow:auto;
      border:1px solid rgba(15,23,42,.15);
      border-radius:12px;
      background:#fff;
      padding-bottom:6px;
    }
    table.dash-mini-table{
      width:100%;
      border-collapse:separate;
      border-spacing:0;
      font-size:12px;
    }
    table.dash-mini-table thead th{
      position:sticky;
      top:0;
      background:#f8fafc;
      z-index:1;
      text-align:left;
      padding:8px 10px;
      border-bottom:1px solid rgba(15,23,42,.12);
      white-space:nowrap;
    }
    table.dash-mini-table tbody td{
      padding:7px 10px;
      border-bottom:1px solid rgba(15,23,42,.08);
      vertical-align:top;
    }
    table.dash-mini-table tbody tr:hover{
      background:#f1f5f9;
      cursor:pointer;
    }
    table.dash-mini-table td.num, table.dash-mini-table th.num{
      text-align:right;
      font-variant-numeric: tabular-nums;
    }

.nav-links button.is-disabled{ opacity:.45; cursor:not-allowed; }
.nav-links button:disabled{ opacity:.45; cursor:not-allowed; }


/* =========================
   Dashboard - Tabla Aprendices DF-03
   ========================= */
.dash-apr-wrap{ overflow:auto; border:1px solid var(--border); border-radius:14px; background:#fff; }
.dash-apr-table{ width:100%; border-collapse:collapse; min-width: 1250px; }
.dash-apr-table th, .dash-apr-table td{ padding:10px 10px; border-bottom:1px solid rgba(2,6,23,.06); font-size:12.5px; }
.dash-apr-table th{ background:#f8fafc; position:sticky; top:0; z-index:1; text-align:left; font-weight:900; }
.dash-apr-table td.num, .dash-apr-table th.num{ text-align:right; font-variant-numeric: tabular-nums; }
.dash-apr-table tr:hover{ background:#f6f8fb; }
.dash-apr-phone{ display:inline-flex; align-items:center; gap:8px; }
.dash-apr-wa{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:10px; border:1px solid rgba(37,211,102,.35); background: rgba(37,211,102,.12); text-decoration:none; }
.dash-apr-wa svg{ width:16px; height:16px; }

    /* SAT (r18) — anchos de columnas y legibilidad */
    #reportCard[data-report="r18"] th,
    #reportCard[data-report="r18"] td{
      padding:10px 12px;
      font-size:11px;
      line-height:1.2;
      vertical-align:top;
    }
    #reportCard[data-report="r18"] th{ white-space:normal; word-break:break-word; }
    #reportCard[data-report="r18"] td{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

    /* Permitir saltos de línea en columnas descriptivas */
    #reportCard[data-report="r18"] td:nth-child(13),
    #reportCard[data-report="r18"] td:nth-child(14),
    #reportCard[data-report="r18"] td:nth-child(15){
      white-space:normal;
      overflow:visible;
      text-overflow:clip;
    }

    /* Anchos de columnas — r18 (incluye # como primera columna) */
    #reportCard[data-report="r18"] th:nth-child(1),
    #reportCard[data-report="r18"] td:nth-child(1){ width:48px; }  /* # */
    #reportCard[data-report="r18"] th:nth-child(2),
    #reportCard[data-report="r18"] td:nth-child(2){ width:160px; } /* Severidad */
    #reportCard[data-report="r18"] th:nth-child(3),
    #reportCard[data-report="r18"] td:nth-child(3){ width:70px; }  /* Score */
    #reportCard[data-report="r18"] th:nth-child(4),
    #reportCard[data-report="r18"] td:nth-child(4){ width:90px; }  /* Ficha */
    #reportCard[data-report="r18"] th:nth-child(5),
    #reportCard[data-report="r18"] td:nth-child(5){ width:260px; } /* Programa */
    #reportCard[data-report="r18"] th:nth-child(6),
    #reportCard[data-report="r18"] td:nth-child(6){ width:240px; } /* Instructor Responsable */

    /* Columnas numéricas / compactas */
    #reportCard[data-report="r18"] th:nth-child(7),
    #reportCard[data-report="r18"] td:nth-child(7){ width:78px; }  /* Días a fin */
    #reportCard[data-report="r18"] th:nth-child(8),
    #reportCard[data-report="r18"] td:nth-child(8){ width:78px; }  /* % Con juicio */
    #reportCard[data-report="r18"] th:nth-child(9),
    #reportCard[data-report="r18"] td:nth-child(9){ width:78px; }  /* En Tránsito */
    #reportCard[data-report="r18"] th:nth-child(10),
    #reportCard[data-report="r18"] td:nth-child(10){ width:78px; } /* Sin Ruta */
    #reportCard[data-report="r18"] th:nth-child(11),
    #reportCard[data-report="r18"] td:nth-child(11){ width:90px; } /* Sin Programar */
    #reportCard[data-report="r18"] th:nth-child(12),
    #reportCard[data-report="r18"] td:nth-child(12){ width:90px; } /* Retención % */

    #reportCard[data-report="r18"] th:nth-child(13),
    #reportCard[data-report="r18"] td:nth-child(13){ width:220px; } /* Alertas */
    #reportCard[data-report="r18"] th:nth-child(14),
    #reportCard[data-report="r18"] td:nth-child(14){ width:240px; } /* Causa probable */
    #reportCard[data-report="r18"] th:nth-child(15),
    #reportCard[data-report="r18"] td:nth-child(15){ width:360px; } /* Acción recomendada */
    #reportCard[data-report="r18"] th:nth-child(16),
    #reportCard[data-report="r18"] td:nth-child(16){ width:170px; } /* Responsable SAT */
    #reportCard[data-report="r18"] th:nth-child(17),
    #reportCard[data-report="r18"] td:nth-child(17){ width:130px; } /* SLA sugerido */

    /* Notas SAT */
    .sat-notes{
      max-width: 1200px;
      margin: 10px auto 12px;
      padding: 12px 14px;
      background: #f6fbf8;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 1px 2px rgba(0,0,0,.04);
    }
    .sat-notes .title{
      font-weight: 800;
      letter-spacing: .2px;
      margin-bottom: 8px;
      display:flex;
      align-items:center;
      gap:8px;
    }
    .sat-notes .grid{
      display:grid;
      grid-template-columns: 1fr 1.2fr;
      gap: 10px 14px;
    }
    @media (max-width: 900px){
      .sat-notes .grid{ grid-template-columns: 1fr; }
    }
    .sat-notes .box{
      background: #ffffff;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
    }
    .sat-notes .box h4{
      margin:0 0 6px 0;
      font-size: 12px;
      font-weight: 800;
    }
    .sat-notes ul{
      margin:0;
      padding-left: 16px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .sat-notes .sat-sub{
      margin-top: 6px;
      padding-left: 18px;
    }
    .sat-notes .sat-sub li{
      font-size: 11.5px;
      line-height: 1.3;
    }

/* =========================
   Reportes (PDF) selector
   ========================= */
.reports-panel{ display:none; }
.reports-panel .rp-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.reports-panel .rp-title{ font-size:18px; font-weight:800; margin:0; }
.reports-panel .rp-sub{ color:var(--muted); margin-top:4px; font-size:13px; }
.reports-panel .rp-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.reports-panel .rp-actions .btn{ padding:8px 12px; border-radius:10px; }
.reports-panel .rp-footer{ display:flex; justify-content:flex-end; margin-top:14px; }
.reports-panel .rp-footer .btn{ padding:10px 14px; border-radius:12px; }
.reports-panel .rp-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media(max-width: 980px){ .reports-panel .rp-grid{ grid-template-columns:1fr; } }
.reports-panel .rp-item{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.reports-panel .rp-check{ padding-top:2px; }
.reports-panel .rp-check input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color: var(--g-700);
  transform: scale(1);
}
.reports-panel .rp-meta{ flex:1; min-width:0; }
.reports-panel .rp-name{ font-weight:800; font-size:13px; line-height:1.2; }
.reports-panel .rp-desc{ color:var(--muted); font-size:12px; margin-top:4px; line-height:1.25; }
.reports-panel .rp-pill{ display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); margin-top:6px; }
.reports-panel .rp-pill .dot{ width:8px; height:8px; border-radius:99px; background:var(--g-600); opacity:.9; }

body.reports-mode #satNotes,
body.reports-mode .table-container,
body.reports-mode #mainTablePager{
  display:none !important;
}

body.reports-mode .table-tools,
body.reports-mode #tableTools,
body.reports-mode #faAprTools{
  display:none !important;
}


/* ===== Top Empresas split (tabla + gráfica) ===== */
.emp-split{ display:flex; gap:14px; align-items:stretch; margin-top:10px; }
.emp-half{ flex:1 1 0; min-width:280px; display:flex; flex-direction:column; }

.emp-split .emp-half.emp-left{ flex:0 0 40%; max-width:40%; }
.emp-split .emp-half.emp-right{ flex:0 0 60%; max-width:60%; }
@media (max-width: 980px){
  .emp-split .emp-half.emp-left, .emp-split .emp-half.emp-right{ flex:1 1 0; max-width:none; }
}
.emp-chart-title{ font-weight:800; font-size:12px; color:#0f172a; margin:0 0 8px 0; }
.emp-chart-wrap{ background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:14px; padding:10px; flex:1; display:flex; align-items:center; justify-content:center; }
.emp-chart-wrap canvas{ width:100% !important; height:260px !important; }
.emp-chart-note{ margin-top:8px; font-size:12px; opacity:.75; }
.dash-table tr.is-selected td{ background: rgba(34,197,94,.12); }
@media (max-width: 980px){
  .emp-split{ flex-direction:column; }
  .emp-chart-wrap canvas{ height:240px !important; }
}
/* --- Controles de rango de fechas (r14/r15) --- */
.date-range{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
.date-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:150px;
}
.date-field label{
  font-size:11px;
  color:var(--muted);
  line-height:1;
}
.date-field input{
  height:40px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:10px;
  padding:0 10px;
  font-size:13px;
  color:var(--text);
  background:#fff;
}
.sync-msg{
  margin-top:10px;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  border:1px solid rgba(59,130,246,.25);
  background:rgba(59,130,246,.08);
  color:#0f172a;
}
@media (max-width: 900px){
  .tools-top{ flex-direction:column; align-items:stretch; }
  .date-range{ width:100%; flex-wrap:wrap; }
  .date-field{ flex:1; min-width:170px; }
}

/* =====================================================================
   GAE v4.1 - ajustes solicitados (17-09-2026)
   ===================================================================== */
.app-footer{display:none!important}
#step1.gae-home-collapsed > :not(#gaeLauncher){display:none!important}
.gae-hidden-before-analysis{display:none!important}
.gae-launcher{margin:0;background:linear-gradient(135deg,#f5fbf5 0%,#f8fbfd 100%);border:1px solid #d7eadb;border-radius:20px;padding:20px;box-shadow:0 12px 30px rgba(22,52,29,.06)}
.gae-launcher-head h2{margin:0;color:#13371e;font-size:25px;letter-spacing:-.02em}
.gae-launcher-head p{margin:6px 0 0;color:#607069;font-size:13px}
.gae-launcher-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.gae-launch-card{appearance:none;border:1px solid #dce8df;background:#fff;border-radius:17px;padding:16px;text-align:left;display:flex;flex-direction:column;gap:8px;min-height:142px;cursor:pointer;box-shadow:0 10px 22px rgba(16,46,24,.045);transition:.16s ease}
.gae-launch-card:hover{transform:translateY(-2px);border-color:#a9cfb4;box-shadow:0 14px 28px rgba(16,46,24,.08)}
.gae-launch-card.primary{border-color:#39A900;background:linear-gradient(180deg,#fff,#f4fbf2)}
.gae-launch-icon{width:38px;height:38px;border-radius:12px;background:#eef8ec;color:#1f7c34;display:grid;place-items:center;font-size:22px;font-weight:800}
.gae-launch-card b{font-size:16px;color:#163923}.gae-launch-card small{font-size:12px;line-height:1.45;color:#627168;font-weight:500}

/* Modal de mejoras */
.gae-enh-backdrop{position:fixed;inset:0;z-index:100000;background:rgba(2,16,8,.58);display:flex;align-items:center;justify-content:center;padding:20px}
.gae-enh-modal{width:min(1180px,96vw);max-height:92vh;background:#fff;border-radius:20px;box-shadow:0 30px 80px rgba(0,0,0,.28);overflow:hidden;display:flex;flex-direction:column}
.gae-enh-modal.small{width:min(760px,94vw)}
.gae-enh-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 20px;border-bottom:1px solid #e1e9e4;background:#f8fbf8}
.gae-enh-title{font-size:20px;font-weight:900;color:#153920}.gae-enh-sub{font-size:12px;color:#61706a;margin-top:3px}
.gae-enh-close{border:0;background:#eef3ef;color:#405048;border-radius:10px;width:34px;height:34px;font-size:22px;cursor:pointer}
.gae-enh-body{padding:18px 20px 22px;overflow:auto}
.gae-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gae-form-grid .full{grid-column:1/-1}
.gae-form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#31483b;font-weight:800}
.gae-form-grid input,.gae-form-grid textarea,.gae-form-grid select{border:1px solid #d7e1db;border-radius:11px;padding:9px 10px;font:inherit;color:#173224;background:#fff}.gae-form-grid textarea{min-height:78px;resize:vertical}
.gae-note-block{margin-top:12px;padding:11px 12px;border-radius:12px;background:#f7faf8;border:1px solid #e0e8e2;color:#617068;font-size:11px;line-height:1.5}
.gae-open-summary{display:grid;gap:8px;font-size:12px;color:#33473b}

/* Mapa territorial siempre visible */
.gae-map-zone{margin:14px 0}.gae-map-zone .dash-chart-map{min-height:0!important;margin:0}
.gae-map-zone .dash-chart-wrap.h820{height:auto!important}.gae-map-zone .dash-chart-wrap.is-map{min-height:540px;height:auto!important}
.gae-territorial{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr);gap:16px;min-height:540px}
.gae-col-map,.gae-muni-ranking{border:1px solid #e0e9e2;border-radius:16px;background:#fbfdfb;padding:14px;min-width:0}
.gae-col-map svg{width:100%;height:455px;display:block}.gae-map-title{font-size:13px;font-weight:900;color:#174127;margin-bottom:8px}.gae-map-caption{font-size:11px;color:#65726b;line-height:1.45}
.gae-map-bubble{cursor:default}.gae-muni-ranking{overflow:auto;max-height:540px}.gae-muni-row{width:100%;display:grid;grid-template-columns:1fr auto;gap:12px;border:0;border-bottom:1px solid #e5ebe6;background:transparent;padding:10px 7px;text-align:left;cursor:pointer;color:#34453b}.gae-muni-row:hover{background:#eef7ef}.gae-muni-row b{color:#0f6e2b}
.gae-map-empty{padding:16px;color:#69766f;font-size:12px;text-align:center}

/* Redistribución de gráficas */
#dashboardArea .dash-charts-top{display:block!important;width:100%;min-width:0}
#dashboardArea .dash-charts-top>.dash-chart-stack,
.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0;width:100%;min-width:0}
#dashboardArea .dash-chart-stack>.dash-chart-card,
.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid>.dash-chart-card{margin:0;min-width:0;min-height:310px;width:100%}
#dashboardArea .dash-chart-stack .dash-chart-split,
.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid .dash-chart-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
#dashboardArea .dash-chart-stack .dash-chart-wrap.h260,
.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid .dash-chart-wrap.h260{height:245px}
#dashboardArea .dash-chart-stack .dash-chart-pane,
.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid .dash-chart-pane{padding-top:0}
@media(max-width:1100px){#dashboardArea .dash-charts-top>.dash-chart-stack,.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid{grid-template-columns:1fr}}
@media(max-width:720px){#dashboardArea .dash-chart-stack .dash-chart-split,.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid .dash-chart-split{grid-template-columns:1fr}}
/* Elimina la gráfica circular del dashboard que podía aparecer como círculo negro */
#dashChartEmpresaPie{display:none!important}.emp-chart-wrap{display:none!important}
.gae-company-bars{display:grid;gap:8px}.gae-company-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(120px,1.4fr) auto;gap:8px;align-items:center;border:0;background:transparent;padding:6px 0;cursor:pointer;text-align:left;font-size:11px}.gae-company-row:hover{background:#f4f9f5}.gae-company-row .n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gae-company-row .bar{height:8px;background:#e6eee8;border-radius:999px;overflow:hidden}.gae-company-row .bar span{display:block;height:100%;background:#39A900;border-radius:inherit}.gae-company-row b{color:#0d6827}

/* Centro de tareas */
.gae-task-center{margin:14px 0;border:1px solid #dce8de;border-radius:18px;padding:16px;background:#fff;box-shadow:0 10px 25px rgba(18,46,25,.045)}
.gae-task-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.gae-task-head h2{margin:0;font-size:20px;color:#153a20}.gae-task-head p{margin:3px 0 0;font-size:12px;color:#66736c}
.gae-task-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:14px}.gae-task-grid>button{border:1px solid #e1e8e3;background:#f9fcf9;border-radius:14px;padding:12px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:5px;min-height:82px}.gae-task-grid>button:hover{border-color:#aed1b7;background:#f3faf4}.gae-task-grid b{font-size:24px;color:#116d2a;line-height:1}.gae-task-grid span{font-size:11px;color:#647169;font-weight:700;line-height:1.3}

/* Comparación / Histórico */
.gae-compare-warning{padding:12px 14px;border-radius:13px;background:#fff7df;border:1px solid #edd48a;color:#755700;font-size:12px;line-height:1.5;margin-bottom:12px}.gae-compare-ok{padding:10px 12px;border-radius:12px;background:#eefaf1;border:1px solid #c6e8ce;color:#205f30;font-size:12px;margin-bottom:12px}
.gae-management-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.gae-management-card{border-radius:14px;padding:13px;border:1px solid #e0e7e2;display:flex;flex-direction:column;gap:4px}.gae-management-card b{font-size:25px}.gae-management-card span{font-size:11px;font-weight:800}.gae-management-card.good{background:#effaf2;color:#17652d}.gae-management-card.bad{background:#fff0f0;color:#ad2525}.gae-management-card.solved{background:#eef7ff;color:#245d87}.gae-management-card.neutral{background:#f6f4fa;color:#67537a}
.gae-compare-kpis{display:grid;grid-template-columns:repeat(8,minmax(100px,1fr));gap:8px;margin:12px 0}.gae-compare-kpi{border:1px solid #e0e7e2;border-radius:12px;padding:10px;background:#fff}.gae-compare-kpi span{display:block;font-size:10px;color:#69766f;font-weight:800}.gae-compare-kpi b{display:block;font-size:18px;color:#183b24;margin:3px 0}.gae-compare-kpi small{font-size:9.5px;color:#6e7972}.gae-compare-chart,.gae-history-chart{height:300px;border:1px solid #e0e7e2;border-radius:14px;padding:10px;margin:12px 0}.gae-compare-chart canvas,.gae-history-chart canvas{width:100%!important;height:100%!important}
.gae-recent-list{display:grid;gap:8px;margin-top:14px}.gae-recent-row{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid #e0e7e2;border-radius:12px;background:#fff}.gae-recent-row b,.gae-recent-row small{display:block}.gae-recent-row small{font-size:10px;color:#6a766f;margin-top:2px}.gae-recent-row>span{font-size:10px;color:#4c6f56;text-transform:capitalize}
.gae-history-columns{display:grid;grid-template-columns:1.4fr .6fr;gap:14px;margin-top:12px}.gae-history-columns h3,.gae-history-ranking h3{font-size:14px;color:#174126;margin:0 0 8px}.gae-persist-row{width:100%;border:1px solid #e2e9e3;background:#fff;border-radius:11px;padding:9px 10px;display:flex;justify-content:space-between;gap:10px;cursor:pointer;text-align:left;margin-bottom:7px}.gae-persist-row:hover{background:#f3f9f4}.gae-persist-row b{font-size:11px;color:#203a28}.gae-persist-row span{font-size:10px;color:#77634c}.gae-history-ranking{margin-top:14px}

/* Ficha 360 */
.gae-f360-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.gae-f360-grid.two{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}.gae-section{border:1px solid #e0e8e2;border-radius:15px;background:#fff;padding:13px}.gae-section h3{margin:0 0 9px;font-size:14px;color:#174225}.gae-kv{display:grid;grid-template-columns:105px 1fr;gap:6px 9px;margin:0}.gae-kv dt{font-size:10px;color:#69766f;font-weight:800}.gae-kv dd{margin:0;font-size:11px;color:#263b2d;font-weight:700;overflow-wrap:anywhere}.gae-score-v{display:flex;align-items:baseline;gap:8px}.gae-score-v b{font-size:38px;color:#125f25}.gae-score-v span{font-size:11px;color:#69766f}.gae-history-signals{display:grid;gap:6px;margin-top:8px;font-size:11px;color:#5d4e39}.gae-history-signals div{background:#fff8e6;border:1px solid #f1dda9;border-radius:9px;padding:7px}.gae-evolution{margin-top:12px}.gae-source-tags{display:flex;flex-wrap:wrap;gap:6px}.gae-source-tags span{padding:4px 8px;border-radius:999px;background:#eff8f0;color:#1e6630;font-size:10px;font-weight:800}.gae-plan{margin-top:12px}.gae-plan-head{display:flex;justify-content:space-between;align-items:center}.gae-follow-status{font-size:10px;font-weight:800;padding:5px 9px;border-radius:999px;background:#eef5ef;color:#3b6146}.gae-auto-resolved{margin-top:10px;padding:9px 10px;border:1px solid #bfe3c5;background:#effaf1;color:#226634;border-radius:10px;font-size:11px}
.gae-follow-list{display:grid;gap:8px}.gae-follow-list button{border:1px solid #e0e7e2;background:#fff;border-radius:12px;padding:10px;text-align:left;display:grid;gap:3px;cursor:pointer}.gae-follow-list button:hover{background:#f4faf5}.gae-follow-list b{font-size:11px;color:#1e3e27}.gae-follow-list span,.gae-follow-list small{font-size:10px;color:#68756e}

/* Semáforo de competencias: el color identifica toda la tarjeta */
.fa-list .fa-item.traffic-red,.fa-list .fa-item:has(.fa-dot.red){background:#fff0f0!important;border:1px solid #f2b6b6!important;box-shadow:inset 4px 0 0 #D32F2F}.fa-list .fa-item.traffic-amber,.fa-list .fa-item:has(.fa-dot.amb){background:#fff8e6!important;border:1px solid #efd99d!important;box-shadow:inset 4px 0 0 #F9A825}.fa-list .fa-item.traffic-green,.fa-list .fa-item:has(.fa-dot.green){background:#effaf1!important;border:1px solid #bfe3c5!important;box-shadow:inset 4px 0 0 #2E7D32}.fa-dot.red{background:#D32F2F!important}.fa-dot.amb{background:#F9A825!important}.fa-dot.green{background:#2E7D32!important}

@media(max-width:1250px){.gae-launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gae-task-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gae-compare-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:980px){.gae-territorial,.gae-history-columns,.gae-f360-grid,.gae-f360-grid.two{grid-template-columns:1fr}.gae-dashboard-v41 .dash-chart-stack.gae-chart-grid{grid-template-columns:1fr}.gae-management-grid{grid-template-columns:repeat(2,1fr)}.gae-task-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.gae-launcher-grid,.gae-form-grid,.gae-management-grid,.gae-task-grid,.gae-compare-kpis{grid-template-columns:1fr}.gae-enh-backdrop{padding:8px}.gae-enh-body{padding:14px}.gae-col-map svg{height:360px}}

/* =====================================================================
   GAE v4.2 - mapa municipal real + corrección definitiva círculo negro
   ===================================================================== */
/* La participación por empresa se muestra como barras; el canvas circular
   queda anulado incluso si el motor de gráficas intenta redibujarlo. */
#dashChartEmpresaPie,
.emp-half.emp-right canvas,
.emp-chart-wrap canvas{display:none!important;visibility:hidden!important;width:0!important;height:0!important;max-width:0!important;max-height:0!important}
.emp-half.emp-right .emp-chart-wrap{display:none!important}
canvas{max-width:100%}

.gae-map-zone #dashMapMunicipios,
.gae-map-zone .dash-leafletmap{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
.gae-map-zone .dash-map-detail{display:none!important}
.gae-real-map{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,.55fr);gap:14px;align-items:stretch}
.gae-real-map-main,.gae-real-map-side{border:1px solid #dce6df;border-radius:16px;background:#fbfdfb;min-width:0}
.gae-real-map-main{padding:14px;display:flex;flex-direction:column}
.gae-real-map-side{padding:14px;max-height:660px;display:flex;flex-direction:column}
.gae-real-map-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:8px}
.gae-map-title{font-size:13px;font-weight:900;color:#134526;line-height:1.25}
.gae-map-sub{font-size:11px;color:#66736c;margin-top:3px;line-height:1.4}
.gae-map-metric-select{font-size:10px;font-weight:800;color:#5f6f66;display:flex;align-items:center;gap:7px;white-space:nowrap}
.gae-map-metric-select select{width:auto;min-width:128px;margin:0;padding:6px 8px;border:1px solid #d3dfd7;border-radius:9px;background:#fff;color:#24402d;font-size:11px}
.gae-real-map-svg{width:100%;height:auto;max-height:570px;min-height:420px;display:block;background:#fff;border:1px solid #e2e9e4;border-radius:13px}
.gae-map-muni{cursor:pointer;outline:none}
.gae-map-muni path{transition:filter .12s ease,stroke-width .12s ease;pointer-events:all}
.gae-map-muni:hover path,.gae-map-muni:focus path{filter:brightness(.92);stroke:#00304D;stroke-width:2.1}
.gae-map-label{font:700 8.5px Arial,sans-serif;fill:#183827;paint-order:stroke;stroke:rgba(255,255,255,.92);stroke-width:2.5px;stroke-linejoin:round;pointer-events:none;text-anchor:middle;dominant-baseline:central}
.gae-map-scale{display:flex;align-items:center;gap:7px;margin-top:8px;font-size:10px;color:#65726b}
.gae-map-scale i{display:block;width:165px;height:9px;border-radius:99px;background:linear-gradient(90deg,#ceebc3,#39A900,#007832);border:1px solid #cbd9ce}
.gae-map-scale b{margin-left:auto;color:#31513b;font-size:10px}
.gae-map-source{margin-top:7px;font-size:9.5px;color:#6d7972;line-height:1.35}
.gae-map-quality{border:1px solid #efd79c;background:#fff8e5;color:#795b13;border-radius:11px;padding:9px 10px;margin:8px 0 10px;display:grid;gap:2px}
.gae-map-quality b{font-size:11px}.gae-map-quality span{font-size:9.5px;line-height:1.35}
.gae-real-map-side .gae-muni-ranking{border:0;border-radius:0;background:transparent;padding:0;margin-top:6px;overflow:auto;max-height:none;flex:1}
.gae-real-map-side .gae-muni-row{padding:9px 7px;font-size:11px}
.gae-map-loading{min-height:440px;display:grid;place-items:center;align-content:center;gap:8px;border:1px solid #e0e8e2;border-radius:15px;background:#fbfdfb;color:#46604f}
.gae-map-loading span{width:32px;height:32px;border-radius:50%;border:3px solid #dce8df;border-top-color:#39A900;animation:gaeMapSpin .8s linear infinite}
.gae-map-loading b{font-size:13px}.gae-map-loading small{font-size:10px;color:#718078}
@keyframes gaeMapSpin{to{transform:rotate(360deg)}}
.gae-map-error{border:1px solid #e3e9e5;border-radius:15px;background:#fbfdfb;padding:15px;display:grid;gap:13px}
.gae-map-error>div:first-child{display:grid;gap:4px;color:#43574a}.gae-map-error b{font-size:12px}.gae-map-error span{font-size:10px;line-height:1.4}
.gae-map-fallback-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px}.gae-map-fallback-list button{display:flex;justify-content:space-between;gap:8px;border:1px solid #e1e9e3;border-radius:9px;background:#fff;padding:8px;font-size:10px;cursor:pointer}.gae-map-fallback-list button:hover{background:#f1f8f2}
@media(max-width:1050px){.gae-real-map{grid-template-columns:1fr}.gae-real-map-side{max-height:360px}.gae-real-map-svg{min-height:360px}}
@media(max-width:620px){.gae-real-map-head{flex-direction:column}.gae-map-metric-select{width:100%;justify-content:space-between}.gae-real-map-svg{min-height:300px}.gae-map-label{display:none}}


/* Corta cualquier canvas que pudiera desbordarse visualmente */
.dash-chart-card canvas,.report-section canvas,.emp-half canvas{display:block;max-width:100%;max-height:100%}
canvas[data-gae-hidden='1']{display:none!important;visibility:hidden!important;width:0!important;height:0!important}

/* La portada PDF se define desde JS; estos ajustes refuerzan el logo centrado */
.pdf-cover-right svg{display:block;margin:0 auto}




.gae-upload-sources{display:grid;gap:14px;margin:14px 0 8px}
.gae-upload-group{border:1px solid #dce6df;border-radius:16px;background:#fbfdfb;padding:14px}
.gae-upload-group.optional{background:#fbfcfd;border-color:#dfe6ea}
.gae-upload-group-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.gae-upload-group-head h3{margin:0;color:#134526;font-size:15px}
.gae-upload-group-head p{margin:3px 0 0;font-size:11px;color:#66736c;line-height:1.4}
.gae-upload-group-head>span{font-size:10px;font-weight:800;color:#567060;background:#edf6ef;border-radius:999px;padding:5px 9px;white-space:nowrap}
.gae-upload-source-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.gae-upload-group.optional .gae-upload-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.gae-upload-source-card{border:1px solid #e0e8e3;border-radius:12px;background:#fff;padding:11px;min-width:0}
.gae-upload-source-card.has-file{border-color:#b7d9be;background:#fbfefb}
.gae-upload-source-card.done{border-color:#8fc49a;background:#f5fbf6}
.gae-upload-source-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.gae-upload-source-top>div{min-width:0}.gae-upload-source-top b{display:block;font-size:12px;color:#153e24}.gae-upload-source-top span{display:block;font-size:9.5px;color:#6a7770;line-height:1.35;margin-top:2px}
.gae-upload-source-top em{font-style:normal;font-size:9px;font-weight:800;color:#66736c;white-space:nowrap}
.gae-upload-source-card.done .gae-upload-source-top em{color:#14712c}
.gae-upload-progress{height:8px;background:#e9efeb;border-radius:999px;overflow:hidden;margin:10px 0 7px}
.gae-upload-progress i{display:block;height:100%;min-width:0;background:linear-gradient(90deg,#39A900,#007832);border-radius:inherit;transition:width .2s ease}
.gae-upload-source-foot{display:flex;justify-content:space-between;gap:8px;font-size:9.5px;color:#6b7770}
.gae-source-summary-compact{margin:10px 0!important;padding:0!important;border:0!important;background:transparent!important;display:block!important}
.gae-source-status-line{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 11px;border:1px solid #dfe7e2;border-radius:11px;background:#f8fbf9;font-size:10px;color:#607068}
#requiredChecklist{display:none!important}


/* Orden visual explícito dentro del dashboard */
#dashboardArea .dash-main{display:flex;flex-direction:column}

#gaeMapZone{order:2}

#dashboardArea .dash-main>.gae-chart-grid{order:4}
#dashboardArea .dash-main>.dash-tables{order:5}

@media(max-width:1250px){.gae-upload-source-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.gae-upload-source-grid,.gae-upload-group.optional .gae-upload-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.gae-source-status-line{align-items:flex-start;flex-direction:column}}


#dashboardArea>#gaeMapZone{
  margin:0 0 16px!important;
  width:100%;
}

/* Dos columnas principales. Estado curso y Programa Especial ocupan todo. */


/* Tarjetas parejas y compactas. */




/* Todos los botones tienen exactamente la misma altura y radio moderado. */


/* Distribución exacta solicitada. */
 /* 3 + 3 */
       /* Etapa: 1 fila de 2 */
         /* Tipo: filas de 2 */
    /* Modalidad: 1 fila de 3 */
        /* Nivel: 3 + 1 */
 /* Programa especial: 2 por fila */

/* El canvas circular de empresas no existe visualmente bajo ninguna circunstancia. */
#dashChartEmpresaPie,
canvas#dashChartEmpresaPie,
.emp-half.emp-right canvas#dashChartEmpresaPie{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  width:0!important;
  height:0!important;
  max-width:0!important;
  max-height:0!important;
  position:absolute!important;
  pointer-events:none!important;
}


/* Orden y tamaño sin huecos: Estado curso / Etapa+Tipo / Modalidad / Nivel / Programa especial */


/* Progreso visible al generar el PDF directo */
.rp-footer{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.gae-pdf-progress{flex:1 1 360px;min-width:260px;border:1px solid #dce6df;border-radius:12px;background:#f8fbf9;padding:10px 12px}
.gae-pdf-progress[hidden]{display:none!important}
.gae-pdf-progress-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:#52645a;margin-bottom:7px}
.gae-pdf-progress-top b{color:#12652a;font-size:12px}
.gae-pdf-progress progress{width:100%;height:10px;display:block}

/* Carga inicial: la barra general permanece visible mientras se leen los archivos al equipo */
#progressContainer.gae-loading-initial label{color:#174126;font-weight:800}


/* Fila 1 */

/* Fila 2: Etapa + Modalidad + Tipo */



/* Fila 3: Nivel + Programa especial */


/* Evita que tarjetas con pocos botones se estiren verticalmente */


/* Los últimos elementos impares aprovechan toda la última fila */


/* Carga local / archivos seleccionados: amarillo */
.gae-upload-source-card.loaded .gae-upload-progress i,
.gae-upload-source-card.has-file:not(.processing):not(.processed):not(.done) .gae-upload-progress i{
  background:linear-gradient(90deg,#FDC300,#e3a900)!important;
}
.gae-upload-source-card.loaded .gae-upload-source-top em,
.gae-upload-source-card.has-file:not(.processing):not(.processed):not(.done) .gae-upload-source-top em{color:#8b6800!important}
/* Procesamiento/consolidación: verde */
.gae-upload-source-card.processing .gae-upload-progress i,
.gae-upload-source-card.processed .gae-upload-progress i,
.gae-upload-source-card.done .gae-upload-progress i{
  background:linear-gradient(90deg,#65c83d,#39A900,#007832)!important;
}
.gae-upload-source-card.processing .gae-upload-source-top em,
.gae-upload-source-card.processed .gae-upload-source-top em,
.gae-upload-source-card.done .gae-upload-source-top em{color:#14712c!important}

#progressContainer.gae-loading-initial label{color:#8b6800!important}
#progressContainer.gae-loading-initial progress::-webkit-progress-value{background:#FDC300!important}
#progressContainer.gae-loading-initial progress::-moz-progress-bar{background:#FDC300!important}
#progressContainer.gae-processing label,#progressContainer.gae-processed label{color:#126a2a!important;font-weight:800}
#progressContainer.gae-processing progress::-webkit-progress-value,
#progressContainer.gae-processed progress::-webkit-progress-value{background:#39A900!important}
#progressContainer.gae-processing progress::-moz-progress-bar,
#progressContainer.gae-processed progress::-moz-progress-bar{background:#39A900!important}

/* Una unidad visual equivale aproximadamente al botón LECTIVA de la versión anterior.
   Cada tarjeta ocupa tantas unidades como columnas internas de botones utiliza. */


/* Todos los botones mantienen exactamente el mismo tamaño visual. */




/* Los últimos botones impares NO se estiran: conservan el ancho de LECTIVA. */



/* Composición vertical balanceada. Evita que una tarjeta alta cree grandes
   huecos debajo de otra tarjeta más baja en la misma fila. */


/* El dashboard usa todo el ancho cuando entra en modo completo. */
body.gae-dashboard-full{
  overflow-x:hidden!important;
}
body.gae-dashboard-full .app{
  grid-template-columns:1fr!important;
  width:100%!important;
  max-width:100%!important;
}
body.gae-dashboard-full .sidebar{
  display:none!important;
}
body.gae-dashboard-full .main{
  width:100%!important;
  max-width:100%!important;
  padding-left:10px!important;
  padding-right:10px!important;
  overflow-x:hidden!important;
}


/* Se elimina cualquier ancho mínimo heredado que pueda forzar scroll. */


/* Composición:
   Programa especial = 100%
   Nivel = 100%
   Abajo: Estado curso 50% | (Etapa+Tipo / Modalidad) 50%
*/


/* Tarjetas compactas. */


/* Distribución interna: diseñada para evitar cualquier scroll. */


/* Tamaño visual similar a LECTIVA, manteniendo las barritas. */


/* Los valores cero ocupan espacio, pero la barra queda vacía y discreta. */



/* En resoluciones medianas se reduce una columna, sin crear scroll. */



/* ---------------- Pantalla inicial de carga · GAE 4.15.9 ----------------
   Ajuste responsivo para 100% y 80% de zoom:
   - evita que el estado comprima PE-04 / DF-14A / etc.
   - más ancho útil para las fuentes
   - conserva panel ejecutivo y cero scroll
   --------------------------------------------------------------------- */
body.gae-entry-mode .app{
  display:block;
  width:100vw;
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
  background:linear-gradient(135deg,#f1f7f2 0%,#fbfdfb 46%,#eef6f0 100%);
}
body.gae-entry-mode .sidebar,
body.gae-entry-mode #gaeTopbar,
body.gae-entry-mode .app-footer{display:none!important}
body.gae-entry-mode .main{
  width:100vw;
  height:100dvh;
  min-height:100dvh;
  max-width:none;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
}
body.gae-entry-mode #step1{
  display:grid!important;
  grid-template-columns:minmax(280px,.255fr) minmax(0,.745fr);
  grid-template-rows:minmax(0,1fr) auto;
  grid-template-areas:"brand sources" "brand actions";
  column-gap:14px;
  row-gap:12px;
  width:min(1720px,calc(100vw - 16px));
  max-width:1720px;
  height:calc(100dvh - 16px);
  max-height:calc(100dvh - 16px);
  min-height:0;
  margin:0 auto;
  padding:12px;
  overflow:hidden;
  border:1px solid #d8e4dc;
  border-radius:22px;
  background:#fff;
  box-shadow:0 24px 64px rgba(0,48,77,.10);
}
body.gae-entry-mode #step2{display:none!important}
body.gae-entry-mode #step1>h2,
body.gae-entry-mode #step1>p,
body.gae-entry-mode #driveFolderWrap,
body.gae-entry-mode #step1 .gae-privacy-bar,
body.gae-entry-mode #gaeSplash{display:none!important}

/* Marca institucional izquierda. */
body.gae-entry-mode .gae-entry-brand{
  grid-area:brand;
  min-width:0;
  min-height:0;
  margin:0;
  padding:clamp(22px,3.2vh,38px) clamp(20px,2vw,34px);
  border:1px solid #d9e9dd;
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 12%,rgba(57,169,0,.12),transparent 31%),
    linear-gradient(160deg,#f7fcf6 0%,#eef8f0 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#173a24;
  overflow:hidden;
}
body.gae-entry-mode .gae-entry-kicker{
  margin:0 0 13px;
  padding:6px 11px;
  border:1px solid #b9d9c0;
  border-radius:999px;
  background:#fff;
  color:#007832;
  font-size:11.5px;
  line-height:1;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
}
body.gae-entry-mode .gae-entry-logo{
  width:clamp(118px,14.5vh,160px);
  height:clamp(118px,14.5vh,160px);
  margin:0 auto 15px;
  color:#39A900;
  flex:0 0 auto;
}
body.gae-entry-mode .gae-entry-logo svg{display:block;width:100%;height:100%;fill:currentColor;color:inherit}
body.gae-entry-mode .gae-entry-brand h1{
  margin:0;
  max-width:430px;
  color:#00304D;
  font-size:clamp(30px,2.45vw,43px);
  line-height:1.03;
  letter-spacing:-.03em;
  font-weight:880;
}
body.gae-entry-mode .gae-entry-brand p{
  margin:9px 0 0;
  color:#007832;
  font-size:clamp(16.5px,1.2vw,21px);
  line-height:1.16;
  font-weight:850;
}
body.gae-entry-mode .gae-entry-brand>span{
  display:block;
  max-width:390px;
  margin-top:8px;
  color:#607067;
  font-size:13px;
  line-height:1.35;
}
body.gae-entry-mode .gae-entry-pills{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:7px;
  margin-top:20px;
}
body.gae-entry-mode .gae-entry-pills b{
  padding:7px 10px;
  border-radius:9px;
  background:#fff;
  border:1px solid #d5e4d9;
  color:#345244;
  font-size:11px;
  line-height:1;
  font-weight:800;
}

/* Fuentes: más espacio real y lectura estable al 100% de zoom. */
body.gae-entry-mode .gae-upload-sources{
  grid-area:sources;
  align-self:center;
  min-width:0;
  max-height:100%;
  display:grid;
  gap:10px;
  margin:0;
}
body.gae-entry-mode .gae-upload-group{
  min-width:0;
  padding:13px 14px 14px;
  border:1px solid #dce7df;
  border-radius:15px;
  background:#fbfdfb;
  box-shadow:0 4px 14px rgba(0,48,77,.025);
}
body.gae-entry-mode .gae-upload-group.optional{background:#fbfcfd}
body.gae-entry-mode .gae-upload-group-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}
body.gae-entry-mode .gae-upload-group-head h3{
  margin:0;
  color:#174d28;
  font-size:18px;
  line-height:1.12;
  font-weight:850;
}
body.gae-entry-mode .gae-upload-group-head p{
  margin:4px 0 0;
  color:#627269;
  font-size:13px;
  line-height:1.34;
}
body.gae-entry-mode .gae-upload-group-head>span{
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  background:#edf6ef;
  color:#567060;
  font-size:11.3px;
  line-height:1.2;
  font-weight:800;
}
body.gae-entry-mode .gae-upload-source-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
body.gae-entry-mode .gae-upload-group.optional .gae-upload-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.gae-entry-mode .gae-upload-source-card{
  min-width:0;
  min-height:104px;
  padding:11px 12px;
  border-radius:11px;
}
body.gae-entry-mode .gae-upload-source-top{
  position:relative;
  display:block;
  min-width:0;
}
body.gae-entry-mode .gae-upload-source-top>div{
  display:block;
  min-width:0;
}
body.gae-entry-mode .gae-upload-source-top b{
  display:block;
  padding-right:118px;
  color:#154b2b;
  font-size:14.6px;
  line-height:1.12;
  white-space:nowrap;
  overflow:visible;
}
body.gae-entry-mode .gae-upload-source-top span{
  display:block;
  margin-top:5px;
  padding-right:0;
  font-size:11.8px;
  line-height:1.3;
  overflow-wrap:break-word;
}
body.gae-entry-mode .gae-upload-source-top em{
  position:absolute;
  top:0;
  right:0;
  width:auto;
  max-width:112px;
  font-size:9.8px;
  line-height:1.18;
  text-align:right;
  white-space:normal;
}
body.gae-entry-mode .gae-upload-progress{height:9px;margin:9px 0 7px}
body.gae-entry-mode .gae-upload-source-foot{gap:8px;font-size:10.8px;line-height:1.18}

/* Acciones. */
body.gae-entry-mode .upload-area{
  grid-area:actions;
  align-self:end;
  width:100%;
  min-width:0;
  min-height:0;
  margin:0;
  padding:11px 13px 12px;
  border:1.5px dashed #7abf68!important;
  border-radius:15px;
  background:linear-gradient(180deg,#f8fcf7,#f3faf2)!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  overflow:hidden;
}
body.gae-entry-mode .upload-area>.btn.btn-primary{
  min-height:44px;
  padding:9px 27px;
  border-radius:10px;
  font-size:14.5px;
  line-height:1.08;
  font-weight:850;
  box-shadow:0 6px 16px rgba(57,169,0,.16);
}
body.gae-entry-mode #fileCount{display:none!important}
body.gae-entry-mode #requiredChecklist{display:none!important}
body.gae-entry-mode #selectedFilesList{width:100%;margin:2px 0 0!important;flex:0 0 auto}
body.gae-entry-mode #selectedFilesList .gae-filechips{display:none!important}
body.gae-entry-mode #selectedFilesList .gae-queue-head{min-height:29px;padding:5px 8px;font-size:11.5px;line-height:1.22}
body.gae-entry-mode #selectedFilesList .gae-queue-clear{padding:4px 8px;font-size:10.8px}
body.gae-entry-mode #gaeSourceSummary{width:100%;margin:2px 0 0!important;flex:0 0 auto}
body.gae-entry-mode .gae-source-status-line{min-height:32px;padding:7px 10px;font-size:11.5px;line-height:1.26}
body.gae-entry-mode #progressContainer{width:100%;margin-top:2px;flex:0 0 auto}
body.gae-entry-mode #progressContainer label{font-size:11.8px;font-weight:800}
body.gae-entry-mode #progressContainer progress{height:10px}
body.gae-entry-mode #progressContainer #progressText{font-size:11.2px}
body.gae-entry-mode #progressContainer #gaeCancelProcess{margin-top:3px;padding:4px 10px;font-size:10.4px}
body.gae-entry-mode #btnParse{
  min-width:226px;
  min-height:44px;
  margin-top:2px!important;
  padding:9px 23px!important;
  border-radius:10px;
  font-size:14.5px;
  line-height:1.08;
  font-weight:850;
  box-shadow:0 6px 16px rgba(0,120,50,.16);
}

/* Alturas cercanas a 700–760 px: compacta espacios sin romper el ancho de las tarjetas. */
@media (max-height:780px) and (min-width:1100px){
  body.gae-entry-mode #step1{
    grid-template-columns:minmax(270px,.245fr) minmax(0,.755fr);
    padding:9px;
    column-gap:12px;
    row-gap:8px;
    height:calc(100dvh - 10px);
    max-height:calc(100dvh - 10px);
  }
  body.gae-entry-mode .gae-entry-brand{padding:18px 18px}
  body.gae-entry-mode .gae-entry-kicker{margin-bottom:8px;font-size:10.2px;padding:5px 9px}
  body.gae-entry-mode .gae-entry-logo{width:104px;height:104px;margin-bottom:9px}
  body.gae-entry-mode .gae-entry-brand h1{font-size:31px}
  body.gae-entry-mode .gae-entry-brand p{font-size:15.5px;margin-top:6px}
  body.gae-entry-mode .gae-entry-brand>span{font-size:11.3px;margin-top:5px}
  body.gae-entry-mode .gae-entry-pills{margin-top:12px;gap:5px}
  body.gae-entry-mode .gae-entry-pills b{font-size:9.7px;padding:6px 8px}

  body.gae-entry-mode .gae-upload-sources{gap:7px}
  body.gae-entry-mode .gae-upload-group{padding:9px 10px 10px}
  body.gae-entry-mode .gae-upload-group-head{margin-bottom:6px}
  body.gae-entry-mode .gae-upload-group-head h3{font-size:15px}
  body.gae-entry-mode .gae-upload-group-head p{font-size:11px;margin-top:2px}
  body.gae-entry-mode .gae-upload-group-head>span{font-size:9.8px;padding:4px 8px}
  body.gae-entry-mode .gae-upload-source-grid{gap:7px}
  body.gae-entry-mode .gae-upload-source-card{min-height:82px;padding:8px 9px}
  body.gae-entry-mode .gae-upload-source-top b{font-size:12.8px;padding-right:108px}
  body.gae-entry-mode .gae-upload-source-top span{font-size:10.4px;line-height:1.2;margin-top:3px}
  body.gae-entry-mode .gae-upload-source-top em{max-width:102px;font-size:9px;line-height:1.15}
  body.gae-entry-mode .gae-upload-progress{height:7px;margin:6px 0 5px}
  body.gae-entry-mode .gae-upload-source-foot{font-size:9.8px}

  body.gae-entry-mode .upload-area{padding:8px 10px 9px;gap:4px}
  body.gae-entry-mode .upload-area>.btn.btn-primary,
  body.gae-entry-mode #btnParse{min-height:37px;font-size:12.8px;padding:7px 18px!important}
  body.gae-entry-mode #selectedFilesList .gae-queue-head{min-height:24px;font-size:10.3px;padding:2px 4px}
  body.gae-entry-mode .gae-source-status-line{min-height:27px;font-size:10.3px;padding:5px 8px}
  body.gae-entry-mode #progressContainer label{font-size:10.3px}
  body.gae-entry-mode #progressContainer progress{height:8px}
}

/* Anchos medianos: mantiene la lectura antes de pasar a una sola columna. */
@media (max-width:1250px) and (min-width:1100px){
  body.gae-entry-mode #step1{grid-template-columns:minmax(260px,.235fr) minmax(0,.765fr)}
  body.gae-entry-mode .gae-upload-source-top b{padding-right:102px}
  body.gae-entry-mode .gae-upload-source-top em{max-width:96px;font-size:9px}
}

/* En anchos menores cambia la composición; no comprime. */
@media (max-width:1099px){
  body.gae-entry-mode .main{padding:7px}
  body.gae-entry-mode #step1{
    grid-template-columns:1fr;
    grid-template-rows:auto minmax(0,1fr) auto;
    grid-template-areas:"brand" "sources" "actions";
    width:calc(100vw - 14px);
    height:calc(100dvh - 14px);
    max-height:calc(100dvh - 14px);
    padding:10px 12px;
    row-gap:8px;
  }
  body.gae-entry-mode .gae-entry-brand{
    padding:9px 12px;
    display:grid;
    grid-template-columns:auto 1fr;
    grid-template-rows:auto auto auto;
    column-gap:14px;
    text-align:left;
    justify-items:start
  }
  body.gae-entry-mode .gae-entry-kicker{display:none}
  body.gae-entry-mode .gae-entry-logo{grid-row:1/4;width:72px;height:72px;margin:0}
  body.gae-entry-mode .gae-entry-brand h1{font-size:25px;align-self:end}
  body.gae-entry-mode .gae-entry-brand p{font-size:13.5px;margin-top:2px}
  body.gae-entry-mode .gae-entry-brand>span{font-size:10.5px;margin-top:2px}
  body.gae-entry-mode .gae-entry-pills{display:none}
  body.gae-entry-mode .gae-upload-source-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.gae-entry-mode .gae-upload-group.optional .gae-upload-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.gae-entry-mode .gae-upload-source-card{min-height:78px}
  body.gae-entry-mode .gae-upload-source-top b{padding-right:104px}
}
@media (max-width:720px){
  body.gae-entry-mode .gae-upload-source-grid,
  body.gae-entry-mode .gae-upload-group.optional .gae-upload-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.gae-entry-mode .gae-entry-logo{width:58px;height:58px}
  body.gae-entry-mode .gae-entry-brand h1{font-size:21px}
  body.gae-entry-mode .gae-entry-brand p{font-size:12.5px}
  body.gae-entry-mode .gae-entry-brand>span{font-size:10px}
  body.gae-entry-mode .gae-upload-source-top b{padding-right:90px}
  body.gae-entry-mode .gae-upload-source-top em{max-width:86px}
}

/* =====================================================================
   Dashboard · Filtros en drawer lateral derecho · GAE 4.16.0
   ===================================================================== */
body.gae-filter-drawer-open{overflow:hidden!important}

.gae-filter-trigger{
  display:inline-flex!important;align-items:center;gap:7px!important;
  background:#fff!important;border:1px solid #b9d9c0!important;color:#17652d!important;
  font-weight:850!important;box-shadow:0 3px 10px rgba(0,80,35,.05)
}
.gae-filter-trigger:hover{background:#f2f9f3!important;border-color:#72bb7e!important}
.gae-filter-trigger.has-filters{background:#edf8ef!important;border-color:#39A900!important;color:#0d6d29!important}
.gae-filter-trigger-icon{display:inline-flex;align-items:center;justify-content:center}
.gae-filter-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#e7efe9;color:#31513b;font-size:10.5px;font-weight:900}
.gae-filter-trigger.has-filters .gae-filter-count{background:#39A900;color:#fff}

.gae-filter-summary{
  width:100%;min-width:0;box-sizing:border-box;margin:10px 0 12px;padding:9px 11px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:#fbfcfc;border:1px solid #e0e7e3;border-radius:12px
}
.gae-filter-summary.has-filters{background:#f5faf6;border-color:#c6dfcb}
.gae-filter-summary-main{min-width:0;display:flex;align-items:center;gap:10px;flex:1 1 auto}
.gae-filter-summary-title{display:flex;align-items:center;gap:6px;white-space:nowrap;color:#53635a;font-size:10.5px;font-weight:900;text-transform:uppercase;letter-spacing:.03em}
.gae-filter-summary-icon{display:inline-flex;color:#287f32}
.gae-filter-pills{display:flex!important;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;margin:0}
.gae-no-active-filters{color:#7b8780;font-size:11px;line-height:1.25}
.gae-filter-summary-open{flex:0 0 auto;border:0;border-radius:8px;background:#edf7ef;color:#126d29;padding:7px 10px;font-size:10.5px;font-weight:850;cursor:pointer}
.gae-filter-summary-open:hover{background:#dff1e2}
.gae-filter-summary .dash-pill{appearance:none;border:1px solid #cfe0d3;background:#fff;color:#294d33;border-radius:999px;padding:5px 8px;font:inherit;font-size:10.5px;font-weight:750;cursor:pointer}
.gae-filter-summary .dash-pill:hover{border-color:#83bc8e;background:#eef8f0}
.gae-filter-summary .dash-pill .x{margin-left:4px;color:#16702e;font-weight:950}

.gae-filter-backdrop{
  position:fixed;inset:0;z-index:118;background:rgba(8,25,15,.34);backdrop-filter:blur(1px);
  opacity:0;pointer-events:none;transition:opacity .2s ease
}
.gae-filter-backdrop.show{opacity:1;pointer-events:auto}

#dashSegCard.gae-filter-drawer{
  position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;
  z-index:119!important;width:min(570px,calc(100vw - 70px))!important;max-width:none!important;height:100dvh!important;
  min-width:0!important;margin:0!important;padding:0!important;box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;
  border:0!important;border-left:1px solid #d9e4dc!important;border-radius:18px 0 0 18px!important;
  background:#f6f9f7!important;box-shadow:-22px 0 55px rgba(15,23,42,.22)!important;
  overflow:hidden!important;transform:translateX(104%);visibility:hidden;
  transition:transform .22s ease,visibility 0s linear .22s
}
#dashSegCard.gae-filter-drawer.open{transform:translateX(0);visibility:visible;transition:transform .22s ease,visibility 0s}
#dashSegCard .gae-filter-drawer-head{
  flex:0 0 auto;position:relative;z-index:3;margin:0!important;padding:16px 17px 14px!important;
  background:#fff;border-bottom:1px solid #dfe7e2;box-shadow:0 4px 13px rgba(15,23,42,.035)
}
#dashSegCard .seg-title-row{display:flex;align-items:flex-start;gap:10px;min-width:0;padding-right:42px}
#dashSegCard .seg-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#eef8ef;color:#287f32}
#dashSegCard .seg-title-stack{min-width:0}
#dashSegCard .seg-title{color:#00304d;font-size:19px;line-height:1.15;font-weight:850;letter-spacing:-.01em}
#dashSegCard .seg-subtitle{margin-top:4px;color:#65727a;font-size:11.5px;line-height:1.35}
.gae-filter-drawer-close{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%;border:1px solid #dbe4df;background:#fff;color:#506159;font-size:23px;line-height:1;cursor:pointer}
.gae-filter-drawer-close:hover{background:#f0f6f1;color:#146b2c}

#dashSegCard .gae-filter-drawer-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:12px 13px 14px;overscroll-behavior:contain}
#dashSegCard .dash-slicers-all{display:grid;gap:11px;min-width:0}
#dashSegCard .gae-filter-section{min-width:0;padding:11px;border:1px solid #dfe7e2;border-radius:13px;background:#fff;box-shadow:0 3px 10px rgba(15,23,42,.025)}
#dashSegCard .gae-filter-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 9px;color:#174d28;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
#dashSegCard .gae-filter-section-title small{color:#829088;font-size:9.5px;font-weight:700;text-transform:none;letter-spacing:0;text-align:right}

#dashSegCard .seg-topbar{display:grid;grid-template-columns:1fr;gap:8px;min-width:0;overflow:visible!important}
#dashSegCard .seg-search{width:100%;min-width:0;max-width:none}
#dashSegCard .dash-date-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
#dashSegCard .dash-date-range .date-field{min-width:0}
#dashSegCard .dash-year-dd{width:100%;max-width:none;min-width:0}
#dashSegCard .dash-year-dd .year-panel{max-height:230px;overflow:auto}

#dashSegCard .dash-slicers-grid{display:grid;grid-template-columns:1fr;gap:9px;min-width:0}
#dashSegCard .slicer{min-height:0!important;padding:10px!important;border:1px solid #e1e7e3!important;border-radius:11px!important;background:#fbfcfc!important;box-shadow:none!important}
#dashSegCard .slicer-head{align-items:center!important}
#dashSegCard .slicer-title{font-size:11.5px!important;font-weight:850!important}
#dashSegCard .slicer-search{margin-top:7px!important}
#dashSegCard .slicer-options{max-height:150px!important;overflow:auto!important;margin-top:7px!important}
#dashSegCard .slicer-opt{padding:5px 3px!important}
#dashSegCard .slicer-opt label{font-size:11.5px!important}
#dashSegCard .slicer-opt .count{font-size:10.5px!important}

#dashSegCard .dash-fast-slicers{display:block;width:100%;min-width:0;margin:0}
#dashSegCard .gae-seg-layout{display:grid;grid-template-columns:1fr;gap:9px;width:100%;min-width:0}
#dashSegCard .gae-seg-row{display:grid;grid-template-columns:1fr;gap:9px;width:100%;min-width:0}
#dashSegCard .gae-seg-program{width:100%;min-width:0}
#dashSegCard .gae-seg-group{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #dfe6e1;border-radius:11px;background:#fbfcfc}
#dashSegCard .fast-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
#dashSegCard .fast-title{color:#007832;font-size:11.8px;line-height:1.2;font-weight:850;letter-spacing:.02em;text-transform:uppercase}
#dashSegCard .fast-tools{display:flex;gap:5px;flex:0 0 auto}
#dashSegCard .fast-tools button{appearance:none;border:1px solid #d6e0da;border-radius:7px;background:#fff;color:#4d5d65;padding:4px 7px;font:inherit;font-size:10px;font-weight:800;cursor:pointer}
#dashSegCard .fast-tools button:hover{border-color:#9dcda6;background:#f2f9f3;color:#006d2d}
#dashSegCard .fast-btns{display:grid;gap:7px;width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))!important}
#fast_estadoCurso .fast-btns{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#fast_modalidad .fast-btns{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#fast_nivel .fast-btns{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#fast_programaEspecial .fast-btns{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#dashSegCard .fast-btn{appearance:none;width:100%;min-width:0;min-height:50px;box-sizing:border-box;padding:7px 8px;border:1px solid #d8e0e4;border-radius:8px;background:#f7f9fa;color:#1d2d35;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(27px,auto) 6px;column-gap:6px;row-gap:5px;text-align:left;transition:.15s ease}
#dashSegCard .fast-btn:hover:not(:disabled){border-color:#9fcda8;background:#f2f8f3}
#dashSegCard .fast-btn.active,#dashSegCard .fast-btn[aria-pressed="true"]{border-color:#39a900;background:#edf8ef;box-shadow:inset 0 0 0 1px rgba(57,169,0,.18)}
#dashSegCard .fast-btn:disabled{cursor:default;opacity:.58;background:#f7f8f8}
#dashSegCard .fast-btn .lbl{grid-column:1;grid-row:1;min-width:0;color:#263842;font-size:11.5px;line-height:1.18;font-weight:680;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
#dashSegCard .fast-btn .cnt{grid-column:2;grid-row:1;justify-self:end;align-self:start;margin:0;padding:2px 5px;border-radius:999px;background:#e8eeea;color:#32454e;font-size:10px;line-height:1.15;font-weight:850;white-space:nowrap}
#dashSegCard .fast-btn.active .cnt,#dashSegCard .fast-btn[aria-pressed="true"] .cnt{background:#dcefdc;color:#126d29}
#dashSegCard .gae-fast-meter{grid-column:1/-1;grid-row:2;display:block;width:100%;height:6px;margin:0;border-radius:999px;background:#e3ebe5;overflow:hidden}
#dashSegCard .gae-fast-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8bd271 0%,#39a900 62%,#168d2e 100%)}
#dashSegCard .fast-btn:disabled .gae-fast-meter i{width:0}
#dashSegCard .fast-tools button:focus-visible,#dashSegCard .fast-btn:focus-visible,.gae-filter-trigger:focus-visible,.gae-filter-summary-open:focus-visible,.gae-filter-drawer-close:focus-visible{outline:3px solid rgba(57,169,0,.25);outline-offset:2px}

#dashSegCard .gae-filter-drawer-footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:11px 13px;background:#fff;border-top:1px solid #dfe7e2;box-shadow:0 -4px 12px rgba(15,23,42,.035)}
#dashSegCard .gae-filter-drawer-footer .btn{min-height:39px;border-radius:9px;font-size:11.5px;font-weight:850}
#dashSegCard .gae-filter-drawer-clear{background:#f2f5f3!important;color:#485b50!important;border:1px solid #d8e1db!important}
#dashSegCard .gae-filter-drawer-done{flex:1 1 auto;max-width:240px}

@media(max-width:900px){
  #dashSegCard.gae-filter-drawer{width:min(520px,calc(100vw - 42px))!important}
  .gae-filter-summary-main{align-items:flex-start;flex-direction:column;gap:6px}
}
@media(max-width:640px){
  #dashSegCard.gae-filter-drawer{width:100vw!important;border-radius:0!important}
  .gae-filter-summary{align-items:flex-start}
  .gae-filter-summary-title{display:none}
  .gae-filter-summary-open{padding:7px 8px}
  #dashSegCard .dash-date-range{grid-template-columns:1fr}
  #dashSegCard .fast-btns,#fast_estadoCurso .fast-btns,#fast_modalidad .fast-btns,#fast_nivel .fast-btns,#fast_programaEspecial .fast-btns{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){#dashSegCard.gae-filter-drawer,.gae-filter-backdrop{transition:none!important}}

/* GAE 4.15.4 · detalle, Ficha 360, dashboard y control territorial */

.gae-detail-360-pill{border:1px solid #8fc99b;background:linear-gradient(180deg,#f7fff8,#eaf7ec);color:#0b6f2d;border-radius:10px;padding:7px 10px;display:inline-flex;align-items:center;gap:6px;font-size:10.5px;font-weight:850;white-space:nowrap;cursor:pointer;box-shadow:0 2px 5px rgba(0,93,37,.08);transition:.15s ease}
.gae-detail-360-pill svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.gae-detail-360-pill:hover{background:#ddf2e1;border-color:#39A900;transform:translateY(-1px);box-shadow:0 5px 12px rgba(0,93,37,.12)}
.gae-detail-360-pill:focus-visible{outline:3px solid rgba(57,169,0,.24);outline-offset:2px}
.gae-f360-match-note{display:block;margin-top:3px;font-size:9.5px;color:#68766f;font-weight:650}
.gae-detail-eye{width:34px;height:32px;border:1px solid #b9d9c0;background:#f4fbf5;color:#08762d;border-radius:8px;padding:5px;display:inline-grid;place-items:center;cursor:pointer}
.gae-detail-eye svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9}
.gae-detail-eye:hover{background:#e7f6e9;border-color:#39A900;transform:translateY(-1px)}
.gae-detail-eye:focus-visible{outline:3px solid rgba(57,169,0,.25);outline-offset:2px}
.th-detail,.td-detail{text-align:center;white-space:nowrap}
.gae-instructor-modal{width:min(1320px,97vw)}
.gae-instructor-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-bottom:10px}
.gae-instructor-summary>div{border:1px solid #dce8df;background:#f8fbf8;border-radius:12px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.gae-instructor-summary span{font-size:11px;color:#65736b}.gae-instructor-summary b{font-size:17px;color:#00304D}
.gae-instructor-note{margin:0 0 10px;color:#66756d;font-size:11px}
.gae-instructor-table-wrap{max-height:58vh;overflow:auto}
.gae-instructor-detail-table{min-width:1050px}
.gae-instructor-detail-table th{position:sticky;top:0;z-index:2;background:#f4f8f5}
.gae-map-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.gae-map-fallback-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.gae-map-fallback-head>div:first-child{display:flex;flex-direction:column;gap:4px}.gae-map-fallback-head>div:first-child span{font-size:11px;color:#68766e}
@media(max-width:760px){.gae-instructor-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.gae-map-controls{justify-content:flex-start;width:100%}.gae-map-fallback-head{flex-direction:column}}


.gae-program-modal{width:min(1500px,97vw);max-height:94vh}
.gae-program-summary{grid-template-columns:repeat(5,minmax(0,1fr))}
.gae-program-detail-grid{display:grid;grid-template-columns:minmax(360px,.8fr) minmax(0,1.7fr);gap:12px;margin-top:12px;align-items:start}
.gae-program-instructors-wrap,.gae-program-fichas-wrap{max-height:52vh;overflow:auto}
.gae-f360-apprentices{margin-top:11px}
.gae-section-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.gae-section-title-row h3{margin:0}
.gae-f360-apprentices-wrap{max-height:330px;overflow:auto}
.gae-apr-status{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.gae-apr-status.ok{background:#e9f7e7;color:#1b6e25}.gae-apr-status.warn{background:#fff4d8;color:#815d00}.gae-apr-status.danger{background:#fde9e7;color:#9f231d}
.gae-metric-explain{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin-top:4px}
.gae-metric-explain-item{border:1px solid #dde8e0;background:#f8fbf9;border-radius:10px;padding:9px 11px;display:grid;gap:4px}
.gae-metric-explain-item>b{font-size:13px;color:#007832}.gae-metric-explain-item>span{font-size:11.5px;line-height:1.4;color:#344b3d}.gae-metric-explain-item>small{font-size:10.5px;line-height:1.35;color:#657269}
.gae-metric-explain-source{grid-column:1/-1;font-size:10.8px;line-height:1.4;color:#55665c;padding:2px 2px 0}
.gae-map-range{display:grid;grid-template-columns:auto 150px;align-items:center;gap:8px;min-width:245px;font-size:10px;font-weight:800;color:#5f6f66;white-space:nowrap}
.gae-map-range span{display:flex;align-items:center;gap:4px}.gae-map-range b{color:#007832;min-width:36px;text-align:right}
.gae-map-range input[type="range"]{width:150px;margin:0;accent-color:#39A900;cursor:pointer}
.gae-map-range.is-disabled{opacity:.45}.gae-map-range.is-disabled input{cursor:not-allowed}
@media(max-width:1050px){.gae-program-detail-grid{grid-template-columns:1fr}.gae-program-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.gae-map-range{grid-template-columns:auto minmax(120px,1fr);width:100%}.gae-map-range input[type="range"]{width:100%}}
@media(max-width:700px){.gae-program-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.gae-metric-explain{grid-template-columns:1fr}.gae-map-range{min-width:0}}


/* GAE 4.16.1 · Acción reforzada: Limpiar filtros */
.gae-clear-filter-btn,
#dashSegCard .gae-filter-drawer-clear{
  min-height:40px;
  padding:8px 14px!important;
  border:1.5px solid #9fb9aa!important;
  border-radius:9px!important;
  background:#ffffff!important;
  color:#315342!important;
  font-weight:850!important;
  box-shadow:0 2px 7px rgba(0,48,77,.05);
}
.gae-clear-filter-btn:hover,
#dashSegCard .gae-filter-drawer-clear:hover{
  border-color:#39A900!important;
  background:#f2f9ef!important;
  color:#176c2c!important;
}
.gae-clear-filter-btn:focus-visible,
#dashSegCard .gae-filter-drawer-clear:focus-visible{
  outline:3px solid rgba(57,169,0,.24)!important;
  outline-offset:2px;
}

/* GAE 4.19.0 · Analitica territorial interactiva */
#gaeMapZone .dash-chart-title{display:none!important}
#gaeMapZone .dash-chart-wrap.is-map{min-height:660px!important;overflow:visible}
#dashMapMunicipios.dash-leafletmap{height:auto!important;min-height:620px!important;border:0!important;border-radius:0!important;overflow:visible!important;background:transparent!important}
.gae-territorial-shell{position:relative;display:grid;gap:12px;min-width:0;color:#24372b}
.gae-territorial-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:2px 2px 0}
.gae-territorial-head h3{margin:4px 0 2px;font-size:19px;line-height:1.15;color:#123f23}
.gae-territorial-head p{margin:0;font-size:11px;color:#6a786f}
.gae-map-breadcrumb{display:flex;align-items:center;gap:5px;font-size:10px;color:#607067}
.gae-map-breadcrumb button{border:0;background:transparent;padding:0;color:#007832;font-weight:800;cursor:pointer}.gae-map-breadcrumb .is-current{color:#344b3b;cursor:default}.gae-map-breadcrumb span{color:#9aa79f}
.gae-map-secondary-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.gae-map-search{height:36px;min-width:250px;display:flex;align-items:center;gap:7px;border:1px solid #d6e0d8;background:#fff;border-radius:10px;padding:0 10px}.gae-map-search span{font-size:17px;color:#607269}.gae-map-search input{width:100%;min-width:0;border:0!important;outline:0!important;padding:0!important;font-size:11px!important;background:transparent!important;box-shadow:none!important}
.gae-map-icon-btn,.gae-map-tool-btn{min-height:36px;border:1px solid #d5dfd8;background:#fff;color:#31523c;border-radius:10px;padding:0 10px;font-size:10px;font-weight:850;cursor:pointer}.gae-map-icon-btn:hover,.gae-map-tool-btn:hover{border-color:#39A900;background:#f1f8ed}.gae-map-tool-btn.is-active{background:#e9f7e3;border-color:#39A900;color:#176000}.gae-map-tool-btn:disabled{opacity:.45;cursor:not-allowed}
.gae-territorial-toolbar{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;padding:10px;border:1px solid #dce5df;background:#f8fbf8;border-radius:13px}
.gae-territorial-toolbar label,.gae-map-compare-row label{display:grid;gap:4px;font-size:9.5px;font-weight:850;color:#5d6d63}.gae-territorial-toolbar select,.gae-map-compare-row select{height:34px;min-width:140px;border:1px solid #cfdad2;border-radius:9px;background:#fff;color:#203b29;font-size:11px;padding:0 28px 0 9px}
.gae-map-compare-row{display:none;align-items:flex-end;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px dashed #cbd8cf;border-radius:12px;background:#fff}.gae-map-compare-row.is-open{display:flex}.gae-map-compare-row>span{padding-bottom:8px;color:#78857d;font-size:10px;font-weight:800}.gae-map-compare-row small{padding-bottom:8px;color:#6b786f;font-size:9.5px}
.gae-territorial-layout{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(270px,.54fr);gap:12px;min-width:0}
.gae-map-canvas-card,.gae-map-inspector{border:1px solid #dce5df;background:#fff;border-radius:16px;min-width:0}.gae-map-canvas-card{padding:12px;display:flex;flex-direction:column}.gae-map-inspector{padding:12px;display:flex;flex-direction:column;gap:12px;max-height:690px}
.gae-territorial-svg{width:100%;height:auto;min-height:500px;max-height:620px;background:linear-gradient(180deg,#fbfdfc,#f6faf7);border:1px solid #e3ebe5;border-radius:13px;display:block;touch-action:manipulation}
.gae-territory{cursor:pointer;outline:none}.gae-territory path{transition:filter .12s ease,stroke .12s ease,stroke-width .12s ease,opacity .12s ease}.gae-territory:hover path,.gae-territory:focus path{filter:brightness(.93);stroke:#00304D!important;stroke-width:2.2!important}.gae-territory.no-data path{opacity:.88}.gae-map-bubble-circle{fill:#0a7a35;fill-opacity:.58;stroke:#fff;stroke-width:1.2;pointer-events:none}.gae-map-place-label{font:700 8.5px Arial,sans-serif;fill:#213f2b;paint-order:stroke;stroke:#fff;stroke-width:2.5px;text-anchor:middle;dominant-baseline:central;pointer-events:none}
.gae-map-legend{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px;font-size:9.5px;color:#627168}.gae-map-legend>i:not(.s){width:180px;height:9px;border:1px solid #cad7cd;border-radius:99px;background:linear-gradient(90deg,#d5ebcc,#39A900,#007832)}.gae-map-legend>i.delta{background:linear-gradient(90deg,#c62828,#e6ebe7,#2e7d32)}.gae-map-legend>b{margin-left:auto;color:#36523f}.gae-status-legend{gap:12px}.gae-status-legend span{display:flex;align-items:center;gap:5px}.gae-status-legend .s{width:9px;height:9px;border-radius:50%;display:inline-block}.gae-status-legend .attention{background:#2E7D32}.gae-status-legend .normal{background:#F2A629}.gae-status-legend .critical{background:#7A0019}.gae-status-legend .nodata{background:#e5e9e6;border:1px solid #c6d0c9}
.gae-map-source-line{margin-top:6px;font-size:8.7px;line-height:1.35;color:#7b867f}
.gae-map-detail-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding-bottom:9px;border-bottom:1px solid #e7ece8}.gae-map-detail-head small{font-size:8.5px;text-transform:uppercase;letter-spacing:.08em;color:#738078}.gae-map-detail-head h4{margin:2px 0 1px;font-size:17px;color:#143d24;line-height:1.12}.gae-map-detail-head span{font-size:10px;color:#6b786f}.gae-map-status{border-radius:99px;padding:5px 8px;font-size:8.5px!important;font-weight:900;white-space:nowrap}.status-attention{background:#e6f4e5;color:#1d6c2a}.status-normal{background:#fff0c7;color:#8a5600}.status-critical{background:#f3dce2;color:#7A0019}.status-nodata{background:#edf0ee;color:#657168}
.gae-map-detail-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.gae-map-detail-kpis>div{border:1px solid #e1e8e3;background:#f9fbf9;border-radius:10px;padding:8px}.gae-map-detail-kpis b{display:block;font-size:14px;color:#123f23}.gae-map-detail-kpis span{font-size:8.5px;color:#69776f}.gae-map-filter-dash{width:100%;margin-top:10px;border:0;border-radius:10px;background:#39A900;color:#fff;font-size:10px;font-weight:900;padding:10px;cursor:pointer}.gae-map-filter-dash:hover{background:#2f8f00}
.gae-map-delta-card{display:grid;grid-template-columns:1fr auto;gap:2px 10px;border:1px solid #dde5df;border-radius:11px;padding:9px;margin-top:9px}.gae-map-delta-card span{font-size:9px;color:#6a776f}.gae-map-delta-card b{grid-row:1/3;grid-column:2;font-size:19px;color:#46534b}.gae-map-delta-card b.up{color:#2e7d32}.gae-map-delta-card b.down{color:#c62828}.gae-map-delta-card small{font-size:9px;color:#738078}
.gae-map-ranking{min-height:0;overflow:auto;border-top:1px solid #e6ece8;padding-top:8px}.gae-map-ranking-title{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#607067;padding:0 2px 5px}.gae-map-ranking button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:9px;border:0;border-bottom:1px solid #edf1ee;background:transparent;padding:8px 3px;color:#35493b;cursor:pointer;text-align:left}.gae-map-ranking button:hover{background:#f2f8f2}.gae-map-ranking button span{min-width:0;display:flex;align-items:center;gap:7px;font-size:10px}.gae-map-ranking button span b{flex:0 0 19px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;background:#ecf4ed;color:#35702d;font-size:8px}.gae-map-ranking button strong{font-size:10px;color:#0f6e2b;white-space:nowrap}.gae-map-detail-empty{padding:15px 7px;color:#718078;font-size:10px;text-align:center}
.gae-map-tooltip{position:absolute;z-index:50;pointer-events:none;min-width:200px;max-width:250px;background:rgba(20,38,27,.96);color:#fff;border-radius:10px;padding:9px 10px;box-shadow:0 8px 24px rgba(0,0,0,.18);font-size:9.5px;line-height:1.35}.gae-map-tooltip b{display:block;font-size:11px;margin-bottom:3px}.gae-map-tooltip span{display:block;color:#dfe8e2}.gae-map-tooltip strong{color:#fff}
.gae-map-loading-pro{min-height:590px!important}
.gae-map-offline-fallback{min-height:520px;border:1px solid #dce5df;border-radius:16px;background:#fbfdfb;padding:20px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-content:start}.gae-map-offline-icon{font-size:34px}.gae-map-offline-fallback b{font-size:13px;color:#21452c}.gae-map-offline-fallback p{font-size:10px;color:#68766d;margin:3px 0}.gae-map-offline-fallback>button{height:36px;border:1px solid #39A900;background:#eff9ea;color:#2d6e16;border-radius:9px;font-weight:850;font-size:10px;cursor:pointer}.gae-map-dept-fallback{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:7px;margin-top:8px}.gae-map-dept-fallback button{display:grid;gap:3px;text-align:left;border:1px solid #e0e7e2;background:#fff;border-radius:10px;padding:10px;cursor:pointer}.gae-map-dept-fallback button:hover{border-color:#39A900}.gae-map-dept-fallback span{font-size:10px;font-weight:850;color:#294434}.gae-map-dept-fallback b{font-size:10px}.gae-map-dept-fallback small{font-size:8.5px;color:#748078}
.gae-map-expanded-body{overflow:hidden!important}.gae-map-zone.gae-map-expanded{position:fixed!important;inset:10px!important;z-index:99998!important;margin:0!important;padding:12px!important;background:#f5f8f6!important;border:1px solid #d5e0d8!important;border-radius:18px!important;overflow:auto!important;box-shadow:0 18px 60px rgba(0,0,0,.28)!important}.gae-map-zone.gae-map-expanded .dash-chart-map{margin:0!important;max-width:none!important}.gae-map-zone.gae-map-expanded #dashMapMunicipios{min-height:calc(100vh - 70px)!important}.gae-map-zone.gae-map-expanded .gae-territorial-svg{min-height:650px;max-height:none}.gae-map-zone.gae-map-expanded #gaeMapFullscreen{background:#eaf6e5;border-color:#39A900}
@media(max-width:1050px){.gae-territorial-layout{grid-template-columns:1fr}.gae-map-inspector{max-height:380px}.gae-territorial-svg{min-height:440px}.gae-map-search{min-width:220px}}
@media(max-width:760px){#gaeMapZone .dash-chart-wrap.is-map{min-height:0!important}.gae-territorial-head{flex-direction:column}.gae-map-secondary-tools{justify-content:flex-start;width:100%}.gae-map-search{width:100%;min-width:0}.gae-territorial-toolbar>*{flex:1 1 145px}.gae-territorial-toolbar select{width:100%;min-width:0}.gae-territorial-svg{min-height:340px}.gae-map-place-label{display:none}.gae-map-legend>b{width:100%;margin-left:0}.gae-map-inspector{max-height:none}.gae-map-offline-fallback{grid-template-columns:1fr}.gae-map-dept-fallback{grid-column:1}.gae-map-zone.gae-map-expanded{inset:4px!important;padding:7px!important}.gae-map-zone.gae-map-expanded .gae-territorial-svg{min-height:420px}}


/* GAE 4.20.0 · Mapa 2D centrado + concentración decimal + atención por terciles */
.gae-map-stage{position:relative;min-width:0;overflow:visible}
.gae-map-concentration-control{min-width:230px!important;display:grid!important;grid-template-columns:1fr;align-content:end;gap:3px!important}
.gae-map-concentration-control>span{display:flex;align-items:center;justify-content:space-between;gap:8px}
.gae-map-concentration-control b{color:#007832;font-variant-numeric:tabular-nums;min-width:58px;text-align:right}
.gae-map-concentration-control input[type="range"]{width:220px;max-width:100%;margin:0;accent-color:#39A900;cursor:pointer}
.gae-map-concentration-control small{display:flex;justify-content:space-between;width:220px;max-width:100%;font-size:8px;color:#7a877f;font-weight:750}
.gae-map-concentration-control small i{font-style:normal}
@media(max-width:760px){
  .gae-map-concentration-control{width:100%;min-width:0!important}
  .gae-map-concentration-control input[type="range"],.gae-map-concentration-control small{width:100%}
}

.gae-map-stage{display:flex;align-items:center;justify-content:center}
.gae-map-empty-text{font:800 16px Arial,sans-serif;fill:#748078}


/* GAE 4.21.0 - detalle municipal completo */
.gae-map-municipality-directory{border-top:1px solid #e6ece8;padding-top:8px;min-height:0;display:flex;flex-direction:column}
.gae-map-directory-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 6px;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#607067}
.gae-map-directory-title b{display:grid;place-items:center;min-width:25px;height:20px;padding:0 6px;border-radius:99px;background:#edf5ee;color:#2c6e2a;font-size:9px}
.gae-map-directory-list{display:grid;gap:3px;overflow:auto;max-height:260px;padding-right:2px}
.gae-map-directory-list>button{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;border:1px solid #edf1ee;border-radius:9px;background:#fff;padding:7px 8px;text-align:left;cursor:pointer;color:#35493b}
.gae-map-directory-list>button:hover,.gae-map-directory-list>button:focus{border-color:#9ecb8a;background:#f4faf2;outline:none}
.gae-map-directory-list>button.is-out{opacity:.64}
.gae-map-directory-list>button>span:first-child{min-width:0;display:grid;gap:1px}
.gae-map-directory-list strong{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#274531}
.gae-map-directory-list small{font-size:7.5px;color:#78837c}
.gae-map-dir-metrics{display:grid!important;grid-template-columns:auto auto;gap:0 4px!important;text-align:right;align-items:baseline}
.gae-map-dir-metrics b{font-size:8.5px;color:#0f6e2b}
.gae-map-dir-metrics small{font-size:7px}
.gae-map-muni-fallback{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:7px;margin-top:8px;max-height:420px;overflow:auto}
.gae-map-muni-fallback button{display:grid;gap:3px;text-align:left;border:1px solid #e0e7e2;background:#fff;border-radius:10px;padding:10px;cursor:pointer}
.gae-map-muni-fallback button:hover{border-color:#39A900;background:#f5faf3}
.gae-map-muni-fallback span{font-size:10px;font-weight:850;color:#294434}.gae-map-muni-fallback b{font-size:10px}.gae-map-muni-fallback small{font-size:8.5px;color:#748078}
@media(max-width:760px){.gae-map-directory-list{max-height:360px}.gae-map-dir-metrics{display:none!important}}


/* GAE 4.22.0 · zoom territorial + etiquetas inteligentes */
.gae-territorial-svg{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.gae-territorial-svg:active{cursor:grabbing}
.gae-map-zoom-controls{position:absolute;z-index:12;top:12px;left:12px;display:grid;grid-template-columns:34px 34px 34px auto;gap:5px;align-items:center;padding:5px;border:1px solid #d7e1da;border-radius:11px;background:rgba(255,255,255,.94);box-shadow:0 4px 14px rgba(29,55,37,.11);backdrop-filter:blur(5px)}
.gae-map-zoom-controls button{width:34px;height:34px;border:1px solid #d3ddd6;border-radius:8px;background:#fff;color:#174b2a;font-size:18px;font-weight:900;line-height:1;cursor:pointer;padding:0}
.gae-map-zoom-controls button:hover,.gae-map-zoom-controls button:focus-visible{border-color:#39A900;background:#f0f8ec;outline:none}
.gae-map-zoom-controls span{min-width:44px;padding:0 5px;text-align:center;font-size:9px;font-weight:900;color:#52655a;font-variant-numeric:tabular-nums}
.gae-map-dept-label{font-size:10px;font-weight:900;letter-spacing:.01em;fill:#173e27;stroke-width:3px}
.gae-map-muni-label{font-size:8px;font-weight:800;fill:#244b31;stroke-width:2.4px}
.gae-map-external-label{dominant-baseline:central}
.gae-map-label-line{stroke:#567261;stroke-width:.8;stroke-linecap:round;vector-effect:non-scaling-stroke;pointer-events:none}
.gae-map-label-dot{fill:#284f34;stroke:#fff;stroke-width:.7;vector-effect:non-scaling-stroke;pointer-events:none}
.gae-map-label-layer{pointer-events:none}
@media(max-width:760px){
  .gae-map-zoom-controls{top:8px;left:8px;grid-template-columns:38px 38px 38px auto}
  .gae-map-zoom-controls button{width:38px;height:38px}
  .gae-map-place-label{display:block}
  .gae-map-dept-label{font-size:11px}
  .gae-map-muni-label{font-size:8.5px}
}

/* GAE 4.24.0 · listado lateral de Atención */
.gae-map-attention-panel{min-height:0;border-top:1px solid #e6ece8;padding-top:8px;display:flex;flex-direction:column;gap:7px}
.gae-map-attention-panel-title{display:grid;gap:1px;padding:0 2px 3px}.gae-map-attention-panel-title>span{font-size:9px;font-weight:950;text-transform:uppercase;letter-spacing:.045em;color:#53665a}.gae-map-attention-panel-title small{font-size:7.8px;color:#839087}
.gae-map-attention-group{border:1px solid #e4eae6;border-radius:10px;background:#fff;overflow:hidden;flex:0 0 auto}
.gae-map-attention-group-head{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:6px 8px;border-bottom:1px solid #edf1ee}.gae-map-attention-group-head>span{min-width:0;display:flex;align-items:center;gap:5px}.gae-map-attention-group-head i{width:9px;height:9px;border-radius:50%;flex:0 0 9px}.gae-map-attention-group-head strong{font-size:9.5px;color:#304538}.gae-map-attention-group-head small{font-size:7.5px;color:#7c8981;white-space:nowrap}.gae-map-attention-group-head>b{display:grid;place-items:center;min-width:24px;height:19px;padding:0 5px;border-radius:99px;background:#f0f4f1;color:#53665a;font-size:8px}
.gae-map-attention-names{max-height:112px;overflow:auto;padding:3px}.gae-map-attention-names button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:7px;border:0;border-bottom:1px solid #f0f3f1;background:transparent;padding:6px 5px;text-align:left;cursor:pointer;border-radius:6px}.gae-map-attention-names button:last-child{border-bottom:0}.gae-map-attention-names button:hover,.gae-map-attention-names button:focus-visible{background:#f5f8f5;outline:none}.gae-map-attention-names button>span{min-width:0;font-size:8.8px;font-weight:800;color:#34493b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gae-map-attention-names button>span small{display:block;font-size:7px;font-weight:650;color:#849087;overflow:hidden;text-overflow:ellipsis}.gae-map-attention-names button>b{font-size:8px;color:#607067;white-space:nowrap}.gae-map-attention-empty{padding:8px;text-align:center;color:#8a958e;font-size:8px}
.gae-map-attention-group.group-attention{border-left:4px solid #2E7D32}.gae-map-attention-group.group-attention .gae-map-attention-group-head i{background:#2E7D32}.gae-map-attention-group.group-normal{border-left:4px solid #F2A629}.gae-map-attention-group.group-normal .gae-map-attention-group-head i{background:#F2A629}.gae-map-attention-group.group-critical{border-left:4px solid #7A0019}.gae-map-attention-group.group-critical .gae-map-attention-group-head i{background:#7A0019}.gae-map-attention-group.group-nodata{border-left:4px solid #aeb8b1}.gae-map-attention-group.group-nodata .gae-map-attention-group-head i{background:#aeb8b1}.gae-map-attention-group.group-nodata .gae-map-attention-names button>span,.gae-map-attention-group.group-nodata .gae-map-attention-names button>b{color:#6f7b73}
.gae-map-attention-note{display:flex;align-items:flex-start;gap:6px;padding:7px 8px;border-radius:9px;background:#f6f8f6;color:#727f77;font-size:7.5px;line-height:1.35}.gae-map-attention-note>i{width:8px;height:8px;margin-top:1px;border-radius:50%;background:#aeb8b1;flex:0 0 8px}.gae-map-attention-note b{color:#56645b}
@media(max-width:1050px){.gae-map-attention-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.gae-map-attention-panel-title,.gae-map-attention-note{grid-column:1/-1}.gae-map-attention-names{max-height:150px}}
@media(max-width:620px){.gae-map-attention-panel{grid-template-columns:1fr}.gae-map-attention-panel-title,.gae-map-attention-note{grid-column:1}.gae-map-attention-names{max-height:180px}}

.gae-territory.no-attended path{opacity:.78}.gae-territory.no-attended:hover path,.gae-territory.no-attended:focus path{opacity:1}


/* GAE 4.25.0 · filtro local multidepartamento del mapa */
.gae-map-dept-filter-control{position:relative;display:grid;gap:4px;min-width:185px;font-size:9.5px;font-weight:850;color:#5d6d63}
.gae-map-dept-filter{position:relative;min-width:185px;font-weight:700;color:#294434}
.gae-map-dept-filter>summary{height:34px;display:flex;align-items:center;justify-content:space-between;gap:9px;border:1px solid #cfdad2;border-radius:9px;background:#fff;padding:0 9px;cursor:pointer;list-style:none;font-size:10.5px;user-select:none}
.gae-map-dept-filter>summary::-webkit-details-marker{display:none}.gae-map-dept-filter>summary i{font-style:normal;color:#6f7d74;font-size:11px;transition:transform .15s ease}.gae-map-dept-filter[open]>summary i{transform:rotate(180deg)}
.gae-map-dept-menu{position:absolute;z-index:45;top:39px;left:0;width:270px;max-width:min(88vw,320px);padding:8px;border:1px solid #d5dfd8;border-radius:11px;background:#fff;box-shadow:0 12px 30px rgba(28,52,35,.16)}
.gae-map-dept-menu-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 2px 7px;border-bottom:1px solid #edf1ee}.gae-map-dept-menu-head>span{font-size:8.5px;color:#78857d}.gae-map-dept-menu-head button{border:0;background:#eef7ea;color:#2b6d18;border-radius:7px;padding:5px 8px;font-size:8px;font-weight:900;cursor:pointer}
.gae-map-dept-list{display:grid;gap:2px;max-height:250px;overflow:auto;padding:5px 1px}.gae-map-dept-list label{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px!important;padding:6px 5px;border-radius:7px;cursor:pointer;font-size:9px!important;font-weight:750!important;color:#34493b!important}.gae-map-dept-list label:hover{background:#f4f8f4}.gae-map-dept-list input{width:15px;height:15px;accent-color:#39A900;flex:0 0 auto}.gae-map-dept-list label>span{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;flex:1}.gae-map-dept-list label b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gae-map-dept-list label small{font-size:7.5px;color:#849087;white-space:nowrap}
.gae-map-dept-apply{width:100%;height:32px;border:0;border-radius:8px;background:#39A900;color:#fff;font-size:9px;font-weight:900;cursor:pointer}.gae-map-dept-apply:hover{background:#2f8f00}
@media(max-width:760px){.gae-map-dept-filter-control{width:100%;min-width:0}.gae-map-dept-filter{width:100%;min-width:0}.gae-map-dept-menu{position:fixed;left:12px;right:12px;top:auto;width:auto;max-width:none}.gae-map-dept-list{max-height:310px}.gae-map-dept-filter>summary{min-height:44px}}

/* GAE 4.26.0 · distribución Atención + No atendido geográfico */
.gae-territorial-layout.is-attention{
  grid-template-columns:minmax(0,1fr) minmax(360px,.5fr);
  align-items:start;
}
.gae-territorial-layout.is-attention .gae-map-inspector{
  max-height:690px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.gae-territorial-layout.is-attention .gae-map-attention-panel{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  align-items:start;
}
.gae-territorial-layout.is-attention .gae-map-attention-panel-title,
.gae-territorial-layout.is-attention .gae-map-attention-note{
  grid-column:1/-1;
}
.gae-territorial-layout.is-attention .gae-map-attention-group{
  min-width:0;
}
.gae-territorial-layout.is-attention .gae-map-attention-names{
  max-height:128px;
}
.gae-map-attention-names button.no-records>b{
  color:#8a958e;
  font-weight:750;
}
.gae-map-no-data-message{
  margin-top:10px;
  padding:12px;
  border:1px solid #e0e6e2;
  border-radius:11px;
  background:#f6f8f6;
  display:grid;
  gap:4px;
}
.gae-map-no-data-message b{font-size:10px;color:#56645b}
.gae-map-no-data-message span{font-size:8.5px;line-height:1.4;color:#7a867e}
@media(max-width:1180px){
  .gae-territorial-layout.is-attention{grid-template-columns:minmax(0,1fr) minmax(320px,.56fr)}
}
@media(max-width:1050px){
  .gae-territorial-layout.is-attention{grid-template-columns:1fr}
  .gae-territorial-layout.is-attention .gae-map-inspector{max-height:none;overflow:visible}
  .gae-territorial-layout.is-attention .gae-map-attention-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .gae-territorial-layout.is-attention .gae-map-attention-panel{grid-template-columns:1fr}
  .gae-territorial-layout.is-attention .gae-map-attention-panel-title,
  .gae-territorial-layout.is-attention .gae-map-attention-note{grid-column:1}
}


/* GAE 4.27.0 · mapa completo + lateral sin duplicados */
.gae-map-attention-note{display:none!important}
.gae-map-dir-no-data{font-size:8px;font-weight:850;color:#8a958e;white-space:nowrap}
.gae-map-directory-list button.is-out{background:#fafbfa}
.gae-map-directory-list button.is-out>span:first-child strong{color:#6f7b73}
.gae-map-directory-list button.is-out>span:first-child small{color:#9aa39d}


/* GAE 4.28.0 · Clasificación territorial horizontal bajo el mapa */
.gae-territorial-layout.is-attention{
  grid-template-columns:minmax(0,1.72fr) minmax(270px,.54fr);
  align-items:start;
}
.gae-territorial-layout.is-attention .gae-map-inspector{
  max-height:690px;
  overflow:auto;
}
.gae-map-attention-panel{
  margin-top:12px;
  border:1px solid #dce5df;
  border-radius:16px;
  background:#fff;
  padding:11px 12px 12px;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  min-width:0;
}
.gae-map-attention-panel-title{
  display:flex!important;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  padding:0 2px 2px!important;
}
.gae-map-attention-panel-title>span{font-size:9.5px!important}
.gae-map-attention-panel-title small{font-size:7.8px!important;text-align:right}
.gae-map-attention-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  align-items:start;
  min-width:0;
}
.gae-map-attention-group{min-width:0;height:auto}
.gae-map-attention-names{
  max-height:none!important;
  overflow:visible!important;
  padding:3px!important;
}
.gae-map-attention-more{
  border-top:1px solid #edf1ee;
  margin-top:2px;
}
.gae-map-attention-more>summary{
  list-style:none;
  min-height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  cursor:pointer;
  border-radius:7px;
  color:#2f6f23;
  font-size:8.5px;
  font-weight:900;
  user-select:none;
}
.gae-map-attention-more>summary::-webkit-details-marker{display:none}
.gae-map-attention-more>summary:hover,.gae-map-attention-more>summary:focus-visible{background:#f2f8ef;outline:none}
.gae-map-attention-more>summary span{font-size:7.5px;color:#748178}
.gae-map-attention-more[open]>summary{margin-bottom:2px;background:#f7faf7}
.gae-map-attention-more-list{display:grid}
@media(max-width:1180px){
  .gae-map-attention-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1050px){
  .gae-territorial-layout.is-attention{grid-template-columns:1fr}
  .gae-territorial-layout.is-attention .gae-map-inspector{max-height:none;overflow:visible}
}
@media(max-width:620px){
  .gae-map-attention-panel-title{align-items:flex-start;flex-direction:column}
  .gae-map-attention-panel-title small{text-align:left}
  .gae-map-attention-grid{grid-template-columns:1fr}
}


/* GAE 4.29.0 · cierre UX territorial: resumen, ruta, seleccion, foco y exportacion */
.gae-map-reset-btn{padding-inline:11px;white-space:nowrap}
.gae-map-territorial-summary{display:flex;align-items:center;gap:12px;min-width:0;padding:8px 10px;border:1px solid #dce5df;border-radius:13px;background:linear-gradient(180deg,#fbfdfb,#f7faf7)}
.gae-map-territorial-summary.is-empty{min-height:43px;color:#748178;font-size:9.5px;justify-content:center;background:#fafcfa}
.gae-map-summary-place{min-width:175px;max-width:270px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;border-right:1px solid #dfe7e2;padding-right:12px}
.gae-map-summary-place small{width:100%;font-size:7.5px;line-height:1;text-transform:uppercase;letter-spacing:.05em;color:#7a877f;font-weight:850}
.gae-map-summary-place strong{font-size:12.5px;line-height:1.15;color:#173f27;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}
.gae-map-summary-place .gae-map-status{margin-left:auto}
.gae-map-summary-kpis{flex:1;min-width:0;display:grid;grid-template-columns:repeat(6,minmax(72px,1fr));gap:5px}
.gae-map-summary-kpis>span{min-width:0;padding:3px 7px;border-left:1px solid #e2e9e4;display:grid;gap:1px}
.gae-map-summary-kpis b{font-size:12px;line-height:1.1;color:#123f23;font-variant-numeric:tabular-nums}.gae-map-summary-kpis i{font-style:normal;font-size:7.5px;color:#718078;white-space:nowrap}
.gae-map-breadcrumb strong.is-current{font-size:10px;color:#344b3b;font-weight:900}.gae-map-breadcrumb button:not(.is-current):hover{text-decoration:underline;text-underline-offset:2px}
.gae-territory.is-selected .gae-territory-top{stroke:#00304D!important;stroke-width:3.2!important;filter:drop-shadow(0 1px 1px rgba(0,48,77,.28)) brightness(.98)}
.gae-territory.is-selected .gae-map-bubble-circle{stroke:#00304D!important;stroke-width:2.4!important}
.gae-map-place-label.is-selected,.gae-map-callout-label.is-selected .gae-map-place-label{font-weight:950!important;fill:#00304D!important;stroke:#fff!important;stroke-width:4px!important;font-size:10.5px!important}
.gae-map-callout-label.is-selected .gae-map-label-line{stroke:#00304D!important;stroke-width:1.8!important}.gae-map-callout-label.is-selected .gae-map-label-dot{fill:#00304D!important;r:2.8px}
#dashMapMunicipios{--gae-map-zoom:1}.gae-map-place-label{transition:font-size .12s ease,opacity .12s ease,filter .12s ease}.gae-map-muni-label{font-size:7.6px}.gae-map-dept-label{font-size:9.6px}
.gae-map-attention-group-head{width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:7px 7px 6px;text-align:left;cursor:pointer;border-radius:8px;color:inherit}.gae-map-attention-group-head:hover,.gae-map-attention-group-head:focus-visible{background:#f5f8f5;outline:none}.gae-map-attention-group-head[aria-pressed="true"]{background:#eff6ec;box-shadow:inset 0 0 0 1px rgba(57,169,0,.25)}
.gae-territory.is-attention-dimmed{opacity:.14}.gae-territory.is-attention-focused{opacity:1}.gae-map-attention-group.is-attention-dimmed{opacity:.36}.gae-map-attention-group.is-attention-focused{opacity:1;box-shadow:0 0 0 2px rgba(57,169,0,.13)}.gae-map-attention-group.is-focus-pinned{box-shadow:0 0 0 2px rgba(0,48,77,.16)}
.gae-territory{transition:opacity .14s ease}.gae-map-attention-group{transition:opacity .14s ease,box-shadow .14s ease}
@media(max-width:1000px){.gae-map-territorial-summary{align-items:flex-start;flex-direction:column}.gae-map-summary-place{max-width:none;width:100%;border-right:0;border-bottom:1px solid #e1e8e3;padding-right:0;padding-bottom:7px}.gae-map-summary-kpis{width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}.gae-map-summary-kpis>span:nth-child(1),.gae-map-summary-kpis>span:nth-child(4){border-left:0}}
@media(max-width:620px){.gae-map-summary-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.gae-map-summary-kpis>span:nth-child(odd){border-left:0}.gae-map-reset-btn{width:auto!important;flex:1 1 auto}}

/* GAE 4.30.0 · exportacion cartografica con etiquetas externas */
.gae-map-export-layout{height:36px;display:flex;align-items:center;gap:6px;border:1px solid #d5dfd8;background:#fff;border-radius:10px;padding:0 7px;color:#607067;font-size:8px;font-weight:850;white-space:nowrap}
.gae-map-export-layout span{line-height:1.05;max-width:58px}
.gae-map-export-layout select{height:28px;min-width:112px;border:0;background:#f7faf7;color:#254531;border-radius:7px;padding:0 24px 0 7px;font-size:9px;font-weight:850;outline:none}
.gae-map-export-layout:focus-within{border-color:#39A900;box-shadow:0 0 0 2px rgba(57,169,0,.12)}
@media(max-width:760px){.gae-map-export-layout{width:100%;justify-content:space-between;height:auto;min-height:36px}.gae-map-export-layout span{max-width:none}.gae-map-export-layout select{flex:1;max-width:190px}}
