/*
 * WorkSense Monitor — dashboard theme (dark sidebar + orange accent),
 * matching the provided reference screens: Login -> Live Monitor ->
 * Sessions -> Monthly Data -> Data Export. Shared with the vanilla
 * static site at ../../backend/static/style.css — keep both in sync
 * if you touch tokens here.
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:#0E0F12;        --sidebar:#15171B;    --card:#1B1D22;      --card-2:#22252B;
  --accent:#FF7A1A;    --accent-deep:#E0630A; --accent-tint:rgba(255,122,26,.14);
  --green:#22C55E;     --green-tint:rgba(34,197,94,.14);
  --red:#EF4444;       --red-tint:rgba(239,68,68,.14);
  --amber:#F5A524;     --amber-tint:rgba(245,165,36,.14);
  --blue:#3B82F6;      --blue-tint:rgba(59,130,246,.14);
  --purple:#A855F7;    --purple-tint:rgba(168,85,247,.14);
  --yellow:#EAB308;    --yellow-tint:rgba(234,179,8,.14);
  --orange:#F97316;    --orange-tint:rgba(249,115,22,.14);
  --ink:#F2F3F5;       --ink-dim:#9BA1AB;    --ink-faint:#6B7280;
  --hair:rgba(255,255,255,.08); --hair-2:rgba(255,255,255,.14);
  --r-sm:8px; --r-md:12px; --r-lg:16px;
  --font-body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Code","Roboto Mono",Menlo,Consolas,monospace;
}
/* Light mode — same accent/signal colors, swapped surfaces/text.
   Toggled via [data-theme="light"] on <html> (see the sun/moon
   button in the sidebar); default (no attribute) stays dark. The
   Login screen keeps its own fixed-light styling either way, since
   the reference always shows it light. */
[data-theme="light"] {
  --bg:#F3F4F6;        --sidebar:#FFFFFF;    --card:#FFFFFF;      --card-2:#F1F2F4;
  --ink:#181A1E;       --ink-dim:#5B6169;    --ink-faint:#8A9099;
  --hair:rgba(0,0,0,.08); --hair-2:rgba(0,0,0,.14);
}
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
button { font-family: inherit; }

/* ── app shell: sidebar + content ─────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--hair); display: flex; flex-direction: column; padding: 20px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 22px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #1a0e00; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.brand-sub { font-size: 10px; color: var(--ink-faint); margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink-dim); font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: transparent; text-align: left; width: 100%; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--card); color: var(--ink); }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.nav-item.active { background: var(--accent-tint); color: var(--accent); border-left-color: var(--accent); }
.logout-item { margin-top: 8px; margin-bottom: 14px; }
.logout-item:hover { background: var(--red-tint); color: var(--red); }

.sidebar-promo { margin-top: auto; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 14px; }
.sidebar-promo-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sidebar-promo-icon svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
.sidebar-promo-title { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.sidebar-promo-sub { font-size: 11px; color: var(--ink-faint); line-height: 1.5; }

.theme-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--hair); }
.theme-toggle-label { font-size: 11.5px; font-weight: 700; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; }
.theme-toggle-label svg { width: 15px; height: 15px; stroke: var(--ink-dim); fill: none; stroke-width: 1.8; }
.theme-switch { width: 40px; height: 22px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--hair-2); position: relative; cursor: pointer; flex-shrink: 0; }
.theme-switch-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-faint); transition: transform .2s, background .2s; }
[data-theme="light"] .theme-switch-knob { transform: translateX(18px); background: var(--accent); }

.content { flex: 1; min-width: 0; padding: 22px 28px 40px; }
.content-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 800; }
.page-sub { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.date-pill { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12px; color: var(--ink-dim); }
.date-pill b { color: var(--ink); font-weight: 700; }
.date-pill svg { width: 14px; height: 14px; stroke: var(--ink-faint); fill: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--hair); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar svg { width: 18px; height: 18px; stroke: var(--ink-dim); fill: none; stroke-width: 1.8; }

/* ── cards / stat grid (reused across pages) ─────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.stat-icon { width: 42px; height: 42px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 20px; height: 20px; stroke-width: 1.8; fill: none; }
.stat-icon.orange { background: var(--accent-tint); } .stat-icon.orange svg { stroke: var(--accent); }
.stat-icon.green { background: var(--green-tint); } .stat-icon.green svg { stroke: var(--green); }
.stat-icon.red { background: var(--red-tint); } .stat-icon.red svg { stroke: var(--red); }
.stat-icon.purple { background: rgba(168,85,247,.14); } .stat-icon.purple svg { stroke: #A855F7; }
.stat-label { font-size: 11.5px; color: var(--ink-dim); margin-bottom: 3px; }
.stat-value { font-size: 19px; font-weight: 800; }
.stat-delta { font-size: 10.5px; margin-top: 2px; }
.stat-delta.up { color: var(--green); } .stat-delta.down { color: var(--red); }

.panel { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 18px; }
.panel-title { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.panel-sub { font-size: 12px; color: var(--ink-dim); margin-bottom: 16px; }

/* ── tabs (date range / day-of-week) ──────────────────────── */
.tab-row { display: flex; gap: 6px; background: var(--card-2); border-radius: var(--r-sm); padding: 4px; flex-wrap: wrap; }
.tab-row.days { overflow-x: auto; }
.tab { padding: 8px 16px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-dim); background: transparent; border: none; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--accent); color: #1a0e00; }

