/* ============================================================================
   KAULO · PIEL
   xixo.css es el sistema de diseño de la casa (estructura, componentes). Aquí se
   le cambia la piel sin tocarlo: se redefinen sus tokens y se reemplaza su
   estructura de menú lateral por el MENÚ DE CAJAS.

   Imagen elegida por Carlos el 10-nov-2026 (DISENO §15):
   - Paleta "paisaje" (CapturaImagen): mountains #4F6457 en la barra superior,
     sunglow #D9B44A como ÚNICO acento (caja activa y botón principal),
     sky #75B1A9 y mist #ACD0C0 para detalles y fondos suaves.
   - Tinta verde casi negro #24302A en lugar del negro; fondo niebla #F3F7F5.
   - Menú horizontal de cajas (ícono arriba, nombre abajo), sin buscador.
   - Nombre y logo: KAULO (paquete en wwwroot/img/marca).
   Los nombres de los tokens de xixo.css (navy/amber) se conservan para no tocar
   la base: aquí "navy" es la escala VERDE y "amber" la escala DORADA.
   ============================================================================ */

:root {
    /* --- Verde montaña: ocupa el lugar del azul noche ------------------------ */
    --xx-navy-950: #18211c;
    --xx-navy-900: #24302a;   /* Tinta: texto principal */
    --xx-navy-800: #33443a;
    --xx-navy-700: #4f6457;   /* Mountains: barra superior */
    --xx-navy-600: #55635b;   /* Texto de cuerpo */
    --xx-navy-500: #6b8073;
    --xx-navy-400: #6c7a72;   /* Texto tenue (pasa 4.5:1 sobre blanco) */
    --xx-navy-300: #a3b5ab;
    --xx-navy-200: #cfdcd5;
    --xx-navy-100: #d5e4dd;   /* Filo */
    --xx-navy-50:  #eef5f1;

    /* --- Dorado sunglow: el único acento --------------------------------------- */
    --xx-amber-700: #7a5f12;
    --xx-amber-600: #a8861f;
    --xx-amber-500: #c9a23a;  /* Bordes y subrayados de acción */
    --xx-amber-400: #d9b44a;  /* Sunglow: el botón principal y la caja activa */
    --xx-amber-300: #e3c56f;
    --xx-amber-200: #f3e3b0;
    --xx-amber-100: #f8eed0;
    --xx-amber-50:  #fcf7e8;

    /* --- Cielo y niebla: detalles ------------------------------------------- */
    --rh-mountains: #4f6457;
    --rh-sunglow:   #d9b44a;
    --rh-sky:       #75b1a9;
    --rh-mist:      #acd0c0;
    --rh-on-dark:   #dcebe4;  /* Texto secundario sobre la barra verde */

    --xx-brand:        var(--xx-navy-700);
    --xx-brand-hover:  var(--xx-navy-800);
    --xx-brand-active: var(--xx-navy-900);
    --xx-accent:       var(--xx-amber-400);
    --xx-accent-soft:  var(--xx-amber-200);

    /* --- Superficies --------------------------------------------------------- */
    --xx-canvas:    #f3f7f5;  /* Niebla muy clara */
    --xx-surface:   #ffffff;
    --xx-surface-2: #f8fbf9;
    --xx-ink:       #24302a;
    --xx-ink-2:     #55635b;
    --xx-ink-3:     #6c7a72;
    --xx-line:      #d5e4dd;
    --xx-line-2:    #e6efea;

    --xx-neutral-fg:   #55635b;
    --xx-neutral-bg:   #eef5f1;
    --xx-neutral-line: #d5e4dd;

    /* --- Letra: una sola familia, densa y sin serif ------------------------ */
    --xx-font-display: "Inter", "Segoe UI", system-ui, sans-serif;
    --xx-font-sans:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* --- Forma: 8px parejo, sombras verdosas -------------------------------- */
    --xx-r-sm: 6px;
    --xx-r:    8px;
    --xx-r-lg: 8px;

    --xx-shadow-sm: 0 1px 2px rgba(36, 48, 42, .05);
    --xx-shadow:    0 4px 8px rgba(36, 48, 42, .06);
    --xx-shadow-lg: 0 18px 48px rgba(36, 48, 42, .16);
    --xx-ring:      0 0 0 3px rgba(217, 180, 74, .45);

    --rh-wrap: 1320px;        /* Ancho máximo de barra, menú y página */

    --bs-body-color:       var(--xx-ink-2);
    --bs-primary-rgb:      79, 100, 87;
    --bs-link-color:       var(--xx-ink);
    --bs-link-color-rgb:   36, 48, 42;
    --bs-link-hover-color: var(--xx-navy-700);
    --bs-link-hover-color-rgb: 79, 100, 87;
}

body { -webkit-font-smoothing: antialiased; }

/* Enlaces: tinta con subrayado dorado. */
a { text-decoration-color: var(--xx-amber-500); text-underline-offset: 3px; }

h1, h2, h3, .xx-display { color: var(--xx-ink); font-weight: 600; letter-spacing: -.022em; }

.form-control:focus,
.form-select:focus { border-color: var(--xx-amber-500); }

/* Casillas y opciones: el azul de Bootstrap no existe en esta paleta. */
.form-check-input:checked { background-color: var(--xx-navy-700); border-color: var(--xx-navy-700); }
.form-check-input:focus { border-color: var(--xx-amber-500); box-shadow: var(--xx-ring); }

/* --- Botones ------------------------------------------------------------------
   El dorado relleno es la acción principal y SOLO eso; el resto es contorno verde. */

.btn { --bs-btn-focus-shadow-rgb: 217, 180, 74; border-radius: var(--xx-r); font-weight: 500; }

.btn-primary,
.btn-accent {
    --bs-btn-color: var(--xx-ink);
    --bs-btn-bg: var(--xx-amber-400);
    --bs-btn-border-color: var(--xx-amber-400);
    --bs-btn-hover-color: var(--xx-ink);
    --bs-btn-hover-bg: var(--xx-amber-300);
    --bs-btn-hover-border-color: var(--xx-amber-300);
    --bs-btn-active-color: var(--xx-ink);
    --bs-btn-active-bg: var(--xx-amber-500);
    --bs-btn-active-border-color: var(--xx-amber-500);
    --bs-btn-disabled-color: var(--xx-ink-3);
    --bs-btn-disabled-bg: var(--xx-amber-100);
    --bs-btn-disabled-border-color: var(--xx-amber-100);
    font-weight: 600;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, .4), 0 4px 8px rgba(36, 48, 42, .08), 0 1px 2px rgba(36, 48, 42, .3);
}

