:root {
  --bg: #f5f7f8;
  --paper: #ffffff;
  --ink: #17252b;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #167347;
  --brand-2: #214b3d;
  --sidebar-bg: #15382d;
  --sidebar-hover: #214b3d;
  --sidebar-active: #2d5b49;
  --accent: #167347;
  --ok: #16865d;
  --warn: #d99522;
  --bad: #c64747;
  --info: #3272c8;
  --shadow: 0 1px 2px rgba(23, 37, 43, .06);
  --radius: 12px;
  --sidebar: 252px;
  --control: 36px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; max-width: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
a { color: var(--brand); }
.ico { flex: 0 0 auto; display: block; }
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.nav {
  background: var(--sidebar-bg);
  color: #f4f7f5;
  width: var(--sidebar);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.marca-fila { display: flex; align-items: flex-start; gap: 4px; padding: 16px 12px 8px; }
.marca { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: #fff; text-decoration: none; line-height: 1.25; }
.marca span { display: block; font-weight: 400; font-size: 11px; color: rgba(255,255,255,.62); margin-top: 2px; line-height: 1.3; }
.nav-colapsar, .nav-abrir {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.nav-colapsar:hover, .nav-abrir:hover { background: var(--sidebar-hover); }
.nav-abrir { display: none; color: var(--ink); }
.nav-scroll { flex: 1; overflow: auto; padding: 4px 10px 12px; }
.nav-etiqueta, .nav-grupo summary {
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 14px 8px 6px;
}
.nav-grupo { border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
.nav-grupo summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 8px;
  margin: 6px 0;
  padding: 8px;
}
.nav-grupo summary::-webkit-details-marker { display: none; }
.nav-grupo summary:hover { background: var(--sidebar-hover); color: #fff; }
.nav a, .nav button.link {
  color: #e7eeea;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
}
.nav a:hover, .nav button.link:hover { background: var(--sidebar-hover); }
.nav a.activo { background: var(--sidebar-active); color: #fff; }
.nav-pie { border-top: 1px solid rgba(255,255,255,.08); padding: 10px; }
.nav-pie-txt { margin: 0 8px 8px; font-size: 12px; color: rgba(255,255,255,.7); }
.nav-velo { position: fixed; inset: 0; background: rgba(23,37,43,.45); z-index: 30; }
.contenido { min-width: 0; padding: 0 1.25rem 2rem; }
.barra {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -1.25rem 1rem;
  padding: 0 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.barra-contexto { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.barra-usuario { margin: 0; font-size: 13px; font-weight: 600; }
.tope { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
h1 { font-size: 1.35rem; margin: 0 0 .25rem; letter-spacing: -.02em; }
h2 { font-size: 1rem; margin: 0 0 .6rem; }
.sub { color: var(--muted); margin: 0; }
.grid { display: grid; gap: .85rem; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.dos { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tarjeta {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
}
.kpi b { display: block; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .82rem; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .info { color: var(--info); }
.tabla-wrap { overflow-x: auto; max-width: 100%; }
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th, .tabla td { text-align: left; padding: .6rem .45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.tabla tbody tr:hover { background: #f8fafb; }
.tabla .num, .tabla td.importe { text-align: right; font-variant-numeric: tabular-nums; }
.estado {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  background: #eef2f4; color: var(--ink);
}
.estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.estado.programado { color: #3d5a80; background: #e8eef6; }
.estado.pendiente, .estado.en_curso { color: #8a5a10; background: #fbf3e2; }
.estado.cerrada, .estado.completo { color: var(--ok); background: #e7f6ef; }
.estado.incompleta { color: #8a4b12; background: #fbe8c8; }
.estado.falta { color: var(--bad); background: #fdecec; }
.estado.descanso { color: #475569; background: #eef2f4; }
.chip {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  background: #efe6d6; font-size: .78rem; font-weight: 600;
}
.chip.bio { background: #d9efe4; color: #145c3a; }
.chip.sim { background: #fbe8c8; color: #8a4b12; }
.chip.prueba { background: #e7eefc; color: #1d3f8a; }
.chip.borrador { background: #eee; }
.chip.revision { background: #dde8f8; color: var(--info); }
.chip.autorizada { background: #d9efe4; color: var(--ok); }
.chip.pagada { background: #e8e2f8; }
.acciones { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn, button, input[type=submit] {
  border: 0; border-radius: 8px; min-height: var(--control); padding: .4rem .85rem;
  background: var(--brand); color: #fff; font-weight: 650; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover, button:hover, input[type=submit]:hover { background: #125c39; }
.btn.sec, button.sec, .btn.secondary { background: #e8eeeb; color: var(--ink); }
.btn.sec:hover, button.sec:hover { background: #dbe4e0; }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost, button.link { background: transparent; color: inherit; }
.btn.peligro, .btn.danger { background: var(--bad); }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; }
.campo span { font-size: .82rem; color: var(--muted); font-weight: 600; }
input, select, textarea {
  font: inherit; min-height: var(--control); padding: .45rem .7rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.aviso { padding: .7rem .9rem; border-radius: 10px; background: #e7f6ef; color: #145c3a; margin-bottom: .8rem; }
.alerta { padding: .7rem .9rem; border-radius: 10px; background: #fdecec; color: #8a1f16; margin-bottom: .8rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--sidebar-bg); }
.login .tarjeta { width: min(420px, 100%); }
.menu-movil, .hamburguesa { display: none; }
.filtros { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: .8rem; }
.filtros .campo { margin: 0; min-width: 140px; flex: 1; }
.busca { max-width: 320px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .nav {
    position: fixed; z-index: 40; transform: translateX(-105%);
    width: min(256px, 88vw); transition: transform .18s ease;
  }
  html.nav-abierta .nav { transform: none; }
  .nav-abrir { display: inline-grid; }
  .nav-colapsar { display: none; }
  .tabla-wrap { overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .nav { transition: none; }
}
.nota { font-size: .85rem; color: var(--muted); }
.tabla.densa { font-size: .82rem; }
.tabla.densa th, .tabla.densa td { padding: .4rem .3rem; white-space: nowrap; }
.chip.warn { background: #fbe8c8; color: #8a4b12; }
.chip.ok, .chip.autorizada { background: #d9efe4; color: var(--ok); }
.chip.pendiente, .chip.revisar, .chip.revision { background: #dde8f8; color: var(--info); }
.chip.retardo, .chip.jornada_incompleta { background: #fbe8c8; color: #8a4b12; }
.chip.falta { background: #fde8e6; color: var(--bad); }
.chip.abierta, .chip.borrador { background: #eee; }
.chip.ajuste_a_favor { background: #d9efe4; color: var(--ok); }
.chip.fondo, .chip.semana_fondo { background: #e8e2f8; }
.chip.precierre { background: #fbe8c8; color: #8a4b12; }
.chip.pendiente_conciliacion, .chip.conciliada { background: #dde8f8; color: var(--info); }
.chip.cerrada, .chip.pagada { background: #e8e2f8; }

@media (min-width: 861px) {
  html.nav-compacta { --sidebar: 72px; }
  html.nav-compacta .marca span,
  html.nav-compacta .nav-txt,
  html.nav-compacta .nav-etiqueta,
  html.nav-compacta .nav-pie-txt,
  html.nav-compacta .nav-grupo summary span,
  html.nav-compacta .nav-grupo summary .ico { display: none; }
  html.nav-compacta .marca-fila { justify-content: center; padding-inline: 8px; }
  html.nav-compacta .marca { font-size: 0; width: 0; overflow: hidden; }
  html.nav-compacta .nav a,
  html.nav-compacta .nav button.link {
    width: 44px; height: 40px; margin-inline: auto; padding: 0; justify-content: center;
  }
  html.nav-compacta .nav-grupo { border: 0; }
  html.nav-compacta .nav-grupo summary { display: none; }
  html.nav-compacta .nav-txt {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  }
}

html.cierre-semanal,
html.cierre-semanal body {
  background: #f3f4f6;
  color: #14171c;
  font-family: "Segoe UI", system-ui, sans-serif;
}
html.cierre-semanal { --paper: #fff; --line: #e6e8ec; --muted: #5e6872; --ink: #14171c; --brand: #1c6b48; --radius: 10px; --shadow: none; }
html.cierre-semanal .contenido { padding: 20px 24px 40px; }
html.cierre-semanal .layout > .nav,
html.cierre-semanal .layout > .contenido { min-width: 0; }
html.vista-amplia.cierre-semanal .contenido,
html.cierre-semanal.vista-amplia .contenido { padding: 16px 20px 32px; }

html.cierre-semanal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

html.cierre-semanal .cabecera {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
html.cierre-semanal h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
html.cierre-semanal .periodo { margin: 4px 0 0; font-size: 14px; color: #3c4550; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.cierre-semanal .precierre-hecho { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
html.cierre-semanal .cabecera-acciones { display: flex; align-items: center; gap: 8px; }
html.cierre-semanal .semana-form { display: flex; gap: 6px; align-items: center; }
html.cierre-semanal .semana-form input[type=date] { padding: 6px 8px; border-radius: 8px; font-size: 13px; }

html.cierre-semanal button,
html.cierre-semanal .btn,
html.cierre-semanal input[type=submit] {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
html.cierre-semanal button.sec,
html.cierre-semanal .btn.sec {
  background: #fff;
  color: #1c2430;
  border: 1px solid #e3e6eb;
}
html.cierre-semanal .btn-principal {
  background: #1c6b48;
  color: #fff;
  border: 0;
  min-height: 36px;
}
html.cierre-semanal .btn-texto {
  background: transparent;
  color: #1c6b48;
  border: 0;
  padding: 8px 10px;
}

html.cierre-semanal .menu-mas { position: relative; }
html.cierre-semanal .menu-mas summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
html.cierre-semanal .menu-mas summary::-webkit-details-marker { display: none; }
html.cierre-semanal .menu-panel {
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 20;
  width: min(320px, 80vw);
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(20, 23, 28, .08);
}
html.cierre-semanal .menu-panel a,
html.cierre-semanal .menu-panel button.sec { display: block; width: 100%; text-align: left; margin-top: 6px; }
html.cierre-semanal .menu-panel form { margin-top: 8px; }
html.cierre-semanal .menu-panel input { width: 100%; margin-bottom: 6px; }

html.cierre-semanal .resumen {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 12px 24px;
  align-items: center;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
html.cierre-semanal .total-card span { display: block; font-size: 12px; letter-spacing: .04em; color: #5e6872; font-weight: 650; }
html.cierre-semanal .total-card strong {
  display: block;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
html.cierre-semanal .total-card em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: #5e6872; }
html.cierre-semanal .mini-kpis { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-end; }
html.cierre-semanal .mini-kpis span { display: block; font-size: 12px; color: #5e6872; }
html.cierre-semanal .mini-kpis b { display: block; margin-top: 2px; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
html.cierre-semanal .mini-kpis .mas b { color: #1c6b48; }
html.cierre-semanal .mini-kpis .menos b { color: #9a3412; }
html.cierre-semanal .linea-meta { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #5e6872; }

html.cierre-semanal .banda-revision {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff8eb;
  border: 1px solid #f3e0b5;
  color: #7a4b08;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
html.cierre-semanal .banda-revision strong { display: block; font-size: 14px; color: #6b3f06; }
html.cierre-semanal .banda-revision p { margin: 2px 0 0; font-size: 12px; }
html.cierre-semanal .nota-suave { margin: 0 0 12px; font-size: 12px; color: #5e6872; }

html.cierre-semanal .accion-barra { margin: 0 0 12px; }
html.cierre-semanal .corte-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
html.cierre-semanal .corte-form input[type=date] { padding: 7px 8px; border-radius: 8px; }

html.cierre-semanal .tabla-panel {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  overflow: auto;
}
html.cierre-semanal .cierre-tabla { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
html.cierre-semanal .c-emp { width: 20%; }
html.cierre-semanal .c-h { width: 5.5%; }
html.cierre-semanal .c-tarifa { width: 6%; }
html.cierre-semanal .c-sueldo { width: 9%; }
html.cierre-semanal .c-desc { width: 7%; }
html.cierre-semanal .c-aj { width: 8%; }
html.cierre-semanal .c-final { width: 9%; }
html.cierre-semanal .c-estado { width: 12%; }
html.cierre-semanal .c-acc { width: 7%; }
html.cierre-semanal .cierre-tabla th,
html.cierre-semanal .cierre-tabla td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}
html.cierre-semanal .cierre-tabla th {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6a7380;
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafbfc;
}
html.cierre-semanal .cierre-tabla thead tr:nth-child(2) th { top: 27px; }
html.cierre-semanal .cierre-tabla th:not(.num) { text-align: left; }
html.cierre-semanal .cierre-tabla .grupo {
  text-align: center;
  color: #8b939e;
  border-bottom: 0;
  padding-bottom: 0;
}
html.cierre-semanal .cierre-tabla .col-emp { width: auto; max-width: none; }
html.cierre-semanal .cierre-tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
html.cierre-semanal .cierre-tabla .col-emp,
html.cierre-semanal .cierre-tabla th.col-emp { text-align: left; }
html.cierre-semanal .cierre-tabla .col-emp {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 168px;
  max-width: 220px;
  white-space: normal;
}
html.cierre-semanal .cierre-tabla thead .col-emp { z-index: 4; }
html.cierre-semanal .emp-num { display: block; font-size: 11px; color: #6a7380; }
html.cierre-semanal .emp-nom { display: block; font-size: 14px; font-weight: 650; color: #14171c; }
html.cierre-semanal .emp-hor { display: block; font-size: 12px; color: #6a7380; margin-top: 1px; }
html.cierre-semanal .cierre-tabla tbody tr:hover td { background: #f8faf9; }
html.cierre-semanal .tarifa { color: #6a7380; font-size: 12px; }
html.cierre-semanal .cero { color: #8b939e; }
html.cierre-semanal .pago-final { font-size: 14px; font-weight: 700; }
html.cierre-semanal .col-pago {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #f7fbf8 !important;
}
html.cierre-semanal thead .col-pago { z-index: 4; }
html.cierre-semanal .btn-silencio {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-decoration: underline dotted transparent;
}
html.cierre-semanal .btn-silencio:hover { text-decoration-color: currentColor; }
html.cierre-semanal .btn-ajuste {
  background: #e8f6ee;
  color: #14663d;
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}
html.cierre-semanal .btn-revisar {
  background: #fff;
  color: #1c2430;
  border: 1px solid #d7dbe1;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
  min-height: 28px;
}
html.cierre-semanal .visto { font-size: 12px; color: #1c6b48; font-weight: 650; }
html.cierre-semanal .chip-uno {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
  background: #eef1f4;
  color: #3c4550;
}
html.cierre-semanal .chip-uno.pendiente,
html.cierre-semanal .chip-uno.revisar { background: #fff4df; color: #8a5a10; }
html.cierre-semanal .chip-uno.falta,
html.cierre-semanal .chip-uno.retardo,
html.cierre-semanal .chip-uno.incompleta { background: #fdecea; color: #9f2d22; }
html.cierre-semanal .chip-uno.ok,
html.cierre-semanal .chip-uno.revisado,
html.cierre-semanal .chip-uno.ajuste { background: #e8f6ee; color: #14663d; }
html.cierre-semanal .chip.precierre { background: #fff4df; color: #8a5a10; border-radius: 999px; font-size: 11px; }

html.cierre-semanal .bloque-suave { margin-top: 16px; }
html.cierre-semanal .bloque-suave h2 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #6a7380; margin: 0 0 8px; }
html.cierre-semanal .ajuste-linea {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
html.cierre-semanal .ajuste-linea b { font-variant-numeric: tabular-nums; color: #14663d; }
html.cierre-semanal .ajuste-linea p { margin: 2px 0 0; font-size: 12px; color: #5e6872; }

html.cierre-semanal .capturas { margin-top: 8px; }
html.cierre-semanal .capturas .tarjeta {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  box-shadow: none;
  padding: 14px 16px;
}
html.cierre-semanal .capturas h2 { font-size: 15px; margin: 0 0 4px; }
html.cierre-semanal details.plano {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  padding: 10px 14px;
}
html.cierre-semanal details.plano summary { cursor: pointer; font-size: 13px; font-weight: 650; }
html.cierre-semanal details.plano pre { white-space: pre-wrap; font-size: 11px; }

html.cierre-semanal .modal-cierre {
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  padding: 16px;
  max-width: min(28rem, calc(100vw - 32px));
  background: #fff;
  color: #14171c;
  box-shadow: 0 16px 40px rgba(20, 23, 28, .16);
}
html.cierre-semanal .modal-cierre::backdrop { background: rgba(20, 23, 28, .4); }
html.cierre-semanal .modal-cierre h3 { margin: 0 0 6px; font-size: 16px; }
html.cierre-semanal .desglose { margin: 8px 0 12px; }
html.cierre-semanal .desglose div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid #eef0f3; }
html.cierre-semanal .desglose dt { color: #5e6872; }
html.cierre-semanal .desglose dd { margin: 0; font-variant-numeric: tabular-nums; }
html.cierre-semanal .hallazgos { margin: 8px 0 12px; padding-left: 18px; font-size: 13px; }
html.cierre-semanal button:focus-visible,
html.cierre-semanal a:focus-visible,
html.cierre-semanal summary:focus-visible,
html.cierre-semanal select:focus-visible,
html.cierre-semanal input:focus-visible,
html.cierre-semanal textarea:focus-visible { outline: 2px solid #1c6b48; outline-offset: 2px; }

@media (max-width: 1366px) {
  html.cierre-semanal .total-card strong { font-size: 28px; }
}
@media (max-width: 1100px) {
  html.cierre-semanal .resumen { grid-template-columns: 1fr; }
  html.cierre-semanal .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  html.cierre-semanal .contenido { padding: 12px; }
  html.cierre-semanal h1 { font-size: 22px; }
  html.cierre-semanal .cabecera { flex-direction: column; }
  html.cierre-semanal .total-card strong { font-size: 28px; }
  html.cierre-semanal .banda-revision { flex-direction: column; align-items: flex-start; }
  html.cierre-semanal .tabla-panel { overflow: visible; border: 0; background: transparent; }
  html.cierre-semanal .cierre-tabla { table-layout: auto; width: 100%; }
  html.cierre-semanal .cierre-tabla,
  html.cierre-semanal .cierre-tabla tbody { display: block; }
  html.cierre-semanal .cierre-tabla thead { display: none; }
  html.cierre-semanal .cierre-tabla tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
  }
  html.cierre-semanal .cierre-tabla td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 0;
    padding: 0;
    white-space: normal;
    text-align: left;
    background: transparent !important;
    position: static;
    min-width: 0;
    max-width: none;
  }
  html.cierre-semanal .cierre-tabla td::before {
    content: attr(data-label);
    color: #6a7380;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  html.cierre-semanal .cierre-tabla td.col-emp {
    grid-column: 1 / -1;
    position: static;
    left: auto;
    min-width: 0;
    max-width: none;
  }
  html.cierre-semanal .cierre-tabla td.col-emp::before,
  html.cierre-semanal .cierre-tabla td[data-label=""]::before { display: none; }
  html.cierre-semanal .cierre-tabla td.col-pag,
  html.cierre-semanal .cierre-tabla td.col-pago,
  html.cierre-semanal .cierre-tabla td.col-estado,
  html.cierre-semanal .cierre-tabla td.col-accion { grid-column: 1 / -1; }
  html.cierre-semanal .cierre-tabla td.col-pago { flex-direction: row; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid #eef0f3; }
  html.cierre-semanal .cierre-tabla td.oculta-movil { display: none; }
  html.cierre-semanal .btn-revisar { min-height: 40px; width: 100%; }
}

html.operativo { background: #f3f4f6; }
html.operativo .contenido { background: transparent; }
html.operativo .tarjeta { background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; box-shadow: none; }
html.operativo .kicker { margin: 0; color: #5d6b7a; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
html.operativo .bloque-op { margin: 0 0 16px; }
html.operativo .mini-kpis { display: flex; flex-wrap: wrap; gap: 18px 28px; }
html.operativo .mini-kpis span { display: block; color: #6a7380; font-size: 12px; }
html.operativo .mini-kpis strong { font-size: 20px; font-variant-numeric: tabular-nums; }

/* Dashboard operativo compacto */
.tope-compacto { align-items: center; margin-bottom: 12px; }
.tope-compacto h1 { font-size: 1.25rem; margin: 0; }
.tope-compacto .sub { font-size: .82rem; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.kpi-c { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; }
.kpi-c .kpi-ico { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eef2f4; color: #4b5b66; }
.kpi-c b { display: block; font-size: 1.45rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-c small { display: block; margin-top: 1px; color: #6a7380; font-size: .74rem; line-height: 1.2; }
.kpi-c.t-ok .kpi-ico { background: #e7f6ef; color: var(--ok); }
.kpi-c.t-info .kpi-ico { background: #e4edf9; color: var(--info); }
.kpi-c.t-warn .kpi-ico { background: #fbefd8; color: #a86a0a; }
.dash-nota { margin: 6px 2px 14px; font-size: .78rem; color: #6a7380; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 12px; margin-bottom: 12px; align-items: start; }
.dash-pila { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
html.operativo .dash-card { padding: 12px 14px; }
.dash-card h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: .92rem; }
.dash-card p { margin: 0; }
.act-lista { list-style: none; margin: 0; padding: 0; }
.act-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef0f3; }
.act-item:last-child { border-bottom: 0; padding-bottom: 0; }
.act-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.act-ico.in { background: #e7f6ef; color: var(--ok); }
.act-ico.out { background: #e8eef6; color: #3d5a80; }
.act-cuerpo { min-width: 0; }
.act-cuerpo strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.act-cuerpo .nota { font-size: .76rem; }
.act-cuerpo .chip { padding: .05rem .4rem; font-size: .7rem; }
.act-est { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.act-est .chip { font-size: .72rem; padding: .08rem .45rem; }
.act-hora { font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; }
.nom-periodo { margin-bottom: 6px !important; }
.nom-datos { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 10px; }
.nom-datos div { min-width: 0; }
.nom-datos dt { color: #6a7380; font-size: .72rem; }
.nom-datos dd { margin: 0; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-chico { min-height: 30px; padding: .25rem .7rem; font-size: .82rem; }
.est-fila { display: flex; align-items: flex-start; gap: 10px; }
.est-fila + .est-fila { margin-top: 8px; }
.est-fila strong { margin-right: 6px; }
.punto { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; }
.punto.on { background: var(--ok); box-shadow: 0 0 0 3px #e7f6ef; }
.punto.off { background: var(--bad); box-shadow: 0 0 0 3px #fdecec; }
.est-pie { margin-top: 8px !important; padding-top: 8px; border-top: 1px solid #eef0f3; font-size: .78rem; }
.pend-fila { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #eef0f3; font-size: .88rem; }
.pend-fila:last-child { border-bottom: 0; }
.dash-card .tabla.densa td, .dash-card .tabla.densa th { padding: .35rem .4rem; }
.dash-card .tabla.densa td { white-space: normal; }
.dash-card .tabla.densa td.num { white-space: nowrap; }
.kpi-c.t-bad .kpi-ico { background: #fdecec; color: var(--bad); }
.kpi-c > div { min-width: 0; }
.kpi-c b.kpi-texto { font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.kpi-c small { overflow-wrap: anywhere; }
.aviso-op { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid #e6e8ec; background: #fff; font-size: .88rem; }
.aviso-op ul { margin: 6px 0 4px 18px; padding: 0; }
.aviso-op.aviso-bad { background: #fdf2f2; border-color: #f2c6c6; color: #7a1f1f; }
.aviso-op.aviso-warn { background: #fffaf0; border-color: #f0d9a8; color: #6b4a0b; }
.aviso-op.aviso-info { background: #f0f6fd; border-color: #c9dcf3; color: #1f4474; }
.aviso-op.aviso-ok { background: #effaf4; border-color: #bfe5d1; color: #145c3a; }
.nom-bloque { padding: 8px 0; border-top: 1px solid #eef0f3; }
.nom-bloque:first-of-type { border-top: 0; padding-top: 0; }
.nom-etiqueta { margin: 0 0 4px !important; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5d6b7a; }
.nom-actual { background: #f7faf8; margin: 4px -14px 8px; padding: 8px 14px; }
.est-bloque + .est-bloque { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f3; }
.est-cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.est-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0 0 6px; }
.est-datos div { min-width: 0; }
.est-datos dt { color: #6a7380; font-size: .72rem; cursor: help; }
.est-datos dd { margin: 0; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.est-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px !important; }

/* ---- Sistema de botones: PRIMARY · SECONDARY · OUTLINE · GHOST · DANGER ---- */
.btn, button, input[type=submit] { font: inherit; font-size: .875rem; font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
a.btn, a.btn:link, a.btn:visited, a.btn:hover, a.btn:active { text-decoration: none; }
a.btn { color: #fff; }
.btn:focus-visible, button:focus-visible, input[type=submit]:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.btn:active, button:active { filter: brightness(.96); }
.btn:disabled, .btn[disabled], .btn.disabled, button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; filter: none; pointer-events: none; }
.btn .ico, button .ico { margin: 0 -2px; }
a.btn.sec, a.btn.secondary, a.btn.outline, a.btn.ghost { color: var(--ink); }
.btn.outline, button.outline { background: #fff; color: var(--ink); border: 1px solid #c9d3cf; }
.btn.outline:hover, button.outline:hover { background: #f3f6f5; border-color: #aab8b3; }
.btn.ghost, button.ghost { background: transparent; color: var(--brand); }
a.btn.ghost { color: var(--brand); }
.btn.ghost:hover, button.ghost:hover { background: #e9f1ed; }
.btn.peligro, .btn.danger, button.peligro, button.danger { background: #b83c3c; color: #fff; }
.btn.peligro:hover, .btn.danger:hover, button.peligro:hover, button.danger:hover { background: #9a2f2f; }
.btn-chico, .btn.sm { min-height: 30px; padding: .25rem .7rem; font-size: .82rem; }
form.en-linea { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.acciones-fila { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.acciones-fila form { margin: 0; }

/* ---- Estados y chips adicionales ---- */
.estado.online, .estado.ok { color: var(--ok); background: #e7f6ef; }
.estado.offline, .estado.bad { color: var(--bad); background: #fdecec; }
.estado.revocada, .estado.muted { color: #475569; background: #eef2f4; }
.estado.warn { color: #8a4b12; background: #fbe8c8; }
.estado.info { color: var(--info); background: #e4edf9; }
.chip.muted { background: #eef2f4; color: #475569; }
.chip.info { background: #e4edf9; color: var(--info); }
.chip.bad { background: #fdecec; color: var(--bad); }
.chip.sensible { background: #fdecec; color: #8a1f16; }
.chip.configurable { background: #e4edf9; color: var(--info); }
.chip.informativa { background: #eef2f4; color: #475569; }

/* ---- Encabezado, filtros y tablas operativas ---- */
.pagina-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.pagina-cab h1 { margin: 0; font-size: 1.25rem; }
.pagina-cab .sub { font-size: .84rem; margin-top: 2px; max-width: 78ch; }
.resumen-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
html.operativo .filtros { padding: 10px 12px; margin-bottom: 12px; gap: 8px 10px; align-items: end; }
html.operativo .filtros .campo { margin: 0; min-width: 130px; flex: 1 1 130px; max-width: 230px; }
html.operativo .filtros .campo span { font-size: .74rem; }
html.operativo .filtros button { align-self: end; }
.tabla thead th { background: #f7f9fa; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tabla td { font-size: .88rem; }
.tabla th.num, .tabla td.num, .tabla td.importe, .tabla th.importe { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla td.acciones, .tabla th.acciones { text-align: right; white-space: nowrap; }
.tabla td.centro, .tabla th.centro { text-align: center; }
.tabla td .nota { display: block; font-size: .76rem; }
.tabla td.ancho-texto { max-width: 340px; overflow-wrap: anywhere; }
.tabla tr.destacada td { background: #fffaf0; }
.tabla tr.destacada-bad td { background: #fdf5f5; }
html.operativo .tabla-wrap.tarjeta { padding: 0; overflow: auto; }
html.operativo .tabla-wrap.tarjeta .tabla th:first-child, html.operativo .tabla-wrap.tarjeta .tabla td:first-child { padding-left: 14px; }
html.operativo .tabla-wrap.tarjeta .tabla th:last-child, html.operativo .tabla-wrap.tarjeta .tabla td:last-child { padding-right: 14px; }
.vacio { padding: 22px 14px; text-align: center; color: var(--muted); font-size: .9rem; }
.pie-tabla { padding: 8px 14px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.cols-31 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
.cols-2 > *, .cols-31 > * { min-width: 0; }
.def-lista { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: .88rem; }
.def-lista dt { color: #6a7380; font-size: .8rem; }
.def-lista dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.def-lista dd .nota { font-weight: 400; }
.sec-titulo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: .92rem; }
.pestanas { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; padding: 4px; background: #e9eeec; border-radius: 10px; width: fit-content; max-width: 100%; }
.pestanas a { padding: 6px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .84rem; font-weight: 600; }
.pestanas a:hover { background: #dbe4e0; }
.pestanas a.activa { background: #fff; box-shadow: 0 1px 2px rgba(23,37,43,.12); }
.lista-checks { list-style: none; margin: 0; padding: 0; }
.lista-checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid #eef0f3; }
.lista-checks li:last-child { border-bottom: 0; }
.check-marca { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.check-marca.ok { background: #e7f6ef; color: var(--ok); }
.check-marca.bad { background: #fdecec; color: var(--bad); }
.check-marca.warn { background: #fbe8c8; color: #8a4b12; }
.linea-tiempo { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #e2e8f0; }
.linea-tiempo li { position: relative; padding: 0 0 12px 12px; }
.linea-tiempo li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.form-compacto .campo { margin-bottom: .55rem; }
.form-compacto .acciones { margin-top: .4rem; }
.campo .error, .campo-error { color: #9a2f2f; font-size: .78rem; font-weight: 600; }
.campo input.invalido, .campo select.invalido, input[aria-invalid=true], select[aria-invalid=true] { border-color: #b83c3c; background: #fffafa; }
.campo-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: .55rem; }
.campo-check input { width: auto; min-height: 0; }
.ayuda { font-size: .78rem; color: var(--muted); margin: 2px 0 0; }
details.desplegable { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
details.desplegable > summary { padding: 9px 12px; cursor: pointer; font-weight: 650; font-size: .88rem; margin: 0; }
details.desplegable[open] > summary { border-bottom: 1px solid var(--line); }
details.desplegable > .cuerpo { padding: 10px 12px; }
@media (max-width: 980px) {
  .cols-2, .cols-31 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .resumen-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .def-lista { grid-template-columns: 1fr; gap: 1px; }
  .def-lista dd { margin-bottom: 7px; }
  .pagina-cab .acciones { width: 100%; }
}
.dash-card .tabla .estado { margin-right: 4px; }
@media (max-width: 980px) {
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .act-item { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .act-est { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.semana-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.semana-grid fieldset { border: 1px solid #e6e8ec; border-radius: 8px; margin: 0; padding: 8px; }
.semana-grid label { display: block; font-size: 12px; margin: 4px 0; }
.semana-grid input { width: 100%; }
.contenido details > summary { cursor: pointer; font-weight: 650; margin-bottom: .6rem; }
.filtros > button { flex: 0 0 auto; align-self: end; }
@media (max-width: 720px) {
  .tabla-movil thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabla-movil, .tabla-movil tbody, .tabla-movil tr, .tabla-movil td { display: block; width: 100%; }
  .tabla-movil tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 8px; padding: 8px 10px; }
  .tabla-movil tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; }
  .tabla-movil td { display: block; border: 0; padding: 3px 0; min-width: 0; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  .tabla-movil td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .tabla-movil td[data-label=""]::before { display: none; }
  .tabla-movil td:first-child, .tabla-movil td.acciones, .tabla-movil td[data-label=""], .tabla-movil td.ancho-texto, .tabla-movil td[colspan] { grid-column: 1 / -1; }
  .tabla-movil td.acciones .acciones-fila { justify-content: flex-start; }
  .tabla-movil td.vacio { text-align: center !important; }
  .tabla-movil td.vacio::before { display: none; }
  .tabla-movil tfoot { display: block; }
  .tabla-movil tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 14px; background: #f7f9fa; }
  .tabla-movil tfoot th { display: block; border: 0; padding: 2px 0; }
  .tabla-movil tfoot th:empty { display: none; }
  .tabla-movil tr.destacada { border-color: #f0d9a8; background: #fffaf0; }
  .lista-checks li { grid-template-columns: 24px minmax(0, 1fr); }
  .lista-checks li > .acciones-fila { grid-column: 2; justify-content: flex-start; }
}
.linea-pasos { display: flex; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; counter-reset: paso; flex-wrap: wrap; }
.linea-pasos li { counter-increment: paso; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); padding: 3px 10px 3px 4px; border-radius: 999px; background: #f1f4f3; }
.linea-pasos li::before { content: counter(paso); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #d9e1de; color: #3b4a45; font-size: .68rem; font-weight: 700; }
.linea-pasos li.hecho { color: #145c3a; background: #e7f6ef; }
.linea-pasos li.hecho::before { content: "✓"; background: var(--ok); color: #fff; }
.linea-pasos li.actual { color: #fff; background: var(--brand); font-weight: 650; }
.linea-pasos li.actual::before { background: #fff; color: var(--brand); }
@media print {
  .nav, .barra, .nav-velo, .no-imprimir, .hamburguesa, .menu-movil { display: none !important; }
  .layout, .contenido { display: block !important; width: auto !important; margin: 0 !important; }
  .hoja-carta { width: 7.6in; }
  .recibo { min-height: 4.7in; }
  .corte { border-top: 1px dashed #9aa3af; margin-top: 8px; }
}



/* Ajustes de espaciado de etiquetas en linea */
span.nom-etiqueta { display: block; }
.check-marca + div > .nota { display: block; }
@media (min-width: 721px) { td.acciones, th.acciones { display: table-cell; } }

/* ---- Centro de alertas y ficha de empleado ---- */
.al-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 12px; }
.al-filtro { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .85rem; text-decoration: none; }
.al-filtro b { color: var(--muted); font-weight: 600; }
.al-filtro:hover { border-color: var(--brand); }
.al-filtro.activo { background: var(--brand); border-color: var(--brand); color: #fff; }
.al-filtro.activo b { color: #fff; }
.al-filtro:focus-visible, .al-btn .btn:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.al-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.al-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.al-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius); box-shadow: var(--shadow); }
.al-card.sev-critica { border-left-color: var(--bad); }
.al-card.sev-atencion { border-left-color: var(--warn); }
.al-card.sev-informativa { border-left-color: var(--info); }
.al-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #eef2f4; color: var(--muted); }
.sev-critica .al-ico { background: #fdecec; color: var(--bad); }
.sev-atencion .al-ico { background: #fbf3e2; color: #8a5a10; }
.sev-informativa .al-ico { background: #e8eef6; color: var(--info); }
.al-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.al-etq { font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #eef2f4; color: #475569; }
.al-etq.sev-critica { background: #fdecec; color: var(--bad); }
.al-etq.sev-atencion { background: #fbf3e2; color: #8a5a10; }
.al-etq.sev-informativa { background: #e8eef6; color: var(--info); }
.al-detalle, .al-meta, .al-accion { margin: 4px 0 0; font-size: .88rem; }
.al-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .8rem; }
.al-meta:empty { display: none; }
.al-accion { color: var(--muted); }
.al-btn { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.al-vacio { text-align: center; padding: 28px 16px; color: var(--ok); }
.al-vacio h2 { margin: 6px 0 2px; }
@media (max-width: 720px) {
  .al-card { grid-template-columns: auto 1fr; }
  .al-btn { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
.dash-atencion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--radius); }
.dash-atencion.hay-critica { border-left-color: var(--bad); }
.dash-atencion.hay-atencion { border-left-color: var(--warn); }
.dash-atencion h2 { margin: 0; font-size: .92rem; }
.dash-atencion ul { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.dash-atencion ul b { color: var(--ink); }
.dash-atencion .btn { margin-left: auto; }

/* ---- Ficha de empleado ---- */
.fi-cab { display: grid; gap: 12px; margin-bottom: 12px; }
.fi-id { display: flex; align-items: center; gap: 12px; }
.fi-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.2rem; flex: none; }
.fi-nombre { margin: 0; font-size: 1.2rem; }
.fi-sub { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fi-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 0; }
.fi-datos dt, .fi-lista dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.fi-datos dd, .fi-lista dd { margin: 2px 0 0; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.fi-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fi-mas { position: relative; }
.fi-mas summary { list-style: none; cursor: pointer; }
.fi-mas summary::-webkit-details-marker { display: none; }
.fi-mas-menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(23, 37, 43, .12); padding: 4px; }
.fi-mas-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--bad); text-decoration: none; font-size: .9rem; }
.fi-mas-menu a:hover { background: #fdecec; }
.fi-kpis { margin-bottom: 12px; }
.fi-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 1100px) { .fi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fi-lista { display: grid; gap: 10px; margin: 8px 0; }
.fi-semana { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 8px 0; }
.fi-dia { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f0f7f3; font-size: .85rem; min-width: 0; }
.fi-dia.descanso { background: #f1f3f5; color: var(--muted); }
.fi-dia b { flex: 0 0 38px; font-size: .85rem; }
.fi-dia small { color: var(--muted); }
.fi-enlace { margin: 8px 0 0; font-size: .88rem; }
.fi-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fi-hist li { display: grid; gap: 1px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.fi-hist small { color: var(--muted); }

.fi-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fi-inline input { flex: 1 1 180px; }
.fi-nueva { margin-top: 10px; }
.fi-nueva summary { cursor: pointer; list-style: none; display: inline-block; }
.fi-nueva form { margin-top: 10px; }
.fi-h3 { font-size: .9rem; margin: 14px 0 6px; }

.fila-anulada td { color: var(--muted); text-decoration: line-through; }
.fila-anulada td:last-child, .fila-anulada td:nth-child(3), .fila-anulada td:nth-child(4) { text-decoration: none; }
.chip.falta { background: #fdecec; color: var(--bad); }

/* ---- Pantalla Hoy ---- */
.hoy-tabla tbody tr { cursor: pointer; }
.hoy-tabla tbody tr:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.hoy-tabla tbody tr[hidden] { display: none; }
.estado.hoy-ok { color: var(--ok); background: #e7f6ef; }
.estado.hoy-info { color: var(--info); background: #e8eef6; }
.estado.hoy-sal { color: #475569; background: #eef2f4; }
.estado.hoy-warn { color: #8a5a10; background: #fbf3e2; }
.estado.hoy-bad { color: var(--bad); background: #fdecec; }
.estado.hoy-neutro { color: var(--muted); background: #f1f3f5; }
.hoy-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; width: min(520px, 94vw); max-height: 88vh; overflow: auto; box-shadow: 0 12px 40px rgba(23, 37, 43, .25); }
.hoy-dialog::backdrop { background: rgba(23, 37, 43, .45); }
.hoy-dialog h2 { margin: 0 0 2px; }
.hoy-cerrar { float: right; }
@media (max-width: 720px) { .hoy-tabla th:nth-child(2), .hoy-tabla td:nth-child(2), .hoy-tabla th:nth-child(5), .hoy-tabla td:nth-child(5) { display: none; } }

/* ---- Asistente de cierre semanal ---- */
.asistente-cierre { margin: 0 0 14px; }
.asi-cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.asi-resumen { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.asi-pasos { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.asi-paso { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; background: #fff; }
.asi-paso.asi-listo { border-left-color: var(--ok); }
.asi-paso.asi-atencion { border-left-color: var(--warn); background: #fffaf0; }
.asi-paso.asi-pendiente { border-left-color: var(--info); }
.asi-paso.asi-bloqueado { border-left-color: #9aa6b2; background: #f6f7f8; color: var(--muted); }
.asi-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #eef2f4; font-weight: 700; flex: none; }
.asi-listo .asi-n { background: #e7f6ef; color: var(--ok); }
.asi-atencion .asi-n { background: #fbe8c8; color: #8a4b12; }
.asi-titulo { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.asi-etq { font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: 1px 7px; border-radius: 999px; background: #eef2f4; color: #475569; }
.asi-etq-listo { background: #e7f6ef; color: var(--ok); }
.asi-etq-atencion { background: #fbe8c8; color: #8a4b12; }
.asi-etq-pendiente { background: #e8eef6; color: var(--info); }
.asi-det { margin: 4px 0; padding-left: 16px; font-size: .82rem; }
.asi-enlace { font-size: .82rem; }
.asi-falta { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.asi-lista { margin: 4px 0 0; padding-left: 18px; }
.asi-lista ul { margin: 2px 0 6px; padding-left: 16px; font-size: .88rem; }
