/* ==========================================================================
   Uteam · Componentes de página (administración, formularios, marcar con passkey).
   Cargar DESPUÉS de uteam-tokens.css y uteam-layout.css. Solo variables --ut-*.
   ========================================================================== */

/* ---- Marcar con passkey (pantalla completa, sin barra lateral) ---- */
.ut-marcar__back { margin-left: -12px; color: var(--ut-text-2) !important; font-size: 15px; }
.ut-marcar__fecha { font-size: 14px; color: var(--ut-muted); }
.ut-marcar__main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0; }
.ut-marcar__col { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 20px; }
.ut-marcar__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
  padding: 40px clamp(20px, 5vw, 40px); border-radius: var(--ut-radius-xl); background: var(--ut-surface);
  border: 1px solid var(--ut-border); box-shadow: var(--ut-shadow-lg); }
.ut-marcar__tile { width: 80px; height: 80px; border-radius: 22px; background: var(--ut-primary-soft); color: var(--ut-primary-text);
  display: flex; align-items: center; justify-content: center; }
.ut-marcar__tile .ut-i { width: 44px; height: 44px; stroke-width: 1.6; }
.ut-marcar__texto { display: flex; flex-direction: column; gap: 8px; }
.ut-marcar__texto h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 600; }
.ut-marcar__texto p { margin: 0; font-size: 16px; line-height: 24px; color: var(--ut-text-2); text-wrap: pretty; }
.ut-btn--xl { width: 100%; min-height: 56px; border-radius: 12px; font-size: 17px; }
.ut-btn--xl .ut-i { width: 22px; height: 22px; stroke-width: 1.9; }
.ut-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.ut-spin { animation: ut-spin .9s linear infinite; }
.ut-marcar__estado { width: 100%; }
.ut-marcar__listo, .ut-marcar__ayuda { margin: 0; font-size: 14px; color: var(--ut-muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.ut-marcar__listo .ut-dot { background: var(--ut-ok); }
.ut-marcar__alerta { text-align: left; align-items: center; }
.ut-marcar__alerta .ut-i { width: 26px; height: 26px; align-self: flex-start; }
.ut-marcar__alerta strong { display: block; font-size: 16px; }
.ut-marcar__alerta-detalle { display: block; font-size: 14px; color: var(--ut-text-2); margin-top: 2px; }
.ut-marcar__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  border-radius: var(--ut-radius-lg); border: 1px solid var(--ut-border); background: var(--ut-surface); }
.ut-marcar__conn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.ut-marcar__conn .ut-i { width: 18px; height: 18px; stroke-width: 2; }
.ut-marcar__conn--ok { color: var(--ut-ok); }
.ut-marcar__conn--warn { color: var(--ut-warn); }
.ut-marcar__pend { font-size: 14px; color: var(--ut-muted); }
.ut-marcar__pend strong { color: var(--ut-text); }
.ut-marcar__footer { display: flex; justify-content: center; padding-top: 16px; border-top: 1px solid var(--ut-border); }

/* ---- Página de administración ---- */
.ut-page { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.ut-page--narrow { max-width: 640px; }
.ut-page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ut-page__title { margin: 0; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.ut-page__sub { margin: 4px 0 0; font-size: 15px; color: var(--ut-muted); }
.ut-section-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.ut-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; align-items: start; }
.ut-panel { display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--ut-radius-lg); }
.ut-panel--flush { padding: 0; gap: 0; overflow: hidden; }
.ut-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--ut-border); }
.ut-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ut-count { font-size: 13px; color: var(--ut-muted); }

/* Alertas de tokens: variantes con texto en gris y título coloreado */
.ut-alert > .ut-i { margin-top: 2px; }
.ut-alert p { margin: 0; font-size: 14px; line-height: 22px; color: var(--ut-text-2); }
.ut-alert p strong { color: inherit; }
.ut-alert--bad p, .ut-alert--ok p, .ut-alert--warn p, .ut-alert--info p { color: var(--ut-text-2); }

/* Formularios */
.ut-form { display: flex; flex-direction: column; gap: 20px; }
.ut-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.ut-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ut-label { font-size: 14px; font-weight: 500; color: var(--ut-text); }
.ut-label small { font-weight: 400; color: var(--ut-muted); }
.ut-help { font-size: 13px; color: var(--ut-muted); }
.ut-error { font-size: 13px; color: var(--ut-bad); }
.ut-field { width: 100%; box-sizing: border-box; }
select.ut-field { padding-right: 36px; }
textarea.ut-field { padding: 10px 14px; min-height: 96px; }
.ut-field::placeholder { color: var(--ut-muted); opacity: 1; }
.ut-field:disabled, .ut-field[readonly] { background: var(--ut-surface-2); color: var(--ut-text-2); }
.ut-form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-validation-error, .text-danger.field-validation-error { color: var(--ut-bad) !important; font-size: 13px; }
.input-validation-error { border-color: var(--ut-bad) !important; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* Barra de filtros */
.ut-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ut-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.ut-search .ut-i { position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; color: var(--ut-muted); pointer-events: none; }
.ut-search .ut-field { padding-left: 42px; }
.ut-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ut-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ut-border-strong);
  background: var(--ut-surface); color: var(--ut-text-2); font: 500 14px var(--ut-font); cursor: pointer; transition: background .15s, border-color .15s; }
.ut-chip:hover { background: var(--ut-surface-2); }
.ut-chip[aria-pressed="true"], .ut-chip[aria-current="true"] { border-color: var(--ut-primary); background: var(--ut-primary-soft); color: var(--ut-primary-text); font-weight: 600; }
.ut-chip .ut-i { width: 14px; height: 14px; stroke-width: 2.75; }

/* Tablas */
.ut-tablewrap { border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); box-shadow: var(--ut-shadow); overflow-x: auto; max-height: min(70vh, 720px); overflow-y: auto; }
.ut-tablewrap thead th { position: sticky; top: 0; z-index: 1; background: var(--ut-surface); }
.ut-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; color: var(--ut-text); }
.ut-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ut-muted); padding: 12px 20px; border-bottom: 1px solid var(--ut-border); white-space: nowrap; }
.ut-table td { padding: 12px 20px; border-bottom: 1px solid var(--ut-border); vertical-align: middle; }
.ut-table tbody tr:last-child td { border-bottom: 0; }
.ut-table tbody tr:hover td { background: var(--ut-surface-2); }
.ut-table .ut-num { text-align: right; font-variant-numeric: tabular-nums; }
.ut-table .ut-muted-cell { color: var(--ut-text-2); }
.ut-table tr.is-anulado td { color: var(--ut-muted); text-decoration: line-through; }
.ut-tablewrap--wide .ut-table { min-width: 900px; }

/* Personas */
.ut-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ut-avatar--sm { width: 40px; height: 40px; font-size: 14px; }
.ut-person__name { font-weight: 600; display: block; }
.ut-person__id { font-size: 13px; color: var(--ut-muted); display: block; }

/* Acciones por fila y menú */
.ut-actions { position: relative; display: flex; justify-content: flex-end; gap: 4px; }
.ut-btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 500; }
.ut-menu { position: absolute; right: 0; top: 50px; z-index: 5; width: 250px; padding: 6px; border-radius: 12px; background: var(--ut-surface);
  border: 1px solid var(--ut-border); box-shadow: var(--ut-shadow-lg); display: flex; flex-direction: column; }
.ut-menu[hidden] { display: none; }
.ut-menu__item { display: flex; align-items: center; gap: 10px; min-height: var(--ut-hit); padding: 0 12px; border-radius: 8px; border: 0; background: transparent;
  color: var(--ut-text); font: 400 14px var(--ut-font); text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.ut-menu__item:hover { background: var(--ut-surface-2); color: var(--ut-text); }
.ut-menu__item--danger { color: var(--ut-bad); font-weight: 500; }
.ut-menu__item .ut-i { width: 18px; height: 18px; }
.ut-menu__sep { height: 1px; margin: 6px 0; background: var(--ut-border); }
a.ut-menu__item, a.ut-menu__item:hover { text-decoration: none; }
a.ut-menu__item--danger:hover { color: var(--ut-bad); }
a.ut-btn--icon, a.ut-btn--icon:hover { color: var(--ut-muted); }

/* Estado vacío */
.ut-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; }
.ut-empty[hidden] { display: none; }
.ut-empty__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ut-surface-2); color: var(--ut-muted); display: flex; align-items: center; justify-content: center; }
.ut-empty__icon .ut-i { width: 24px; height: 24px; }
.ut-empty strong { font-size: 16px; }
.ut-empty span { font-size: 14px; color: var(--ut-muted); max-width: 360px; }

/* Diálogo de confirmación (<dialog role="alertdialog">) y aviso con "Deshacer" */
dialog.ut-dialog { width: calc(100% - 32px); max-width: 440px; padding: 24px; border-radius: 16px; background: var(--ut-surface); color: var(--ut-text);
  border: 1px solid var(--ut-border); box-shadow: var(--ut-shadow-lg); margin: 120px auto auto; }
