/* Paleta azul y celeste aprobada (24/10/2026). Capa final: se carga al último.
   Quitar este archivo de index.html devuelve la interfaz a su estado anterior.
   Colores de identidad de módulo (CEPLAN, SIAF) se conservan.
   Las variables cambian en modo noche; las reglas son las mismas para ambos modos. */
:root{
  --ps-primary:#3a78c9;--ps-primary-hover:#2f68b3;--ps-deep:#2d5f9e;--ps-deep-2:#1f4378;
  --ps-aqua:#7cc4ee;--ps-aqua-deep:#4aa8d8;--ps-bg:#f4f8fd;--ps-surface:#fff;
  --ps-border:#dbe7f3;--ps-row:#f8fbfe;--ps-hover:#eaf3fc;--ps-text:#1f2f4a;--ps-muted:#7a8aa3;
  --ps-title:#1f4378;--ps-btn-border:#b9d6f0;--ps-btn-text:#3a78c9;
  --ps-head:linear-gradient(135deg,#8ab8e8,#a9dcf5);--ps-head-text:#1f2f4a;
  --ps-command:linear-gradient(120deg,#1f4378,#3a78c9 60%,#4aa8d8);
  --ps-plan-bg:#dceaf8;--ps-plan-text:#1f4378;--ps-plan-cell:#f2f7fd;
  --ps-follow-bg:#ddf1fa;--ps-follow-text:#1d6a8f;--ps-follow-cell:#f1fafd;
}
html.darkModeV667{
  --ps-bg:#0f1a2b;--ps-surface:#16243a;--ps-border:#2c4466;--ps-row:#1a2a42;--ps-hover:#20334f;
  --ps-text:#e8f0fa;--ps-muted:#9fb2cc;--ps-title:#b9d6f0;--ps-btn-border:#3d5f8c;--ps-btn-text:#b9d6f0;
  --ps-head:linear-gradient(135deg,#2d5f9e,#1d6a8f);--ps-head-text:#f2f7fd;
  --ps-command:linear-gradient(120deg,#13284a,#2d5f9e 60%,#1d6a8f);
  --ps-plan-bg:#1f3a63;--ps-plan-text:#dceaf8;--ps-plan-cell:#172b47;
  --ps-follow-bg:#17435a;--ps-follow-text:#ddf1fa;--ps-follow-cell:#14303f;
}

/* Base de color P4 (la usa casi toda la interfaz): mismos nombres, valores azules. */
html:root{
  --p4-bg:#f4f8fd;--p4-soft:#eaf3fc;--p4-follow:#e3eef9;--p4-line:#dbe7f3;--p4-ink:#1f2f4a;--p4-muted:#62738c;
  --p4-navy:#1f4378;--p4-blue:#3a78c9;--p4-slate:#4aa8d8;--p4-purple:#3a78c9;--p4-purple-soft:#eaf3fc;
  --p4-green:#4aa8d8;--p4-green-soft:#e3f4fb;--p4-focus:#3a78c9;
}
html.darkModeV667:root{
  --p4-bg:#0f1a2b;--p4-surface:#16243a;--p4-soft:#1a2a42;--p4-follow:#20334f;--p4-line:#2c4466;
  --p4-ink:#e8f0fa;--p4-muted:#b3c4da;--p4-navy:#1f4378;--p4-blue:#6ea6e6;--p4-slate:#4aa8d8;
  --p4-purple:#9cc6f0;--p4-purple-soft:#1d3150;--p4-green:#7cc4ee;--p4-green-soft:#163a4c;--p4-focus:#9cc6f0;
}

/* Barra lateral */
html body:not(.loginVisibleV011) #sideNav.unifiedSidebarV830{
  background:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1px) 0 0/16px 16px,
    linear-gradient(180deg,var(--ps-deep-2) 0%,var(--ps-deep) 100%)!important;
}
html.darkModeV667 body:not(.loginVisibleV011) #sideNav.unifiedSidebarV830{
  background:radial-gradient(rgba(255,255,255,.05) 1px,transparent 1px) 0 0/16px 16px,
    linear-gradient(180deg,#0e1d36 0%,#1a3560 100%)!important;
}

/* Fondo general y encabezado */
html body:not(.loginVisibleV011),html body:not(.loginVisibleV011) .mainContent{background:var(--ps-bg)!important}
html:not(.darkModeV667) body:not(.loginVisibleV011) header.topbar{background:var(--ps-surface)!important;border-bottom-color:var(--ps-border)!important}

/* Tarjetas e indicadores de Mi Registro MATCH */
html body #matchApp .mx-stat{border-color:var(--ps-border)!important}
html body #matchApp .mx-stat[aria-pressed="true"]{background:var(--ps-primary)!important;border-color:var(--ps-primary)!important;color:#fff!important}
html body #matchApp .mx-month[aria-pressed="true"]{background:var(--ps-primary)!important;border-color:var(--ps-primary)!important;color:#fff!important;box-shadow:0 6px 14px rgba(58,120,201,.22)!important}

/* Cabeceras de tabla en todos los módulos.
   :not(#ps-a):not(#ps-b):not(#ps-c) solo sube la prioridad para ganar a las reglas propias de cada módulo. */
html body:not(.loginVisibleV011) :is(thead th,.ffExecOfficialTableV602 th,.ffBudgetOfficialV615 th):not(#ps-a):not(#ps-b):not(#ps-c){
  background:var(--ps-head)!important;color:var(--ps-head-text)!important;-webkit-text-fill-color:var(--ps-head-text)!important;border-color:rgba(255,255,255,.35)!important;
}
html body:not(.loginVisibleV011) :is(thead th,.ffExecOfficialTableV602 th,.ffBudgetOfficialV615 th):not(#ps-a):not(#ps-b):not(#ps-c) *{color:var(--ps-head-text)!important;-webkit-text-fill-color:var(--ps-head-text)!important}
html body:not(.loginVisibleV011) .mainContent tbody tr:nth-child(even) td{background-color:var(--ps-row)}

/* Barras de mando oscuras de los módulos SIAF */
html body:not(.loginVisibleV011) .ffExecCommandV695:not(#ps-a){background:var(--ps-command)!important}

/* Seguimiento y Evaluación: encabezado claro */
html body #panelSeguimientoEvaluacionV2 .sev2-hero{background:var(--ps-surface)!important;border:.5px solid var(--ps-border)!important;box-shadow:0 6px 18px rgba(31,67,120,.06)!important;color:var(--ps-text)!important}
html body #panelSeguimientoEvaluacionV2 .sev2-hero .sev2-title{color:var(--ps-title)!important;-webkit-text-fill-color:var(--ps-title)!important}
html body #panelSeguimientoEvaluacionV2 .sev2-hero :is(p,small,span,label,legend){color:var(--ps-muted)!important}
html body #panelSeguimientoEvaluacionV2 .sev2-hero :is(select,input){background:var(--ps-row)!important;border-color:var(--ps-border)!important;color:var(--ps-text)!important}
html body #panelSeguimientoEvaluacionV2 .sev2-hero button{background:var(--ps-surface)!important;border:.5px solid var(--ps-btn-border)!important;color:var(--ps-btn-text)!important;box-shadow:none!important}
html body #panelSeguimientoEvaluacionV2 .sev2-hero button:hover{background:var(--ps-hover)!important}

/* Seguimiento y Evaluación (institucional y regional): PROGRAMACIÓN / SEGUIMIENTO en tonos claros */
html body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional):not(#ps-a){--sev2-plan-strong:var(--ps-plan-bg);--sev2-follow-strong:var(--ps-follow-bg)}
html body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-table :is(.sev2-group-plan .sev2-group-record,.sev2-ao-plan .sev2-record-type):not(#ps-a):not(#ps-b){background:var(--ps-plan-bg)!important;color:var(--ps-plan-text)!important;-webkit-text-fill-color:var(--ps-plan-text)!important}
html body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-table :is(.sev2-group-actual .sev2-group-record,.sev2-ao-actual .sev2-record-type):not(#ps-a):not(#ps-b){background:var(--ps-follow-bg)!important;color:var(--ps-follow-text)!important;-webkit-text-fill-color:var(--ps-follow-text)!important}
html body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-table .sev2-ao-plan :is(.sev2-month,.sev2-total,.sev2-cut):not(#ps-a){background:var(--ps-plan-cell)!important}
html body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-table .sev2-ao-actual :is(.sev2-month,.sev2-total,.sev2-cut):not(#ps-a){background:var(--ps-follow-cell)!important}

/* Modo noche: leyenda de semáforo legible */
html.darkModeV667 body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-legend b.sev2-rojo{background:#3e2630!important;color:#f6c6cf!important}
html.darkModeV667 body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-legend b.sev2-ambar{background:#3d3220!important;color:#f3d9a4!important}
html.darkModeV667 body :is(#panelSeguimientoEvaluacionV2,#panelSeguimientoEvaluacionRegional) .sev2-legend b.sev2-verde{background:#1d3a2c!important;color:#bfe8cf!important}
