/* ==========================================================================
   LUCK WIN — design system & layout (no framework). Mobile-first.
   1. Tokens  2. Base  3. Layout utilities  4. Components  5. Public site
   6. Auth/checkout  7. Dashboards  8. Charts & misc  9. Motion / print
   ========================================================================== */

/* Self-hosted Inter (variable) — keeps the CSP strict (font-src 'self'). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }

/* ---------- 1. TOKENS ---------- */
:root {
  --navy-900: #07131D; --navy-800: #0B1F33; --navy-700: #102B40;
  --emerald-600: #087E68; --emerald-500: #12A886;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Ethiopic", Nyala, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --header-h: 68px;
}
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F7F8; --surface: #FFFFFF; --surface-2: #F8FAFB; --sunken: #E9EFF2;
  --text: #0B1F33; --text-2: #34495D; --muted: #52667A;
  --border: #D9E2E7; --border-strong: #B8C7D1;
  --accent: #087E68; --accent-hover: #066A58; --on-accent: #FFFFFF; --accent-soft: #E1F3EE; --accent-text: #066B58;
  --focus: #0A5FB4;
  --ok: #0A6B4F; --ok-soft: #E2F4EC; --warn: #7A4B00; --warn-soft: #FFF3D9; --warn-border: #EBCB87;
  --bad: #A61B1B; --bad-soft: #FDEBEB; --info: #0B4F94; --info-soft: #E6F0FB; --neutral-soft: #E8EEF1;
  --danger-solid: #B42318; --demo: #8A5300;
  --shadow-sm: 0 1px 2px rgba(11,31,51,.06), 0 2px 8px rgba(11,31,51,.04);
  --shadow-lg: 0 10px 40px rgba(11,31,51,.18);
  --art-bg: #E4EDF0; --art-glow: rgba(18,168,134,.20); --art-glow2: rgba(11,31,51,.07);
  --art-main: #0B1F33; --art-screen: #D5E3E9; --art-accent: #12A886; --art-line: #8FA8B7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07131D; --surface: #0D2133; --surface-2: #102B40; --sunken: #08192A;
  --text: #E8EFF4; --text-2: #C3D2DD; --muted: #9DB0BF;
  --border: #1D3A52; --border-strong: #2C4F6B;
  --accent: #12A886; --accent-hover: #2BBF9C; --on-accent: #03140F; --accent-soft: rgba(18,168,134,.16); --accent-text: #46D4B3;
  --focus: #7CC4FF;
  --ok: #52D6A8; --ok-soft: rgba(18,168,134,.16); --warn: #F2C56B; --warn-soft: rgba(242,197,107,.12); --warn-border: rgba(242,197,107,.35);
  --bad: #FF8E86; --bad-soft: rgba(255,120,110,.13); --info: #86BEFF; --info-soft: rgba(86,160,255,.14); --neutral-soft: rgba(255,255,255,.07);
  --danger-solid: #C8372A; --demo: #F2C56B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 14px 48px rgba(0,0,0,.55);
  --art-bg: #0F2A3F; --art-glow: rgba(18,168,134,.24); --art-glow2: rgba(255,255,255,.05);
  --art-main: #2E5E80; --art-screen: #0B1F33; --art-accent: #12A886; --art-line: #4C7694;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; } p:last-child { margin-bottom: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .85em; background: var(--sunken); padding: 1px 6px; border-radius: 5px; word-break: break-all; }