dialog.ut-dialog::backdrop { background: var(--ut-scrim); }
.ut-dialog__body { display: flex; gap: 14px; align-items: flex-start; }
.ut-dialog__icon { width: 40px; height: 40px; border-radius: 999px; background: var(--ut-bad-soft); color: var(--ut-bad); display: flex; align-items: center; justify-content: center; flex: none; }
.ut-dialog__icon .ut-i { width: 20px; height: 20px; }
.ut-dialog__title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.ut-dialog__text { margin: 0; font-size: 14px; line-height: 20px; color: var(--ut-muted); }
.ut-dialog__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.ut-btn--danger-solid { background: #B42318; color: #fff; }
.ut-btn--danger-solid:hover:not(:disabled) { background: #912018; }
.ut-toast { position: fixed; right: 24px; bottom: 24px; z-index: 1100; max-width: calc(100% - 48px); display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--ut-ink); color: #fff; box-shadow: var(--ut-shadow-lg); font-size: 14px; }
.ut-toast[hidden] { display: none; }
.ut-toast .ut-i { width: 20px; height: 20px; color: #4ACB8A; stroke-width: 2.5; }
.ut-toast__undo { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: 600 14px var(--ut-font); cursor: pointer; }
.ut-toast__undo:hover { background: rgba(255,255,255,.2); }

/* Tarjeta de passkey */
.ut-passkey { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--ut-border); }
.ut-passkey:last-child { border-bottom: 0; }
.ut-passkey__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ut-surface-2); color: var(--ut-text-2); display: flex; align-items: center; justify-content: center; flex: none; }
.ut-passkey__icon .ut-i { width: 22px; height: 22px; }
.ut-passkey__body { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ut-passkey__name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.ut-tag { font-size: 12px; padding: 2px 8px; border-radius: var(--ut-radius-sm); background: var(--ut-surface-2); border: 1px solid var(--ut-border); color: var(--ut-text-2); font-weight: 500; }
.ut-passkey .ut-dl { font-size: 13px; gap: 4px 12px; }
.ut-passkey .ut-dl dd { font-weight: 400; color: var(--ut-text-2); }

/* Pantallas independientes (aviso de privacidad, errores) */
.ut-prose { max-width: 760px; line-height: 1.65; color: var(--ut-text-2); }
.ut-prose h2 { font-size: 20px; color: var(--ut-text); margin-top: 28px; }

@media (max-width: 575.98px) {
  .ut-page__title { font-size: 26px; line-height: 34px; }
  .ut-panel:not(.ut-panel--flush) { padding: 20px; }   /* sin el :not, en móvil pisaba el padding 0 de los paneles "flush" y duplicaba el margen */
  .ut-panel__head, .ut-passkey { padding-left: 20px; padding-right: 20px; }
  .ut-toast { left: 16px; right: 16px; bottom: calc(var(--ut-tabbar-space, 0px) + 8px); max-width: none; }
}

/* Secciones de formulario */
.ut-form__section { display: flex; flex-direction: column; gap: 16px; }
.ut-form__section + .ut-form__section { padding-top: 24px; border-top: 1px solid var(--ut-border); }
.ut-form__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.ut-label.required::after { content: " *"; color: var(--ut-bad); }
.ut-help.ut-error { color: var(--ut-bad); }

/* Indicadores */
.ut-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.ut-stat { min-width: 120px; padding: 12px 18px; border-radius: var(--ut-radius-lg); background: var(--ut-surface); border: 1px solid var(--ut-border); box-shadow: var(--ut-shadow); }
.ut-stat__num { font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ut-stat__lbl { font-size: 13px; color: var(--ut-muted); }
.ut-stat--bad .ut-stat__num { color: var(--ut-bad); }
.ut-stat--warn .ut-stat__num { color: var(--ut-warn); }
.ut-table tr.is-excede td { background: var(--ut-bad-soft); }

/* Código QR (siempre negro sobre blanco, en cualquier tema) */
.ut-qr { padding: 12px; border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: #fff; cursor: zoom-in; line-height: 0; }
.ut-qr:hover { border-color: var(--ut-primary); }
.ut-qr img { max-width: 100%; height: auto; border-radius: 6px; }

/* Inicio de sesión */
.ut-login { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; padding: 32px clamp(20px, 5vw, 36px); border-radius: var(--ut-radius-xl);
  background: var(--ut-surface); border: 1px solid var(--ut-border); box-shadow: var(--ut-shadow-lg); }
.ut-login__brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ut-login__logo { width: 56px; height: 56px; border-radius: 16px; background: var(--ut-primary); color: var(--ut-on-primary); display: flex; align-items: center; justify-content: center; }
.ut-login__logo .ut-i { width: 30px; height: 30px; }
.ut-login__title { margin: 0; font-size: 26px; line-height: 34px; font-weight: 600; }
.ut-login__sub { margin: 4px 0 0; font-size: 15px; color: var(--ut-muted); }
.ut-pass { position: relative; }
.ut-pass .ut-field { padding-right: 52px; }
.ut-pass__toggle { position: absolute; right: 4px; top: 0; height: var(--ut-hit); width: var(--ut-hit); border: 0; background: transparent; color: var(--ut-muted); border-radius: var(--ut-radius-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.ut-pass__toggle:hover { color: var(--ut-text); background: var(--ut-surface-2); }
.ut-check { display: flex; align-items: center; gap: 10px; min-height: var(--ut-hit); font-size: 15px; cursor: pointer; }
.ut-check input { width: 20px; height: 20px; accent-color: var(--ut-primary); }

/* Tablas: la primera columna (persona) no se comprime hasta romper el nombre en varias líneas. */
.ut-table td:first-child { min-width: 230px; }
.ut-table td:last-child .ut-actions { white-space: nowrap; }

/* Los hijos de columnas flex no deben ensancharse por su contenido (las tablas hacen scroll dentro de su recuadro). */
.ut-main, .ut-content, .ut-page > *, .ut-grid-2 > *, .ut-panel > * { min-width: 0; }
.ut-content .container { max-width: 100%; }

/* Bloque con el mismo margen lateral que .ut-panel__head, para el contenido de paneles "flush". */
.ut-pad { padding: 12px 24px; }
.ut-pad:empty { display: none; }
@media (max-width: 575.98px) { .ut-pad { padding-left: 20px; padding-right: 20px; } }

/* Línea de tiempo de movimientos (Mi jornada > Marcar). Entrada en azul, salida en neutro; nunca solo por color: lleva icono y texto. */
.ut-tl { list-style: none; margin: 0; padding: 4px 24px 20px; position: relative; }
.ut-tl__item { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.ut-tl__item::before { content: ""; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: var(--ut-border); }
.ut-tl__item:first-child::before { top: 50%; }
.ut-tl__item:last-child::before { bottom: 50%; }
.ut-tl__item:only-child::before { display: none; }
.ut-tl__dot { position: relative; z-index: 1; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ut-surface-2); color: var(--ut-text-2); border: 1px solid var(--ut-border); }
.ut-tl__item--entrada .ut-tl__dot { background: var(--ut-info-soft); color: var(--ut-info); border-color: transparent; }
.ut-tl__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ut-tl__tipo { font-size: 16px; font-weight: 600; line-height: 22px; }
.ut-tl__meta { font-size: 13px; color: var(--ut-muted); }
.ut-tl__time { margin-left: auto; font-size: 18px; font-weight: 500; white-space: nowrap; }
.ut-tl__vacio { display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 24px 24px; color: var(--ut-muted); }
.ut-tl__vacio .ut-i { width: 22px; height: 22px; }
@media (max-width: 575px) { .ut-tl { padding-left: 20px; padding-right: 20px; } .ut-tl__time { font-size: 16px; } }

/* Los textos solo-lector (.ut-sr, position:absolute) dentro de una tabla con scroll deben quedar contenidos por su recuadro:
   sin esto escapan del overflow y ensanchan el documento en pantallas estrechas. */
.ut-tablewrap, .ut-panel--flush { position: relative; }

/* Tablas como tarjetas en móvil (uteam-ui.js copia los encabezados a data-label). */
@media (max-width: 575.98px) {
  .ut-tablewrap { border: 0; background: transparent; box-shadow: none; overflow: visible; max-height: none; }
  .ut-table--cards { min-width: 0; display: block; }
  .ut-table--cards thead { display: none; }
  .ut-table--cards tbody { display: flex; flex-direction: column; gap: 12px; }
  .ut-table--cards tbody tr { display: block; padding: 6px 0; background: var(--ut-surface); border: 1px solid var(--ut-border);
    border-radius: var(--ut-radius-lg); box-shadow: var(--ut-shadow); }
  .ut-table--cards tbody tr[hidden] { display: none; }
  .ut-table--cards tbody tr:hover td { background: transparent; }
  .ut-table--cards td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border: 0; text-align: right; min-width: 0; }
  .ut-table--cards td:first-child { min-width: 0; justify-content: flex-start; text-align: left; }
  .ut-table--cards td[data-label]:not(:first-child)::before { content: attr(data-label); flex: none; font-size: 13px; font-weight: 600; color: var(--ut-muted); text-align: left; }
  .ut-table--cards td:last-child .ut-actions { white-space: normal; flex-wrap: wrap; }
  .ut-table--cards td .ut-help { text-align: right; }
}

/* ---- Configuración del kiosco ---- */
.ut-page--wide { max-width: 1280px; }
.kc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.kc-main, .kc-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.kc-side { position: sticky; top: 24px; }
.kc-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.kc-head .ut-help { margin: 4px 0 0; }
.kc-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 24px; }
/* PIN de la app: oculto; se muestra tras confirmar la contraseña */
.kc-pin { display: grid; gap: 8px; margin: 4px 0 16px; padding: 12px 14px; border: 1px solid var(--ut-border); border-radius: 12px; }
.kc-pin__row { display: flex; align-items: center; gap: 10px; }
.kc-pin__row .ut-field { flex: 1; min-width: 0; }
.kc-pin__value { flex: 1; font-size: 20px; font-weight: 600; letter-spacing: .12em; color: var(--ut-text); }
.kc-pin__auth { display: grid; gap: 6px; }
.kc-pin__error { margin: 0; font-size: 13px; color: var(--ut-bad); }
.kc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; align-items: start; }

.kc-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.kc-method { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 16px 44px 16px 16px; cursor: pointer;
  border: 1.5px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.kc-method:hover { border-color: var(--ut-border-strong); }
.kc-method:has(.kc-method__check:checked) { border-color: var(--ut-primary); background: var(--ut-primary-soft); }
.kc-method:has(.kc-method__check:focus-visible) { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.kc-method__check { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; margin: 0; accent-color: var(--ut-primary); cursor: pointer; }
.kc-method__ico { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--ut-surface-2); color: var(--ut-muted); }
.kc-method:has(.kc-method__check:checked) .kc-method__ico { background: var(--ut-primary); color: var(--ut-on-primary); }
.kc-method__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; }
.kc-method__txt .ut-help { margin: 0; }
.kc-method__badge { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--ut-primary); color: var(--ut-on-primary); font-size: 11px; font-weight: 600; }
.kc-method__badge[hidden], .kc-chip[hidden], .kc-screen__ico[hidden], .kc-others[hidden] { display: none; }

.kc-details { border-top: 1px solid var(--ut-border); padding-top: 12px; }
.kc-details summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ut-primary-text); }
.kc-details summary:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 2px; border-radius: 4px; }
.kc-details .ut-help { margin: 10px 0 0; }

.kc-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer; border: 1.5px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); }
.kc-toggle:has(input:checked) { border-color: var(--ut-primary); background: var(--ut-primary-soft); }
.kc-toggle:has(input:focus-visible) { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.kc-toggle input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ut-primary); }
.kc-toggle > span { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.kc-toggle .ut-help { margin: 0; }

.kc-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px;
  border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); box-shadow: var(--ut-shadow-lg); }

.kc-ip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ut-surface-2); border: 1px solid var(--ut-border);
  font: 500 12px var(--ut-font-mono); color: var(--ut-text-2); }
.kc-device .ut-help { margin: 0; }
.kc-device__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kc-device__actions .ut-btn { flex: 1 1 auto; justify-content: center; }

.kc-screen { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; text-align: center; border: 1px solid var(--ut-border);
  border-radius: var(--ut-radius-lg); background-color: var(--ut-bg); background-image: radial-gradient(var(--ut-border) 1px, transparent 1px); background-size: 20px 20px; }
.kc-screen__vf { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ut-primary); border-radius: 18px;
  background: var(--ut-surface); color: var(--ut-primary); }
.kc-screen__vf .ut-i { width: 44px; height: 44px; stroke-width: 1.5; }
.kc-screen__title { margin: 6px 0 0; font-size: 17px; font-weight: 600; line-height: 24px; text-wrap: balance; }
.kc-screen__text { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--ut-text-2); text-wrap: pretty; }
.kc-screen__state { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--ut-primary-text); }
.kc-screen__state .ut-dot { background: var(--ut-primary); }
.kc-others { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kc-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--ut-border); border-radius: 999px;
  background: var(--ut-surface); font-size: 12.5px; font-weight: 500; color: var(--ut-text-2); }
.kc-chip .ut-i { width: 14px; height: 14px; }