.btn-outline-primary {
    --bs-btn-color: var(--xx-navy-700);
    --bs-btn-border-color: var(--xx-navy-700);
    --bs-btn-hover-color: var(--xx-ink);
    --bs-btn-hover-bg: var(--xx-navy-50);
    --bs-btn-hover-border-color: var(--xx-navy-700);
    --bs-btn-active-color: var(--xx-ink);
    --bs-btn-active-bg: var(--xx-navy-100);
    --bs-btn-active-border-color: var(--xx-navy-700);
    background: var(--xx-surface);
    font-weight: 600;
}

/* --- Tarjetas: blancas con filo de niebla y sombra suave -------------------------- */

.card {
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r-lg);
    box-shadow: var(--xx-shadow);
}

.card-footer { background: transparent; border-top: 1px solid var(--xx-line-2); }

.table > :not(caption) > * > * { border-bottom-color: var(--xx-line-2); }
.table thead th { color: var(--xx-ink-3); font-weight: 600; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }

/* Etiquetas: verde niebla, dorado o terracota. La gravedad se lee por el tono. */
.badge.bg-success   { background: #dcebe4 !important; color: #2f4a3d; }
.badge.bg-secondary { background: var(--xx-navy-50) !important; color: var(--xx-ink-2); }
.badge.bg-info      { background: #d3e8e5 !important; color: #24524c; }
.badge.bg-warning   { background: var(--xx-amber-200) !important; color: #5a4510; }
.badge.bg-danger    { background: #f6dcd6 !important; color: #7d2e20; }

/* Tarjetas de cifras: el número en tinta; solo lo atrasado toma color. */
.xx-stat::before { display: none; }
.xx-stat .xx-stat__value,
.xx-stat--accent .xx-stat__value,
.xx-stat--success .xx-stat__value { color: var(--xx-ink); }
.xx-stat--warning .xx-stat__value { color: var(--xx-amber-700); }
.xx-stat--danger .xx-stat__value { color: #b5432f; }

/* --- Logo de Kaulo (paquete del 10-nov; _Wordmark.cshtml) ---------------------- */

.rh-wordmark { display: block; height: 34px; width: auto; }
.rh-wordmark--lg { height: 44px; }

.xx-avatar { background: var(--rh-mist); color: var(--xx-ink); box-shadow: none; }

/* ============================================================================
   MENÚ DE CAJAS (boceto A, 10-nov)
   Barra verde arriba + fila de cajas blancas. En pantallas angostas (< lg) la fila
   se vuelve una lista que abre la hamburguesa (body.xx-nav-open, de xixo.js).
   ============================================================================ */

.rh-app { background: var(--xx-canvas); }

/* --- Barra superior verde ------------------------------------------------------ */

.rh-top { background: var(--rh-mountains); color: #fff; position: relative; z-index: 1050; }

.rh-top__inner {
    max-width: var(--rh-wrap);
    margin: 0 auto;
    padding: 10px 28px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.rh-brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: #fff; text-decoration: none; }
.rh-brand:hover { color: #fff; }
.rh-brand__logo { height: 36px; width: auto; flex: 0 0 auto; }
.rh-brand__sub {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .25);
    font-size: .8rem;
    color: var(--rh-on-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh-top__right { margin-left: auto; }

.rh-top__btn,
.rh-userbtn {
    border: 1px solid rgba(255, 255, 255, .22);
    background: transparent;
    color: #fff;
    border-radius: var(--xx-r);
    transition: background var(--xx-t);
}

.rh-top__btn:hover,
.rh-userbtn:hover,
.rh-userbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }

.rh-top__btn:focus-visible,
.rh-userbtn:focus-visible { outline: none; box-shadow: var(--xx-ring); }

.rh-top__btn { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; }
.rh-top__btn svg { width: 20px; height: 20px; }

.rh-burger { display: none; }

.rh-userbtn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 10px 0 6px;
    font: inherit;
}

.rh-userbtn .xx-avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: .75rem; }
.rh-userbtn__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; min-width: 0; }
.rh-userbtn__name { font-size: .82rem; font-weight: 600; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-userbtn__role { font-size: .74rem; color: var(--rh-on-dark); }
.rh-userbtn__caret { width: 16px; height: 16px; }

.rh-usermenu { min-width: 220px; border-color: var(--xx-line); box-shadow: var(--xx-shadow-lg); padding: 6px; }
.rh-usermenu .dropdown-item { display: flex; align-items: center; gap: 8px; border-radius: var(--xx-r-sm); padding: 8px 10px; color: var(--xx-ink); }
.rh-usermenu .dropdown-item:hover,
.rh-usermenu .dropdown-item:focus { background: var(--xx-navy-50); color: var(--xx-ink); }

/* --- Fila de cajas -------------------------------------------------------------- */

.rh-boxnav { background: var(--xx-surface); border-bottom: 1px solid var(--xx-line); position: relative; z-index: 1040; }

.rh-boxnav__inner {
    max-width: var(--rh-wrap);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    flex-wrap: wrap;
}

.rh-boxwrap { display: flex; position: relative; }

.rh-box {
    min-width: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px 12px;
    border: 0;
    border-left: 1px solid var(--xx-line-2);
    background: var(--xx-surface);
    color: var(--xx-ink);
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background var(--xx-t);
}

.rh-boxnav__inner > :last-child .rh-box,
.rh-boxnav__inner > .rh-box:last-child { border-right: 1px solid var(--xx-line-2); }
.rh-boxwrap:last-child > .rh-box { border-right: 1px solid var(--xx-line-2); }

.rh-box:hover { background: var(--xx-surface-2); color: var(--xx-ink); }
.rh-box:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(217, 180, 74, .55); }

.rh-box__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--xx-r);
    display: grid;
    place-items: center;
    background: var(--xx-line-2);
    color: var(--xx-navy-700);
    transition: background var(--xx-t), color var(--xx-t);
}

.rh-box__icon svg { width: 22px; height: 22px; }
.rh-box__label { display: inline-flex; align-items: center; gap: 4px; line-height: 1.2; }
.rh-box__caret { width: 14px; height: 14px; flex: 0 0 14px; }

.rh-box.is-active,
.rh-box[aria-expanded="true"] { background: var(--xx-navy-50); font-weight: 600; box-shadow: inset 0 -3px 0 var(--xx-amber-400); }

.rh-box.is-active .rh-box__icon { background: var(--xx-amber-400); color: var(--xx-ink); }

/* --- Panel que despliega una caja ----------------------------------------------- */

.rh-panel {
    min-width: 300px;
    padding: 10px;
    border: 1px solid var(--xx-line);
    border-top: 3px solid var(--xx-amber-400);
    border-radius: 0 0 var(--xx-r) var(--xx-r);
    box-shadow: var(--xx-shadow-lg);
}

.rh-panel[data-bs-popper] { margin-top: 0; }

.rh-panel__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
    border-radius: var(--xx-r);
    white-space: normal;
}

.rh-panel__item:hover,
.rh-panel__item:focus,
.rh-panel__item.is-active { background: var(--xx-navy-50); }

.rh-panel__item.is-active { box-shadow: inset 3px 0 0 var(--xx-amber-400); }

.rh-panel__title { font-size: .88rem; font-weight: 600; color: var(--xx-ink); }
.rh-panel__desc { font-size: .76rem; color: var(--xx-ink-2); }

/* --- Root › Correos: lista a la izquierda, vista previa a la derecha -------------- */

.rh-email-send { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.rh-email-send__field { flex: 1 1 280px; max-width: 420px; }
.rh-email-send__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.rh-emails { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.rh-emails__list { flex: 1 1 280px; max-width: 340px; padding: 8px; }
.rh-emails__preview { flex: 999 1 560px; min-width: 0; overflow: hidden; }

.rh-emails__group {
    padding: 12px 10px 6px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--xx-ink-3);
}

.rh-emails__item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--xx-r); text-decoration: none; }
.rh-emails__item:hover { background: var(--xx-navy-50); }
.rh-emails__item.is-active { background: var(--xx-navy-50); box-shadow: inset 3px 0 0 var(--xx-amber-400); }
.rh-emails__name { font-size: .88rem; font-weight: 600; color: var(--xx-ink); }
.rh-emails__when { font-size: .76rem; color: var(--xx-ink-2); }

.rh-emails__head { border-bottom: 1px solid var(--xx-line-2); }
.rh-emails__label { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--xx-ink-3); }
.rh-emails__subject { font-size: 1rem; font-weight: 600; color: var(--xx-ink); overflow-wrap: anywhere; }

