/* =====================================================================
   AINEDER FICHAJES · CAPA DE ACABADO PROFESIONAL
   ---------------------------------------------------------------------
   Se carga la ÚLTIMA (después de app.css, aineder-gestion.css y
   MudBlazor). No cambia ninguna pantalla ni ningún color corporativo:
   solo afina tipografía, proporciones, bordes, sombras y estados.

   Para volver al aspecto anterior basta con quitar la línea de este
   archivo en wwwroot/index.html.

   Colores corporativos (sin cambios):
     Azul AINEDER  #001E4D   Azul noche  #001535   Tinta  #0A0F18
     Blanco frío   #F7F8FA   Gris plata  #D6D8DA   Grafito #4A4F55
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. TIPOGRAFÍA (Inter, alojada en la propia web: sin Google Fonts,
      sin enviar la IP de los trabajadores a terceros)

   Truco: los pesos 700-900 que usa app.css se dibujan con el archivo
   Bold. Así los títulos dejan de verse "pesados" sin tocar app.css.
   --------------------------------------------------------------------- */

@font-face {
    font-family: "AINEDER Sans";
    src: url("../fonts/Inter-Regular.woff") format("woff");
    font-weight: 100 450;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AINEDER Sans";
    src: url("../fonts/Inter-Medium.woff") format("woff");
    font-weight: 451 550;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AINEDER Sans";
    src: url("../fonts/Inter-SemiBold.woff") format("woff");
    font-weight: 551 650;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AINEDER Sans";
    src: url("../fonts/Inter-Bold.woff") format("woff");
    font-weight: 651 1000;
    font-style: normal;
    font-display: swap;
}

/* Versión "Display" de Inter: misma familia, dibujada para tamaños grandes */
@font-face {
    font-family: "AINEDER Display";
    src: url("../fonts/InterDisplay-SemiBold.woff") format("woff");
    font-weight: 100 650;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AINEDER Display";
    src: url("../fonts/InterDisplay-Bold.woff") format("woff");
    font-weight: 651 1000;
    font-style: normal;
    font-display: swap;
}


/* ---------------------------------------------------------------------
   2. VARIABLES
   --------------------------------------------------------------------- */

:root {
    --ax-azul: #001E4D;
    --ax-noche: #001535;
    --ax-tinta: #0A0F18;
    --ax-frio: #F7F8FA;
    --ax-plata: #D6D8DA;
    --ax-grafito: #4A4F55;

    --ax-texto: #0A0F18;
    --ax-texto-suave: #5B6169;
    --ax-linea: #E3E6EA;
    --ax-linea-fuerte: #D6D8DA;

    --ax-fuente: "AINEDER Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --ax-fuente-titulos: "AINEDER Display", "AINEDER Sans", "Segoe UI", system-ui, Arial, sans-serif;

    --ax-radio-tarjeta: 14px;
    --ax-radio-control: 10px;
    --ax-radio-cabecera: 18px;

    --ax-sombra-tarjeta: 0 0 0 1px var(--ax-linea), 0 1px 2px rgba(10, 15, 24, 0.04);
    --ax-sombra-elevada: 0 0 0 1px var(--ax-linea), 0 12px 32px rgba(10, 15, 24, 0.10);
    --ax-foco: 0 0 0 3px rgba(0, 30, 77, 0.16);
}


/* ---------------------------------------------------------------------
   3. BASE
   --------------------------------------------------------------------- */

html,
body,
.mud-typography,
button,
input,
select,
textarea,
.mud-input,
.mud-button-root {
    font-family: var(--ax-fuente);
}

body {
    color: var(--ax-texto);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Cifras de ancho fijo: horas, importes y contadores alineados */
strong,
td,
th,
time,
input[type="number"],
input[type="time"],
input[type="date"] {
    font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
    font-family: var(--ax-fuente-titulos);
    letter-spacing: -0.012em;
}

::selection {
    background: rgba(0, 30, 77, 0.16);
}


/* ---------------------------------------------------------------------
   4. ZONA DE TRABAJO
   --------------------------------------------------------------------- */

.employee-main {
    padding: 32px 36px 48px;
}

.employee-main h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ax-azul);
}

.employee-main h3 {
    font-size: 16px;
    font-weight: 600;
}

.employee-main p {
    line-height: 1.55;
}