button { font: inherit; }
ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.main, .dash-main { outline: none; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 400; background: var(--navy-800); color: #fff; padding: 10px 16px; border: 2px solid #fff; border-radius: 8px; cursor: pointer; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { margin: 0; padding: 16px; background: #FFF3D9; color: #5c3a00; text-align: center; }

/* ---------- 3. LAYOUT UTILITIES ---------- */
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container.narrow, .narrow { width: min(840px, 100% - 32px); margin-inline: auto; }
.section { padding-block: clamp(36px, 6vw, 72px); }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--accent-text); margin: 0 0 4px; }
.eyebrow-light { color: #46D4B3; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap, .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .center { justify-content: center; text-align: center; }
.grid { display: grid; gap: 16px; } .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
.cards-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cards-list { display: grid; gap: 16px; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; } .gap-6 { gap: 32px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .block { display: block; } .right { text-align: right; } .mono { font-family: var(--mono); }
.hide-sm { display: none; }
.form-narrow { max-width: 560px; width: 100%; }
.list { padding-left: 1.2rem; display: grid; gap: 8px; } .list-num { list-style: decimal; }
.list-plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-light { list-style: none; padding: 0; display: grid; gap: 8px; color: #C5D4DE; }
.big-num { font-size: 3rem; font-weight: 800; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .hide-sm { display: inline; } }
@media (min-width: 800px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 4. COMPONENTS ---------- */
.icon { display: inline-flex; width: var(--sz, 20px); height: var(--sz, 20px); flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--sunken); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border: 1px solid transparent; border-radius: 8px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; text-align: center; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .85rem; } .btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1.05rem; } .btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); } .btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); } .btn-secondary:hover { background: var(--sunken); }
.btn-ghost { background: transparent; color: var(--text); } .btn-ghost:hover { background: var(--sunken); }
.btn-danger { background: var(--danger-solid); color: #fff; } .btn-danger:hover { filter: brightness(1.1); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); } .btn-outline-light:hover { background: rgba(255,255,255,.1); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); min-width: 0; }
.card-pad { padding: 20px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.6; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.badge-success { background: var(--ok-soft); color: var(--ok); } .badge-warning { background: var(--warn-soft); color: var(--warn); } .badge-danger { background: var(--bad-soft); color: var(--bad); } .badge-info { background: var(--info-soft); color: var(--info); }
.badge-demo { background: transparent; color: var(--demo); border: 1px dashed var(--demo); letter-spacing: .06em; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); font-size: .9rem; }
.banner > .icon { margin-top: 2px; }
.banner-demo, .banner-warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.banner-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.banner-lg { padding: 16px; font-size: 1rem; margin-bottom: 16px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.empty h3 { margin: 4px 0 0; } .empty p { max-width: 46ch; }

.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--sunken) 0%, var(--surface-2) 50%, var(--sunken) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-row { height: 56px; } .skeleton-card { height: 340px; } .skeleton-wrap.stack { display: flex; flex-direction: column; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* forms */
.field { display: grid; gap: 6px; min-width: 0; } .label { font-weight: 600; font-size: .9rem; } .req { color: var(--bad); }
.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
textarea.input { resize: vertical; min-height: 84px; }
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input:disabled { opacity: .6; cursor: not-allowed; background: var(--sunken); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input-sm { min-height: 34px; padding: 5px 8px; font-size: .875rem; }
.field-hint { margin: 0; font-size: .82rem; color: var(--muted); } .field-error { margin: 0; font-size: .85rem; color: var(--bad); font-weight: 600; }
.pw-wrap { position: relative; } .pw-wrap .input { padding-right: 46px; } .pw-toggle { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
.pw-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 6px; } .pw-rules li.ok { color: var(--ok); }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.radio { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
fieldset { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; margin: 0; min-width: 0; } legend { padding: 0 6px; font-weight: 600; }
input.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; margin: 0; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background .2s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
input.switch:checked { background: var(--accent); } input.switch:checked::after { transform: translateX(20px); }
.setting-row { padding: 12px 0; border-bottom: 1px solid var(--border); } .setting-row label { cursor: pointer; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.seg { padding: 8px 18px; background: var(--surface); color: var(--text); border: 0; cursor: pointer; font-weight: 600; } .seg.active { background: var(--accent); color: var(--on-accent); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 12px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.tab { padding: 11px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); } .tab.active { color: var(--text); border-bottom-color: var(--accent); } .tab-panel { padding-top: 20px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.table th { text-align: left; padding: 11px 14px; background: var(--surface-2); color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; } .table tbody tr:hover { background: var(--surface-2); }
.table th.actions, .table td.actions { text-align: right; } .table td.right, .table th.right { text-align: right; }
.table-plain th, .table-plain td { border: 0; padding: 6px 0; } .table-plain tbody tr:hover { background: none; } .total-row td { border-top: 1px solid var(--border); font-weight: 700; padding-top: 10px; }
.sort-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar > .input, .toolbar > select { flex: 0 1 auto; width: auto; min-width: 150px; }
.search { position: relative; flex: 1 1 240px; min-width: 200px; } .search > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; } .search .input { padding-left: 38px; }
.search-block { margin: 16px 0; } .filter { display: contents; }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .pager { display: flex; align-items: center; gap: 10px; }
.dt-body { min-height: 60px; }
@media (max-width: 719px) {
  .table:not(.table-plain) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table:not(.table-plain) tr { display: block; padding: 8px 4px; border-bottom: 1px solid var(--border); } .table:not(.table-plain) tbody tr:last-child { border-bottom: 0; }
  .table:not(.table-plain) td { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; padding: 6px 12px; text-align: right; }
  .table:not(.table-plain) td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; font-size: .8rem; flex: none; }
  .table:not(.table-plain) td.actions { justify-content: flex-end; } .table:not(.table-plain) td.actions::before { display: none; }
}

/* modal */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); width: min(560px, calc(100vw - 24px)); max-width: none; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal-wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(7,19,29,.62); backdrop-filter: blur(2px); }
.modal-box { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); } .modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 18px 20px; overflow: auto; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
dialog.modal[open] { animation: pop .18s ease-out; } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* toasts */
.toasts { position: fixed; z-index: 500; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: min(420px, 100%); padding: 12px 8px 12px 14px; border-radius: var(--r); background: var(--navy-800); color: #fff; border-left: 4px solid #5FA8FF; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; font-size: .92rem; }
:root[data-theme="dark"] .toast { background: #17354E; }
.toast > span:not(.icon) { flex: 1; padding-top: 1px; } .toast-success { border-left-color: #2BD3A8; } .toast-error { border-left-color: #FF7A6E; } .toast .icon-btn { width: 28px; height: 28px; color: #fff; }

/* dropdowns & menus */
.dropdown { position: relative; }
.dropdown-panel { position: absolute; top: calc(100% + 6px); min-width: 220px; max-width: calc(100vw - 24px); z-index: 80; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; }
.dropdown-panel.align-right { right: 0; } .dropdown-panel.align-left { left: 0; } .menu-wide { min-width: 300px; }
.menu-title { margin: 0; padding: 8px 10px 6px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.menu-item { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; color: inherit; text-align: left; text-decoration: none; cursor: pointer; font-size: .92rem; } .menu-item:hover { background: var(--sunken); }
.menu-row { padding: 8px 10px; font-size: .88rem; } .menu-label { display: grid; gap: 4px; padding: 6px 10px; font-size: .85rem; }
.bell .dot { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger-solid); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
.profile-btn { gap: 6px; }

/* progress, stepper, timeline, thread */
.progress { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; } .progress-fill { height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; transition: width .4s ease; }
.stepper { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; color: var(--muted); }
.stepper li { display: flex; align-items: center; gap: 8px; } .dot-n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--border-strong); font-weight: 700; font-size: .78rem; }
.stepper li.current { color: var(--text); font-weight: 600; } .stepper li.current .dot-n { border-color: var(--accent); color: var(--accent-text); } .stepper li.done .dot-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); } .stepper li.done { color: var(--text); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); display: grid; gap: 14px; }
.timeline li { position: relative; } .timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-height: 320px; overflow: auto; }
.msg { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); } .msg.staff { border-left: 3px solid var(--accent); } .msg.user { border-left: 3px solid var(--border-strong); } .msg p { margin: 2px 0; }

