/* Records dashboard — same dark palette as the kiosk, normal responsive layout. */
@font-face { font-family: 'Display'; src: url('/assets/fonts/BarlowCondensed-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'KioskMono'; src: url('/assets/fonts/DejaVuSansMono.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0b0b0d;
  --panel: #151518;
  --line: #2c2c31;
  --text: #f4f4f6;
  --muted: #a3a3ab;
  --pink: #ff3597;
  --danger: #ff5c6c;
  --cta: linear-gradient(90deg, #ff5a00 0%, #ff0047 18%, #ff0080 60%, #6a00a0 100%);
  --font-display: 'Display', 'Arial Narrow', sans-serif;
  --font-mono: 'KioskMono', Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); margin: 4px 0 0; }
.eyebrow { margin: 0 0 4px; font: 12px/1 var(--font-mono); letter-spacing: .12em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; color: var(--text); background: none; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--cta); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: var(--line); background: #1d1d21; }
.btn-ghost:hover { background: #26262b; }
.btn-danger { background: #b3122b; }
.btn-danger:hover { background: #cf1a35; }
.btn-danger-ghost { border-color: #5c1f28; color: #ff9aa6; background: none; }
.btn-danger-ghost:hover { background: #2a1216; }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 13px; }

/* Layout */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line);
  background: linear-gradient(#000, var(--bg)); position: relative; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--cta); }
.topbar h1 { font: 800 34px/1 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions form { margin: 0; }
.page { max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; display: grid; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.panel h2 { font-size: 18px; }

.kiosk-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.danger-panel { border-color: #5c1f28; }
.reset-grid { margin-top: 16px; }
.kiosk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kiosk-status { margin: 0 6px 0 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kiosk-status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #666; }
.kiosk-status.on::before { background: #2fd27a; box-shadow: 0 0 0 3px #2fd27a33; }

.records-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.records-actions { display: flex; gap: 8px; }
.count { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: #26262b; color: var(--muted); font: 600 13px/1.4 var(--font-mono); vertical-align: middle; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filters label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.filter-search { flex: 1 1 280px; }
input, select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #0e0e10; color: var(--text); font: inherit; }
input:focus, select:focus { border-color: var(--pink); outline: none; }

.banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 6px; background: #381127; border-left: 4px solid var(--pink); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: #1b1b1f; font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
td.name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
td.email { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
tbody tr:hover { background: #1a1a1e; }
tr.is-hidden td:not(.actions) { color: #7b7b83; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill-visible { background: #12301f; color: #6be3a0; }
.pill-hidden { background: #2b2b30; color: #b9b9c0; }
.pill-manual { background: #2a1f38; color: #c7a6ff; }
.pill-kiosk { background: #1b2433; color: #8fb8ff; }
td.actions { text-align: right; }
td.actions .btn + .btn { margin-left: 6px; }
.empty { margin: 0; padding: 28px; text-align: center; color: var(--muted); }

/* Dialogs */
dialog { width: min(560px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
dialog::backdrop { background: #000a; }
dialog h2 { margin-bottom: 14px; font-size: 20px; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-grid label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.dialog-grid label:first-child { grid-column: 1 / -1; }
.consent-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-error { margin: 12px 0 0; color: #ff9aa6; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #2a0a1d, var(--bg) 60%); }
.login-card { width: min(400px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.login-card h1 { margin-bottom: 22px; font: 800 40px/1 var(--font-display); text-transform: uppercase; }
.login-card form { display: grid; gap: 8px; }
.login-card label { font-size: 13px; color: var(--muted); }
.login-card .btn { margin-top: 12px; min-height: 44px; }
.muted-link { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .dialog-grid { grid-template-columns: 1fr; }
}
