/* BEM time clock — one stylesheet for gate, phone app, kiosk and admin.
   Theme: light by default, dark via the device setting or data-theme="dark" (see theme.js). */

:root {
  --bg: #f3f5f8; --bg-2: #e9edf2; --card: #ffffff; --card-2: #f7f9fb;
  --text: #0b1220; --muted: #667085; --line: #e3e7ed;
  --brand: #0d9488; --brand-2: #14b8a6; --brand-deep: #0c4a5e; --brand-ink: #ffffff; --mint: #5eead4;
  --out: #e11d48; --out-2: #fb7185;
  --good: #047857; --good-bg: #d1fae5; --warn: #b45309; --warn-bg: #fef3c7; --bad-bg: #ffe4e6;
  --radius: 20px; --radius-sm: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 6px 20px rgb(16 24 40 / .06);
  --shadow-lg: 0 18px 40px rgb(16 24 40 / .14);
  --blur-bg: rgb(243 245 248 / .78);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b111c; --bg-2: #0f1726; --card: #131c2c; --card-2: #182234;
    --text: #e8edf5; --muted: #8d99ad; --line: #222d42;
    --good: #34d399; --good-bg: rgb(16 185 129 / .16); --warn: #fbbf24; --warn-bg: rgb(251 191 36 / .14); --bad-bg: rgb(244 63 94 / .16);
    --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 18px 40px rgb(0 0 0 / .5);
    --blur-bg: rgb(11 17 28 / .78);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b111c; --bg-2: #0f1726; --card: #131c2c; --card-2: #182234;
  --text: #e8edf5; --muted: #8d99ad; --line: #222d42;
  --good: #34d399; --good-bg: rgb(16 185 129 / .16); --warn: #fbbf24; --warn-bg: rgb(251 191 36 / .14); --bad-bg: rgb(244 63 94 / .16);
  --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 18px 40px rgb(0 0 0 / .5);
  --blur-bg: rgb(11 17 28 / .78);
  color-scheme: dark;
}

