/* ASTECH Lucky Draw - design system
   One accent colour, flat surfaces, thin borders. Components:
   buttons, badges, cards, stats, tables, forms, status blocks. */

:root {
    --bg: #0a0a0b;
    --surface: #111113;
    --surface-2: #18181b;
    --surface-3: #202024;
    --border: #232327;
    --border-2: #2e2e34;
    --text: #ededef;
    --muted: #a0a0a8;
    --faint: #6b6b74;

    --accent: #e5484d;
    --accent-hover: #ef5f63;
    --accent-soft: rgba(229, 72, 77, 0.12);
    --success: #3dd68c;
    --success-soft: rgba(61, 214, 140, 0.12);
    --warning: #f5a524;
    --warning-soft: rgba(245, 165, 36, 0.12);
    --info: #52a9ff;
    --info-soft: rgba(82, 169, 255, 0.12);

    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: .95em; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.show-xs { display: none; }
.stack > * + * { margin-top: 16px; }
.small { font-size: 13px; }

@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 14px;
    font: inherit; font-weight: 500; font-size: 14px;
    color: var(--text); background: var(--surface-2);
    border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--muted); }
.btn-danger:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.btn .icon-wa { color: var(--success); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }

/* Visible keyboard focus on every clickable element */
a:focus-visible, button:focus-visible, label.btn:focus-within, .tabs a:focus-visible, .nav a:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm);
}
.btn.loading::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px;
    font-size: 12px; font-weight: 500;
    border-radius: 999px; white-space: nowrap;
    background: var(--surface-3); color: var(--muted);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--accent-soft); color: var(--accent); }