.rh-email-frame { display: block; width: 100%; height: 820px; border: 0; background: #f3f7f5; }

@media (max-width: 767.98px) {
    .rh-emails__list { max-width: none; }
    .rh-email-frame { height: 640px; }
}

/* --- Página bajo el menú -------------------------------------------------------- */

.rh-page { max-width: var(--rh-wrap); margin: 0 auto; padding: 28px 28px 56px; }

/* --- Celular y tableta: la fila de cajas se vuelve lista ------------------------ */

@media (max-width: 575.98px) {
    /* En el teléfono no cabe el nombre de la empresa junto al logo. */
    .rh-brand__sub { display: none; }
}

@media (max-width: 991.98px) {
    .rh-top__inner { padding: 8px 16px; min-height: 60px; }
    .rh-burger { display: grid; }
    .rh-userbtn__text { display: none; }
    .rh-brand__logo { height: 30px; }

    .rh-boxnav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        box-shadow: var(--xx-shadow-lg);
        z-index: 1045;
    }

    body.xx-nav-open .rh-boxnav { display: block; }
    body.xx-nav-open .xx-backdrop { opacity: 1; visibility: visible; }
    body.xx-nav-open { overflow: hidden; }

    .rh-boxnav__inner { flex-direction: column; padding: 8px; }
    .rh-boxwrap { flex-direction: column; }

    .rh-box,
    .rh-boxnav__inner > :last-child .rh-box,
    .rh-boxnav__inner > .rh-box:last-child,
    .rh-boxwrap:last-child > .rh-box {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        min-height: 52px;
        padding: 6px 10px;
        border: 0;
        border-radius: var(--xx-r);
        font-size: .92rem;
        text-align: left;
    }

    .rh-box.is-active,
    .rh-box[aria-expanded="true"] { box-shadow: inset 3px 0 0 var(--xx-amber-400); }

    .rh-box__icon { width: 36px; height: 36px; }

    .rh-panel { position: static !important; min-width: 0; margin: 2px 0 6px 48px; box-shadow: none; border-radius: var(--xx-r); }

    .rh-page { padding: 20px 16px 44px; }
}

/* --- Portada de acceso: panel verde con la marca, formulario en blanco ----------- */

.xx-auth { background: var(--xx-surface); }

.xx-auth__aside {
    color: #fff;
    background: var(--rh-mountains);
    border-right: 0;
}

.xx-auth__aside::before,
.xx-auth__aside::after { display: none; }


