/* =====================================================================
   Asistencia GISPAC · Sistema de diseño con tokens (Claro / Oscuro / Auto)
   ---------------------------------------------------------------------
   Todos los colores salen de variables CSS (tripletas RGB). Tailwind las
   consume vía tailwind.config (bg-card, text-fg, border-line, bg-accent…)
   y este archivo las consume con rgb(var(--c-…)). Cambiar de tema = cambiar
   la clase .light / .dark en <html>; nada queda "pegado" en un color.
   ===================================================================== */

/* ------------------------------------------------ Tema OSCURO (por defecto) */
:root,
html.dark {
    --c-app: 15 17 21;          /* fondo de página          #0f1115 */
    --c-panel: 20 23 28;        /* sidebar / barras         #14171c */
    --c-card: 24 27 33;         /* tarjetas                 #181b21 */
    --c-inset: 30 34 41;        /* zonas internas / thead   #1e2229 */
    --c-soft: 39 44 53;         /* botones secundarios      #272c35 */
    --c-field: 18 21 26;        /* inputs                   #12151a */
    --c-line: 45 51 62;         /* bordes                   #2d333e */
    --c-fg: 236 240 245;        /* texto principal          #ecf0f5 */

    --c-accent: 20 150 120;     /* verde azulado sobrio     #149678 */
    --c-accent-hover: 16 128 102;
    --c-accent-ink: 94 210 178; /* acento para texto        #5ed2b2 */
    --c-on-accent: 255 255 255;

    /* Escala neutra (Tailwind zinc-*) */
    --z50: 250 250 250; --z100: 244 244 245; --z200: 226 228 233; --z300: 205 209 216;
    --z400: 156 163 175; --z500: 115 122 134; --z600: 82 89 101; --z700: 58 64 75;
    --z800: 39 43 51; --z900: 27 30 36; --z950: 14 16 20;

    /* Colores de estado (texto) legibles en oscuro */
    --emerald-300: 110 231 183; --emerald-400: 52 211 153;
    --rose-300: 253 164 175;    --rose-400: 251 113 133;
    --amber-300: 252 211 77;    --amber-400: 251 191 36;
    --sky-300: 125 211 252;     --sky-400: 56 189 248;
    --red-400: 248 113 113;     --green-400: 74 222 128;
    --orange-400: 251 146 60;   --yellow-400: 250 204 21; --blue-400: 96 165 250;

    --sombra: 0 6px 24px rgba(0, 0, 0, .35);
    --overlay: rgba(5, 7, 10, .65);
    color-scheme: dark;
}

/* ------------------------------------------------ Tema CLARO */
html.light {
    --c-app: 243 245 248;       /* #f3f5f8 */
    --c-panel: 255 255 255;
    --c-card: 255 255 255;
    --c-inset: 246 248 250;     /* #f6f8fa */
    --c-soft: 234 238 243;      /* #eaeef3 */
    --c-field: 255 255 255;
    --c-line: 223 228 235;      /* #dfe4eb */
    --c-fg: 22 30 46;           /* #161e2e */

    --c-accent: 15 138 110;     /* #0f8a6e */
    --c-accent-hover: 11 112 89;
    --c-accent-ink: 10 115 92;
    --c-on-accent: 255 255 255;

    --z50: 15 23 42;  --z100: 30 41 59;  --z200: 40 50 68;  --z300: 61 72 92;
    --z400: 95 107 126; --z500: 115 126 144; --z600: 156 166 181; --z700: 210 216 225;
    --z800: 232 236 241; --z900: 241 244 248; --z950: 248 250 252;

    --emerald-300: 5 150 105;   --emerald-400: 4 120 87;
    --rose-300: 225 29 72;      --rose-400: 190 18 60;
    --amber-300: 180 83 9;      --amber-400: 161 72 8;
    --sky-300: 2 132 199;       --sky-400: 3 105 161;
    --red-400: 185 28 28;       --green-400: 21 128 61;
    --orange-400: 194 65 12;    --yellow-400: 161 98 7; --blue-400: 29 78 216;

    --sombra: 0 4px 18px rgba(15, 23, 42, .07);
    --overlay: rgba(15, 23, 42, .35);
    color-scheme: light;
}

/* ------------------------------------------------ Base */
* { box-sizing: border-box; }

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    position: relative;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: rgb(var(--c-app));
    color: rgb(var(--c-fg));
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* Transición suave al cambiar de tema */
html.tema-transicion *, html.tema-transicion *::before, html.tema-transicion *::after {
    transition: background-color .25s ease, border-color .25s ease, color .2s ease !important;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgb(var(--c-app)); }
::-webkit-scrollbar-thumb { background: rgb(var(--c-line)); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--z600)); }

