/* Estilo con la marca para las pantallas de CH: portal (index.html), ropa.html, ropa-stock.html y ropa-constancia.html.
   Hasta el 19/11/2026 se llamaba ropa-marca.css.
   Rediseño del 19/11/2026 con el manual de marca de Salvita, igual que Sonia (asistente.html):
   azul #1E347D, verde #27A737, Baloo 2 y Ubuntu, tema blanco con modo oscuro opcional, login azul con ondas
   y la onda del isotipo cerrando la cabecera. Solo cambia el diseño: los scripts de las pantallas son los de antes.
   Las clases de Tailwind que arma el script (colores de texto, botones de las listas, aviso) se repintan acá
   con "#app" o "body" adelante, para ganarle al CSS que Tailwind inyecta después. */
:root {
    --azul: #1E347D; --azul-hondo: #142559; --azul-noche: #0F1C47; --azul-luz: #2E4A9E; --azul-claro: #E8ECF7;
    --verde: #27A737; --verde-luz: #5BC866; --verde-hondo: #1A7F2A;
    --tinta: #1B2340; --apagado: #5B6478; --linea: #E3E7F0; --fondo: #F6F8FC;
    --panel: #FFFFFF; --panel-suave: #F3F5FA; --campo: #FFFFFF;
    --texto-fuerte: var(--azul); --verde-texto: var(--verde-hondo);
    --fila-alterna: #F8F9FD; --resalte: var(--azul-claro);
    --ok-fondo: #EEF8EF; --ok-borde: #C5E8C9; --ok-texto: #145C1E;
    --aviso: #8A5200;
    --error: #C8102E; --error-claro: #FDF0F2; --error-borde: #F6C9D1;
    --barra: #C9D2E8;
    --cab-fondo: #FFFFFF; --cab-texto: var(--azul); --cab-texto-suave: var(--apagado);
    --cab-boton-fondo: #FFFFFF; --cab-boton-borde: var(--linea); --cab-boton-hover: var(--azul-claro);
    --cab-ola-1: #2E4A9E; --cab-ola-2: #27A737;
    --titulos: 'Baloo 2', system-ui, sans-serif; --cuerpo: 'Ubuntu', system-ui, -apple-system, sans-serif;
    --sombra: 0 10px 30px rgba(20, 37, 89, .07), 0 1px 2px rgba(20, 37, 89, .06);
    --curva: cubic-bezier(.2, .8, .2, 1);
}
:root[data-tema="oscuro"] {
    --fondo: #0E1838; --panel: #16224A; --panel-suave: #101B40; --campo: #101B40;
    --tinta: #E8ECF7; --apagado: #A3AECB; --linea: #26356B;
    --texto-fuerte: #AFC2FF; --verde-texto: var(--verde-luz);
    --fila-alterna: #131E44; --resalte: #1D2B5C; --azul-claro: #1D2B5C;
    --ok-fondo: #11301F; --ok-borde: #24583A; --ok-texto: #9BE3A5;
    --aviso: #F5A524;
    --error: #FF8A99; --error-claro: #3A1622; --error-borde: #6B2433; --barra: #4A5FA6;
    --cab-fondo: radial-gradient(700px 300px at 12% 0%, var(--azul-luz) 0%, transparent 70%),
                 linear-gradient(160deg, var(--azul) 0%, #182C6E 55%, var(--azul-hondo) 100%);
    --cab-texto: #fff; --cab-texto-suave: rgba(255, 255, 255, .8);
    --cab-boton-fondo: rgba(255, 255, 255, .06); --cab-boton-borde: rgba(255, 255, 255, .28); --cab-boton-hover: rgba(255, 255, 255, .16);
    --cab-ola-1: #5BC866; --cab-ola-2: #27A737;
    --sombra: 0 10px 30px rgba(3, 8, 28, .45), 0 1px 2px rgba(3, 8, 28, .4);
    color-scheme: dark;
    background: #0E1838;
}
html.cambiando-tema *, html.cambiando-tema *::before, html.cambiando-tema *::after {
    transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease !important;
}
/* Lo mínimo que en las pantallas de Ropa pone Tailwind y el portal no carga. */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--cuerpo); color: var(--tinta); background: var(--fondo); min-height: 100vh; min-height: 100dvh; }
.hidden { display: none !important; }