@media (max-width: 1099.98px) {
  .kc-layout { grid-template-columns: minmax(0, 1fr); }
  .kc-side { position: static; }
}
@media (max-width: 767px) {
  .kc-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Historial de accesos ---- */
.hf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hf-stat { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ut-surface); border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); }
.hf-stat__ico { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--ut-surface-2); color: var(--ut-text-2); }
.hf-stat__ico--in { background: var(--ut-info-soft); color: var(--ut-info); }
.hf-stat__ico--warn { background: var(--ut-warn-soft); color: var(--ut-warn); }
.hf-stat__n { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.hf-stat__l { display: block; font-size: 12px; color: var(--ut-muted); }

.hf-filters { display: flex; flex-direction: column; gap: 16px; padding: 16px 20px; }
.hf-filters__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.hf-filters__search { flex: 1 1 260px; max-width: 360px; }
.hf-filters__puesto { flex: 1 1 200px; max-width: 280px; }
.hf-filters__dates { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)) auto; justify-content: start; gap: 12px; align-items: end; }
.hf-filters__hint { grid-column: 1 / -1; margin: 0; }
.hf-filters__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-seg { display: inline-flex; gap: 2px; margin: 0 0 0 auto; padding: 3px; border: 1px solid var(--ut-border); border-radius: 11px; background: var(--ut-surface); min-width: 0; }
.hf-seg__opt { position: relative; margin: 0; cursor: pointer; }
.hf-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hf-seg__opt span { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ut-muted); }
.hf-seg__opt span .ut-i { width: 15px; height: 15px; }
.hf-seg__opt input:checked + span { background: var(--ut-primary); color: var(--ut-on-primary); }
.hf-seg__opt input:focus-visible + span { outline: 2px solid var(--ut-primary); outline-offset: 2px; }

.hf-table .hf-day th { padding: 10px 16px; text-align: left; background: var(--ut-surface-2); border-top: 1px solid var(--ut-border); border-bottom: 1px solid var(--ut-border);
  font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ut-text); }
.hf-day__n { margin-left: 10px; font-weight: 400; color: var(--ut-muted); }
.hf-time { display: block; font-weight: 600; white-space: nowrap; }

@media (max-width: 991.98px) {
  .hf-filters__dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-filters__actions { grid-column: 1 / -1; }
  .hf-seg { margin-left: 0; }
}

/* ---- Jornada, integridad y bandeja ---- */
.hf-stat__ico--bad { background: var(--ut-bad-soft); color: var(--ut-bad); }
.hf-stat__ico--ok { background: var(--ut-ok-soft); color: var(--ut-ok); }
.pj-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr) auto; gap: 12px; align-items: end; }
.pj-hours { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pj-bar { display: block; width: 72px; height: 6px; border-radius: 999px; background: var(--ut-surface-2); overflow: hidden; flex: none; }
.pj-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ut-primary); }
.pj-bar--bad > span { background: var(--ut-bad); }
.pj-bar--ok > span { background: var(--ut-ok); }
.pj-hours + .ut-badge { margin-top: 6px; }

.pi-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.pi-stats { display: flex; flex-direction: column; gap: 12px; }
.pi-stats .hf-stat { flex: 1; }
.pi-status { display: flex; align-items: flex-start; gap: 20px; padding: 24px; border-width: 1.5px; }
.pi-status--ok { border-color: var(--ut-ok); background: var(--ut-ok-soft); }
.pi-status--bad { border-color: var(--ut-bad); background: var(--ut-bad-soft); }
.pi-status__ico { flex: none; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--ut-surface); }
.pi-status--ok .pi-status__ico { color: var(--ut-ok); }
.pi-status--bad .pi-status__ico { color: var(--ut-bad); }
.pi-status__ico .ut-i { width: 30px; height: 30px; }
.pi-status__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.pi-status__title { margin: 0; font-size: 22px; font-weight: 700; line-height: 28px; }
.pi-status--ok .pi-status__title { color: var(--ut-ok); }
.pi-status--bad .pi-status__title { color: var(--ut-bad); }
.pi-status__text { margin: 0; font-size: 14.5px; color: var(--ut-text-2); }
.pi-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-width: 420px; }
.pi-progress__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ut-text-2); }
.pi-progress .pj-bar { width: 100%; height: 8px; background: var(--ut-surface); }
.pi-how .ut-help { margin: 0; }

@media (max-width: 991.98px) {
  .pi-layout { grid-template-columns: minmax(0, 1fr); }
  .pi-stats { flex-direction: row; flex-wrap: wrap; }
  .pi-stats .hf-stat { flex: 1 1 180px; }
  .pj-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-filter .hf-filters__actions { grid-column: 1 / -1; }
}

/* ---- Correcciones ---- */
.cr-seg { margin: 0; }
.cr-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ut-text-2); }
.cr-rules li { display: flex; align-items: flex-start; gap: 10px; }
.cr-rules .ut-i { width: 18px; height: 18px; margin-top: 2px; color: var(--ut-primary-text); }

/* ---- Densidad: menos aire en las pantallas rediseñadas ---- */
.ut-page--wide { max-width: 1680px; gap: 14px; }
.ut-page--wide .ut-page__head { gap: 10px 16px; }
.ut-page--wide .ut-page__title { font-size: 26px; line-height: 32px; }
.ut-page--wide .ut-page__sub { margin-top: 2px; font-size: 14px; max-width: 80ch; }
.ut-page--wide .ut-panel:not(.ut-panel--flush) { padding: 16px 20px; gap: 14px; }
.ut-page--wide .ut-panel__head { padding: 12px 20px; }
.ut-page--wide .ut-table th { padding: 9px 14px; }
.ut-page--wide .ut-table td { padding: 8px 14px; }
.ut-page--wide .ut-empty { padding: 28px 20px; }
.ut-page--wide .ut-alert { padding: 10px 14px; }
.ut-page--wide .hf-day th { padding: 8px 14px; }

.hf-stats { gap: 10px; }
.hf-stat { gap: 10px; padding: 10px 14px; }
.hf-stat__ico { width: 32px; height: 32px; border-radius: 9px; }
.hf-stat__n { font-size: 20px; }
.hf-filters { gap: 12px; padding: 12px 16px; }
.hf-filters__dates, .pj-filter { gap: 10px; }

.kc-layout { gap: 14px; }
.kc-main, .kc-side { gap: 14px; }
.kc-grid { gap: 14px 18px; }
.kc-methods { gap: 10px; }
.kc-method { padding: 12px 40px 12px 12px; }
.kc-method__check { top: 12px; right: 12px; }
.kc-toggle { padding: 10px 14px; }
.kc-actions { padding: 10px 16px; }
.kc-screen { padding: 18px 16px; gap: 8px; }
.kc-side { top: 16px; }

.pi-layout { gap: 14px; }
.pi-stats { gap: 10px; }
.pi-status { padding: 18px 20px; gap: 16px; }
.pi-status__ico { width: 48px; height: 48px; }

@media (max-width: 767px) {
  .ut-page--wide .ut-panel:not(.ut-panel--flush) { padding: 14px; }
}

/* ---- Móvil: tablas anchas como tarjetas y resumen en dos columnas ---- */
@media (max-width: 575.98px) {
  .ut-tablewrap--wide .ut-table--cards { min-width: 0; }
  .ut-table--cards tbody tr.hf-day { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .ut-table--cards .hf-day th { display: block; padding: 4px 2px; background: transparent; border: 0; }
  .hf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-stat { padding: 8px 10px; }
  .hf-actions .ut-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- Listas con formulario lateral (centros de trabajo, unidades) ---- */
.wc-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.wc-layout > form { position: sticky; top: 16px; }
dialog.us-dialog { max-width: 600px; padding: 0; overflow: hidden; }
dialog.us-dialog[open] { display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: auto; }
.us-dialog .us-form__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.us-dialog .us-full { grid-column: 1 / -1; margin: 0; }
.us-form--reset { border-top: 1px solid var(--ut-border); }
.us-form__head .ut-btn--icon { margin-left: auto; }
.us-form__foot { justify-content: flex-end; }
.us-form__foot .ut-btn { flex: 0 0 auto; padding: 0 18px; }
.us-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.us-toolbar .ut-field { flex: 1 1 280px; min-width: 0; }
.us-toolbar .us-seg { flex: 0 0 auto; width: auto; margin: 0; }
.us-actions form { display: inline; }
.us-actions { white-space: nowrap; text-align: right; }
.us-form { overflow: hidden; }
.us-form__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--ut-border); }
.us-form__ico { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.us-form__ico .ut-i { width: 18px; height: 18px; }
.us-form__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.us-form__body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.us-form__foot { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--ut-border); background: var(--ut-surface-2); }
.us-form__foot .ut-btn { justify-content: center; min-height: 44px; }
a.ut-chip, a.us-seg__opt, a.us-tag { text-decoration: none; }
@media (min-width: 768px) { .us-sheet .m-sheet-foot { display: none; } }
.us-seg { display: flex; width: 100%; padding: 3px; gap: 2px; margin-bottom: 10px; background: var(--ut-surface-2); border-radius: 10px; }
.us-seg__opt { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--ut-text-2); font-weight: 500; text-decoration: none; }
.us-seg__opt:hover { color: var(--ut-text); }
.us-seg__opt[aria-current="true"] { background: var(--ut-surface); color: var(--ut-text); box-shadow: var(--ut-shadow); }
.us-count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--ut-border); color: var(--ut-text-2); }
.us-seg__opt[aria-current="true"] .us-count, .ut-chip[aria-current="true"] .us-count { background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.ut-chip .us-count { padding: 0; background: transparent; color: var(--ut-muted); }
.us-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.us-roles__label { margin-right: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ut-muted); }
.us-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; }
.us-summary__n { font-weight: 500; }
.us-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--ut-primary-soft); color: var(--ut-primary-text); font-size: 13px; font-weight: 500; text-decoration: none; }
.us-tag .ut-i { width: 14px; height: 14px; }
.us-clear { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 500; }
.us-tablewrap { max-height: calc(100vh - 340px); min-height: 280px; overflow: auto; }
.us-tablewrap thead th { position: sticky; top: 0; z-index: 1; background: var(--ut-surface); }
.wc-layout .ut-form__row { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1099.98px) {
  .wc-layout { grid-template-columns: minmax(0, 1fr); }
  .wc-layout > form { position: static; }
}

/* ---- Formularios de empleado: secciones en tarjetas de dos columnas ---- */
.ef-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.ef-form > .ut-alert, .ef-form > .ut-form__actions { grid-column: 1 / -1; order: 9; }
.ef-form > .ut-alert { order: 0; }
.ef-form > .ut-form__section { background: var(--ut-surface); border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg);
  box-shadow: var(--ut-shadow); padding: 16px 20px; gap: 14px; justify-content: flex-start; }
.ef-form > .ut-form__section + .ut-form__section { padding-top: 16px; border-top: 1px solid var(--ut-border); }
.ef-form > [aria-labelledby="sec-id"] { order: 1; }
.ef-form > [aria-labelledby="sec-personales"] { order: 2; }
.ef-form > [aria-labelledby="sec-laborales"] { order: 3; }
.ef-form > [aria-labelledby="sec-contacto"] { order: 4; }
.ef-form > [aria-labelledby="sec-modalidad"] { order: 5; }
.ef-form > [aria-labelledby="sec-foto"] { order: 6; }
.ef-form > [aria-labelledby="sec-jornada"] { order: 7; grid-column: 1 / -1; }
@media (max-width: 991.98px) {
  .ef-form { grid-template-columns: minmax(0, 1fr); }
  .ef-form > [aria-labelledby="sec-jornada"] { grid-column: auto; }
}

/* ---- Detalle de solicitud: dos columnas (contenido + datos/bitácora), una en móvil ---- */
.sd-page { max-width: 1200px; gap: 20px; }
.sd-back { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -12px; }
.sd-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.sd-eyebrow { margin: 0 0 4px; font-size: var(--ut-fs-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ut-primary-text); }
.sd-estado { font-size: 14px; padding: 6px 14px; gap: 6px; }
.sd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.sd-main, .sd-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.sd-card { display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: var(--ut-radius-lg); }
.sd-card__title { margin: 0; font-size: var(--ut-fs-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ut-muted); }