a { color: rgb(var(--c-accent-ink)); text-decoration: none; transition: color .15s; }
a:hover { color: rgb(var(--c-accent)); }

select option { background: rgb(var(--c-card)); color: rgb(var(--c-fg)); }
input[type=checkbox], input[type=radio] { accent-color: rgb(var(--c-accent)); }
input::placeholder, textarea::placeholder { color: rgb(var(--z500)); }

/* =====================================================================
   LAYOUT DEL PANEL (Sidebar fijo + barra superior + menú hamburguesa)
   ===================================================================== */
:root { --sidebar-w: 264px; }

.layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    background: rgb(var(--c-app));
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: rgb(var(--c-panel));
    border-right: 1px solid rgb(var(--c-line));
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.sidebar nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.panel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    transition: margin-left .28s cubic-bezier(.4, 0, .2, 1);
}

/* Escritorio: el botón hamburguesa colapsa/expande la barra lateral */
html.sidebar-colapsado .sidebar { transform: translateX(-100%); }
html.sidebar-colapsado .panel-main { margin-left: 0; }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

/* Móvil / tablet: la barra lateral se vuelve un cajón (drawer) */
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
    .panel-main { margin-left: 0 !important; width: 100% !important; max-width: 100vw !important; }
    html.sidebar-abierto .sidebar { transform: translateX(0); }
    html.sidebar-abierto .sidebar-overlay { opacity: 1; pointer-events: auto; }
    html.sidebar-abierto, html.sidebar-abierto body { overflow: hidden; }
}

.topbar-panel {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgb(var(--c-panel) / .88);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgb(var(--c-line));
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.contenido {
    flex: 1;
    padding: 24px 28px 24px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}
@media (max-width: 860px) { .contenido { padding: 16px 16px 20px; } }
.contenido-estrecho { max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box; }

/* Enlaces del menú lateral */
.nav-seccion {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgb(var(--z500));
    padding: 14px 12px 6px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--z400));
    transition: background .15s, color .15s;
}
.nav-link .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.nav-link:hover { background: rgb(var(--c-soft)); color: rgb(var(--c-fg)); }
.nav-link.activo {
    background: rgb(var(--c-accent) / .14);
    color: rgb(var(--c-accent-ink));
    box-shadow: inset 3px 0 0 rgb(var(--c-accent));
}

/* Botón hamburguesa reutilizable */
.btn-hamburguesa {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-card));
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s, transform .1s;
}
@media (min-width: 1024px) {
    .topbar-panel .btn-hamburguesa {
        display: none !important;
    }
}
.btn-hamburguesa:hover { background: rgb(var(--c-soft)); }
.btn-hamburguesa:active { transform: scale(.96); }
.btn-hamburguesa span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: rgb(var(--c-fg));
}

/* Selector de tema (segmentado). Estado activo según data-tema-pref en <html> */
.tema-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: rgb(var(--c-inset));
    border: 1px solid rgb(var(--c-line));
}
.tema-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgb(var(--z400));
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.tema-switch.ancho { display: flex; }
.tema-switch.ancho button { flex: 1; }
.tema-switch button:hover { color: rgb(var(--c-fg)); }
html[data-tema-pref="light"] .tema-switch [data-tema-btn="light"],
html[data-tema-pref="auto"]  .tema-switch [data-tema-btn="auto"],
html[data-tema-pref="dark"]  .tema-switch [data-tema-btn="dark"] {
    background: rgb(var(--c-card));
    color: rgb(var(--c-accent-ink));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 0 0 1px rgb(var(--c-line));
}

/* =====================================================================
   ENCABEZADOS, TARJETAS, MÉTRICAS
   ===================================================================== */
.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.encabezado h1 { margin: 0; font-size: 22px; font-weight: 800; color: rgb(var(--c-fg)); letter-spacing: -.3px; }
.encabezado p { margin: 4px 0 0; color: rgb(var(--z400)); font-size: 13px; }