.kv { display: grid; margin: 0; } .kv-row { display: grid; grid-template-columns: minmax(110px, 210px) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); } .kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .9rem; } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 519px) { .kv-row { grid-template-columns: 1fr; gap: 2px; } }
.metric-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.metric-label { margin: 0 0 4px; color: var(--muted); font-size: .85rem; font-weight: 600; } .metric-value { margin: 0; font-size: 1.75rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; } .page-head h1 { margin-bottom: 4px; } .page-head p { margin: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; margin-bottom: 14px; } .crumbs a { color: var(--muted); }
details.faq { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
details.faq summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style-position: inside; } details.faq p { padding: 0 16px 14px; margin: 0; }
details.faq[open] summary { color: var(--accent-text); }

/* prize artwork */
.art-wrap { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; } .art-wrap svg { display: block; width: 100%; height: 100%; }
.art-bg { fill: var(--art-bg); } .art-glow { fill: var(--art-glow); } .art-glow2 { fill: var(--art-glow2); } .art-main { fill: var(--art-main); } .art-screen { fill: var(--art-screen); } .art-accent { fill: var(--art-accent); } .art-line { fill: var(--art-line); }
.art-stroke { fill: none; stroke: var(--art-main); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 5. PUBLIC SITE ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-tile { display: grid; place-items: center; background: #fff; border-radius: 9px; padding: 4px 6px; box-shadow: 0 0 0 1px rgba(11,31,51,.12); } .logo-tile img { display: block; height: 28px; width: auto; }
.wordmark { font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; white-space: nowrap; } .wm-a { color: var(--text); } .wm-b { color: var(--accent-text); } .wordmark.on-dark .wm-a { color: #fff; } .wordmark.on-dark .wm-b { color: #46D4B3; }
.demo-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; font-size: .8rem; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-border); text-align: center; }
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); } .header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 12px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); max-height: calc(100dvh - 110px); overflow: auto; box-shadow: var(--shadow-lg); }
.nav.open { display: flex; } .nav-link { padding: 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 600; } .nav-link:hover { background: var(--sunken); color: var(--text); } .nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-auth { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
@media (min-width: 900px) {
  .nav-toggle { display: none; } .nav { display: flex; position: static; flex-direction: row; align-items: center; flex: 1; padding: 0; border: 0; background: none; box-shadow: none; max-height: none; overflow: visible; }
  .nav-auth { flex-direction: row; align-items: center; margin: 0 0 0 auto; padding: 0; border: 0; } .nav-link { padding: 8px 12px; } .header-actions { margin-left: 0; }
}
.hero { position: relative; overflow: hidden; color: #fff; padding-block: clamp(48px, 8vw, 100px); background: radial-gradient(900px 420px at 85% -10%, rgba(18,168,134,.32), transparent 60%), linear-gradient(135deg, #0B1F33 0%, #102B40 58%, #0B3B3A 130%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; } .hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.07; letter-spacing: -.03em; margin: .3em 0 .45em; max-width: 18ch; }
.hero-lead { font-size: 1.12rem; color: #C5D4DE; max-width: 54ch; margin-bottom: 24px; } .hero-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 20px; font-size: .85rem; color: #9DB0BF; }
.hero-card { overflow: hidden; color: var(--text); box-shadow: var(--shadow-lg); max-width: 460px; width: 100%; justify-self: center;}
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero-card { justify-self: end; } }
.page-hero { background: linear-gradient(135deg, #0B1F33, #102B40); color: #fff; padding-block: 44px; } .page-hero .lead { color: #C5D4DE; margin: 0; }
.cta { background: linear-gradient(135deg, #0B1F33 0%, #0B3B3A 130%); color: #fff; padding-block: 48px; } .cta p { color: #C5D4DE; margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; margin-bottom: 10px; }
.pillar-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 12px; }
.draw-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s} .draw-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.draw-media { position: relative; } .draw-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 64px); } .draw-badges .badge { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(4px); }
.draw-badges .badge-demo { background: var(--surface); }
.fav-btn { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; } .fav-btn:hover { color: var(--text); } .fav-btn[aria-pressed="true"] { color: var(--accent-text); } .fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.draw-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; } .draw-title { font-size: 1.1rem; margin: 0; } .draw-title a { color: inherit; text-decoration: none; } .draw-title a:hover { text-decoration: underline; }
.draw-body .row.wrap { margin-top: auto; padding-top: 6px; }
@media (min-width: 760px) { .cards-list .draw-card { flex-direction: row; } .cards-list .draw-media { width: 280px; flex: none; } .cards-list .art-wrap { height: 100%; aspect-ratio: auto; min-height: 170px; } }
.facts { display: grid; gap: 4px; margin: 6px 0 10px; } .fact { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; padding: 4px 0; border-bottom: 1px dashed var(--border); } .fact dt { color: var(--muted); } .fact dd { margin: 0; font-weight: 600; text-align: right; }
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4px 24px; }
.detail-head { margin-bottom: 20px; } .detail-head h1 { margin: 8px 0 4px; } .detail-grid { display: grid; gap: 24px; } .detail-art { overflow: hidden; }
.entry-panel { display: flex; flex-direction: column; gap: 14px; } .price { font-size: 1.4rem; } .total { padding-top: 12px; border-top: 1px solid var(--border); font-size: 1.05rem; }
@media (min-width: 980px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .entry-panel { position: sticky; top: calc(var(--header-h) + 16px); } }
.ticket-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; } @media (min-width: 980px) { .ticket-grid { grid-template-columns: repeat(8, 1fr); } }
.tk { min-height: 40px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; cursor: pointer; } .tk:hover:not(:disabled) { border-color: var(--accent); }
.tk[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); } .tk:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.reel-window { position: relative; height: 168px; overflow: hidden; margin: 20px auto; max-width: 420px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface-2); }
.reel-window::before, .reel-window::after { content: ""; position: absolute; left: 0; right: 0; height: 52px; z-index: 2; pointer-events: none; } .reel-window::before { top: 0; background: linear-gradient(var(--surface-2), transparent); } .reel-window::after { bottom: 0; background: linear-gradient(transparent, var(--surface-2)); }
.reel-track { will-change: transform; } .reel-item { height: 56px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 1.3rem; letter-spacing: .06em; opacity: .45; } .reel-item.landed { opacity: 1; color: var(--accent-text); font-weight: 800; }
.reel-marker { position: absolute; left: 0; right: 0; top: 56px; height: 56px; z-index: 1; border-block: 2px solid var(--accent); background: var(--accent-soft); pointer-events: none; }
.sim-card { text-align: center; margin: 16px 0; } .sim-card .banner { text-align: left; } .sim-result { display: grid; gap: 10px; margin-top: 20px; justify-items: center; } .sim-ref { font-family: var(--mono); font-size: 2rem; font-weight: 800; margin: 0; color: var(--accent-text); letter-spacing: .04em; }
.site-footer { background: var(--navy-900); color: #B7C7D3; padding: 56px 0 24px; border-top: 1px solid #14293B; } .site-footer a { color: #B7C7D3; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; } .footer-blurb { margin-top: 14px; max-width: 42ch; font-size: .92rem; } .footer-h { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 14px; }
.footer-list { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .92rem; } .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.legal section { margin-top: 28px; } .legal h2 { margin-bottom: 6px; }

/* ---------- 6. AUTH & CHECKOUT ---------- */
.shell-bare .bare-top { display: flex; justify-content: space-between; align-items: center; padding-block: 16px; }
.auth { padding-block: 32px 56px; } .auth-grid { display: grid; gap: 24px; align-items: stretch; }
.auth-aside { display: none; flex-direction: column; gap: 16px; padding: 36px; border-radius: var(--r-lg); color: #fff; background: radial-gradient(500px 280px at 90% 0%, rgba(18,168,134,.35), transparent 60%), linear-gradient(150deg, #0B1F33, #102B40); }
.auth-aside h2 { font-size: 1.6rem; margin-top: 12px; } .brand-card { background: #fff; border-radius: var(--r); padding: 14px; max-width: 300px; } .brand-card img { display: block; width: 100%; height: auto; }
.auth-card { width: 100%; max-width: 520px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; } .auth-card h1 { margin-bottom: 0; }
@media (min-width: 920px) { .auth-grid { grid-template-columns: 1fr 1.05fr; } .auth-aside { display: flex; } .auth-card { margin: 0; } }
.success-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 16px 0; } .success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.checkout-grid { display: grid; gap: 24px; margin-top: 20px; } @media (min-width: 980px) { .checkout-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

/* ---------- 7. DASHBOARDS (account + admin) ---------- */
.dash { min-height: 100vh; background: var(--bg); display: block; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 90; display: flex; flex-direction: column; background: var(--navy-800); color: #CBD8E1; transform: translateX(-102%); transition: transform .25s ease; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.06); }
:root[data-theme="dark"] .sidebar { background: #081A2A; }
.dash.sb-open .sidebar { transform: none; } .sb-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(7,19,29,.55); display: none; } .dash.sb-open .sb-backdrop { display: block; }
.sb-top { padding: 16px; display: flex; align-items: center; } .sidebar .wm-a { color: #fff; } .sidebar .wm-b { color: #46D4B3; }
.sb-nav { flex: 1; padding: 4px 10px 12px; display: grid; align-content: start; gap: 14px; } .sb-group { display: grid; gap: 2px; } .sb-label { margin: 8px 10px 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #7D93A4; font-weight: 700; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #C9D7E0; text-decoration: none; font-weight: 500; font-size: .92rem; } .sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link[aria-current="page"] { background: rgba(18,168,134,.2); color: #fff; box-shadow: inset 3px 0 0 #12A886; } .sb-link:focus-visible { outline-color: #7CC4FF; }
.sb-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 6px; } .sb-note { margin: 0; padding: 6px 10px; font-size: .76rem; color: #8FA5B5; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .sb-note .badge-demo { color: #F2C56B; border-color: #F2C56B; }
.dash-body { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); min-height: 60px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; } .topbar-title { margin: 0 0 0 6px; font-weight: 700; display: flex; align-items: center; gap: 8px; } .sb-collapse { display: none; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; } .status-chips .chip:not(:first-child) { display: none; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); white-space: nowrap; }
.dash-main { padding: 20px 16px 48px; width: 100%; max-width: 1440px; } .dash-page { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 640px) { .status-chips .chip:not(:first-child) { display: inline-flex; } } @media (max-width: 1099px) { .status-chips .chip:nth-child(3) { display: none; } }
@media (min-width: 1024px) {
  .dash { display: grid; grid-template-columns: 264px minmax(0, 1fr); } .dash.collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; width: auto; transform: none; z-index: 10; } .sb-mobile, .sb-backdrop { display: none !important; } .sb-collapse { display: inline-grid; }
  .dash-main { padding: 28px 32px 56px; }
  .dash.collapsed .sb-text, .dash.collapsed .sb-label, .dash.collapsed .sb-note, .dash.collapsed .sidebar .wordmark { display: none; } .dash.collapsed .sb-link { justify-content: center; padding-inline: 0; } .dash.collapsed .sb-top { justify-content: center; padding-inline: 6px; } .dash.collapsed .sb-group + .sb-group { border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }
}
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; } .status-list li { padding-bottom: 10px; border-bottom: 1px solid var(--border); } .status-list li:last-child { border: 0; padding: 0; }
.reward-card { border-left: 4px solid var(--accent); } .locked { background: var(--surface-2); } .note.unread { border-left: 3px solid var(--accent); } .receipt { max-width: 720px; } .thumb { width: 96px; border-radius: 6px; overflow: hidden; } .prize-preview { max-width: 320px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.flow-row { padding: 10px 0; border-bottom: 1px solid var(--border); } .op-step .step-num { margin: 0; } .preview-card { background: var(--surface-2); }

/* ---------- 8. CHARTS ---------- */
.chart { margin: 0; } .chart-title { font-weight: 700; margin-bottom: 10px; font-size: .95rem; } .chart-svg { display: block; width: 100%; height: auto; }
.ch-grid { stroke: var(--border); stroke-width: 1; } .ch-axis { stroke: var(--border-strong); stroke-width: 1; } .ch-tick { fill: var(--muted); font-size: 11px; } .ch-val { fill: var(--text); font-size: 11px; font-weight: 600; } .ch-bar { fill: var(--accent); }
.hbars { display: grid; gap: 12px; } .hbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; margin-bottom: 4px; } .hbar-track { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; } .hbar-fill { height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; }

/* ---------- 9. MOTION & PRINT ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .skeleton { animation: none; }
}
@media print {
  .demo-strip, .site-header, .site-footer, .sidebar, .topbar, .no-print, .toasts, .skip-link { display: none !important; }
  .dash { display: block; } body { background: #fff; color: #000; } .card { box-shadow: none; }
}

/* Respect the hidden attribute even on elements with an explicit display value. */
[hidden] { display: none !important; }

/* Prevent grid/flex children from forcing horizontal overflow on narrow screens. */
.detail-grid, .checkout-grid, .auth-grid, .hero-grid { grid-template-columns: minmax(0, 1fr); }
.stack, .stack > * { min-width: 0; }
@media (min-width: 980px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 380px; } .checkout-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 920px) { .auth-grid { grid-template-columns: 1fr 1.05fr; } }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }

