/* Checador — sistema visual
   Pizarra verde para la estructura, pino para acciones, ámbar para retardos y pendientes.
   Una sola familia (Hanken Grotesk) con cifras tabulares para horas. */

:root {
  --ink-900: #17313A;
  --ink-800: #1E3E48;
  --ink-700: #2A4F5A;
  --ink-300: #9DB4B9;

  --bg: #F2F5F4;
  --surface: #FFFFFF;
  --surface-2: #F7F9F8;
  --line: #DCE3E1;
  --line-strong: #C3CECB;

  --text: #1B2B30;
  --text-2: #43565C;
  --muted: #687A7F;

  --pine: #136E57;
  --pine-rgb: 19, 110, 87;
  --pine-hover: #0F5C49;
  --pine-chart: #13866A;
  --pine-50: #E5F1ED;
  --pine-100: #CFE6DE;

  --amber: #9A6408;
  --amber-chart: #D9962B;
  --amber-50: #FBF1DD;
  --red: #A93D33;
  --red-50: #F8E6E3;
  --steel: #2F5D8A;
  --steel-50: #E6EDF5;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;

  --sh-1: 0 1px 2px rgba(23, 49, 58, .06);
  --sh-2: 0 1px 2px rgba(23, 49, 58, .05), 0 8px 22px -12px rgba(23, 49, 58, .18);
  --sh-3: 0 2px 6px rgba(23, 49, 58, .08), 0 24px 48px -20px rgba(23, 49, 58, .35);

  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 256px;
  --focus: 0 0 0 3px rgba(var(--pine-rgb), .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.ico { width: 18px; height: 18px; stroke-width: 1.9; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.upper { text-transform: uppercase; }
.tnum, .num { font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.text-danger { color: var(--red); }
.text-warn { color: var(--amber); }
.link { color: var(--pine); font-weight: 600; text-decoration: none; font-size: 14px; }
.link:hover { text-decoration: underline; }
.strong-link { font-weight: 600; text-decoration: none; }
.strong-link:hover { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }

/* ── Estructura ─────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--ink-900); color: #E5EEEF;
  display: flex; flex-direction: column; z-index: 40;
}
.sidebar__brand { display: flex; gap: 12px; align-items: center; padding: 20px 20px 18px; }
.sidebar__brand strong { display: block; font-size: 15px; line-height: 1.2; color: #fff; }
.sidebar__brand small { color: var(--ink-300); font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.nav__group { margin: 18px 10px 6px; font-size: 12px; color: var(--ink-300); font-weight: 600; }
.nav__link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0;
  border-radius: var(--r-sm); text-decoration: none; color: #CFDCDE; font-weight: 500; font-size: 14.5px;
}
.nav__link:hover { background: var(--ink-800); color: #fff; }
.nav__link.is-active { background: #24505B; color: #fff; box-shadow: inset 3px 0 0 #5FC3A4; }
.nav__link .ico { opacity: .85; }
.nav__count {
  margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px;
  background: #E3A43A; color: #2B1C02; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px;
}
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__who { flex: 1; min-width: 0; }
.sidebar__who strong { display: block; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__who small { color: var(--ink-300); font-size: 12px; }
.sidebar .menu summary { color: #CFDCDE; }

.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 32px; background: rgba(242, 245, 244, .9); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck { border-bottom-color: var(--line); }
.topbar .topbar__menu { display: none; }
.topbar__title { flex: 1; min-width: 0; }
.topbar__title h1 { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; text-decoration: none; margin-left: -4px; }
.crumb:hover { color: var(--pine); }
.crumb .ico { width: 16px; height: 16px; }
.topbar__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.today { color: var(--text-2); font-weight: 500; }
.main { padding: 8px 32px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1480px; width: 100%; }
.scrim { display: none; }

/* ── Paneles ───────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.panel__head h2 { font-size: 16px; font-weight: 700; }
.panel__head + .panel__head { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.panel__body { padding: 14px 20px 20px; }
.panel__foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.panel--danger { border-color: #EBCFCB; }
.panel > .list { padding: 6px 0 8px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.layout-2--map { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.layout-even { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.narrow { max-width: 480px; margin: 24px auto; width: 100%; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.grid { display: grid; gap: 14px 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── Botones ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn .ico { width: 17px; height: 17px; }
.btn--primary { background: var(--pine); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.btn--primary:hover { background: var(--pine-hover); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--pine); color: var(--pine); }
.btn--quiet { background: var(--pine-50); color: var(--pine); }
.btn--quiet:hover { background: var(--pine-100); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #8F322A; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn--lg { height: 46px; font-size: 15px; }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 0; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--pine); }
.icon-btn.is-disabled { opacity: .3; }
form[data-confirm], .row-actions form { display: inline; }

/* ── Formularios ───────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form.grid { display: grid; }
.form--sections { gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span:first-child, .field legend { font-size: 13px; font-weight: 600; color: var(--text-2); }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file])), select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine); box-shadow: var(--focus); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=file] { font-size: 13px; }
input[type=range] { accent-color: var(--pine); width: 100%; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687A7F' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px !important; }
.field__hint { color: var(--muted); font-size: 12.5px; }
.field__error { color: var(--red); font-size: 12.5px; font-weight: 500; }
.field-note { align-self: center; font-size: 13px; }
.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 44px !important; }
.field__pw .icon-btn { position: absolute; right: 3px; top: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pine); flex: none; }
.check[hidden] { display: none; }
.check--card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.check--card strong { display: block; font-size: 14px; }
.check--card small { color: var(--muted); font-size: 13px; }
.check--card:has(input:checked) { border-color: var(--pine-100); background: var(--pine-50); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.inline-form { display: flex; gap: 8px; padding: 14px 20px; flex-wrap: wrap; }
.inline-form input, .inline-form select { flex: 1; min-width: 140px; height: 34px !important; }
.inline-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-edit input, .inline-edit select { height: 32px !important; max-width: 220px; border-color: transparent !important; background: transparent !important; padding-left: 6px !important; }
.inline-edit input:hover, .inline-edit select:hover { border-color: var(--line) !important; }
.inline-edit input:focus, .inline-edit select:focus { border-color: var(--pine) !important; background: var(--surface) !important; }
.inline-edit .btn { visibility: hidden; }
.inline-edit:focus-within .btn, .inline-edit.is-dirty .btn { visibility: visible; }

.form-photo { display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: start; }
.photo-pick { display: flex; flex-direction: column; gap: 8px; align-items: center; cursor: pointer; text-align: center; }
.photo-pick img, .photo-pick__empty { width: 120px; height: 120px; border-radius: var(--r-md); object-fit: cover; border: 1px dashed var(--line-strong); }
.photo-pick__empty { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick__label { font-size: 12.5px; color: var(--pine); font-weight: 600; }
.photo-pick:focus-within img, .photo-pick:focus-within .photo-pick__empty { box-shadow: var(--focus); }
.daypick { display: flex; gap: 6px; }
.daypick label { position: relative; }
.daypick input { position: absolute; opacity: 0; }
.daypick span { display: grid; place-items: center; width: 40px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; cursor: pointer; }
.daypick input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.daypick input:focus-visible + span { box-shadow: var(--focus); }

/* ── Filtros, tablas, paginación ───────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.filters--bare { border: 0; padding: 0; }
.filters .field--search { position: relative; flex: 1 1 240px; }
.filters .field--search .ico { position: absolute; left: 11px; top: 11px; color: var(--muted); }
.filters .field--search input { padding-left: 36px; }
.filters .field--inline { flex-direction: row; align-items: center; gap: 8px; }
.filters .field--inline > span:first-child:not(.sr-only) { white-space: nowrap; }
.filters input, .filters select { height: 38px !important; }
.filters select { width: auto; max-width: 220px; }
.filters-note { padding: 10px 16px; background: var(--amber-50); font-size: 13px; color: #6B4A0B; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table th a { text-decoration: none; }
.table th a:hover { color: var(--pine); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFCFB; }
.table tr.is-attention { background: #FFFBF2; }
.table tr.is-muted td { color: var(--muted); }
.table--compact td { padding: 8px 14px; }
.table th.num { text-align: right; }
.row-actions { text-align: right; white-space: nowrap; }
.cell-notes { max-width: 340px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager__info { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager__pages { display: flex; gap: 4px; }
.pager__pages a, .pager__pages span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: var(--r-sm); text-decoration: none; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pager__pages a:hover { background: var(--surface-2); color: var(--pine); }
.pager__pages .is-current { background: var(--ink-900); color: #fff; font-weight: 600; }
.pager__gap { color: var(--muted); }

/* ── Piezas ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--pine-50); color: var(--pine); }
.badge--warn { background: var(--amber-50); color: var(--amber); }
.badge--bad { background: var(--red-50); color: var(--red); }
.badge--info { background: var(--steel-50); color: var(--steel); }
.badge--muted { background: #EDF1F0; color: var(--text-2); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pine-50); color: var(--pine); font-weight: 700; font-size: 13px; flex: none; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; background: #2D5965; color: #fff; }
.person { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.person strong { display: block; }
.person small { display: block; font-size: 12.5px; }
.person:hover strong { color: var(--pine); }
.thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-2); }
.thumb--lg { width: 52px; height: 52px; }
.thumb--empty { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line-strong); }
.file-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--pine-chart); }
.dot--warn { background: var(--amber-chart); }
.dot--bad { background: var(--red); }
.dot--info { background: var(--steel); }
.dot--muted { background: var(--line-strong); }
.punch-type { display: inline-block; font-size: 12px; font-weight: 700; margin-right: 6px; padding: 1px 7px; border-radius: 4px; }
.punch-type--in { background: var(--pine-50); color: var(--pine); }
.punch-type--out { background: var(--steel-50); color: var(--steel); }
.punch-type--break_out, .punch-type--break_in { background: var(--surface-2); color: var(--ink-700); box-shadow: inset 0 0 0 1px var(--line); }
.weekdays { display: inline-flex; gap: 3px; }
.weekdays span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: #EDF1F0; color: #9AA8AC; }
.weekdays span.is-on { background: var(--ink-900); color: #fff; }
.date-chip { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.1; }
.date-chip strong { font-size: 17px; color: var(--text); }

.list { list-style: none; margin: 0; padding: 0; }
.list__row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }
.list__row:first-child { border-top: 0; }
.list__row.is-muted { opacity: .6; }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list__main small { font-size: 12.5px; }
.list__main.inline-edit { flex-direction: row; }
.list__main .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__row > form, .list__row > .btn { flex-shrink: 0; }
.kv { display: grid; gap: 12px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv--2 { grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.kv--2 > div { grid-template-columns: 1fr; gap: 2px; }
.kv--2 dt { font-size: 12.5px; }
.notes { border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.quote { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--amber-chart); background: var(--amber-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.disclosure { border-top: 1px solid var(--line); }
.disclosure > summary { display: flex; align-items: center; gap: 8px; padding: 12px 20px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--pine); list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: var(--surface-2); }
.disclosure > form, .disclosure > div { padding: 4px 20px 20px; }
.disclosure--table { border: 0; margin-top: 8px; }
.disclosure--table > summary { padding: 6px 0; font-size: 13px; }
.disclosure--table > div { padding: 0; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; border: 1px solid; }
.alert .ico { margin-top: 1px; }
.alert--success { background: var(--pine-50); border-color: var(--pine-100); color: #0D4F3E; }
.alert--error { background: var(--red-50); border-color: #EECBC6; color: #7D2A22; }
.alert--warning { background: var(--amber-50); border-color: #F0DDB4; color: #6B4A0B; }
.alert--info { background: var(--steel-50); border-color: #CEDBEA; color: #224768; }
.alert a { font-weight: 600; }
.alert.is-hiding { opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; }

.creds { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: var(--r-md); background: var(--ink-900); color: #E5EEEF; box-shadow: var(--sh-2); flex-wrap: wrap; }
.creds h2 { font-size: 16px; color: #fff; }
.creds p { color: var(--ink-300); font-size: 13px; margin-top: 2px; }
.creds dl { display: flex; gap: 32px; margin: 12px 0 0; flex-wrap: wrap; }
.creds dt { font-size: 12px; color: var(--ink-300); }
.creds dd { margin: 0; font-size: 16px; font-weight: 600; color: #fff; user-select: all; }
.creds__pass { font-variant-numeric: tabular-nums; letter-spacing: .06em; font-size: 20px !important; }
.creds__token { font-family: ui-monospace, Consolas, monospace; font-size: 13px !important; word-break: break-all; max-width: 44ch; }
.creds .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

.callout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--amber-50); border: 1px solid #F0DDB4; color: #5E400A; text-decoration: none; font-size: 14px; }
.callout:hover { border-color: var(--amber-chart); }
.callout__go { margin-left: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.empty { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h2 { font-size: 17px; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.empty--page { min-height: 50vh; justify-content: center; }
.empty__code { font-size: 64px; font-weight: 800; color: var(--line-strong); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs__item { padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__item:hover { color: var(--text); }
.tabs__item.is-active { color: var(--pine); border-bottom-color: var(--pine); }
.tabs__count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber-50); color: var(--amber); font-size: 12px; text-align: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text-2); }
.chip:hover { border-color: var(--pine); color: var(--pine); }
.chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.report-head { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: -8px; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: rgba(255,255,255,.08); }
.menu__panel { position: absolute; bottom: calc(100% + 6px); right: 0; min-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-3); padding: 6px; z-index: 60; }
.menu--down .menu__panel { bottom: auto; top: calc(100% + 6px); }
.menu__panel a, .menu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; cursor: pointer; text-align: left; }
.menu__panel a:hover, .menu__panel button:hover { background: var(--surface-2); color: var(--pine); }

.dialog { border: 0; padding: 0; border-radius: var(--r-md); box-shadow: var(--sh-3); width: min(520px, calc(100vw - 32px)); background: var(--surface); }
.dialog::backdrop { background: rgba(16, 33, 39, .45); }
.dialog__inner { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog__title { font-size: 18px; }
.dialog__text { color: var(--text-2); font-size: 14px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ── Panel de inicio ──────────────────────────────────── */
.today-board { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); overflow: hidden; }
.today-board__main { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #FBFDFC, var(--surface)); }
.today-board__label { font-weight: 600; color: var(--text-2); font-size: 14px; }
.today-board__figure { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.today-board__figure strong { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.today-board__figure span { color: var(--muted); font-size: 15px; }
.today-board__main p.muted { font-size: 13px; }
.today-board__cell { padding: 22px 20px; border-left: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; gap: 4px; justify-content: flex-end; }
.today-board__cell strong { font-size: 34px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.1; }
.today-board__cell > span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13.5px; }
.today-board__cell:hover { background: var(--surface-2); }
.meter { height: 8px; border-radius: 4px; background: #E7ECEB; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--pine-chart); border-radius: 4px; }

.todo { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.todo__item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); text-decoration: none; font-size: 14px; }
.todo__item > .ico:first-child { color: var(--amber); }
.todo__item:hover { background: #FFFCF5; }
.todo__go { margin-left: auto; color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dash-grid__wide { grid-column: 1 / -1; }
.chart-box { position: relative; height: 260px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bars__label { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 8px; }
.bars__track { height: 8px; background: #EDF1F0; border-radius: 4px; overflow: hidden; }
.bars__track span { display: block; height: 100%; background: var(--pine-chart); border-radius: 4px; }
.feed { list-style: none; margin: 0; padding: 4px 0 8px; }
.feed__row { display: flex; align-items: center; gap: 12px; padding: 8px 20px; text-decoration: none; }
.feed__row:hover { background: var(--surface-2); }
.feed__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feed__main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__main small { font-size: 12.5px; }
.feed__time { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.stat { background: var(--surface); padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat__label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat__value { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stats--compact .stat__value { font-size: 24px; }
.rate { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.rate__bar { width: 64px; height: 6px; background: #EDF1F0; border-radius: 3px; overflow: hidden; }
.rate__bar span { display: block; height: 100%; background: var(--pine-chart); }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.report-card { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; box-shadow: var(--sh-1); transition: border-color .15s; }
.report-card:hover { border-color: var(--pine); }
.report-card__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--pine-50); color: var(--pine); flex: none; }
.report-card__body { display: flex; flex-direction: column; gap: 3px; }
.report-card__body span { color: var(--text-2); font-size: 13.5px; }

/* ── Expediente ─────────────────────────────────────────── */
.profile { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); }
.profile__photo { width: 88px; height: 88px; border-radius: var(--r-md); object-fit: cover; }
.profile__photo--empty { display: grid; place-items: center; background: var(--ink-900); color: #fff; font-size: 28px; font-weight: 700; }
.profile__meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.profile__name { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0; }
.profile__facts { display: flex; gap: 28px; margin: 0; }
.profile__facts dt { font-size: 12.5px; color: var(--muted); }
.profile__facts dd { margin: 0; font-weight: 600; }

/* ── Evidencia de registro ──────────────────────────────── */
.evidence { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.evidence__photo { position: relative; overflow: hidden; background: #0F2328; min-height: 340px; display: grid; place-items: center; }
.evidence__photo > img { width: 100%; height: 100%; max-height: 460px; object-fit: contain; }
.evidence__photo .empty { color: #C9D6D8; }
.evidence__ref { position: absolute; right: 12px; bottom: 12px; margin: 0; background: var(--surface); padding: 4px; border-radius: var(--r-sm); box-shadow: var(--sh-3); }
.evidence__ref img { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; }
.evidence__ref figcaption { font-size: 11px; color: var(--muted); text-align: center; padding-top: 2px; }
.evidence__map { overflow: hidden; }
.map { height: 100%; min-height: 340px; border-radius: inherit; z-index: 1; }
.map--picker { min-height: 320px; border-radius: var(--r-sm); border: 1px solid var(--line); margin-top: 12px; }
.timeline { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.timeline a { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; }
.timeline a:hover { background: var(--surface-2); }
.timeline .is-current a { background: var(--pine-50); font-weight: 600; }
.timeline .is-struck span:first-child { text-decoration: line-through; color: var(--muted); }
.request__actions input { flex: 1; height: 36px !important; }
.request__actions { flex-wrap: wrap; }

/* ── Acceso ─────────────────────────────────────────────── */
.auth-body { background: var(--bg); min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login__aside { background: var(--ink-900); color: #E5EEEF; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login__aside::after { content: ""; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 0 0 60px rgba(255,255,255,.015), 0 0 0 120px rgba(255,255,255,.012); }
.login__brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 18px; color: #fff; }
.login__brand--dark { color: var(--text); display: none; margin-bottom: 24px; }
.login__logo { height: auto; max-width: 100%; }
.clockface { max-width: 440px; position: relative; z-index: 1; }
.clockface__date { color: var(--ink-300); font-size: 16px; font-weight: 500; }
.clockface__time { font-size: clamp(72px, 9vw, 120px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; color: #fff; margin: 6px 0 22px; }
.clockface__perf { height: 1px; background-image: linear-gradient(90deg, rgba(255,255,255,.28) 50%, transparent 50%); background-size: 10px 1px; margin-bottom: 22px; }
.clockface__note { color: #BCCDD0; font-size: 16px; max-width: 34ch; line-height: 1.55; }
.login__form { display: grid; place-items: center; padding: 40px 24px; }
.login__box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.login__box h1 { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.login__help { font-size: 13px; color: var(--muted); }
.login__remember { margin: 2px 0 4px; color: var(--muted); }
.install { max-width: 900px; margin: 0 auto; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.install__title { font-size: 28px; }
.checklist { list-style: none; margin: 0; padding: 14px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 14px; }
.checklist .is-ok { color: var(--pine); }
.checklist .is-bad { color: var(--red); font-weight: 600; }

/* ── Vista móvil del empleado ──────────────────────────── */
body.mobile { background: var(--bg); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.m-head { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--ink-900); color: #fff; }
.m-head small { display: block; color: var(--ink-300); font-size: 12px; }
.m-head strong { font-size: 15px; }
.m-head__avatar { width: 36px !important; height: 36px !important; border-radius: 50% !important; background: #2D5965; font-weight: 700; font-size: 13px; }
.m-main { max-width: 520px; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.m-main > .alert { margin-top: 12px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 30; }
.tabbar__item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 10px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.tabbar__item .ico { width: 22px; height: 22px; }
.tabbar__item.is-active { color: var(--pine); }

.clock { background: var(--ink-900); color: #fff; margin: 0 -16px; padding: 4px 20px 26px; text-align: center; border-radius: 0 0 28px 28px; }
.clock__date { color: var(--ink-300); font-size: 14px; font-weight: 500; }
.clock__time { font-size: 76px; font-weight: 800; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.clock__time small { font-size: 26px; font-weight: 600; color: var(--ink-300); letter-spacing: 0; margin-left: 2px; }
.clock__shift { margin-top: 10px; display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: #D5E2E4; font-size: 13px; }

.checkin { margin-top: -6px; display: flex; flex-direction: column; gap: 12px; }
.viewfinder { position: relative; aspect-ratio: 4 / 5; max-height: 54vh; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #0E2025; box-shadow: var(--sh-3); }
.viewfinder video, .viewfinder [data-still] { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.viewfinder [data-still] { position: absolute; inset: 0; }
.viewfinder__corners { position: absolute; inset: 16px; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) top left / 26px 3px, linear-gradient(#fff, #fff) top left / 3px 26px,
    linear-gradient(#fff, #fff) top right / 26px 3px, linear-gradient(#fff, #fff) top right / 3px 26px,
    linear-gradient(#fff, #fff) bottom left / 26px 3px, linear-gradient(#fff, #fff) bottom left / 3px 26px,
    linear-gradient(#fff, #fff) bottom right / 26px 3px, linear-gradient(#fff, #fff) bottom right / 3px 26px;
  background-repeat: no-repeat; opacity: .85; border-radius: 6px; }
.viewfinder__msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #C9D6D8; font-size: 14px; text-align: center; padding: 24px; }
.viewfinder__msg .ico { width: 30px; height: 30px; }
.viewfinder.is-live .viewfinder__msg { display: none; }
.viewfinder.is-flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: flash .35s ease-out forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.geo-chip { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: rgba(14, 32, 37, .78); backdrop-filter: blur(6px); color: #fff; font-size: 13.5px; font-weight: 500; }
.geo-chip[data-state="ok"] .ico { color: #6FD3B2; }
.geo-chip[data-state="warn"] .ico { color: #F2BE5C; }
.geo-chip[data-state="error"] .ico { color: #F08A7F; }
.file-fallback { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-weight: 600; color: var(--pine); cursor: pointer; }
.file-fallback input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.punch-btn { height: 60px; border: 0; border-radius: 16px; font-size: 18px; font-weight: 700; color: #fff; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.12), 0 12px 24px -12px rgba(var(--pine-rgb), .7); display: flex; align-items: center; justify-content: center; gap: 10px; }
.punch-btn--in { background: var(--pine); }
.punch-btn--out { background: var(--steel); box-shadow: 0 2px 0 rgba(0,0,0,.12), 0 12px 24px -12px rgba(47, 93, 138, .7); }
.punch-btn--break_out, .punch-btn--break_in { background: var(--ink-700); box-shadow: 0 2px 0 rgba(0,0,0,.12), 0 12px 24px -12px rgba(23, 49, 58, .7); }
.punch-actions { display: flex; flex-direction: column; gap: 10px; }
.punch-btn--secondary { height: 48px; font-size: 16px; }
.checkin__break { text-align: center; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-700); }
.checkin__break strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 2px; }
.punch-btn:disabled { background: #A9B7B9; box-shadow: none; cursor: not-allowed; }
.punch-btn.is-busy span::after { content: ""; display: inline-block; width: 16px; height: 16px; margin-left: 10px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.checkin__hint { text-align: center; font-size: 13px; color: var(--muted); }
.checkin__error { padding: 10px 14px; border-radius: var(--r-sm); background: var(--red-50); color: #7D2A22; font-size: 14px; }

.ticket { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; background: #FFFEFB; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(10, 25, 30, .55), 0 0 0 100vmax rgba(14, 32, 37, .5); padding: 20px 20px 16px; z-index: 50; animation: print .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes print { from { transform: translateY(30px); opacity: 0; } }
.ticket__head { display: flex; justify-content: space-between; align-items: center; }
.ticket__type { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 4px; color: #fff; background: var(--pine); }
.ticket.is-out .ticket__type { background: var(--steel); }
.ticket.is-break .ticket__type { background: var(--ink-700); }
.ticket__folio { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket__time { font-size: 64px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 14px; }
.ticket__date { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.ticket__perf { position: relative; height: 0; border-top: 2px dashed var(--line-strong); margin: 18px -20px; }
.ticket__perf::before, .ticket__perf::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: rgba(14, 32, 37, .5); }
.ticket__perf::before { left: -10px; }
.ticket__perf::after { right: -10px; }
.ticket__rows { margin: 0 0 14px; display: grid; gap: 8px; }
.ticket__rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ticket__rows dt { color: var(--muted); }
.ticket__rows dd { margin: 0; font-weight: 600; text-align: right; }
.ticket__note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--amber-50); color: #6B4A0B; font-size: 13.5px; margin-bottom: 14px; }

.day-log { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.day-log h2 { font-size: 15px; margin-bottom: 8px; }
.day-log__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.day-log__item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.day-log__item:first-child { border-top: 0; }
.day-log__label { font-weight: 700; min-width: 64px; }
.day-log__item--in .day-log__label { color: var(--pine); }
.day-log__item--out .day-log__label { color: var(--steel); }
.day-log__item--break_out .day-log__label, .day-log__item--break_in .day-log__label { color: var(--ink-700); }
.day-log__item time { font-weight: 700; font-size: 16px; }

.m-title { font-size: 20px; margin-top: 16px; }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.m-card.disclosure > summary { padding: 0; }
.m-card.disclosure > form { padding: 14px 0 0; }
.m-card__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.m-empty { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; gap: 12px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.month-nav h1 { font-size: 19px; }
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.m-stats div { padding: 12px; text-align: center; display: flex; flex-direction: column; }
.m-stats div + div { border-left: 1px solid var(--line); }
.m-stats strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.m-stats span { font-size: 12px; color: var(--muted); }
.m-days { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.m-day { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.m-day:first-child { border-top: 0; }
.m-day__date { width: 40px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.m-day__date strong { font-size: 20px; }
.m-day__date span { font-size: 12px; color: var(--muted); }
.m-day__body { flex: 1; min-width: 0; font-size: 14px; }
.m-day__punches { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.is-struck { text-decoration: line-through; }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .today-board { grid-template-columns: repeat(4, 1fr); }
  .today-board__main { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .today-board__cell:nth-child(2) { border-left: 0; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 320px; }
  .profile { grid-template-columns: auto 1fr; }
  .profile__facts { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sh-3); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(16, 33, 39, .4); z-index: 35; }
  .shell { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .topbar .topbar__menu { display: inline-grid; }
  .main { padding: 8px 16px 40px; }
  .layout-2, .layout-2--map, .layout-even, .evidence { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__aside { display: none; }
  .login__brand--dark { display: flex; }
}
@media (max-width: 720px) {
  .topbar__title h1 { font-size: 18px; }
  .topbar__actions .btn { padding: 0 11px; }
  .dash-grid { grid-template-columns: 1fr; }
  .today-board { grid-template-columns: 1fr 1fr; }
  .today-board__cell:nth-child(4) { border-left: 0; }
  .today-board__cell { border-top: 1px solid var(--line); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .form-photo { grid-template-columns: 1fr; justify-items: center; }
  .form-photo .grid { width: 100%; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
  .kv--2 { grid-template-columns: 1fr; }
  .filters select { max-width: none; flex: 1 1 45%; }
  .filters .field--inline { flex: 1 1 45%; }
  .profile { grid-template-columns: 1fr; text-align: left; }
  .profile__facts { flex-wrap: wrap; gap: 16px; }
  .cards { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .table th:first-child, .table td:first-child { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar__actions, .filters, .pager, .btn, .topbar__menu { display: none !important; }
  .shell { margin: 0; }
  .panel { box-shadow: none; }
  body { background: #fff; }
}

/* Ajustes de especificidad */
.filters .field--search input[type=search] { padding-left: 36px; }
.panel--danger .form { margin-top: 12px; }
[hidden] { display: none !important; }
.viewfinder { aspect-ratio: auto; height: clamp(240px, 40vh, 420px); max-height: none; }
.clock { padding-bottom: 20px; }
.clock__time { font-size: 64px; }

/* ════════════════════════════════════════════════════════════════
   Tarjetas
   Lienzo gris verdoso, tarjetas blancas separadas y redondeadas, iconos
   en cuadros de color y una tarjeta principal en pino. El vidrio queda
   para lo que flota sobre la página (modales, menús, barra móvil).
   ════════════════════════════════════════════════════════════════ */
:root {
  --bg: #E9EFED;
  --line: rgba(23, 49, 58, .09);
  --line-strong: rgba(23, 49, 58, .18);
  --surface-2: #F5F8F7;
  --r-card: 18px;
  --sh-card: 0 1px 2px rgba(23, 49, 58, .05), 0 4px 10px -6px rgba(23, 49, 58, .08), 0 18px 36px -20px rgba(23, 49, 58, .22);
  --sh-card-hover: 0 1px 2px rgba(23, 49, 58, .06), 0 8px 16px -8px rgba(23, 49, 58, .12), 0 24px 44px -20px rgba(23, 49, 58, .30);
  --glass: rgba(255, 255, 255, .56);
  --glass-strong: rgba(248, 251, 250, .78);
  --glass-edge: rgba(255, 255, 255, .66);
  --glass-blur: blur(24px) saturate(185%);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(255, 255, 255, .25);
  --glass-drop: 0 1px 2px rgba(23, 49, 58, .05), 0 14px 34px -16px rgba(23, 49, 58, .30);
  --glass-sheen: radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 46%);
}

body.app, body.mobile, body.auth-body { background: var(--bg); }

/* Tarjetas */
:is(.panel, .stats, .today-board__cell, .profile, .report-card, .todo, .day-log, .m-card, .m-stats, .m-days, .login__box) {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(23, 49, 58, .05);
  box-shadow: var(--sh-card);
}
/* Borde especular solo en lo que flota */
:is(.modal, .tabbar)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .15) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .55) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.panel, .stats, .todo, .report-card, .profile { border-radius: var(--r-card); }
.panel__head { padding: 20px 22px 0; }
.panel__head h2 { font-size: 16.5px; }
.panel__body { padding: 16px 22px 22px; }
.panel__foot { background: var(--surface-2); border-radius: 0 0 var(--r-card) var(--r-card); }
.panel--flush { overflow: hidden; }
.panel--danger { border-color: rgba(169, 61, 51, .22); }
.main { gap: 22px; }
.dash-grid { gap: 22px; }

/* Divisiones internas */
.stats, .todo { gap: 0; background: var(--surface); overflow: hidden; }
.stat, .todo__item { background: transparent; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.todo__item:hover { background: #FFFCF5; }
.feed__row:hover, .disclosure > summary:hover { background: var(--surface-2); }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-attention { background: rgba(251, 241, 221, .55); }
.table th { background: var(--surface-2); }
.meter, .bars__track, .rate__bar { background: rgba(23, 49, 58, .08); }
.weekdays span { background: rgba(23, 49, 58, .07); }

/* Cuadro de icono */
.tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; background: var(--pine-50); color: var(--pine); }
.tile .ico { width: 20px; height: 20px; }
.tile--warn { background: var(--amber-50); color: var(--amber); }
.tile--bad { background: var(--red-50); color: var(--red); }
.tile--info { background: var(--steel-50); color: var(--steel); }
.tile--muted { background: #E8EEEE; color: var(--ink-700); }

/* Hoy: tarjeta principal en pino y una tarjeta por indicador */
.today-board { gap: 16px; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.today-board__main {
  padding: 24px 26px; border-radius: var(--r-card); color: #fff; border-bottom: 0 !important;
  background: linear-gradient(135deg, #1B8468, var(--pine) 50%, #0E5243);
  box-shadow: 0 16px 32px -18px rgba(var(--pine-rgb), .75);
}
.today-board__label { color: rgba(255, 255, 255, .82); }
.today-board__figure span, .today-board__main p.muted { color: rgba(255, 255, 255, .78); }
.today-board__main .meter { background: rgba(255, 255, 255, .2); }
.today-board__main .meter span { background: #fff; }
/* Tarjeta principal: textura de círculos difuminados y anillo de porcentaje */
.today-board__main { position: relative; overflow: hidden; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.today-board__main::before, .today-board__main::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.today-board__main::before { width: 220px; height: 220px; right: -70px; top: -90px; background: radial-gradient(circle, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%); }
.today-board__main::after { width: 160px; height: 160px; left: -50px; bottom: -80px; background: radial-gradient(circle, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%); }
.today-board__text { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.today-board__note { font-size: 13px; color: rgba(255, 255, 255, .78); }
.ring { position: relative; width: 92px; height: 92px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring__track { stroke: rgba(255, 255, 255, .2); }
.ring__value { stroke: #fff; stroke-linecap: round; }
.ring span { position: relative; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.ring strong { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* Indicadores: color por estado; el cero se apaga para que resalte lo que requiere atención */
.today-board__cell {
  --tone: var(--pine); --tone-50: var(--pine-50);
  position: relative; overflow: hidden; border-radius: var(--r-card); padding: 18px 20px; gap: 18px; justify-content: space-between;
  transition: transform .18s, box-shadow .18s;
}
.today-board__cell--warn { --tone: var(--amber); --tone-50: var(--amber-50); }
.today-board__cell--bad { --tone: var(--red); --tone-50: var(--red-50); }
.today-board__cell--info { --tone: var(--steel); --tone-50: var(--steel-50); }
.today-board__cell--muted { --tone: var(--ink-700); --tone-50: #E8EEEE; }
.today-board__cell::before { content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--tone-50), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.today-board__cell > * { position: relative; }
.today-board__cell:hover { background: var(--surface); transform: translateY(-3px); box-shadow: var(--sh-card-hover); }
.today-board .today-board__cell { border: 1px solid rgba(23, 49, 58, .05); }
.today-board__head { display: flex !important; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.today-board__head .tile { width: 36px; height: 36px; border-radius: 10px; }
.today-board__head .tile .ico { width: 18px; height: 18px; }
.today-board__value { display: flex !important; align-items: flex-end; justify-content: space-between; }
.today-board__cell .today-board__value strong { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; color: var(--tone); }
.today-board__go { color: var(--tone); opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.today-board__cell:hover .today-board__go, .today-board__cell:focus-visible .today-board__go { opacity: 1; transform: none; }
.today-board__cell.is-zero::before { display: none; }
.today-board__cell.is-zero .today-board__value strong { color: var(--muted); }
.today-board__cell.is-zero .tile { background: var(--surface-2); color: var(--muted); }

/* Encabezado del panel: saludo con resumen y festivo como etiqueta */
.topbar__sub { margin-top: 2px; color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holiday-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--amber-50); color: #6B4A0B; font-size: 14px; font-weight: 600; box-shadow: var(--sh-card); }
.holiday-chip .ico { width: 16px; height: 16px; color: var(--amber); }

/* Fecha en la barra superior */
.today { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-card); font-size: 14px; }
.today .ico { color: var(--pine); width: 16px; height: 16px; }
.topbar { background: rgba(233, 239, 237, .92); }

/* Barra lateral: la opción activa se funde con el lienzo */
.nav { padding: 20px 0 16px 14px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__link { border-radius: 12px; margin-right: 14px; padding: 9px 12px; }
.nav__link:hover { background: rgba(255, 255, 255, .07); }
.nav__link.is-active {
  position: relative; margin-right: 0; border-radius: 14px 0 0 14px;
  background: none; color: var(--ink-900); font-weight: 600; box-shadow: none;
}
.nav__link.is-active:hover { background: none; }
.nav__link.is-active > :not(.nav__pill) { position: relative; z-index: 1; }
.nav__link.is-active .ico { color: var(--pine); opacity: 1; }
.nav__pill {
  position: absolute; inset: 0; border-radius: inherit; background: var(--bg); pointer-events: none;
  view-transition-name: nav-pill;
}
.nav__pill::before, .nav__pill::after {
  content: ""; position: absolute; right: 0; width: 18px; height: 18px;
}
.nav__pill::before { top: -18px; background: radial-gradient(circle 18px at 0 0, transparent 97%, var(--bg) 100%); }
.nav__pill::after { bottom: -18px; background: radial-gradient(circle 18px at 0 100%, transparent 97%, var(--bg) 100%); }

/* Al cambiar de página solo se mueve la franja; el resto aparece sin desvanecido */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(nav-pill) { animation-duration: .32s; animation-timing-function: cubic-bezier(.3, .9, .3, 1); }
::view-transition-old(nav-pill), ::view-transition-new(nav-pill) { animation: none; }
::view-transition-old(nav-pill) { display: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
/* Títulos de sección: versalitas espaciadas con una línea que separa el grupo */
.nav__group {
  display: flex; align-items: center; gap: 10px; margin: 22px 24px 8px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #B7CACE;
}
.nav__group::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.nav__count { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 3px rgba(227, 164, 58, .18); font-variant-numeric: tabular-nums; }
.nav__count--bad { background: #E5776C; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 3px rgba(229, 119, 108, .2); }
.nav__link.is-active .nav__count { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
/* Tarjeta del usuario: un tono más clara que la barra, sin competir con la opción activa */
.sidebar__user {
  margin: 8px 12px 12px; padding: 10px 8px 10px 10px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 14px;
  background: rgba(255, 255, 255, .055); cursor: pointer; transition: background .15s, border-color .15s;
}
.sidebar__user:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .1); }
.sidebar__user .avatar { box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 3.5px #5FC3A4; }
.sidebar__user .avatar:not(.is-photo) { background: #24505B; color: #E5EEEF; }
.sidebar__role {
  display: inline-block; max-width: 100%; margin-top: 3px; padding: 1px 8px; border-radius: 999px;
  background: rgba(95, 195, 164, .14); color: #A9DCCB !important; font-size: 11px !important; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top;
}
.sidebar__user .menu > summary { width: 30px; height: 30px; border-radius: 9px; }

/* Bordes del menú al desplazarse: sombra bajo el encabezado y desvanecido sobre la tarjeta del usuario */
.sidebar__brand { position: relative; z-index: 2; }
.sidebar__brand::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: linear-gradient(rgba(8, 22, 27, .45), rgba(8, 22, 27, 0)); opacity: 0; transition: opacity .2s;
}
.sidebar.is-scrolled .sidebar__brand::after { opacity: 1; }
.sidebar__user { position: relative; }
.sidebar__user::before {
  content: ""; position: absolute; left: -12px; right: -12px; bottom: calc(100% + 9px); height: 28px; pointer-events: none;
  background: linear-gradient(rgba(23, 49, 58, 0), var(--ink-900)); opacity: 0; transition: opacity .2s;
}
.sidebar.has-more .sidebar__user::before { opacity: 1; }

/* Controles */
.btn { border-radius: 12px; transition: background-color .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 55%), var(--pine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 8px 18px -8px rgba(var(--pine-rgb), .7);
}
.btn--primary:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%), var(--pine-hover); }
.btn--danger {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), var(--red);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 8px 18px -8px rgba(169, 61, 51, .65);
}
.btn--ghost {
  background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .75);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
  backdrop-filter: blur(12px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 14px -8px rgba(23, 49, 58, .4);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .9); }
.btn--quiet { background: rgba(var(--pine-rgb), .11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn--quiet:hover { background: rgba(var(--pine-rgb), .18); }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--ghost.is-busy::after, .btn--quiet.is-busy::after { border-color: rgba(var(--pine-rgb), .3); border-top-color: var(--pine); }
.icon-btn { border-radius: 10px; }
.icon-btn:hover { background: rgba(255, 255, 255, .6); }

:where(input:not([type=checkbox], [type=radio], [type=range], [type=file])), select, textarea {
  background-color: rgba(255, 255, 255, .72); border-color: rgba(23, 49, 58, .14); border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(23, 49, 58, .05);
}
:where(input, select, textarea):focus { background-color: rgba(255, 255, 255, .95); }
.check--card { background: rgba(255, 255, 255, .4); border-color: var(--line); border-radius: 12px; }
.check--card:has(input:checked) { background: rgba(var(--pine-rgb), .09); border-color: rgba(var(--pine-rgb), .25); }
.chip { background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 #fff, 0 2px 8px -4px rgba(23, 49, 58, .3); }
.chip.is-active { background: linear-gradient(180deg, rgba(255, 255, 255, .14), transparent), var(--ink-900); border-color: var(--ink-900); }
.tabs { border-bottom-color: var(--line); }
.pager__pages .is-current { border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.pager__pages a { border-radius: 10px; }
.pager__pages a:hover { background: rgba(255, 255, 255, .6); }

.alert { border-radius: 14px; -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.alert--success { background: rgba(229, 241, 237, .78); border-color: rgba(var(--pine-rgb), .2); }
.alert--error { background: rgba(248, 230, 227, .82); border-color: rgba(169, 61, 51, .22); }
.alert--warning { background: rgba(251, 241, 221, .82); border-color: rgba(154, 100, 8, .2); }
.alert--info { background: rgba(230, 237, 245, .8); border-color: rgba(47, 93, 138, .2); }
.callout { background: var(--glass-sheen), rgba(251, 241, 221, .7); border-radius: 16px; }
.creds {
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(36, 80, 91, .92), rgba(19, 42, 50, .94));
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 20px 40px -20px rgba(10, 25, 30, .6);
}
.form-actions {
  margin-top: 4px; padding: 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), 0 10px 24px -16px rgba(23, 49, 58, .4);
}

.menu__panel {
  border-radius: 16px; border-color: var(--glass-edge);
  background: var(--glass-sheen), var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), 0 22px 44px -18px rgba(10, 25, 30, .45);
}
.menu__panel a, .menu__panel button { border-radius: 10px; }
.menu__panel a:hover, .menu__panel button:hover { background: rgba(var(--pine-rgb), .08); }

/* ── Modal de vidrio ─────────────────────────────────── */
.modal, .dialog {
  padding: 0; color: var(--text); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72); border-radius: 26px;
  background: var(--glass-sheen), rgba(244, 249, 247, .74);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  backdrop-filter: blur(40px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 44px 90px -30px rgba(10, 25, 30, .6), 0 0 0 1px rgba(23, 49, 58, .04);
}
.modal { position: fixed; width: min(580px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 40px); }
.modal[data-size="lg"] { width: min(900px, calc(100vw - 24px)); }
.modal[data-size="xl"] { width: min(1140px, calc(100vw - 24px)); }
.modal::backdrop, .dialog::backdrop {
  background: rgba(16, 33, 39, .26);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
  backdrop-filter: blur(5px) saturate(120%);
}
.modal[open], .dialog[open] { animation: glass-in .3s cubic-bezier(.2, .9, .25, 1.12); }
.modal.is-closing { animation: glass-out .16s ease-in forwards; }
@keyframes glass-in { from { opacity: 0; transform: translateY(12px) scale(.955); filter: blur(6px); } }
@keyframes glass-out { to { opacity: 0; transform: translateY(6px) scale(.97); filter: blur(4px); } }
.modal__frame { max-height: inherit; display: flex; flex-direction: column; }
.modal-doc { display: flex; flex-direction: column; max-height: calc(100dvh - 42px); min-height: 0; }
.modal-doc--loading { min-height: 220px; align-items: center; justify-content: center; }
.modal.is-loading .modal__body { opacity: .55; transition: opacity .2s; pointer-events: none; }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 26px; border-bottom: 1px solid rgba(23, 49, 58, .08); flex: none; }
.modal__title { flex: 1; min-width: 0; font-size: 19px; font-weight: 750; letter-spacing: -0.015em; }
.modal__actions { display: flex; gap: 8px; align-items: center; }
.modal__close {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .65); box-shadow: inset 0 1px 0 #fff, 0 3px 8px -3px rgba(23, 49, 58, .35);
}
.modal__body {
  overflow-y: auto; overscroll-behavior: contain; padding: 22px 26px 26px;
  display: flex; flex-direction: column; gap: 16px; container-type: inline-size;
}
.modal .panel, .modal .stats, .modal .profile {
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .7); border-radius: 16px;
}
.modal .panel::before, .modal .stats::before { display: none; }
.modal .form--sections { gap: 16px; }
.modal .form-actions {
  position: sticky; bottom: -26px; margin: 4px -26px -26px; padding: 14px 26px 18px; border-radius: 0;
  background: linear-gradient(rgba(244, 249, 247, .5), rgba(244, 249, 247, .94) 40%);
  box-shadow: 0 -1px 0 rgba(23, 49, 58, .07); justify-content: flex-end;
}
.modal .layout-2 { grid-template-columns: minmax(0, 1fr) 300px; }
.modal .evidence__photo { min-height: 300px; border-radius: 16px; }
.modal .map { min-height: 300px; }
.modal .map--picker { min-height: 280px; margin-top: 0; border-radius: 14px; }
@container (max-width: 760px) {
  .layout-2, .evidence, .grid--3 { grid-template-columns: 1fr !important; }
}
@container (max-width: 520px) {
  .grid--2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .form-photo { grid-template-columns: 1fr; justify-items: center; }
  .kv--2 { grid-template-columns: 1fr; }
}
.dialog__inner { padding: 24px 26px; }
.dialog--confirm { width: min(420px, calc(100vw - 32px)); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(var(--pine-rgb), .18); border-top-color: var(--pine); animation: spin .7s linear infinite; }

/* Mapas */
.map--overview { min-height: 460px; height: 100%; border-radius: 18px; }
.leaflet-container { font-family: var(--font); }
.map-label { background: rgba(255, 255, 255, .85); border: 0; border-radius: 8px; box-shadow: 0 4px 12px -4px rgba(23, 49, 58, .4); font-weight: 600; color: var(--text); }
.map-label::before { display: none; }
.kv--stacked > div { grid-template-columns: 1fr; gap: 2px; }

/* Acceso */
.login__form { position: relative; }
.login__box { padding: 32px 30px; border-radius: 26px; max-width: 420px; }

/* Vista móvil */
body.mobile { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.tabbar {
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 500px; margin: 0 auto;
  padding: 6px; gap: 4px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .75);
  background: var(--glass-sheen), rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  box-shadow: inset 0 1px 0 #fff, 0 20px 44px -18px rgba(10, 25, 30, .5);
}
.tabbar__item { border-radius: 22px; padding: 8px 4px 9px; transition: background-color .2s; }
.tabbar__item.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(var(--pine-rgb), .12), 0 6px 14px -8px rgba(var(--pine-rgb), .5);
}
.clock__shift { background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.viewfinder { border-radius: 26px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 50px -24px rgba(10, 25, 30, .65); }
.geo-chip { border-radius: 16px; background: rgba(14, 32, 37, .5); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.punch-btn { border-radius: 20px; background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .15), 0 16px 30px -14px rgba(var(--pine-rgb), .8); transition: transform .12s; }
.punch-btn:active:not(:disabled) { transform: scale(.98); }
.punch-btn--out { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .15), 0 16px 30px -14px rgba(47, 93, 138, .8); }
.punch-btn--break_out, .punch-btn--break_in { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .15), 0 16px 30px -14px rgba(23, 49, 58, .8); }
.punch-btn--secondary { border-radius: 16px; }
.checkin__break { border-radius: 18px; background: rgba(255, 255, 255, .55); }
.punch-btn:disabled { background-image: none; }
.file-fallback { background: rgba(255, 255, 255, .55); border-radius: 18px; }
.m-card, .m-stats, .m-days, .day-log { border-radius: 18px; }
.ticket { border-radius: 20px; }

/* Responsivo del vidrio */
@media (max-width: 640px) {
  .modal, .modal[data-size] {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh;
    border-radius: 26px 26px 0 0; border-bottom: 0;
  }
  .modal-doc { max-height: 92dvh; }
  .modal[open] { animation: sheet-in .32s cubic-bezier(.2, .9, .25, 1.05); }
  .modal.is-closing { animation: sheet-out .18s ease-in forwards; }
  .modal__head { padding: 16px 14px 12px 20px; }
  .modal__body { padding: 18px 18px 22px; }
  .modal .form-actions { margin: 4px -18px -22px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); bottom: -22px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }

/* Si el sistema pide menos transparencia o el navegador no soporta desenfoque */
@media (prefers-reduced-transparency: reduce) {
  :is(.panel, .stats, .today-board, .profile, .report-card, .todo, .day-log, .m-card, .m-stats, .m-days, .login__box, .modal, .dialog, .tabbar, .topbar, .menu__panel, .form-actions, .alert, .btn--ghost) {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #FAFCFB !important;
  }
  .sidebar { background: var(--ink-900); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .92); --glass-strong: #FAFCFB; }
  .modal, .dialog { background: #F7FAF9; }
}
@media print {
  body::before { display: none; }
  :is(.panel, .stats, .today-board, .profile) { backdrop-filter: none; background: #fff; box-shadow: none; }
}
.panel.evidence__photo, .modal .panel.evidence__photo { background: #0F2328; border-color: rgba(255, 255, 255, .12); }
/* Una cuadrícula de dos columnas con un solo elemento usa todo el ancho */
.layout-2:has(> :only-child), .layout-even:has(> :only-child) { grid-template-columns: 1fr !important; }

/* ── Barras de desplazamiento ─────────────────────────────
   Delgadas, redondeadas, sin flechas; el color sigue al fondo.
   Chrome/Edge/Safari usan ::-webkit-scrollbar; Firefox, scrollbar-color. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: 999px; border: 3px solid transparent; background-clip: padding-box;
  background-color: rgba(23, 49, 58, .22);
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(23, 49, 58, .38); }
::-webkit-scrollbar-thumb:active { background-color: rgba(var(--pine-rgb), .55); }

/* Sobre vidrio oscuro: barra clara y más discreta, visible al pasar el cursor */
.sidebar ::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .10); }
.sidebar:hover ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .24); }
.sidebar ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .38); }

/* Tablas y modal: un poco más delgadas */
.table-wrap::-webkit-scrollbar, .modal__body::-webkit-scrollbar { width: 8px; height: 8px; }

@supports (-moz-appearance: none) {
  html, .modal__body, .table-wrap { scrollbar-width: thin; scrollbar-color: rgba(23, 49, 58, .28) transparent; }
}

/* ── Checador de recepción (tableta) ─────────────────────
   Reloj a la izquierda y teclado o cámara a la derecha; en vertical se apilan. */
body.kiosk-body { min-height: 100dvh; background: var(--bg); overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
.kiosk { display: grid; grid-template-columns: minmax(280px, 38%) 1fr; min-height: 100dvh; }
.kiosk__side { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: calc(28px + env(safe-area-inset-top)) 32px 28px; background: var(--ink-900); color: #fff; }
.kiosk__company { font-size: 22px; font-weight: 800; }
.kiosk__site, .kiosk__name { display: flex; align-items: center; gap: 6px; color: var(--ink-300); font-size: 14px; margin-top: 4px; }
.kiosk__clock .clock__time { font-size: clamp(64px, 9vw, 112px); }
.kiosk__clock .clock__date { font-size: 18px; margin-top: 6px; }
.kiosk__main { display: grid; place-items: center; padding: 28px 24px; }
.kiosk-step { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
.kiosk-step[data-step="pin"] { align-items: center; text-align: center; }
.kiosk__title { font-size: 28px; font-weight: 800; color: var(--ink-900); }
.kiosk__error { padding: 10px 14px; border-radius: var(--r-sm); background: var(--red-50); color: #7D2A22; font-size: 15px; }
.pin-dots { display: flex; gap: 14px; margin: 4px 0 8px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-700); transition: background .12s, transform .12s; }
.pin-dots i.is-on { background: var(--ink-900); border-color: var(--ink-900); transform: scale(1.08); }
.kiosk.is-shake .pin-dots { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-width: 360px; }
.keypad button { height: 76px; border-radius: 20px; border: 1px solid var(--glass-edge); background: var(--glass-sheen), var(--glass-strong); box-shadow: var(--glass-rim), var(--glass-drop);
  font: inherit; font-size: 30px; font-weight: 700; color: var(--ink-900); cursor: pointer; touch-action: manipulation; display: grid; place-items: center; }
.keypad button:active { transform: scale(.96); background: var(--ink-900); color: #fff; }
.keypad .keypad__aux { font-size: 16px; font-weight: 600; color: var(--muted); }
.keypad.is-busy { opacity: .5; pointer-events: none; }
.kiosk-who { display: flex; align-items: center; gap: 14px; }
.kiosk-who > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.kiosk-who strong { font-size: 22px; color: var(--ink-900); }
.kiosk-who__avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; font-size: 20px; font-weight: 800; flex: none; }
.kiosk .viewfinder { height: clamp(240px, 46vh, 520px); }
body.kiosk-body .ticket { top: 0; bottom: 0; height: fit-content; margin: auto; max-width: 440px; }
.ticket__name { font-size: 18px; font-weight: 700; margin-top: 12px; color: var(--ink-900); }
.kiosk-off { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: var(--ink-900); color: #E5EEEF; }
.kiosk-off h1 { font-size: 24px; color: #fff; }
.kiosk-off p { max-width: 460px; color: var(--ink-300); }
@media (max-width: 820px), (orientation: portrait) {
  .kiosk { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .kiosk__side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: calc(16px + env(safe-area-inset-top)) 20px 16px; }
  .kiosk__clock { order: -1; }
  .kiosk__clock .clock__time { font-size: 56px; }
  .kiosk__name { display: none; }
}

/* Foto del expediente: subir o tomar en el momento */
.photo-col { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 132px; }
.photo-actions { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.photo-actions .btn { width: 100%; justify-content: center; height: 34px; font-size: 13px; padding: 0 10px; }
.photo-alt { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.photo-alt__img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.photo-hint { font-size: 11.5px; line-height: 1.35; color: var(--muted); text-align: center; }
/* La cámara se abre encima de todo (también del pie del modal) para que «Capturar» siempre se vea. */
.photo-cam { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); background: rgba(10, 22, 26, .92); }
.photo-cam[hidden] { display: none; }
.photo-cam__frame { position: relative; width: min(420px, 100%); }
.photo-cam video { display: block; width: 100%; aspect-ratio: 3 / 4; max-height: 68vh; object-fit: cover; border-radius: 20px; background: #12262B; transform: scaleX(-1); }
.photo-cam__guide { position: absolute; left: 50%; top: 50%; width: 62%; height: 70%; transform: translate(-50%, -52%); border-radius: 50%; border: 3px solid rgba(255,255,255,.9); pointer-events: none; }
.photo-cam__msg { position: absolute; left: 0; right: 0; top: 45%; text-align: center; font-size: 14px; color: #C9D6D8; padding: 0 16px; }
.photo-cam__title { color: #fff; font-size: 16px; font-weight: 600; text-align: center; }
.photo-cam__actions { display: flex; gap: 10px; width: min(420px, 100%); }
.photo-cam__actions .btn { flex: 1; justify-content: center; height: 52px; font-size: 16px; border-radius: 14px; }
.photo-cam__actions .btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
@media (max-width: 640px) { .photo-col { width: 100%; max-width: 260px; } }

/* Tableta: identificación sin PIN */
.kiosk-face { position: relative; width: min(260px, 70%); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; background: #12262B; box-shadow: 0 18px 40px -20px rgba(10,25,30,.6); }
.kiosk-face[hidden] { display: none; }
.kiosk-face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.kiosk-face__ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid rgba(111,211,178,.85); animation: kiosk-ring 2s ease-in-out infinite; pointer-events: none; }
.kiosk-face[data-state="bad"] .kiosk-face__ring { border-color: rgba(227,162,63,.9); animation: none; }
@keyframes kiosk-ring { 50% { border-color: rgba(111,211,178,.35); } }
.kiosk-face__msg { position: absolute; left: 0; right: 0; bottom: 14%; padding: 6px 14px; text-align: center; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.kiosk-face__msg { left: 15%; right: 15%; bottom: 12%; white-space: normal; text-wrap: balance; line-height: 1.3; text-align: center; }
.kiosk-face__or { text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; margin: 4px 0 2px; }

/* Resultado del reconocimiento facial (celular y tableta): palomita verde o X roja trazadas */
.face-result { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; color: #fff; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fr-in .18s ease-out; }
.face-result[hidden] { display: none; }
.face-result[data-state="ok"] { background: rgba(10, 120, 82, .80); }
.face-result[data-state="bad"] { background: rgba(176, 36, 44, .80); }
@keyframes fr-in { from { opacity: 0; } }
.face-result__icon { width: min(56%, 220px); height: auto; overflow: visible; filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.face-result__ring { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transform: rotate(-90deg); transform-origin: 60px 60px; animation: fr-draw .45s cubic-bezier(.65,0,.35,1) forwards; }
.face-result__mark { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; display: none; }
.face-result[data-state="ok"] .face-result__mark--ok, .face-result[data-state="bad"] .face-result__mark--bad { display: inline; animation: fr-draw .35s cubic-bezier(.65,0,.35,1) .38s forwards; }
.face-result[data-state="bad"] .face-result__icon { animation: fr-shake .42s ease-in-out .7s; }
@keyframes fr-draw { to { stroke-dashoffset: 0; } }
@keyframes fr-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.face-result__title { font-size: clamp(24px, 6vw, 34px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; text-transform: uppercase; }
.face-result__sub { font-size: clamp(15px, 3.8vw, 18px); font-weight: 500; color: rgba(255,255,255,.92); max-width: 300px; }
@media (prefers-reduced-motion: reduce) {
  .face-result, .face-result__icon { animation: none !important; }
  .face-result__ring, .face-result__mark { animation: none !important; stroke-dashoffset: 0; }
}
.kiosk-face .face-result { border-radius: 50%; gap: 4px; padding: 12%; }
.kiosk-face .face-result__icon { width: 46%; }
.kiosk-face .face-result__title { font-size: 20px; }
.kiosk-face .face-result__sub { font-size: 13px; }

/* Avisos al personal */
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: 0; }
.ann__title { margin: 0 0 4px; font-size: 16px; }
.ann__body { margin: 0 0 8px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.ann__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.ann__meta .ico { width: 14px; height: 14px; }
.ann__side { display: grid; gap: 8px; align-content: start; }
.ann__read { margin: 0; font-size: 13.5px; color: var(--muted); }
.ann__read strong { color: var(--text); font-size: 16px; }
.ann__pending summary { cursor: pointer; font-size: 13px; color: var(--pine); }
.ann__pending p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.aud { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.aud__opts { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.aud__dept, .aud__emps { display: none; }
.aud:has(input[value="department"]:checked) .aud__dept,
.aud:has(input[value="employees"]:checked) .aud__emps { display: grid; }
.aud__list { gap: 2px; max-height: 190px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.aud__list .check { padding: 6px 4px; align-items: center; }
@media (max-width: 720px) { .ann { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* Logo de la empresa */
.sidebar__logo { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 5px; border-radius: 10px; background: #fff; }
.sidebar__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kiosk__logo { display: inline-grid; place-items: center; height: 64px; max-width: 220px; padding: 8px 14px; margin-bottom: 14px; border-radius: 14px; background: #fff; }
.kiosk__logo img { max-height: 48px; max-width: 192px; object-fit: contain; }
.brand-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; align-items: start; }
.brand-form .span-2 { grid-column: 1 / -1; margin: 0; }
.brand-form__logo { display: flex; gap: 16px; align-items: flex-start; }
.brand-form__preview { flex: none; display: grid; place-items: center; align-content: center; gap: 4px; width: 132px; height: 84px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line-strong); background: repeating-conic-gradient(#F3F5F4 0 25%, #fff 0 50%) 0 0 / 14px 14px; color: var(--muted); font-size: 12px; }
.brand-form__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-form__logo .check, .brand-form__colors .check { margin-top: 8px; }
.brand-form__colors { border: 0; margin: 0; padding: 0; }
.brand-form__colors legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.swatch { position: relative; display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch input[type="radio"] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input[type="radio"]:checked) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sw, var(--text)); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 4px; }
.swatch--custom { overflow: hidden; background: conic-gradient(#E5484D, #F5A524, #46A758, #3E63DD, #8E4EC6, #E5484D); }
.swatch--custom input[type="color"] { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); border: 0; padding: 0; opacity: 0; cursor: pointer; }
.swatch--custom:has(input[type="radio"]:checked) { --sw: var(--text); }
.brand-form__actions { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .brand-form { grid-template-columns: minmax(0, 1fr); } }

/* Reporte de reconocimiento facial */
.face-advice { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.face-advice--ok { background: var(--pine-50); color: var(--pine); }
.face-advice--warn { background: #FCF1E1; color: #8A5A0E; }
.face-advice--bad { background: #FBECEC; color: #A3262E; }
.photo-review { border-color: var(--pine-100); }
.photo-review__body { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.photo-review figure { margin: 0; text-align: center; }
.photo-review img { display: block; width: 150px; height: 150px; object-fit: cover; border-radius: 12px; background: var(--line); }
.photo-review figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.photo-review__text { flex: 1; min-width: 220px; }
.photo-review__text p { margin: 0 0 12px; }

/* ── Calendario de horarios mensuales ───────────────── */
.mcal { display: grid; gap: 12px; margin: 6px 0 4px; }
.mcal__bar { display: flex; align-items: center; gap: 6px; }
.mcal__title { min-width: 150px; text-align: center; font-size: 16px; text-transform: capitalize; }
.mcal__bar .btn { margin-left: auto; }
.mcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; user-select: none; }
.mcal__dow { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 2px 0; }
.mcal__day {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 64px; padding: 6px 7px;
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: var(--surface);
  font: inherit; text-align: left; color: var(--text); cursor: pointer; touch-action: none; overflow: hidden;
}
.mcal__day:hover { border-color: var(--line-strong); }
.mcal__day:focus-visible { outline: none; box-shadow: var(--focus); }
.mcal__num { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.mcal__lbl, .mcal__hrs { max-width: 100%; font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal__lbl { font-weight: 600; }
.mcal__hrs { color: var(--text-2); font-variant-numeric: tabular-nums; }
.mcal__day.is-empty { background: transparent; border-style: dashed; border-left-width: 1px; color: var(--muted); }
.mcal__day.is-rest, .mcal__swatch.is-rest { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, #EBEFEE 6px 12px); border-left-color: var(--line-strong); color: var(--muted); }
.mcal__day.is-today .mcal__num { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.mcal__day.is-sel { box-shadow: 0 0 0 2px var(--pine); border-color: var(--pine); }
.mcal__day.is-sel::after { content: ""; position: absolute; inset: 0; background: rgba(var(--pine-rgb), .10); pointer-events: none; }
.mcal-c0 { background: var(--pine-50); border-left-color: var(--pine); }
.mcal-c1 { background: var(--steel-50); border-left-color: var(--steel); }
.mcal-c2 { background: var(--amber-50); border-left-color: var(--amber-chart); }
.mcal-c3 { background: #F1E8F3; border-left-color: #7A4B86; }
.mcal-c4 { background: var(--red-50); border-left-color: var(--red); }
.mcal-c5 { background: #E3F1F3; border-left-color: #22737F; }
.mcal-c6 { background: #EEF0DF; border-left-color: #66702A; }
.mcal-c7 { background: #ECEEF0; border-left-color: #56636B; }
.mcal__hint { margin: 0; min-height: 1.4em; }
.mcal__tools { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.mcal__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mcal__repeat { display: inline-flex; align-items: center; gap: 6px; }
.mcal__repeat input { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; font-size: 13px; background: var(--surface); }
.mcal__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.mcal__legend li { display: inline-flex; align-items: center; gap: 6px; }
.mcal__swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); border-left-width: 4px; }
@media (max-width: 640px) {
  .mcal__day { min-height: 46px; padding: 4px; border-left-width: 3px; }
  .mcal__hrs { display: none; }
  .mcal__bar .btn { margin-left: 0; }
  .mcal__bar { flex-wrap: wrap; }
}

/* ── Importar empleados ─────────────────────────────── */
.import-steps { display: grid; gap: 14px; margin: 4px 0 16px; padding-left: 22px; font-size: 14px; }
.import-steps li::marker { font-weight: 700; color: var(--pine); }
.import-steps p { margin: 8px 0 0; }
.import-form { margin-top: 10px; display: grid; gap: 10px; }
.import-errors { max-height: 280px; overflow: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.import-help { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.import-help > summary { padding: 10px 14px; font-weight: 600; cursor: pointer; }
.import-help > :not(summary) { margin: 0 14px 12px; }

/* Repetir foto de una checada */
.btn-row--end { justify-content: flex-end; flex-wrap: nowrap; }
.retake-old { margin: 0; }
.retake-old img { display: block; width: 100%; max-width: 220px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.retake-old figcaption { font-size: 12px; color: var(--muted); padding-top: 4px; }

/* Permisos por módulo (formulario de usuarios) */
.perms { border: 0; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.perms__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 0; font-weight: 700; font-size: 14px; }
.perms__quick { font-weight: 400; color: var(--muted); font-size: 13px; white-space: nowrap; }
.perms__quick .link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--pine); font-weight: 600; }
.perms__group { margin: 6px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.perms__group .is-warn { color: var(--amber); }
.perms__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.perms__grid .check--card { padding: 10px 12px; }
.perms__grid .check--card small { display: block; font-size: 12px; line-height: 1.35; }
.perms__grid .check--card.is-disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .perms__grid { grid-template-columns: 1fr; } }

/* Asistencia por día con rango: separa a cada empleado */
.table tr.row-group:not(:first-child) td { border-top: 2px solid var(--line); }
.ot-rule { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--pine-50); color: var(--text-2); font-size: 13px; max-width: 100%; }
.ot-rule .ico, .ot-rule svg { width: 16px; height: 16px; color: var(--pine); flex: none; }

/* Consulta del empleado en recepción (no checa) */
.portal__lead { max-width: 380px; font-size: 15px; }
.kiosk--portal { grid-template-columns: minmax(260px, 320px) 1fr; }
.kiosk--portal .kiosk__side { position: sticky; top: 0; height: 100dvh; }
.portal__main { place-items: start stretch; align-content: start; gap: 16px; padding: 28px clamp(16px, 3vw, 40px); max-width: 980px; width: 100%; justify-self: center; }
.portal-who { display: flex; align-items: center; gap: 14px; }
.portal-who strong { display: block; font-size: 22px; line-height: 1.2; }
.portal-who small { color: var(--ink-300); font-size: 14px; }
.portal__idle { margin-top: 12px; font-size: 13px; }
.portal-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-tab { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.portal-tab.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.portal-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portal-month h2 { font-size: 20px; font-weight: 800; color: var(--ink-900); }
.portal-month .icon-btn { width: 48px; height: 48px; }
.portal-month .is-disabled { visibility: hidden; }
.portal-punches { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.portal-punches span { white-space: nowrap; }
.portal-vac { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.portal-vac__num { font-size: 28px; font-weight: 800; color: var(--ink-900); }
.portal-vac__num small { font-size: 15px; font-weight: 500; color: var(--muted); }
.kiosk--portal .form input, .kiosk--portal .form select, .kiosk--portal .form textarea { font-size: 16px; }
@media (max-width: 860px) {
  .kiosk--portal { grid-template-columns: 1fr; }
  .kiosk--portal .kiosk__side { position: static; height: auto; }
}

/* Correo dividido: nombre + dominio elegido de la lista (ver app.js). */
.email-split { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.email-split > input:first-child { flex: 1 1 0; min-width: 0; }
.email-split > select { flex: 0 0 auto; max-width: 60%; }
.email-split > input + select + input { flex: 1 1 100%; }
.email-split > input[hidden] { display: none; }

/* Consulta: aviso para capturar el correo personal (ámbar para que llame la atención). */
.kiosk .panel.portal-email { background: var(--amber-50); border: 1px solid #EBCB86; border-left: 6px solid var(--amber-chart); box-shadow: 0 10px 28px -16px rgba(154, 100, 8, .45); }
.portal-email .panel__head { border-bottom-color: #F0DDB4; }
.portal-email .panel__head h2 { display: flex; align-items: center; gap: 10px; color: #6B4A0B; font-size: 19px; }
.portal-email .panel__head h2 svg { width: 22px; height: 22px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--amber-chart); color: #fff; }
.portal-email .panel__body > p { color: #6B4A0B; font-weight: 500; }
.portal-email .field > span:first-child { color: #6B4A0B; }
.portal-email input, .portal-email select { background-color: #fff; border-color: #E2C484; }
.portal-email .btn--ghost { background: transparent; color: #6B4A0B; }
.portal-email__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Suscripción: felicitación al contratar después del mes de prueba (partials/subscription.php). */
.congrats {
  display: flex; gap: 16px; align-items: center; padding: 16px 20px; flex-wrap: wrap;
  border-radius: 16px; border: 1px solid var(--pine-100); color: #0D4F3E;
  background: radial-gradient(120% 140% at 0% 0%, #fff 0%, var(--pine-50) 55%, var(--pine-100) 100%);
  box-shadow: var(--sh-2); animation: congrats-in .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.congrats__icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pine); color: #fff; animation: congrats-pop .7s .25s ease-out both;
}
.congrats__icon .ico { width: 22px; height: 22px; }
.congrats__body { flex: 1 1 260px; min-width: 0; }
.congrats h2 { font-size: 16px; color: var(--pine); }
.congrats p { font-size: 14px; margin-top: 2px; }
.congrats .btn--ghost { background: #fff; }
@keyframes congrats-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes congrats-pop { 0% { transform: scale(.4) rotate(-20deg); } 60% { transform: scale(1.15) rotate(8deg); } 100% { transform: none; } }

/* Panel: entrada en cascada de las tarjetas y anillo que se llena */
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ring-in { from { stroke-dasharray: 0 100; } }
.today-board > *, .dash-grid > *, .main > .todo { animation: card-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.today-board > :nth-child(2) { animation-delay: .05s; }
.today-board > :nth-child(3) { animation-delay: .1s; }
.today-board > :nth-child(4) { animation-delay: .15s; }
.today-board > :nth-child(5) { animation-delay: .2s; }
.main > .todo { animation-delay: .22s; }
.dash-grid > :nth-child(1) { animation-delay: .26s; }
.dash-grid > :nth-child(2) { animation-delay: .32s; }
.dash-grid > :nth-child(3) { animation-delay: .38s; }
.dash-grid > :nth-child(n+4) { animation-delay: .44s; }
.ring__value { animation: ring-in .9s .15s cubic-bezier(.3, .9, .3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .today-board > *, .dash-grid > *, .main > .todo, .ring__value { animation: none; }
}