.xx-auth__headline { color: #fff; font-weight: 600; letter-spacing: -.03em; }

/* La palabra clave, subrayada con dorado como con un resaltador. */
.xx-auth__headline em {
    font-style: normal;
    color: #fff;
    background: linear-gradient(transparent 62%, rgba(217, 180, 74, .55) 62%);
}

.xx-auth__lead { color: var(--rh-on-dark); }
.xx-auth__lines li { color: #fff; }
.xx-auth__lines b { color: #fff; }
.xx-auth__lines span { color: var(--rh-on-dark); }
.xx-auth__lines i { background: var(--xx-amber-400); box-shadow: 0 0 0 4px rgba(217, 180, 74, .25); }
.xx-auth__foot { color: var(--rh-on-dark); }

.xx-auth__title { font-weight: 600; }

.xx-bare__brand .rh-wordmark { margin: 0 auto; }

/* Espacio del trabajador (/mi): barra blanca con filo dorado abajo. */
.rh-mi__bar { box-shadow: inset 0 -3px 0 var(--xx-amber-400); }


/* ============================================================================
   Plataforma RH — lo propio de este panel, encima de xixo.css.

   Sin estilos en línea: la CSP no los permite y un style= en el HTML se ignora
   sin avisar. Lo que una vista necesite va aquí, con los tokens de xixo.css.
   ============================================================================ */

/* --- Avisos flotantes (xxToast y TempData) ------------------------------------ */

.xx-toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1090;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
}

.xx-toast {
    --bs-toast-max-width: 100%;
    border-radius: var(--xx-r);
}

.xx-toast .toast-body { font-size: .875rem; line-height: 1.45; }

.xx-toast--success { background: var(--xx-success-bg); color: #0a5c39; box-shadow: inset 3px 0 0 var(--xx-success-fg), var(--xx-shadow); }
.xx-toast--danger  { background: var(--xx-danger-bg);  color: #8f1d13; box-shadow: inset 3px 0 0 var(--xx-danger-fg), var(--xx-shadow); }
.xx-toast--info    { background: var(--xx-info-bg);    color: #14459e; box-shadow: inset 3px 0 0 var(--xx-info-fg), var(--xx-shadow); }

@media (max-width: 575.98px) {
    /* En el celular, abajo y a todo lo ancho: arriba tapaba el título y el pulgar no llegaba a cerrarlo. */
    .xx-toasts { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
}

/* --- Formularios ------------------------------------------------------------------ */

.xx-field-error {
    display: block;
    font-size: .78rem;
    color: var(--xx-danger-fg);
    margin-top: .3rem;
}
.xx-field-error:empty { display: none; }

.input-validation-error,
.input-validation-error:focus { border-color: var(--xx-danger-fg); }

.xx-inline-form { display: inline-flex; margin: 0; }

.xx-auth__form .form-control.xx-code-input {
    font-family: var(--xx-font-mono);
    font-size: 1.5rem;
    letter-spacing: .45em;
    text-align: center;
    padding: .55rem .72rem;
}

button.is-sending { cursor: progress; }

/* --- Clave/valor en pantallas angostas ------------------------------------------ */

.xx-kv__v { overflow-wrap: anywhere; min-width: 0; }

@media (max-width: 575.98px) {
    /* Un correo largo a la derecha de su etiqueta no cabe en 360px: se apila. */
    .xx-kv__item { flex-direction: column; align-items: stretch; gap: 2px; }
    .xx-kv__v { text-align: left; }
}

/* --- Hoja suelta (errores y estados) --------------------------------------------- */

.xx-bare {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: var(--xx-canvas);
}

.xx-bare__card { width: 100%; max-width: 460px; }
.xx-bare__brand { display: flex; justify-content: center; margin-bottom: 18px; }

/* --- Íconos dentro de botones ------------------------------------------------------ */

.xx-btn-icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* --- Root operando una empresa ---------------------------------------------------- */

.xx-acting {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    background: var(--xx-amber-50);
    border: 1px solid var(--xx-amber-200);
    border-left: 3px solid var(--xx-amber-400);
    border-radius: var(--xx-r-sm);
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: .875rem;
    color: var(--xx-ink);
}

/* --- Búsqueda de listas -------------------------------------------------------------- */

.xx-search { max-width: 520px; }

/* --- Lista para el celular (en lugar de la tabla, por debajo de md) --------------- */

.xx-mobile-list { list-style: none; margin: 0; padding: 0; }
.xx-mobile-list__item + .xx-mobile-list__item { border-top: 1px solid var(--xx-line-2); }

.xx-mobile-list__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    color: inherit;
    text-decoration: none;
}
.xx-mobile-list__link:hover { background: var(--xx-navy-50); color: inherit; }

.xx-mobile-list__main { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.xx-mobile-list__title { font-weight: 600; color: var(--xx-ink); }
.xx-mobile-list__meta { font-size: .78rem; color: var(--xx-ink-3); }
.xx-mobile-list__chevron { color: var(--xx-ink-3); font-size: 1.3rem; flex: 0 0 auto; }

/* --- Paginador ----------------------------------------------------------------------- */

.xx-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.xx-pager__count { font-size: .8rem; color: var(--xx-ink-3); }
.xx-pager .page-link { color: var(--xx-navy-600); min-width: 34px; text-align: center; }
.xx-pager .page-item.active .page-link { background: var(--xx-navy-700); border-color: var(--xx-navy-700); color: #fff; }

/* --- Permisos -------------------------------------------------------------------------- */

.xx-perm-grid {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.xx-perm-grid > legend { grid-column: 1 / -1; margin-bottom: 0; float: none; }

.xx-perm {
    background: var(--xx-surface-2);
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r-sm);
    padding: 10px 12px 10px 2.3em;
    margin: 0;
}

.xx-perm__label { display: block; font-weight: 600; color: var(--xx-ink); font-size: .86rem; }
.xx-perm__desc { display: block; font-size: .76rem; color: var(--xx-ink-3); }

.xx-perm-note { grid-column: 1 / -1; display: none; margin: 0; }
.xx-perm-grid:disabled .xx-perm { opacity: .55; }
.xx-perm-grid:disabled .xx-perm-note { display: block; }

/* --- Opciones en tarjeta (rol, entrega de credenciales) --------------------------- */

.xx-choice {
    display: block;
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r-sm);
    padding: 11px 12px 11px 2.4em;
    margin-bottom: 8px;
    cursor: pointer;
    background: var(--xx-surface);
}

.xx-choice:has(input:checked) {
    border-color: var(--xx-navy-300);
    background: var(--xx-navy-50);
    box-shadow: inset 3px 0 0 var(--xx-amber-400);
}

.xx-choice__label { display: block; font-weight: 600; color: var(--xx-ink); font-size: .88rem; }
.xx-choice__desc { display: block; font-size: .78rem; color: var(--xx-ink-3); }

/* --- Formularios largos -------------------------------------------------------------- */

.xx-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled .form-control,
fieldset:disabled .form-select { background-color: var(--xx-surface-2); }

.xx-default-text { font-size: .76rem; color: var(--xx-ink-3); margin-top: .3rem; overflow-wrap: anywhere; }

/* La barra de guardar se queda a la vista al bajar por un formulario largo: en el celular, llegar al final para
   encontrar el botón era perder cambios. */
.xx-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 0;
    margin-top: 8px;
    background: linear-gradient(to top, var(--xx-canvas) 70%, transparent);
}

@media (max-width: 575.98px) {
    .xx-form-actions .btn { flex: 1 1 auto; }
}

/* --- Filtros de lista (búsqueda + estado) ------------------------------------------ */

.xx-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 720px;
    margin-bottom: 16px;
}

.xx-filters .form-control { flex: 1 1 240px; min-width: 0; }
.xx-filters .form-select { flex: 0 1 200px; min-width: 0; }

@media (max-width: 575.98px) {
    .xx-filters .form-select,
    .xx-filters .btn { flex: 1 1 auto; }
}

/* --- Estado junto al título ----------------------------------------------------------- */

.xx-page-head__title .badge { font-size: .68rem; vertical-align: middle; letter-spacing: .02em; }

/* --- Formulario plegable dentro de una tarjeta ------------------------------------- */

.xx-details-card {
    border-top: 1px solid var(--xx-line-2);
    padding-top: 12px;
}

.xx-details-card > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
    color: var(--xx-navy-600);
}

.xx-details-card > summary:hover { color: var(--xx-navy-700); }

/* --- Servicio pausado --------------------------------------------------------------- */

.xx-paused { max-width: 560px; margin: 24px auto 0; text-align: center; }

/* --- Credenciales de un terapeuta ----------------------------------------------------- */

.xx-cred { padding: 13px 16px; }

.xx-cred__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.xx-cred__actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* La contraseña revelada: monoespaciada y seleccionable, que es para lo que se pide. */
.xx-cred__value {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--xx-navy-50);
    border: 1px dashed var(--xx-navy-300);
    border-radius: var(--xx-r-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .85rem;
    overflow-wrap: anywhere;
    user-select: all;
}

/* --- Campanita ------------------------------------------------------------------------ */

.xx-bell { position: relative; }

.xx-bell__btn { position: relative; }

/* El globito del conteo: se ve sin tener que abrir nada. */
.xx-bell__count {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--xx-danger-fg);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.xx-bell__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1040;
    width: min(360px, calc(100vw - 32px));
    background: var(--xx-surface);
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r);
    box-shadow: var(--xx-shadow);
    overflow: hidden;
}

.xx-bell__head,
.xx-bell__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
}