.tarjeta {
    background: rgb(var(--c-card));
    border: 1px solid rgb(var(--c-line));
    border-radius: 16px;
    box-shadow: var(--sombra);
    padding: 20px;
    margin-bottom: 20px;
    color: rgb(var(--c-fg));
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.tarjeta h2, .tarjeta h3 { color: rgb(var(--c-fg)); }
.tarjeta h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* =====================================================================
   TABLAS
   ===================================================================== */
.tabla-contenedor,
.overflow-x-auto {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 12px;
}
.tabla-contenedor { border: 1px solid rgb(var(--c-line)); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13px; background: rgb(var(--c-card)); }
.tabla th {
    text-align: left;
    background: rgb(var(--c-inset));
    color: rgb(var(--z400));
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 11px 14px;
    border-bottom: 1px solid rgb(var(--c-line));
    white-space: nowrap;
}
.tabla td {
    padding: 12px 14px;
    border-bottom: 1px solid rgb(var(--c-line) / .7);
    vertical-align: middle;
    color: rgb(var(--c-fg));
}
.tabla tr:hover td { background: rgb(var(--c-inset) / .6); }
.tabla .acciones { white-space: nowrap; text-align: right; }
.tabla .acciones form { display: inline; }
.vacio { text-align: center; color: rgb(var(--z500)); padding: 32px !important; }

/* =====================================================================
   CHIPS
   ===================================================================== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: rgb(var(--emerald-400) / .14);
    color: rgb(var(--emerald-400));
    border: 1px solid rgb(var(--emerald-400) / .3);
}
.chip.azul    { background: rgb(var(--sky-400) / .14);   color: rgb(var(--sky-400));   border-color: rgb(var(--sky-400) / .3); }
.chip.naranja { background: rgb(var(--amber-400) / .14); color: rgb(var(--amber-400)); border-color: rgb(var(--amber-400) / .3); }
.chip.rojo    { background: rgb(var(--rose-400) / .14);  color: rgb(var(--rose-400));  border-color: rgb(var(--rose-400) / .3); }
.chip.gris    { background: rgb(var(--z500) / .14);      color: rgb(var(--z400));      border-color: rgb(var(--z500) / .3); }

/* =====================================================================
   BOTONES
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgb(var(--c-accent));
    color: rgb(var(--c-on-accent));
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: rgb(var(--c-accent-hover)); color: rgb(var(--c-on-accent)); }
.btn:active { transform: translateY(1px); }
.btn.secundario { background: rgb(var(--c-soft)); color: rgb(var(--c-fg)); border-color: rgb(var(--c-line)); }
.btn.secundario:hover { background: rgb(var(--c-inset)); }
.btn.peligro { background: rgb(var(--rose-400) / .12); color: rgb(var(--rose-400)); border-color: rgb(var(--rose-400) / .3); }
.btn.peligro:hover { background: rgb(225 29 72); color: #fff; }
.btn.chico { padding: 5px 10px; font-size: 11px; border-radius: 8px; }
.btn.enlace { background: none; border: none; color: rgb(var(--c-accent-ink)); padding: 0; font-weight: 600; }
.btn.enlace.rojo { color: rgb(var(--rose-400)); }

/* =====================================================================
   FORMULARIOS
   ===================================================================== */
.campo { margin-bottom: 16px; }
.campo label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: rgb(var(--z300)); }

.campo input[type=text], .campo input[type=password], .campo input[type=email],
.campo input[type=date], .campo input[type=number], .campo input[type=time],
.campo select, .campo textarea, .filtros input, .filtros select,
.input-grande, .textarea-grande {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgb(var(--c-line));
    border-radius: 10px;
    font-size: 14px;
    background: rgb(var(--c-field));
    color: rgb(var(--c-fg));
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus,
.filtros input:focus, .filtros select:focus, .input-grande:focus, .textarea-grande:focus {
    outline: none;
    border-color: rgb(var(--c-accent));
    box-shadow: 0 0 0 3px rgb(var(--c-accent) / .18);
}
.input-grande { font-size: 15px; padding: 12px 14px; border-radius: 12px; }
.textarea-grande { padding: 12px 14px; border-radius: 12px; }

.campo .ayuda { font-size: 12px; color: rgb(var(--z400)); margin-top: 4px; }
.campo .error { color: rgb(var(--rose-400)); font-size: 13px; margin-top: 4px; }
.errores-form {
    background: rgb(var(--rose-400) / .1);
    border: 1px solid rgb(var(--rose-400) / .3);
    color: rgb(var(--rose-400));
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}
.campo.check label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: rgb(var(--c-fg)); }
.campo.check input { width: 18px; height: 18px; }
.campo ul.opciones, .campo div.opciones {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px;
}
.campo .opciones label { font-weight: 400; display: flex; gap: 6px; align-items: center; color: rgb(var(--z300)); }
.campo .opciones div { margin: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .ancho { grid-column: 1 / -1; }
.botones { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filtros > div { flex: 1 1 150px; }
.filtros label {
    display: block; font-size: 11px; font-weight: 700; color: rgb(var(--z400));
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}

/* =====================================================================
   MENSAJES Y PAGINACIÓN
   ===================================================================== */
.mensajes { list-style: none; padding: 0; margin: 0 0 18px; }
.mensajes li {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    background: rgb(var(--emerald-400) / .1);
    color: rgb(var(--emerald-400));
    border: 1px solid rgb(var(--emerald-400) / .25);
}
.mensajes li.error   { background: rgb(var(--rose-400) / .1);  color: rgb(var(--rose-400));  border-color: rgb(var(--rose-400) / .25); }
.mensajes li.warning { background: rgb(var(--amber-400) / .1); color: rgb(var(--amber-400)); border-color: rgb(var(--amber-400) / .25); }

.paginacion { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 14px; font-size: 13px; flex-wrap: wrap; }
.paginacion a, .paginacion span {
    padding: 6px 12px; border-radius: 8px;
    border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-card)); color: rgb(var(--z300));
}
.paginacion .actual { background: rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); border-color: rgb(var(--c-accent)); font-weight: 700; }

