@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin-wght-normal.woff2') format('woff2');
}

:root {
  --bg: #f4f5f9; --card: #ffffff; --raised: #f8f9fc; --text: #1c1e2b; --muted: #8b90a3; --line: #eceef4;
  --brand: #5b3ef0; --brand-strong: #4a2fd6; --brand-soft: #efecff; --on-brand: #ffffff;
  --bar-from: #6f52f5; --bar-to: #b3a3fb;
  --ok: #17a36b; --ok-soft: #e3f6ee;
  --warn: #d97a1c; --warn-soft: #fff1e2; --danger: #e0454b; --danger-strong: #c5353b; --danger-soft: #fdecec;
  --info: #2f80ed; --info-soft: #e7f1fe;
  --shadow: 0 1px 2px rgba(28, 30, 43, 0.03), 0 2px 10px rgba(28, 30, 43, 0.03);
  --radius: 14px; --side: 232px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1017; --card: #181924; --raised: #1e2030; --text: #eceef6; --muted: #8d92a8; --line: #272a3a;
    --brand: #8a74ff; --brand-strong: #a394ff; --brand-soft: #252046; --on-brand: #0f0a2b;
    --bar-from: #9a86ff; --bar-to: #4d3fa6;
    --ok: #4fd39b; --ok-soft: #11301f; --warn: #f2a65a; --warn-soft: #3a2610;
    --danger: #ff7a7f; --danger-strong: #ff969a; --danger-soft: #3b1719; --info: #74aef7; --info-soft: #14263f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 30px 0 12px; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 2px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell: sidebar + top bar ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.side .brand { height: 76px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.logo { color: var(--brand); flex: none; }
.logo circle, .logo path { stroke: #fff; }

nav { display: flex; flex-direction: column; gap: 4px; padding: 22px 0; flex: 1; }
nav a, .navlink { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--text); font-size: 15.5px; font-weight: 400; transition: background 0.15s, color 0.15s; }
nav a:hover, .navlink:hover { background: var(--raised); text-decoration: none; }
nav a.current { color: var(--brand); font-weight: 500; background: linear-gradient(90deg, var(--brand-soft), transparent); }
nav a.current::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-foot { padding: 12px 0 22px; border-top: 1px solid var(--line); }
.navlink { width: 100%; background: none; border: 0; border-radius: 0; font-family: inherit; justify-content: flex-start; cursor: pointer; }

.shell { margin-left: var(--side); min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.top .brand { display: none; }
.today { color: var(--muted); }
.me { display: flex; align-items: center; gap: 12px; padding-left: 20px; border-left: 1px solid var(--line); }
.me .avatar { width: 40px; height: 40px; font-size: 14px; }
.me-text { display: flex; flex-direction: column; line-height: 1.25; }
.me-text strong { font-weight: 500; }
.me-text small { color: var(--muted); font-size: 12.5px; }
.me-logout { display: none; }

main { max-width: 1240px; padding: 28px 28px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; box-shadow: var(--shadow); }
.card h2 { margin: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.card-head .label svg { color: var(--ok); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 18px 20px 0; }
.card.flush .scroll, .card.flush .empty { border: 0; border-radius: 0; box-shadow: none; }
.card.warn { background: var(--warn-soft); border-color: transparent; box-shadow: none; }
.card.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.card.split p { margin: 0; }
.chip-note { padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--text); white-space: nowrap; }

/* Summary tiles */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.stat strong { display: block; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 8px; }
.chip svg { width: 16px; height: 16px; }
.chip.violet { background: var(--brand-soft); color: var(--brand); }
.chip.green { background: var(--ok-soft); color: var(--ok); }
.chip.blue { background: var(--info-soft); color: var(--info); }
.chip.orange { background: var(--warn-soft); color: var(--warn); }

/* Dashboard layout */
.dash { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 5; }
.chart .axis { fill: var(--muted); font-size: 12px; }
.chart .ghost { fill: var(--brand); opacity: 0.07; }
.chart .bar { fill: url(#barFill); }
.chart g:hover .bar { filter: brightness(1.12); }
.bar-from { stop-color: var(--bar-from); }
.bar-to { stop-color: var(--bar-to); }

.segbar { display: block; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; }
.seg-empty { fill: var(--line); }
.seg-pending { fill: #f2994a; background: #f2994a; }
.seg-approved { fill: var(--brand); background: var(--brand); }
.seg-paid { fill: #2f80ed; background: #2f80ed; }
.seg-pcts { display: flex; justify-content: space-between; margin: 10px 2px 14px; font-size: 13.5px; font-weight: 500; }
.kv { display: flex; justify-content: space-between; margin: 0 2px 12px; font-weight: 500; }
.kv strong { font-weight: 600; }
.pill-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14.5px; }
.pill-row:hover { background: var(--raised); text-decoration: none; }
.pill-row .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-row b { margin-left: auto; font-weight: 500; }
.pill-row i { font-style: normal; font-weight: 500; padding-left: 10px; border-left: 1px solid var(--line); min-width: 44px; text-align: right; }
.state { font-size: 13.5px; font-weight: 500; }
.state.ok { color: var(--ok); }
.state.off { color: var(--warn); margin-bottom: 6px; }
.run-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.run-line strong { font-size: 22px; font-weight: 600; }

/* Time clock */
.hero { text-align: center; padding: 34px 22px 26px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.hero.on { border-color: transparent; background: linear-gradient(150deg, #4a2fd6, #7a5cf7 55%, #9d86fb); color: #fff; box-shadow: 0 12px 30px rgba(91, 62, 240, 0.28); }
.hero.on .eyebrow { color: #fff; }
.hero.on .dot { background: #6ff0b4; animation: pulse 1.8s ease-out infinite; }
.hero.on .sub, .hero.on label { color: rgba(255, 255, 255, 0.82); }
.hero.on input { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.hero.on input::placeholder { color: rgba(255, 255, 255, 0.6); }
.hero.on input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.hero .time { font-size: clamp(48px, 13vw, 72px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 10px 0 2px; }
.hero .sub { color: var(--muted); margin-bottom: 22px; }
.hero form { max-width: 420px; margin: 0 auto; display: grid; gap: 14px; text-align: left; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 240, 180, 0.6); } 100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .hero.on .dot { animation: none; } }

/* ---------- Forms ---------- */
label { display: block; font-weight: 500; font-size: 14px; color: var(--text); }
input, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:disabled, select:disabled { opacity: 0.6; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: 15px; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.stack { display: grid; gap: 16px; max-width: 480px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card .stack, .auth .stack { max-width: none; background: none; border: 0; padding: 0; box-shadow: none; }
.card .stack { max-width: 420px; }
.stack .row { display: flex; align-items: center; gap: 16px; }
.inline { display: inline; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; font: inherit; font-weight: 500;
  color: var(--on-brand); background: var(--brand); border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 22%, transparent);
}
button:hover, .button:hover { background: var(--brand-strong); text-decoration: none; }
button:active { transform: translateY(1px); }
.button svg, button svg { width: 16px; height: 16px; }
button.big { width: 100%; padding: 19px; font-size: 19px; border-radius: 14px; }
button.danger { background: var(--danger); color: #fff; box-shadow: none; }
button.danger:hover { background: var(--danger-strong); }
button.big.stop { background: #fff; color: #4a2fd6; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
button.big.stop:hover { background: #f3f0ff; }
button.secondary, .button.secondary { background: var(--card); color: var(--text); border-color: var(--line); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { background: var(--raised); border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
button.ghost { background: none; color: var(--muted); padding: 8px; box-shadow: none; }
button.ghost:hover { background: var(--raised); color: var(--text); }
button.ghost svg { width: 20px; height: 20px; }
button.link { padding: 0; background: none; border: 0; color: var(--brand); font-weight: 500; box-shadow: none; }
button.link:hover { background: none; text-decoration: underline; }
button.link.quiet-danger { color: var(--danger); }
button.navlink { color: var(--text); box-shadow: none; font-weight: 400; padding: 12px 24px; }
button.navlink:hover { background: var(--raised); }
button.navlink svg { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .actions { margin: 0; }

/* ---------- Tables ---------- */
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { background: var(--raised); color: var(--text); font-size: 14px; font-weight: 500; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--raised); }
tr:last-child td { border-bottom: 0; }
td a, td button.link { font-weight: 500; }
td .inline + a, td a + .inline, td .inline + .inline { margin-left: 14px; }
td small { color: var(--muted); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.person { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; background: var(--brand-soft); color: var(--brand); }
.avatar.hue1 { background: var(--info-soft); color: var(--info); }
.avatar.hue2 { background: var(--warn-soft); color: var(--warn); }
.avatar.hue3 { background: var(--danger-soft); color: var(--danger); }
.avatar.hue4 { background: var(--ok-soft); color: var(--ok); }
.avatar.hue5 { background: color-mix(in srgb, #d946ef 14%, var(--card)); color: color-mix(in srgb, #d946ef 75%, var(--text)); }

.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.tabs a { padding: 7px 14px; border-radius: 9px; font-weight: 500; font-size: 14px; text-transform: capitalize; color: var(--muted); }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.current { color: var(--brand); background: var(--brand-soft); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; background: color-mix(in srgb, var(--muted) 14%, var(--card)); color: var(--muted); }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.pending, .badge.draft, .badge.partial, .badge.incomplete { background: var(--warn-soft); color: var(--warn); }
.badge.approved { background: var(--brand-soft); color: var(--brand); }
.badge.paid, .badge.ready { background: var(--ok-soft); color: var(--ok); }
.badge.failed { background: var(--danger-soft); color: var(--danger); }

.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 20px; border-radius: 12px; font-weight: 500; background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.error { color: var(--danger); }
.total { font-size: 18px; font-weight: 600; margin: 14px 0; }
code { padding: 3px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; font: 600 14px ui-monospace, 'SF Mono', Menlo, Consolas, monospace; user-select: all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- Login and setup ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(900px 480px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
body.auth main { width: 100%; max-width: 420px; padding: 32px 20px; text-align: center; }
body.auth .card { text-align: left; padding: 28px; margin: 22px 0 18px; }
body.auth h1 { font-size: 22px; margin-bottom: 20px; }
body.auth .stack button { width: 100%; padding: 13px; }
.brand.big { justify-content: center; font-size: 26px; }
.brand.big .logo { width: 42px; height: 42px; }
body.auth .back { margin: 18px 0 0; text-align: center; font-size: 14.5px; }

/* ---------- Shared tablet: crew screen and PIN pad ---------- */
body.auth.wide main { max-width: 980px; }
body.auth.wide .card { padding: 30px; }
body.auth.wide h1 { font-size: 26px; text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 22px 12px 18px; text-align: center; color: var(--text); background: var(--bg); border: 2px solid transparent; border-radius: 18px; transition: transform 0.12s, background 0.12s, border-color 0.12s; }
.tile:hover, .tile:active { text-decoration: none; background: var(--brand-soft); border-color: var(--brand); transform: translateY(-2px); }
.tile .avatar { width: 84px; height: 84px; font-size: 28px; margin-bottom: 8px; }
.tile strong { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.tile small { max-width: 100%; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .on-clock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--ok); }
.tile .on-clock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pin-who { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 19px; }
.pin-who .avatar { width: 84px; height: 84px; font-size: 28px; }
.pin-form { display: grid; gap: 18px; justify-items: center; }
input.pin { width: 200px; padding: 12px; text-align: center; font-size: 34px; letter-spacing: 0.4em; text-indent: 0.4em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 320px; }
.keypad button { padding: 0; height: 68px; font-size: 26px; font-weight: 500; border-radius: 16px; touch-action: manipulation; }
.keypad button[data-key="clear"] { font-size: 15px; color: var(--muted); }
.kiosk-done { margin: 0 0 18px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
  .dash-side .card { margin: 0; }
}

/* Phones: the sidebar becomes a bottom tab bar */
@media (max-width: 820px) {
  .side { inset: auto 0 0 0; width: auto; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .side .brand, .side-foot { display: none; }
  nav { flex-direction: row; gap: 0; padding: 0; }
  nav a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11.5px; color: var(--muted); }
  nav a:hover, nav a.current { background: none; }
  nav a.current::before { display: none; }
  .shell { margin-left: 0; }
  .top { height: 60px; padding: 0 16px; }
  .top .brand { display: flex; font-size: 18px; }
  .today, .me-text { display: none; }
  .me { padding-left: 0; border-left: 0; gap: 4px; }
  .me .avatar { width: 34px; height: 34px; font-size: 12.5px; }
  .me-logout { display: block; }
  main { padding: 20px 16px 110px; }
  h1 { font-size: 22px; }
  .stat-grid, .stat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 18px; }
  .stat-top { font-size: 13.5px; }
  th, td { padding: 12px 14px; }
  .stack, .card .stack { max-width: none; }
}

/* Cartoon avatars and the picker */
.avatar.pic { overflow: hidden; }
.avatar.pic img { width: 72%; height: 72%; display: block; }
.me-avatar { display: inline-flex; border-radius: 50%; transition: transform 0.12s, box-shadow 0.12s; }
.me-avatar:hover { transform: scale(1.06); box-shadow: 0 0 0 3px var(--brand-soft); }
.avatar-picker h2 { margin-top: 26px; }
.avatar-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-now > div { flex: 1; min-width: 150px; }
.avatar-now p { margin: 2px 0 0; }
.avatar-now .avatar { width: 72px; height: 72px; font-size: 24px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; }
button.pick { aspect-ratio: 1; padding: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 2px solid transparent; border-radius: 18px; box-shadow: none; transition: transform 0.12s, background 0.12s, border-color 0.12s; }
button.pick img { width: 62%; height: 62%; display: block; }
button.pick:hover { background: var(--brand-soft); transform: translateY(-2px) scale(1.05); }
button.pick.current { background: var(--brand-soft); border-color: var(--brand); }
.credit { margin: 22px 0 0; }

/* Pop-up forms */
dialog.modal { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 24px 70px rgba(20, 16, 60, 0.28); }
dialog.modal::backdrop { background: rgba(24, 20, 56, 0.45); }
dialog.modal[open] { animation: modal-in 0.16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
dialog.modal .stack { max-width: none; border: 0; box-shadow: none; padding: 26px; background: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 19px; }
dialog.modal .stack p { margin: 0; }
dialog.modal .row { margin-top: 4px; }
.card.good { background: var(--ok-soft); border-color: transparent; box-shadow: none; }
.card.good h2 { margin-top: 0; }