/* ---------------- base ---------------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Ethiopic", system-ui, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100dvh;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--brand); }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; }
.error { color: var(--out); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.strong { font-weight: 700; }
.row { display: flex; align-items: center; gap: .5rem; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-top: .5rem; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: .6rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.logo { display: block; border-radius: 22%; box-shadow: 0 6px 18px rgb(13 148 136 / .3); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; border: 1px solid var(--line); }
.card.narrow { max-width: 420px; width: 100%; }
.center-page { display: grid; place-items: center; min-height: 100dvh; padding: 16px; text-align: center; }
.center-page .card { text-align: center; }
.center-page .stack { text-align: left; }

input, select, textarea {
  font: inherit; color: inherit; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  padding: .75rem .9rem; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgb(20 184 166 / .18); }
label { font-weight: 600; font-size: .9rem; }
.code-input { font-size: 1.8rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line);
  background: var(--card); color: var(--text); padding: .7rem 1.1rem; border-radius: 12px;
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px;
  transition: transform .08s ease, background-color .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 16px rgb(13 148 136 / .28); }
.btn.ghost { background: transparent; }
.btn.small { padding: .4rem .75rem; min-height: 34px; font-size: .88rem; }
.btn.big { width: 100%; padding: 1rem; font-size: 1.05rem; margin: .5rem 0; border-radius: 16px; }
.btn.danger, .link.danger { color: var(--out); }
.btn.danger-outline { color: var(--out); border-color: color-mix(in srgb, var(--out) 35%, transparent); background: transparent; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font-family: inherit; font-size: .8rem; padding: 0 .3rem; text-decoration: underline; }

.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: .14rem .55rem; border-radius: 999px; background: var(--bg-2); color: var(--text); margin: 0 .2rem .15rem 0; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.good { background: var(--good-bg); color: var(--good); }
.zone-pill { font-size: .78rem; font-weight: 700; color: var(--good); background: var(--good-bg); padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.zone-pill::before { content: "● "; }
.zone-pill:empty { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px) scale(.96);
  background: var(--text); color: var(--bg); padding: .8rem 1.15rem; border-radius: 16px; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s, visibility .2s; opacity: 0; visibility: hidden; pointer-events: none;
  max-width: calc(100vw - 32px); z-index: 60;
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; visibility: visible; }
.toast.good { background: var(--good); color: #fff; }
.toast.bad { background: var(--out); color: #fff; }
.pwa .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* segmented control (appearance switch) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-2); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented button { border: 0; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: .88rem; padding: .5rem .4rem; border-radius: 9px; cursor: pointer; transition: background .2s, color .2s; }
.segmented button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---------------- gate (location check) ---------------- */
.gate .card { padding: 28px 22px; }
.radar { position: relative; width: 132px; height: 132px; margin: 0 auto 18px; display: grid; place-items: center; }
.radar .logo { position: relative; z-index: 2; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px solid var(--brand-2); opacity: 0; }
.radar.busy::before, .radar.busy::after { animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.radar.busy::after { animation-delay: .9s; }
.radar.good::before { opacity: 1; inset: 6px; border-color: var(--good); border-width: 3px; }
.radar.bad::before { opacity: 1; inset: 6px; border-color: var(--out); border-width: 3px; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.gate-msg { min-height: 3em; }
.badge-x { position: absolute; z-index: 3; right: 22px; bottom: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--out); color: #fff; display: grid; place-items: center; font-weight: 800; border: 3px solid var(--card); }

/* ---------------- phone app (PWA) ---------------- */
body.pwa { overscroll-behavior-y: contain; user-select: none; -webkit-user-select: none; }
body.pwa input { user-select: text; -webkit-user-select: text; }
.appbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 10px; background: var(--blur-bg);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, padding .2s;
}
.appbar h1 { font-size: 2rem; font-weight: 800; margin: 0; letter-spacing: -.02em; transition: font-size .2s; }
.appbar.scrolled { border-bottom-color: var(--line); padding-top: calc(8px + env(safe-area-inset-top)); }
.appbar.scrolled h1 { font-size: 1.15rem; }
.screens { max-width: 560px; margin: 0 auto; padding: 6px 16px calc(100px + env(safe-area-inset-bottom)); }
.screen { animation: slide-in .26s cubic-bezier(.2, .8, .2, 1); }
.screen.from-left { animation-name: slide-in-left; }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-18px); } }

.ptr { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 30; width: 38px; height: 38px; margin-left: -19px;
  border-radius: 50%; background: var(--card); box-shadow: var(--shadow-lg); display: grid; place-items: center; transform: translateY(-80px); opacity: 0; transition: opacity .15s; }
.ptr svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; }
.ptr.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--blur-bg); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line); padding: 6px 10px calc(8px + env(safe-area-inset-bottom));
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  padding: 4px 18px; box-sizing: content-box; border-radius: 999px; transition: background .2s, transform .15s; }
.tabbar a:active svg { transform: scale(.9); }
.tabbar a.active { color: var(--brand); }
.tabbar a.active svg { background: color-mix(in srgb, var(--brand) 15%, transparent); stroke-width: 2.3; }

.greet { margin: 2px 4px 14px; }
.greet-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }

.punch-card { display: grid; justify-items: center; gap: 2px; padding: 20px 18px 18px; position: relative; overflow: hidden; }
.punch-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%); pointer-events: none; }
.punch-card.on::before { background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--out) 9%, transparent), transparent 70%); }
.status-chip { font-size: .8rem; font-weight: 700; padding: .32rem .8rem; border-radius: 999px; background: var(--bg-2); color: var(--muted); position: relative; }
.punch-card.on .status-chip { background: var(--good-bg); color: var(--good); }
.punch-card.on .status-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.timer { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: .35rem; position: relative; }

