/* LGO dashboard — same brand tokens as the website, tuned for dense data. */
:root {
  --green: #123F36; --green-deep: #0C2E27; --gold: #C7A15A; --gold-soft: #D9BC82; --gold-ink: #7A5C22; --cream: #F4F0E5;
  --bg: #F4F0E5; --panel: #FFFDF8; --panel-2: #F7F2E6; --text: #202824; --heading: #123F36; --muted: #4F5A55;
  --border: rgba(18,63,54,.13); --border-strong: rgba(18,63,54,.28); --grid: rgba(18,63,54,.09);
  --mark: #123F36; --mark-wash: rgba(18,63,54,.10); --accent-ink: var(--gold-ink); --focus: #7A5C22;
  --good: #1E7A48; --good-bg: rgba(30,122,72,.12); --bad: #B3261E; --bad-bg: rgba(179,38,30,.10); --warn: #8A5A00; --warn-bg: rgba(199,161,90,.2);
  --side: #123F36; --side-text: #E8E3D6;
  --r: 12px; --shadow: 0 1px 2px rgba(18,63,54,.06), 0 10px 24px -16px rgba(18,63,54,.25);
  --f: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-display: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B1D19; --panel: #12302A; --panel-2: #173830; --text: #EDE8DB; --heading: #F4F0E5; --muted: #B3BEB7;
  --border: rgba(244,240,229,.12); --border-strong: rgba(244,240,229,.26); --grid: rgba(244,240,229,.08);
  --mark: #C7A15A; --mark-wash: rgba(199,161,90,.14); --accent-ink: var(--gold); --focus: var(--gold);
  --good: #7AD6A0; --good-bg: rgba(122,214,160,.14); --bad: #FF9E92; --bad-bg: rgba(255,158,146,.12); --warn: #E9CD94; --warn-bg: rgba(199,161,90,.18);
  --side: #081511; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -18px rgba(0,0,0,.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--heading); margin: 0; font-weight: 600; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--gold); color: var(--green); padding: 8px 12px; border-radius: 6px; z-index: 99; font-weight: 600; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
pre { background: var(--panel-2); border: 1px solid var(--border); padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.num { font-variant-numeric: tabular-nums; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--green); border-color: #A8843F; }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--heading); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--heading); }
input, select, textarea { min-height: 40px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel); }
textarea { width: 100%; min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,161,90,.3); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 80% 0%, rgba(199,161,90,.18), transparent 50%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-wide { max-width: 560px; }
.auth-logo { border-radius: 12px; margin-bottom: 16px; }
.auth h1 { font: 500 28px/1.2 var(--f-display); margin-bottom: 6px; }
.auth form { display: grid; gap: 6px; margin-top: 20px; }
.auth label { font-weight: 600; font-size: 14px; margin-top: 8px; }
.auth input, .auth select { width: 100%; }
select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.grid > *, .subcard, .subcard > *, .card > * { min-width: 0; }
audio.rec-audio { width: 100%; max-width: 420px; height: 40px; }
.auth .btn { margin-top: 14px; min-height: 46px; }
.form-error { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 1.2em; margin: 6px 0 0; }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(244,240,229,.25) transparent; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; background: var(--side); color: var(--side-text); }
.side > * { flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid rgba(244,240,229,.12); font-size: 15px; }
.brand img { border-radius: 8px; }
.brand b { color: var(--gold); font-weight: 600; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--side-text); }
.nav a:hover { background: rgba(244,240,229,.07); }
.nav a[aria-current="page"] { background: rgba(199,161,90,.16); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--gold); color: var(--green); font-size: 12px; font-weight: 700; text-align: center; }
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid rgba(244,240,229,.12); padding-top: 12px; }
.side-link { display: block; text-align: left; padding: 8px 10px; border-radius: 8px; background: none; border: 0; color: var(--side-text); text-decoration: none; cursor: pointer; font-size: 14px; }
.side-link:hover { background: rgba(244,240,229,.07); }
.side-user { margin: 0 0 6px; padding: 6px 10px; font-size: 12.5px; color: var(--side-text); opacity: .8; }
.role-staff [data-owner-only] { display: none !important; }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top h1 { font: 500 26px/1.2 var(--f-display); margin-right: auto; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.custom { display: inline-flex; align-items: center; gap: 6px; }
[hidden] { display: none !important; }
#view { padding: 24px 28px 48px; display: grid; gap: 20px; transition: opacity .2s; }
#view[aria-busy="true"] { opacity: .55; }
#view:focus { outline: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
  .brand { border: 0; padding: 0 8px 0 0; }
  .side nav { order: 3; width: 100%; overflow-x: auto; }
  .nav { display: flex; gap: 4px; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }
  .side-foot { margin: 0 0 0 auto; display: flex; border: 0; padding: 0; }
  .side-foot .side-link { padding: 6px 8px; font-size: 13px; }
  .top { position: static; padding: 14px 16px; }
  #view { padding: 16px 16px 40px; }
}

