/* 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-hover: #0F5C49;
  --pine-chart: #13866A;
  --pine-50: #E5F1ED;
  --pine-100: #CFE6DE;

  --amber: #9A6408;
  --amber-chart: #B97A0F;
  --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(19, 110, 87, .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--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; }
.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 .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; }
.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); }
.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(19, 110, 87, .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; }

/* ════════════════════════════════════════════════════════════════
   Liquid glass
   Superficies translúcidas con desenfoque y saturación, borde especular
   (brillo arriba-izquierda, rebote abajo-derecha) y un fondo con color
   suficiente para que el vidrio se perciba. La paleta no cambia.
   ════════════════════════════════════════════════════════════════ */
:root {
  --line: rgba(23, 49, 58, .10);
  --line-strong: rgba(23, 49, 58, .18);
  --surface-2: rgba(255, 255, 255, .38);
  --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: #E6EEEB; isolation: isolate; }
body.app::before, body.mobile::before, body.auth-body::before {
  content: ""; position: fixed; inset: -8%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 40% at 10% 4%, rgba(19, 134, 106, .36), transparent 70%),
    radial-gradient(34% 42% at 94% 10%, rgba(47, 93, 138, .28), transparent 70%),
    radial-gradient(30% 34% at 80% 98%, rgba(201, 138, 27, .24), transparent 70%),
    radial-gradient(38% 38% at 28% 84%, rgba(95, 195, 164, .22), transparent 70%),
    linear-gradient(160deg, #EEF4F1, #E1EAE6);
}

/* Material de vidrio */
:is(.panel, .stats, .today-board, .profile, .report-card, .todo, .day-log, .m-card, .m-stats, .m-days, .login__box, .callout) {
  position: relative;
  background: var(--glass-sheen), var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-rim), var(--glass-drop);
}
/* Borde especular: un degradado que solo pinta el contorno */
:is(.panel, .stats, .today-board, .profile, .report-card, .todo, .day-log, .m-card, .m-stats, .m-days, .login__box, .modal, .tabbar, .topbar)::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, .today-board, .todo, .report-card { border-radius: 18px; }
.profile { border-radius: 22px; }
.panel__foot { background: rgba(255, 255, 255, .3); border-radius: 0 0 18px 18px; }
.panel--flush { overflow: hidden; }
.panel--danger { border-color: rgba(169, 61, 51, .22); }

/* Divisiones internas sin «huecos» sólidos */
.stats, .todo { gap: 0; background: var(--glass-sheen), var(--glass); overflow: hidden; }
.stat, .todo__item { background: transparent; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.todo__item:hover { background: rgba(255, 255, 255, .45); }
.today-board__main { background: transparent; }
.today-board__cell { border-color: var(--line); }
.today-board__cell:hover, .feed__row:hover, .disclosure > summary:hover { background: rgba(255, 255, 255, .45); }
.table tbody tr:hover { background: rgba(255, 255, 255, .42); }
.table tr.is-attention { background: rgba(251, 241, 221, .55); }
.table th { background: rgba(255, 255, 255, .32); }
.meter, .bars__track, .rate__bar { background: rgba(23, 49, 58, .08); }
.weekdays span { background: rgba(23, 49, 58, .07); }

/* Barra lateral flotante de vidrio oscuro */
.sidebar {
  inset: 12px auto 12px 12px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, rgba(33, 68, 79, .86), rgba(18, 41, 49, .92));
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 28px 56px -24px rgba(10, 25, 30, .6);
}
.nav__link { border-radius: 12px; }
.nav__link:hover { background: rgba(255, 255, 255, .07); }
.nav__link.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 18px -10px rgba(0, 0, 0, .55);
}
.nav__count { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.sidebar__user { border-top-color: rgba(255, 255, 255, .07); }
.shell { margin-left: calc(var(--sidebar-w) + 24px); padding-right: 24px; }

/* Barra superior flotante */
.topbar {
  top: 12px; margin-top: 12px; padding: 10px 14px 10px 20px; border-radius: 18px;
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid transparent;
}
.topbar.is-stuck { border-color: var(--glass-edge); background: rgba(255, 255, 255, .6); box-shadow: var(--glass-rim), 0 10px 26px -18px rgba(23, 49, 58, .45); }
.topbar:not(.is-stuck)::before { opacity: 0; }
.main { padding: 20px 0 48px; }

/* 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(19, 110, 87, .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(19, 110, 87, .11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn--quiet:hover { background: rgba(19, 110, 87, .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(19, 110, 87, .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(19, 110, 87, .09); border-color: rgba(19, 110, 87, .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(19, 110, 87, .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(19, 110, 87, .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(19, 110, 87, .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(19, 110, 87, .12), 0 6px 14px -8px rgba(19, 110, 87, .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(19, 110, 87, .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: 1023px) {
  .sidebar { transform: translateX(calc(-100% - 24px)); }
  .shell { margin-left: 0; padding: 0 12px; }
  .topbar { margin-top: 8px; top: 8px; }
  .main { padding: 16px 0 40px; }
}
@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(19, 110, 87, .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); }
.nav { scrollbar-gutter: stable; }

/* 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; }
  .nav { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
}