/* ---------------------------------------------------------------------
   5. CABECERA DE CADA PÁGINA (el bloque azul superior)
   Azul plano, sin degradado ni sombra grande, con una trama diagonal
   muy suave a la derecha que recuerda los trazos de la "A" del logo.
   --------------------------------------------------------------------- */

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 28px 32px;
    border-radius: var(--ax-radio-cabecera);
    background: var(--ax-azul);
    box-shadow: none;
}

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "])::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 46%;
    z-index: -1;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        118deg,
        rgba(214, 216, 218, 0.07) 0 1px,
        transparent 1px 26px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
    mask-image: linear-gradient(90deg, transparent, #000 70%);
}

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) h1 {
    margin: 6px 0 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.018em;
    color: #ffffff;
}

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) p {
    max-width: 68ch;
    font-size: 14px;
    color: rgba(247, 248, 250, 0.78);
}

/* Texto pequeño sobre el título ("Configuración · Usuarios", la fecha...).
   Antes ponía Mayúscula En Cada Palabra; ahora solo la primera letra. */
.employee-date {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(214, 216, 218, 0.9);
}

.employee-date::first-letter {
    text-transform: uppercase;
}

/* Botones dentro de la cabecera azul */
.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) :is(button, .ax-button) {
    box-shadow: none;
}

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) .ax-button-secondary {
    color: #ffffff;
    background: rgba(247, 248, 250, 0.08);
    border-color: rgba(247, 248, 250, 0.32);
}

.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) .ax-button-secondary:hover {
    background: rgba(247, 248, 250, 0.16);
}

/* Recuadros blancos dentro de la cabecera (usuario, estado...) */
.employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) > div:last-child:not(:first-child) {
    border-radius: 12px;
}


/* ---------------------------------------------------------------------
   6. TARJETAS
   Un solo lenguaje para todas: radio 14, contorno fino, sombra mínima.
   Se respeta el borde inferior de color que indica el tipo de dato.
   --------------------------------------------------------------------- */

.employee-main :is([class$="-card"], [class*="-card "], .ax-card):not([class*="hero"]) {
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-radius: var(--ax-radio-tarjeta);
    box-shadow: var(--ax-sombra-tarjeta);
}

/* Las tarjetas de Configuración tenían un borde inferior gris grueso
   que se leía como una sombra; ahora es una línea fina que se vuelve
   azul al pasar el ratón (el aviso de "se puede pulsar" se mantiene). */
.employee-main .configuration-module-card {
    border-bottom: 2px solid transparent;
}

.employee-main .configuration-module-card:hover {
    border-bottom-color: var(--ax-azul);
}

.employee-main :is([class$="-card"], [class*="-card "]):not([class*="hero"]):hover {
    box-shadow: var(--ax-sombra-tarjeta);
}

/* Las tarjetas que son enlaces o botones sí reaccionan, pero con calma */
.employee-main :is(a, button):is([class$="-card"], [class*="-card "]):hover,
.employee-main .configuration-module-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--ax-sombra-elevada);
}

/* Barras de filtros y buscadores */
.employee-main :is([class$="-toolbar"], [class*="-toolbar "]) {
    border-radius: var(--ax-radio-tarjeta);
    box-shadow: var(--ax-sombra-tarjeta);
}

/* Tarjetas de resumen (cifras) */
.employee-summary-card span {
    font-size: 13px;
    color: var(--ax-texto-suave);
}