/* ── tables ────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; padding: 0 10px 10px; color: var(--ink-faint); font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--hair-2); }
td { padding: 11px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.emp-name { font-weight: 700; }
.emp-id { font-size: 10.5px; color: var(--ink-faint); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-tint); color: var(--green); }
.badge-amber { background: var(--amber-tint); color: var(--amber); }
.badge-red { background: var(--red-tint); color: var(--red); }
.badge-blue { background: var(--blue-tint); color: var(--blue); }
.badge-purple { background: var(--purple-tint); color: var(--purple); }
.badge-yellow { background: var(--yellow-tint); color: var(--yellow); }
.badge-orange { background: var(--orange-tint); color: var(--orange); }
.empty { color: var(--ink-faint); text-align: center; padding: 30px; font-size: 13px; }

/* ── employee detail panel (Monthly Overview drill-down) ───── */
.emp-card-click { cursor: pointer; transition: border-color .15s, transform .15s; border: 1px solid transparent; }
.emp-card-click:hover { border-color: var(--accent); transform: translateY(-1px); }
.emp-detail-summary { font-size: 13.5px; line-height: 1.6; color: var(--ink); background: var(--card-2); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.trend-chart-wrap { position: relative; }
.trend-tooltip { position: absolute; background: var(--card-2); border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 8px 11px; font-size: 11.5px; pointer-events: none; transform: translate(-50%, -100%); white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 5; }
.trend-tooltip b { color: var(--accent); }
.trend-bar { cursor: pointer; }
.trend-bar:hover { opacity: .85; }
.trend-legend { display: flex; gap: 16px; font-size: 11px; color: var(--ink-dim); margin-top: 10px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.weekday-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.weekday-tile { background: var(--card-2); border-radius: var(--r-md); padding: 12px 14px; }
.weekday-tile .wd-label { font-size: 11.5px; color: var(--ink-dim); font-weight: 700; margin-bottom: 6px; }
.weekday-tile .wd-hours { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.scale-toggle { display: inline-flex; gap: 4px; background: var(--card-2); border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 3px; margin-bottom: 12px; }
.scale-toggle button { border: none; background: transparent; color: var(--ink-dim); font-size: 12px; font-weight: 700; padding: 6px 13px; border-radius: 6px; cursor: pointer; }
.scale-toggle button.active { background: var(--accent); color: #1a0e00; }

.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12px; color: var(--ink-dim); }
.pagination .switch { padding: 6px 10px; }

/* ── generic small button ("switch") ─────────────────────── */
.switch { padding: 9px 15px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700; background: var(--card-2); border: 1px solid var(--hair-2); color: var(--ink-dim); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.switch:hover { border-color: var(--accent); color: var(--ink); }
.switch-primary { background: var(--accent); border-color: var(--accent); color: #1a0e00; }
.switch-primary:hover { color: #1a0e00; filter: brightness(1.06); }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE (light theme, separate from the dark app shell)
   ══════════════════════════════════════════════════════════ */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 18px;
  background: radial-gradient(1200px 600px at 50% 120%, rgba(255,122,26,.18), transparent 60%), #FBF7F3; position: relative; overflow: hidden; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-brand .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; box-shadow: 0 10px 24px rgba(255,122,26,.35); }
.login-brand-name { font-size: 26px; font-weight: 800; color: #1A1A1A; }
.login-brand-sub { font-size: 12px; color: #8A8A8A; letter-spacing: .02em; }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 20px; padding: 34px 30px; box-shadow: 0 20px 50px rgba(0,0,0,.12); position: relative; z-index: 1; }
.login-card h1 { font-size: 24px; font-weight: 800; color: #1A1A1A; text-align: center; position: relative; display: inline-block; }
.login-title-wrap { text-align: center; margin-bottom: 6px; }
.login-title-wrap h1::after { content: ''; display: block; width: 46px; height: 3px; background: var(--accent); border-radius: 2px; margin: 8px auto 0; }
.login-card p.lede { text-align: center; font-size: 12.5px; color: #8A8A8A; margin-bottom: 22px; }
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 12px; font-weight: 700; color: #333; margin-bottom: 6px; }
.field-with-icon { position: relative; }
.field-with-icon svg.leading { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: #A0A0A0; fill: none; stroke-width: 1.8; }
.field-with-icon input { width: 100%; padding: 11px 12px 11px 36px; border: 1px solid #E6E1DA; border-radius: 10px; background: #FBF9F6; font-size: 13.5px; color: #1A1A1A; outline: none; }
.field-with-icon input:focus { border-color: var(--accent); background: #fff; }
.field-with-icon .toggle-visibility { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: #A0A0A0; }
.field-with-icon .toggle-visibility svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 12px; }
.login-row label { display: flex; align-items: center; gap: 6px; color: #555; cursor: pointer; }
.login-row a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.login-submit { width: 100%; padding: 12px; border-radius: 10px; border: none; background: var(--accent); color: #1a0e00; font-weight: 800; font-size: 14px; cursor: pointer; }
.login-submit:hover { filter: brightness(1.05); }
.login-submit:disabled { opacity: .6; cursor: default; }
.login-err { color: #C0392B; font-size: 11.5px; font-weight: 600; text-align: center; margin-top: 10px; min-height: 14px; }
.login-trust { display: flex; justify-content: center; gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #F0EBE4; }
.login-trust span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #9A9A9A; font-weight: 600; }
.login-trust svg { width: 13px; height: 13px; stroke: var(--accent); fill: none; stroke-width: 2; }

/* ══════════════════════════════════════════════════════════
   LIVE MONITOR
   ══════════════════════════════════════════════════════════ */
.monitor-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 760px) { .monitor-grid { grid-template-columns: 1fr; } }

.status-card { border-radius: var(--r-lg); padding: 26px 28px; display: flex; align-items: center; gap: 22px;
  background: linear-gradient(160deg, rgba(34,197,94,.16), rgba(34,197,94,.05)); border: 1px solid rgba(34,197,94,.3); }
.status-card.away { background: linear-gradient(160deg, rgba(239,68,68,.16), rgba(239,68,68,.05)); border-color: rgba(239,68,68,.3); }
.status-card.pending { background: linear-gradient(160deg, rgba(245,165,36,.16), rgba(245,165,36,.05)); border-color: rgba(245,165,36,.3); }
.status-chair { position: relative; width: 96px; height: 96px; border-radius: var(--r-lg); background: rgba(34,197,94,.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-card.away .status-chair { background: rgba(239,68,68,.16); }
.status-card.pending .status-chair { background: rgba(245,165,36,.16); }
.status-chair svg.chair { width: 52px; height: 52px; stroke: var(--green); fill: none; stroke-width: 1.6; }
.status-card.away .status-chair svg.chair { stroke: var(--red); }
.status-card.pending .status-chair svg.chair { stroke: var(--amber); }
.status-chair .badge-dot { position: absolute; bottom: -4px; right: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; border: 3px solid var(--card); }
.status-card.away .status-chair .badge-dot { background: var(--red); }
.status-card.pending .status-chair .badge-dot { background: var(--amber); }
.status-chair .badge-dot svg { width: 13px; height: 13px; stroke: #0E0F12; fill: none; stroke-width: 2.6; }
.status-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 4px; }
.status-word { font-size: 28px; font-weight: 800; letter-spacing: .02em; }
.status-card.away .status-word { color: var(--red); }
.status-card:not(.away):not(.pending) .status-word { color: var(--green); }
.status-card.pending .status-word { color: var(--amber); }
.status-detail { font-size: 12.5px; color: var(--ink-dim); margin-top: 6px; }

.overview-card { display: flex; flex-direction: column; gap: 14px; }
.overview-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.overview-row:last-child { border-bottom: none; padding-bottom: 0; }
.overview-label { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-dim); }
.overview-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.overview-dot.away { background: var(--red); }
.overview-value { font-size: 14px; font-weight: 700; }

.dial-panel { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dial { position: relative; width: 170px; height: 85px; border-radius: 170px 170px 0 0; overflow: hidden;
  background: conic-gradient(from -90deg at 50% 100%, var(--green) 0deg 100deg, var(--amber) 100deg 128deg, var(--red) 128deg 180deg); flex-shrink: 0; }
.dial::after { content: ''; position: absolute; inset: 14px 14px 0 14px; background: var(--card); border-radius: 170px 170px 0 0; }
.needle { position: absolute; left: 50%; bottom: 0; width: 3px; height: 68px; margin-left: -1.5px; background: var(--ink); border-radius: 2px 2px 0 0; transform-origin: bottom center; transform: rotate(-90deg); z-index: 2; }
@media (prefers-reduced-motion: no-preference) { .needle { transition: transform .4s ease-out; } }
.dial-hub { position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--ink-dim); z-index: 3; }
.dial-value { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 800; font-family: var(--font-mono); z-index: 2; }
.dial-labels { display: flex; justify-content: space-between; width: 170px; margin-top: 2px; font-size: 9.5px; color: var(--ink-faint); }
.dial-side { flex: 1; min-width: 160px; }
.dial-cap { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 6px; }
.range-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; background: var(--green-tint); color: var(--green); }
.range-pill.out { background: var(--red-tint); color: var(--red); }

.legend-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.legend-swatch { flex: 1; min-width: 140px; border-radius: var(--r-md); padding: 12px 14px; border: 1px solid var(--hair); background: var(--card-2); }
.legend-swatch .lbl { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 4px; }
.legend-swatch .val { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.legend-swatch .val::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.legend-swatch.on .val::before { background: var(--green); }
.legend-swatch.off .val::before { background: var(--red); }

/* ── simulated hardware (dev tool, visually distinct) ────── */
.sim-panel { border: 1px dashed var(--accent); background: var(--accent-tint); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sim-panel b { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--accent); width: 100%; }
.sim-btn { padding: 7px 13px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid var(--hair-2); background: var(--card-2); cursor: pointer; color: var(--ink-dim); }
.sim-btn:hover { border-color: var(--accent); color: var(--ink); }
.sim-btn.on { background: var(--accent); border-color: var(--accent); color: #1a0e00; }

/* ══════════════════════════════════════════════════════════
   DATA EXPORT
   ══════════════════════════════════════════════════════════ */
.export-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.format-card { border: 1.5px solid var(--hair-2); background: var(--card-2); border-radius: var(--r-md); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.format-card.selected { border-color: var(--accent); background: var(--accent-tint); }
.format-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.format-name { font-size: 13px; font-weight: 700; }
.format-ext { font-size: 10.5px; color: var(--ink-faint); }
.format-radio { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--hair-2); }
.format-card.selected .format-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 5px, transparent 6px); }

/* ── modal (badge tap) ────────────────────────────────────── */
#modal-overlay { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(10,11,12,.72); align-items: center; justify-content: center; }
#modal-overlay.open { display: flex; }
#modal-box { background: var(--card); border-radius: var(--r-lg); padding: 32px 26px 26px; width: 340px; max-width: 92vw; border: 1px solid var(--hair-2); position: relative; box-shadow: 0 20px 48px rgba(0,0,0,.5); }
.slot { position: absolute; top: -1px; left: 50%; transform: translate(-50%,-50%); width: 68px; height: 16px; background: var(--bg); border-radius: 0 0 10px 10px; box-shadow: inset 0 3px 5px rgba(0,0,0,.65), 0 1px 0 var(--hair-2); }
#modal-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
#modal-box p { font-size: 12px; color: var(--ink-dim); margin-bottom: 18px; line-height: 1.5; }
.inp-label { font-size: 10.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 6px; }
#modal-uid-display { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); background: var(--bg); padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--hair-2); margin-bottom: 16px; display: inline-block; }
#user-id-input { width: 100%; padding: 11px 12px; border: 1px solid var(--hair-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; font-family: var(--font-mono); outline: none; }
#user-id-input:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.btn { padding: 10px 18px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid transparent; font-family: var(--font-body); }
.btn-confirm { background: var(--accent); color: #1a0e00; flex: 1; }
.btn-cancel { background: transparent; color: var(--ink-dim); border-color: var(--hair-2); }
.err-msg { font-size: 11px; color: var(--red); margin-top: 8px; min-height: 14px; font-weight: 600; }

.footnote { font-size: 10.5px; color: var(--ink-faint); text-align: center; margin-top: 10px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: no-preference) { .pulsing { animation: pulse .9s step-end infinite; } }

@media (max-width: 780px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; padding: 12px 14px; }
  .sidebar-promo { display: none; }
  .nav { flex-direction: row; }
  .content { padding: 18px 16px 32px; }
}
