/* =========================================================================
   Palmareca · Sistema de diseño
   Paleta tomada de la palma areca: verde fronda profundo + caña dorada.
   Tipografía: Instrument Sans (interfaz) · Martian Mono (solo códigos de acceso).
   ========================================================================= */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 100 800; font-stretch: 75% 112.5%; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --brand-base: #1F5A44;
  --brand: var(--brand-base);
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in oklab, var(--brand) 9%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 28%, var(--surface));
  --brand-deep: color-mix(in oklab, var(--brand-base) 70%, #04100B);
  --cane: #C9A23A;
  --cane-bright: #E4C468;

  --ink: #13211B;
  --ink-2: #33433B;
  --muted: #5B6B63;
  --faint: #8A978F;
  --paper: #F1F3EF;
  --surface: #FFFFFF;
  --surface-2: #F6F7F4;
  --surface-3: #ECEFEA;
  --line: #DEE3DD;
  --line-2: #C8D0C8;

  --ok: #13824F;   --ok-soft: #E3F3EA;   --ok-ink: #0D5E39;
  --bad: #C4372D;  --bad-soft: #FBE9E7;  --bad-ink: #8E2219;
  --warn: #9A5B00; --warn-soft: #FBF0D9; --warn-ink: #6F4100;
  --info: #2C63C7; --info-soft: #E8EEFB; --info-ink: #1D4691;

  --verdict-ok: #0F7A49;
  --verdict-bad: #B8302A;
  --verdict-exit: #1F4E8C;

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-xs: 6px; --r-s: 9px; --r-m: 12px; --r-l: 16px; --r-xl: 22px;
  --shadow-pop: 0 18px 48px -18px rgba(10, 24, 18, .35), 0 2px 6px rgba(10, 24, 18, .06);
  --shadow-card: 0 24px 50px -24px rgba(6, 30, 20, .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --logo-h: 32px; --logo-h-lg: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: color-mix(in oklab, var(--brand-base) 52%, #D6F7E6);
  --brand-ink: #04120C;
  --brand-soft: color-mix(in oklab, var(--brand) 14%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 35%, var(--surface));
  --ink: #E6EEE9; --ink-2: #C3CFC8; --muted: #98A79F; --faint: #6E7D75;
  --paper: #0A120F; --surface: #101A16; --surface-2: #15211C; --surface-3: #1B2A24;
  --line: #22322B; --line-2: #2E4138;
  --ok: #3CC487;  --ok-soft: rgba(60, 196, 135, .13);  --ok-ink: #7FDCB0;
  --bad: #F2675C; --bad-soft: rgba(242, 103, 92, .14); --bad-ink: #FFA39B;
  --warn: #E3A43A; --warn-soft: rgba(227, 164, 58, .14); --warn-ink: #F2C774;
  --info: #7BA3FF; --info-soft: rgba(123, 163, 255, .14); --info-ink: #AFC6FF;
  --shadow-pop: 0 18px 48px -12px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: color-mix(in oklab, var(--brand-base) 52%, #D6F7E6);
    --brand-ink: #04120C;
    --brand-soft: color-mix(in oklab, var(--brand) 14%, var(--surface));
    --brand-line: color-mix(in oklab, var(--brand) 35%, var(--surface));
    --ink: #E6EEE9; --ink-2: #C3CFC8; --muted: #98A79F; --faint: #6E7D75;
    --paper: #0A120F; --surface: #101A16; --surface-2: #15211C; --surface-3: #1B2A24;
    --line: #22322B; --line-2: #2E4138;
    --ok: #3CC487;  --ok-soft: rgba(60, 196, 135, .13);  --ok-ink: #7FDCB0;
    --bad: #F2675C; --bad-soft: rgba(242, 103, 92, .14); --bad-ink: #FFA39B;
    --warn: #E3A43A; --warn-soft: rgba(227, 164, 58, .14); --warn-ink: #F2C774;
    --info: #7BA3FF; --info-soft: rgba(123, 163, 255, .14); --info-ink: #AFC6FF;
    --shadow-pop: 0 18px 48px -12px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--font); letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; font-stretch: 92%; letter-spacing: -0.018em; color: var(--ink); }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
small, .small { font-size: 14px; }
.xs { font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: color-mix(in oklab, var(--brand) 22%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.i { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
.i-s { width: 16px; height: 16px; }
.i-l { width: 22px; height: 22px; }
[hidden] { display: none !important; }

.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Botones ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: var(--r-s);
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-line);
  font: 500 15px/1 var(--font); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .15s var(--ease), border-color .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-primary { --b-bg: var(--brand); --b-fg: var(--brand-ink); --b-line: var(--brand); }
.btn-primary:hover { background: color-mix(in oklab, var(--brand) 88%, #000); }
.btn-danger { --b-bg: var(--surface); --b-fg: var(--bad); --b-line: color-mix(in oklab, var(--bad) 40%, var(--surface)); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: var(--r-xs); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16.5px; border-radius: var(--r-m); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn .i { width: 18px; height: 18px; }
.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.label .opt { color: var(--faint); font-weight: 400; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.field-error { font-size: 13px; color: var(--bad); }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 13px; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 400 16px/1.3 var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 11px 13px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235B6B63' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--line-2) 50%, var(--ink-2)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 18%, transparent); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input-mono { font-family: var(--mono); font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.input-mono::placeholder { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.input.is-autofilled, .select.is-autofilled, .textarea.is-autofilled { border-color: color-mix(in oklab, var(--cane) 65%, var(--line-2)); background: color-mix(in oklab, var(--cane) 8%, var(--surface)); }
.input.is-invalid { border-color: var(--bad); }
.input-group { display: flex; min-width: 0; }
.input-group > :first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 16px; }
.form-grid > * { grid-column: span 12; }
.form-grid .c-6 { grid-column: span 6; } .form-grid .c-4 { grid-column: span 4; } .form-grid .c-3 { grid-column: span 3; } .form-grid .c-8 { grid-column: span 8; } .form-grid .c-9 { grid-column: span 9; }
@media (max-width: 720px) { .form-grid .c-6, .form-grid .c-4, .form-grid .c-8, .form-grid .c-9 { grid-column: span 12; } .form-grid .c-3 { grid-column: span 6; } }
.form-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
.form-section > header p { margin-top: 6px; color: var(--muted); font-size: 14px; }
@media (max-width: 960px) { .form-section { grid-template-columns: 1fr; gap: 16px; } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); margin-top: 8px; flex-wrap: wrap; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; line-height: 1.4; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--brand-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--brand-ink); transform: none; }
.check .hint { display: block; margin-top: 2px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch input { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch-text strong { display: block; font-weight: 500; font-size: 15px; }
.switch-text span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice strong { display: block; font-weight: 500; font-size: 15px; }
.choice span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { position: relative; }
.days input { position: absolute; opacity: 0; }
.days span { display: grid; place-items: center; width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: var(--r-s); font-size: 14px; cursor: pointer; text-transform: capitalize; }
.days input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.days input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.color-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.color-pick label { position: relative; }
.color-pick input[type="radio"] { position: absolute; opacity: 0; }
.color-pick .sw { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.color-pick input:checked + .sw { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.color-input { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); cursor: pointer; }

/* Selector de lada */
.phone { display: flex; min-width: 0; }
.phone .dial { flex: none; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-s) 0 0 var(--r-s); background: var(--surface-2); color: var(--ink); font: 500 15px var(--font); cursor: pointer; }
.phone .dial .flag { font-size: 18px; line-height: 1; }
.phone .dial .i { width: 14px; height: 14px; color: var(--muted); }
.phone .input { border-radius: 0 var(--r-s) var(--r-s) 0; }
.country-menu { position: fixed; z-index: 80; width: min(340px, calc(100vw - 24px)); max-height: min(420px, 70vh); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-pop); overflow: hidden; }
.country-menu .input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none !important; }
.country-menu ul { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.country-menu li button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-xs); font: 400 15px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.country-menu li button:hover, .country-menu li button.is-active { background: var(--surface-3); }
.country-menu .code { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.country-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ---------- Superficies ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; letter-spacing: -0.01em; }
.panel-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.panel-body { padding: 22px; }
.panel-body.tight { padding: 8px 0; }
.panel + .panel { margin-top: 20px; }
.panel-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; }
.callout .i { margin-top: 2px; }
.callout.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok-ink); }
.callout.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad-ink); }
.callout.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.callout.info { background: var(--info-soft); border-color: transparent; color: var(--info-ink); }
.callout strong { font-weight: 600; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.info { background: var(--info-soft); color: var(--info-ink); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.muted { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; }
.tag .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--faint)); flex: none; }