.xx-bell__head { border-bottom: 1px solid var(--xx-line-2); }
.xx-bell__foot { border-top: 1px solid var(--xx-line-2); background: var(--xx-surface-2); }

.xx-bell__body { max-height: min(60vh, 420px); overflow-y: auto; }

.xx-notif {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--xx-line-2);
    background: none;
    text-align: left;
    color: inherit;
    text-decoration: none;
}

.xx-notif:hover { background: var(--xx-navy-50); color: inherit; }

/* Lo no leído se distingue sin color solo: barra a la izquierda y título en negritas. */
.xx-notif--unread { box-shadow: inset 3px 0 0 var(--xx-amber-400); }

.xx-notif__title { font-weight: 600; color: var(--xx-ink); }
.xx-notif--unread .xx-notif__title { font-weight: 700; }
.xx-notif__body { font-size: .82rem; color: var(--xx-ink-2); }
.xx-notif__time { font-size: .75rem; color: var(--xx-ink-3); }

.xx-notif-empty { padding: 22px 14px; text-align: center; color: var(--xx-ink-3); font-size: .85rem; }

/* --- Correos a terapeutas ------------------------------------------------------------ */

/* La vista previa es el texto plano del correo: se respetan los saltos de línea y se parte lo largo (URLs). */
.xx-email-preview {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r-sm);
    background: var(--xx-surface-2);
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .82rem;
    line-height: 1.55;
    color: var(--xx-ink);
    max-height: 70vh;
    overflow-y: auto;
}

/* Elegir terapeutas a mano: la lista se desplaza dentro de la tarjeta y no empuja la página hasta el fondo. */
.xx-picker { max-height: 480px; overflow-y: auto; margin: 0; }
.xx-picker .xx-mobile-list__link { cursor: pointer; gap: 10px; }
.xx-picker .form-check-input { margin: 0; flex: 0 0 auto; }
fieldset:disabled .xx-picker { opacity: .55; }

.xx-template-body { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .85rem; line-height: 1.5; }

.xx-token { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .8rem; white-space: nowrap; }

/* --- Buscador de claves del SAT ------------------------------------------------------ */

.xx-picker-field { position: relative; }

.xx-picker-field__results {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 2px;
    background: var(--xx-surface);
    border: 1px solid var(--xx-line);
    border-radius: var(--xx-r-sm);
    box-shadow: var(--xx-shadow);
}

.xx-picker-field__option {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--xx-line-2);
    background: none;
    text-align: left;
    font-size: .86rem;
    color: var(--xx-ink);
}

.xx-picker-field__option:hover,
.xx-picker-field__option:focus { background: var(--xx-navy-50); outline: none; }
.xx-picker-field__option strong { flex: 0 0 auto; font-family: var(--xx-font-mono); font-weight: 600; }
.xx-picker-field__empty { padding: 10px 12px; font-size: .84rem; color: var(--xx-ink-3); }

.xx-picker-field__chosen { display: flex; gap: 8px; margin-top: 6px; font-size: .86rem; min-height: 1.3em; overflow-wrap: anywhere; }
.xx-picker-field__chosen strong { font-family: var(--xx-font-mono); }

/* --- Totales de una factura ------------------------------------------------------------- */

.xx-totals { max-width: 420px; margin-left: auto; }

/* --- Imprimir (cotizaciones) ------------------------------------------------------------ */