.badge-info { background: var(--info-soft); color: var(--info); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); }
.alert .icon { margin-top: 2px; }
.alert-error { border-color: rgba(229,72,77,.35); background: var(--accent-soft); }
.alert-error .icon { color: var(--accent); }
.alert-success { border-color: rgba(61,214,140,.3); background: var(--success-soft); }
.alert-success .icon { color: var(--success); }
.alert-warning { border-color: rgba(245,165,36,.3); background: var(--warning-soft); }
.alert-warning .icon { color: var(--warning); }
.alert-info .icon { color: var(--info); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-flush { padding: 0; }
.card-flush .card-head { padding: 20px 20px 0; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat { padding: 18px 20px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- Key/value list ---------- */
.kv { display: grid; }
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row:first-child { padding-top: 0; }
.kv-row > span:first-child { color: var(--muted); white-space: nowrap; }
.kv-row > b { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Progress ---------- */
.meter { display: grid; gap: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.meter-top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.soft > i { background: rgba(229,72,77,.55); }
.bar.softer > i { background: rgba(229,72,77,.3); }

/* ---------- Chart ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart .col { fill: var(--accent); }
.chart .col:hover { fill: var(--accent-hover); }
.chart .col-empty { fill: var(--surface-3); }
.chart text { fill: var(--faint); font: 11px var(--font); }
.chart .val { fill: var(--muted); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--faint); padding: 10px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.expandable { cursor: pointer; }
.table tr.expandable:hover td { background: var(--surface-2); }
.table .chev { color: var(--faint); transition: transform .15s; vertical-align: -3px; margin-right: 6px; }
.table tr.open .chev { transform: rotate(90deg); color: var(--text); }
.table tr.detail { display: none; }
.table tr.detail.show { display: table-row; }
.table tr.detail td { background: var(--bg); padding: 14px 20px 16px 42px; }
.sub-line { font-size: 12px; color: var(--faint); }
.entry-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 24px; }
.entry-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.entry-list span { color: var(--faint); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; color: var(--faint); margin-bottom: 8px; }
.empty p + p { margin-top: 4px; }

.pagination { display: flex; gap: 4px; justify-content: center; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--muted); }
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination span.current { background: var(--surface-3); color: var(--text); font-weight: 600; }

/* ---------- Forms ---------- */
.field + .field { margin-top: 14px; }
.field label, .label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.input, input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], textarea, select {
    width: 100%; height: 38px; padding: 0 12px;
    font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=datetime-local] { color-scheme: dark; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row .field + .field { margin-top: 0; }
.form-actions { margin-top: 20px; display: flex; gap: 8px; }
.check, .field label.check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 400; margin: 0; }
.field label.check.consent { align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.check.consent input { margin-top: 2px; flex: none; }

/* Privacy notice */
.privacy h2 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.privacy p, .privacy li { color: var(--muted); font-size: 14px; }
.privacy ul { padding-left: 20px; }
.privacy li + li { margin-top: 4px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
/* On/off switch rows */
.switch-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:first-of-type { padding-top: 0; }
.switch-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.switch-row b { display: block; font-weight: 500; }
.switch-row span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.switch-body { flex: 1; min-width: 0; }
.switch-body .field { margin-top: 12px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 36px; height: 20px; margin-top: 2px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2); cursor: pointer; transition: background .15s, border-color .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch:checked { background: var(--success); border-color: var(--success); }
.switch:checked::after { transform: translateX(16px); background: #fff; }
.switch:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

.placeholders { display: grid; gap: 8px; }
.placeholders div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.placeholders code { font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--surface-3); padding: 1px 6px; border-radius: 4px; cursor: pointer; }
.placeholders span { color: var(--faint); text-align: right; }
.message-preview { white-space: pre-wrap; font-size: 13px; line-height: 1.55; padding: 12px 14px; border-radius: var(--radius-sm); background: #0b141a; border: 1px solid var(--border); color: #e9edef; max-height: 340px; overflow: auto; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); display: flex; gap: 8px; }

.search-box { position: relative; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-box input { padding-left: 36px; }

/* Segmented control / tabs */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.tabs a, .tabs label { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; color: var(--muted); font-weight: 500; cursor: pointer; }
.tabs a:hover, .tabs label:hover { color: var(--text); }
.tabs .active, .tabs input:checked + span { background: var(--surface-3); color: var(--text); }
.tabs input { display: none; }
.tabs label { padding: 0; height: auto; }
.tabs label span { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; border-radius: 7px; }

/* ---------- Admin shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 232px; flex: none;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    padding: 16px 12px;
    border-right: 1px solid var(--border);
    background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: #fff; }
.sidebar-close { display: none; margin-left: auto; }
.brand b { display: block; font-size: 14px; font-weight: 600; }
.brand small { display: block; font-size: 12px; color: var(--faint); }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 500; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); }
.nav a.active .icon { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 4px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.user b { font-size: 13px; font-weight: 500; }

.topbar { display: none; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1160px; margin: 0 auto; padding: 32px 32px 56px; animation: fade-up .25s ease-out; }
.page > * + * { margin-top: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page > .page-head + * { margin-top: 0; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.crumbs a:hover { color: var(--text); }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.page-head p { color: var(--muted); margin-top: 4px; }

.overlay { display: none; }

/* Getting started checklist */
.checklist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.checklist a { display: flex; gap: 12px; padding: 4px 16px 4px 0; }
.checklist a + a { padding-left: 16px; border-left: 1px solid var(--border); }
.checklist .step-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.checklist .done .step-dot { background: var(--success); border-color: var(--success); color: #0a0a0b; }
.checklist b { display: block; font-weight: 500; }
.checklist a:hover b { text-decoration: underline; }
.checklist span { font-size: 12px; color: var(--faint); }

/* ---------- QR sheet ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.qr-card { background: #fff; color: #111; border-radius: 10px; padding: 12px 12px 10px; text-align: center; break-inside: avoid; }
.qr-card .qr { width: 100%; max-width: 140px; aspect-ratio: 1; margin: 0 auto; background: #f4f4f5; border-radius: 4px; }
.qr-card .qr svg { width: 100%; height: 100%; display: block; }
.qr-card .code { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .05em; margin-top: 4px; }
.qr-card .cap { font-size: 10px; color: #777; }
.qr-card.used { opacity: .35; }

/* ---------- Lucky draw ---------- */
.draw { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.wheel-wrap { position: relative; width: 100%; max-width: 520px; margin: 8px auto; aspect-ratio: 1; }
.wheel-wrap canvas { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 0 0 6px var(--surface-2), 0 0 0 7px var(--border-2); }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--text); z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.wheel-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); border: 1px solid var(--border-2); display: grid; place-items: center; color: var(--text); cursor: pointer; transition: transform .15s; }
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.wheel-hub .icon { width: 26%; height: 26%; color: var(--accent); }
#stage:fullscreen { background: var(--bg); padding: 32px; overflow: auto; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.72); }
.modal.show { display: flex; }
.modal-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; padding: 28px; text-align: center; animation: fade-up .25s ease-out; }
.modal-card .eyebrow { font-size: 12px; font-weight: 500; color: var(--accent); }
.modal-card h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 2px; }
.modal-card .kv { text-align: left; margin: 20px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Confirmation dialog with choices */
.modal-card.dialog { max-width: 460px; text-align: left; }
.modal-card.dialog h2 { font-size: 17px; font-weight: 600; letter-spacing: 0; margin: 0 0 4px; overflow-wrap: anywhere; }
.modal-card.dialog p + p { margin-top: 8px; }
.options { display: grid; gap: 8px; margin: 16px 0 12px; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { background: var(--surface-2); }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.option b { display: block; font-weight: 500; }
.option span span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.confetti { position: fixed; top: -12px; width: 8px; height: 12px; border-radius: 2px; z-index: 200; pointer-events: none; }

/* ---------- Public pages ---------- */
.public-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 24px; }
.public { width: 100%; max-width: 420px; animation: fade-up .3s ease-out; }
.public > * + * { margin-top: 12px; }
.public-actions { display: grid; gap: 8px; margin-top: 16px; }
.public-head { text-align: center; margin-bottom: 24px; }
.public-head img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; margin-bottom: 14px; }
.public-head .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--faint); }
.public-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.public .card { padding: 24px; }
.public-foot { margin-top: auto; padding-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13px; color: var(--faint); text-align: center; }
.public-foot a, .public-foot span { white-space: nowrap; }
.public-foot a:hover { color: var(--text); }

.status { text-align: center; }
.status-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; }
.status-icon .icon { width: 22px; height: 22px; }
.status-icon.ok { background: var(--success-soft); color: var(--success); }
.status-icon.error { background: var(--accent-soft); color: var(--accent); }
.status-icon.wait { background: var(--info-soft); color: var(--info); }
.status h2 { font-size: 18px; font-weight: 600; }
.status p { color: var(--muted); margin-top: 4px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.countdown div { text-align: center; padding: 10px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.countdown b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--faint); }

.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.step b { display: block; font-weight: 500; }
.step span { font-size: 13px; color: var(--muted); }

.highlight-num { text-align: center; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.highlight-num small { display: block; font-size: 12px; color: var(--faint); }
.highlight-num strong { font-size: 24px; font-weight: 600; letter-spacing: .02em; }

.divider { height: 1px; background: var(--border); margin: 20px 0; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-main, .draw { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
    .checklist { grid-template-columns: 1fr 1fr; gap: 14px 0; }
    .checklist a:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
    .shell { display: block; }
    .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 12px; background: rgba(10,10,11,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
    .topbar .brand { padding: 0; }
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; }
    .nav-open .sidebar { transform: none; }
    .nav-open .overlay { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); }
    .page { padding: 20px 16px 40px; }
    .grid-2, .form-row { grid-template-columns: 1fr; }
    .card-flush .card-head { padding: 16px 16px 0; }
    .table th, .table td { padding-left: 16px; padding-right: 16px; }
    .table tr.detail td { padding-left: 16px; }
    .hide-sm { display: none; }
    .sidebar-close { display: inline-flex; }
}
@media (max-width: 520px) {
    .checklist { grid-template-columns: 1fr; }
    .checklist a + a { border-left: 0; padding-left: 0; }
    .stat-value { font-size: 24px; }
    .hide-xs { display: none; }
    .show-xs { display: inline; }
}

/* ---------- Print (QR sheets) ---------- */
@media print {
    body { background: #fff; color: #000; }
    .sidebar, .topbar, .page-head, .no-print, .alert, .modal { display: none !important; }
    .page { animation: none; }
    .qr-card .qr { background: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .shell { display: block; }
    .page { padding: 0; max-width: none; }
    .card { border: 0; padding: 0; background: none; }
    .qr-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .qr-card { border: 1px dashed #bbb; }
}
