*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    /* ===== Ancho centrado del portal (franja, encabezado y menú) ===== */
    /* Los 100% se resuelven en cada elemento; a la derecha queda libre el panel de accesibilidad (48 px). */
    --page-pad-left: max(3.5vw, calc((100% - 1300px) / 2));
    --page-pad-right: max(calc(48px + 1.5rem), calc((100% - 1300px) / 2));

    /* ===== Colores principales (DESIGN.md, opción A de contraste) ===== */
    /* Verde institucional: títulos grandes y acentos (4,09:1, solo cumple como texto grande). */
    --color-brand: #038F67;
    /* Verde para botones, pestaña activa y texto pequeño (5,47:1 con blanco, cumple AA). */
    --color-primary: #03785A;
    --color-primary-hover: #025F43;    /* Hover y activo (7,72:1 con blanco) */
    --color-accent: var(--color-primary); /* Un solo verde de acento: no se agregan tonos fuera de DESIGN.md */
    --color-gov-blue: #0943B5;         /* Azul Cobalt GOV.CO: SOLO franja superior e inferior */
    /* ===== Neutrales y Fondos ===== */
    --color-bg-main: #f4f6f8;          /* Fondo general de la aplicación */
    --color-bg-card: #ffffff;          /* Fondo para tarjetas (cards) y contenedores */
    --color-text-main: #212529;        /* Texto principal (14,24:1) */
    --color-text-muted: #5C6670;       /* Texto secundario (5,40:1 sobre el fondo; antes 4,33:1) */

    /* ===== BORDES ===== */
    --border-color: #d9dee5;           /* Borde neutro y sutil */
    --border-radius-card: .3rem;        /* Redondeo estándar para tarjetas */

    /* ===== SOMBRAS ===== */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08); /* Sombra suave para tarjetas */

    /* ===== ACCIONES CRUD (Fondo y Texto) ===== */
    /* Crear / Guardar (Verde) */
    --crud-create-bg: var(--color-primary);
    --crud-create-text: #ffffff;

    /* Leer / Ver: gris pizarra (antes azul cielo con 4,10:1; el azul queda solo para GOV.CO) */
    --crud-read-bg: #475569;
    --crud-read-text: #ffffff;

    /* Editar / Actualizar: ámbar oscuro (antes #f59e0b con 2,15:1) */
    --crud-update-bg: #B45309;
    --crud-update-text: #ffffff;

    /* Eliminar (Rojo) */
    --crud-delete-bg: #dc2626;
    --crud-delete-text: #ffffff;

    /* ===== ESTADOS DE ADVERTENCIA ===== */
   /* Más nitidez y excelente contraste WCAG AAA */
    --warning-bg: rgb(254 248 225 / 0.98);            /* Amarillo/Ámbar ultrasuave */
    --warning-text: #78350f;          /* Ámbar profundo, altamente legible */         /* Texto oscuro con buen contraste */
}

/* ===== MODO ALTO CONTRASTE (Accesibilidad / Discapacidad Visual) ===== */
:root.high-contrast {
    /* ===== Colores Principales ===== */
    --color-brand: #00ff66;
    --color-primary: #00ff66;          /* Verde neón sobre negro (máxima visibilidad) */
    --color-primary-hover: #00cc52;    /* Verde neón ligeramente más oscuro */
    --color-accent: #ffff00;           /* Amarillo neón para acentos de alta prioridad */

    /* ===== Neutrales y Fondos ===== */
    --color-bg-main: #000000;          /* Fondo negro puro */
    --color-bg-card: #0a0a0a;          /* Fondo de contenedor muy oscuro */
    --color-text-main: #ffffff;        /* Texto principal en blanco puro */
    --color-text-muted: #e0e0e0;       /* Texto secundario de altísima legibilidad */

    /* ===== BORDES Y SOMBRAS ===== */
    --border-color: #ffffff;           /* Borde blanco sólido de alta definición */
    --border-radius-card: 0.3rem;

    /* En alto contraste las sombras se sustituyen por bordes marcados */
    --shadow-sm: none;
    --shadow-card: none;

    /* ===== ACCIONES CRUD (Ajustadas para fondo oscuro/alto contraste) ===== */
    /* Crear / Guardar */
    --crud-create-bg: #00ff66;
    --crud-create-text: #000000;

    /* Leer / Ver */
    --crud-read-bg: #38bdf8;
    --crud-read-text: #000000;

    /* Editar / Actualizar */
    --crud-update-bg: #fbbf24;
    --crud-update-text: #000000;

    /* Eliminar */
    --crud-delete-bg: #ff4d4d;
    --crud-delete-text: #000000;

    /* ===== ESTADOS DE ADVERTENCIA ===== */
    --warning-bg: #ffff00;             /* Amarillo puro de advertencia */
    --warning-text: #000000;           /* Texto negro sobre fondo amarillo */
}

html{
    font-size: 16px;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Nunito Sans", sans-serif;
    font-weight: 700;
    color: var(--color-primary);
}

body {
    font-family: Verdana, sans-serif;
    /*background: linear-gradient(*/
    /*        135deg,*/
    /*        color-mix(in srgb, var(--color-primary) 8%, var(--color-bg-main)) 0%,*/
    /*        var(--color-bg-card) 100%*/
    /*) fixed;*/
    background: var(--color-bg-main);
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Enlaces en el verde de texto pequeño (5,47:1) en lugar del azul del navegador; cada componente
   con color propio (menú, botones, tarjetas) lo sigue definiendo en su regla. */
a{ color: var(--color-primary); }
a:hover{ color: var(--color-primary-hover); }

/* DESIGN.md: botones, menú y campos también en Verdana (el navegador no lo hereda solo). */
button,
input,
select,
textarea {
    font-family: inherit;
}

/* Utilities */
.pd-1{padding: 1rem;}
.mt-1{margin-top: 1rem;}
.mb-1{margin-bottom: 1rem;}
.mb-2{margin-bottom: 2rem;}

.text-uppercase{text-transform: uppercase;}
.highlight{color: var(--color-accent) !important;}
/* Mismo ancho centrado que el encabezado y el pie; en pantallas pequeñas, margen de 1rem (ver media 1024px). */
.section{
    padding-block: clamp(2rem, 5vw, 4rem);
    padding-left: var(--page-pad-left);
    padding-right: var(--page-pad-right);
}
/* Páginas para leer (noticia, protección de datos): mismo margen que el resto del portal y renglones de
   lectura cómoda. Antes el ancho máximo iba en la sección y, sumado a sus márgenes de centrado, en
   pantallas anchas dejaba al texto unos 170 px (2026-11-05). */
.section--reading > *{ max-width: 52rem; }
.section:nth-child(even){
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--border-color);
}
.section__content{
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin: 1rem 0;
}