@media print {
    .xx-sidebar, .xx-topbar, .rh-top, .rh-boxnav, .xx-backdrop, .xx-acting, .xx-no-print, .xx-toasts { display: none !important; }
    .xx-main { margin: 0 !important; }
    .xx-page { padding: 0 !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ── Espacio del trabajador (/mi): una columna, pensado para el celular ── */
.rh-mi { background: var(--bs-body-bg); }
.rh-mi__bar { border-bottom: 1px solid var(--xx-line); background: #fff; }
.rh-mi__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; }
.rh-mi__nav { display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
.rh-mi__nav a { text-decoration: none; }
.rh-mi__main { max-width: 640px; padding: 1.5rem 1rem 3rem; }

/* ── Campanita de Kaulo (bloque 2): en la barra verde del panel y en la barra blanca del trabajador ── */
.rh-bell { position: relative; margin-left: auto; }
.rh-bell + .rh-top__right { margin-left: 0; }

.rh-bell__btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--xx-r);
    background: transparent;
    color: #fff;
    transition: background var(--xx-t);
}
.rh-bell__btn:hover,
.rh-bell__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.rh-bell__btn:focus-visible { outline: none; box-shadow: var(--xx-ring); }
.rh-bell__btn svg { width: 20px; height: 20px; }

.rh-bell--light .rh-bell__btn { color: var(--xx-ink); border-color: var(--xx-line); }
.rh-bell--light .rh-bell__btn:hover,
.rh-bell--light .rh-bell__btn[aria-expanded="true"] { background: var(--xx-navy-50); }

/* El número: dorado con tinta oscura (el blanco sobre dorado no se lee). */
.rh-bell__count {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--xx-amber-400);
    color: var(--xx-ink);
    font-size: .68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--rh-mountains);
}
.rh-bell--light .rh-bell__count { box-shadow: 0 0 0 2px #fff; }

.rh-bell__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;
    width: min(380px, calc(100vw - 24px));
    background: var(--xx-surface);
    color: var(--xx-ink);
    border: 1px solid var(--xx-line);
    border-top: 3px solid var(--xx-amber-400);
    border-radius: var(--xx-r);
    box-shadow: var(--xx-shadow-lg);
    overflow: hidden;
}

.rh-bell__head,
.rh-bell__push { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.rh-bell__head { border-bottom: 1px solid var(--xx-line-2); }
.rh-bell__push { border-top: 1px solid var(--xx-line-2); background: var(--xx-navy-50); }
.rh-bell__push-text { font-size: .8rem; color: var(--xx-ink-2); }

.rh-bell__link { border: 0; background: none; padding: 4px 0; font-size: .8rem; font-weight: 600; color: var(--xx-navy-700); }
.rh-bell__link:hover { text-decoration: underline; }

.rh-bell__list { max-height: min(60vh, 420px); overflow-y: auto; }
.rh-bell__empty { padding: 24px 14px; text-align: center; font-size: .86rem; color: var(--xx-ink-3); }

.rh-notif {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--xx-line-2);
    background: none;
    text-align: left;
    color: inherit;
}
.rh-notif:hover,
.rh-notif:focus-visible { background: var(--xx-navy-50); outline: none; }

/* Lo no leído se distingue sin depender del color: barra a la izquierda y título más grueso. */
.rh-notif--unread { box-shadow: inset 3px 0 0 var(--xx-amber-400); background: var(--xx-amber-50); }
.rh-notif__title { font-size: .88rem; font-weight: 600; color: var(--xx-ink); }
.rh-notif--unread .rh-notif__title { font-weight: 700; }
.rh-notif__body { font-size: .8rem; color: var(--xx-ink-2); overflow-wrap: anywhere; }
.rh-notif__time { font-size: .72rem; color: var(--xx-ink-3); }

/* Barra del trabajador: campanita + menú en la misma fila. */
.rh-mi__right { display: flex; align-items: center; gap: 12px; }
.rh-mi__right .rh-bell { margin-left: 0; }

@media (max-width: 575.98px) {
    .rh-mi__bar-inner { flex-wrap: wrap; }
    .rh-mi__nav { gap: .75rem; font-size: .9rem; }
}

/* ── Empresa › Avisos ── */
.rh-note { border-radius: var(--xx-r); }
.rh-prefs td, .rh-prefs th { vertical-align: middle; }
.rh-prefs__label { color: var(--xx-ink); font-weight: 600; }
.rh-prefs__who { font-size: .85rem; color: var(--xx-ink-2); }
.rh-prefs__always { font-size: .8rem; color: var(--xx-ink-3); }
.rh-prefs .form-check-input { width: 1.25em; height: 1.25em; }

/* ── Catálogos de jornada (bloque 3) ── */
.rh-muted-sm { font-size: .82rem; color: var(--xx-ink-2); }

.rh-named-list { list-style: none; margin: 0 0 12px; padding: 0; }
.rh-named-list__item + .rh-named-list__item { border-top: 1px solid var(--xx-line-2); }
.rh-named-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; }
.rh-named-form .form-control { flex: 1 1 180px; min-width: 0; }
.rh-named-form__check { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: 0; }
.rh-named-form__check .form-check-input { margin: 0; float: none; }
.rh-named-form__count { min-width: 82px; }
.rh-named-form--new { border-top: 1px dashed var(--xx-line); padding-top: 12px; }