/* ---------- LIVE DRAW STAGE (admin) ---------- */
.live-stage { position: relative; background: radial-gradient(120% 120% at 50% 0%, #12385a 0%, var(--navy-900) 70%); color: #fff; border-radius: var(--r-lg); padding: var(--s-6) var(--s-5); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); min-height: 480px; justify-content: center; }
.live-stage:fullscreen { border-radius: 0; min-height: 100vh; }
.live-stage .eyebrow { color: #7fe3c8; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; font-size: .85rem; }
.live-stage h2 { color: #fff; font-size: clamp(1.4rem, 3.6vw, 2.4rem); margin: 0; }
.live-num { font-family: var(--mono); font-weight: 800; font-size: clamp(5rem, 22vw, 13rem); line-height: 1; color: #fff; text-shadow: 0 0 40px rgba(18,168,134,.55); min-height: 1.05em; font-variant-numeric: tabular-nums; }
.live-num.win { color: #ffd45c; text-shadow: 0 0 60px rgba(255,212,92,.8); animation: live-pop .7s cubic-bezier(.2,1.4,.4,1); }
.live-winner { font-size: clamp(1.3rem, 4vw, 2.6rem); font-weight: 700; min-height: 1.4em; }
.live-meta { color: #b9cbd8; font-size: .9rem; word-break: break-all; }
.live-stage .btn { font-size: 1.1rem; }
@keyframes live-pop { 0% { transform: scale(.6); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .live-num.win { animation: none; } }
.private-card { border: 3px solid var(--danger-solid); }
.private-phone { font-family: var(--mono); font-size: clamp(2rem, 8vw, 3.6rem); font-weight: 800; letter-spacing: .02em; }

/* ---------- prize photos, ticket picker ---------- */
.prize-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-gallery { display: flex; flex-direction: column; }
.art-gallery .prize-img { flex: 1; min-height: 0; }
.prize-thumbs { display: flex; gap: 6px; padding: 6px; background: rgba(0,0,0,.35); flex-wrap: wrap; }
.prize-thumb { width: 44px; height: 44px; padding: 0; border: 2px solid #fff; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.prize-thumb img, .prize-edit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prize-edit { width: 110px; display: flex; flex-direction: column; gap: 4px; } .prize-edit img { height: 80px; border-radius: 6px; }
.progress { height: 10px; background: var(--border, #d6dee6); border-radius: 99px; overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--green-600, #12a886); }
.picker { display: grid; gap: var(--s-3); }
.picker-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: end; }
.picker-bar .field { margin: 0; min-width: 120px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; max-height: 360px; overflow: auto; padding: 4px; }
.pick-grid button { padding: 10px 0; border: 1px solid var(--border, #b9c6d2); border-radius: 8px; background: var(--surface, #fff); font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.pick-grid button[aria-pressed="true"] { background: var(--green-600, #12a886); color: #fff; border-color: transparent; }
.pick-grid button.mine { outline: 2px solid #3b82f6; }
.pick-grid button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips button { border-radius: 99px; padding: 4px 10px; border: 1px solid var(--border, #b9c6d2); background: var(--surface, #fff); cursor: pointer; }