.kv { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 10px 20px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13.5px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-l { width: 72px; height: 72px; font-size: 22px; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .i { width: 28px; height: 28px; margin: 0 auto 12px; color: var(--faint); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 42ch; margin: 0 auto; font-size: 14.5px; }
.empty .btn { margin-top: 18px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in oklab, var(--surface-2) 70%, var(--surface)); }
.table .num { text-align: right; }
.table a.row-link { color: var(--ink); text-decoration: none; font-weight: 500; }
.table a.row-link:hover { color: var(--brand); text-decoration: underline; }
.table .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.table .actions { text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
  .table.stack-sm thead { display: none; }
  .table.stack-sm, .table.stack-sm tbody, .table.stack-sm tr, .table.stack-sm td { display: block; width: 100%; }
  .table.stack-sm tr { padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .table.stack-sm td { padding: 3px 0 !important; border: 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack-sm td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .table.stack-sm td.primary { display: block; text-align: left; font-size: 15.5px; margin-bottom: 4px; }
  .table.stack-sm td.primary::before { display: none; }
  .table.stack-sm td.actions { justify-content: flex-end; padding-top: 8px !important; }
  .table.stack-sm td.actions::before { display: none; }
  .table.stack-sm tbody tr:hover td { background: none; }
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.filters .field { min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.filters .field.search { flex: 2 1 240px; max-width: 360px; }
.filters .input, .filters .select { height: 40px; font-size: 15px; }
.filters .btn { height: 40px; }
.search-input { position: relative; }
.search-input .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-input .input { padding-left: 38px; }

.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.pager nav { display: flex; gap: 6px; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; }
.segmented a, .segmented button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: none; font: 500 14px var(--font); color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap; }
.segmented .is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 28px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-color: var(--brand); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .meta { margin-left: auto; text-align: right; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.list .title { font-weight: 500; }
.list .sub { color: var(--muted); font-size: 13.5px; }
.result-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.result-ico .i { width: 16px; height: 16px; stroke-width: 2.2; }
.result-ico.granted { background: var(--ok-soft); color: var(--ok); }
.result-ico.denied { background: var(--bad-soft); color: var(--bad); }
.result-ico.exit { background: var(--info-soft); color: var(--info); }

/* ---------- Avisos y diálogos ---------- */
.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); background: var(--ink); color: var(--surface); box-shadow: var(--shadow-pop); font-size: 14.5px; animation: toast-in .35s var(--ease); }
.toast .i { margin-top: 1px; }
.toast.ok .i { color: #5ED39A; } .toast.error .i { color: #FF8A80; } .toast.info .i { color: #9DBBFF; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 720px) { .toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; } }

dialog.modal { border: 0; padding: 0; border-radius: var(--r-l); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); width: min(460px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(8, 16, 12, .45); backdrop-filter: blur(2px); }
dialog.modal .modal-body { padding: 24px; }
dialog.modal .modal-body p { color: var(--muted); margin-top: 8px; }
dialog.modal .modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--line); }
dialog.modal.wide { width: min(720px, calc(100vw - 32px)); }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-pop); }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-xs); color: var(--ink); text-decoration: none; background: none; border: 0; font: 400 14.5px var(--font); cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-3); }
.menu-pop .who { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop .who strong { display: block; font-weight: 600; }
.menu-pop .who span { font-size: 13px; color: var(--muted); }

/* ---------- Pantalla de acceso (login, registro) ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-brand { position: relative; overflow: hidden; background: var(--brand-deep); color: #F4EEDB; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; }
.fronds { aspect-ratio: 1; background: currentColor; -webkit-mask: url("../img/fronds.svg") no-repeat center / contain; mask: url("../img/fronds.svg") no-repeat center / contain; }
.auth-brand .fronds { position: absolute; right: -8%; bottom: -10%; width: 92%; max-width: 760px; color: var(--cane); opacity: .38; pointer-events: none; }
.auth-brand .wordmark { font-size: clamp(40px, 5.2vw, 72px); line-height: .98; font-weight: 600; font-stretch: 82%; letter-spacing: -0.035em; color: #FBF6E8; max-width: 9ch; margin-inline: auto; position: relative; }
.auth-brand .tagline { position: relative; margin: 18px auto 0; font-size: 18px; color: color-mix(in oklab, #F4EEDB 75%, transparent); max-width: 30ch; }
.auth-brand .foot { position: relative; font-size: 13px; color: color-mix(in oklab, #F4EEDB 55%, transparent); }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-card h1 { font-size: 28px; }
.auth-card .lead { color: var(--muted); margin-top: 8px; }
.auth-card form { margin-top: 28px; }
.auth-logo { text-align: center; margin-bottom: 28px; line-height: 0; }
.auth-logo img { height: var(--logo-h-lg); width: auto; max-width: min(260px, 100%); object-fit: contain; margin-inline: auto; }
.auth-logo.sm { margin-bottom: 24px; }
.auth-logo.sm img { height: 48px; max-width: min(220px, 100%); }
.auth-links { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--muted); }
.auth-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-foot a { color: var(--muted); }
.steps { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.steps span { width: 28px; height: 4px; border-radius: 4px; background: var(--line-2); }
.steps span.on { background: var(--brand); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { padding: 28px 24px 30px; min-height: 0; }
  .auth-brand .fronds { width: 360px; right: -80px; bottom: -120px; opacity: .32; }
  .auth-brand .wordmark { font-size: 40px; max-width: none; }
  .auth-brand .tagline { font-size: 16px; margin-top: 8px; }
  .auth-brand > div:not(.fronds) { width: 100%; }
  .auth-brand .foot { display: none; }
  .auth-brand .spacer { display: none; }
  .auth-main { padding: 32px 20px 48px; justify-content: flex-start; }
}
.auth-simple { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-simple .auth-card { background: var(--surface); padding: 36px; border-radius: var(--r-xl); border: 1px solid var(--line); max-width: 460px; }

/* ---------- Panel de administración ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar .brand { display: flex; align-items: center; justify-content: center; gap: 10px; height: 68px; padding: 0 16px; text-decoration: none; color: var(--ink); flex: none; }
.sidebar .brand img { height: var(--logo-h); width: auto; max-width: 100%; object-fit: contain; }
.sidebar .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-deep); color: var(--cane-bright); display: grid; place-items: center; }
.sidebar .brand .mark svg { width: 22px; height: 22px; }
.sidebar .brand strong { font-size: 17px; font-weight: 600; font-stretch: 88%; letter-spacing: -0.02em; }
.nav { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 20px; }
.nav .group { font-size: 12.5px; color: var(--faint); font-weight: 500; padding: 18px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r-s); color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav a .i { color: var(--muted); }
.nav a:hover { background: var(--surface-3); }
.nav a.is-active { background: var(--brand-soft); color: var(--brand); }
.nav a.is-active .i { color: var(--brand); }
.nav a .count { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--warn-soft); color: var(--warn-ink); padding: 1px 7px; border-radius: 99px; }
.sidebar .me { flex: none; border-top: 1px solid var(--line); padding: 12px; }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-s); background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.me-btn:hover { background: var(--surface-3); }
.me-btn .grow strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.me-btn .grow span { display: block; font-size: 12.5px; color: var(--muted); }
.sidebar .menu-pop { bottom: calc(100% + 6px); top: auto; left: 0; right: 0; }
.main { min-width: 0; padding: 32px 40px 64px; }
.main-inner { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.topbar { display: none; }
.scrim { display: none; }
@media (max-width: 1080px) { .main { padding: 28px 24px 64px; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-pop); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(8, 16, 12, .4); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50; height: 58px; padding: 0 12px; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
  .topbar .brand { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 128px); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; }
  .topbar .brand img { height: min(var(--logo-h), 30px); width: auto; max-width: 100%; object-fit: contain; }
  .main { padding: 22px 16px 64px; }
  h1 { font-size: 26px; }
}

/* Tablero */
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); margin-bottom: 20px; }
.stat { padding: 18px 22px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .label { display: block; font-size: 13.5px; color: var(--muted); font-weight: 400; }
.stat .value { display: block; margin-top: 6px; font-size: 32px; line-height: 1; font-weight: 600; font-stretch: 90%; letter-spacing: -0.03em; }
.stat .note { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat.is-alert .value { color: var(--bad); }
@media (max-width: 1080px) { .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 600px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { border-left: 0; border-top: 1px solid var(--line); } .stat:nth-child(2n) { border-left: 1px solid var(--line); } .stat:nth-child(-n+2) { border-top: 0; } .stat .value { font-size: 28px; } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-grid .panel + .panel { margin-top: 0; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: 1fr; } }

/* Gráfica de columnas */
.chart { position: relative; padding: 8px 22px 4px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font: 400 11.5px var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--brand); transition: opacity .15s; }
.chart .bar.denied { fill: var(--bad); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { opacity: .78; }
.chart .hit:focus { outline: none; }
.chart .val { fill: var(--ink); font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 13px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.chart-tip strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--muted); }
.chart-sub { display: flex; align-items: center; gap: 8px; padding: 10px 22px 0; font-size: 13.5px; color: var(--muted); }
.chart-sub .i { width: 15px; height: 15px; color: var(--bad); }
details.table-view { padding: 4px 22px 18px; font-size: 14px; }
details.table-view summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
details.table-view table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
details.table-view td, details.table-view th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
details.table-view th { color: var(--muted); }

/* Carga de INE */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1.586; border: 1.5px dashed var(--line-2); border-radius: var(--r-l); background: var(--surface-2); color: var(--muted); text-align: center; padding: 16px; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.dropzone .i { width: 26px; height: 26px; }
.dropzone strong { color: var(--ink); font-weight: 500; }
.dropzone.has-image { border-style: solid; border-color: var(--line); }
.dropzone .dz-clear { position: absolute; top: 10px; right: 10px; z-index: 2; }
.ocr-status { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cámara (selfie / foto) */
.camera { position: relative; width: 100%; max-width: 240px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-3); margin: 0 auto; display: grid; place-items: center; color: var(--muted); }
.camera video, .camera img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera video { transform: scaleX(-1); }
.camera .placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; padding: 24px; text-align: center; }
.camera .placeholder .i { width: 32px; height: 32px; }
.camera-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Portal del propietario ---------- */
.portal { min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.portal-head { position: sticky; top: 0; z-index: 40; background: color-mix(in oklab, var(--paper) 88%, transparent); backdrop-filter: saturate(1.3) blur(12px); }
.portal-head .inner { max-width: 600px; margin: 0 auto; height: 62px; padding: 0 18px; display: flex; align-items: center; gap: 12px; }
.portal-head .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 600; font-stretch: 90%; font-size: 17px; letter-spacing: -0.02em; }
.portal-head .brand img { height: var(--logo-h); width: auto; max-width: 170px; object-fit: contain; }
.portal-head .brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-deep); color: var(--cane-bright); display: grid; place-items: center; }
.portal-head .brand .mark svg { width: 20px; height: 20px; }
.portal-head .menu { margin-left: auto; }
.portal-main { max-width: 600px; margin: 0 auto; padding: 8px 18px 32px; }
.portal-main > * + * { margin-top: 22px; }
.greet h1 { font-size: 26px; }
.greet p { color: var(--muted); margin-top: 4px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 18px; }
.section-title a { font-size: 14.5px; text-decoration: none; font-weight: 500; }