/* ===== Ingreso: pantalla azul con ondas, como Sonia y el Cuadro de Mando ===== */
.auth-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; place-items: center; padding: 24px 16px 110px;
    background: radial-gradient(900px 620px at 18% 22%, var(--azul-luz) 0%, transparent 62%),
                linear-gradient(160deg, var(--azul) 0%, #182C6E 52%, var(--azul-hondo) 100%);
    overflow: hidden;
}
.auth-fondo, .cab-fondo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-fondo::before, .auth-fondo::after, .cab-fondo::before, .cab-fondo::after {
    content: ""; position: absolute; top: -2px; bottom: -2px; left: -260px; right: -260px; background-repeat: repeat; will-change: transform;
}
.auth-fondo::before, :root[data-tema="oscuro"] .cab-fondo::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='34'%3E%3Cpath d='M0 17 q40 -9 80 0 t80 0' fill='none' stroke='white' stroke-opacity='.075' stroke-width='1.3'/%3E%3C/svg%3E");
}
.auth-fondo::after, :root[data-tema="oscuro"] .cab-fondo::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='68'%3E%3Cpath d='M0 34 q65 -16 130 0 t130 0' fill='none' stroke='%235BC866' stroke-opacity='.08' stroke-width='1.4'/%3E%3C/svg%3E");
}
.auth-fondo::before, .cab-fondo::before { background-size: 160px 34px; animation: deriva-a 14s linear infinite; }
.auth-fondo::after, .cab-fondo::after { background-size: 260px 68px; background-position: 0 17px; animation: deriva-b 26s linear infinite; }
.cab-fondo::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='34'%3E%3Cpath d='M0 17 q40 -9 80 0 t80 0' fill='none' stroke='%231E347D' stroke-opacity='.07' stroke-width='1.3'/%3E%3C/svg%3E");
}
.cab-fondo::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='68'%3E%3Cpath d='M0 34 q65 -16 130 0 t130 0' fill='none' stroke='%2327A737' stroke-opacity='.09' stroke-width='1.4'/%3E%3C/svg%3E");
}
@keyframes deriva-a { to { transform: translateX(160px); } }
@keyframes deriva-b { to { transform: translateX(-260px); } }
.brillo { position: absolute; width: 70vmax; height: 70vmax; left: 45%; top: -20%; border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 200, 102, .16) 0%, rgba(91, 200, 102, 0) 60%);
    animation: brillo 22s ease-in-out infinite alternate; will-change: transform; }
@keyframes brillo { to { transform: translate(-40vw, 45vh) scale(.85); } }
.olas { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; }
.olas div { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; will-change: transform; }
.olas svg { display: block; width: 100%; height: 100%; }
.olas .c1 { animation: ola 24s linear infinite; opacity: .55; }
.olas .c2 { animation: ola 17s linear infinite reverse; }
.olas .c3 { animation: ola 30s linear infinite; }
@keyframes ola { to { transform: translateX(-50%); } }
.auth-overlay .olas { height: 110px; }
.auth-box {
    position: relative; z-index: 2; width: 100%; max-width: 420px;
    background: #fff; color: #1B2340; text-align: center;
    border-radius: 22px; padding: 34px 30px 26px;
    box-shadow: 0 30px 80px rgba(8, 15, 45, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
    animation: entra 1s var(--curva) .15s both;
}
.auth-box > * { animation: sube .7s var(--curva) both; animation-delay: calc(.45s + var(--i, 0) * .08s); }
.auth-logo { display: block; width: 170px; height: auto; margin: 0 auto 18px; }
.acceso { font-family: var(--titulos); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--verde-hondo); }
.auth-box h2 { margin-top: 2px; font-family: var(--titulos); font-weight: 700; font-size: 1.65rem; line-height: 1.12; color: var(--azul); }
.auth-nota { margin-top: 12px; font-size: .9rem; color: #5B6478; line-height: 1.45; }
.btn-login {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; min-height: 52px; margin-top: 22px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--azul); color: #fff; font-family: var(--titulos); font-weight: 700; font-size: 1.05rem;
    box-shadow: 0 10px 24px rgba(30, 52, 125, .28);
    transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s ease, background-color .2s ease;
}
.btn-login .g { width: 22px; height: 22px; flex: none; padding: 3px; border-radius: 50%; background: #fff; box-sizing: content-box; }
.btn-login:hover { background: var(--azul-luz); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30, 52, 125, .34); }
.btn-login::before {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%); pointer-events: none;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .28) 50%, transparent 80%); transition: transform .7s ease;
}
.btn-login > * { position: relative; }
@media (hover: hover) { .btn-login:hover::before { transform: translateX(120%); } }
.auth-error {
    margin-top: 14px; padding: 12px 14px; border-radius: 12px; text-align: left;
    background: #FDF0F2; border: 1px solid #F6C9D1; color: #7A0F22; font-size: .86rem; line-height: 1.45;
    animation: sacude .5s ease .05s;
}
@media (max-height: 560px) {
    .auth-overlay { place-items: start center; padding: 12px 16px 24px; overflow-y: auto; }
    .auth-overlay .olas { display: none; }
    .auth-box { padding: 18px 24px; }
    .auth-logo { width: 110px; margin-bottom: 8px; }
}