/* Cards & grids */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; }
.card-head p { margin: 0; font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile.hero { grid-column: 1 / -1; } .tile-value { font-size: 24px; } }

/* Stat tiles */
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile-value { font-size: 30px; font-weight: 600; color: var(--heading); line-height: 1.15; margin-top: 4px; }
.tile-delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.tile-delta.up { color: var(--good); background: var(--good-bg); }
.tile-delta.down { color: var(--bad); background: var(--bad-bg); }
.tile-delta.flat { color: var(--muted); background: var(--panel-2); }
.tile.hero { background: var(--green); border-color: var(--green); }
.tile.hero .tile-label { color: #D5DCD7; }
.tile.hero .tile-value { color: #fff; font-size: 40px; }
:root[data-theme="dark"] .tile.hero { background: #1B4238; border-color: rgba(199,161,90,.45); }
.tile.hero .tile-delta { color: #E8F3EC; background: rgba(255,255,255,.12); }
.tile.hero .tile-delta.down { color: #FFD2CC; }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11.5px; font-family: var(--f); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--mark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--mark-wash); }
.chart .bar { fill: var(--mark); }
.chart .bar.hover { fill: var(--gold); }
:root[data-theme="dark"] .chart .bar.hover { fill: var(--gold-soft); }
/* Booking tracker: sent (gold) vs booked (green) — validated for colour-blind separation and contrast on both themes */
:root { --bt-sent: #B7791F; --bt-booked: #00816A; }
:root[data-theme="dark"] { --bt-sent: #BD7C17; --bt-booked: #2BA784; }
.pair-chart .bar.sent { fill: var(--bt-sent); }
.pair-chart .bar.booked { fill: var(--bt-booked); }
.pair-chart g.hover .bar { opacity: .75; }
.pair-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pair-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pair-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pair-legend i.sent { background: var(--bt-sent); }
.pair-legend i.booked { background: var(--bt-booked); }
.goal-bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.goal-bar span { display: block; height: 100%; background: var(--bt-booked); border-radius: inherit; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; }
.chart .dot { fill: var(--mark); stroke: var(--panel); stroke-width: 2; }
.chart:focus-visible { outline-offset: 4px; }
.empty { padding: 26px 8px; text-align: center; color: var(--muted); font-size: 14px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; box-shadow: var(--shadow); font-size: 13px; min-width: 110px; }
.tip strong { display: block; font-size: 16px; color: var(--heading); font-variant-numeric: tabular-nums; }
.tip span { color: var(--muted); }
.tip .key { display: inline-block; width: 12px; height: 2px; background: var(--mark); vertical-align: middle; margin-right: 6px; }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--muted); font-weight: 500; min-height: 32px; display: inline-flex; align-items: center; }
details.table-view .tbl-wrap { max-height: 260px; overflow: auto; margin-top: 6px; }

/* Bar lists (label · bar · value) */
.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.barlist li { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.barlist li::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--mark-wash); border-radius: 6px; z-index: 0; }
.barlist li > * { position: relative; z-index: 1; min-width: 0; }
.barlist .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist .v { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--heading); }
.barlist .v small { color: var(--muted); font-weight: 500; margin-left: 6px; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--panel-2); }
th button.sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
th[aria-sort] button.sort { color: var(--heading); }
.trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--heading); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.row-btn:hover { text-decoration-color: var(--gold); }
tr.clickable { cursor: pointer; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { color: var(--warn); background: var(--warn-bg); }
.st-contacted { color: var(--heading); background: var(--panel-2); border-color: var(--border-strong); }
.st-qualified { color: var(--heading); background: var(--mark-wash); }
.st-won { color: var(--good); background: var(--good-bg); }
.st-lost, .st-spam, .st-rejected { color: var(--muted); background: var(--panel-2); }
.st-reviewing { color: var(--heading); background: var(--panel-2); border-color: var(--border-strong); }
.st-interview { color: var(--heading); background: var(--mark-wash); }
.st-hired { color: var(--good); background: var(--good-bg); }
.st-accepted { color: var(--good); background: var(--good-bg); }
.st-test_sent, .st-docs_sent { color: var(--heading); background: var(--mark-wash); }
.st-test_done, .st-docs_received, .st-training { color: var(--good); background: var(--good-bg); }
.skill-bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 4px 0 6px; }
.skill-bar span { display: block; height: 100%; border-radius: inherit; background: var(--bt-booked); }
.skill-bar.low span { background: var(--bt-sent); }
.cta-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--gold); color: var(--green); margin-left: 6px; }