.tabbar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: color-mix(in oklab, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { width: 100%; max-width: 600px; display: grid; grid-template-columns: repeat(var(--tabs, 4), 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; }
.tabbar a .i { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--brand); }

/* La credencial: código dinámico del propietario en proporción ID-1 (85.6 × 54 mm) */
.credential-wrap { perspective: 1400px; }
.credential {
  position: relative; width: 100%; aspect-ratio: 1.586; border-radius: var(--r-xl);
  transform-style: preserve-3d; transition: transform .6s var(--ease); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.credential.is-flipped { transform: rotateY(180deg); }
.credential .face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow-card); }
.credential .front { background: var(--brand-deep); color: #F6F0DD; padding: clamp(16px, 5vw, 24px); display: flex; flex-direction: column; }
.credential .front .fronds { position: absolute; width: 85%; right: -22%; top: -30%; color: var(--cane); opacity: .30; pointer-events: none; transform: rotate(18deg); }
.credential .top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credential .top .who { font-size: 13px; letter-spacing: .01em; color: color-mix(in oklab, #F6F0DD 70%, transparent); }
.credential .top img { height: 26px; width: auto; max-width: 140px; object-fit: contain; }
.credential .top .name { font-weight: 600; font-stretch: 88%; font-size: 15px; letter-spacing: -0.01em; }
.credential .code { position: relative; margin-top: auto; display: flex; gap: .32em; font-family: var(--mono); font-weight: 500; font-stretch: 100%; font-size: clamp(36px, 11.5vw, 54px); line-height: 1; letter-spacing: .02em; color: #FFFBEF; font-variant-numeric: tabular-nums; }
.credential .code.is-swapping { animation: code-swap .45s var(--ease); }
@keyframes code-swap { 0% { opacity: .15; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.credential .timer { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.credential .timer .track { flex: 1; height: 3px; border-radius: 3px; background: rgba(246, 240, 221, .16); overflow: hidden; }
.credential .timer .fill { height: 100%; width: 100%; border-radius: 3px; background: var(--cane-bright); transform-origin: left; }
.credential .timer span { font-size: 12.5px; font-variant-numeric: tabular-nums; color: color-mix(in oklab, #F6F0DD 75%, transparent); min-width: 34px; text-align: right; }
.credential .bottom { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 14px; font-size: 13.5px; color: color-mix(in oklab, #F6F0DD 82%, transparent); }
.credential .bottom strong { display: block; color: #FFFBEF; font-weight: 600; font-size: 15px; }
.credential .back { transform: rotateY(180deg); background: #FFFFFF; color: #13211B; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: clamp(14px, 4.5vw, 22px); }
.credential .back .qr { width: clamp(118px, 40vw, 168px); aspect-ratio: 1; }
.credential .back .qr svg { width: 100%; height: 100%; }
.credential .back .code-s { display: flex; gap: .3em; font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.credential .back p { font-size: 13px; color: #5B6B63; margin-top: 6px; }
.credential-hint { display: flex; justify-content: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.credential.is-paused .code { opacity: .35; }

.invite { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.invite a { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s var(--ease); }
.invite a:hover { border-color: var(--c, var(--brand)); }
.invite a:active { transform: scale(.98); }
.invite .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: var(--c); }
.invite strong { font-weight: 600; font-size: 15.5px; }
.invite span { font-size: 13px; color: var(--muted); margin-top: -6px; }

.pass-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); text-decoration: none; color: var(--ink); }
.pass-card + .pass-card { margin-top: 10px; }
.pass-card .ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: var(--c); }
.pass-card .title { font-weight: 600; }
.pass-card .sub { font-size: 13.5px; color: var(--muted); }
.pass-card .code { margin-left: auto; font-family: var(--mono); font-size: 15px; letter-spacing: .03em; }

.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.ticket .head { padding: 20px 22px; display: flex; gap: 14px; align-items: center; border-bottom: 1px dashed var(--line-2); }
.ticket .body { padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.ticket .qr { width: 150px; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 8px; }
.ticket .big-code { font-family: var(--mono); font-size: clamp(30px, 9vw, 44px); line-height: 1; letter-spacing: .04em; font-weight: 500; }
@media (max-width: 480px) { .ticket .body { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------- Caseta ---------- */
.station { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.station-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.station-head .where { display: flex; flex-direction: column; line-height: 1.2; }
.station-head .where strong { font-size: 17px; font-weight: 600; font-stretch: 90%; }
.station-head .where span { font-size: 13px; color: var(--muted); }
.station-head .clock { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--muted); }
.station-head .spacer { flex: 1; }
.station-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 0; }
.station-entry { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; }
.entry-box { width: 100%; max-width: 440px; }
.code-field { position: relative; }
.code-input {
  width: 100%; height: 88px; border-radius: var(--r-l); border: 2px solid var(--line-2); background: var(--surface);
  font: 500 44px/1 var(--mono); letter-spacing: .14em; text-align: center; color: var(--ink); padding: 0 12px;
  font-variant-numeric: tabular-nums; caret-color: var(--brand);
}
.code-input::placeholder { color: var(--line-2); letter-spacing: .14em; }
.code-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 16%, transparent); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.keypad button { height: 68px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 26px var(--mono); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .1s, transform .08s; user-select: none; }
.keypad button:active { transform: scale(.97); background: var(--surface-3); }
.keypad button .i { width: 26px; height: 26px; }
.keypad .k-go { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.keypad .k-go:active { background: color-mix(in oklab, var(--brand) 85%, #000); }
.keypad .k-del { color: var(--muted); }
.entry-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.mode-toggle .segmented a, .mode-toggle .segmented button { height: 38px; padding: 0 16px; font-size: 15px; }
.mode-toggle .is-active.out { color: var(--info); }
.station-side { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.station-side header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.station-side .list { overflow-y: auto; flex: 1; }
.station-side .list > li { padding: 12px 20px; }
.station .exit-banner { display: none; }
.station:not(.is-exit) .exit-only { display: none; }
.station.is-exit .exit-banner { display: flex; }
@media (max-width: 900px) {
  .station-body { grid-template-columns: 1fr; }
  .station-side { border-left: 0; border-top: 1px solid var(--line); }
  .station-entry { padding: 20px 16px; justify-content: flex-start; }
  .keypad button { height: 62px; }
  .code-input { height: 76px; font-size: 36px; }
}

.verdict { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; color: #fff; background: var(--verdict-bad); padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; animation: verdict-in .28s var(--ease); }
.verdict.granted { background: var(--verdict-ok); }
.verdict.exit { background: var(--verdict-exit); }
@keyframes verdict-in { from { opacity: 0; transform: scale(1.02); } }
.verdict .v-inner { margin: auto; width: 100%; max-width: 760px; }
.verdict .v-icon { width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.verdict .v-icon .i { width: 54px; height: 54px; stroke-width: 2.4; }
.verdict h2 { color: #fff; font-size: clamp(38px, 7vw, 64px); line-height: 1; font-stretch: 86%; letter-spacing: -0.035em; margin-top: 26px; }
.verdict .v-msg { font-size: clamp(19px, 3vw, 24px); margin-top: 12px; color: rgba(255, 255, 255, .92); }
.verdict .v-card { margin-top: 28px; display: flex; gap: 20px; align-items: center; padding: 20px; border-radius: var(--r-l); background: rgba(0, 0, 0, .16); }
.verdict .v-photo { flex: none; width: 112px; height: 112px; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .15); }
.verdict .v-photo img { width: 100%; height: 100%; object-fit: cover; }
.verdict .v-badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .95); color: #13211B; font-size: 14px; font-weight: 600; }
.verdict .v-badge::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c, #13211B); }
.verdict .v-person { font-size: clamp(26px, 4.4vw, 38px); font-weight: 600; line-height: 1.15; margin-top: 10px; letter-spacing: -0.02em; }
.verdict .v-lines { margin-top: 10px; font-size: clamp(17px, 2.4vw, 21px); color: rgba(255, 255, 255, .9); display: flex; flex-direction: column; gap: 4px; }
.verdict .v-spent { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: rgba(0, 0, 0, .22); font-size: 17px; font-weight: 500; }
.verdict .v-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.verdict .v-actions .btn { --b-bg: #fff; --b-fg: #13211B; --b-line: #fff; height: 56px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.verdict .v-actions .btn.ghost { --b-bg: rgba(255, 255, 255, .14); --b-fg: #fff; --b-line: transparent; }
.verdict .v-timer { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255, 255, 255, .55); transform-origin: left; }
.verdict form.v-details { margin-top: 18px; display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.verdict form.v-details .input { background: rgba(255, 255, 255, .95); border-color: transparent; color: #13211B; }
.verdict form.v-details .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .verdict .v-card { flex-direction: column; align-items: flex-start; } }

.scanner { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; flex-direction: column; }
.scanner video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.scanner .frame { position: absolute; left: 50%; top: 45%; width: min(64vw, 320px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); outline: 3px solid rgba(255, 255, 255, .9); }
.scanner .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 12px; }
.scanner .bar .btn { --b-bg: #fff; --b-fg: #13211B; --b-line: #fff; height: 52px; }
.scanner .msg { position: absolute; top: calc(env(safe-area-inset-top) + 20px); left: 0; right: 0; text-align: center; color: #fff; font-size: 16px; }

/* ---------- Página pública de pase ---------- */
.public-pass { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 18px 48px; }
.public-pass .brand-top { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.public-pass .brand-top img { height: var(--logo-h-lg); max-height: 72px; width: auto; }
.public-pass .ticket { width: 100%; max-width: 460px; }

/* ---------- Código (API) ---------- */
pre.code { margin: 0; padding: 16px 18px; border-radius: var(--r-m); background: #0E1813; color: #DCE9E1; font: 400 13px/1.6 var(--mono); overflow-x: auto; letter-spacing: 0; }
code.inline { font-family: var(--mono); font-size: .86em; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; letter-spacing: 0; }
.secret-box { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }

/* ---------- Instalador ---------- */
.installer { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.installer .req { list-style: none; padding: 0; margin: 0; }
.installer .req li { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 15px; }
.installer .req .i { width: 18px; height: 18px; }
.installer .req .ok { color: var(--ok); } .installer .req .no { color: var(--bad); } .installer .req .warn { color: var(--warn); }

/* ---------- Logotipo claro y oscuro: se muestra el que corresponde al tema ---------- */
:root[data-theme="light"] .logo-dark, :root[data-theme="dark"] .logo-light { display: none !important; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .logo-dark { display: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo-light { display: none !important; } }
.logo-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.logo-slot { display: flex; flex-direction: column; gap: 8px; }
.logo-stage { position: relative; display: grid; place-items: center; min-height: 116px; padding: 20px 24px; border-radius: var(--r-l); border: 1.5px dashed var(--line-2); background: #FFFFFF; color: #5B6B63; cursor: pointer; overflow: hidden; }
.logo-slot.dark .logo-stage { background: #0F1A15; color: #98A79F; border-color: #2A3A33; }
.logo-stage img { max-width: 240px; width: auto; object-fit: contain; }
.logo-stage img.preview { position: static; inset: auto; height: 48px; object-fit: contain; }
.logo-stage:has(img.preview) > img:not(.preview), .logo-stage:has(img.preview) .placeholder { display: none; }
.logo-stage .placeholder { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.logo-stage input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.logo-stage:hover { border-color: var(--brand); }

/* ---------- Captura de INE (foto o PDF) ---------- */
.ine-capture { display: flex; flex-direction: column; gap: 12px; }
.ine-capture .ine-hint { margin: 0; }
.dropzone.is-busy { border-color: var(--brand); background: var(--brand-soft); pointer-events: none; }
.dropzone.is-busy .i { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
label.btn.is-loading { pointer-events: none; }

/* ---------- Familiares ---------- */
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.review-box { margin-bottom: 20px; border-color: color-mix(in oklab, var(--warn) 45%, var(--line)); background: color-mix(in oklab, var(--warn-soft) 55%, var(--surface)); }
.family-list > li { align-items: flex-start; }
.note-bad { color: var(--bad-ink); }
.tabs.in-panel { margin: 0; padding: 0 14px; }
.tabs .count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 600; }
.tabs a.is-active .count { background: var(--brand-soft); color: var(--brand); }

/* ---------- Calles ---------- */
.street-list > li { padding: 12px 18px; }
.street-row { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.street-row .grow { min-width: 180px; }
.street-row .grow strong { display: block; font-weight: 500; }
.street-row .input { flex: 1 1 220px; max-width: 320px; height: 40px; }

/* ---------- Tipos de acceso: plantillas e íconos ---------- */
.presets { margin-bottom: 22px; }
.presets-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.preset { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 13px 14px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.preset:hover { border-color: var(--c); }
.preset.is-active { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in oklab, var(--c) 7%, var(--surface)); }
.preset .ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 14%, var(--surface)); color: var(--c); }
.preset strong { display: block; font-weight: 600; font-size: 14.5px; }
.preset span span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.icon-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.icon-choice { padding: 10px 12px; align-items: center; }
.icon-choice span { margin: 0 !important; font-size: 13.5px !important; color: var(--ink-2) !important; }
.more-icons { margin-top: 12px; }
.more-icons summary { cursor: pointer; font-size: 14px; color: var(--brand); width: fit-content; }
.icon-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.icon-only { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-only input { position: absolute; opacity: 0; pointer-events: none; }
.icon-only:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.icon-only:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Sin conexión ---------- */
.offline-only { display: none !important; }
html.is-offline .offline-only { display: flex !important; }
.offline-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; }
.offline-note .i { flex: none; margin-top: 2px; }
.credential.is-backup .front { background: color-mix(in oklab, var(--brand-deep) 70%, #2B2B2B); }
.credential.is-backup .timer { visibility: hidden; }
.net-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); font: 500 13.5px/1 var(--font); cursor: pointer; }
.net-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.net-pill.is-off { background: var(--bad-soft); color: var(--bad-ink); border-color: transparent; }
.net-pill.is-off .dot { background: var(--bad); animation: pulse .9s ease-in-out infinite alternate; }
.verdict .v-offline { background: rgba(0, 0, 0, .3); }

/* ---------- Caseta: salida sin código ---------- */
.exit-sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 16, 12, .45); animation: verdict-in .2s var(--ease); }
.exit-sheet .es-panel { width: 100%; max-width: 720px; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); overflow: hidden; }
.exit-sheet .es-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 14px; }
.exit-sheet .es-head > div { flex: 1; }
.exit-sheet h2 { font-size: 26px; }
.exit-sheet .es-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.exit-sheet .es-search { margin: 0 22px; width: auto; height: 50px; font-size: 16px; }
.exit-sheet .es-status { margin: 10px 22px 0; font-size: 14px; color: var(--muted); }
.exit-sheet .es-status.is-off { color: var(--warn-ink); }
.exit-sheet .es-list { flex: 1; min-height: 140px; overflow-y: auto; margin-top: 12px; border-top: 1px solid var(--line); }
.exit-sheet .es-list > li { padding: 12px 22px; }
.exit-sheet .es-list .title { display: block; font-size: 17px; font-weight: 600; }
.exit-sheet .es-list .sub { display: block; }
.exit-sheet .es-list .btn { flex: none; height: 48px; padding: 0 22px; font-size: 16px; }
.exit-sheet .es-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c, #475569); }
.exit-sheet .es-empty { justify-content: center; text-align: center; padding: 30px 22px; color: var(--muted); }
.exit-sheet .es-other { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; padding: 16px 22px 22px; border-top: 1px solid var(--line); background: var(--paper); }
.exit-sheet .es-other h3 { grid-column: 1 / -1; font-size: 15px; }
.exit-sheet .es-other .es-name, .exit-sheet .es-other .es-save { grid-column: 1 / -1; }
.exit-sheet .es-other .input, .exit-sheet .es-other .btn { height: 50px; font-size: 16px; }
@media (max-width: 640px) {
  .exit-sheet { padding: 0; align-items: stretch; }
  .exit-sheet .es-panel { max-width: none; max-height: none; border-radius: 0; }
  .exit-sheet .es-other { grid-template-columns: 1fr; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------- Controles ---------- */
input[type="range"] { accent-color: var(--brand); }

/* ---------- Duración (segundos o minutos) ---------- */
.duration .input-group { max-width: 280px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .tabbar, .toasts, .btn, .filters, .pager { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .panel { border: 0; }
}

/* ---------- Respaldos y actualizaciones ---------- */
.backups-grid, .updates-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.updates-grid { grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .backups-grid, .updates-grid { grid-template-columns: minmax(0, 1fr); } }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { display: contents; }
.backup-list > li { align-items: center; padding: 16px 22px; }
.backup-list .backup-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.backup-list .sub { display: block; }
@media (max-width: 640px) { .backup-list > li { flex-direction: column; align-items: stretch; } .backup-list .row-actions { justify-content: flex-start; } }
.form-error { font-size: 14px; color: var(--bad); }
.job-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.job-bar > span { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: left; transform: scaleX(.02); transition: transform .35s var(--ease); }
.job-progress { display: grid; gap: 8px; }
.dropzone.dropzone-file { aspect-ratio: auto; min-height: 120px; flex-direction: row; gap: 10px; font-weight: 500; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14.5px; }
.steps-list li::marker { color: var(--muted); font-weight: 600; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.restore-items { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.version-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.version-now .label { display: block; }
.version-now .version-num { display: block; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.version-now .sub { display: block; color: var(--muted); font-size: 14px; }
.release-notes { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; background: var(--surface-2); font-size: 14.5px; max-height: 320px; overflow: auto; }
.release-notes h4 { font-size: 14px; margin: 12px 0 6px; }
.release-notes h4:first-child { margin-top: 0; }
.release-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.release-notes p { margin: 6px 0; }
.release-notes code, .plain-list code, .callout code { font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.maintenance-card h1 { font-size: 26px; }
.maintenance-card .lead { color: var(--muted); margin-top: 10px; }