/* ===== Cabecera blanca con la onda del isotipo abajo ===== */
header.cabecera { position: relative; color: var(--cab-texto); background: var(--cab-fondo); padding-bottom: 20px; overflow: hidden; }
header .brillo { width: 40vmax; height: 40vmax; left: 55%; top: -120%; animation-duration: 26s; }
header .olas { height: 22px; }
header .olas .c1 path { fill: var(--cab-ola-1); }
header .olas .c2 path { fill: var(--cab-ola-2); }
header .olas .c3 path { fill: var(--fondo); }
.cab-contenido {
    position: relative; z-index: 2; width: min(1100px, 100%); margin: 0 auto; padding: 12px 24px 6px;
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 16px; row-gap: 3px; align-items: center;
}
.brand-logo { grid-column: 1; grid-row: 1 / span 2; display: block; height: 44px; width: auto; animation: sube .9s var(--curva) both; }
.logo-negativo { display: none; }
:root[data-tema="oscuro"] .logo-color { display: none; }
:root[data-tema="oscuro"] .logo-negativo { display: block; }
.brand-sep { grid-column: 2; grid-row: 1 / span 2; width: 1px; height: 38px; background: var(--cab-boton-borde); }
.cab-titulo {
    grid-column: 3; grid-row: 1; align-self: end; min-width: 0;
    font-family: var(--titulos); font-weight: 800; font-size: 1.55rem; line-height: 1.05; letter-spacing: -.01em;
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    animation: sube .9s var(--curva) .06s both;
}
.h1-area { font-weight: 600; font-size: 1.02rem; color: var(--cab-texto-suave); letter-spacing: 0; white-space: nowrap; }
.cab-sub { grid-column: 3; grid-row: 2; align-self: start; font-size: .8rem; color: var(--cab-texto-suave); line-height: 1.35; animation: sube .9s var(--curva) .12s both; }
.header-actions { grid-column: 4; grid-row: 1 / span 2; display: flex; align-items: center; gap: 8px; animation: sube .9s var(--curva) .12s both; }
.btn-cab {
    font-family: var(--cuerpo); font-size: .84rem; font-weight: 500; color: var(--cab-texto); text-decoration: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 16px;
    border-radius: 999px; border: 1px solid var(--cab-boton-borde); background: var(--cab-boton-fondo);
    transition: background-color .2s ease, transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.btn-cab svg { transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.btn-cab:hover { background: var(--cab-boton-hover); transform: translateY(-1px); }
a.btn-cab:hover svg { transform: translateX(-3px); }
#btnTema { padding: 0; width: 44px; }
#btnTema .sol { display: none; }
:root[data-tema="oscuro"] #btnTema .sol { display: block; }
:root[data-tema="oscuro"] #btnTema .luna { display: none; }
#btnTema:hover svg { transform: rotate(-25deg) scale(1.1); }

/* ===== Cuerpo ===== */
#app, .pagina { width: min(1100px, 100%); margin: 0 auto; padding: 4px 24px 32px; }
#app > * + *, .pagina > * + * { margin-top: 16px; }
.cab-angosta .cab-contenido { width: min(840px, 100%); }
.glass { background: var(--panel); border: 1px solid var(--linea); box-shadow: var(--sombra); }
#app > section, #app > nav, .pagina > section { animation: sube .6s var(--curva) both; }
.sec-titulo { font-family: var(--titulos); font-weight: 700; font-size: 1.15rem; line-height: 1.2; color: var(--texto-fuerte); }
.texto { font-size: .92rem; line-height: 1.5; color: var(--tinta); }
.ayuda { font-size: .8rem; line-height: 1.45; color: var(--apagado); }
.ayuda li::marker { color: var(--verde); }

/* Pestañas: como el selector de ciclo de Sonia */
nav.pestanas { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.tab {
    min-height: 44px; padding: 0 14px; border-radius: 11px; border: 0; cursor: pointer;
    background: transparent; color: var(--tinta); font-family: var(--cuerpo); font-size: .88rem; font-weight: 500;
    transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.tab:hover { background: var(--panel-suave); }
.tab.on { background: var(--azul); color: #fff; box-shadow: 0 6px 14px rgba(30, 52, 125, .25); animation: pulso .35s cubic-bezier(.3, 1.4, .5, 1); }
:root[data-tema="oscuro"] .tab.on { background: var(--azul-luz); }
#nSin { font-size: .78em; opacity: .85; }
@keyframes pulso { 50% { transform: scale(1.04); } }

/* Campos */
.lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--apagado); margin-bottom: 5px; }
.campo {
    background: var(--campo); border: 1.5px solid var(--linea); border-radius: 12px; padding: .55rem .8rem;
    min-height: 44px; width: 100%; color: var(--tinta); font-family: var(--cuerpo); font-size: 16px;
    transition: border-color .2s ease, box-shadow .25s ease;
}
.campo::placeholder { color: var(--apagado); opacity: .8; }
.campo:focus { outline: none; border-color: var(--azul-luz); box-shadow: 0 0 0 4px rgba(46, 74, 158, .14); }
.campo:disabled { opacity: .45; }
input[type=checkbox], input[type=radio] { accent-color: var(--azul); }
:root[data-tema="oscuro"] input[type=checkbox], :root[data-tema="oscuro"] input[type=radio] { accent-color: var(--verde-luz); }
.opcion { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: .92rem; color: var(--tinta); cursor: pointer; }

/* Desplegable propio (el <select> nativo se cierra solo en el Chrome de Linux de la oficina). */
.desp { position: relative; display: block; }
.desp > select { display: none; }
.desp-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer;
}
.desp-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desp-btn svg { flex: none; color: var(--verde); transition: transform .25s ease; }
.desp.abierto .desp-btn { border-color: var(--azul-luz); box-shadow: 0 0 0 4px rgba(46, 74, 158, .14); }
.desp.abierto .desp-btn svg { transform: rotate(180deg); }
.desp-lista {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; max-height: min(320px, 50vh); overflow-y: auto;
    background: var(--panel); border: 1px solid var(--linea); border-radius: 12px; padding: 6px;
    box-shadow: 0 18px 40px rgba(20, 37, 89, .18); animation: sube .2s var(--curva) both;
}
.desp-lista.arriba { top: auto; bottom: calc(100% + 6px); }
.desp-op {
    display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent;
    text-align: left; color: var(--tinta); font-family: var(--cuerpo); font-size: .95rem; line-height: 1.3; cursor: pointer;
}
.desp-btn:disabled { opacity: .6; cursor: not-allowed; background: var(--panel-suave); }
.desp-btn:disabled svg { visibility: hidden; }
.desp-op:hover, .desp-op:focus-visible { background: var(--panel-suave); outline: none; }
.desp-op[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: transparent; }
.desp-op[aria-selected="true"] { background: var(--azul-claro); color: var(--texto-fuerte); font-weight: 500; }

/* Botones */
.btn {
    position: relative; overflow: hidden; min-height: 44px; border-radius: 12px; padding: 0 1.1rem; border: 0; cursor: pointer;
    font-family: var(--titulos); font-weight: 700; font-size: 1rem; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-align: center;
    transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), background-color .2s ease, box-shadow .25s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-azul { background: var(--azul); box-shadow: 0 8px 20px rgba(30, 52, 125, .22); }
.btn-azul:hover { background: var(--azul-luz); transform: translateY(-1px); }
:root[data-tema="oscuro"] .btn-azul { background: var(--azul-luz); }
:root[data-tema="oscuro"] .btn-azul:hover { background: #3A59B5; }
.btn-verde { background: var(--verde-hondo); box-shadow: 0 8px 20px rgba(26, 127, 42, .2); }
.btn-verde:hover { background: var(--verde); transform: translateY(-1px); }
.btn-sec { background: var(--panel); color: var(--texto-fuerte); border: 1.5px solid var(--linea); box-shadow: none; }
.btn-sec:hover { background: var(--panel-suave); border-color: var(--azul-luz); }
.btn-agregar { background: transparent; color: var(--texto-fuerte); border: 1.5px dashed var(--barra); font-family: var(--cuerpo); font-weight: 500; }
.btn-agregar:hover { background: var(--resalte); border-color: var(--azul-luz); }
.btn-sm {
    min-height: 44px; border-radius: 10px; padding: 0 .9rem; border: 1.5px solid transparent; cursor: pointer;
    font-family: var(--cuerpo); font-size: .84rem; font-weight: 500;
    transition: background-color .2s ease, border-color .2s ease;
}
/* Botones que arma el script con colores de Tailwind */
body .btn-sm.bg-sky-700, body .btn-sm.bg-sky-700:hover { background: var(--azul); color: #fff; }
body .btn-sm.bg-sky-700:hover { background: var(--azul-luz); }
body .btn-sm.bg-slate-800, body .btn-sm.bg-slate-800:hover { background: var(--panel); color: var(--texto-fuerte); border-color: var(--linea); }
body .btn-sm.bg-slate-800:hover { background: var(--panel-suave); border-color: var(--azul-luz); }
body .btn-sm.bg-emerald-800 { background: var(--verde-hondo); color: #fff; }
body .btn-sm.border-rose-900 { background: transparent; color: var(--error); border-color: var(--error-borde); }
body .btn-sm.border-rose-900:hover { background: var(--error-claro); }
.btn:focus-visible, .btn-sm:focus-visible, .tab:focus-visible, .btn-cab:focus-visible, .btn-login:focus-visible, .desp-btn:focus-visible, table.t button:focus-visible {
    outline: 3px solid var(--azul); outline-offset: 2px;
}
:root[data-tema="oscuro"] :focus-visible { outline-color: var(--verde-luz) !important; }

/* Colores de texto que pone el script */
body .text-white, body .text-slate-200, body .text-slate-300 { color: var(--tinta); }
body .text-slate-400, body .text-slate-500 { color: var(--apagado); }
body .text-rose-300, body .text-rose-400 { color: var(--error); }
body .text-emerald-300, body .text-emerald-400 { color: var(--verde-texto); }
body .text-amber-300, body .text-amber-400 { color: var(--aviso); }
/* Tarjetas de las listas (constancias, pendientes, usuarios, sin artículo) */
.lista-tarjetas > .glass { border-left: 3px solid var(--verde); box-shadow: none; }
.lista-tarjetas > .glass.opacity-60 { border-left-color: var(--error); }
.lista-tarjetas > .glass .font-semibold { font-family: var(--titulos); font-weight: 700; font-size: 1.02rem; color: var(--texto-fuerte); }
.lista-tarjetas > .glass .font-semibold .font-normal { font-family: var(--cuerpo); }
.lista-tarjetas > .glass .text-sm { color: var(--tinta); }
body .lista-tarjetas a.btn-sm { text-decoration: none; }
/* ropa.html: botón de nueva constancia arriba de las pestañas */
.acciones-top { display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .acciones-top .btn { width: 100%; } }
/* ropa-constancia.html: renglones de ropa y EPP, y botón para limpiar la firma */
.fila { border: 1px solid var(--linea); border-radius: 14px; padding: .7rem; background: var(--panel-suave); }
.fila .font-semibold { font-family: var(--titulos); font-weight: 700; font-size: 1rem; color: var(--texto-fuerte); }
.fila .desp-btn span, .fila .campo { font-size: 15px; }
.fila .desp-btn { padding-left: .6rem; padding-right: .5rem; gap: 4px; }
@media (max-width: 440px) {
    .fila .desp-btn span { font-size: 14px; }
    /* La cantidad es un número corto: su lugar pasa a la certificación, para que "Certif.: Sí" entre entero. */
    body .fila .grid-cols-3 { grid-template-columns: .8fr 1fr 1.25fr; }
}
.firma-caja { border: 1.5px dashed var(--barra); border-radius: 12px; padding: 4px; background: #fff; }
/* ropa.html: ficha del trabajador a pantalla completa; la hoja HYS-EPP-01 sigue siendo blanca, como el papel */
#vFicha { background: var(--fondo); }
#vFicha .ficha-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
#kResultado:not(:empty) { padding: 12px 14px; border-radius: 12px; background: var(--panel-suave); border: 1px solid var(--linea); }

/* Tablas: títulos azules con letra blanca, como los Excel de la marca */
.tabla { overflow: auto; border-radius: 16px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
table.t th {
    text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: #fff; background: var(--azul);
    padding: .65rem .7rem; position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
:root[data-tema="oscuro"] table.t th { background: #24387F; }
table.t th.text-right { text-align: right; }
table.t td { padding: .5rem .7rem; border-bottom: 1px solid var(--linea); }
table.t tbody tr:nth-child(even) td { background: var(--fila-alterna); }
table.t tbody tr:hover td { background: var(--ok-fondo); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.n button { min-height: 44px; min-width: 44px; border-radius: 8px; font-variant-numeric: tabular-nums; transition: background-color .2s ease; }
table.t td.n button:hover { background: var(--resalte); }
table.t td.font-bold { color: var(--texto-fuerte); }
.bajo { color: var(--error); font-weight: 700; }
.leyenda-bajo { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--error); margin-right: 6px; vertical-align: baseline; }

/* Aviso de abajo (el script le pone verde o rojo de Tailwind) */
#toast { color: #fff; border-radius: 999px; padding: .6rem 1.2rem; font-size: .9rem; box-shadow: 0 14px 34px rgba(8, 15, 45, .3); max-width: calc(100vw - 32px); text-align: center; animation: sube .3s var(--curva) both; }
body #toast.bg-emerald-700 { background: var(--verde-hondo); }
body #toast.bg-rose-700 { background: #C8102E; }

.sin-acceso { max-width: 440px; margin: 64px auto 0; padding: 28px 24px; border-radius: 20px; text-align: center; border-top: 3px solid var(--verde); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--barra); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
@keyframes sube { from { opacity: 0; transform: translateY(18px); } }
@keyframes entra { from { opacity: 0; transform: translateY(34px) scale(.97); } }
@keyframes sacude { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (max-width: 900px) {
    .h1-area { display: none; }
    .btn-cab .texto-boton { display: none; }
    .btn-cab { padding: 0; width: 44px; }
}
@media (max-width: 640px) {
    .cab-contenido { padding: 10px 16px 4px; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; }
    header.cabecera { padding-bottom: 16px; }
    header .olas { height: 16px; }
    .brand-logo { grid-row: 1; height: 38px; }
    .brand-sep { display: none; }
    .cab-titulo { grid-column: 2; grid-row: 1; align-self: center; font-size: 1.2rem; }
    .header-actions { grid-column: 3; grid-row: 1; gap: 6px; }
    .cab-sub { grid-column: 1 / -1; grid-row: 2; font-size: .78rem; }
    #app, .pagina { padding: 0 16px 24px; }
    #app > * + *, .pagina > * + * { margin-top: 12px; }
    .tab { flex: 1 1 auto; padding: 0 10px; font-size: .84rem; }
    table.t { font-size: .84rem; }
}
@media (max-width: 440px) {
    .auth-box { padding: 28px 20px 20px; }
    .auth-box h2 { font-size: 1.4rem; }
    .btn-login { font-size: .98rem; gap: 10px; padding: 0 16px; line-height: 1.2; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