.sd-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 16px; }
.sd-compare:has(> .sd-slot:only-child) { grid-template-columns: minmax(0, 1fr); }
.sd-slot { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--ut-radius-md);
  background: var(--ut-surface-2); border: 1px solid var(--ut-border); }
.sd-slot--new { background: var(--ut-primary-soft); border-color: transparent; }
.sd-slot__label { font-size: 13px; font-weight: 600; color: var(--ut-muted); }
.sd-slot--new .sd-slot__label { color: var(--ut-primary-text); }
.sd-slot__time { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; color: var(--ut-text); }
.sd-slot__time .ut-i { width: 40px; height: 40px; }
.sd-slot--off .sd-slot__time { color: var(--ut-muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.sd-slot__date { font-size: 15px; color: var(--ut-text-2); text-transform: capitalize; }
.sd-slot__meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--ut-muted); }
.sd-arrow { display: grid; place-items: center; color: var(--ut-muted); }
.sd-arrow .ut-i { width: 28px; height: 28px; transform: rotate(180deg); }

.sd-quote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--ut-primary); }
.sd-quote figcaption { font-size: 13px; font-weight: 600; color: var(--ut-muted); margin-bottom: 6px; }
.sd-quote blockquote { margin: 0; font-size: 17px; line-height: 27px; color: var(--ut-text); overflow-wrap: anywhere; }

.sd-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 16px; border-radius: var(--ut-radius-md);
  background: var(--ut-ok-soft); color: var(--ut-text-2); font-size: 14px; }
.sd-result > .ut-i { color: var(--ut-ok); }

.sd-btn-reject { border: 1px solid var(--ut-bad); color: var(--ut-bad); background: transparent; }
.sd-btn-reject:hover { background: var(--ut-bad-soft); color: var(--ut-bad); }
.sd-full { width: 100%; justify-content: center; }

.sd-facts { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.sd-facts dt { font-size: 13px; font-weight: 500; color: var(--ut-muted); margin-bottom: 2px; }
.sd-facts dd { margin: 0; font-size: 15px; color: var(--ut-text); overflow-wrap: anywhere; }

.sd-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sd-log__item { position: relative; display: flex; gap: 14px; padding-bottom: 20px; }
.sd-log__item:last-child { padding-bottom: 0; }
.sd-log__item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--ut-border); }
.sd-log__dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ut-surface-2); color: var(--ut-text-2); border: 1px solid var(--ut-border); }
.sd-log__dot .ut-i { width: 16px; height: 16px; }
.sd-log__item--pendiente .sd-log__dot { background: var(--ut-warn-soft); color: var(--ut-warn); border-color: transparent; }
.sd-log__item--aprobada .sd-log__dot { background: var(--ut-ok-soft); color: var(--ut-ok); border-color: transparent; }
.sd-log__item--rechazada .sd-log__dot { background: var(--ut-bad-soft); color: var(--ut-bad); border-color: transparent; }
.sd-log__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.sd-log__title { font-size: 15px; font-weight: 600; }
.sd-log__meta { font-size: 13px; color: var(--ut-muted); }
.sd-log__note { margin-top: 6px; padding: 8px 12px; border-radius: var(--ut-radius-sm); background: var(--ut-surface-2); font-size: 14px; color: var(--ut-text-2); overflow-wrap: anywhere; }

@media (max-width: 991.98px) {
  .sd-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .sd-card { padding: 20px; }
  .sd-compare { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sd-arrow .ut-i { transform: rotate(-90deg); }
  .sd-slot__time { font-size: 32px; line-height: 40px; }
}

/* ---- Bandeja de solicitudes: lista de tarjetas (persona · cambio · motivo · estado) ---- */
.sb-list { list-style: none; margin: 0; padding: 0; }
.sb-item { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 1.2fr) minmax(0, 1.4fr) auto;
  align-items: center; gap: 16px 28px; padding: 20px 24px; border-top: 1px solid var(--ut-border); position: relative; }
.sb-item:first-child { border-top: 0; }
.sb-item:hover { background: var(--ut-surface-2); }
.sb-item--pendiente::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ut-warn); }
.sb-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sb-person__txt { min-width: 0; }
.sb-change { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ut-muted); }
.sb-type .ut-i { width: 16px; height: 16px; }
.sb-times { display: flex; align-items: center; gap: 10px; }
.sb-time { font-size: 22px; line-height: 28px; font-weight: 600; }
.sb-time--old { color: var(--ut-muted); }
.sb-times:has(.sb-time--new) .sb-time--old { text-decoration: line-through; }
.sb-time:only-child.sb-time--old { text-decoration: line-through; text-decoration-thickness: 2px; }
.sb-time--new { color: var(--ut-text); }
.sb-to { display: grid; place-items: center; color: var(--ut-muted); }
.sb-to .ut-i { width: 18px; height: 18px; transform: rotate(180deg); }
.sb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ut-muted); }
.sb-day { text-transform: capitalize; }
.sb-motivo { margin: 0; font-size: 15px; line-height: 22px; color: var(--ut-text-2); font-style: italic;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sb-end { display: flex; align-items: center; gap: 16px; justify-self: end; }
.sb-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sb-state .ut-badge { gap: 4px; }
.sb-state .ut-badge .ut-i { width: 14px; height: 14px; }
.sb-end .ut-btn { min-width: 112px; justify-content: center; }

@media (max-width: 1199.98px) {
  .sb-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sb-motivo { grid-column: 1 / -1; order: 3; }
  .sb-end { grid-column: 1 / -1; order: 4; justify-self: stretch; justify-content: space-between; }
  .sb-state { flex-direction: row; align-items: center; gap: 8px; }
}
@media (max-width: 575.98px) {
  .sb-item { grid-template-columns: minmax(0, 1fr); padding: 16px 20px; }
}
.sd-resolve { display: flex; flex-direction: column; gap: 16px; }
.sd-resolve__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.sd-resolve__bar .ut-help { margin: 0; flex: 1 1 280px; }
.sd-resolve__buttons { display: flex; gap: 12px; }
.sd-resolve__buttons .ut-btn { min-width: 132px; justify-content: center; }
@media (max-width: 575.98px) { .sd-resolve__buttons { width: 100%; } .sd-resolve__buttons .ut-btn { flex: 1; min-width: 0; } }

/* ---- Mi jornada: filtros por estado/tipo y hora destacada (mismo trato que la bandeja de solicitudes) ---- */
.mj-filters { display: flex; flex-direction: column; gap: 12px; }
.mj-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mj-chips .hf-seg { margin: 0; max-width: 100%; overflow-x: auto; }
.mj-n { font-family: var(--ut-font-mono); font-size: 12px; font-weight: 500; opacity: .8; }
.mj-note { display: flex; align-items: center; gap: 6px; margin: 0; }
.mj-note .ut-i { width: 16px; height: 16px; flex: none; }
.mj-when { display: flex; flex-direction: column; gap: 2px; }
.mj-time { font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ut-text); white-space: nowrap; }
.mj-sec { font-size: 14px; font-weight: 500; color: var(--ut-muted); }
.mj-day { font-size: 13px; color: var(--ut-muted); text-transform: capitalize; white-space: nowrap; }
.mj-table tr.is-anulado .mj-time { color: var(--ut-muted); }
.mj-table .ut-badge .ut-i { width: 14px; height: 14px; }

@media (max-width: 767.98px) {
  .mj-chips .hf-seg { flex-wrap: nowrap; }
  .mj-chips .hf-seg__opt span { white-space: nowrap; }
}

/* Calendario laboral (festivos) */
.hc-years { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; color: var(--ut-text); }
.hc-legend li { display: inline-flex; align-items: center; gap: 8px; }
.hc-key { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--ut-border-strong); display: inline-block; }
.hc-key--official { background: var(--ut-primary); border-color: var(--ut-primary); }
.hc-key--custom { background: var(--ut-ok); border-color: var(--ut-ok); }
.hc-key--off { background: transparent; border-style: dashed; }
.hc-key--today { background: transparent; border: 2px solid var(--ut-ink); border-radius: 50%; }
.hc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.hc-month { background: var(--ut-surface); border: 1px solid var(--ut-border); border-radius: 14px; padding: 12px; }
.hc-month__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ut-ink); }
.hc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.hc-head { text-align: center; font-size: 12px; font-weight: 600; color: var(--ut-muted); padding-bottom: 4px; }
.hc-day { display: grid; place-items: center; aspect-ratio: 1; min-height: 30px; border-radius: 8px; font-size: 13px; color: var(--ut-text); text-decoration: none; border: 2px solid transparent; font-variant-numeric: tabular-nums; }
.hc-day:hover { background: var(--ut-primary-soft); }
.hc-day:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 1px; }
.hc-day--weekend { color: var(--ut-muted); }
.hc-day--today { border-color: var(--ut-ink); border-radius: 50%; font-weight: 700; }
.hc-day--official { background: var(--ut-primary); color: #fff; font-weight: 700; }
.hc-day--custom { background: var(--ut-ok); color: #fff; font-weight: 700; }
.hc-day--official:hover, .hc-day--custom:hover { filter: brightness(1.1); background: inherit; }
.hc-day--off { border: 2px dashed var(--ut-border-strong); text-decoration: line-through; }
.hc-day.is-selected { outline: 3px solid var(--ut-ink); outline-offset: 1px; }
.hc-side { display: grid; gap: 14px; position: sticky; top: 12px; }
.hc-name { margin: 0 0 8px; }
.hc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.hc-form { margin-top: 14px; border-top: 1px solid var(--ut-border); padding-top: 14px; }
.hc-form__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hc-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 8px; color: var(--ut-text); text-decoration: none; font-size: 14px; }
.hc-item:hover { background: var(--ut-primary-soft); }
.hc-item.is-off { color: var(--ut-muted); text-decoration: line-through; }
@media (max-width: 991.98px) {
    .hc-layout { grid-template-columns: minmax(0, 1fr); }
    .hc-side { position: static; }
}

/* Inicio y perfil: cabecera destacada, tarjetas con icono, anillo de horas y línea de tiempo */
.hm-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(14px, 2vw, 20px) clamp(16px, 2.4vw, 24px);
    margin-bottom: 14px; border-radius: var(--ut-radius-xl); color: var(--ut-on-primary);
    background: radial-gradient(120% 140% at 100% 0%, var(--ut-primary-active) 0%, var(--ut-ink) 62%); box-shadow: var(--ut-shadow); }
.hm-hero__main { display: grid; gap: 4px; min-width: 0; }
.hm-hero__date { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.hm-hero__title { margin: 0; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.1; font-weight: 700; color: inherit; }
.hm-hero__sub { display: flex; align-items: center; gap: 8px; margin: 0; opacity: .8; font-size: 15px; }
.hm-hero__sub .ut-i { width: 18px; height: 18px; flex: none; }
.hm-state { display: inline-flex; align-items: center; gap: 10px; width: fit-content; margin: 6px 0 0; padding: 8px 16px; border-radius: var(--ut-radius-full);
    background: rgba(255,255,255,.14); font-weight: 600; }
.hm-state__dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .7; }
.hm-state--in .hm-state__dot { background: var(--ut-ok); opacity: 1; box-shadow: 0 0 0 4px rgba(74,203,138,.28); }
.hm-hero__act { flex: 0 1 360px; min-width: min(100%, 280px); }
.hm-cta { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px 10px 10px; border: 0; border-radius: var(--ut-radius-lg); text-align: left; cursor: pointer; font: inherit;
    background: var(--ut-surface); color: var(--ut-ink); box-shadow: var(--ut-shadow-lg); text-decoration: none; }