/* Leads toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.status-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.status-tabs button { flex-shrink: 0; min-height: 34px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--panel); cursor: pointer; font-size: 13.5px; font-weight: 500; }
.status-tabs button[aria-pressed="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); font-weight: 600; }
.status-tabs .count { margin-left: 5px; opacity: .75; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.pager .btns { display: flex; gap: 6px; }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(6,18,15,.45); display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { width: min(520px, 100%); height: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--border); box-shadow: var(--shadow); animation: slideIn .25s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel { animation: none; } #view { transition: none; } }
.drawer-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; background: var(--panel); border-bottom: 1px solid var(--border); }
.drawer-head h2 { font: 500 22px/1.2 var(--f-display); }
#drawer-body { padding: 18px 20px 30px; display: grid; gap: 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.field-label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.save-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.saved { color: var(--good); font-size: 13px; font-weight: 600; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.long-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }

/* SEO */
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.check.ok { color: var(--good); }
.check.no { color: var(--bad); }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { border: 1px dashed var(--gold); background: var(--warn-bg); border-radius: var(--r); padding: 16px 18px; font-size: 14px; }
.notice ol { margin: 8px 0 0; padding-left: 20px; }
.notice li { margin-bottom: 4px; }
.err { color: var(--bad); font-weight: 600; }

.chip-mini { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; }