.punch-wrap { position: relative; width: min(64vw, 236px); aspect-ratio: 1; margin: 14px 0 8px; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--bg-2); }
.ring .prog { stroke: url(#ring-g); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.punch-btn {
  width: 82%; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; color: #fff; position: relative;
  font-family: inherit; font-weight: 800; font-size: 1.35rem; line-height: 1.1;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  background: radial-gradient(circle at 30% 22%, #2dd4bf, var(--brand) 55%, #0b766d);
  box-shadow: 0 14px 30px rgb(13 148 136 / .38), inset 0 -6px 0 rgb(0 0 0 / .12), inset 0 2px 0 rgb(255 255 255 / .18);
  transition: transform .12s ease, box-shadow .2s;
}
.punch-btn.out { background: radial-gradient(circle at 30% 22%, #fb7185, var(--out) 55%, #9f1239); box-shadow: 0 14px 30px rgb(225 29 72 / .34), inset 0 -6px 0 rgb(0 0 0 / .14), inset 0 2px 0 rgb(255 255 255 / .18); }
.punch-btn:active { transform: scale(.95); }
.punch-btn:disabled { opacity: .8; }
.punch-btn svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.punch-btn.working { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .8; } }
.punch-card .tiny { position: relative; }

.stat { padding: 14px 16px; }
.stat-v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; }
.timeline li + li { border-top: 1px solid var(--line); }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.timeline li.out .dot { background: var(--out); box-shadow: 0 0 0 4px color-mix(in srgb, var(--out) 18%, transparent); }
.timeline .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { display: block; padding: 8px 0; }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.icon-btn:disabled { opacity: .35; }
.week-total { text-align: center; font-size: 2.1rem; font-weight: 800; margin: 12px 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.bar { display: grid; justify-items: center; gap: 4px; font-size: .75rem; }
.bar-track { width: 100%; max-width: 30px; height: 110px; background: var(--bg-2); border-radius: 9px; display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill { width: 100%; background: linear-gradient(var(--brand-2), var(--brand)); border-radius: 9px; transition: height .5s ease; }
.bar-v { font-weight: 700; min-height: 1em; } .bar-l { color: var(--muted); }
.bar.today .bar-l { color: var(--brand); font-weight: 800; }
.bar.today .bar-track { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.day-card { padding: 14px 16px; }
.shift-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 0; }
.shift-times { display: flex; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.shift-times .arrow { color: var(--muted); }

.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand-deep)); flex: none; }
.profile-name { font-size: 1.2rem; font-weight: 800; }
.section-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 6px 8px; }
.card.list { padding: 2px 16px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; min-height: 50px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row.col { flex-direction: column; align-items: stretch; gap: 8px; }

.success { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center;
  background: var(--blur-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade-in .2s ease; }
.success .tick { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 14px 36px rgb(4 120 87 / .35); }
.success.out .tick { background: var(--out); box-shadow: 0 14px 36px rgb(225 29 72 / .35); }
.success .tick svg { width: 54px; height: 54px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .2s ease forwards; }
.success-title { font-size: 1.5rem; font-weight: 800; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }

.login-screen { min-height: 100dvh; display: grid; align-content: center; gap: 22px; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; }
.login-hero { display: grid; justify-items: center; gap: 10px; text-align: center; }
.login-hero h1 { margin: 4px 0 0; font-size: 1.7rem; }
.login-card { padding: 22px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 10px 0 18px; min-height: 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); transition: background .1s, border-color .1s, transform .1s; }
.pin-dots span.on { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* keypad — shared by phone PIN entry and the kiosk */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.key { font-family: inherit; font-weight: 600; font-size: 1.7rem; line-height: 1; height: 72px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; box-shadow: var(--shadow); transition: transform .06s, background-color .1s; }
.key:active { transform: scale(.94); background: var(--bg-2); }
.key.ok { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; border-color: transparent; font-weight: 800; }
.key.del { font-size: 1.4rem; background: transparent; box-shadow: none; border-color: transparent; }
.login-card .key { height: 62px; font-size: 1.5rem; }

/* ---------------- kiosk tablet ---------------- */
body.kiosk { overflow: hidden; user-select: none; -webkit-user-select: none; }
.kiosk-grid { display: grid; grid-template-columns: minmax(300px, 38%) 1fr; height: 100dvh; }
.kiosk-side { background: linear-gradient(160deg, #14b8a6, #0d9488 35%, #0c4a5e); color: #fff; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.kiosk-side .brand { margin-bottom: auto; }
.kiosk-side .logo { box-shadow: 0 6px 18px rgb(0 0 0 / .2); }
.k-time { font-size: clamp(2.6rem, 5.6vw, 5.5rem); white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.02em; }
.k-date { font-size: 1.3rem; opacity: .9; }
.k-zone { opacity: .75; margin-bottom: auto; }
.k-code-box { background: rgb(255 255 255 / .13); border-radius: 18px; padding: 14px 16px; margin: 18px 0 12px; }
.k-code { font-size: 2.4rem; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.k-code-bar { height: 4px; background: rgb(255 255 255 / .22); border-radius: 4px; overflow: hidden; }
.k-code-bar span { display: block; height: 100%; background: #fff; width: 100%; }
.kiosk-side .btn.ghost { color: #fff; border-color: rgb(255 255 255 / .3); align-self: flex-start; }
.kiosk-main { display: grid; place-items: center; padding: 24px; }
.k-step { width: min(440px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; }
.k-display { width: 100%; font-size: 2.4rem; font-weight: 800; letter-spacing: .3em; text-align: center; padding: .5rem; border-bottom: 3px solid var(--brand); min-height: 3.6rem; font-variant-numeric: tabular-nums; }
.kiosk .key { height: 78px; font-size: 1.9rem; }
.kiosk .punch-btn { width: min(52vw, 250px); font-size: 1.6rem; }
.k-hello { font-size: 2rem; font-weight: 800; }
.check { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 4rem; color: #fff; background: var(--good); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
#k-error { color: var(--out); font-size: 1rem; min-height: 1.4em; }
@media (max-width: 760px) {
  body.kiosk { overflow: auto; }
  .kiosk-grid { grid-template-columns: 1fr; height: auto; }
  .kiosk-side { padding: 18px; }
}

/* ---------------- admin ---------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--blur-bg);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; }
.brand .logo { box-shadow: none; }
.brand small { font-weight: 600; color: var(--muted); font-size: .85rem; }
.kiosk-side .brand small { color: rgb(255 255 255 / .75); }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; justify-content: center; }
.tabs button { background: none; border: 0; font-family: inherit; font-size: .95rem; font-weight: 600; color: var(--muted); padding: .5rem .85rem; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-card { text-align: left; font-family: inherit; color: inherit; cursor: pointer; position: relative; transition: transform .12s, border-color .15s, box-shadow .15s; }
.stat-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.stat-card:active { transform: scale(.98); }
.stat-card::after { content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--muted); }
.stat-card.alert .stat-v { color: var(--warn); }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--brand-2); } }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.controls .field { min-width: 150px; }
.field { display: grid; gap: .3rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: .6rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
tr.clickable { cursor: pointer; } tr.clickable:hover { background: var(--card-2); }
tr.detail > td { background: var(--card-2); }
tr.inactive, .zone-card.inactive { opacity: .55; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.zone-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 8px; background: var(--card-2); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; width: min(480px, calc(100vw - 32px)); background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgb(15 23 42 / .45); backdrop-filter: blur(3px); }
.check-row { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; align-items: center; font-weight: 600; }
.check-row input { width: auto; }
.check-row .tiny { grid-column: 2; font-weight: 400; }
.info { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 1rem; }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; }