.hm-cta[hidden] { display: none !important; }
.hm-cta[disabled] { opacity: .7; cursor: progress; }
.hm-cta + .hm-cta { margin-top: 10px; }
.hm-cta:hover { filter: brightness(.97); color: var(--ut-ink); }
.hm-cta:focus-visible { outline: 3px solid var(--ut-on-primary); outline-offset: 3px; }
.hm-cta__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ut-primary); color: var(--ut-on-primary); flex: none; }
.hm-cta__ico .ut-i { width: 28px; height: 28px; }
.hm-cta__txt { display: grid; gap: 2px; min-width: 0; }
.hm-cta__txt strong { font-size: 17px; }
.hm-cta__txt small { font-size: 13px; color: var(--ut-muted); }
.hm-hero__note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; border-radius: var(--ut-radius-lg); background: rgba(255,255,255,.12); line-height: 1.4; }
.hm-hero__note .ut-i { flex: none; margin-top: 2px; }
.hm-feedback { margin-top: 10px; }
.hm-feedback:empty { display: none; }
.hm-feedback .ut-alert { margin: 0; }

.hm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hm-stat { position: relative; display: grid; gap: 2px; padding: 10px 14px 10px 58px; min-height: 62px; align-content: center; border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg);
    background: var(--ut-surface); color: var(--ut-text); text-decoration: none; }
.hm-stat__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.hm-stat--ok .hm-stat__ico { background: var(--ut-ok-soft); color: var(--ut-ok); }
.hm-stat--warn { border-color: var(--ut-warn); }
.hm-stat--warn .hm-stat__ico { background: var(--ut-warn-soft); color: var(--ut-warn); }
.hm-stat__n { font-size: 22px; line-height: 1.1; font-weight: 700; color: var(--ut-ink); }
[data-bs-theme="dark"] .hm-stat__n { color: var(--ut-text); }
.hm-stat__l { font-size: 13px; color: var(--ut-muted); }
.hm-stat--link:hover { border-color: var(--ut-primary); background: var(--ut-primary-soft); color: var(--ut-text); }
.hm-stat--link:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 2px; }

.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.hm-side { display: grid; gap: 14px; min-width: 0; align-content: start; }
@media (min-width: 768px) {
    .hm-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .hm-grid--side > .hm-card--feed { grid-column: 1 / -1; order: 3; }
}
@media (min-width: 1360px) {
    .hm-grid { grid-template-columns: var(--hm-cols, 440px minmax(0, 1fr) 300px); }
    .hm-grid--side > .hm-card--feed { grid-column: auto; order: 0; }
}
.hm-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.hm-card__head .hm-h2 { margin: 0; }
.hm-h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; font-weight: 700; color: var(--ut-ink); }
[data-bs-theme="dark"] .hm-h2 { color: var(--ut-text); }
.hm-h2__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ut-primary-soft); color: var(--ut-primary-text); flex: none; }
.hm-h2__ico .ut-i { width: 18px; height: 18px; }
.hm-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; min-height: 44px; font-weight: 600; color: var(--ut-primary-text); text-decoration: none; }
.hm-more:hover { text-decoration: underline; }
.hm-more .ut-i { width: 16px; height: 16px; transform: rotate(-90deg); }
.hm-more--inline { margin: 0; min-height: 0; }
.hm-more--inline .ut-i { display: none; }

.hm-week { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hm-ring { --p: 0; position: relative; display: grid; place-content: center; text-align: center; width: 92px; height: 92px; border-radius: 50%; flex: none;
    background: conic-gradient(var(--ut-primary) calc(var(--p) * 1%), var(--ut-border) 0); }
.hm-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--ut-surface); }
.hm-ring > * { position: relative; }
.hm-ring__n { font-size: 22px; line-height: 1; font-weight: 700; color: var(--ut-ink); }
[data-bs-theme="dark"] .hm-ring__n { color: var(--ut-text); }
.hm-ring__u { font-size: 11px; color: var(--ut-muted); }
.hm-week__info { display: grid; gap: 10px; justify-items: start; }
.hm-week__of { margin: 0; line-height: 1.4; }

.hm-empty { display: grid; justify-items: center; gap: 6px; padding: 24px 8px; text-align: center; color: var(--ut-muted); }
.hm-empty[hidden] { display: none !important; }
.hm-empty .ut-i { width: 32px; height: 32px; }
.hm-empty p { margin: 0; }
.hm-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; position: relative; }
.hm-timeline[hidden] { display: none !important; }
.hm-timeline li { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding-left: 22px; }
.hm-timeline li::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--ut-border-strong); }
.hm-timeline li:first-child::before { top: 50%; }
.hm-timeline li:last-child::before { bottom: 50%; }
.hm-timeline li:only-child::before { display: none; }
.hm-timeline__dot { position: absolute; left: 0; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--ut-surface); background: var(--ut-muted); box-shadow: 0 0 0 1px var(--ut-border-strong); }
.hm-timeline .is-in .hm-timeline__dot { background: var(--ut-info); }
.hm-timeline__day { min-width: 44px; font-size: 14px; color: var(--ut-muted); }
.hm-timeline__time { font-size: 17px; font-weight: 600; min-width: 64px; }

.hm-feed { list-style: none; margin: 0; padding: 0; }
.hm-feed li { display: grid; grid-template-columns: 52px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--ut-border); break-inside: avoid; }
.hm-feed li:last-child { border-bottom: 0; }
.hm-feed__av, .pf-person__av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ut-primary-soft); color: var(--ut-primary-text); font-size: 13px; font-weight: 700; flex: none; }
.hm-feed__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-feed__time { font-weight: 600; }

/* Mi perfil */
.pf-head { margin-bottom: 14px; border: 1px solid var(--ut-border); border-radius: var(--ut-radius-xl); background: var(--ut-surface); overflow: hidden; box-shadow: var(--ut-shadow); }
.pf-cover { height: 112px; background: radial-gradient(120% 220% at 100% 0%, var(--ut-primary-active) 0%, var(--ut-ink) 66%); }
.pf-head__body { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; padding: 0 clamp(16px, 3vw, 28px) 20px; }
.pf-avatar { position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin-top: -56px; border-radius: 50%; overflow: hidden; flex: none;
    border: 4px solid var(--ut-surface); background: var(--ut-primary-soft); color: var(--ut-primary-text); font-size: 38px; font-weight: 700; box-shadow: var(--ut-shadow); }
.pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-head__id { flex: 1 1 260px; min-width: 0; padding-top: 12px; }
.pf-name { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; color: var(--ut-ink); }
[data-bs-theme="dark"] .pf-name { color: var(--ut-text); }
.pf-role { margin: 2px 0 8px; color: var(--ut-muted); }
.pf-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-head__act { align-self: center; }
.pf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pf-fact { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); }
.pf-fact__l { font-size: 13px; color: var(--ut-muted); }
.pf-fact__v { font-size: 18px; font-weight: 700; color: var(--ut-ink); overflow-wrap: anywhere; }
[data-bs-theme="dark"] .pf-fact__v { color: var(--ut-text); }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pf-solo { max-width: 640px; }
.pf-dl { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.pf-dl dt { color: var(--ut-muted); font-weight: 500; }
.pf-dl dd { margin: 0; overflow-wrap: anywhere; }
.pf-sub { margin: 16px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ut-muted); }
.pf-holidays { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-holidays li { display: flex; align-items: center; gap: 12px; }
.pf-holidays__date { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--ut-primary-soft); color: var(--ut-primary-text); line-height: 1; text-transform: uppercase; font-size: 11px; font-weight: 600; flex: none; }
.pf-holidays__date b { font-size: 18px; }
.pf-person, .pf-people li { display: flex; align-items: center; gap: 12px; margin: 0; }
.pf-person > span:last-child, .pf-people li > span:last-child { display: grid; gap: 1px; min-width: 0; }
.pf-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pf-methods { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-methods li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--ut-border); }
.pf-methods li:first-child { border-top: 0; padding-top: 0; }
.pf-methods li > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.pf-methods__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--ut-radius-md); background: var(--ut-primary-soft); color: var(--ut-primary-text); }

@media (max-width: 991.98px) {
    .hm-hero__act { flex-basis: 100%; }
}
@media (max-width: 575.98px) {
    .hm-grid, .pf-grid { grid-template-columns: minmax(0, 1fr); }
    .hm-feed li { grid-template-columns: 52px 32px minmax(0, 1fr) auto; gap: 8px; }
    .pf-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .pf-dl dd { margin-bottom: 10px; }
    .pf-head__act { width: 100%; }
}

a.ut-brand__id { text-decoration: none; color: inherit; }
@media (max-width: 767.98px) {
    .hm-grid, .pf-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .pf-facts, .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-stat { padding: 12px 12px 12px 12px; padding-top: 56px; }
    .hm-stat__ico { left: 12px; top: 12px; transform: none; width: 34px; height: 34px; }
    .pf-fact { padding: 12px; }
    .pf-fact__v { font-size: 16px; }
}

/* ---- Justificación de días sin registro (aj-): ventana del checador / teléfono / Mi jornada, detalle y catálogo ---- */
.aj-open, .aj-open body { overflow: hidden; }
.aj-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: var(--ut-scrim); }
.aj-panel { width: min(720px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--ut-surface);
  color: var(--ut-text); border: 1px solid var(--ut-border); border-radius: var(--ut-radius-xl); box-shadow: var(--ut-shadow-lg); overflow: hidden; }
.aj-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px 14px; border-bottom: 1px solid var(--ut-border); }
.aj-head__ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ut-warn-soft); color: var(--ut-warn); }
.aj-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.aj-sub { margin: 2px 0 0; color: var(--ut-muted); }
.aj-body { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.aj-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--ut-border); background: var(--ut-surface-2); }
.aj-foot .ut-btn { min-height: var(--ut-hit); min-width: 120px; justify-content: center; }

.aj-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ut-muted); }
.aj-legend li { display: inline-flex; align-items: center; gap: 6px; }
.aj-key { width: 14px; height: 14px; border-radius: 4px; border: 2px solid transparent; }
.aj-key--none { background: var(--ut-bad-soft); border-color: var(--ut-bad); }
.aj-key--half { background: var(--ut-warn-soft); border-color: var(--ut-warn); }
.aj-key--review { background: var(--ut-surface-2); border-color: var(--ut-border-strong); border-style: dashed; }

.aj-cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.aj-month__title { margin: 0 0 6px; font-size: 14px; font-weight: 600; text-transform: capitalize; }
.aj-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.aj-grid__head { text-align: center; font-size: 12px; font-weight: 600; color: var(--ut-muted); }
.aj-cell { position: relative; display: grid; place-items: center; min-height: var(--ut-hit); border-radius: 10px; font-size: 14px; color: var(--ut-muted); }
.aj-cell--blank { visibility: hidden; }
.aj-cell--day { border: 2px solid transparent; font: inherit; font-weight: 600; cursor: pointer; color: var(--ut-text); }
.aj-cell--none { background: var(--ut-bad-soft); border-color: var(--ut-bad); }
.aj-cell--half { background: var(--ut-warn-soft); border-color: var(--ut-warn); }
.aj-cell--review { background: var(--ut-surface-2); border-color: var(--ut-border-strong); border-style: dashed; color: var(--ut-muted); cursor: not-allowed; }
.aj-cell--day:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.aj-cell--day.is-selected { background: var(--ut-primary); border-color: var(--ut-primary); color: var(--ut-on-primary); }
.aj-cell__mark { position: absolute; top: 2px; right: 3px; display: none; }
.aj-cell--day.is-selected .aj-cell__mark, .aj-cell--review .aj-cell__mark { display: block; }
.aj-all { align-self: flex-start; }