.wa-thread { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding: 6px 2px; }
.wa-msg { margin: 0; max-width: 80%; padding: 8px 11px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.wa-msg small { display: block; opacity: .7; font-size: 11px; margin-top: 2px; }
.wa-msg.inbound { justify-self: start; background: var(--panel-2); border: 1px solid var(--border); }
.wa-msg.outbound { justify-self: end; background: #1f6b4a; color: #fff; }

.push-enable { display: block; width: 100%; padding: 10px 14px; text-align: left; border-top: 1px solid var(--border); font-size: 13px; }
.push-enable:disabled { opacity: .75; cursor: default; }

/* Sales pipeline */
.pipe-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding: 12px 0 6px; }
.pipe-col { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; align-self: start; }
.pipe-col h3 { margin: 0; font-size: 14px; }
.pipe-col p { margin: 0; }
.pipe-card { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.pipe-card:hover, .pipe-card:focus-visible { border-color: var(--border-strong); }
.pipe-card.due { border-left: 4px solid #B3261E; }
.pipe-card > * { overflow-wrap: anywhere; }
.pipe-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pipe-notes li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.pipe-body { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) { .pipe-board { grid-auto-flow: row; grid-auto-columns: auto; } }

/* ── Premium finish ────────────────────────────────────────────────────────────
   One quiet idea, used everywhere: deep green and warm ivory, a single gold hairline for emphasis, soft layered
   shadows for depth, serif numbers and titles. No glows, no pulsing — things only move when they arrive. */
:root {
  --gold-rgb: 199,161,90; --r: 16px;
  --bg: #F5F1E7; --panel: #FFFEFB; --panel-2: #F8F4EA;
  --border: rgba(18,63,54,.10); --border-strong: rgba(18,63,54,.22);
  --hairline: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .55) 22%, rgba(var(--gold-rgb), .55) 78%, transparent);
  --shadow: 0 1px 1px rgba(18,63,54,.04), 0 2px 6px -2px rgba(18,63,54,.06), 0 22px 44px -30px rgba(18,63,54,.38);
  --shadow-lift: 0 1px 1px rgba(18,63,54,.05), 0 6px 14px -6px rgba(18,63,54,.12), 0 34px 60px -34px rgba(18,63,54,.5);
  --surface: linear-gradient(180deg, #FFFFFF 0%, var(--panel) 100%);
  --page: radial-gradient(1100px 620px at 88% -12%, rgba(var(--gold-rgb), .13), transparent 62%), radial-gradient(900px 560px at -8% 108%, rgba(18,63,54,.09), transparent 60%);
  --side-bg: linear-gradient(180deg, #15493E 0%, #0E352D 46%, #08221C 100%);
}
:root[data-theme="dark"] {
  --bg: #06110E; --panel: #0D1F1A; --panel-2: #122821; --side: #040B09;
  --border: rgba(244,240,229,.08); --border-strong: rgba(244,240,229,.18);
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 2px 6px -2px rgba(0,0,0,.4), 0 28px 50px -30px rgba(0,0,0,.9);
  --shadow-lift: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 18px -8px rgba(0,0,0,.55), 0 38px 64px -32px rgba(0,0,0,1);
  --surface: linear-gradient(180deg, #11261F 0%, var(--panel) 100%);
  --page: radial-gradient(1100px 640px at 88% -14%, rgba(var(--gold-rgb), .10), transparent 62%), radial-gradient(900px 600px at -10% 110%, rgba(30,122,90,.13), transparent 60%);
  --side-bg: linear-gradient(180deg, #0B1E19 0%, #07140F 50%, #030907 100%);
}
@keyframes lgo-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
::selection { background: rgba(var(--gold-rgb), .35); }
html { scrollbar-color: rgba(var(--gold-rgb), .45) transparent; scrollbar-width: thin; }

/* The page itself: a lit, layered backdrop instead of a flat colour */
body { background: var(--page), var(--bg); background-attachment: fixed; letter-spacing: -.003em; }

/* Side navigation */
.side { background: var(--side-bg); box-shadow: inset -1px 0 0 rgba(var(--gold-rgb), .16); }
.brand { border-bottom: 0; position: relative; padding-bottom: 16px; letter-spacing: .01em; }
.brand::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 1px; background: var(--hairline); opacity: .7; }
.brand img, .auth-logo { border-radius: 11px; box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .35), 0 10px 22px -12px rgba(0,0,0,.6); }
.brand b { font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: .01em; }
.nav { gap: 3px; }
.nav a { border-radius: 10px; color: rgba(232,227,214,.82); transition: background .2s ease, color .2s ease; }
.nav a:hover { background: rgba(244,240,229,.06); color: #fff; }
.nav a svg { opacity: .8; transition: opacity .2s ease; }
.nav a:hover svg, .nav a[aria-current="page"] svg { opacity: 1; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(var(--gold-rgb), .20), rgba(var(--gold-rgb), .04)); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.nav a[aria-current="page"] svg { color: var(--gold-soft); }
.badge { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }
.side-foot { border-top: 0; position: relative; }
.side-foot::before { content: ''; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: var(--hairline); opacity: .45; }

/* Top bar: frosted, with a gold hairline under it */
.top { background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 0; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hairline); opacity: .6; }
.top h1 { font-size: 28px; font-weight: 500; letter-spacing: -.015em; }

/* Surfaces */
.card, .tile, .ticket, .deal, .subcard { transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.card, .tile, .ticket, .deal { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.card { padding: 22px 24px; }
.card:hover { border-color: rgba(var(--gold-rgb), .28); }
.card-head { margin-bottom: 16px; }
.card-head h2 { font-size: 17px; letter-spacing: -.01em; }
.tile { padding: 16px 18px; }
.tile:hover { transform: translateY(-2px); border-color: rgba(var(--gold-rgb), .45); box-shadow: var(--shadow-lift); }
.tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.tile-value { font-family: var(--f-display); font-weight: 500; font-size: 34px; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.tile.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #17503F 0%, #123F36 45%, #0A2A23 100%); border-color: rgba(var(--gold-rgb), .45); box-shadow: var(--shadow-lift); }
.tile.hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--hairline); }
.tile.hero .tile-value { font-size: 44px; color: var(--gold-soft); }
.section-title { letter-spacing: .08em; }
th { letter-spacing: .07em; font-size: 11.5px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(var(--gold-rgb), .055); }
.pill { letter-spacing: .01em; }
.notice { border-style: solid; border-color: rgba(var(--gold-rgb), .45); }
.drawer { background: rgba(4,12,10,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.drawer-panel { box-shadow: -30px 0 70px -30px rgba(0,0,0,.55); border-left-color: rgba(var(--gold-rgb), .28); }

/* Buttons and fields */
.btn { border-radius: 10px; letter-spacing: .005em; transition: transform .18s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease, filter .22s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: none; }
.btn-primary { background: linear-gradient(180deg, #E2C88F 0%, #C7A15A 100%); border-color: #A8843F; color: #0C2E27; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.12), 0 10px 20px -12px rgba(var(--gold-rgb), .9); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #EAD3A0 0%, #D0AC66 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 4px rgba(0,0,0,.14), 0 16px 26px -14px rgba(var(--gold-rgb), 1); }
.btn-ghost { background: color-mix(in srgb, var(--panel) 60%, transparent); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); background: rgba(var(--gold-rgb), .08); }
.icon-btn { border-radius: 10px; transition: border-color .2s ease, background .2s ease; }
.icon-btn:hover { border-color: var(--gold); background: rgba(var(--gold-rgb), .08); }
input, select, textarea { border-radius: 10px; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .18); }

/* Tabs inside a page */
.subtabs a, .subtabs button { transition: background .2s ease, color .2s ease, border-color .2s ease; }
.subtabs a:hover, .subtabs button:hover { border-color: var(--gold); }
:root[data-theme="dark"] .subtabs a[aria-current="page"], :root[data-theme="dark"] .subtabs button[aria-current="page"] { background: linear-gradient(180deg, #E2C88F, #C7A15A); color: #0C2E27; border-color: #A8843F; }

/* Pages arrive softly */
#view > * { animation: lgo-rise .32s cubic-bezier(.2,.7,.2,1) both; }
#view > *:nth-child(2) { animation-delay: .04s; } #view > *:nth-child(3) { animation-delay: .08s; } #view > *:nth-child(4) { animation-delay: .12s; }
.toast { box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .35), 0 24px 50px -20px rgba(0,0,0,.55); }

/* Sign-in pages */
body.auth { background: radial-gradient(1000px 620px at 82% -10%, rgba(var(--gold-rgb), .20), transparent 62%), radial-gradient(900px 620px at 0% 110%, rgba(18,63,54,.16), transparent 60%), var(--bg); background-attachment: fixed; }
.auth-card { position: relative; overflow: hidden; border-radius: 22px; padding: 38px 32px; background: var(--surface); border-color: rgba(var(--gold-rgb), .30); box-shadow: 0 1px 1px rgba(18,63,54,.05), 0 40px 80px -40px rgba(18,63,54,.55); animation: lgo-rise .45s cubic-bezier(.2,.7,.2,1) both; }
.auth-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--hairline); }
.auth h1 { font-size: 30px; letter-spacing: -.02em; }
.auth .btn { min-height: 48px; }
:root[data-theme="dark"] .auth-card { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 50px 90px -40px rgba(0,0,0,1); }

@media (max-width: 900px) { .brand::after, .side-foot::before { display: none; } .top { position: relative; } .card { padding: 18px 16px; } .top h1 { font-size: 24px; } .tile-value { font-size: 28px; } .tile.hero .tile-value { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) {
  #view > *, .toast, .auth-card, .assist-msg { animation: none !important; }
  .nav a, .card, .tile, .btn, .subtabs a, .subtabs button, tbody tr { transition: none !important; }
  .tile:hover, .btn:hover:not(:disabled) { transform: none !important; }
}