.employee-summary-card strong {
    font-family: var(--ax-fuente-titulos);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Etiquetas en mayúsculas pequeñas (eyebrows): más discretas */
.employee-main [class*="eyebrow"] {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #6B7178;
}

/* Iconos de dos letras ("EM", "CT"...): más pequeños y limpios */
.employee-main [class$="-icon"]:not(svg) {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Bloques vacíos y de carga */
.employee-main .empty-state,
.employee-main .ax-empty {
    border-radius: 12px;
    color: var(--ax-texto-suave);
}


/* ---------------------------------------------------------------------
   7. BOTONES
   --------------------------------------------------------------------- */

.employee-main :is(button, .ax-button, [class$="-button"], [class*="-button "]),
.login-page :is(button, [class$="-button"], [class*="-button "]) {
    font-weight: 600;
    letter-spacing: 0;
    border-radius: var(--ax-radio-control);
}

.employee-main :is(.ax-button, .admin-primary-button, .admin-secondary-button) {
    min-height: 40px;
    padding: 9px 18px;
    font-size: 14px;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.employee-main .ax-button-small {
    min-height: 30px;
    padding: 5px 11px;
    font-size: 12.5px;
}

.employee-main :is(button, a, [role="button"]):focus-visible {
    outline: none;
    box-shadow: var(--ax-foco);
}

.employee-main :is(button):disabled {
    cursor: not-allowed;
}


/* ---------------------------------------------------------------------
   8. FORMULARIOS
   --------------------------------------------------------------------- */

.employee-main :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea) {
    border-radius: var(--ax-radio-control);
    border-color: var(--ax-linea-fuerte);
    font-size: 14px;
    color: var(--ax-texto);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.employee-main :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea):hover:not(:disabled) {
    border-color: #B9BEC4;
}

.employee-main :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea):focus {
    outline: none;
    border-color: var(--ax-azul);
    background-color: #ffffff;
    box-shadow: var(--ax-foco);
}

.employee-main :is(input, select, textarea)::placeholder {
    color: #9AA0A7;
}

.employee-main input[type="checkbox"],
.employee-main input[type="radio"] {
    accent-color: var(--ax-azul);
}

.employee-main :is(small, [class$="-help"]) {
    color: var(--ax-texto-suave);
}


/* ---------------------------------------------------------------------
   9. TABLAS
   --------------------------------------------------------------------- */

.employee-main table th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ax-texto-suave);
    background: var(--ax-frio);
    border-bottom: 1px solid var(--ax-linea);
}

.employee-main table td {
    border-bottom-color: #EEF0F3;
}

.employee-main table tbody tr:last-child td {
    border-bottom: 0;
}


/* ---------------------------------------------------------------------
   10. MENSAJES, ETIQUETAS Y VENTANAS
   --------------------------------------------------------------------- */

.employee-main :is(.panel-error, .panel-success, .panel-warning, .ax-message) {
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.employee-main .panel-error,
.employee-main .ax-message-error {
    color: #8A1C1C;
    background: #FDF1F1;
    box-shadow: inset 0 0 0 1px #F3CFCF;
}

.employee-main .panel-success,
.employee-main .ax-message-ok {
    color: #0E5A34;
    background: #EEF8F2;
    box-shadow: inset 0 0 0 1px #CDE9D8;
}

.employee-main :is(.ax-chip, [class*="-chip"]) {
    font-weight: 600;
    letter-spacing: 0;
}

.ax-modal,
[class$="-modal"]:not([class*="overlay"]):not([class*="backdrop"]) {
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(10, 15, 24, 0.24);
}


/* ---------------------------------------------------------------------
   11. MENÚ LATERAL
   Elemento activo con fondo translúcido en lugar de la "pastilla"
   blanca con sombra: se lee igual de claro y pesa menos.
   --------------------------------------------------------------------- */

.app-sidebar {
    background: var(--ax-noche);
    background-image: linear-gradient(180deg, var(--ax-azul) 0%, var(--ax-noche) 100%);
    box-shadow: none;
}

.sidebar-section-title {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #8495B2;
}

.sidebar-nav-item {
    min-height: 44px;
    border-radius: var(--ax-radio-control);
    font-size: 14px;
    font-weight: 500;
    color: #C9CED6;
}

.sidebar-nav-item:hover {
    color: #ffffff;
    background: rgba(247, 248, 250, 0.06);
    transform: none;
}

.sidebar-nav-text {
    font-weight: 500;
}

.sidebar-nav-item.active .sidebar-nav-text {
    font-weight: 600;
}

.sidebar-nav-item.active {
    color: #ffffff;
    font-weight: 600;
    background: rgba(247, 248, 250, 0.12);
    box-shadow: inset 0 0 0 1px rgba(247, 248, 250, 0.10);
}

.sidebar-nav-icon {
    border-radius: 9px;
}

.sidebar-nav-item.active .sidebar-nav-icon {
    color: var(--ax-azul);
    background: var(--ax-frio);
}

.sidebar-nav-item.active .sidebar-nav-active-indicator {
    background: var(--ax-plata);
}

.sidebar-nav-item:focus-visible,
.sidebar-logout-button:focus-visible {
    outline: 2px solid var(--ax-plata);
    outline-offset: 2px;
}

.sidebar-user {
    border-radius: 12px;
}

.sidebar-logout-button {
    border-radius: var(--ax-radio-control);
    font-weight: 600;
}


/* ---------------------------------------------------------------------
   12. ACCESO (login, contraseñas)
   --------------------------------------------------------------------- */

.login-card-modern {
    border-radius: 22px;
}

.login-card-modern h2 {
    font-family: var(--ax-fuente-titulos);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.login-form-eyebrow,
.login-brand-eyebrow {
    font-weight: 600;
}

.login-input-modern:focus {
    outline: none;
}

.login-input-wrapper:focus-within {
    border-color: var(--ax-plata);
    box-shadow: 0 0 0 3px rgba(214, 216, 218, 0.18);
}

.login-button-modern {
    min-height: 50px;
    font-weight: 600;
    font-size: 15px;
}

.login-button-modern:hover:not(:disabled) {
    transform: none;
}

.login-button-modern:focus-visible {
    outline: 2px solid var(--ax-plata);
    outline-offset: 3px;
}

/* Enlaces sobre la tarjeta oscura: legibles */
.login-card-modern .login-link-secondary {
    color: var(--ax-plata);
}

.login-card-modern .login-link-secondary:hover {
    color: #ffffff;
}


/* ---------------------------------------------------------------------
   13. MÓVIL Y ACCESIBILIDAD
   --------------------------------------------------------------------- */

@media (max-width: 900px) {
    .employee-main {
        padding: 20px 16px 32px;
    }

    .employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) {
        padding: 22px 20px;
    }

    .employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "]) h1 {
        font-size: 23px;
    }

    .employee-main :is(.employee-hero, [class$="-hero"], [class*="-hero "])::after {
        width: 70%;
    }
}