.rh-sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.rh-sched { text-decoration: none; color: inherit; transition: box-shadow var(--xx-t), border-color var(--xx-t); }
.rh-sched:hover { border-color: var(--xx-amber-400); box-shadow: var(--xx-shadow-lg); color: inherit; }
.rh-sched__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rh-sched__name { font-size: 1rem; color: var(--xx-ink); }
.rh-sched__meta { font-size: .8rem; color: var(--xx-ink-2); margin: 2px 0 10px; }
.rh-sched__days { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rh-sched__day { display: flex; gap: 10px; align-items: center; font-size: .84rem; color: var(--xx-ink); font-variant-numeric: tabular-nums; }
.rh-sched__day.is-rest { color: var(--xx-ink-3); }
.rh-sched__dname { width: 34px; font-weight: 600; text-transform: capitalize; }
.rh-sched__warn {
    display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
    background: var(--xx-amber-200); color: #5a4510; font-size: .72rem; font-weight: 700;
}

.rh-week td, .rh-week th { vertical-align: middle; }
.rh-week input[type="time"] { min-width: 110px; }
.rh-week input[type="number"] { max-width: 100px; }
.rh-week__calc { font-size: .82rem; color: var(--xx-ink); min-width: 200px; }
.rh-week__warn { margin-top: 3px; font-size: .78rem; color: #5a4510; background: var(--xx-amber-50); border-left: 3px solid var(--xx-amber-400); padding: 3px 8px; border-radius: 4px; }

/* El panel de "Empresa" agrupa más pantallas: dos columnas en escritorio. */
.rh-panel--wide { min-width: min(560px, calc(100vw - 32px)); }
.rh-panel__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
/* Jornada: registro, días justificados y reportes (bloque 8) en tres columnas. */
.rh-panel--xwide { min-width: min(820px, calc(100vw - 32px)); }
.rh-panel__cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rh-panel__group { padding: 6px 12px 2px; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--xx-ink-3); }
@media (max-width: 991.98px) {
    .rh-panel--wide, .rh-panel--xwide { min-width: 0; }
    .rh-panel__cols, .rh-panel__cols--3 { grid-template-columns: 1fr; }
}

/* ── Checar desde el celular (bloque 4) ── */
.rh-punch { border-top: 4px solid var(--xx-amber-400); }
.rh-punch .card-body { display: grid; gap: 12px; text-align: center; }
.rh-punch__clock { font-size: 3rem; font-weight: 700; letter-spacing: -.03em; color: var(--xx-ink); font-variant-numeric: tabular-nums; line-height: 1; }
.rh-punch__meta { font-size: .88rem; color: var(--xx-ink-2); }
.rh-punch__btn { min-height: 64px; font-size: 1.2rem; }
.rh-punch__status { font-size: .92rem; min-height: 1.2em; }
.rh-punch__status--success { color: #2f4a3d; font-weight: 600; }
.rh-punch__status--danger { color: #7d2e20; font-weight: 600; }
.rh-punch__status--warning { color: #5a4510; font-weight: 600; }
.rh-punch__pending { font-size: .84rem; background: var(--xx-amber-50); border: 1px solid var(--xx-amber-200); border-radius: var(--xx-r); padding: 8px 12px; }
.rh-punch__warn { font-size: .84rem; color: #5a4510; margin: 0; }
.rh-punch__list { list-style: none; margin: 0; padding: 0; text-align: left; }
.rh-punch__item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--xx-line-2); font-size: .9rem; }
.rh-punch__note { font-size: .75rem; color: var(--xx-ink-3); margin: 0; }

/* ── Tableta del kiosco ── */
.rh-kiosk { min-height: 100vh; background: var(--xx-canvas); }
.rh-kiosk__bar { background: var(--rh-mountains); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; }
.rh-kiosk__logo { height: 40px; width: auto; }
.rh-kiosk__where { color: var(--rh-on-dark); font-size: 1rem; }
.rh-kiosk__main { display: grid; place-items: center; padding: 32px 16px; }
.rh-kiosk__card { width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--xx-line); border-top: 4px solid var(--xx-amber-400); border-radius: 12px; box-shadow: var(--xx-shadow-lg); padding: 28px; text-align: center; }
.rh-kiosk__card--ok { border-top-color: var(--rh-sky); }
.rh-kiosk__title { font-size: 1.6rem; margin-bottom: 18px; }
.rh-kiosk__text { color: var(--xx-ink-2); font-size: 1rem; }
.rh-kiosk__big { font-size: 1.5rem; font-weight: 600; color: var(--xx-ink); margin: 12px 0 20px; }
.rh-kiosk__check { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--rh-mist); color: var(--xx-ink); font-size: 3rem; font-weight: 700; display: grid; place-items: center; }
.rh-kiosk__form { display: grid; gap: 10px; text-align: left; }
.rh-kiosk__form .form-control-lg { font-size: 1.5rem; padding: .7rem 1rem; }
.rh-kiosk__form .btn { min-height: 64px; font-size: 1.3rem; margin-top: 8px; }
.rh-kiosk__alert { text-align: left; }

/* ── Detalle del día y correcciones ── */
.rh-chain { font-size: .86rem; margin-bottom: 12px; }
.rh-chain--ok { color: #2f4a3d; }
.rh-punch-row td { vertical-align: middle; }
.rh-punch-row.is-void td { color: var(--xx-ink-3); text-decoration: line-through; }
.rh-punch-row.is-void td:last-child, .rh-punch-row.is-void .badge { text-decoration: none; }
.rh-fix { display: inline-block; text-align: left; }
.rh-fix > summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--xx-navy-700); }
.rh-fix__form { display: grid; gap: 4px; min-width: 220px; margin-top: 6px; padding: 10px; border: 1px solid var(--xx-line); border-radius: var(--xx-r); background: var(--xx-surface-2); }
.rh-reject { display: flex; gap: 6px; align-items: center; margin: 0; }
.rh-reject .form-control { min-width: 200px; }
.rh-steps { padding-left: 1.2em; font-size: .9rem; color: var(--xx-ink-2); }