.aj-picked__empty { margin: 0; color: var(--ut-muted); font-size: 14px; }
.aj-picked__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aj-picked__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 12px;
  border: 1px solid var(--ut-border); border-radius: 10px; }
.aj-picked__info { display: flex; align-items: baseline; gap: 10px; }
.aj-picked__kind { font-size: 13px; color: var(--ut-muted); }
.aj-picked__time { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ut-muted); }
.aj-picked__time .ut-field { width: auto; min-height: 40px; }

.aj-reasons { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aj-reasons legend { width: 100%; margin-bottom: 6px; }
.aj-chip { position: relative; cursor: pointer; }
.aj-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.aj-chip span { display: inline-flex; align-items: center; min-height: var(--ut-hit); padding: 0 16px; border: 1px solid var(--ut-border-strong);
  border-radius: var(--ut-radius-full); font-weight: 600; color: var(--ut-text); }
.aj-chip input:checked + span { background: var(--ut-primary); border-color: var(--ut-primary); color: var(--ut-on-primary); }
.aj-chip input:focus-visible + span { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.aj-reasons:disabled .aj-chip { cursor: default; opacity: .7; }
.aj-status { margin: 0; min-height: 22px; font-weight: 600; }
.aj-status[data-tono="bad"] { color: var(--ut-bad); }
.aj-status[data-tono="ok"] { color: var(--ut-ok); }

/* Detalle, bandeja y catálogo */
.aj-reason { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.aj-reason-tag { font-weight: 600; }
.aj-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.aj-days__item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--ut-border); border-radius: 10px; }
.aj-days__date { font-family: var(--ut-font-mono); font-weight: 600; }
.aj-actions { display: flex; gap: 6px; justify-content: flex-end; }
.aj-actions form { margin: 0; }
.mj-justify { align-self: flex-start; }

@media (max-width: 767.98px) {
  .aj-overlay { padding: 0; place-items: stretch; }
  .aj-panel { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .aj-head, .aj-body, .aj-foot { padding-left: 16px; padding-right: 16px; }
  .aj-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .aj-foot .ut-btn { flex: 1; }
  .aj-picked__time .ut-field { font-size: 16px; min-height: 48px; }
  .aj-note { font-size: 16px; }
}

/* Columnas de la ventana: apiladas en el modal; lado a lado a pantalla completa (checador) */
.aj-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- Checador: la ventana de justificación ocupa toda la pantalla, con letra y áreas táctiles grandes ---- */
.aj-overlay--full { padding: 0; place-items: stretch; }
.aj-overlay--full .aj-panel { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
.aj-overlay--full .aj-head, .aj-overlay--full .aj-body, .aj-overlay--full .aj-foot {
  padding-left: max(24px, calc((100% - 1280px) / 2)); padding-right: max(24px, calc((100% - 1280px) / 2)); }
.aj-overlay--full .aj-head { gap: 18px; padding-top: 28px; padding-bottom: 20px; }
.aj-overlay--full .aj-head__ico { width: 56px; height: 56px; border-radius: 16px; }
.aj-overlay--full .aj-head__ico svg { width: 30px; height: 30px; }
.aj-overlay--full .aj-title { font-size: 30px; line-height: 38px; }
.aj-overlay--full .aj-sub { font-size: 18px; line-height: 26px; }
.aj-overlay--full .aj-body { gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.aj-overlay--full .aj-col { gap: 20px; }
.aj-overlay--full .aj-legend { gap: 8px 24px; font-size: 16px; }
.aj-overlay--full .aj-key { width: 18px; height: 18px; }
.aj-overlay--full .aj-month__title { font-size: 18px; }
.aj-overlay--full .aj-grid { gap: 6px; }
.aj-overlay--full .aj-grid__head { font-size: 14px; }
.aj-overlay--full .aj-cell { min-height: 56px; font-size: 20px; border-radius: 12px; }
.aj-overlay--full .aj-all { min-height: 48px; font-size: 16px; }
.aj-overlay--full .aj-picked__empty { font-size: 17px; }
.aj-overlay--full .aj-picked__item { padding: 12px 16px; }
.aj-overlay--full .aj-picked__info { font-size: 18px; }
.aj-overlay--full .aj-picked__kind, .aj-overlay--full .aj-picked__time { font-size: 16px; }
.aj-overlay--full .aj-picked__time .ut-field { min-height: 52px; font-size: 18px; }
.aj-overlay--full .ut-label { font-size: 18px; }
.aj-overlay--full .aj-chip span { min-height: 60px; padding: 0 24px; font-size: 18px; }
.aj-overlay--full .aj-note { font-size: 18px; }
.aj-overlay--full .aj-status { font-size: 18px; }
.aj-overlay--full .aj-foot { padding-top: 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.aj-overlay--full .aj-foot .ut-btn { min-height: 64px; min-width: 220px; font-size: 20px; }

@media (min-width: 992px) {
  .aj-overlay--full .aj-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); align-items: start; gap: 40px; }
}
@media (max-width: 767.98px) {
  .aj-overlay--full .aj-foot .ut-btn { min-width: 0; }
  .aj-overlay--full .aj-title { font-size: 24px; line-height: 32px; }
}

/* Contador de inactividad de la ventana en el checador (va a la izquierda del pie) */
.aj-timer { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; color: var(--ut-muted); }
.aj-timer__ico { display: grid; place-items: center; flex: none; }
.aj-timer__body { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
.aj-timer__line { display: flex; align-items: baseline; gap: 6px; font-size: 15px; white-space: nowrap; }
.aj-timer__txt { font-weight: 700; color: var(--ut-text); }
.aj-timer.is-low .aj-timer__txt { color: var(--ut-warn); }
.aj-timer__bar { display: block; height: 6px; border-radius: var(--ut-radius-full); background: var(--ut-border); overflow: hidden; }
.aj-timer__bar > span { display: block; height: 100%; width: 100%; background: var(--ut-primary); transition: width 1s linear; }
.aj-timer.is-low { color: var(--ut-warn); }
.aj-timer.is-low .aj-timer__bar > span { background: var(--ut-warn); }
.aj-overlay--full .aj-timer__line { font-size: 18px; }
.aj-overlay--full .aj-timer__body { min-width: 260px; }
.aj-overlay--full .aj-timer__bar { height: 8px; }

@media (max-width: 767.98px) {
  .aj-foot:has(.aj-timer) { flex-wrap: wrap; }
  .aj-foot .aj-timer { flex: 1 0 100%; margin-right: 0; }
  .aj-timer__body { flex: 1; }
}

/* ---- Notificaciones: campana, bandeja, preferencias y administración ---- */
.nt-bell { position: relative; }
.nt-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--ut-radius-full);
  background: var(--ut-bad); color: #fff; font: 600 11px/18px var(--ut-font); text-align: center; pointer-events: none; }

/* Piezas compartidas */
.nt-tile { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.nt-tile--lg { width: 56px; height: 56px; border-radius: 50%; }
.nt-tile--lg .ut-i { width: 26px; height: 26px; }
.nt-tile--high, .nt-tile--warn { background: var(--ut-warn-soft); color: var(--ut-warn); }
.nt-tile--normal, .nt-tile--info { background: var(--ut-info-soft); color: var(--ut-info); }
.nt-tile--low { background: var(--ut-surface-2); color: var(--ut-text-2); }
.nt-tile--ok { background: var(--ut-ok-soft); color: var(--ut-ok); }
.nt-tile--bad { background: var(--ut-bad-soft); color: var(--ut-bad); }
.nt-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 8px; border-radius: var(--ut-radius-full);
  background: var(--ut-primary); color: var(--ut-on-primary); font: 600 12px/22px var(--ut-font-mono); }
.nt-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--ut-radius-full); background: var(--ut-surface-2); color: var(--ut-text-2); font-size: 12px; font-weight: 500; }
.nt-tag .ut-i { width: 12px; height: 12px; }
.nt-tag--warn { background: var(--ut-warn-soft); color: var(--ut-warn); }
.nt-tag--ok { background: var(--ut-ok-soft); color: var(--ut-ok); }
.nt-tag--bad { background: var(--ut-bad-soft); color: var(--ut-bad); }
.nt-iconbtn { flex: none; width: var(--ut-hit); height: var(--ut-hit); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px;
  background: transparent; color: var(--ut-muted); cursor: pointer; text-decoration: none; }
.nt-iconbtn:hover { background: var(--ut-surface-2); color: var(--ut-text); }
.nt-link { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ut-hit); padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ut-primary-text); font: 500 14px/1 var(--ut-font); text-decoration: none; cursor: pointer; }
.nt-link:hover { background: var(--ut-primary-soft); }
.nt-link:disabled { color: var(--ut-muted); background: transparent; cursor: default; }
.nt-iconbtn:focus-visible, .nt-link:focus-visible, .nt-item:focus-visible, .nt-tab:focus-visible, .nt-seg a:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: -2px; }
.nt-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 40px 24px 44px; text-align: center; font-size: 14px; color: var(--ut-muted); }
.nt-empty strong { font-size: 15px; color: var(--ut-text); }
.nt-empty .nt-tile { margin-bottom: 8px; }
.nt-day { position: sticky; top: 0; z-index: 1; margin: 0; padding: 10px 18px 6px; background: var(--ut-surface); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ut-muted); }

/* Elemento de lista (panel y bandeja) */
.nt-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.nt-item { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 64px; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--ut-border);
  background: transparent; color: inherit; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.nt-item:hover { background: var(--ut-surface-2); }
.nt-item .nt-tile { width: 36px; height: 36px; }
.nt-item .nt-tile .ut-i { width: 18px; height: 18px; }
.nt-item--unread { background: var(--ut-primary-soft); }
.nt-item--unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ut-primary); }
.nt-item__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nt-item__top { display: flex; align-items: baseline; gap: 8px; }
.nt-item__title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-item__time { flex: none; font: 400 12px/1 var(--ut-font-mono); color: var(--ut-muted); }
.nt-item__body { font-size: 13px; line-height: 20px; color: var(--ut-text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-item__dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ut-primary); }

/* Panel de la campana */
.nt-panel { position: fixed; z-index: 1060; width: 420px; max-width: calc(100vw - 16px); max-height: min(640px, calc(100vh - 16px)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--ut-surface); color: var(--ut-text); border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); box-shadow: var(--ut-shadow-lg); }
.nt-panel__head { display: flex; align-items: center; gap: 4px; padding: 12px 8px 8px 18px; }
.nt-panel__title { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; }
.nt-tabs { display: flex; gap: 4px; padding: 0 18px 10px; border-bottom: 1px solid var(--ut-border); }
.nt-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--ut-radius-full); background: transparent;
  color: var(--ut-muted); font: 500 14px/1 var(--ut-font); cursor: pointer; }