/* Menú lateral plegado (solo iconos): el texto "Administración" no cabe */
@media (max-width: 760px) {
    .sidebar-brand-role {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .employee-main *,
    .app-sidebar * {
        transition: none !important;
    }

    .employee-main :is([class$="-card"], [class*="-card "]):hover {
        transform: none !important;
    }
}


/* =====================================================================
   ACCESO EXTERNO (gestorías, abogados, consultoras)
   Botón en el login, lista de empresas y pantalla /externo
   ===================================================================== */

.login-button-externo {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 216, 218, 0.35);
    border-radius: 14px;
    background: transparent;
    color: var(--ax-frio);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .login-button-externo:hover {
        background: rgba(247, 248, 250, 0.08);
        border-color: rgba(214, 216, 218, 0.6);
        color: #ffffff;
    }

.login-link-boton {
    font-family: inherit;
}

.login-empresas-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.login-empresa-opcion {
    width: 100%;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border: 1px solid var(--ax-linea-fuerte);
    border-radius: var(--ax-radio-control);
    background: #ffffff;
    color: var(--ax-texto);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .login-empresa-opcion:hover:not(:disabled) {
        border-color: var(--ax-azul);
        box-shadow: var(--ax-foco);
    }

    .login-empresa-opcion:disabled {
        cursor: default;
    }

.login-empresa-actual {
    border-color: var(--ax-azul);
    background: var(--ax-frio);
}

.login-empresa-nombre {
    font-size: 15px;
    font-weight: 700;
}

.login-empresa-detalle {
    font-size: 12px;
    color: var(--ax-texto-suave);
}

/* Dentro de la tarjeta oscura del login */
.login-card-modern .login-empresa-opcion {
    border-color: rgba(214, 216, 218, 0.25);
    background: rgba(247, 248, 250, 0.06);
    color: var(--ax-frio);
}

    .login-card-modern .login-empresa-opcion:hover:not(:disabled) {
        border-color: rgba(214, 216, 218, 0.7);
        background: rgba(247, 248, 250, 0.12);
        box-shadow: none;
    }

.login-card-modern .login-empresa-detalle {
    color: var(--ax-plata);
}

.sidebar-empresa-actual {
    margin: 4px 0 12px;
    padding: 10px 12px;
    border-radius: var(--ax-radio-control);
    background: rgba(247, 248, 250, 0.08);
    color: var(--ax-frio);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.externo-titulo-seccion {
    margin: 0 0 14px;
    font-family: var(--ax-fuente-titulos);
    font-size: 18px;
    font-weight: 700;
    color: var(--ax-texto);
}

.externo-mensaje-ok {
    padding: 12px 14px;
    border-radius: 12px;
    background: #e7f8ed;
    color: #0b6634;
    font-size: 14px;
}

/* Tarjetas de información seguidas (Mi perfil, etc.): separación entre ellas */
.configuration-help-card + .configuration-help-card {
    margin-top: 16px;
}


/* =====================================================================
   CALENDARIO DE AUSENCIAS (Vacaciones → Ver calendario)
   ===================================================================== */

.cal-aviso {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff7e6;
    color: #7a4b00;
    font-size: 14px;
}

.cal-resumen-texto {
    font-size: 20px !important;
}

/* ---- Barra superior ---- */

.cal-barra {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    padding: 18px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(10, 15, 24, .07);
}

.cal-navegacion {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-navegacion h2 {
    min-width: 210px;
    margin: 0;
    color: #001e4d;
    font-size: 24px;
    text-align: center;
}

.cal-flecha,
.cal-boton-hoy {
    height: 38px;
    border: 1px solid #d6d8da;
    border-radius: 10px;
    background: #f7f8fa;
    color: #001e4d;
    font-weight: 700;
    cursor: pointer;
}

.cal-flecha {
    width: 38px;
    font-size: 22px;
    line-height: 1;
}

.cal-boton-hoy {
    padding: 0 14px;
    margin-left: 6px;
}

.cal-flecha:hover,
.cal-boton-hoy:hover {
    background: #ffffff;
    border-color: #001e4d;
}

.cal-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.cal-campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.cal-campo span {
    color: #4a4f55;
    font-size: 12px;
    font-weight: 600;
}

.cal-campo select,
.cal-campo input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d6d8da;
    border-radius: 10px;
    background: #f7f8fa;
    color: #001e4d;
    font-size: 14px;
}

.cal-campo-buscar {
    flex: 1;
    min-width: 200px;
}

.cal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    color: #001e4d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.cal-pestanas {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px;
    border-radius: 12px;
    background: #f0f2f5;
}

.cal-pestanas button {
    padding: 8px 16px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #4a4f55;
    font-weight: 700;
    cursor: pointer;
}

.cal-pestanas button.activa {
    background: #001e4d;
    color: #ffffff;
}

.cal-boton-texto {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #001e4d;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* ---- Leyenda ---- */

.cal-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 16px;
    padding: 0 6px;
    color: #4a4f55;
    font-size: 13px;
}

.cal-leyenda span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cal-muestra {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, .08);
}

/* ---- Colores de días ---- */

.cal-dia-festivo {
    background: #fde8e8 !important;
}

.cal-dia-cierre {
    background: #ffedd5 !important;
}

.cal-dia-especial {
    background: #e0f2f1 !important;
}

.cal-dia-nolaborable {
    background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #eceef1 6px 12px) !important;
}

/* ---- Colores de tipos de ausencia ---- */

.cal-tipo-azul     { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd !important; }
.cal-tipo-ambar    { background: #fef3c7; color: #78350f; border-color: #fcd34d !important; }
.cal-tipo-morado   { background: #f3e8ff; color: #581c87; border-color: #d8b4fe !important; }
.cal-tipo-verde    { background: #dcfce7; color: #14532d; border-color: #86efac !important; }
.cal-tipo-rosa     { background: #fce7f3; color: #831843; border-color: #f9a8d4 !important; }
.cal-tipo-cian     { background: #cffafe; color: #164e63; border-color: #67e8f9 !important; }
.cal-tipo-naranja  { background: #ffedd5; color: #7c2d12; border-color: #fdba74 !important; }
.cal-tipo-pizarra  { background: #e2e8f0; color: #1e293b; border-color: #94a3b8 !important; }
.cal-tipo-lima     { background: #ecfccb; color: #365314; border-color: #bef264 !important; }

/* Pendiente: rayado y borde discontinuo */
.cal-pendiente {
    border: 1.5px dashed !important;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .65) 0 4px, transparent 4px 8px);
}

/* Solicitud que se está revisando */
.cal-resaltada {
    outline: 2px solid #001e4d;
    outline-offset: 1px;
    font-weight: 800;
}

/* ---- Vista mensual ---- */

.cal-mes {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    padding: 16px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(10, 15, 24, .07);
}

.cal-cabecera-dia {
    padding: 6px 0;
    color: #4a4f55;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cal-celda {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 118px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}

.cal-celda:hover {
    border-color: #001e4d;
}

.cal-celda-vacia {
    border: none;
    background: transparent;
    cursor: default;
}

.cal-celda-vacia:hover {
    border: none;
}

.cal-hoy {
    box-shadow: inset 0 0 0 2px #001e4d;
}

.cal-seleccionado {
    border-color: #001e4d;
    box-shadow: 0 0 0 3px rgba(0, 30, 77, .18);
}

.cal-celda-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-numero {
    color: #001e4d;
    font-size: 15px;
    font-weight: 700;
}

.cal-contador {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #001e4d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.cal-nombre-dia {
    color: #7f1d1d;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-dia-especial .cal-nombre-dia {
    color: #134e4a;
}

.cal-dia-cierre .cal-nombre-dia {
    color: #7c2d12;
}

.cal-chips {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cal-chips-tenues {
    opacity: .55;
}

.cal-chip {
    display: block;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-mas {
    color: #4a4f55;
    font-size: 11px;
    font-weight: 700;
}

/* ---- Detalle del día ---- */

.cal-detalle {
    margin-top: 16px;
    padding: 22px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(10, 15, 24, .07);
}

.cal-detalle-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-detalle-cabecera h3 {
    margin: 0;
    color: #001e4d;
}

.cal-detalle-tipo-dia {
    margin: 6px 0 14px;
    color: #4a4f55;
}

.cal-detalle-lista,
.cal-revision-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cal-detalle-lista li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef0f3;
    border-radius: 12px;
}

.cal-detalle-lista li > div {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 2px 8px;
    align-items: baseline;
}

.cal-detalle-lista li span:not(.fichaje-chip):not(.cal-punto) {
    width: 100%;
    color: #4a4f55;
    font-size: 13px;
}

.cal-resaltada-fila {
    border-color: #001e4d !important;
    background: #f5f8ff;
}

.cal-punto {
    flex: 0 0 auto;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid transparent;
}

/* ---- Solicitud en revisión ---- */

.cal-revision {
    margin-bottom: 18px;
    padding: 22px;
    border: 2px solid #001e4d;
    border-radius: 22px;
    background: #ffffff;
}

.cal-revision-cabecera {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cal-revision-etiqueta {
    color: #4a4f55;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cal-revision h2 {
    margin: 4px 0;
    color: #001e4d;
    font-size: 22px;
}

.cal-revision p {
    margin: 0;
    color: #4a4f55;
}

.cal-revision-ok {
    margin-top: 14px !important;
    padding: 10px 14px;
    border-radius: 12px;
    background: #e7f8ed;
    color: #0b6634 !important;
}

.cal-revision-alerta {
    margin: 14px 0 8px !important;
    color: #7a4b00 !important;
    font-weight: 700;
}

.cal-revision-lista li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.cal-revision-lista li span:not(.cal-punto):not(.cal-etiqueta-pendiente) {
    color: #4a4f55;
}

.cal-revision-nota {
    margin-top: 12px !important;
    font-size: 13px;
}

.cal-etiqueta-pendiente {
    padding: 1px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #78350f;
    font-size: 11px;
    font-weight: 700;
}

/* ---- Vista por empleado ---- */

.cal-tabla-contenedor {
    padding: 16px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(10, 15, 24, .07);
    overflow-x: auto;
}

.cal-tabla {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.cal-tabla th,
.cal-tabla td {
    min-width: 28px;
    height: 34px;
    padding: 0;
    border-bottom: 1px solid #eef0f3;
    text-align: center;
}

.cal-tabla th {
    color: #4a4f55;
    font-weight: 600;
}

.cal-tabla th small {
    display: block;
    font-size: 10px;
    opacity: .75;
}

.cal-tabla th span {
    font-weight: 700;
    color: #001e4d;
}

.cal-tabla .cal-tabla-nombre {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 190px;
    max-width: 220px;
    padding: 0 12px;
    background: #ffffff;
    color: #001e4d;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-barra-dia {
    display: block;
    height: 22px;
    margin: 0 1px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.cal-tenue {
    opacity: .5;
}

.cal-tabla tfoot td {
    color: #001e4d;
    font-weight: 700;
    border-bottom: none;
}

.cal-total {
    background: #eef2ff;
}

.cal-total-alto {
    background: #fde8e8;
    color: #7f1d1d !important;
}

@media (max-width: 900px) {
    .cal-mes {
        gap: 3px;
        padding: 8px;
    }

    .cal-celda {
        min-height: 70px;
        padding: 4px;
    }

    .cal-chip {
        font-size: 0;
        height: 6px;
        padding: 0;
    }

    .cal-nombre-dia,
    .cal-mas {
        display: none;
    }

    .cal-navegacion h2 {
        min-width: 0;
        font-size: 18px;
    }
}