.heading{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.heading-title{
    /* Mínimo 1.25rem (20px, negrita): así el verde institucional cumple como texto grande (3:1). */
    font-size: clamp(1.25rem, 0.143rem + 2.619vw, 2.3rem);
    color: var(--color-brand);
    letter-spacing: 1px;
    margin: .5rem 0;
}
.heading-subtitle{
    font-size: clamp(1rem, 0.821rem + 0.476vw, 1.1rem);
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

.heading-title,
.heading-subtitle{
    max-width: 1024px;
}
/* Mensaje flotante de los botones de solo ícono (global.js → actionTooltips).
   Texto blanco sobre #212529 (15,4:1); no recibe el mouse para no tapar el botón. */
.action-tooltip{
    position: fixed;
    z-index: 1000;
    max-width: 240px;
    padding: .35rem .6rem;
    font-size: .8rem;
    line-height: 1.35;
    color: #ffffff;
    background: var(--color-text-main);
    border-radius: .3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
    pointer-events: none;
}
.action-tooltip[hidden]{ display: none; }

/* Panel principal: gráficas al inicio, las dos con la misma altura (Chart.js llena el contenedor). */
.dashboard-charts{ margin-bottom: 1.5rem; }
.dashboard-chart{
    position: relative;
    width: 100%;
    height: 260px;
}
.chart-card__header{ margin-bottom: .75rem; }
.chart-card__title{
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
}
.chart-card__subtitle{
    margin: .2rem 0 0;
    font-size: .85rem;
    color: var(--color-text-muted);
}
.chart-card__empty{
    margin: 0;
    padding: 2rem 0;
    color: var(--color-text-muted);
}
.chart-card__data summary{ font-size: .9rem; color: var(--color-primary); }
.chart-card__data table{ margin-top: .5rem; }
.chart-card__data th,
.chart-card__data td{ min-width: 0; padding: .5rem .75rem; font-size: .85rem; }

/* Panel principal: "Alertas" y "Actividad reciente" como tablas, igual que "Usuarios recientes"
   (pedido del usuario con imagen, 2026-10-29). */
.dashboard-table{ margin: 0 0 1.5rem; }
/* Sin el ancho mínimo de 190 px por columna: las tablas del panel principal caben sin cortarse. */
.dashboard-table th,
.dashboard-table td{ min-width: 0; }
/* Los encabezados y el número de fila nunca se parten; los textos largos (correos) sí. */
.dashboard-table th,
.dashboard-table td:first-child{ white-space: nowrap; }
.dashboard-table td:not(:first-child){ overflow-wrap: anywhere; }
.dashboard-table th:first-child,
.dashboard-table td:first-child{ width: 3rem; }
/* Proyectos y usuarios: la primera columna es nombre y correo, no una fecha corta: sí se parte en líneas. */
.dashboard-table .project-table td:first-child,
.dashboard-table .members-table td:first-child{ white-space: normal; width: auto; }
.dashboard-table .badge{ display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.dashboard-table__empty{ margin: 0 0 .5rem; color: var(--color-text-main); }
.dashboard-table__more{ position: sticky; left: 0; margin: .75rem 0 0; }
/* Reportes en una tabla horizontal (pedido del usuario, 2026-10-29): una fila por reporte,
   con sus filtros en las columnas y los botones de descarga al final. */
.reports-table th,
.reports-table td{ min-width: 0; vertical-align: middle; }
.reports-table th{ white-space: nowrap; }
.reports-table td:first-child{ min-width: 180px; width: 40%; }
.reports-table__input{
    width: 100%;
    min-width: 8.5rem;
    height: 44px;
    padding: 0 .75rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.reports-table__input:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
.reports-table__na{ font-size: .85rem; color: var(--color-text-muted); }
/* Periodo: "Desde" y "Hasta" con su etiqueta visible, una fecha encima de la otra. */
.reports-table__period{
    display: grid;
    min-width: 14rem;
    grid-template-columns: auto minmax(9.5rem, 1fr);
    gap: .4rem .6rem;
    align-items: center;
}
/* nowrap: en celular "Desde" y "Hasta" se partían letra por letra. */
.reports-table__period label{ font-size: .85rem; color: var(--color-text-main); white-space: nowrap; }
/* Los dos botones uno encima del otro, del mismo ancho: así la tabla cabe sin cortarse. */
.reports-table__actions{ display: flex; flex-direction: column; gap: .5rem; }
.reports-table__actions .button{
    justify-content: flex-start;
    width: 100%;
    padding: .6rem .9rem;
    font-size: .9rem;
    white-space: nowrap;
}
/* Cuando el recuadro de la tabla es angosto (pantallas medianas con la barra lateral, o celular),
   cada reporte se muestra como tarjeta: la tabla mira el ancho de su contenedor, no de la pantalla. */
.reports-table{ container: reports / inline-size; }
@container reports (max-width: 840px){
    .reports-table thead{
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .reports-table table,
    .reports-table tbody,
    .reports-table tr,
    .reports-table td{ display: block; width: 100%; }
    .reports-table tr{
        margin-bottom: .75rem;
        padding: .5rem .85rem;
        background: var(--color-bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-card);
    }
    .reports-table tbody tr:nth-child(even) td,
    .reports-table tbody tr:hover td{ background: transparent; }
    .reports-table td{
        display: grid;
        grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
        gap: .75rem;
        align-items: center;
        padding: .5rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .reports-table td:first-child{ width: 100%; min-width: 0; }
    .reports-table td:last-child{ border-bottom: 0; }
    .reports-table td::before{
        content: attr(data-label);
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--color-text-muted);
    }
    .reports-table td > *{ grid-column: 2; }
    .reports-table__period{ min-width: 0; }
    .reports-table td[data-table-action]{ display: block; }
    .reports-table td[data-table-action]::before{ content: none; }
    .reports-table__actions{ flex-direction: row; flex-wrap: wrap; }
    .reports-table__actions .button{ width: auto; }
}
/* Celular (recuadro de 400 px o menos): la etiqueta va encima del dato para que las fechas quepan
   completas. Con ".table--cards" para ganarle a las reglas generales de tablas en celular. */
@container reports (max-width: 400px){
    .reports-table .table--cards td{ grid-template-columns: minmax(0, 1fr); gap: .35rem; }
    .reports-table .table--cards td[data-label] > *{ grid-column: 1; justify-self: stretch; }
    .reports-table__period{ grid-template-columns: auto minmax(0, 1fr); }
}
.reports-table__hint{ position: sticky; left: 0; margin: .75rem 0 0; font-size: .85rem; color: var(--color-text-muted); }

/* Evidencias fotográficas (panel): la foto limpia arriba; proyecto, código, clasificación y fecha debajo. */
/* Lista de proyectos de Evidencias: "Fotos" y "Última foto" son datos cortos; sin los 190 px mínimos
   de cada columna, la tabla cabe completa con el botón "Ver evidencias". */
.evidence-projects th:nth-child(3), .evidence-projects td:nth-child(3),
.evidence-projects th:nth-child(4), .evidence-projects td:nth-child(4){ min-width: 0; white-space: nowrap; }
.evidence-projects td:first-child{ min-width: 240px; }
/* Documentos: el enlace completo, partido donde haga falta para no salirse de la tarjeta. */
.document-card__link{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    margin: .25rem 0;
    font-size: .9rem;
    color: var(--color-primary);
    overflow-wrap: anywhere;
}
.document-card__actions{ display: flex; gap: .5rem; margin-top: .5rem; }
/* Documentos en tabla (2026-11-05): el enlace largo va pequeño debajo de "Abrir en SECOP", para comprobarlo sin que ocupe la fila. */
.documents-table td{ vertical-align: top; }
.documents-table td:first-child{ min-width: 220px; }
.documents-table__project{ display: block; margin-top: .2rem; font-size: .85rem; color: var(--color-text-muted); }
.documents-table__link{ display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.documents-table td:nth-child(2){ min-width: 240px; }
.documents-table__url{ display: block; max-width: 38ch; font-size: .75rem; color: var(--color-text-muted); overflow-wrap: anywhere; }
.documents-table__muted{ font-size: .85rem; color: var(--color-text-muted); }
.documents-table td:nth-child(4){ white-space: nowrap; }
.evidence-card__tags{ display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.evidence-card__actions{ display: flex; gap: .5rem; margin-top: .5rem; }

/* Botones junto al título de una página (p. ej. Editar / Eliminar rol). */
.heading-actions{
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
/* Detalle de rol: permisos agrupados por módulo. */
.role-permissions__module{
    margin: 0 0 .4rem;
    font-size: 1rem;
    color: var(--color-text-main);
}
.role-permissions__list{
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .9rem;
    color: var(--color-text-main);
}
.role-permissions__list li{
    display: flex;
    gap: .4rem;
    padding: .2rem 0;
}
.role-permissions__list i{ color: var(--color-primary); }

.grid{
    display: grid;
    /* 340 px: una columna en celular, dos en tableta, tres o más en computador. */
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 1rem;
}
.grid--sm{
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
/* Cifras del inicio: son cuatro y datos cortos. Dos por fila o las cuatro juntas, nunca una sola abajo. */
.grid--stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media screen and (min-width: 900px){
    .grid--stats{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* .card-text corta a tres líneas con "…": en una cifra no se puede cortar lo que la explica. */
.grid--stats .card-text{ display: block; max-width: none; overflow: visible; overflow-wrap: anywhere; }
@media screen and (max-width: 600px){
    .grid--stats .card-body{ padding: .85rem; }
    .grid--stats .card-text{ font-size: .8rem; }
    /* En dos columnas angostas el ícono (decorativo) partía "REGISTRADOS": se oculta y el texto usa todo el ancho. */
    .grid--stats .card-absolute{ display: none; }
    .grid--stats .card-absolute + .card-body > .card-text:first-child{ padding-right: 0; overflow-wrap: normal; }
}
/* Página de acceso (2026-11-03, referencia del usuario): pantalla completa, foto a un lado y formulario
   al otro. El velo verde oscuro de abajo deja el texto blanco con 5,7:1 aun sobre los muros blancos. */
.auth-page{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-bg-card);
}
.auth-hero{
    /* Fija al bajar: si el formulario es largo, la foto y su texto siguen a la vista. */
    position: sticky;
    top: 0;
    display: flex;
    align-items: flex-end;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #025F43;
}
.auth-hero__photo{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-hero::after{
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(2, 60, 43, .2) 0%, rgba(2, 60, 43, .75) 50%, rgba(2, 60, 43, .9) 100%);
}
.auth-hero__text{
    position: relative;
    z-index: 1;
    max-width: 34rem;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    color: #ffffff;
}
.auth-hero__title{
    margin: 0 0 .5rem;
    font-family: 'Nunito Sans', Verdana, sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
}
.auth-hero__description{
    margin: 0;
    line-height: 1.55;
}
.auth-panel{
    display: flex;
    align-items: center;
    justify-content: center;
    /* A la derecha queda libre el panel de accesibilidad. */
    padding: 2rem calc(48px + 1.5rem) 2rem 1.5rem;
}
.auth-panel__content{
    width: 100%;
    max-width: 33rem;
}
.auth-panel__logo{
    display: block;
    width: 270px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1.25rem;
}
.auth-panel__back{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--color-primary);
    font-size: 1rem;
    text-decoration: none;
}
.auth-panel__back:hover{ text-decoration: underline; }
.login-form__header{ margin-bottom: 1.5rem; text-align: center; }
.login-form__header .heading-title{ margin-top: 0; font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
.login-form__header .heading-subtitle{ font-size: clamp(1rem, 1.5vw, 1.2rem); }
.auth-panel .auth-message__icon{ display: flex; margin-inline: auto; }
.auth-panel .form-group label{ font-size: 1.05rem; }
.auth-panel .form-group input:not(.two-step-code){ padding: 1.15rem 1rem; font-size: 1.1rem; }
.auth-panel .form-group .button{ min-height: 58px; font-size: 1.15rem; }
.auth-password{ position: relative; }
.auth-panel .auth-password input{ padding-right: 3.25rem; }
.auth-password .password-toggle{
    position: absolute;
    top: 50%;
    right: .25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius-card);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transform: translateY(-50%);
}
.auth-password .password-toggle:hover{ color: var(--color-primary); }
.auth-panel .auth-forgot{ display: flex; justify-content: flex-end; margin: -.5rem 0 .5rem; font-size: 1rem; }
.auth-help{
    margin: 0;
    color: var(--color-text-muted);
    font-size: .95rem;
    line-height: 1.5;
    text-align: center;
}
/* Mensajes de recuperar la contraseña (2026-10-31): ícono, pasos en lista y un botón. */
.auth-message__icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 50%;
    font-size: 1.6rem;
    color: var(--color-primary);
    background: #E6F4EA;
}
.auth-message__icon--warning{ color: #664D03; background: #FFF3CD; }
.auth-steps{ display: grid; gap: .75rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.auth-steps li{ display: flex; gap: .65rem; align-items: flex-start; color: var(--color-text-main); }
.auth-steps i{ flex: 0 0 auto; margin-top: .15rem; color: var(--color-primary); }
/* Código de verificación en dos pasos: grande y espaciado, fácil de leer y de escribir. */
.two-step-code{ font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.two-step-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.two-step-actions .button:disabled{ opacity: .6; cursor: not-allowed; }
/* Tiempo que le queda al código (60 s, pedido del usuario 2026-10-31). Verde mientras sirve, rojo al vencer. */
.two-step-timer{
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    padding: .6rem .85rem;
    border-radius: var(--border-radius-card);
    color: #0F5132;
    background: #E6F4EA;
    font-variant-numeric: tabular-nums;
}
.two-step-timer--expired{ color: #842029; background: #F8D7DA; }
@media screen and (max-width: 860px){
    /* Celular y tableta: la foto se reduce a una franja para que el formulario aparezca de inmediato. */
    .auth-page{ grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .auth-hero{ position: relative; height: 130px; }
    .auth-hero__text{ padding: 1rem 1.25rem; }
    .auth-hero__title{ margin: 0; font-size: 1.5rem; }
    .auth-hero__description{ display: none; }
    /* Abajo queda libre el panel de accesibilidad, que en celular va en fila. */
    .auth-panel{ align-items: flex-start; padding: 1.5rem 1.25rem 5rem; }
}

.progress{
    display: flex;
    width: 100%;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    z-index: 1;
    position: relative;
    margin: .5rem 0;
}
.progress-label{
    position: absolute;
    padding: 0 .5rem;
    font-size: .75rem;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-main);
    /* Fondo propio: el texto queda legible tanto sobre el verde como sobre el gris de la barra. */
    background: rgba(255, 255, 255, .92);
    border-radius: .2rem;
}
.progress-value{
    width: 400px;
    height: 100%;
    background: var(--color-primary);
}

.card {
    display: block;
    background: var(--color-bg-card);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

a.card{text-decoration: none;}

.card-absolute{
    position: absolute;
    top: .5rem;
    right: .5rem;
}

/* Variantes de tarjeta (rediseño 2026-10-29): el color va en el ícono; la franja lateral
   solo se conserva en advertencia y peligro, donde marca un estado real. */
.card--success .card-icon {
    background-color: #e6f4ea;
    color: #0f5132;
}
.card--success .card-title {color: #0f5132;}
.card--success .card-text {color: #198754;}


.card--warning {
    border-left: .3rem solid #d39e00;
}
.card--warning .card-icon {
    background-color: #fff3cd;
    color: #664d03;
}
.card--warning .card-title { color: #664d03; }
.card--warning .card-text { color: #8A6803; } /* 5,2:1 sobre blanco (antes #997404, 4,3:1; revisión axe 2026-11-09) */

/* --- INFO (Información / gris pizarra: el azul queda solo para las franjas GOV.CO) --- */
.card--info .card-icon {
    background-color: #e2e8f0;
    color: #334155;
}
.card--info .card-title { color: #334155; }
.card--info .card-text { color: #475569; }

.card--danger {
    border-left: .3rem solid #b02a37;
    background-color: #fff8f8;
}
.card--danger .card-icon {
    background-color: #f8d7da;
    color: #842029;
}
.card--danger .card-title { color: #842029; }
.card--danger .card-text { color: #b02a37; }

/* --- PRIMARY: verde institucional (DESIGN.md), antes azul de Bootstrap --- */
.card--primary .card-icon {
    background-color: #e3f3ec;
    color: var(--color-primary);
}
.card--primary .card-title { color: var(--color-primary-hover); }
.card--primary .card-text { color: var(--color-primary); }

.card--secondary .card-icon {
    background-color: #e2e8f0;
    color: #475569;
}
.card--secondary .card-title { color: #475569; }
.card--secondary .card-text { color: #64748b; }

/* Solo las tarjetas que son enlaces reaccionan al pasar el mouse (MOTION 1: hover y foco). */
a.card:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  border-color: var(--color-primary);
}
/* Tarjeta de cifra (ícono arriba, etiqueta .card-text y luego la cifra .card-title):
   la cifra es lo más visible; la etiqueta, pequeña y en gris. */
.card-absolute + .card-body > .card-text:first-child{
    font-family: Verdana, sans-serif;
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .02em;
    color: var(--color-text-muted);
    padding-right: 3rem;
}
.card-absolute + .card-body > .card-text:first-child + .card-title{
    /* Montos largos (p. ej. la inversión total) pueden partirse en vez de salirse de la tarjeta. */
    overflow-wrap: anywhere;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.1;
}
.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
}

.card-image{
    width: 100%;
    height: auto;
    aspect-ratio: 7 / 3;
    object-fit: cover;
}
/* Portada de un proyecto sin foto: el sector en verde institucional sobre un verde muy claro
   (texto #03785A sobre #E8F3EE, 4,82:1 medido), con la misma proporción que una foto. */
.card-cover{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    aspect-ratio: 7 / 3;
    background: #E8F3EE;
    color: var(--color-primary);
    font-family: "Nunito Sans", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.card-cover i{ font-size: 1.6rem; }

/* Título de la Tarjeta */
.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.3;
}

.card-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
    min-height: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title,
.card-text{
    max-width: 90%;
}
.card-icon{
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}



.card-news{
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.card-news-absolute{
    position: absolute;
    left: .5rem;
    top: .5rem;
}
.card-news--featured{
    grid-column: 1 / -1;
}
.card-news-image{
    max-width: 700px;
    width: 100%;
    min-height: 200px;
    object-fit: cover;
    aspect-ratio: 7 / 5;
}

.card-news-content{
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-news-body,
.card-news-footer{
    padding: 1rem;
    display: flex;
    gap: .5rem;
}
.card-news-body{flex-direction: column;}
.card-news-footer{
    align-items: center;
    justify-content: space-between;
    font-size: .85rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}
.card-news-footer .button{
    font-size: .9rem;
}
/* Sin autor, el pie solo lleva "Leer más", alineado a la derecha. */
.card-news-footer--end{ justify-content: flex-end; }
.dropdown{
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
/* Encabezado de grupo del menú lateral: es un <button> (se abre con teclado), sin aspecto de botón. */
.dropdown-header{
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    text-align: left;
}
.dropdown-header:focus-visible{
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.dropdown-header i:last-child{ transition: transform .2s ease-in-out; }
.dropdown-content{
    padding-left: 1.5rem;
    overflow: hidden;
    height: 0;
    transition: height .2s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.dropdown-content-item,
.dropdown-content .nav-link{
    gap: .5rem;
    padding: .8rem;
    font-size: .95rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dropdown-content .nav-link:hover{
    background: var(--color-bg-main);
    color: var(--color-primary);
}

/* Modal */
.modal{
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(10 10 10 / 0.42);
    z-index: 10;
    padding: max(1rem, 8vw);
    overflow: auto;
}
.modal.is-open{display: block;}
.modal-content{
    margin: 0 auto;
    background: var(--color-bg-card);
}

.dropdown-content .nav-link::before{
    content: '\F28A';
    font-family: bootstrap-icons;
    font-size: .8rem;
    text-align: center;
    margin-right: .5rem;
}
.dropdown-header i:last-child{margin-left: auto;}
.dropdown.active .dropdown-header i:last-child{
    transform: rotate(180deg);
    transition: transform .2s ease-in-out;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 0.5rem;
    margin: 0 0 .5rem;
    padding: 0;
}

.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* Alto mínimo para tocar con el dedo (R-03). */
    min-height: 44px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}


.breadcrumbs-item:not(:last-child):hover {
    color: var(--color-primary-hover);
}

.breadcrumbs-item:last-child {
    color: var(--color-text-muted, #6c757d);
    pointer-events: none;
}

/* Separador dinámico */
.breadcrumbs-item:not(:last-child)::after {
    content: '/';
    color: #9ca3af; /* Color independiente para el separador */
    font-weight: 400; /* Evita que el separador se vea muy grueso */
}


.permission-layout{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80dvh;
    padding: 1vw;
}

.permission-header{
    display: flex;
    align-items: center;
    gap: 1rem;
}
.permission-header i{
    font-weight: 600;
    font-size: 2rem;
    display: inline-flex;
    padding: 1rem;
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
}
.permission-error{
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .2rem;
    display: inline-flex;
}
.permission-content{
    max-width: 600px;
    width: 100%;
    padding: max(2.5vw, 2rem);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
}

.permission-footer{
    display: flex;
    align-items: center;
    justify-content: end;
    gap: .5rem;
}

.permission-description,
.permission-header,
.permission-footer{
    margin-bottom: 1.5rem;
}

.permission-content--warning .permission-header i{
    color: var(--warning-text);
    background: var(--warning-bg);
    border-color: currentColor;
}
.permission-content--warning .permission-error{color: var(--warning-text);}


.project-layout{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.project-description{
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--color-text-main);
    margin: 1rem 0;
}
.project-description p{
    margin: 1rem 0;
}
.project-display{
    width: 100%;
    aspect-ratio: 7 / 3;
    min-height: 400px;
    overflow: hidden;
    border-radius: .5rem;
}
.project-display-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-content-image{
    width: 100%;
    display: flex;
}
.project-content-image-content{
    overflow: auto;
    flex: 1;
    scrollbar-width: thin;
    display: flex;
    padding: 0 .2rem;
    gap: .2rem;
}
.project-content-image-content img{
    width: 100px;
    height: 100px;
    border: 2px solid var(--border-color);
    object-fit: cover;
    position: relative;
}
.project-content-image-content img.active{
    border-color: var(--color-primary);
}

.project-content-image-controls{
    flex: 0 0 100px;
    aspect-ratio: 1;
    height: 100%;
    cursor: pointer;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}
.project-content-image-controls i{font-size: 1.2rem;}

.transparency-list{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.transparency-item{
    background: var(--color-bg-card);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}
.transparency-top-header{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.transparency-header{
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border-bottom: 1px solid var(--border-color);
    margin: .5rem 0;
    padding: 1rem 0;
}
.transparency-header h2{
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: var(--color-text-main);
}
.transparency-header p{
    font-size: 1rem;
    color: var(--color-text-muted);
}
.transparency-facts{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.transparency-facts dt{ font-size: .8rem; color: var(--color-text-muted); }
.transparency-facts dd{ margin: .15rem 0 0; font-weight: 700; color: var(--color-text-main); }
.transparency-facts .meter{ display: block; margin-top: .35rem; }
.transparency-actions{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.transparency-actions__note{ margin: 0; font-size: .9rem; color: var(--color-text-muted); }
/* End utilities */


/* Brand */

.mintic{
    width: 100%;
    /* Mismo ancho centrado que el encabezado y el menú. */
    padding: .7rem var(--page-pad-right) .7rem var(--page-pad-left);
    background: var(--color-gov-blue);
}
.mintic a{text-decoration: none;}
.mintic__image{
    width: 90px;
    object-fit: cover;
}

/* Barra de accesibilidad según la guía GOV.CO de MinTIC (2026-11-06, decisión del usuario: azul GOV.CO, una
   excepción a DESIGN.md porque es un componente oficial). Azul oscuro #004884 (9,4:1 con blanco) y, al señalar
   un botón, su nombre se despliega hacia la izquierda en azul #3366CC (5,4:1) con un efecto suave. */
.mintic-controls{
    --mintic-dark: #004884;
    --mintic-light: #3366CC;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    width: 52px;
    padding: .25rem 0;
    background: var(--mintic-dark);
    border-bottom-left-radius: .6rem;
    border-top-left-radius: .6rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    z-index: 111;
}
.mintic-controls > button,
.mintic-controls > a{
    /* 44px: tamaño táctil mínimo (R-03). */
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    background: transparent;
    color: #ffffff;
    border: 0;
    border-radius: .45rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease-in-out;
}
.mintic-controls__glyph{ font-family: "Nunito Sans", sans-serif; font-size: 1.1rem; font-weight: 700; line-height: 1; }
.mintic-controls__glyph sup{ font-size: .7em; margin-left: 1px; }
.mintic-controls > :is(button, a):hover,
.mintic-controls > :is(button, a):focus-visible,
.mintic-controls > button[aria-pressed="true"]{
    background: var(--mintic-light);
}
.mintic-controls > button[aria-pressed="true"]{ box-shadow: inset 0 0 0 2px #ffffff; }
.mintic-controls > :is(button, a):focus-visible{
    outline: 3px solid #ffffff;
    outline-offset: -3px;
}
/* El nombre siempre existe para lectores de pantalla (es el nombre del botón); al señalar o llegar con el
   teclado se despliega hacia la izquierda pegado al botón, como en la guía. */
.mintic-controls > :is(button, a) > span:not(.mintic-controls__glyph){
    position: absolute;
    top: 0;
    right: 100%;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 .9rem 0 .75rem;
    white-space: nowrap;
    font-family: Verdana, sans-serif;
    font-size: .85rem;
    color: #ffffff;
    background: var(--mintic-light);
    border-radius: .45rem 0 0 .45rem;
    pointer-events: none;
    clip-path: inset(0 0 0 100%);
    transition: clip-path .25s ease-in-out;
}
.mintic-controls > :is(button, a):hover > span:not(.mintic-controls__glyph),
.mintic-controls > :is(button, a):focus-visible > span:not(.mintic-controls__glyph){
    clip-path: inset(0);
}
@media (prefers-reduced-motion: reduce){
    .mintic-controls > :is(button, a),
    .mintic-controls > :is(button, a) > span{ transition: none; }
}

/* Encabezado del portal (imagen de referencia del usuario, 2026-10-29):
   marca a la izquierda; "Iniciar sesión" sobre el buscador a la derecha. */
.site-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    /* Contenido centrado (pedido del usuario). */
    padding: .6rem var(--page-pad-right) .6rem var(--page-pad-left);
    background: var(--color-bg-card);
}
.site-header .brand{ flex: 1 1 auto; min-width: 0; }
.site-header__actions{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
    flex: 0 0 280px;
}
.site-header__actions .search-component{ width: 100%; flex: initial; }
.site-header__actions .search-component input{ height: 44px; font-size: .9rem; }
/* Botón del buscador en el verde institucional: solo lleva un ícono (contraste 4,09:1, basta 3:1). */
.site-header__actions .search-component button{
    width: 44px;
    height: 44px;
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #ffffff;
}
.site-header__actions .search-component button:hover{ background: var(--color-primary-hover); }
.site-header__login{
    color: var(--color-text-main);
    text-decoration: none;
    padding: .35rem 0;
    min-height: 44px;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
}
.site-header__login:hover,
.site-nav__login:hover{ color: var(--color-primary); text-decoration: underline; }
.site-nav__login{
    display: none;
    align-items: center;
    min-height: 44px;
    font-size: .9rem;
    color: var(--color-text-main);
    text-decoration: none;
}
.site-nav__login:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.brand{
    display: flex;
    gap: 1.25rem;
    /* El logo y el nombre siempre juntos: el texto se parte en líneas antes que bajar debajo del logo. */
    flex-wrap: nowrap;
    align-items: center;
    color: inherit;
    text-decoration: none;
}
.brand__image{
    /* Alto fijo como en la imagen de referencia; el ancho se ajusta al logo. */
    width: auto;
    max-width: 60vw;
    height: 56px;
    object-fit: contain;
}
.brand__info{
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}
.brand__description{
    font-size: .85rem;
    color: var(--color-text-muted);
}
.brand__name{
    text-transform: uppercase;
    color: var(--color-primary);
    font-family: "Nunito Sans", sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    font-weight: 700;
    line-height: 1.2;
}


.search-component{
    flex: 1 1 350px;
    position: relative;
    display: flex;
    align-items: center;
}
.search-component label{
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .5rem;
}
.search-component input{
    width: 100%;
    height: 50px;
    padding: .3rem 1rem;
    font-size: 1rem;
    color: var(--color-text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    outline: none;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    background: transparent;

}

/* Con dos filtros, el buscador baja de fila antes de quedar tan angosto que no se lee (tableta, panel con menú). */
.search-component:has(select ~ select){ flex-wrap: wrap; }
.search-component:has(select ~ select) input{ flex: 1 1 220px; min-width: 0; }
.search-component:has(select ~ select) select{ flex: 1 1 160px; min-width: 0; }
/* Celular: si el buscador trae un filtro, el texto va en su propia fila y el filtro con el botón debajo. */
@media screen and (max-width: 600px){
    .search-component:has(select){ flex-wrap: wrap; }
    .search-component:has(select) input{ flex: 1 1 100%; border-radius: var(--border-radius-card); }
    .search-component:has(select) select{ flex: 1 1 0; min-width: 0; }
    /* Con dos filtros, cada uno en su fila: lado a lado se cortaba el texto ("Todos los r…"). */
    .search-component:has(select ~ select) select{ flex: 1 1 100%; }
    .search-component:has(select ~ select) button{ flex: 1 1 100%; width: 100%; }
}
/* Filtro desplegable junto al buscador (p. ej. estado de contratos). */
.search-component select{
    height: 50px;
    padding: 0 .75rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.search-component button{
    width: 50px;
    height: 50px;
    padding: .3rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--color-primary);
    color: var(--color-bg-main);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transition: background-color .2s ease-in-out;
}
.search-component button:active,
.search-component button:hover{
    background-color: var(--color-primary-hover);
}

/* End brand */


/* Header and Nav */

/* Menú principal del portal: barra gris clara, pestaña activa en verde (DESIGN.md). */
.site-nav{
    background: var(--color-bg-main);
    border-bottom: .12rem solid var(--color-brand);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-nav__inner{
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    /* Mismo ancho centrado que el encabezado. */
    padding: .25rem var(--page-pad-right) .25rem var(--page-pad-left);
}
/* Botón "Menú": solo en celular (en computador todas las opciones están en la barra). */
.site-nav__toggle{
    display: none;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0 1rem;
    font-size: 1rem;
    color: var(--color-text-main);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: .2rem;
    cursor: pointer;
}
.site-nav__toggle:hover{ background: var(--color-bg-card); color: var(--color-primary); }
.site-nav__menu{
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .15rem 0;
    width: 100%;
    margin: 0;
    padding: 0;
}
.site-nav__menu > li{ position: relative; }
.site-nav__link{
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    /* Letra pequeña (pedido del usuario); 44 px de alto para tocar con el dedo. */
    padding: .5rem .45rem;
    font-size: .85rem;
    white-space: nowrap;
    font-family: inherit;
    color: var(--color-text-main);
    background: transparent;
    border: 1px solid transparent;
    border-radius: .2rem;
    text-decoration: none;
    cursor: pointer;
}
.site-nav__link:hover{ background: var(--color-bg-card); color: var(--color-primary); }
.site-nav__link.is-active{ background: var(--color-primary); color: #ffffff; }
.site-nav__link.is-active:hover{ background: var(--color-primary-hover); color: #ffffff; }
.site-nav__link:focus-visible,
.site-nav__toggle:focus-visible,
.site-nav__submenu a:focus-visible,
.site-header__login:focus-visible{
    outline: 3px solid var(--color-text-main);
    outline-offset: 2px;
}
.site-nav__link .bi-chevron-down{ font-size: .75rem; }
.site-nav__link[aria-expanded="true"] .bi-chevron-down{ transform: rotate(180deg); }
.site-nav__submenu{
    list-style: none;
    position: absolute;
    top: calc(100% + .25rem);
    left: 0;
    min-width: 260px;
    margin: 0;
    padding: .35rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-card); /* Eleva el submenú sobre el contenido para que se lea como capa. */
    z-index: 110;
}
.site-nav__submenu[hidden]{ display: none; }
.site-nav__submenu a{
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .75rem;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: .2rem;
}
.site-nav__submenu a:hover{ background: var(--color-bg-main); color: var(--color-primary); }
.site-nav__submenu a[aria-current="page"]{ color: var(--color-primary); font-weight: 700; }

/* Tableta y portátil pequeño: el encabezado conserva sus dos columnas y las opciones siguen en la barra. */
@media screen and (max-width: 1024px){
    .site-header{ padding: .6rem 1rem; }
    .site-header__actions{ flex-basis: 260px; }
    .site-nav__inner{ padding: .25rem 1rem; }
    /* Panel de accesibilidad: franja fija abajo, a todo el ancho. En una esquina tapaba lo que había debajo. */
    .mintic-controls{
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: .5rem;
        width: auto;
        border-radius: 0;
    }
    .mintic-controls{ padding: .25rem; }
    /* En la franja de abajo el nombre sale hacia arriba del botón. */
    .mintic-controls > :is(button, a) > span:not(.mintic-controls__glyph){
        top: auto;
        right: auto;
        bottom: calc(100% + .35rem);
        left: 50%;
        transform: translateX(-50%);
        border-radius: .45rem;
        clip-path: inset(100% 0 0 0);
    }
    .mintic-controls > :is(button, a):hover > span:not(.mintic-controls__glyph),
    .mintic-controls > :is(button, a):focus-visible > span:not(.mintic-controls__glyph){ clip-path: inset(0); }
    /* El panel ya no está a la derecha: márgenes iguales a los dos lados. */
    .mintic,
    .section{ padding-left: 1rem; padding-right: 1rem; }
    /* La franja inferior reserva el alto del panel fijo para que no tape los logos. */
    .footer + .mintic{ padding-bottom: calc(.7rem + 52px); }
    .auth-panel{ padding-bottom: 4rem; }
    .button--fixed{ bottom: calc(44px + .5rem); }
}
/* Celular: el encabezado se compacta para que el contenido se vea sin bajar tanto. */
@media screen and (max-width: 760px){
    .mintic{ padding-block: 0; }
    .site-header{ flex-wrap: wrap; gap: .5rem 1rem; }
    .site-header .brand{ flex: 1 1 100%; flex-wrap: nowrap; gap: .75rem; }
    .brand__image{ height: 44px; max-width: 34vw; }
    .brand__info{ min-width: 0; }
    .brand__description{ font-size: .8rem; }
    .site-header__actions{ flex: 1 1 100%; }
    .site-header__login{ display: none; }
    .site-nav__inner{ flex-wrap: wrap; justify-content: space-between; padding: .25rem 1rem; }
    .site-nav__toggle{ display: inline-flex; order: -2; }
    .site-nav__login{ display: inline-flex; order: -1; }
    .site-nav__menu{ display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding: .35rem 0; max-height: calc(100dvh - 60px); overflow-y: auto; }
    .site-nav__menu.is-open{ display: flex; }
    .site-nav__link{ width: 100%; justify-content: space-between; text-align: left; white-space: normal; }
    .site-nav__submenu{ position: static; box-shadow: none; min-width: 0; margin: .25rem 0 .25rem 1rem; }
}
/* Pantallas muy bajas (celular acostado): la barra fija ya no le quita espacio al contenido. */
@media screen and (max-height: 500px){
    .site-nav{ position: static; }
    .mintic{ padding-block: 0; }
    /* El menú del panel baja completo, con la cuenta al final: fija, dejaba espacio para dos opciones. */
    html .sidebar .overlay-content{ overflow-y: auto; padding-bottom: 44px; }
    html .sidebar .sidebar-menu{ flex: none; overflow: visible; }
}
@media (prefers-reduced-motion: reduce){
    .site-nav__link .bi-chevron-down{ transition: none; }
}
.header__nav,
.nav{
    display: flex;
    gap: .5rem;
}
.nav--column{flex-direction: column;}
.header__nav{
    justify-content: space-between;
    display: none;
}

.header__nav .button{
    background: var(--color-bg-main);
    color: var(--color-primary-hover);
    border-color: transparent;
}
.header__nav .nav-link{
    display: inline-flex;
    flex: 0 0 200px;
    justify-content: center;
}

.dropdown-header,
.nav-link{
    display: flex;
    gap: .5rem;
    padding: .8rem 1rem;
    font-size: clamp(.9rem, 2vw, 1rem);
    background: var(--color-bg-main);
    color: var(--color-text-main);
    text-decoration: none;
    transition:
            background-color .2s ease-in-out,
            color .2s ease-in-out
    ;
    border-radius: .2rem;
    align-items: center;
    border: 1px solid transparent;
}
button.nav-link{cursor: pointer;}
.nav-link.active{
    background: var(--color-primary);
    color: var(--color-bg-main);
}
.nav-link:hover{background: var(--color-bg-card); color: var(--color-primary);}
.nav-link.active:hover{background: var(--color-primary-hover); color: var(--color-bg-card);}
/* End header and nav */


/* Badge */
/* --- ESTILOS BASE PARA BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.75em;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 50rem;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* --- BADGE SUCCESS (Éxito / Verde) --- */
.badge--planning,
.badge--success {
    background-color: #e6f4ea;
    color: #0f5132;
    border: 1px solid #d1e7dd;
}

/* --- BADGE WARNING (Advertencia / Amarillo) --- */
.badge--warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

/* --- BADGE INFO (Información / gris pizarra) --- */
.badge--info {
    background-color: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}

/* --- BADGE DANGER (Peligro / Rojo) --- */
.badge--danger {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* --- BADGE PRIMARY (Principal / verde institucional) --- */
.badge--primary {
    background-color: #e3f3ec;
    color: var(--color-primary-hover);
    border: 1px solid #b8e0cf;
}

/* --- BADGE SECONDARY (Neutro / Gris) --- */
.badge--secondary {
    background-color: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Button */
/* Botón Base */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  min-width: 45px;
  min-height: 45px;
  font-family: inherit;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-main);
  background-color: var(--color-bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-card);
  outline: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
.button--fixed{
    position: fixed;
    z-index: 99;
    right: .5rem;
    bottom: .5rem;
    display: none;
}
.button:hover {
  background-color: var(--color-bg-main);
  border-color: #cbd5e1;
}

.button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.button:disabled,
.button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.button i,
.button svg {
  font-size: 1.15em;
  flex-shrink: 0;
}

/* Outline Primary */
.button-outline--primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}

.button-outline--primary:hover {
  color: #ffffff;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Outline CRUD Actions */
.button-outline--create {
  color: var(--crud-create-bg);
  background-color: transparent;
  border-color: var(--crud-create-bg);
}
.button-outline--create:hover {
  color: var(--crud-create-text);
  background-color: var(--crud-create-bg);
}

.button-outline--delete {
  color: var(--crud-delete-bg);
  background-color: transparent;
  border-color: var(--crud-delete-bg);
}
.button-outline--delete:hover {
  color: var(--crud-delete-text);
  background-color: var(--crud-delete-bg);
}
/* Inactivar: se puede deshacer, así que no va en el rojo de Eliminar (2026-11-03). */
.button-outline--warning {
  color: #92400E;
  background-color: transparent;
  border-color: #92400E;
}
.button-outline--warning:hover {
  color: #FFFFFF;
  background-color: #92400E;
}

.button--primary {
  color: #ffffff;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.button--primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
/* En alto contraste el verde es brillante: el texto blanco no se leía. */
:root.high-contrast .button--primary{ color: #000000; }
/* End button */


/* Hero */
.hero{width: 100%;}
.hero .swiper{
    width: 100%;
    /* Proporción de los banners institucionales (1920 x 600): se ven completos, sin recortes. */
    aspect-ratio: 16 / 5;
}
.hero .swiper img{
    object-fit: cover;
}
/* Banner con enlace (2026-11-30): el enlace es la diapositiva y la imagen lo llena. */
.hero .hero-slide{ display: block; }
.hero .hero-slide img{ display: block; width: 100%; height: 100%; }
.hero .hero-slide:focus-visible{ outline: 4px solid #ffffff; outline-offset: -8px; box-shadow: inset 0 0 0 8px rgb(0 0 0 / .64); }

/* Contenedor circular personalizado */
.swiper-button-prev,
.swiper-button-next {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 45px !important;
  height: 45px !important;
  background-color: rgb(0 0 0 / 0.64);
  border-radius: 50%;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-in-out;
}

/* Efecto Hover */
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background-color: var(--color-primary);
  color: var(--color-bg-main);
  border-color: var(--color-primary) !important;
  box-shadow: var(--shadow-card);
}

/* Eliminar el icono por defecto de Swiper */
.swiper-button-next::after,
.swiper-button-prev::after {
  content: '' !important;
}

/* Opción A: Inyectar iconos con Bootstrap Icons vía CSS pseudo-elementos */
.swiper-button-prev::before {
  content: "\F12C"; /* Unicode para bi-chevron-left */
  font-family: "bootstrap-icons";
  font-size: 1.2rem;
  font-weight: bold;
}

.swiper-button-next::before {
  content: "\F135"; /* Unicode para bi-chevron-right */
  font-family: "bootstrap-icons";
  font-size: 1.2rem;
  font-weight: bold;
}

/* Franja de controles del carrusel (2026-11-06, imagen del usuario): franja oscura semitransparente sobre
   el borde de abajo del banner, con Detener/Reproducir a la izquierda, los puntos al centro y las flechas a
   la derecha. En celular va debajo de la imagen, porque encima taparía casi todo el banner. */
.hero{ position: relative; }
.hero-bar{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 1rem;
    color: #ffffff;
    background: rgba(17, 24, 39, .62);
}
.hero-bar__play{
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: 0 .75rem;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: .4rem;
    cursor: pointer;
}
.hero-bar__play:hover{ background: rgba(255, 255, 255, .16); }
.hero-bar__dots{ display: flex; align-items: center; justify-content: center; gap: .25rem; }
/* Cada punto mide 12 px, pero se toca en 44 x 44 px. */
.hero-bar__dots .swiper-pagination-bullet{
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    background: transparent;
    border: 0;
    border-radius: 50%;
    opacity: 1;
    cursor: pointer;
}
.hero-bar__dots .swiper-pagination-bullet::after{
    content: '';
    position: absolute;
    inset: 16px;
    background: rgba(255, 255, 255, .55);
    border-radius: 50%;
}
.hero-bar__dots .swiper-pagination-bullet-active::after{ background: #ffffff; inset: 15px; }
.hero-bar__arrows{ justify-self: end; display: flex; gap: .25rem; }
.hero-bar__arrow{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.hero-bar__arrow:hover{ background: rgba(255, 255, 255, .16); }
.hero-bar button:focus-visible{ outline: 3px solid #ffffff; outline-offset: -3px; }
/* Flechas redondas a los lados del banner (2026-11-06, imágenes del usuario), como las de los logos. */
.hero-arrow{
    position: absolute;
    top: calc(50% - 24px);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-size: 1.15rem;
    color: #ffffff;
    background: rgb(0 0 0 / .64);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transform: translateY(-50%);
    cursor: pointer;
    transition: background-color .2s ease;
}
.hero-arrow:hover{ background: var(--color-primary); }
.hero-arrow:focus-visible{ outline: 3px solid #ffffff; outline-offset: 2px; box-shadow: 0 0 0 5px rgb(0 0 0 / .64); }
.hero-arrow--prev{ left: 1rem; }
.hero-arrow--next{ right: 1rem; }
/* Con las flechas a los lados, la franja solo lleva Detener/Reproducir y los puntos. */
.hero-bar__arrows{ visibility: hidden; }
/* En computador el panel de accesibilidad va fijo en el borde derecho: la flecha derecha queda a su izquierda. */
@media screen and (min-width: 1025px){
    .hero-arrow--next{ right: calc(48px + 1rem); }
}
@media screen and (max-width: 600px){
    .hero-arrow{ display: none; }
    .hero-bar__arrows{ visibility: visible; }
}
@media screen and (max-width: 600px){
    .hero-bar{ position: static; padding: 0 .5rem; background: #1F2933; }
    .hero-bar__play span{ font-size: .9rem; }
}
/* End hero */

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}
/* Aviso que es un enlace (alertas del tablero): todo el texto es área de toque de 44 px. */
.alert > a{
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
}
.alert i,
.alert svg {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert--success {
    background-color: var(--crud-create-text);
    color: var(--crud-create-bg);
}

.alert--info {
    background-color: var(--crud-read-text);
    color: var(--crud-read-bg);
}

.alert--warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

/* Errores y alertas críticas (se usaba en plantillas pero no tenía estilo). */
.alert--danger {
    background-color: var(--crud-delete-text);
    color: var(--crud-delete-bg);
}

.alert--info,
.alert--success,
.alert--warning,
.alert--danger{
    border-color: currentColor;
}



/* End alert */


/* Form */

.form-layout{
    width: 100%;
    background: var(--color-bg-card);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
}

.form-header,
.form-body,
.form-footer{
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-body ul{
    padding: 1rem;
    font-size: .96rem;
    list-style: none;
}
.form-body li{margin: .3rem 0; padding-left: .5rem}
.form-body li::marker{
    content: '\F26B';
    font-family: bootstrap-icons;
    align-items: center;
}

.form-body__title{
    font-size: clamp(1.2rem, 2vw, 1.3rem);
    margin: 1rem 0;
}
/* Subsecciones del formulario de proyectos ("Datos básicos del contrato", "CDP y RGP"). */
.form-body__subtitle{
    margin: 1.5rem 0 .5rem;
    padding-top: 1rem;
    font-size: 1.05rem;
    color: var(--color-text-main);
    border-top: 1px solid var(--border-color);
}
.form-body__title + .heading-subtitle,
.form-body__subtitle + .heading-subtitle{ margin-bottom: 1rem; }
/* Doble clase: .form-grid se define más abajo y si no, su regla de columnas gana. */
/* Tipo de identificación + número, lado a lado dentro de una celda. */
.form-grid.form-grid--pair{ grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .75rem; }
/* Número, fecha y valor del CDP y del RGP en una fila. */
.form-grid.form-grid--three{ grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
/* En el bloque del contrato el último campo no se estira a todo el ancho. */
.form-grid.form-grid--contract > .form-group:last-child:nth-child(n){ grid-column: auto; }
.form-footer{
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: end;
}

/* Redes sociales en Información institucional (2026-11-03): una fila por red. */
.social-rows{ display: grid; gap: .75rem; margin-top: .75rem; }
.social-row{
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 2fr) auto;
    gap: .75rem;
    align-items: start;
    min-width: 0;
    margin: 0;
    padding: .75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.social-row .form-group{ margin-bottom: 0; }
.social-row__options{ display: flex; flex-direction: column; gap: .25rem; justify-content: center; align-self: center; }
.social-add{ margin: .75rem 0 1.5rem; }
@media screen and (max-width: 860px){
    .social-row{ grid-template-columns: minmax(0, 1fr); }
    .social-row__options{ flex-direction: row; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: flex-start; align-self: stretch; }
}
.form-grid{
    display: grid;
    gap: 1rem;
    /* 320 px: dos campos por fila en computador, uno en celular. */
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}

.form-grid .form-group:last-child:nth-child(odd){grid-column: 1 / -1;}
/* Los textos largos (descripción, objetivo) ocupan la fila completa. */
.form-grid .form-group:has(textarea){grid-column: 1 / -1;}

.form-switch,
.form-group{
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem  ;
}

.form-group-text-error{
    font-size: .8rem;
    color: var(--crud-delete-bg);
}


.form-password{
    width: 100%;
    display: flex;
    gap: .3rem;
}
.form-password .button{
    min-width: 0;
    min-height: 0;
    flex: 0 0 50px;
}

.form-group .button{width: 100%;}
.form-row{display: flex;}
.form-column{
    width: 100%;
    flex: 1;
    position: relative;
    z-index: 1;
}
.form-row__icon {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
}
.form-row:focus-within .form-row__icon {
  color: var(--color-primary);
}
.form-group label{
    font-size: 1.1rem;
    color: var(--color-text-main);
    transition: all .2s ease-in-out;
}

/* Una casilla de 24 px se toca también por su etiqueta: esta da el área de 44 px. */
.form-group:has(> input[type='checkbox']) > label,
.form-group label[for$='clear_id'],
.form-group label[for$='-clear_id']{ display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
/* Campo de archivo al editar: "Actualmente: <enlace>". Un nombre largo no parte solo y ensanchaba toda la página. */
.form-group > a{ display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.form-group input[type='file']{ max-width: 100%; }

.form-group label[data-required]::after{
    content: ' *';
    color: var(--crud-delete-bg);
}

.form-group input,
.form-group select,
.form-group textarea,
.form-row input,
.form-column input {
    width: 100%;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-main);
    background-color: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Casillas y opciones: tamaño propio (antes heredaban width 100% y quedaban de 13 px de alto). */
.form-group input[type='checkbox'],
.form-group input[type='radio']{
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}
/* Cada permiso es una fila de 44 px que se puede tocar entera (la etiqueta envuelve la casilla). */
.permission-option{
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    cursor: pointer;
}
.permission-option input{
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.form-row label,
.form-column label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  pointer-events: none; /* Permite hacer clic a través del label al input */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: transparent;
}

.form-row input:focus ~ label,
.form-row input:not(:placeholder-shown) ~ label,
.form-column input:focus ~ label,
.form-column input:not(:placeholder-shown) ~ label {
  top: .1rem;
  transform: translateY(0);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
}

.form-link{
    font-size: .85rem;
    display: inline-flex;
    min-height: 44px;
    margin-left: auto;
    text-decoration: none;
    color: var(--color-text-muted);
    transition: color .2s ease-in-out;
    align-items: center;
    gap: .5rem;
}
.form-link:hover{
    color: var(--color-primary);
    text-decoration: underline;
}


.form-switch{
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    color: var(--color-text-main);
}
.form-switch input[type='checkbox']{
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid;
    display: inline-flex;
}



/* Table */
.table-responsive{
    position: relative; /* igual que .schedule: los textos ocultos no se salen de la tabla */
    overflow-x: auto;
    width: 100%;
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
}
.table-title{
    position: sticky;
    left: 0;
    top: 0;
    padding: 1rem 0;
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 2vw, 1.4rem);

}
table{width: 100%;}
table, tr, th, td{
    border: 1px solid transparent;
    border-collapse: collapse;
}

th, td{
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    text-align: start;
    font-size: .95rem;
}

/* Encabezados de tabla en gris claro (antes negro): legibles (13:1) sin pesar más que los datos. */
th{
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .02em;
    color: var(--color-text-main);
    background: #E6EBEF;
}
thead th{ border-bottom: 2px solid #C9D2D9; }

tbody tr:hover td,
tbody tr:nth-child(even) td{
    background: var(--color-bg-main);
    color: var(--color-text-main);
}

td[data-table-action]{text-wrap: nowrap;}

/* Cada fila de una tabla con encabezado se ve como tarjeta, con el nombre de la columna (data-label) a la
   izquierda del dato. global.js pone .table--cards en celular y siempre que la tabla no quepa en su recuadro
   (tableta, portátil pequeño, letra aumentada): así nunca hay que deslizar de lado para ver los botones. */
.table--cards thead{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.table--cards,
.table--cards tbody,
.table--cards tr,
.table--cards td{ display: block; width: 100%; }
.table--cards tr{
    margin-bottom: .75rem;
    padding: .5rem .85rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.table--cards td{
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    min-width: 0;
    padding: .45rem 0;
    border-bottom: 1px solid var(--border-color);
    overflow-wrap: anywhere;
    /* Algunas columnas no parten el texto en la vista de tabla; aquí la etiqueta se montaría sobre el dato. */
    white-space: normal;
}
/* Con ".table-responsive" para ganarle a las columnas de cada pantalla que no parten el texto. */
.table-responsive .table--cards tbody td{ white-space: normal; min-width: 0; width: 100%; }
.table-responsive .table--cards tbody td > *{ max-width: 100%; min-width: 0; white-space: normal; }
.table--cards td:last-child{ border-bottom: 0; }
/* Las insignias (sector, estado) conservan su tamaño y todo el contenido va en la columna del dato. */
.table--cards td[data-label] > *{ grid-column: 2; justify-self: start; }
.table--cards tbody tr:hover td,
.table--cards tbody tr:nth-child(even) td{ background: transparent; }
.table--cards td::before{
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.table--cards td:not([data-label]){ display: block; }
.table--cards td:not([data-label])::before{ content: none; }
/* Fila de acciones: los botones en fila, sin la etiqueta "Acciones". */
.table--cards td[data-table-action]{ display: flex; flex-wrap: wrap; gap: .5rem; text-wrap: wrap; }
.table--cards td[data-table-action]::before{ content: none; }
/* La tabla ya no necesita el fondo blanco: cada fila es su propia tarjeta. */
.table-responsive:has(> .table--cards){ padding: 0; background: transparent; box-shadow: none; }
.permission-matrix.table--cards tbody th{ display: block; width: 100%; }

@media screen and (max-width: 640px){
    /* Fichas (código, sector, objetivo…): etiqueta arriba y dato debajo. */
    table:not(.table--stack):not(.schedule__table) th,
    table:not(.table--stack):not(.schedule__table) td{ display: block; width: 100%; min-width: 0; }
    table:not(.table--stack):not(.schedule__table) th{ padding-bottom: .25rem; border-bottom: 0; }
    table:not(.table--stack):not(.schedule__table) td{ padding-top: .25rem; }
}
.table-column-name{
    font-size: .9rem;
    color: var(--color-text-main);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: .3rem;
}

.pagination{
    width: 100%;
    padding: 1rem;
    position: sticky;
    left: 0;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.pagination-button{
    display: inline-flex;
    gap: .5rem;
    min-width: 44px;
    min-height: 44px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--color-bg-card);
    color: var(--color-text-main);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    padding: .5rem;
}
a.pagination-button{text-decoration: none;}
.pagination-button.active{
    background: var(--color-primary);
    color: var(--color-bg-card);
}

/* Panel admin */
.layout{
    width: 100%;
    height: 100dvh;
    display: flex;
}
.sidebar{
    flex: 0 0 290px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: var(--color-bg-card);
}
.sidebar .overlay-content{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.sidebar-footer,
.sidebar-header{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    height: 100px;
    padding: 1rem;
}

.sidebar-brand{
    display: flex;
    gap: .75rem;
    align-items: center;
    min-height: 44px;
    padding: 0 .5rem;
    color: inherit;
    text-decoration: none;
}
.sidebar-brand:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
/* Logo institucional a 40 px de alto (proporción 260 x 111 → 94 px de ancho). */
.sidebar-brand__logo{
    flex: 0 0 94px;
    width: 94px;
    height: 40px;
}
.sidebar-brand__text{
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sidebar-brand__text .brand__description{ font-size: .85rem; }
.sidebar-footer{border-color: transparent;}
.sidebar-footer-card{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    background: var(--color-bg-main);
}
.sidebar-footer-card__info{
    display: flex;
    flex-direction: column;
    flex: 1;
    font-size: .85rem;
    color: var(--color-text-muted);
}
.sidebar-footer-card__info p:first-child{
    font-weight: 700;
    margin-bottom: .1rem;
    color: var(--color-text-main);
}
.sidebar-footer-card__icon{
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 50%;
    background: var(--color-text-muted);
    color: var(--color-bg-card);
    font-size: 1.1rem;
    padding: .5rem;
}
/* Botón "Cerrar sesión": solo ícono, pero con área de toque de 44 px. */
.sidebar-footer-card button{
    font-size: 1rem;
    min-width: 44px;
    min-height: 44px;
    padding: .5rem;
}
.sidebar-menu{
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
    overflow: auto;
}
.sidebar-menu .dropdown-header,
.sidebar-menu .nav-link{
    background: var(--color-bg-card);
    color: var(--color-text-main);
    padding: .8rem 1rem;
    border-radius: .5rem;
    position: relative;
    z-index: 1;
}

.sidebar-menu .nav-link.active{
    background: #e8f5ed;
    color: var(--color-primary);
}
.sidebar-menu .nav-link.active:hover{
    background: var(--color-primary);
    color: var(--color-bg-card);
}

.sidebar-menu .nav-link:hover,
.sidebar .dropdown-header:hover{
    background: var(--color-bg-main);
    color: var(--color-text-main);
}

.sidebar-menu .nav-link.active::before{
    content: '';
    position: absolute;
    width: .4rem;
    height: 80%;
    background: var(--color-primary);
    left: 0;
    border-radius: 0 .5rem .5rem 0;
}
/* Puntos de los submenús (pedido del usuario, 2026-11-03): verdes al señalar la opción y rellenos en la
   opción seleccionada, que conserva su punto en vez de la barrita lateral. */
.sidebar-menu .dropdown-content .nav-link:hover::before,
.sidebar-menu .dropdown-content .nav-link:focus-visible::before{
    color: var(--color-primary);
}
.sidebar-menu .dropdown-content .nav-link.active::before{
    content: '\F287';
    position: static;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    color: var(--color-primary);
}
.sidebar-menu .dropdown-content .nav-link.active:hover{
    background: #e8f5ed;
    color: var(--color-primary);
}

.main{
    flex: 1;
    overflow: auto;
    /* Sin esto, los textos solo para lectores de pantalla se salen del panel y alargan toda la página. */
    position: relative;
}
.main-content{
    padding: 1.5rem 6vw;
}
/* En pantallas pequeñas el panel de accesibilidad va fijo abajo: se reserva su alto para no tapar el final. */
@media screen and (max-width: 1024px){
    .main-content{ padding: 1.25rem 1rem calc(1.5rem + 52px); }
}
.main-header{
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--border-color);
}
.main-header .button[data-parent-id]{display: none;}
.profile{
    position: relative;
    z-index: 10;
}
.profile-content{
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    z-index: 1;
    background: var(--color-bg-card);
    padding: 1rem;
    min-width: 250px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease-in-out;
}
.profile-content.is-open{
    opacity: 1;
    visibility: visible;
}

.profile-content .nav-link{
    font-size: .85rem;
    background: inherit;
}
.profile-content .nav-link.active,
.profile-content .nav-link:hover{
    background: var(--color-bg-main);
    color: var(--color-text-main);
}
.profile-content .nav-link.logout{
    color: var(--crud-delete-bg);
}
.separator{
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin: .5rem 0;
}


.profile-container{
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
}
.profile-container-aside{
    flex: 1 1 300px;
}
.profile-container-content{
    flex: 1 1 1000px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.profile-container-icon{
    max-width: 100px;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    margin: 0 auto;
}
.profile-container-name,
.profile-container-role{
    text-align: center;
    color: var(--color-text-main);
}
.profile-container-name{font-size: 1.6rem;}
.profile-container-content .profile-container-name{text-align: start;}
.profile-container-box{
    border: 1px;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    background: var(--color-bg-main);
    padding: 1rem;
    border-radius: var(--border-radius-card);
    margin-bottom: .3rem;
    border: 1px solid var(--border-color);
}
.profile-container-box h4{
    font-size: 1rem;
    color: var(--color-text-main);
}
/* Pie de página según la imagen del usuario (2026-10-29): tarjeta blanca centrada
   sobre la franja verde; datos y enlaces a la izquierda, hora legal a la derecha. */
.footer{
    width: 100%;
    background: var(--color-brand);
    padding: 0 max(1rem, calc((100% - 1240px) / 2)) 1.25rem;
}
.footer-content{
    display: grid;
    /* El reloj del INM necesita unos 500 px para no cortarse. */
    grid-template-columns: minmax(0, 1fr) min(500px, 45%);
    gap: 2rem 2.5rem;
    padding: 1.75rem 1.9rem;
    background: var(--color-bg-card);
    border-radius: 0 0 .5rem .5rem;
}
.footer-title{
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--color-primary);
}
.footer-data{
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-data li{
    margin: .3rem 0;
    font-size: .95rem;
    line-height: 1.55;
    color: var(--color-text-main);
    overflow-wrap: anywhere;
}
.footer-data a,
.footer-links a{ color: var(--color-primary); }
.footer-data a:hover,
.footer-links a:hover{ color: var(--color-primary-hover); }
.footer-social{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem 1rem;
    margin: 1.5rem 0 0;
    padding: 0;
}
.footer-social a{
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    color: var(--color-text-main);
    text-decoration: none;
}
.footer-social a:hover{ color: var(--color-primary); text-decoration: underline; }
.footer-social__icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
}
.footer-links{
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    margin-top: 1.25rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border-color);
}
.footer-links a{
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .9rem;
}
.footer-clock{ align-self: center; }
.footer-clock iframe{
    display: block;
    width: 100%;
    height: 80px;
    border: 0;
    background: #ffffff;
}
/* Tableta: una sola columna, el reloj debajo de los datos con todo su ancho. */
@media screen and (max-width: 1024px){
    /* minmax(0, 1fr): la columna nunca crece más que la pantalla por culpa del reloj. */
    .footer-content{ grid-template-columns: minmax(0, 1fr); }
    .footer-clock{ max-width: 500px; }
}
@media screen and (max-width: 768px){
    .footer{ padding-inline: 1rem; }
    .footer-content{ padding: 1.25rem 1rem; }
}
@media screen and (max-width: 480px){
    .footer-social{ grid-template-columns: 1fr; }
}
/* Celular: el reloj del INM mide 500 px fijos; se reduce para que se vea completo. */
@media screen and (max-width: 560px){
    .footer-clock iframe{ width: 500px; zoom: .6; }
}
@media screen and (max-width: 360px){
    .footer-clock iframe{ zoom: .45; }
}
/* Los seis botones del panel de accesibilidad se reparten en el ancho del celular. */
@media screen and (max-width: 560px){
    .mintic-controls{ justify-content: space-between; gap: 0; }
}


.swiper-main{padding: 1rem max(1.5rem, 16vw);}
.swiper-main .swiper{
    width: 100%;
    min-height: 200px;
}

/* Carrusel de logos: hasta 4 tarjetas de 125px con 12px entre ellas,
   y las flechas fuera del carrusel (a los lados) para que nunca tapen un logo. */
.logos-carousel{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-block: 1.5rem;
}
.logos-carousel .swiper-2{
    flex: 0 1 536px; /* 4 × 125px + 3 × 12px */
    min-width: 0;
    min-height: auto;
    margin: 0;
}
.logos-carousel .logos-prev,
.logos-carousel .logos-next{
    position: static;
    flex-shrink: 0;
    margin: 0;
}
/* En celular el margen del 16 % dejaba los logos en 42 px de ancho (prueba de dispositivos, 2026-11-09). */
@media screen and (max-width: 600px) {
    .swiper-main{padding-inline: 1rem;}
}
.swiper-main a.swiper-slide{overflow: hidden;}
.swiper-main a.swiper-slide img{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: var(--color-bg-card);
    padding: .5rem;
}

@media screen and (max-width: 1024px) {
    .header__nav{display: flex;}

    .overlay{
        inset: 0;
        position: fixed;
        z-index: 100;
        background: rgb(0 0 0 / 0.43);
        visibility: hidden;
        opacity: 0;
    }
    .overlay.is-open{
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .overlay-content{
        max-width: 300px;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: start !important;
        align-items: start !important;
        gap: .5rem;
        background: var(--color-bg-card);
        padding: 1rem;
        border: 1px solid;
    }
    .overlay-content__item{width: 100%;}
    .main-header .button[data-parent-id]{
        display: inline-flex;
        box-shadow: initial;
    }
    .sidebar-menu,
    .sidebar-footer,
    .sidebar-header{
        padding: 0;
    }

}
/* Checklist de contraseña nueva (static/scripts/password-checklist.js) */
.visually-hidden{
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.password-checklist{
    margin: .25rem 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--color-bg-main);
    border-radius: .5rem;
    background: var(--color-bg-card);
}
.password-checklist__title{
    margin: 0 0 .5rem;
    font-weight: 700;
    color: var(--color-text-main);
}
.password-checklist__list{
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .35rem;
}
.password-checklist__item{
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--color-text-muted);
    transition: color .15s ease-in-out;
}
.password-checklist__item.is-met{
    color: var(--color-primary);
    font-weight: 600;
}
.password-checklist__hint{
    font-weight: 400;
    color: var(--color-text-muted);
}
.password-checklist__summary{
    margin: .75rem 0 0;
    color: var(--color-text-muted);
}
.password-checklist__summary.is-met{
    color: var(--color-primary);
    font-weight: 600;
}
.password-checklist__note{
    margin: .5rem 0 0;
    font-size: .875rem;
    color: var(--color-text-muted);
}
.password-checklist__match{
    margin: .25rem 0 1rem;
}
@media (prefers-reduced-motion: reduce){
    .password-checklist__item{transition: none;}
}

/* Campo trampa para robots (CAPTCHA propio): fuera de la vista y del orden de tabulación. */
.form-honeypot{
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* Barra GOV.CO (RF-03) */
.govco-link{
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
}
.govco-link{ min-height: 44px; }
.govco-link:focus-visible{ outline: 2px solid #ffffff; outline-offset: 3px; }
.mintic__logos{
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
/* Logo Marca País en la franja inferior, separado del de GOV.CO por una línea (imagen del usuario). */
.govco-link--co{
    padding-left: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, .45);
}
.mintic__co{
    width: auto;
    height: 46px;
}
.mintic{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

/* Portal: proyectos públicos (Bloque E, parte 2) */
/* Filtros de proyectos (rediseño 2026-10-30): panel blanco; el buscador ocupa más espacio. */
.project-filters{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: .75rem 1rem;
    align-items: end;
    margin: 1.5rem 0 1.25rem;
    padding: 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
@media screen and (min-width: 900px){
    .project-filters{ grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; }
}
.project-filters__actions{ flex-wrap: nowrap; }
.project-filters .form-group{ margin: 0; font-size: .9rem; }
.project-filters label{ font-weight: 700; color: var(--color-text-main); }
.project-filters select,
.project-filters input{ height: 46px; padding: 0 .75rem; font-size: .95rem; }
.project-filters__search-box{ position: relative; }
.project-filters__search-box i{
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
.project-filters__search-box input{ padding-left: 2.4rem; }
.project-filters__actions{
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.view-switch{
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.view-switch p{ margin: 0 auto 0 0; color: var(--color-text-main); }
.project-facts,
.project-sheet{
    display: grid;
    gap: .5rem 1rem;
    margin: .75rem 0;
}
.project-sheet{
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.project-facts div,
.project-sheet div{ min-width: 0; }
.project-facts dt,
.project-sheet dt{
    font-size: .8rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.project-facts dd,
.project-sheet dd{
    margin: 0;
    overflow-wrap: anywhere;
}
.project-section{
    margin: 2rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--color-bg-main);
}
/* Enlaces de texto de la ficha; los botones conservan sus propios colores (antes el botón de SECOP
   quedaba verde sobre verde). */
.project-section a:not(.button){ color: var(--color-primary); }
.project-section a:not(.button):hover{ color: var(--color-primary-hover); }
.project-section li{ padding: .35rem 0; }
/* Desplegables ("Ver los datos…"): área de toque de 44 px y cursor de control. */
summary{
    min-height: 44px;
    padding: .6rem 0;
    cursor: pointer;
}
/* Controles de zoom del mapa (Leaflet) a 44 px para tocarlos con el dedo.
   Tres clases para ganarle a leaflet.css, que se carga después. */
.leaflet-container .leaflet-bar .leaflet-control-zoom-in,
.leaflet-container .leaflet-bar .leaflet-control-zoom-out{
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 1.25rem;
}
.project-timeline{
    display: grid;
    gap: 1rem;
    padding-left: 1.25rem;
}
.project-timeline p{ margin: 0; }

/* ===== Proyectos públicos: tarjeta y ficha (rediseño 2026-10-30, imágenes del usuario,
   colores y letras de DESIGN.md). ===== */

/* Estados del proyecto y de las etapas: color de fondo claro + texto oscuro (≥ 6:1), siempre con su nombre. */
.badge--status-planning{ background: #FFF3CD; color: #664D03; border: 1px solid #FFE69C; }
.badge--status-execution{ background: #E3F3EC; color: #025F43; border: 1px solid #BFE3D2; }
.badge--status-finished{ background: #E6F4EA; color: #0F5132; border: 1px solid #D1E7DD; }
.badge--status-suspended,
.badge--stage-pending{ background: #E2E8F0; color: #334155; border: 1px solid #CBD5E1; }
.badge--status-cancelled,
.badge--stage-blocked{ background: #F8D7DA; color: #842029; border: 1px solid #F5C2C7; }
.badge--stage-completed{ background: #E6F4EA; color: #0F5132; border: 1px solid #D1E7DD; }
.badge--stage-in_progress{ background: #FFF3CD; color: #664D03; border: 1px solid #FFE69C; }
.text-danger{ color: #842029; }
.text-success{ color: #0F5132; }

/* Barra de progreso delgada. */
.meter{
    position: relative;
    height: 8px;
    background: #E6EBEF;
    border-radius: 999px;
    overflow: hidden;
}
.meter--large{ height: 14px; overflow: visible; }
.meter__value{
    display: block;
    height: 100%;
    max-width: 100%;
    background: var(--color-primary);
    border-radius: inherit;
}
/* Marca del avance programado sobre la barra. */
.meter__target{
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: #334155;
}

/* Tarjeta de proyecto. */
.project-card{ display: flex; flex-direction: column; }
.project-card__media{ position: relative; }
.project-card__media .card-image{ display: block; aspect-ratio: 16 / 9; }
/* La portada sin foto conserva su centrado (antes "display: block" la dejaba tapada por el estado). */
.project-card__media .card-cover{ display: flex; aspect-ratio: 16 / 9; padding: 2.5rem 1rem 1rem; text-align: center; }
.project-card__status{ position: absolute; top: .75rem; left: .75rem; }
.project-card__code{
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    padding: .2rem .5rem;
    font-size: .75rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(33, 37, 41, .85);
    border-radius: .3rem;
}
.project-card__body{ flex: 1; gap: .75rem; }
.project-card__title{
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--color-text-main);
}
.project-card__place{
    display: flex;
    gap: .35rem;
    margin: 0;
    font-size: .85rem;
    color: var(--color-text-muted);
}
.project-card__progress-label{
    display: flex;
    justify-content: space-between;
    margin: 0 0 .35rem;
    font-size: .85rem;
    color: var(--color-text-main);
}
.project-card__progress-label strong{ color: var(--color-primary); }
.project-card__facts{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin: .25rem 0 0;
}
.project-card__facts dt{ font-size: .78rem; color: var(--color-text-muted); }
.project-card__facts dd{ margin: .15rem 0 0; font-weight: 700; color: var(--color-text-main); }
.project-card__link{ margin-top: auto; justify-content: center; width: 100%; }

/* Ficha: franja con el nombre (verde de acciones a verde oscuro; texto blanco ≥ 5,47:1). */
.project-hero{
    margin: .5rem 0 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    overflow: hidden;
}
.project-hero__band{
    padding: clamp(1.25rem, 3vw, 2rem);
    color: #ffffff;
    background: linear-gradient(120deg, #025F43 0%, #03785A 100%);
}
.project-hero__tags{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .75rem;
}
.project-hero__chip{
    padding: .2rem .6rem;
    font-size: .8rem;
    font-weight: 700;
    /* Más oscuro que la franja: texto blanco ≥ 7:1 (con fondo claro quedaba en 3,9:1). */
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
}
.project-hero__code{ font-size: .85rem; letter-spacing: .03em; }
.project-hero__title{
    margin: 0 0 .5rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.2;
    color: #ffffff;
}
.project-hero__meta{ display: flex; gap: .4rem; margin: 0; font-size: .9rem; }

/* Cinco cifras bajo la franja. */
.project-kpis{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    margin: 0;
}
.project-kpis > div{
    padding: 1rem;
    text-align: center;
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}
.project-kpis dt{
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.project-kpis dd{ margin: 0; overflow-wrap: anywhere; }
.project-kpis__value{
    margin-top: .35rem !important;
    font-family: "Nunito Sans", sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-text-main);
}
.project-kpis__value--accent{ color: var(--color-primary); }
.project-kpis__note{ font-size: .78rem; color: var(--color-text-muted); }

/* Pestañas: sin JavaScript se ven todas las secciones; con JavaScript, una a la vez. */
.project-tabs{
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
/* Las pestañas bajan de fila cuando no caben: deslizarlas de lado escondía las últimas. */
.project-tabs__list{
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
}
.project-tabs__list [role="tab"]{
    flex: 0 1 auto;
    min-height: 48px;
    padding: .75rem 1.1rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text-muted);
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}
.project-tabs__list [role="tab"]:hover{ color: var(--color-text-main); }
.project-tabs__list [role="tab"][aria-selected="true"]{
    font-weight: 700;
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.project-tabs__list [role="tab"]:focus-visible,
.project-tabs__panel:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: -2px; }
.project-tabs__panel{ padding: clamp(1rem, 3vw, 1.75rem); }
.project-tabs:not(.is-tabbed) .project-tabs__panel + .project-tabs__panel{ border-top: 1px solid var(--border-color); }
.project-tabs__heading{ margin: 0 0 1rem; font-size: 1.15rem; color: var(--color-text-main); }
/* Con pestañas, el título que repite el nombre de la pestaña se oculta a la vista (no a los lectores). */
.project-tabs.is-tabbed .project-tabs__heading--same{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.project-tabs h3{ margin: 1.25rem 0 .4rem; font-size: 1rem; color: var(--color-text-main); }
.project-tabs h3:first-child{ margin-top: 0; }
.project-tabs__panel p{ line-height: 1.6; color: var(--color-text-main); }

/* Información general: texto a la izquierda, ficha a la derecha. */
.project-general{
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
}
@media screen and (min-width: 900px){
    .project-general{ grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
}
.project-beneficiaries{
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.project-beneficiaries i{ font-size: 1.5rem; color: var(--color-primary); }
.project-beneficiaries p{ margin: 0; font-weight: 700; }
.project-general__facts{ display: grid; gap: .6rem; margin: 0; align-content: start; }
.project-general__facts > div,
.budget-grid > div{
    padding: .75rem 1rem;
    background: var(--color-bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.project-general__facts dt,
.budget-grid dt{
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.project-general__facts dd,
.budget-grid dd{ margin: .2rem 0 0; font-weight: 700; color: var(--color-text-main); overflow-wrap: anywhere; }

/* Avance. */
.progress-summary{
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--color-bg-main);
    border-radius: var(--border-radius-card);
}
.progress-summary__head{ display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.progress-summary__head p{ margin: 0; }
.progress-summary__label{ font-weight: 700; }
.progress-summary__value{
    font-family: "Nunito Sans", sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-primary) !important;
}
.progress-summary__detail{ font-size: .88rem; }
.progress-summary__cutoff{ text-align: right; font-size: .85rem; }
.progress-summary__scale{
    display: flex;
    justify-content: space-between;
    margin: .5rem 0 0;
    font-size: .78rem;
    color: var(--color-text-muted) !important;
}
.progress-tiles{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: .75rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}
.progress-tiles__item{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 1.1rem;
    text-align: center;
    color: #334155;
    background: #EEF2F6;
    border-radius: var(--border-radius-card);
}
.progress-tiles__item i{ font-size: 1.25rem; }
.progress-tiles__item strong{ font-family: "Nunito Sans", sans-serif; font-size: 1.8rem; }
.progress-tiles__item span{ font-size: .85rem; }
.progress-tiles__item--real{ color: #025F43; background: #E3F3EC; }
.progress-tiles__item--ok{ color: #0F5132; background: #E6F4EA; }
.progress-tiles__item--danger{ color: #842029; background: #FDECEE; }
.progress-chart{ margin: 0 0 1rem; }
.progress-chart__title{ margin-bottom: .5rem; font-weight: 700; color: var(--color-text-main); }
.progress-chart__canvas{ position: relative; height: 280px; }
.progress-note{
    padding: .9rem 1rem;
    background: #EEF6F2;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 .4rem .4rem 0;
    font-size: .9rem;
}

/* Cronograma: línea de tiempo. */
/* Cronograma por meses (2026-10-30), como el de la Alcaldía: etapas en verde oscuro con barra
   gruesa y nombre en negrita; actividades en verde medio (#2E9C78: 3,4:1 sobre blanco y 3,2:1 sobre
   las filas grises) con barra delgada. Se desliza de lado con la columna del nombre fija. */
.schedule{
    /* relative: los textos ocultos para lectores de pantalla (position: absolute) se quedan dentro
       de la caja que se desliza; sin esto se salían y ensanchaban toda la página. */
    position: relative;
    overflow-x: auto;
    margin-bottom: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.schedule:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.schedule__table{ width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.schedule__table th,
.schedule__table td{
    min-width: 0;
    padding: .55rem .6rem;
    font-size: .85rem;
    border-bottom: 1px solid var(--border-color);
}
.schedule__table th{ text-transform: none; letter-spacing: 0; }
.schedule__table thead th{ vertical-align: bottom; }
.schedule__name{
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: start;
    background: var(--color-bg-card);
    box-shadow: 1px 0 0 var(--border-color);
}
.schedule__table thead .schedule__name{ background: #E6EBEF; }
.schedule__table tbody tr:nth-child(even) .schedule__name{ background: var(--color-bg-main); }
.schedule__row--stage .schedule__name{ font-weight: 700; color: var(--color-text-main); }
.schedule__row--activity .schedule__name{ padding-left: 1.5rem; font-weight: 400; }
.schedule__duration, .schedule__dates{ white-space: nowrap; }
.schedule__table td.schedule__dates{ font-size: .85rem; }
.schedule__month{ min-width: 72px; text-align: center; }
/* Meses y semanas: "small" dentro de un encabezado quedaba en 11 px. */
.schedule small{ font-size: .75rem; }
.schedule__month span{ display: block; font-weight: 700; }
.schedule__month small{ display: block; font-weight: 400; color: var(--color-text-muted); white-space: nowrap; }
/* Colores del cronograma (pedido del usuario, 2026-11-03): etapa azul cielo, actividad verde, mes actual naranja. */
.schedule__month--current{ background: #FDBA74 !important; color: #212529; }
.schedule__month--current small{ color: #212529; }
/* Toda la columna del mes actual, en un naranja claro para que las barras se sigan distinguiendo. */
.schedule__table td.schedule__cell--current{ background: #FFF3E0; }
.schedule__table td.schedule__cell{ min-width: 72px; padding-left: 0; padding-right: 0; }
.schedule__cell--on::after{
    content: '';
    display: block;
    height: 10px;
    background: #2E9C78;
}
.schedule__row--stage .schedule__cell--on::after{ height: 18px; background: #0B95D6; }
/* Celular: la columna del nombre más angosta para que se vean meses al lado. */
.schedule__hint{ display: none; margin: 0 0 .5rem; font-size: .85rem; color: var(--color-text-muted); }
@media (max-width: 640px){
    .schedule__name{ min-width: 140px; max-width: 160px; }
    .schedule__duration{ white-space: normal; }
    .schedule__hint{ display: block; }
}
/* Convención debajo del cronograma. */
.schedule__legend{ display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.5rem; font-size: .85rem; color: var(--color-text-main); }
.schedule__legend > span{ display: inline-flex; align-items: center; gap: .4rem; }
.schedule__swatch{ display: inline-block; width: 24px; height: 10px; background: #2E9C78; }
.schedule__swatch--stage{ height: 18px; background: #0B95D6; }
.schedule__swatch--current{ height: 18px; background: #FDBA74; border: 1px solid #C2610C; }
/* Panel: cada etapa con sus actividades debajo del cronograma. */
.schedule-section{ margin-bottom: 1.5rem; }
.stage-block{
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.stage-block__header{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.stage-block__title{ margin: 0 0 .35rem; font-size: 1.2rem; color: var(--color-text-main); }
.stage-block__meta{ display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: 0; font-size: .85rem; color: var(--color-text-muted); }
.stage-block__actions{ display: flex; flex-wrap: wrap; gap: .5rem; }
.stage-block__empty{ margin: 0; font-size: .9rem; color: var(--color-text-muted); }
/* Estado de la etapa para marcar (2026-11-06, pedido del usuario): cuatro opciones; la elegida lleva el visto y el
   color de su estado (los mismos de las insignias). */
.stage-status{ flex: 1 1 100%; margin: 0; }
/* Con las opciones, la columna de la etapa se encoge para que los botones sigan a la derecha (como en la imagen). */
.stage-block__header > div:first-child{ flex: 1 1 340px; min-width: 0; }
.stage-block__actions{ flex: 0 0 auto; }
.stage-status fieldset{ display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; border: 0; }
.stage-status__option{
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    padding: .35rem .85rem .35rem .65rem;
    font-size: .88rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid #C9D2D9;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.stage-status__option:hover{ border-color: var(--color-primary); }
/* El círculo del radio se oculta a la vista, pero sigue siendo el control (teclado y lectores de pantalla). */
.stage-status__option input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.stage-status__check{ display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: .8rem; color: transparent; border: 1.5px solid #8A96A3; border-radius: 4px; }
.stage-status__option:has(input:checked){ font-weight: 700; }
.stage-status__option:has(input:checked) .stage-status__check{ color: #ffffff; }
.stage-status__option:has(input:focus-visible){ outline: 3px solid var(--color-primary); outline-offset: 2px; }
.stage-status__option--pending:has(input:checked){ background: #E2E8F0; border-color: #94A3B8; color: #334155; }
.stage-status__option--pending:has(input:checked) .stage-status__check{ background: #475569; border-color: #475569; }
.stage-status__option--in_progress:has(input:checked){ background: #FFF3CD; border-color: #E0B000; color: #664D03; }
.stage-status__option--in_progress:has(input:checked) .stage-status__check{ background: #8A6A00; border-color: #8A6A00; }
.stage-status__option--completed:has(input:checked){ background: #E6F4EA; border-color: #4CA36B; color: #0F5132; }
.stage-status__option--completed:has(input:checked) .stage-status__check{ background: #0F5132; border-color: #0F5132; }
.stage-status__option--blocked:has(input:checked){ background: #F8D7DA; border-color: #D9737E; color: #842029; }
.stage-status__option--blocked:has(input:checked) .stage-status__check{ background: #842029; border-color: #842029; }
/* Tabla de proyectos del panel (lista y "Proyectos recientes"): columnas cortas sin los 190 px
   mínimos, para que quepa completa con sus botones. */
.project-table th, .project-table td{ min-width: 0; }
.project-table th, .project-table td{ padding-left: .6rem; padding-right: .6rem; }
.project-table td:first-child{ min-width: 170px; }
.project-table td:nth-child(2) .badge,
.dashboard-table .project-table td:nth-child(2) .badge{ white-space: normal; border-radius: .5rem; }
.project-table td[data-table-action] .button{ min-width: 44px; padding-left: .7rem; padding-right: .7rem; }
.project-table td:nth-child(3), .project-table td[data-table-action]{ white-space: nowrap; }
/* Usuarios (lista y "Usuarios recientes"): sin los 190 px mínimos y con botones de 44 px, caben las
   cuatro acciones: editar, restablecer acceso, activar o inactivar y eliminar. */
.members-table th, .members-table td{ min-width: 0; padding-left: .75rem; padding-right: .75rem; }
.members-table td:first-child{ min-width: 150px; overflow-wrap: anywhere; }
.members-table td:nth-child(3) .badge{ white-space: normal; border-radius: .5rem; }
.members-table td:nth-child(4){ white-space: nowrap; }
.members-table td[data-table-action]{ white-space: nowrap; }
.members-table td[data-table-action] .button{ min-width: 44px; padding-left: .7rem; padding-right: .7rem; }
/* Noticias del panel: igual, para que se vean el estado y los botones de editar y eliminar. */
.news-table th, .news-table td{ min-width: 0; padding-left: .75rem; padding-right: .75rem; }
.news-table td:nth-child(2){ min-width: 220px; overflow-wrap: anywhere; }
.news-table td:nth-child(3), .news-table td:nth-child(4), .news-table td:nth-child(5){ white-space: nowrap; }
/* Contratistas: sin los 190 px mínimos, la tabla cabe con sus botones de editar y eliminar. */
.contractors-table th, .contractors-table td{ min-width: 0; }
.contractors-table td:first-child{ min-width: 220px; }
.contractors-table td:nth-child(2){ white-space: nowrap; }
.contractors-table td:nth-child(3){ overflow-wrap: anywhere; }
.contractors-table td:nth-child(4){ white-space: nowrap; }
/* Gestión presupuestal (2026-11-03): cifras en una línea y proyecto con el ancho que sobre. */
.budget-projects th, .budget-projects td,
.budget-movements th, .budget-movements td{ min-width: 0; padding-left: .6rem; padding-right: .6rem; }
.budget-projects td:not(:first-child),
.budget-movements td:nth-child(1), .budget-movements td:nth-child(3), .budget-movements td:nth-child(4){ white-space: nowrap; }
.budget-projects th, .budget-projects td{ font-size: .85rem; padding-left: .45rem; padding-right: .45rem; }
.budget-projects td:first-child{ min-width: 135px; }
.budget-projects td:first-child .badge{ white-space: normal; border-radius: .5rem; }
.budget-grid.budget-grid--four{ grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.budget-grid.budget-grid--three{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px){
    .budget-grid.budget-grid--three{ grid-template-columns: repeat(2, 1fr); }
}
.budget-movements td:nth-child(5){ min-width: 160px; }
/* Formulario de actividad (2026-11-03): el total calculado, justo debajo de cantidad y valor. */
.activity-total{ margin: .75rem 0 .25rem; color: var(--color-text-main); }
/* Dirección por partes en el formulario del proyecto (2026-11-04). */
.address-parts > .location-picker__label{ margin-bottom: .75rem; }
.address-parts__row{ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 0 1rem; }
.location-picker__status--warning{ color: #92400E; font-weight: 700; }
/* Configuración (2026-11-03). */
/* Banner (mejorado el 2026-11-30): vista previa en computador y celular, aviso de tamaño y lista en tabla. */
.banner-preview{ margin: 0 0 1rem; }
.banner-preview[hidden]{ display: none; }
.banner-preview img{ display: block; width: 100%; aspect-ratio: 16 / 5; object-fit: cover; border: 1px solid var(--border-color); border-radius: .4rem; }
.banner-preview__frames{ display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.banner-preview__frame{ margin: 0; }
.banner-preview__frame--desktop{ flex: 1 1 360px; }
.banner-preview__frame--phone{ flex: 0 0 220px; }
.banner-preview__frame--phone img{ border-width: 6px; border-color: #1F2933; border-radius: .6rem; }
.banner-preview__size{ margin: 0 0 .75rem; padding: .6rem .85rem; border-radius: .4rem; font-size: .9rem; background: #F2F8F5; color: var(--color-text-main); }
.banner-preview__size:empty{ display: none; }
.banner-preview__size[data-level='warning']{ background: #FFF8E1; color: #6B4E00; }
.banner-table td{ vertical-align: middle; }
.banner-table__image{ display: block; width: 180px; max-width: 100%; aspect-ratio: 16 / 5; object-fit: cover; border-radius: .3rem; border: 1px solid var(--border-color); }
.banner-table__position{ display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.banner-table__link{ font-size: .85rem; overflow-wrap: anywhere; }
.banner-table__dates{ margin: .35rem 0 0; font-size: .85rem; color: var(--color-text-muted); }
.banner-table td[data-table-action] .button:disabled{ opacity: .35; cursor: not-allowed; }
.two-step-setting__state{ margin: .5rem 0 .25rem; font-weight: 700; color: var(--color-text-main); }
.two-step-setting .form__help{ display: block; }
.two-step-setting__test{ margin-top: .75rem; }
.form-switch input[type='checkbox']{ accent-color: var(--color-primary); }
.card-image.banner-card__image{ aspect-ratio: 16 / 5; }
/* Roles (2026-11-03): permisos en una tabla, una fila por módulo y una columna por acción. */
.roles-table th, .roles-table td{ min-width: 0; }
.roles-table td:first-child{ min-width: 260px; }
.roles-table td[data-table-action]{ white-space: nowrap; }
.roles-table td[data-table-action] .button{ min-width: 44px; padding-left: .7rem; padding-right: .7rem; }
.permission-matrix th, .permission-matrix td{ min-width: 0; text-align: center; vertical-align: middle; }
.permission-matrix th:first-child{ text-align: left; min-width: 150px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.permission-matrix thead th{ white-space: nowrap; }
.permission-matrix input[type='checkbox']{ width: 24px; height: 24px; margin: 0; vertical-align: middle; accent-color: var(--color-primary); cursor: pointer; }
/* La casilla se ve de 24 px, pero se puede tocar en un área de 44 x 44 px. */
.permission-matrix__hit{ display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.permission-matrix__hit:has(input:disabled){ cursor: not-allowed; }
.permission-matrix input[data-row-toggle],
.permission-matrix input[data-column-toggle]{ margin: .25rem; }
.permission-matrix input[type='checkbox']:disabled{ cursor: not-allowed; }
.permission-matrix__only{ color: var(--color-text-muted); font-size: .75rem; white-space: nowrap; }
.permission-matrix__yes{ color: var(--color-primary); font-size: 1.15rem; }
.permission-matrix__no{ color: var(--color-text-muted); }
.permission-matrix__count{ margin: .5rem 0; font-weight: 700; color: var(--color-text-main); }
/* Seguimiento de avance (2026-11-03). */
.progress-projects th, .progress-projects td,
.progress-reports th, .progress-reports td{ min-width: 0; padding-left: .6rem; padding-right: .6rem; }
.progress-projects td:not(:first-child),
.progress-reports td:nth-child(-n+3), .progress-reports td:nth-child(4), .progress-reports td[data-table-action]{ white-space: nowrap; }
.progress-projects td:first-child{ min-width: 170px; }
.progress-reports td:nth-child(5){ min-width: 150px; }
.progress-note + .table-responsive{ margin-top: 1rem; }
/* Contratos (2026-11-03): sin los 190 px mínimos cabe completa, con estado y acciones a la vista. */
.contracts-table th, .contracts-table td{ min-width: 0; padding-left: .6rem; padding-right: .6rem; }
.contracts-table td:first-child,
.contracts-table td:nth-child(3),
.contracts-table td[data-table-action]{ white-space: nowrap; }
.contracts-table td:nth-child(2){ min-width: 160px; }
.contracts-table td:nth-child(4) .badge{ white-space: normal; }
.contracts-table td[data-table-action] .button{ min-width: 44px; padding-left: .7rem; padding-right: .7rem; }
.badge--contract-signed{ background: #E6EBEF; color: #212529; border: 1px solid #CED4DA; }
.badge--contract-in_progress{ background: #E3F3EC; color: #025F43; border: 1px solid #BFE3D2; }
.badge--contract-suspended{ background: #FFF3CD; color: #664D03; border: 1px solid #FFE69C; }
.badge--contract-finished{ background: #E6F4EA; color: #0F5132; border: 1px solid #D1E7DD; }
.badge--contract-liquidated{ background: #E6EBEF; color: #41464B; border: 1px solid #CED4DA; }
.stage-block .table-responsive{ padding: 0; box-shadow: none; }
/* Sin los 190 px mínimos en las columnas cortas, la tabla de actividades cabe dentro de la etapa. */
.stage-activities th, .stage-activities td{ min-width: 0; }
.stage-activities td:first-child{ min-width: 200px; }
.stage-activities td:nth-child(2), .stage-activities td:nth-child(3),
.stage-activities td:nth-child(4){ white-space: nowrap; }
.timeline{ position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before{
    content: '';
    position: absolute;
    top: .75rem;
    bottom: .75rem;
    left: 11px;
    width: 2px;
    background: #CBD5E1;
}
.timeline__item{ position: relative; display: flex; gap: 1rem; margin-bottom: 1rem; }
.timeline__dot{
    position: relative;
    z-index: 1;
    flex: 0 0 24px;
    height: 24px;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #ffffff;
    background: #E2E8F0;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
}
.timeline__item--completed .timeline__dot{ background: var(--color-primary); border-color: var(--color-primary); }
.timeline__item--in_progress .timeline__dot{ background: #ffffff; border: 6px solid #d39e00; }
.timeline__item--blocked .timeline__dot{ background: #842029; border-color: #842029; }
.timeline__card{
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    padding: .9rem 1.1rem;
    background: var(--color-bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.timeline__item--completed .timeline__card{ background: #F1F8F4; border-color: #CFE7DA; }
.timeline__item--in_progress .timeline__card{ background: #FFFAEB; border-color: #F3DC9A; }
.timeline__card p{ margin: 0; }
.timeline__title{ font-weight: 700; }
.timeline__dates,
.timeline__compliance{ font-size: .85rem; color: var(--color-text-muted) !important; }

/* Presupuesto. */
.budget-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: .6rem;
    margin: 0 0 1rem;
}

/* Evidencias: filtros por clasificación y galería. */
.evidence-filters{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.chip{
    min-height: 44px;
    padding: .4rem 1rem;
    font-family: inherit;
    font-size: .88rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
}
.chip:hover{ border-color: var(--color-primary); }
.chip[aria-pressed="true"],
.chip--active{ color: #ffffff; background: var(--color-primary); border-color: var(--color-primary); }
a.chip{ display: inline-flex; align-items: center; text-decoration: none; }
a.chip--active:hover{ color: #ffffff; }

/* Vista previa de noticias en el panel (rediseño 2026-10-30): <dialog> con la tarjeta y la página. */
.news-preview{
    /* Centrado (la regla general del sitio quita los márgenes que el navegador usa para centrarlo). */
    margin: auto;
    inset: 0;
    width: min(860px, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    color: var(--color-text-main);
    background: var(--color-bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.news-preview::backdrop{ background: rgba(10, 10, 10, .45); }
.news-preview[open]{ display: flex; flex-direction: column; }
.news-preview__header,
.news-preview__footer{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-card);
}
.news-preview__header{ border-bottom: 1px solid var(--border-color); }
.news-preview__footer{ justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--border-color); }
.news-preview__heading{ margin: 0; font-size: 1.15rem; color: var(--color-text-main); }
.news-preview__note{ margin: .15rem 0 0; font-size: .85rem; color: var(--color-text-muted); }
.news-preview__close{ min-width: 44px; padding: .5rem; }
.news-preview__body{ overflow-y: auto; padding: 1.25rem; }
.news-preview__status{
    display: flex;
    gap: .4rem;
    margin: 0 0 1rem;
    padding: .65rem .85rem;
    font-size: .85rem;
    background: #EEF6F2;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 .4rem .4rem 0;
}
.news-preview__section{
    margin: 1rem 0 .6rem;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.news-preview__card .news-lead{ max-width: 520px; }
.news-preview__card .news-lead__image{ aspect-ratio: 16 / 8; }
.news-preview__page{
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.news-preview__title{ margin: .5rem 0; font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.25; color: var(--color-brand); }
.news-preview__summary{ margin: 0 0 1rem; font-size: 1rem; color: var(--color-text-muted); }
.news-preview__image{ display: block; width: 100%; max-height: 360px; margin: 0 0 1rem; object-fit: cover; border-radius: .6rem; }
/* Vista previa con el diseño nuevo del portal (2026-11-06). */
.news-preview__card .news-card{ max-width: 380px; }
.news-card__title-text{ color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.news-preview__page .news-gallery__main{ max-height: 360px; }

/* Formulario de noticias por secciones (2026-11-06). */
.news-counter{ display: block; margin-top: .25rem; font-size: .8rem; color: var(--color-text-muted); text-align: right; }
.news-counter--near{ color: #842029; font-weight: 700; }
.news-photo-preview:empty{ display: none; }
.news-photo-preview__image{ display: block; max-width: 320px; max-height: 200px; margin-top: .5rem; object-fit: contain; border: 1px solid var(--border-color); border-radius: .4rem; }
.news-thumbs{ display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.news-thumbs:empty{ display: none; }
.news-thumb{ display: flex; flex-direction: column; gap: .25rem; width: 120px; font-size: .75rem; color: var(--color-text-muted); }
.news-thumb img{ display: block; width: 120px; height: 80px; object-fit: cover; border: 1px solid var(--border-color); border-radius: .35rem; }
.news-thumb__name{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-thumb--current{ cursor: pointer; }
.news-thumb__remove{ display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; font-size: .85rem; color: var(--color-text-main); }
.news-thumb__remove input{ width: 20px; height: 20px; accent-color: #842029; }
.news-thumb--removed img{ opacity: .35; outline: 2px dashed #842029; outline-offset: -2px; }
.news-current-photos{ margin: 0; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--border-radius-card); }
.news-current-photos legend{ padding: 0 .35rem; font-weight: 700; color: var(--color-text-main); }
.news-size-warning{ grid-column: 1 / -1; color: #842029; font-weight: 700; }
.news-tags--preview{ margin: .5rem 0 0; }
/* ".form-body ul/li" pone sangría y un visto a toda lista del formulario; las etiquetas no lo llevan. */
.form-body .news-tags{ padding: 0; }
.form-body .news-tags li{ margin: 0; padding: 0; }
.form-body .news-tags li::marker{ content: none; }
.news-tags--preview:empty{ display: none; }

/* ===== Noticias (rediseño 2026-10-30, imagen del usuario; colores y letras de DESIGN.md) ===== */
.news-toolbar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.5rem;
}
.news-categories{ display: flex; flex-wrap: wrap; gap: .5rem; }
.news-search{ display: flex; flex: 0 1 300px; max-width: 100%; min-width: 0; }
.news-search button{ flex: 0 0 44px; }
@media screen and (max-width: 600px){
    .news-search{ flex: 1 1 100%; width: 100%; }
}
.profile-container, .profile-container *{ min-width: 0; overflow-wrap: anywhere; }
.news-search input{
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 .85rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-right: 0;
    border-radius: var(--border-radius-card) 0 0 var(--border-radius-card);
}
.news-search button{
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: var(--color-primary);
    border: 0;
    border-radius: 0 var(--border-radius-card) var(--border-radius-card) 0;
    cursor: pointer;
}
.news-search button:hover{ background: var(--color-primary-hover); }

/* ===== Noticias del portal, rediseño 2026-11-06 según las imágenes del usuario ===== */
/* Lista: título a la izquierda y, a la derecha, "Filtrar por fecha", "Todos los contenidos" y el buscador. */
.news-head{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.news-head .heading-title{ margin: 0; }
.news-filters{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
/* Los desplegables se ven como texto verde con flecha, como en la referencia, pero siguen siendo <select>. */
.news-filters__select{
    min-height: 44px;
    padding: 0 1.75rem 0 .25rem;
    font-family: "Nunito Sans", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2303785A' d='M1.6 4.6a.75.75 0 0 1 1.06 0L8 9.94l5.34-5.34a.75.75 0 1 1 1.06 1.06l-5.87 5.87a.75.75 0 0 1-1.06 0L1.6 5.66a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") no-repeat right .4rem center;
    border: 0;
    border-bottom: 2px solid transparent;
    appearance: none;
    cursor: pointer;
}
.news-filters__select:hover{ border-bottom-color: var(--color-primary); }
.news-filters__select:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.news-filters__search{ display: flex; }
.news-filters__search input{
    width: 200px;
    min-width: 0;
    height: 44px;
    padding: 0 .85rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-right: 0;
    border-radius: var(--border-radius-card) 0 0 var(--border-radius-card);
}
.news-filters__search button{
    flex: 0 0 44px;
    height: 44px;
    color: #ffffff;
    background: var(--color-primary);
    border: 0;
    border-radius: 0 var(--border-radius-card) var(--border-radius-card) 0;
    cursor: pointer;
}
.news-filters__search button:hover{ background: var(--color-primary-hover); }
@media screen and (max-width: 600px){
    .news-filters, .news-filters__search{ width: 100%; }
    .news-filters__search input{ flex: 1 1 auto; width: auto; }
}
.news-active-filters{ margin: 0 0 1rem; font-size: .9rem; color: var(--color-text-muted); }
/* Tarjetas iguales de 3 en 3 (2 en tableta, 1 en celular). */
.news-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.news-card{
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    transition: border-color .2s ease, box-shadow .2s ease;
}
/* Al señalarla, borde verde como la primera tarjeta de la referencia. */
.news-card:hover,
.news-card:focus-within{ border-color: var(--color-brand); box-shadow: var(--shadow-card); }
.news-card__image{ display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.news-card__body{ display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.25rem 1.25rem; }
.news-card__when{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; color: var(--color-text-muted); }
.news-card__featured{ display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700; color: #664D03; }
.news-card__category{ margin: 0; font-family: "Nunito Sans", sans-serif; font-size: .95rem; font-weight: 700; color: var(--color-primary); }
.news-card__title{ margin: .15rem 0 0; font-size: 1.15rem; line-height: 1.35; text-transform: uppercase; }
.news-card__title a{ color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.news-card__title a:hover{ color: var(--color-primary-hover); }
/* Toda la tarjeta lleva a la noticia: el enlace del título se estira sobre ella. */
.news-card__title a::after{ content: ''; position: absolute; inset: 0; }
.news-card__title a:focus-visible{ outline: none; }
.news-card:has(.news-card__title a:focus-visible){ outline: 3px solid var(--color-primary); outline-offset: 2px; }
.news-card__summary{
    display: -webkit-box;
    margin: .25rem 0 0;
    font-size: .95rem;
    line-height: 1.5;
    color: var(--color-text-main);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (prefers-reduced-motion: reduce){ .news-card{ transition: none; } }

/* Noticia completa. Centrada en la pantalla (pedido del usuario, 2026-11-06): la columna de lectura va al
   centro; el texto sigue alineado a la izquierda para leerlo cómodo. */
.news-article.section--reading > *{ margin-inline: auto; }
.news-article__dates{ margin: 0 0 .5rem; font-size: .85rem; color: var(--color-text-muted); }
.news-article__dates a{ color: var(--color-primary); font-weight: 700; }
.news-article__title{ margin: 0 0 1.25rem; font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.25; text-transform: uppercase; color: var(--color-brand); }
.news-article__summary{ margin: 1.25rem 0 1rem; font-weight: 700; line-height: 1.6; color: var(--color-text-main); }
.news-article__event{ display: flex; align-items: center; gap: .4rem; margin: 1.5rem 0 .75rem; font-size: .9rem; color: var(--color-text-muted); }
.news-tags{ display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.news-tag{
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .25rem .75rem;
    font-size: .85rem;
    color: var(--color-text-main);
    background: #E6EBEF;
    border-radius: .35rem;
    text-decoration: none;
}
.news-tag:hover{ color: #ffffff; background: var(--color-primary); }
.news-tag:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
/* Galería: foto grande sobre fondo claro y, debajo, la tira de miniaturas sobre gris oscuro con flechas. */
.news-gallery{ margin: 0 0 .5rem; overflow: hidden; border-radius: var(--border-radius-card); }
.news-gallery__stage{ display: flex; align-items: center; justify-content: center; padding: 1rem; background: #EEF3F1; }
.news-gallery__main{ display: block; max-width: 100%; max-height: min(65vh, 560px); object-fit: contain; }
.news-gallery__strip{ display: flex; align-items: center; gap: .5rem; padding: .6rem; background: #343A40; }
.news-gallery__thumbs{ display: flex; flex: 1 1 auto; gap: .5rem; margin: 0; padding: 0; overflow-x: auto; list-style: none; scrollbar-width: none; scroll-snap-type: x mandatory; }
.news-gallery__thumbs::-webkit-scrollbar{ display: none; }
.news-gallery__thumbs li{ flex: 0 0 auto; scroll-snap-align: start; }
.news-gallery__thumb{ display: block; border: 3px solid transparent; border-radius: .3rem; opacity: .75; }
.news-gallery__thumb:hover{ opacity: 1; }
.news-gallery__thumb[aria-current="true"]{ border-color: #ffffff; opacity: 1; }
.news-gallery__thumb:focus-visible{ outline: 3px solid #ffffff; outline-offset: 1px; }
.news-gallery__thumb img{ display: block; width: 104px; height: 64px; object-fit: cover; border-radius: .15rem; }
.news-gallery__arrow{
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(0, 0, 0, .55);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.news-gallery__arrow:hover{ background: var(--color-primary); }
.news-gallery__arrow:disabled{ opacity: .35; cursor: not-allowed; }
.news-gallery__arrow:focus-visible{ outline: 3px solid #ffffff; outline-offset: 2px; }
.news-gallery__caption{ padding: .5rem 0 0; font-size: .85rem; color: var(--color-text-muted); }

/* Destacadas: la más reciente en grande y dos al lado. */
.news-highlights{
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 2rem;
}
@media screen and (min-width: 900px){
    .news-highlights{ grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
}
.news-lead{ display: flex; flex-direction: column; }
.news-lead__image{
    display: flex;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}
.news-lead__body{ display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem 1.5rem 1.5rem; }
.news-meta{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
    margin: 0;
    font-size: .82rem;
    color: var(--color-text-muted);
}
.news-lead__title{ margin: 0; font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.25; color: var(--color-text-main); }
.news-lead__summary{ margin: 0; line-height: 1.6; color: var(--color-text-main); }
.news-more{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    align-self: flex-start;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
}
.news-more:hover{ text-decoration: underline; }
.news-side{ display: grid; gap: 1rem; align-content: start; }
.news-side__item{ display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); min-height: 170px; }
.news-side__image{
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 170px;
    object-fit: cover;
    aspect-ratio: auto;
}
.news-side__body{ display: flex; flex-direction: column; gap: .4rem; padding: 1rem; }
.news-side__title{ margin: 0; font-size: 1rem; line-height: 1.35; color: var(--color-text-main); }
.news-more-title{ margin: 0 0 1rem; font-size: 1.15rem; color: var(--color-text-main); }
.chip:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.evidence-filters__count{ font-size: .85rem; color: var(--color-text-muted); }
/* Evidencias de la ficha. 2026-11-05: "más grandes y más llamativas"; 2026-11-13 (captura del usuario):
   "se ven muy grandes y no se ve estético". Ahora tamaño moderado: unas 4 por fila en computador, y con
   pocas fotos no se estiran (auto-fill). Al pulsar se amplían en .evidence-viewer. */
.evidence-gallery{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 1rem;
}
.evidence-figure{
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.evidence-figure:hover,
.evidence-figure:focus-within{ box-shadow: var(--shadow-card); border-color: var(--color-primary); }
.evidence-figure[hidden]{ display: none; }
.evidence-figure__media{ position: relative; display: block; overflow: hidden; cursor: zoom-in; }
.evidence-figure__media:focus-visible{ outline: 3px solid var(--color-primary); outline-offset: -3px; }
.evidence-figure img{
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .35s ease;
}
.evidence-figure__media:hover img,
.evidence-figure__media:focus-visible img{ transform: scale(1.04); }
/* "Ampliar" aparece al señalar la foto; en pantallas táctiles queda siempre a la vista. */
.evidence-figure__zoom{
    position: absolute;
    left: .6rem;
    bottom: .6rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    font-size: .8rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(17, 24, 39, .72);
    border-radius: 999px;
    opacity: 0;
    transition: opacity .2s ease;
}
.evidence-figure__media:hover .evidence-figure__zoom,
.evidence-figure__media:focus-visible .evidence-figure__zoom{ opacity: 1; }
@media (hover: none){ .evidence-figure__zoom{ opacity: 1; } }
/* Clasificación con su color: antes en gris, durante en ámbar, después en verde (los de los estados del sitio). */
.evidence-figure__badge{ position: absolute; top: .7rem; right: .7rem; font-size: .8rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.evidence-figure--before .evidence-figure__badge{ background: #E2E8F0; color: #334155; }
.evidence-figure--during .evidence-figure__badge,
.evidence-figure--partial .evidence-figure__badge{ background: #FFF3CD; color: #664D03; }
.evidence-figure--after .evidence-figure__badge{ background: #E6F4EA; color: #0F5132; }
.evidence-figure figcaption{
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .6rem .8rem .7rem;
    color: var(--color-text-main);
}
.evidence-figure__caption{
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    /* Descripciones largas: dos líneas en la tarjeta; completa en el visor. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.evidence-figure figcaption small{ display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--color-text-muted); }
@media (prefers-reduced-motion: reduce){
    .evidence-figure, .evidence-figure img, .evidence-figure__zoom{ transition: none; }
    .evidence-figure:hover, .evidence-figure:focus-within{ transform: none; }
    .evidence-figure__media:hover img, .evidence-figure__media:focus-visible img{ transform: none; }
}
/* Crear sector desde el formulario del proyecto (2026-11-05). */
.sector-quick__open{ margin-top: .5rem; }
.sector-quick{
    margin: auto;
    inset: 0;
    width: min(460px, calc(100% - 2rem));
    padding: 0;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.sector-quick::backdrop{ background: rgba(10, 10, 10, .45); }
.sector-quick__form{ display: flex; flex-direction: column; gap: .75rem; padding: 1.5rem; }
.sector-quick__title{ margin: 0; font-size: 1.2rem; color: var(--color-primary); }
.sector-quick__help{ margin: 0; font-size: .88rem; color: var(--color-text-muted); }
.sector-quick__actions{ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
/* Foto ampliada: <dialog> nativo (Escape cierra), fondo oscuro para que la foto sea lo único que se ve. */
.evidence-viewer{
    margin: auto;
    inset: 0;
    width: min(1100px, calc(100% - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
    padding: 0;
    color: #ffffff;
    background: #111827;
    border: 0;
    border-radius: var(--border-radius-card);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
}
.evidence-viewer::backdrop{ background: rgba(0, 0, 0, .8); }
.evidence-viewer[open]{ display: flex; flex-direction: column; }
.evidence-viewer__top{ display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .5rem .5rem 1rem; }
/* Con ".evidence-viewer" delante: ".project-tabs__panel p" pinta los párrafos de gris oscuro y aquí el fondo es oscuro. */
.evidence-viewer .evidence-viewer__count{ margin: 0; font-size: .85rem; color: #D1D5DB; }
.evidence-viewer__stage{ position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; flex: 1 1 auto; padding: 0 3.5rem; }
.evidence-viewer__image{ display: block; max-width: 100%; max-height: calc(100dvh - 12rem); object-fit: contain; border-radius: .4rem; }
.evidence-viewer__button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.evidence-viewer__button:hover{ background: rgba(255, 255, 255, .24); }
.evidence-viewer__button:focus-visible{ outline: 3px solid #ffffff; outline-offset: 2px; }
.evidence-viewer__nav{ position: absolute; top: 50%; transform: translateY(-50%); }
.evidence-viewer__nav[data-viewer-prev]{ left: .5rem; }
.evidence-viewer__nav[data-viewer-next]{ right: .5rem; }
.evidence-viewer__nav[hidden]{ display: none; }
.evidence-viewer__text{ padding: .85rem 1.25rem 1.1rem; }
.evidence-viewer .evidence-viewer__caption{ margin: 0 0 .25rem; font-weight: 700; line-height: 1.4; color: #ffffff; }
.evidence-viewer .evidence-viewer__meta{ margin: 0; font-size: .85rem; color: #D1D5DB; }
/* Celular: las flechas van sobre la foto, en las orillas, para que la foto use todo el ancho. */
@media screen and (max-width: 600px){
    .evidence-viewer__stage{ padding: 0; }
    .evidence-viewer__nav{ background: rgba(17, 24, 39, .6); }
}

/* Mapa de proyectos (RF-17, RF-18). Rediseño 2026-10-30 según la imagen del usuario:
   mapa con la convención encima y, al lado, el proyecto seleccionado y la lista. */
.map-layout{
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 1.5rem;
}
@media screen and (min-width: 1000px){
    .map-layout{ grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}
.map-stage{ position: relative; }
.projects-map{
    width: 100%;
    height: clamp(360px, 62vh, 580px);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    z-index: 0;
}
/* Formulario de proyectos: la ubicación se marca con clic en un mapa (sin escribir latitud y longitud). */
.location-picker__label{ margin: 0; font-size: 1.1rem; color: var(--color-text-main); }
.location-picker__map{
    width: 100%;
    height: clamp(280px, 45vh, 420px);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    z-index: 0;
    cursor: crosshair;
}
.location-picker__map:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.location-picker__bar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}
.location-picker__status{ margin: 0 auto 0 0; font-size: .9rem; color: var(--color-text-main); }
.location-picker__actions{ display: flex; flex-wrap: wrap; gap: .5rem; }
.form-group .location-picker__actions .button{ width: auto; }
/* Convención de colores sobre el mapa (abajo a la izquierda). */
.map-legend{
    position: absolute;
    left: .75rem;
    bottom: 1.75rem;
    z-index: 500;
    padding: .75rem .9rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.map-legend__title{
    margin: 0 0 .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.map-legend ul{ display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.map-legend li{ display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--color-text-main); }
.map-dot{ flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.map-dot--planning{ background: #475569; }
.map-dot--execution{ background: #b45309; }
.map-dot--suspended{ background: #b91c1c; }
.map-dot--cancelled{ background: #1f2937; }
.map-dot--finished{ background: var(--color-primary); }
.map-sector{ display: flex; align-items: center; gap: .5rem; }
.map-sector label{ font-size: .9rem; font-weight: 700; color: var(--color-text-main); }
.map-sector select{
    height: 44px;
    padding: 0 .75rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.map-sector .button{ min-height: 44px; padding: .5rem 1rem; font-size: .9rem; }
/* Columna derecha: proyecto seleccionado y lista. */
.map-aside{ display: grid; gap: 1rem; align-content: start; }
.map-info,
.map-list{
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.map-info{ padding: 1.25rem; }
.map-info__empty{ padding: 1rem .5rem; text-align: center; color: var(--color-text-muted); }
.map-info__empty i{ font-size: 2rem; color: var(--color-primary); }
.map-info__empty p{ margin: .3rem 0 0; font-size: .88rem; }
.map-info__empty-title{ font-weight: 700; color: var(--color-text-main); }
.map-info__card{ display: flex; flex-direction: column; gap: .6rem; }
.map-info__tags{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.map-info__code{ font-size: .8rem; font-weight: 700; color: var(--color-text-muted); }
.map-info__title{ margin: 0; font-size: 1.05rem; line-height: 1.35; color: var(--color-text-main); }
.map-info__place{ margin: 0; font-size: .85rem; color: var(--color-text-muted); }
.map-list__title{
    margin: 0;
    padding: 1rem 1.1rem .75rem;
    font-size: 1rem;
    color: var(--color-text-main);
    border-bottom: 1px solid var(--border-color);
}
.map-list__items{ max-height: 360px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.map-list__item{
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    min-height: 44px;
    padding: .75rem 1.1rem;
    text-decoration: none;
    color: var(--color-text-main);
    border-bottom: 1px solid var(--border-color);
}
.map-list__items li:last-child .map-list__item{ border-bottom: 0; }
.map-list__item .map-dot{ margin-top: .35rem; }
.map-list__item:hover{ background: var(--color-bg-main); color: var(--color-text-main); }
.map-list__item:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: -2px; }
.map-list__item.is-selected{ background: #E3F3EC; box-shadow: inset 3px 0 0 var(--color-primary); }
.map-list__name{ display: block; font-weight: 700; font-size: .9rem; }
.map-list__meta{ display: block; font-size: .8rem; color: var(--color-text-muted); }
.map-list__empty{ margin: 0; padding: 1rem 1.1rem; color: var(--color-text-muted); }
.map-unlocated{
    padding: 1rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.map-unlocated__title{ margin: 0 0 .5rem; font-size: 1rem; color: var(--color-text-main); }
.map-unlocated ul{ margin: 0; padding-left: 1.2rem; }
.map-unlocated li{ padding: .2rem 0; }
.map-marker{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgb(0 0 0 / .4);
    color: #ffffff;
    font-size: 1rem;
}
/* Un color por estado, siempre con leyenda en texto; el azul GOV.CO no se usa aquí (DESIGN.md). */
.map-marker--planning{ background: #475569; }
.map-marker--execution{ background: #b45309; }
.map-marker--suspended{ background: #b91c1c; }
.map-marker--cancelled{ background: #1f2937; }
.map-marker--finished{ background: var(--color-primary); }

/* Buscador global (RF-05) */
.search-results{
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    gap: 1rem;
}
.search-result{
    padding: 1rem;
    border: 1px solid var(--color-bg-main);
    border-radius: .75rem;
    background: var(--color-bg-card);
    overflow-wrap: anywhere;
}
.search-result__meta{
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    align-items: center;
    margin: 0 0 .35rem;
    font-size: .9rem;
    color: var(--color-text-muted);
}
.search-result__title{
    font-size: 1.1rem;
    margin: 0 0 .35rem;
}
/* Foto de la noticia (2026-11-05, pedido del usuario): completa y sin recortes, pero con tope de alto.
   Un afiche vertical ocupaba varias pantallas antes de llegar al texto; una foto horizontal no cambia. */
.news-figure{ margin: 0 0 1.5rem; }
.news-figure img{
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(70vh, 640px);
    margin-inline: auto;
    border-radius: .75rem;
}
.news-content{ line-height: 1.7; overflow-wrap: anywhere; }
/* Espacio entre párrafos: el texto llega con saltos de línea convertidos en <p>. */
.news-content p{ margin: 0 0 1rem; max-width: 70ch; color: var(--color-text-main); }

/* Ventanas de aviso y confirmación (SweetAlert2), con la letra y los colores del sitio
   (rediseño 2026-10-30, pedido del usuario; antes título en inglés y botón morado). */
.swal2-popup{ font-family: Verdana, sans-serif; border-radius: var(--border-radius-card); }
.swal2-title{ font-family: "Nunito Sans", sans-serif; font-weight: 700; color: var(--color-text-main); }
.swal2-html-container{ color: var(--color-text-main); }
.swal2-styled.swal2-confirm{ background-color: var(--color-primary) !important; }
.swal2-styled.swal2-deny{ background-color: #5C6670 !important; }
.swal2-styled.swal2-confirm,
.swal2-styled.swal2-deny{ min-height: 44px; font-family: Verdana, sans-serif; }
.swal2-styled:focus-visible{ outline: 3px solid #0943B5 !important; outline-offset: 2px; box-shadow: none !important; }
.swal2-timer-progress-bar{ background: var(--color-primary); }

/* ===== Transparencia y acceso a la información pública (2026-11-06) =====
   Copia de la página de referencia del Fondo: categorías numeradas que se despliegan. Los círculos de número
   van en el azul GOV.CO como en la referencia (excepción a DESIGN.md, igual que la barra de accesibilidad). */
.transp-head{ margin-bottom: 1.5rem; }
.transp-head .heading-title{ margin: .25rem 0 .5rem; }
.transp-kicker{ margin: 0; font-size: .85rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.transp-meta{ margin: 0; font-size: .9rem; color: var(--color-text-muted); }

.transp-index{
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 0 1.25rem;
}
.transp-cat{ border-bottom: 1px solid var(--border-color); }
.transp-cat:last-child{ border-bottom: 0; }
.transp-cat__summary,
.transp-group > summary{ list-style: none; cursor: pointer; }
.transp-cat__summary::-webkit-details-marker,
.transp-group > summary::-webkit-details-marker{ display: none; }
.transp-cat__summary{
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
    padding: .75rem 0;
}
.transp-cat__number{
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--color-gov-blue);
}
.transp-cat__title{
    flex: 1 1 auto;
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem);
    font-weight: 700;
    color: var(--color-text-main);
}
.transp-chevron{ flex: 0 0 auto; color: var(--color-text-muted); transition: transform .2s ease-in-out; }
details[open] > summary > .transp-chevron{ transform: rotate(180deg); }
.transp-cat__summary:hover .transp-cat__title{ color: var(--color-primary); }
.transp-cat__summary:focus-visible,
.transp-group > summary:focus-visible,
.transp-item:focus-visible{ outline: 3px solid var(--color-primary); outline-offset: 2px; }

.transp-items{ list-style: none; margin: 0 0 1rem; padding: 0; }
.transp-items--nested{ margin: 0; padding-left: 1.25rem; background: var(--color-bg-card); }
.transp-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 48px;
    padding: .65rem 1rem;
    color: var(--color-text-main);
    text-decoration: none;
    background: #F6F8FA;
    border-bottom: 1px solid var(--border-color);
}
.transp-item > span{ min-width: 0; overflow-wrap: anywhere; }
.transp-item > i{ flex: 0 0 auto; color: var(--color-text-muted); }
a.transp-item:hover,
.transp-group > summary:hover{ color: var(--color-primary); background: #EDF5F1; }
a.transp-item:hover > i{ color: var(--color-primary); }

/* Listas de documentos con "Ordenar por" y "Filtrar por fecha". */
.transp-toolbar{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-bottom: 1.25rem; }
.transp-order{ display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; color: var(--color-text-muted); }
.transp-order__option{
    min-height: 44px;
    padding: 0 .75rem;
    font: inherit;
    color: var(--color-text-main);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-card);
    cursor: pointer;
}
.transp-order__option:hover{ color: var(--color-primary); }
.transp-order__option[aria-pressed="true"]{ font-weight: 700; color: var(--color-primary); border-color: var(--color-primary); }
.transp-order__option:focus-visible{ outline: 3px solid var(--color-primary); outline-offset: 2px; }

.transp-docs,
.transp-cards{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
}
.transp-cards{ grid-template-columns: 1fr; }
.transp-cards--grid{ grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.transp-doc,
.transp-card{
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: 1.1rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.transp-doc__top{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.transp-doc__type{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .55rem;
    font-size: .8rem;
    font-weight: 700;
    color: #842029;
    background: #F8D7DA;
    border-radius: var(--border-radius-card);
}
.transp-doc__date{ font-size: .85rem; color: var(--color-text-muted); }
.transp-doc__category{ margin: 0; font-size: .8rem; font-weight: 700; color: var(--color-primary); }
.transp-doc__title,
.transp-card__title{ margin: 0; font-family: "Nunito Sans", sans-serif; font-size: 1.1rem; font-weight: 700; }
.transp-doc__title a,
.transp-card__title a{ color: var(--color-text-main); }
.transp-doc__title a:hover,
.transp-card__title a:hover{ color: var(--color-primary); }
.transp-doc__text,
.transp-card p{ margin: 0; color: var(--color-text-muted); }
.transp-empty{
    padding: 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-card);
}

/* Páginas de texto. */
.transp-text{ line-height: 1.7; overflow-wrap: anywhere; }
.transp-text p{ margin: 0 0 1rem; color: var(--color-text-main); }
.transp-text .transp-meta{ color: var(--color-text-muted); }
.transp-subtitle{ margin: 1.5rem 0 .5rem; font-family: "Nunito Sans", sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--color-text-main); }
.transp-subtitle--small{ font-size: 1.05rem; }
.transp-text > .transp-subtitle:first-child{ margin-top: 0; }
.transp-lead{ font-size: 1.1rem; font-weight: 700; }
.transp-list{ margin: 0 0 1rem; padding-left: 1.5rem; }
.transp-list li{ margin-bottom: .35rem; }
.transp-contact{ list-style: none; margin: 0 0 1rem; padding: 0; }
.transp-contact li{ margin-bottom: .35rem; }
.transp-contact--boxed{
    padding: 1rem 1.25rem;
    background: #F6F8FA;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.transp-contact--boxed i{ color: var(--color-primary); }
.transp-links{ list-style: none; margin: .5rem 0 0; padding: 0; }
.transp-links a{ display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.transp-note{
    display: flex;
    gap: .5rem;
    padding: .75rem 1rem;
    background: #E3F3EC;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius-card);
}
.transp-note--warning{ margin-bottom: 1.5rem; background: #FFF3CD; border-left-color: #B58105; color: #664D03; }
.transp-files{ margin-top: 1.5rem; }
.transp-file{
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    max-width: 100%;
    min-height: 44px;
    padding: .75rem 1rem;
    color: var(--color-text-main);
    text-decoration: none;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.transp-file i{ font-size: 1.5rem; color: #B02A37; }
.transp-file__name{ font-weight: 700; overflow-wrap: anywhere; }
.transp-file__size{ font-size: .85rem; color: var(--color-text-muted); }
.transp-file:hover{ border-color: var(--color-primary); color: var(--color-primary); }

/* Paz y salvo: dos opciones que muestran su sección. */
.transp-choice{ display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0 1.5rem; }
.transp-choice__option{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 1.25rem;
    font: inherit;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-card);
    cursor: pointer;
}
.transp-choice__option:hover{ background: #EDF5F1; }
.transp-choice__option[aria-expanded="true"]{ color: #ffffff; background: var(--color-primary); }
.transp-choice__option:focus-visible{ outline: 3px solid var(--color-gov-blue); outline-offset: 2px; }
.transp-choice__option[hidden]{ display: none; }
.transp-panel{
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.transp-panel[hidden]{ display: none; }
.transp-panel > .transp-subtitle{ margin-top: 0; }
.transp-panel p{ margin: 0 0 1rem; line-height: 1.7; color: var(--color-text-main); }
.transp-panel > :last-child{ margin-bottom: 0; }

/* Alto contraste: los fondos claros fijos pasan a negro. */
:root.high-contrast .transp-item,
:root.high-contrast .transp-contact--boxed,
:root.high-contrast .transp-note,
:root.high-contrast .transp-choice__option{ color: #ffffff; background: #000000; }
:root.high-contrast a.transp-item:hover,
:root.high-contrast .transp-group > summary:hover{ background: #000000; color: var(--color-primary); }
:root.high-contrast .transp-choice__option[aria-expanded="true"]{ color: #000000; background: var(--color-primary); }
:root.high-contrast .transp-doc__type{ color: #000000; background: #ffffff; }

@media screen and (max-width: 600px){
    .transp-index{ padding: 0 .75rem; }
    .transp-cat__summary{ gap: .75rem; }
    .transp-item{ padding: .65rem .75rem; }
    .transp-items--nested{ padding-left: .5rem; }
}

/* --- Contacto y Políticas (2026-11-13, capturas del usuario: las tarjetas dejaban media pantalla vacía) --- */
/* auto-fit (no auto-fill): las columnas sin tarjeta desaparecen y las que hay se estiran. */
.contact-grid,
.policies{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}
.contact-card{
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--color-primary);
    border-radius: var(--border-radius-card);
}
.contact-card__title{
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-main);
}
.contact-card__title .bi{ color: var(--color-primary); }
.contact-card__text{ margin: 0; color: var(--color-text-muted); }
.contact-card__action,
.policies__action{ align-self: flex-start; margin-top: auto; }
.contact-list{ display: grid; gap: .85rem; margin: 0; }
.contact-list dt{
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}
.contact-list dt .bi{ color: var(--color-primary); }
.contact-list dd{ margin: .15rem 0 0 1.4rem; overflow-wrap: anywhere; }
.contact-socials{ display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
/* Políticas: una tarjeta debajo de la otra (lado a lado, la del Fondo quedaba casi vacía). */
.policies{ grid-template-columns: 1fr; }
.policies__card{ gap: .75rem; }
.policies__card:first-child{
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 1.5rem;
}
.policies__card:first-child .transp-doc__category{ flex-basis: 100%; }
.policies__card:first-child .transp-card__title{ flex: 1 1 22rem; }
.policies__card:first-child .policies__action{ margin-top: 0; }
/* Mi Colombia Digital: cada tema es una tarjeta con su ícono (2026-11-13, pedido del usuario). */
/* Son 9: tres columnas en computador (3 × 3, sin una tarjeta sola al final), dos en tableta y una en celular. */
.policy-tiles{
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
    margin: .25rem 0 0;
    padding: 0;
    list-style: none;
}
.policy-tile{
    display: flex;
    align-items: center;
    gap: .85rem;
    height: 100%;
    min-height: 64px;
    padding: .75rem 1rem;
    color: var(--color-text-main);
    text-decoration: none;
    background: var(--color-bg-main);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    transition: border-color .15s ease, background-color .15s ease;
}
.policy-tile:hover,
.policy-tile:focus-visible{
    border-color: var(--color-primary);
    background: var(--color-bg-card);
}
.policy-tile:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.policy-tile__icon{
    display: grid;
    place-items: center;
    flex: 0 0 2.5rem;
    height: 2.5rem;
    font-size: 1.15rem;
    color: var(--color-primary);
    background: #E3F3EC;
    border-radius: 50%;
}
.policy-tile__text{ display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.policy-tile__title{ font-weight: 700; line-height: 1.3; }
.policy-tile:hover .policy-tile__title{ color: var(--color-primary); text-decoration: underline; }
.policy-tile__source{ font-size: .78rem; color: var(--color-text-muted); }
.policy-tile__arrow{ flex: 0 0 auto; font-size: .85rem; color: var(--color-text-muted); }
@media screen and (min-width: 640px){ .policy-tiles{ grid-template-columns: repeat(2, 1fr); } }
@media screen and (min-width: 1024px){ .policy-tiles{ grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce){ .policy-tile{ transition: none; } }
:root.high-contrast .policy-tile__icon{ background: transparent; border: 1px solid currentColor; }

/* --- Documentos de Transparencia como tarjetas de archivo (2026-11-13, pedido del usuario) --- */
.doc-cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}
.doc-card{
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.1rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.doc-card:hover,
.doc-card:focus-within{
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px rgb(0 0 0 / .06);
}
.doc-card__head{ display: flex; align-items: flex-start; gap: .85rem; }
.doc-card__icon{
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
    border-radius: .5rem;
    color: var(--color-primary);
    background: #E3F3EC;
}
/* El PDF en rojo oscuro (6,6:1 sobre su fondo), como lo reconoce la gente. */
.doc-card__icon--pdf{ color: #A4161A; background: #FBE9E9; }
.doc-card__heading{ min-width: 0; }
.doc-card__category{ margin: 0 0 .15rem; font-size: .78rem; font-weight: 700; color: var(--color-primary); }
.doc-card__title{
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-main);
    overflow-wrap: anywhere;
}
.doc-card__meta{
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin: 0;
    font-size: .82rem;
    color: var(--color-text-muted);
}
.doc-card__meta .bi{ margin-right: .2rem; }
.doc-card__text{ margin: 0; color: var(--color-text-muted); }
.doc-card__actions{
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
    padding-top: .25rem;
}
.doc-card__actions .button{ min-height: 44px; }
@media (prefers-reduced-motion: reduce){ .doc-card{ transition: none; } }
:root.high-contrast .doc-card__icon{ background: transparent; border: 1px solid currentColor; }

/* --- Mapa del sitio en árbol (2026-11-13, imagen de referencia del usuario) --- */
.sitemap-tree{ margin-top: 1rem; font-size: .9rem; line-height: 1.4; }
.sitemap-tree ul{ list-style: none; margin: 0; padding: 0; }
.sitemap-tree ul ul{
    margin-left: .55rem;
    padding-left: 1.1rem;
    border-left: 1px solid var(--border-color);
}
.sitemap-tree li{ position: relative; }
/* Rama horizontal hacia cada elemento. */
.sitemap-tree ul ul > li::before{
    content: '';
    position: absolute;
    top: .95rem;
    left: -1.1rem;
    width: .85rem;
    border-top: 1px solid var(--border-color);
}
/* El último hijo corta la línea vertical a la altura de su rama. */
.sitemap-tree ul ul > li:last-child::after{
    content: '';
    position: absolute;
    top: calc(.95rem + 1px);
    bottom: 0;
    left: calc(-1.1rem - 1px);
    width: 2px;
    background: var(--color-bg-main);
}
.sitemap-tree a,
.sitemap-tree span{
    display: inline-block;
    min-height: 24px;
    padding: .25rem .3rem;
    color: var(--color-text-main);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.sitemap-tree a:hover{ color: var(--color-primary); text-decoration: underline; }
.sitemap-tree a:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
.sitemap-tree > ul > li > a{ font-weight: 700; }
.sitemap-tree a .bi{ font-size: .75em; color: var(--color-text-muted); }

/* --- Auditoría compacta (2026-11-13, pedido del usuario: "se ve muy extenso") --- */
.audit-filters{
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 860px;
    margin: 1rem 0 1.25rem;
}
/* En columna, el "flex: 1 1 350px" del buscador se volvía 350 px de ALTO. */
.audit-filters .search-component{ flex: 0 0 auto; }
.audit-filters__more{
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
}
.audit-filters__more > summary{
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: 0 1rem;
    cursor: pointer;
    color: var(--color-primary);
    font-weight: 700;
}
.audit-filters__more > summary small{ color: var(--color-text-muted); font-weight: 400; }
.audit-filters__more[open] > summary{ border-bottom: 1px solid var(--border-color); }
.audit-filters__more .form-grid{ padding: 1rem; }
.audit-filters__actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    padding: 0 1rem 1rem;
}
.audit-count{ margin: 0 0 .5rem; color: var(--color-text-muted); }
.audit-table td{ vertical-align: top; }
.audit-table td small{ color: var(--color-text-muted); }
.audit-table td:first-child{ white-space: nowrap; }
.audit-table .badge{ margin-left: .35rem; }
.audit-module{ display: block; }
.audit-target{ display: block; overflow-wrap: anywhere; }
.audit-detail > summary{
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    color: var(--color-primary);
    font-weight: 700;
}
/* En computador el detalle abierto flota a la izquierda de su botón, sobre la misma fila: si ensanchaba
   la columna, la tabla dejaba de caber y pasaba entera a tarjetas. En celular (tarjetas) va en su lugar. */
.audit-table:not(.table--cards) td:last-child{ position: relative; }
.audit-table:not(.table--cards) .audit-detail__body{
    position: absolute;
    top: .5rem;
    right: calc(100% - .5rem);
    z-index: 5;
    width: min(24rem, 70vw);
    padding: .75rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    box-shadow: 0 8px 24px rgb(0 0 0 / .15);
}
.audit-detail dl{
    margin: .25rem 0 .5rem;
    font-size: .85rem;
}
.audit-detail dt{ color: var(--color-text-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.audit-detail dd{ margin: 0 0 .35rem; overflow-wrap: anywhere; }
.audit-detail pre{
    max-width: 100%;
    margin: 0;
    padding: .5rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .8rem;
    background: var(--color-bg, #F4F6F8);
    border-radius: .3rem;
}

/* --- Tablas limpias (2026-11-13, pedido del usuario: "la información está bien, pero no me gusta el diseño";
       eligió "Limpio y moderno"). Al final del archivo para ganarle a las reglas generales de arriba. --- */
th{
    padding-top: .7rem;
    padding-bottom: .7rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    background: #F7F9FA;
}
thead th{ border-bottom: 1px solid var(--border-color); }
td{ padding-top: .85rem; padding-bottom: .85rem; font-variant-numeric: tabular-nums; }
/* Sin rayas alternas: la fila se marca solo al pasar el mouse. */
tbody tr:nth-child(even) td{ background: transparent; }
tbody tr:hover td{ background: #F2F8F5; }
tbody tr:last-child td{ border-bottom: 0; }
/* Código en negrita y el nombre debajo, más pequeño y suave. */
.table-column-name{ margin-bottom: .2rem; font-size: .95rem; text-transform: none; }
.table-column-name + p{ font-size: .86rem; line-height: 1.4; color: var(--color-text-muted); }
/* Botones de solo ícono: sin caja, con el mismo tamaño táctil (44 px) y fondo suave al señalarlos.
   Los que llevan texto ("Ver cronograma", "Ver evidencias") conservan su borde. */
td[data-table-action] .button:not(:has(> span:not(.visually-hidden))){
    min-width: 44px;
    min-height: 44px;
    padding: .55rem;
    color: var(--color-text-muted);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
td[data-table-action] .button:not(:has(> span:not(.visually-hidden))):hover,
td[data-table-action] .button:not(:has(> span:not(.visually-hidden))):focus-visible{
    color: var(--color-primary);
    background: #E3F3EC;
    border-color: transparent;
}
td[data-table-action] .button-outline--delete:not(:has(> span:not(.visually-hidden))){ color: #B91C1C; }
td[data-table-action] .button-outline--delete:not(:has(> span:not(.visually-hidden))):hover,
td[data-table-action] .button-outline--delete:not(:has(> span:not(.visually-hidden))):focus-visible{ color: #B91C1C; background: #FDECEC; }
td[data-table-action] .button-outline--warning:not(:has(> span:not(.visually-hidden))){ color: #92400E; }
td[data-table-action] .button-outline--warning:not(:has(> span:not(.visually-hidden))):hover,
td[data-table-action] .button-outline--warning:not(:has(> span:not(.visually-hidden))):focus-visible{ color: #92400E; background: #FEF3C7; }
td[data-table-action] .button:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
td[data-table-action] form{ display: inline-flex; }
td[data-table-action] .bi{ font-size: 1.1rem; }
:root.high-contrast th{ background: #000000; color: #ffffff; }
:root.high-contrast tbody tr:hover td{ background: #1a1a1a; }

/* Historial de cambios del proyecto (2026-11-20) */
.history-table td{ vertical-align: top; }
.history-table td small{ color: var(--color-text-muted); }
.history-table td:first-child{ white-space: nowrap; }
.history-table__what{ margin: 0; overflow-wrap: anywhere; }
.history-changes{
    list-style: none;
    margin: .35rem 0 0;
    padding: 0;
    font-size: .9rem;
    color: var(--color-text-muted);
}
.history-changes li{ padding: .1rem 0; overflow-wrap: anywhere; }
.history-changes li::before{ content: none; }
.history-changes__field{ font-weight: 700; color: var(--color-text-main); }

/* Aviso antes de que venza la sesión del panel (2026-11-25). Usa la caja de .sector-quick. */
.session-dialog__clock{ font-variant-numeric: tabular-nums; color: var(--color-text-main); }
/* .button trae display: inline-flex, que le gana al atributo hidden: sin esto se veían los dos botones. */
.session-dialog [hidden]{ display: none !important; }

/* Evidencias de un proyecto en el panel (mejorada el 2026-12-01): filtros, foto con etiqueta de color y acciones limpias. */
.evidence-filters{ display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.evidence-filters__chip{
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--color-bg-card);
    color: var(--color-text-main);
    text-decoration: none;
    font-size: .9rem;
}
.evidence-filters__chip:hover{ border-color: var(--color-primary); color: var(--color-primary); }
.evidence-filters__chip[aria-current='true']{ background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; font-weight: 700; }
.evidence-filters__count{ display: inline-flex; min-width: 1.5rem; justify-content: center; padding: 0 .4rem; border-radius: 999px; background: rgb(0 0 0 / .07); font-size: .8rem; font-variant-numeric: tabular-nums; }
.evidence-filters__chip[aria-current='true'] .evidence-filters__count{ background: #ffffff; color: var(--color-primary); }
.evidence-admin__text--empty{ color: var(--color-text-muted); font-style: italic; }
.evidence-admin-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.evidence-admin-grid > .alert{ grid-column: 1 / -1; }
.evidence-admin{
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    transition: border-color .15s ease;
}
.evidence-admin:hover{ border-color: var(--color-primary); }
.evidence-admin__photo{ position: relative; display: block; }
.evidence-admin__photo img{ display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.evidence-admin__photo:focus-visible{ outline: 3px solid var(--color-primary); outline-offset: -3px; }
.evidence-admin__body{ display: flex; flex-direction: column; gap: .4rem; flex: 1; padding: .85rem 1rem .5rem; }
.evidence-admin__meta{ display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; font-size: .85rem; color: var(--color-text-muted); }
.evidence-admin__meta .bi{ margin-right: .2rem; }
.evidence-admin__text{
    margin: 0;
    font-size: .92rem;
    color: var(--color-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.evidence-admin__actions{ display: flex; justify-content: flex-end; gap: .25rem; margin-top: auto; padding-top: .25rem; border-top: 1px solid var(--border-color); }
.evidence-admin__actions .button{
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
}
.evidence-admin__actions .button:hover{ color: var(--color-primary); background: #F2F8F5; }
.evidence-admin__actions .evidence-admin__delete:hover{ color: #B91C1C; background: #FDECEC; }
.evidence-admin__actions .button:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
.evidence-admin__actions .bi{ font-size: 1.1rem; }
.evidence-admin__back{ margin-top: 1.75rem; }