.nt-tab[aria-pressed="true"] { background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.nt-tab span { font: 400 12px/1 var(--ut-font-mono); }
.nt-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--ut-border); }
.nt-scrim { display: none; position: fixed; inset: 0; z-index: 1059; background: var(--ut-scrim); }
@media (max-width: 991.98px) {
  .nt-scrim { display: block; }
  .nt-panel { left: 0 !important; right: 0; top: 96px !important; bottom: 0 !important; width: auto; max-width: none; max-height: none; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .nt-panel::before { content: ""; flex: none; align-self: center; width: 40px; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--ut-border-strong); }
  .nt-panel__foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .nt-panel__foot .nt-link { flex: 1; justify-content: center; min-height: 48px; border: 1px solid var(--ut-border-strong); }
  .nt-list { flex: 1; }
}

/* Bandeja (/Notifications) */
.nt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nt-seg { display: inline-flex; padding: 3px; background: var(--ut-surface-2); border: 1px solid var(--ut-border); border-radius: 10px; }
.nt-seg a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 8px; color: var(--ut-muted); font-weight: 500; text-decoration: none; }
.nt-seg a[aria-current="page"] { background: var(--ut-surface); color: var(--ut-text); box-shadow: var(--ut-shadow); }
.nt-feed { overflow: hidden; }
.nt-feed .nt-list { overflow: visible; }
.nt-feed .nt-day { padding: 10px 20px; background: var(--ut-surface-2); border-bottom: 1px solid var(--ut-border); }
.nt-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--ut-border); }
.nt-row:last-child { border-bottom: 0; }
.nt-row .nt-item { flex: 1; min-width: 0; padding: 14px 20px; border-bottom: 0; }
.nt-row .nt-item .nt-tile { width: 40px; height: 40px; }
.nt-row .nt-item__title { font-size: 15px; white-space: normal; }
.nt-row .nt-iconbtn { align-self: center; margin-right: 8px; }
.nt-more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--ut-border); }

/* Interruptores y matrices (preferencias y administración) */
.nt-switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; margin: 0; border-radius: var(--ut-radius-full); position: relative;
  background: var(--ut-border-strong); cursor: pointer; transition: background .15s; vertical-align: middle; }
.nt-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(14, 21, 37, .3); transition: transform .15s; }
.nt-switch:checked { background: var(--ut-primary); }
.nt-switch:checked::after { transform: translateX(20px); }
.nt-switch:disabled { opacity: .55; cursor: not-allowed; }
.nt-switch:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.nt-ck { display: inline-flex; align-items: center; justify-content: center; width: var(--ut-hit); height: var(--ut-hit); cursor: pointer; }
.nt-ck input { width: 20px; height: 20px; margin: 0; accent-color: var(--ut-primary); }
.nt-ck input:disabled { cursor: not-allowed; }
.nt-matrix th, .nt-matrix td { text-align: center; vertical-align: middle; }
.nt-matrix th:first-child, .nt-matrix td:first-child { text-align: left; }
.nt-matrix .nt-g { border-left: 1px solid var(--ut-border); }
.nt-matrix td.nt-cat { background: var(--ut-surface-2); font-size: 13px; font-weight: 600; text-align: left; }
.nt-matrix .nt-dim { opacity: .5; }
.nt-na { display: inline-flex; align-items: center; gap: 4px; color: var(--ut-muted); font-size: 12px; }
.nt-na .ut-i { width: 14px; height: 14px; }
.nt-who { display: flex; align-items: center; gap: 12px; text-align: left; }
.nt-who strong { font-weight: 600; font-size: 15px; }
.nt-who .ut-help { display: block; margin: 0; }

/* Preferencias */
.nt-prefs { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.nt-prefs__main { flex: 999 1 620px; min-width: 0; overflow: hidden; }
.nt-prefs__aside { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.nt-state { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--ut-surface-2); }
.nt-state strong { display: block; }
.nt-state span.ut-help { display: block; }

/* Administración */
.nt-anchors { display: flex; gap: 4px; border-bottom: 1px solid var(--ut-border); overflow-x: auto; overflow-y: hidden; }
.nt-anchors a { display: inline-flex; align-items: center; min-height: var(--ut-hit); padding: 0 16px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ut-muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nt-anchors a:hover { color: var(--ut-text); }
.nt-anchors a:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: -2px; }
.nt-section { scroll-margin-top: 16px; min-width: 0; }
.nt-channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.nt-channel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--ut-border); border-radius: 12px; background: var(--ut-surface); }
.nt-channel--off { background: var(--ut-surface-2); }
.nt-channel__head { display: flex; align-items: center; gap: 12px; }
.nt-channel__head > div { flex: 1; min-width: 0; }
.nt-channel__head strong { display: block; font-size: 15px; }
.nt-channel__note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ut-muted); }
.nt-channel__note .ut-i { width: 16px; height: 16px; margin-top: 2px; }
.nt-field { display: flex; flex-direction: column; gap: 4px; }
.nt-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
.nt-setgroup { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--ut-border); border-radius: 12px; }
.nt-setgroup h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.nt-setgroup h3 .ut-i { width: 18px; height: 18px; color: var(--ut-primary-text); }
.nt-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px;
  border: 1px solid var(--ut-border); border-radius: var(--ut-radius-lg); background: var(--ut-surface); box-shadow: var(--ut-shadow-lg); }
.nt-bar .nt-tag { margin-right: auto; }

/* Envíos */
.nt-why { display: flex; align-items: flex-start; gap: 8px; color: var(--ut-text-2); }
.nt-why .ut-i { width: 16px; height: 16px; margin-top: 2px; }
.nt-fails td, .nt-fails th { text-align: left; }
.nt-fails tbody td:last-child { text-align: right; }

@media (max-width: 991.98px) {
  .nt-bar { bottom: var(--ut-tabbar-space); }
}
@media (max-width: 767.98px) {
  .nt-switch { width: 52px; height: 32px; }
  .nt-switch::after { width: 26px; height: 26px; }
  .nt-switch:checked::after { transform: translateX(20px); }
  .nt-matrix th, .nt-matrix td { padding: 10px 6px; }
  .nt-settings { grid-template-columns: 1fr; }
  .nt-seg a { padding: 0 12px; }
  .nt-item__body { font-size: 14px; }
  .nt-row .nt-item { padding: 12px 12px 12px 14px; }
}