/* ── Motor de jornada (bloque 5): barra de horas contra el tope semanal. Ancho por clase: la CSP no deja style=. ── */
.rh-meter__label { font-size: .92rem; margin-bottom: 6px; }
.rh-meter { height: 12px; border-radius: 6px; background: var(--xx-line-2); overflow: hidden; }
.rh-meter__bar { height: 100%; background: var(--rh-sky); border-radius: 6px; }
.rh-meter__bar.is-near { background: var(--xx-amber-400); }
.rh-meter__bar.is-over { background: #c9634f; }
.rh-w-0 { width: 0%; }
.rh-w-5 { width: 5%; }
.rh-w-10 { width: 10%; }
.rh-w-15 { width: 15%; }
.rh-w-20 { width: 20%; }
.rh-w-25 { width: 25%; }
.rh-w-30 { width: 30%; }
.rh-w-35 { width: 35%; }
.rh-w-40 { width: 40%; }
.rh-w-45 { width: 45%; }
.rh-w-50 { width: 50%; }
.rh-w-55 { width: 55%; }
.rh-w-60 { width: 60%; }
.rh-w-65 { width: 65%; }
.rh-w-70 { width: 70%; }
.rh-w-75 { width: 75%; }
.rh-w-80 { width: 80%; }
.rh-w-85 { width: 85%; }
.rh-w-90 { width: 90%; }
.rh-w-95 { width: 95%; }
.rh-w-100 { width: 100%; }
.rh-week-mini { display: grid; gap: 6px; text-align: left; font-size: .88rem; }
.rh-rules input[type="number"] { max-width: 90px; }
.rh-rules td, .rh-rules th { vertical-align: middle; }
.rh-inline-num { display: inline-block; width: 72px; margin: 0 4px; }

/* ── Días justificados (bloque 6) ── */
.rh-leave-balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.rh-leave-balance { border-top: 4px solid var(--rh-sky); }
.rh-leave-balance__label { font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--xx-ink-2); }
.rh-leave-balance__value { font-size: 2rem; font-weight: 700; color: var(--xx-ink); line-height: 1.1; }
.rh-leave-balance__value span { font-size: .9rem; font-weight: 500; color: var(--xx-ink-2); }
.rh-overlap { margin-top: 4px; font-size: .8rem; color: #5a4510; background: var(--xx-amber-50); border-left: 3px solid var(--xx-amber-400); padding: 3px 8px; border-radius: 4px; }
.rh-neg { color: #7d2e20; font-weight: 600; }
.rh-pos { color: #2f4a3d; font-weight: 600; }
.rh-punch__rest { margin: 0; padding: 8px 12px; border-radius: var(--xx-r); background: var(--xx-navy-50); color: var(--xx-ink); font-size: .92rem; }

/* ── Convenio y aceptación semanal (bloque 7) ── */
.rh-meter__bar--ok { background: var(--rh-mountains); }
.rh-disputes { border-left: 4px solid #c9634f; }
.rh-paper summary { cursor: pointer; font-size: .85rem; color: var(--xx-ink-2); }
.rh-paper form { max-width: 320px; margin-left: auto; }
.rh-agreement-text { font-size: .92rem; line-height: 1.5; }
.rh-marks { columns: 2 240px; margin: 6px 0 0; padding-left: 18px; font-size: .85rem; color: var(--xx-ink-2); }
.rh-sign-todo { border-left: 4px solid var(--rh-sunglow); }
.rh-sign-todo--agreement { background: var(--xx-amber-50); }
.rh-sign-actions { display: grid; gap: 10px; }

/* ── Reportes (bloque 8) ── */
.rh-report-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.rh-incidents th, .rh-incidents td { white-space: nowrap; font-size: .88rem; }
.rh-incidents .is-zero { color: var(--xx-ink-3); }

/* ── Expediente digital (Fase 2, bloque 1) ── */
.rh-stat-link { color: inherit; text-decoration: none; }
.rh-stat-link--on { outline: 2px solid var(--rh-mountains); outline-offset: -2px; }
.rh-dossier-meter { width: 70px; height: 10px; vertical-align: middle; margin-right: 6px; }
.rh-dossier-item .list-group-item { background: transparent; }
.rh-dossier-upload > summary, .rh-dossier-withdraw > summary { list-style: none; }
.rh-dossier-upload > summary::-webkit-details-marker, .rh-dossier-withdraw > summary::-webkit-details-marker { display: none; }
.rh-dossier-withdraw form { max-width: 320px; }
.rh-dossier-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.rh-dossier-form__file, .rh-dossier-form__note { grid-column: 1 / -1; }
.rh-dossier-type { max-width: 640px; }
/* Sin JavaScript: la vigencia solo se ve si el documento vence, y cada lista solo con su opción. */
.rh-dossier-type__months { display: none; margin-top: 8px; }
.rh-dossier-type__expiry:has(input[name="Expires"][type="checkbox"]:checked) .rh-dossier-type__months { display: block; }
.rh-applies__list { display: none; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--xx-line, #dfe3dc); border-radius: 8px; columns: 2 220px; }
.rh-applies:has(input[value="puestos"]:checked) .rh-applies__list--puestos,
.rh-applies:has(input[value="centros"]:checked) .rh-applies__list--centros { display: block; }

/* ── Ficha de datos personales (Fase 2, bloque 2) ── */
.rh-profile { max-width: 900px; }
.rh-profile__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rh-profile__wide { grid-column: 1 / -1; }
.rh-upper { text-transform: uppercase; }

/* ── Lo que sube el trabajador y la liga de nuevo ingreso (Fase 2, bloque 3) ── */
.rh-dossier-review { border-left: 4px solid var(--rh-sunglow); padding: 8px 12px; background: var(--xx-amber-50); border-radius: 6px; }
.rh-invite-link { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }

/* ── Credencial digital (Fase 2, bloque 6) ── */
.rh-cred { max-width: 460px; border: 1px solid var(--xx-line, #dfe3dc); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.rh-cred--off { filter: grayscale(.6); opacity: .85; }
.rh-cred__bar { display: flex; justify-content: space-between; align-items: center; background: var(--rh-mountains, #4F6457); color: #fff; padding: 8px 12px; border-bottom: 3px solid var(--rh-sunglow, #D9B44A); }
.rh-cred__company { font-weight: 600; }
.rh-cred__tag { color: var(--rh-sunglow, #D9B44A); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.rh-cred__body { display: grid; grid-template-columns: 96px 1fr 120px; gap: 12px; padding: 12px; align-items: center; }
.rh-cred__photo { width: 96px; height: 116px; object-fit: cover; border-radius: 8px; border: 1px solid var(--xx-line, #dfe3dc); }
.rh-cred__photo--initials { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: var(--rh-mountains, #4F6457); background: #F3F7F5; }
.rh-cred__name { font-weight: 700; font-size: 1.05rem; }
.rh-cred__line { font-size: .85rem; color: var(--xx-ink-2, #5B6B62); }
.rh-cred__qr { width: 120px; height: 120px; image-rendering: pixelated; }
@media (max-width: 420px) { .rh-cred__body { grid-template-columns: 80px 1fr; } .rh-cred__qr { grid-column: 1 / -1; justify-self: center; } .rh-cred__photo { width: 80px; height: 98px; } }
.rh-verify { padding: 8px 0; }
.rh-verify__state { font-size: 1.25rem; font-weight: 700; padding: 12px; border-radius: 10px; margin-bottom: 16px; }
.rh-verify__state--ok { background: #e6f4ea; color: #1e6b34; }
.rh-verify__state--off { background: #fdecea; color: #a23a2c; }
.rh-verify__photo { width: 120px; height: 146px; object-fit: cover; border-radius: 10px; border: 1px solid #dfe3dc; }