/* =====================================================================
   LOGIN / PANTALLAS CENTRADAS
   ===================================================================== */
.pantalla-centrada { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.caja-login {
    background: rgb(var(--c-card)); width: 100%; max-width: 420px; border-radius: 20px;
    padding: 36px 30px; box-shadow: var(--sombra); border: 1px solid rgb(var(--c-line));
}
.caja-login h1 { margin: 0 0 6px; color: rgb(var(--c-fg)); font-size: 22px; font-weight: 800; text-align: center; }
.caja-login p.sub { text-align: center; color: rgb(var(--z400)); margin: 0 0 24px; font-size: 13px; }
.caja-login .btn { width: 100%; padding: 13px; font-size: 15px; border-radius: 12px; }

/* =====================================================================
   INTERFAZ DEL GUARDIA (móvil)
   ===================================================================== */
.barra-simple {
    background: rgb(var(--c-panel) / .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    color: rgb(var(--c-fg));
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 14px)) 10px max(14px, env(safe-area-inset-left, 14px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgb(var(--c-line));
    position: sticky;
    top: 0;
    z-index: 100;
}
.inline { display: inline; }
.texto-suave { color: rgb(var(--z400)); }
.derecha { text-align: right; }
.saludo-guardia { display: flex; align-items: center; gap: 8px; min-width: 0; }
.icono-saludo { font-size: 20px; }
.buen-dia { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: rgb(var(--c-accent-ink)); font-weight: 700; }
.nombre-guardia {
    font-size: 14px; font-weight: 700; color: rgb(var(--c-fg));
    max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.btn-salir-guardia {
    background: rgb(var(--c-soft)); border: 1px solid rgb(var(--c-line)); color: rgb(var(--c-fg));
    padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-salir-guardia:hover { background: rgb(var(--c-inset)); }

.contenido-simple {
    background: rgb(var(--c-app));
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}
.contenedor-guardia {
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 14px 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Barra inferior estilo app nativa */
.nav-movil-fija {
    position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
    background: rgb(var(--c-panel) / .95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgb(var(--c-line));
    display: flex; justify-content: space-around; align-items: center;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; height: 100%; color: rgb(var(--z500)); font-size: 10px; font-weight: 600;
    -webkit-tap-highlight-color: transparent; transition: color .2s;
}
.nav-item:hover { color: rgb(var(--c-fg)); }
.nav-item .nav-icon { font-size: 19px; margin-bottom: 2px; transition: transform .15s; }
.nav-item.activo { color: rgb(var(--c-accent-ink)); font-weight: 700; }
.nav-item.activo .nav-icon { transform: scale(1.12); }

/* Drawer del guardia */
.drawer-menu { position: fixed; inset: 0; z-index: 10000; pointer-events: none; visibility: hidden; transition: visibility .3s; }
.drawer-menu.abierto { pointer-events: auto; visibility: visible; }
.drawer-overlay { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .3s; backdrop-filter: blur(3px); }
.drawer-menu.abierto .drawer-overlay { opacity: 1; }
.drawer-content {
    position: absolute; top: 0; left: 0; width: 290px; max-width: 84vw; height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    background: rgb(var(--c-panel)); border-right: 1px solid rgb(var(--c-line));
    box-shadow: 8px 0 30px rgba(0, 0, 0, .25);
    transform: translateX(-100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column;
}
.drawer-menu.abierto .drawer-content { transform: translateX(0); }
.drawer-header {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 16px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgb(var(--c-line)); color: rgb(var(--c-fg));
}
.btn-cerrar-drawer { background: none; border: none; color: rgb(var(--z400)); font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.btn-cerrar-drawer:hover { color: rgb(var(--c-fg)); background: rgb(var(--c-soft)); }
.drawer-perfil { padding: 14px 16px; background: rgb(var(--c-inset)); border-bottom: 1px solid rgb(var(--c-line)); }
.drawer-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.drawer-nav-seccion { font-size: 10px; font-weight: 700; color: rgb(var(--z500)); letter-spacing: .1em; padding: 8px 12px 4px; text-transform: uppercase; }
.drawer-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 3px;
    color: rgb(var(--z400)); font-size: 14px; font-weight: 600; border-radius: 12px;
    -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s;
}
.drawer-link:hover { background: rgb(var(--c-soft)); color: rgb(var(--c-fg)); }
.drawer-link.activo { background: rgb(var(--c-accent) / .14); color: rgb(var(--c-accent-ink)); box-shadow: inset 3px 0 0 rgb(var(--c-accent)); }
.drawer-footer { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgb(var(--c-line)); }
.btn-drawer-logout {
    width: 100%; padding: 10px; border-radius: 12px; cursor: pointer;
    border: 1px solid rgb(var(--rose-400) / .3); background: rgb(var(--rose-400) / .1); color: rgb(var(--rose-400));
    font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* =====================================================================
   PERMISOS (vista del guardia)
   ===================================================================== */
.tarjeta-permiso-movil {
    background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line));
    border-radius: 16px; padding: 20px; box-shadow: var(--sombra); color: rgb(var(--c-fg));
}
.tarjeta-permiso-movil h2, .tarjeta-permiso-movil h3 { color: rgb(var(--c-fg)); }
.header-permisos h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.sub-permisos { margin: 0 0 18px; color: rgb(var(--z400)); font-size: 13px; line-height: 1.45; }
.btn-solicitar-permiso {
    width: 100%; padding: 14px; font-size: 15px; font-weight: 800; margin-top: 10px; cursor: pointer;
    border: 0; border-radius: 12px; background: rgb(var(--c-accent)); color: rgb(var(--c-on-accent));
    transition: background .15s;
}
.btn-solicitar-permiso:hover { background: rgb(var(--c-accent-hover)); }
.card-permiso-item {
    background: rgb(var(--c-inset)); border: 1px solid rgb(var(--c-line)); border-left: 4px solid rgb(var(--z500));
    border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.card-permiso-item.borde-pendiente { border-left-color: rgb(var(--amber-400)); }
.card-permiso-item.borde-aprobado  { border-left-color: rgb(var(--emerald-400)); }
.card-permiso-item.borde-rechazado { border-left-color: rgb(var(--rose-400)); }
.permiso-encabezado { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.permiso-fecha { font-weight: 700; font-size: 14px; color: rgb(var(--c-fg)); }
.permiso-motivo { margin: 6px 0; font-size: 13px; color: rgb(var(--z300)); }
.permiso-resolucion {
    margin-top: 10px; padding: 10px 12px; background: rgb(var(--c-card)); border-radius: 10px;
    font-size: 12px; border: 1px dashed rgb(var(--c-line)); color: rgb(var(--z400));
}
.permiso-resolucion p { margin: 4px 0; font-weight: 600; color: rgb(var(--c-fg)); }
.permiso-pendiente-aviso { margin-top: 8px; font-size: 12px; color: rgb(var(--amber-400)); font-weight: 600; }
.permiso-pie { margin-top: 8px; font-size: 11px; color: rgb(var(--z500)); }

/* =====================================================================
   CALENDARIO DE VACACIONES (respeta el tema)
   ===================================================================== */
.calendario-contenedor-movil { width: 100%; max-width: 100%; overflow: hidden; }
.calendario-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; width: 100%; }
.calendario-header h2, .calendario-header h3, #mes-titulo {
    margin: 0; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: rgb(var(--c-fg)) !important; font-size: 16px; font-weight: 800; text-transform: capitalize;
}
.btn-cal-nav { flex-shrink: 0; white-space: nowrap; }
.instruccion-rango {
    font-size: 12px; color: rgb(var(--z300)); background: rgb(var(--c-inset));
    border: 1px solid rgb(var(--c-line)); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}
.instruccion-rango strong { color: rgb(var(--c-accent-ink)); }
.calendario-grid, .calendario-dias {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; width: 100%;
}
.calendario-grid { margin-bottom: 4px; }
.dia-semana-head { text-align: center; font-size: 11px; font-weight: 700; color: rgb(var(--z500)); padding: 6px 0; text-transform: uppercase; }
.celda-dia {
    aspect-ratio: 1 / 1; min-height: 36px; max-height: 52px; min-width: 0; width: 100%;
    background: rgb(var(--c-inset)); border: 1px solid rgb(var(--c-line)); border-radius: 9px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; cursor: pointer; user-select: none; padding: 2px;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s, background-color .15s, border-color .15s;
}
.celda-dia:hover:not(.vacio) { background: rgb(var(--c-soft)); border-color: rgb(var(--z600)); }
.celda-dia.vacio { background: transparent; border-color: transparent; cursor: default; }
.celda-dia .numero-dia { font-size: 12px; font-weight: 600; color: rgb(var(--z300)); line-height: 1; }
.celda-dia.dia-hoy { border: 2px solid rgb(var(--c-accent)); }
.celda-dia.dia-hoy .numero-dia { color: rgb(var(--c-accent-ink)); font-weight: 800; }
.celda-dia.dia-vacacion-existente { background: rgb(var(--sky-400) / .15); border-color: rgb(var(--sky-400) / .45); }
.celda-dia.dia-vacacion-existente .numero-dia { color: rgb(var(--sky-400)); font-weight: 800; }
.celda-dia .badge-palmera { font-size: 10px; position: absolute; bottom: 2px; }

/* Estados del Calendario de Asistencias e Inasistencias */
.celda-dia.dia-asistencia {
    background: rgb(var(--emerald-400) / .15) !important;
    border-color: rgb(var(--emerald-400) / .5) !important;
}
.celda-dia.dia-asistencia .numero-dia {
    color: rgb(var(--emerald-400)) !important;
    font-weight: 800;
}
.celda-dia.dia-falta {
    background: rgb(var(--rose-400) / .18) !important;
    border-color: rgb(var(--rose-400) / .55) !important;
}
.celda-dia.dia-falta .numero-dia {
    color: rgb(var(--rose-400)) !important;
    font-weight: 800;
}
.celda-dia.dia-descanso {
    background: rgb(var(--c-soft) / .6);
    border-color: rgb(var(--c-line) / .8);
}
.celda-dia.dia-descanso .numero-dia {
    color: rgb(var(--z400));
}
.celda-dia.dia-permiso {
    background: rgb(var(--amber-400) / .15) !important;
    border-color: rgb(var(--amber-400) / .5) !important;
}
.celda-dia.dia-permiso .numero-dia {
    color: rgb(var(--amber-400)) !important;
    font-weight: 800;
}
.celda-dia.celda-seleccionada {
    outline: 2px solid rgb(var(--c-accent));
    outline-offset: 1px;
    z-index: 5;
}
.badge-dia-sub {
    font-size: 8.5px;
    line-height: 1;
    font-weight: 800;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 92%;
    text-align: center;
}
.celda-dia.dia-en-rango { background: rgb(var(--c-accent) / .16) !important; border-color: rgb(var(--c-accent) / .6) !important; }
.celda-dia.dia-en-rango .numero-dia { color: rgb(var(--c-accent-ink)) !important; font-weight: 700; }
.celda-dia.dia-rango-inicio, .celda-dia.dia-rango-fin {
    background: rgb(var(--c-accent)) !important; border-color: rgb(var(--c-accent)) !important; transform: scale(1.04); z-index: 2;
}
.celda-dia.dia-rango-inicio .numero-dia, .celda-dia.dia-rango-fin .numero-dia { color: rgb(var(--c-on-accent)) !important; font-weight: 800; }
.leyenda-calendario {
    display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: rgb(var(--z400));
    margin-top: 14px; padding-top: 10px; border-top: 1px solid rgb(var(--c-line));
}
.leyenda-calendario > span { display: flex; align-items: center; gap: 6px; }
.muestra-color { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.muestra-vacacion { background: rgb(var(--sky-400) / .3); border: 1px solid rgb(var(--sky-400)); }
.muestra-seleccion { background: rgb(var(--c-accent) / .35); border: 1px solid rgb(var(--c-accent)); }
.muestra-hoy { border: 2px solid rgb(var(--c-accent)); background: transparent; }
.panel-confirmacion { color: rgb(var(--c-fg)); }

@media (max-width: 540px) {
    .tarjeta-permiso-movil { padding: 14px 10px; border-radius: 12px; }
    .calendario-grid { gap: 2px; }
    .calendario-dias { gap: 3px; }
    .dia-semana-head { font-size: 10px; padding: 4px 0; }
    .celda-dia { min-height: 32px; max-height: 46px; border-radius: 7px; }
    .celda-dia .numero-dia { font-size: 11px; }
    .txt-btn-nav { display: none; }
}

/* =====================================================================
   MENÚ HAMBURGUESA DE ACCIONES (tablas, p. ej. Personal)
   ===================================================================== */
.menu-acciones { position: relative; display: inline-block; }
.menu-acciones > summary { list-style: none; cursor: pointer; }
.menu-acciones > summary::-webkit-details-marker { display: none; }
.menu-acciones > summary.btn-hamburguesa { width: 36px; height: 36px; padding: 0 9px; border-radius: 10px; }
.menu-acciones[open] > summary.btn-hamburguesa { background: rgb(var(--c-accent) / .14); border-color: rgb(var(--c-accent) / .5); }
.menu-acciones-panel {
    position: fixed;
    z-index: 200;
    min-width: 230px;
    padding: 6px;
    border-radius: 14px;
    background: rgb(var(--c-card));
    border: 1px solid rgb(var(--c-line));
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
    text-align: left;
}
.menu-acciones-titulo {
    padding: 8px 10px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: rgb(var(--z500)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
}
.menu-acciones-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 10px; border: 0; border-radius: 10px; background: transparent;
    color: rgb(var(--c-fg)); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
    transition: background .12s;
}
.menu-acciones-item:hover { background: rgb(var(--c-soft)); color: rgb(var(--c-fg)); }
.menu-acciones-item .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.ico-svg {
    display: inline-block;
    vertical-align: middle;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}
.menu-acciones-item.peligro { color: rgb(var(--rose-400)); }
.menu-acciones-item.exito { color: rgb(var(--emerald-400)); }
.menu-acciones-item.deshabilitado { cursor: default; color: rgb(var(--emerald-400)); background: rgb(var(--emerald-400) / .08); }
.menu-acciones-sep { height: 1px; margin: 5px 4px; background: rgb(var(--c-line)); }
.menu-acciones-panel form { margin: 0; }

/* =====================================================================
   MONITOREO / LOGS
   ===================================================================== */
.tabla-logs td { padding: 8px 10px; vertical-align: top; }
.fila-log-error td { background: rgb(var(--rose-400) / .08); }
.fila-log-warning td { background: rgb(var(--amber-400) / .08); }
.traza-log {
    background: rgb(var(--c-inset)); color: rgb(var(--z300)); border: 1px solid rgb(var(--c-line));
    padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-size: 11px; font-family: monospace;
    white-space: pre-wrap; word-break: break-all; max-height: 240px; margin-top: 6px;
}

/* Modales (contenedor interior hereda tokens) */
.modal-contenido { background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line)); color: rgb(var(--c-fg)); }

/* =====================================================================
   OPTIMIZACIÓN RESPONSIVA INTEGRAL (MÓVILES Y TABLETS)
   ===================================================================== */
html[data-tema-pref="light"] .selector-tema-control [data-tema-btn="light"],
html[data-tema-pref="auto"]  .selector-tema-control [data-tema-btn="auto"],
html[data-tema-pref="dark"]  .selector-tema-control [data-tema-btn="dark"] {
    background: rgb(var(--c-card));
    color: rgb(var(--c-accent-ink));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 1px rgb(var(--c-line));
}

input[type="file"] {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabla-contenedor,
.overflow-x-auto {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
}

.overflow-x-auto > table,
.tabla-contenedor > table {
    width: 100%;
    min-width: 640px; /* Asegura visualización nítida y legible con scroll interno sin romper la pantalla */
}

@media (max-width: 640px) {
    /* Contención estricta de ancho: cero desbordamiento horizontal a la derecha sin bloquear el scroll vertical */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip !important;
        touch-action: manipulation !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .layout, .panel-main, .contenido-simple {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    .contenido {
        padding: 12px 10px 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }
    .contenedor-guardia {
        padding: 12px 10px 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    /* Tope visual limpio: el último elemento o paginador no deja espacio vacío al fondo */
    .contenido > :last-child,
    .contenedor-guardia > :last-child,
    .contenido > form > :last-child,
    .contenedor-guardia > form > :last-child,
    .tarjeta:last-child {
        margin-bottom: 0 !important;
    }

    /* Espacio exacto solo si está la barra fija inferior del guardia */
    body:has(.nav-movil-fija) .contenedor-guardia {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px) !important;
    }

    .encabezado {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .encabezado h1 {
        font-size: 18px;
        line-height: 1.25;
        word-break: break-word;
    }
    .encabezado > div:last-child,
    .encabezado .acciones {
        width: 100%;
        max-width: 100%;
    }
    .tarjeta {
        padding: 14px 12px;
        border-radius: 14px;
        margin-bottom: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .caja-login {
        padding: 22px 16px;
        border-radius: 16px;
    }
    .filtros {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .filtros > div {
        min-width: 100%;
        max-width: 100%;
    }
    .filtros .btn {
        width: 100%;
    }
    .tabla th,
    .tabla td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .acciones-form {
        flex-direction: column;
        align-items: stretch;
    }
    .acciones-form .btn {
        width: 100%;
        justify-content: center;
    }

    /* Dropdown de notificaciones y modales confinados al ancho de pantalla del móvil */
    .dropdown-notificaciones-caja {
        max-width: calc(100vw - 18px) !important;
        width: calc(100vw - 18px) !important;
        right: -6px !important;
    }
    .menu-acciones-panel {
        max-width: calc(100vw - 18px) !important;
    }

    /* Paginación compacta y ajustada a la pantalla */
    .paginacion {
        padding: 10px 4px;
        gap: 4px;
        font-size: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .paginacion a, .paginacion span {
        padding: 5px 8px;
        border-radius: 6px;
    }
}

/* =====================================================================
   ANIMACIÓN DE CARGA DE PUNTOS (DOT BOUNCE LOADER)
   ===================================================================== */
/* 1. Animación del rebote vertical (Bouncing) */
@keyframes dotBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-9px);
    opacity: 1;
  }
}

/* 2. Contenedor de los puntos */
.dots-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3. Estilo individual de cada punto (Color verde institucional del sistema) */
.dot {
  width: 10px;
  height: 10px;
  background-color: #149678;
  background-color: rgb(var(--c-accent));
  border-radius: 50%;
  animation: dotBounce 1.2s infinite ease-in-out both;
}

/* 4. Clave del efecto fluido: delays negativos escalonados */
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

/* Variante sobre botones con fondo verde/acento para máximo contraste en verde esmeralda claro */
.btn-dots-contrast .dot {
  background-color: #6ee7b7;
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.35);
}

/* Overlay flotante no intrusivo cuando una petición o subida tarda en responder */
.gispac-dots-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gispac-dots-overlay.activo {
  display: flex;
  opacity: 1;
}
.gispac-dots-card {
  background: rgb(var(--c-card));
  border: 1px solid rgb(var(--c-line));
  border-radius: 20px;
  padding: 22px 28px;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}
.gispac-dots-card .btn-text {
  font-size: 13px;
  font-weight: 800;
  color: rgb(var(--c-fg));
  letter-spacing: 0.2px;
}
.gispac-dots-card .dots-subtext {
  font-size: 11px;
  color: rgb(var(--z400));
  margin-top: -6px;
  line-height: 1.4;
}

/* =====================================================================
   PWA & ADAPTABILIDAD DUAL (IOS SAFARI + ANDROID STANDALONE + PC)
   ===================================================================== */

/* 1. Modo PWA Standalone en iOS (Safari "Agregar a inicio") y Android */
@media all and (display-mode: standalone), (display-mode: fullscreen) {
    /* Respetar notch, Dynamic Island y barra de estado superior */
    .topbar-panel,
    .barra-simple,
    .marca,
    .drawer-header {
        padding-top: max(env(safe-area-inset-top, 0px), 12px);
    }

    /* Respetar barra de gestos inferior de iPhone y Android */
    body,
    .drawer-footer {
        padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px);
    }

    /* En modo app instalada, ocultar los botones de invitación a instalar */
    .pwa-install-trigger {
        display: none !important;
    }
}

/* 2. Optimización para dispositivos táctiles (iOS Safari + Android <= 768px) */
@media (max-width: 768px) {
    /* Prevenir auto-zoom molesto de Safari en iPhone y Chrome en Android al tocar cualquier input */
    input,
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Ergonomía táctil para dedos en móviles (altura mínima confortable) */
    .btn,
    button.btn,
    a.btn,
    .btn-hamburguesa,
    .btn-salir-guardia,
    .btn-cerrar-drawer {
        min-height: 42px;
    }

    .nav-link,
    .drawer-link {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Resiliencia ante teclado virtual en iOS y Android: 100dvh para evitar saltos */
    .layout,
    .panel-main,
    .contenido,
    .contenido-simple,
    .pantalla-centrada {
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Suavizado de desplazamiento táctil horizontal en tablas */
    .overflow-x-auto,
    .tabla-contenedor {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: rgb(var(--c-accent) / .4) transparent;
    }

    .overflow-x-auto::-webkit-scrollbar,
    .tabla-contenedor::-webkit-scrollbar {
        height: 4px;
    }

    .overflow-x-auto::-webkit-scrollbar-thumb,
    .tabla-contenedor::-webkit-scrollbar-thumb {
        background: rgb(var(--c-accent) / .4);
        border-radius: 4px;
    }
}

/* 3. Experiencia amplia en PC (Pantallas >= 1024px) */
@media (min-width: 1024px) {
    .contenido {
        padding: 24px 32px 32px;
    }

    /* Cursor y feedback visual óptimo para mouse y teclado */
    .btn,
    .nav-link,
    button {
        cursor: pointer;
    }

    .nav-link:hover {
        transform: translateX(2px);
    }

    /* Indicador claro de foco para accesibilidad por teclado */
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible {
        outline: 2px solid rgb(var(--c-accent));
        outline-offset: 2px;
    }
}