/* Ajustes de las matrices de notificaciones */
.nt-prefs__main .ut-tablewrap { border: 0; border-radius: 0; box-shadow: none; }
.nt-prefs__main .ut-panel__head { border-bottom: 1px solid var(--ut-border); }
.nt-chname { display: inline-flex; align-items: center; gap: 6px; }
.nt-chname .ut-i { width: 16px; height: 16px; }
.nt-bar--flat { position: static; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
.nt-tile--sm { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.nt-flush { border: 0; border-radius: 0; box-shadow: none; }
.nt-matrix[data-no-cards] { min-width: 980px; }
.ut-tablewrap:has(> .nt-matrix[data-no-cards]) { overflow-x: auto; }

/* Notificaciones en móvil */
@media (max-width: 767.98px) {
  .nt-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .nt-toolbar > * { min-width: 0; }
  .nt-toolbar .ut-btn { width: 100%; justify-content: center; padding: 0 10px; min-height: 48px; }
  .nt-toolbar form { margin: 0; }
  .nt-toolbar > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .nt-seg { display: flex; width: 100%; }
  .nt-seg a { flex: 1; justify-content: center; min-height: 44px; }
  .hf-stat__n { white-space: nowrap; }
  .nt-bar { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .nt-bar .nt-tag, .nt-bar .ut-btn--secondary { display: none; }
  .nt-bar .ut-btn { flex: 1; justify-content: center; min-height: 48px; }
  .nt-bar--flat { padding: 12px; }
  .nt-prefs__main .ut-table--cards tbody { gap: 0; }
  .nt-prefs__main .ut-table--cards tbody tr { padding: 14px 0; border: 0; border-top: 1px solid var(--ut-border); border-radius: 0; box-shadow: none; background: transparent; }
  .nt-prefs__main .ut-table--cards tbody tr:first-child { border-top: 0; }
  .nt-prefs__main .ut-table--cards td { min-height: 48px; }
  .nt-prefs__main .ut-table--cards td:first-child { padding-bottom: 10px; }
  .nt-prefs__main .ut-table--cards td.nt-g { border-left: 0; }
  .nt-who { align-items: flex-start; }
  .nt-who .nt-tag { margin-left: 6px; }
  .nt-who .ut-help, .ut-table--cards .nt-who .ut-help { text-align: left; }
  .nt-feed .nt-day { padding: 8px 16px; }
  .nt-row .nt-iconbtn { margin-right: 4px; }
  .nt-channel-grid { grid-template-columns: 1fr; }
  .nt-fails.ut-table--cards td:last-child { justify-content: flex-end; }
}

/* Notificaciones en móvil: escala compacta */
@media (max-width: 767.98px) {
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) { gap: 12px; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-page__title { font-size: 22px; line-height: 28px; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-page__sub { font-size: 13px; line-height: 18px; margin-top: 2px; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-btn { min-height: 40px; padding: 0 12px; font-size: 14px; gap: 6px; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-btn .ut-i { width: 18px; height: 18px; }
  .nt-toolbar { gap: 6px; }
  .nt-toolbar .ut-btn { min-height: 40px; font-size: 13px; padding: 0 8px; }
  .nt-seg a { min-height: 36px; font-size: 14px; }
  .nt-seg { padding: 2px; }
  .hf-stat__n { font-size: 16px; }
  .ut-page .ut-panel { padding: 14px; gap: 14px; }
  .ut-page .ut-form__title { font-size: 15px; line-height: 22px; }
  .ut-page .ut-help { font-size: 12.5px; line-height: 17px; }
  .nt-anchors a { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .nt-channel { padding: 12px; gap: 10px; }
  .nt-tile { width: 34px; height: 34px; border-radius: 9px; }
  .nt-tile .ut-i { width: 18px; height: 18px; }
  .nt-item { min-height: 0; padding: 10px 12px; gap: 10px; }
  .nt-item .nt-tile, .nt-row .nt-item .nt-tile { width: 32px; height: 32px; }
  .nt-item .nt-tile .ut-i, .nt-row .nt-item .nt-tile .ut-i { width: 16px; height: 16px; }
  .nt-item__title, .nt-row .nt-item__title { font-size: 14px; }
  .nt-item__body { font-size: 13px; line-height: 18px; -webkit-line-clamp: 2; }
  .nt-item__time { font-size: 11px; }
  .nt-day { padding: 8px 12px 4px; font-size: 10.5px; }
  .nt-feed .nt-day { padding: 6px 12px; }
  .nt-row .nt-item { padding: 10px 6px 10px 12px; }
  .nt-row .nt-iconbtn { width: 40px; height: 40px; margin-right: 2px; }
  .nt-switch { width: 44px; height: 26px; }
  .nt-switch::after { width: 20px; height: 20px; }
  .nt-switch:checked::after { transform: translateX(18px); }
  .nt-prefs__main .ut-table--cards td { min-height: 40px; padding: 4px 14px; }
  .nt-prefs__main .ut-table--cards tbody tr { padding: 10px 0; }
  .nt-prefs__main .ut-panel__head { padding: 12px 14px; }
  .nt-who { gap: 10px; }
  .nt-who strong { font-size: 14px; }
  .nt-bar { padding: 8px 12px; }
  .nt-bar .ut-btn { min-height: 44px; }
  .nt-empty { padding: 28px 16px 32px; }
  .nt-tile--lg { width: 48px; height: 48px; }
  .nt-tile--lg .ut-i { width: 22px; height: 22px; }
  .ut-page .ut-field { min-height: 40px; font-size: 16px; }
}
@media (max-width: 991.98px) {
  .nt-panel { top: 120px !important; }
  .nt-panel__head { padding: 4px 4px 4px 16px; }
  .nt-panel__title { font-size: 16px; }
  .nt-tabs { padding: 0 16px 8px; }
  .nt-tab { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .nt-panel .nt-item { padding: 10px 16px; }
  .nt-panel__foot { gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .nt-panel__foot .nt-link { min-height: 40px; font-size: 13px; padding: 0 8px; }
}

/* Notificaciones en móvil: aprovechar el espacio */
@media (max-width: 767.98px) {
  .ut-content:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) { padding: 10px 8px 12px; }
  .ut-content:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .container { padding-inline: 0; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) { gap: 10px; }
  /* El título ya está en la barra superior: se conserva para lectores de pantalla sin gastar altura. */
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-page__title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-page__head { gap: 8px; }
  .ut-page:has(.nt-feed, .nt-prefs, .nt-channel-grid, .nt-fails) .ut-page__sub { margin: 0; }
  .ut-form:has(> .nt-section) { gap: 10px; }
  .nt-section > div > .ut-help { display: none; }
  #ntTypes > div > .ut-help { display: block; }
  .ut-page .nt-section.ut-panel { padding: 12px; gap: 10px; }
  .nt-channel-grid, .nt-settings { gap: 8px; }
  .nt-channel { padding: 10px; gap: 8px; }
  .nt-channel__note { font-size: 12px; }
  .nt-channel .nt-field { gap: 2px; }
  .nt-setgroup { padding: 10px; gap: 8px; }
  .nt-prefs, .nt-prefs__aside { gap: 10px; }
  .ut-page .nt-prefs__aside .ut-panel { padding: 12px; gap: 10px; }
  .hf-stats .hf-stat { padding: 8px 4px; }
  .ut-page .ut-label { font-size: 13px; }
  .nt-state { padding: 10px; }
  .nt-more { padding: 10px; }
}
@media (max-width: 767.98px) {
  .nt-prefs__main .ut-panel__head .ut-help { display: none; }
}

/* Historial: acción de anular plegada y mejor orden de las filas */
.hf-void > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ut-bad); font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; white-space: nowrap; }
.hf-void > summary::-webkit-details-marker { display: none; }
.hf-void > summary .ut-i { width: 16px; height: 16px; }
.hf-void > summary:hover, .hf-void[open] > summary { background: var(--ut-bad-soft); }
.hf-void > summary:focus-visible { outline: 2px solid var(--ut-primary); outline-offset: 2px; }
.hf-void form { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hf-void .ut-field { flex: 1; min-width: 0; }
.hf-void .ut-btn--icon { flex: none; border: 1px solid var(--ut-bad); color: var(--ut-bad); }
@media (min-width: 768px) {
  .hf-void { position: relative; }
  .hf-void[open] form { position: absolute; right: 0; z-index: 6; width: 300px; padding: 10px; background: var(--ut-surface); border: 1px solid var(--ut-border); border-radius: 12px; box-shadow: var(--ut-shadow-lg); }
  .hf-table .ut-table td { vertical-align: middle; }
  .hf-table .ut-person__name { white-space: normal; }
}
@media (min-width: 768px) {
  .hf-table td .ut-person__id[title] { display: block; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hf-table .ut-person__name { max-width: 190px; }
}

/* Inicio: calendario con barras continuas */
.ic-cal { --ic-num: 32px; --ic-lane: 22px; --ic-more: 16px; display: grid; gap: 12px; }
.ic-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ic-cal__head .hm-h2 { margin: 0; font-size: 17px; }
.ic-cal__nav { display: flex; align-items: center; gap: 6px; }
.ic-cal__nav .ut-btn { min-height: var(--ut-hit); min-width: var(--ut-hit); padding: 0 10px; border: 1px solid var(--ut-border); background: var(--ut-surface); color: var(--ut-text-2); }
.ic-cal__nav .ut-btn:hover { background: var(--ut-surface-2); }
.ic-cal__nav .ut-i { width: 16px; height: 16px; }
.ic-flip { display: inline-flex; transform: rotate(180deg); }
.ic-cal__grid { display: grid; gap: 2px; }
.ic-cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ic-cal__wd { padding: 2px 0 4px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ut-muted); }
.ic-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 2px; row-gap: 2px; align-items: center; }
.ic-day { grid-row: 1 / -1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; height: auto; padding: 4px 0 0; border: 0;
    border-radius: var(--ut-radius-md); background: transparent; color: var(--ut-text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ic-day:hover { background: var(--ut-surface-2); }
.ic-day:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ut-primary); }
.ic-day.is-rest { background: var(--ut-bg); color: var(--ut-muted); }
.ic-day.is-holiday { background: var(--ut-primary-soft); color: var(--ut-primary-text); font-weight: 700; }
.ic-day.is-selected { background: var(--ut-primary-soft); box-shadow: inset 0 0 0 1.5px var(--ut-primary); }
.ic-day.is-selected:focus-visible { box-shadow: inset 0 0 0 2px var(--ut-primary); }
.ic-day__n { min-width: 24px; height: 24px; line-height: 24px; border-radius: var(--ut-radius-full); text-align: center; }
.ic-day.is-today .ic-day__n { background: var(--ut-primary); color: var(--ut-on-primary); }
.ic-bar { position: relative; z-index: 1; height: 18px; margin: 0 3px; padding: 0 7px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; pointer-events: none;
    font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.ic-bar.is-cont-left { margin-left: 0; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ic-bar.is-cont-right { margin-right: 0; border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ic-bar--vac, .ic-sw--vac { background: var(--ut-ok-soft); color: var(--ut-ok); border-color: var(--ut-ok); }
.ic-bar--leave, .ic-sw--leave { background: var(--ut-info-soft); color: var(--ut-info); border-color: var(--ut-info); }
.ic-bar--pending, .ic-sw--pending { background: var(--ut-warn-soft); color: var(--ut-warn); border: 1px dashed var(--ut-warn); }
.ic-more { position: relative; z-index: 1; justify-self: center; font-size: 11px; font-weight: 600; line-height: 1; color: var(--ut-text-2); pointer-events: none; }
.ic-cal__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--ut-text-2); }
.ic-cal__legend li { display: inline-flex; align-items: center; gap: 6px; }
.ic-sw { display: inline-block; width: 16px; height: 8px; border: 1px solid transparent; border-radius: 4px; flex: none; }
.ic-sw--holiday { background: var(--ut-primary-soft); border-color: var(--ut-primary); }
.ic-cal__sub { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--ut-text-2); }
.ic-ag { display: grid; margin: 0; padding: 0; list-style: none; }
.ic-ag li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ut-border); }
.ic-ag__dt { display: grid; text-align: center; line-height: 1.1; }
.ic-ag__dt b { font-size: 18px; color: var(--ut-ink); }
[data-bs-theme="dark"] .ic-ag__dt b { color: var(--ut-text); }
.ic-ag__dt span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ut-muted); }
.ic-ag__who { display: grid; gap: 2px; min-width: 0; font-size: 14px; font-weight: 600; }
.ic-tag { display: inline-flex; width: fit-content; align-items: center; padding: 1px 8px; border-radius: var(--ut-radius-sm); font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.ic-tag--vac { background: var(--ut-ok-soft); color: var(--ut-ok); }
.ic-tag--leave { background: var(--ut-info-soft); color: var(--ut-info); }
.ic-tag--pending { background: var(--ut-warn-soft); color: var(--ut-warn); border: 1px dashed var(--ut-warn); }
.ic-tag--holiday { background: var(--ut-primary-soft); color: var(--ut-primary-text); }
.ic-ag__empty { margin: 0; padding: 8px 0; font-size: 13px; }

@media (max-width: 575.98px) {
    .ic-cal { --ic-num: 30px; --ic-lane: 20px; }
    .ic-bar { font-size: 10px; padding: 0 5px; margin: 0 2px; }
}

/* Paginador de listas largas */
.ut-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ut-text-2); }
.ut-pager__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ut-pager__page { color: var(--ut-text); }
@media (max-width: 575.98px) { .ut-pager { justify-content: center; text-align: center; } }

/* Notificaciones en móvil: acciones solo con icono */
.nt-btn__ico-m { display: none; }
@media (max-width: 991.98px) {
  .nt-toolbar { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; width: 100%; }
  .nt-toolbar .ut-btn { width: var(--ut-hit, 44px); min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
  .nt-toolbar .ut-btn .ut-i { width: 20px; height: 20px; }
  .nt-toolbar .ut-btn--primary { background: var(--ut-primary-soft); color: var(--ut-primary-text); border-color: transparent; }
  .nt-toolbar .ut-btn--primary:disabled { opacity: .5; }
  .nt-btn__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .nt-btn__ico-m { display: inline-flex; }
}

/* Notificaciones en móvil: pestañas e iconos en la misma fila */
@media (max-width: 991.98px) {
  .ut-page:has(> .nt-feed) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 12px; }
  .ut-page:has(> .nt-feed) > .ut-page__head { display: contents; }
  .ut-page:has(> .nt-feed) > .ut-page__head > div:first-child { order: 1; grid-column: 1 / -1; }
  .ut-page:has(> .nt-feed) > .nt-seg { order: 2; min-width: 0; }
  .ut-page:has(> .nt-feed) .nt-toolbar { order: 3; width: auto; gap: 4px; }
  .ut-page:has(> .nt-feed) > .nt-error, .ut-page:has(> .nt-feed) > .ut-alert { order: 4; grid-column: 1 / -1; }
  .ut-page:has(> .nt-feed) > .nt-feed { order: 5; grid-column: 1 / -1; }
}
@media (max-width: 359.98px) {
  .ut-page:has(> .nt-feed) > .nt-seg { grid-column: 1 / -1; }
  .ut-page:has(> .nt-feed) .nt-toolbar { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Tableta y móvil: acciones de cabecera solo con icono (regla en design-system.md) */
@media (max-width: 991.98px) {
  .ut-page__head .ut-btn.ut-btn--iconm, .ut-page__head > .ut-btn.ut-btn--iconm, .ut-page__head > a.ut-btn.ut-btn--iconm { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; justify-content: center; }
  .ut-btn--iconm .ut-i { width: 20px; height: 20px; }
  .ut-btn--iconm.ut-btn--primary { background: var(--ut-primary-soft); color: var(--ut-primary-text); border-color: transparent; }
  .ut-page__head:has(> .ut-btn--iconm) { flex-wrap: nowrap; align-items: center; }
  .ut-page__head:has(> .ut-btn--iconm) > :first-child { flex: 1; min-width: 0; }
  .ut-fab-m { width: 56px; height: 56px; min-height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .ut-fab-m .ut-i { width: 24px; height: 24px; }
  .ut-fab-m .nt-btn__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* Diálogo de usuarios: el formulario no se encoge, así el diálogo es el que se desplaza */
dialog.us-dialog[open] { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
dialog.us-dialog > .us-form { flex: none; overflow: visible; }
dialog.us-dialog { margin: auto; }
dialog.us-dialog[open] { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
