/* Admin panel styles. Colours are tokens so a white-label theme only changes this block. */
/* Brand theme (same look as the product website): dark by default, light on request (data-theme="light").
   Chart colours are checked for colour-blind safety and contrast in each mode. */
:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-glow-1: rgba(109, 75, 255, .16);
  --bg-glow-2: rgba(14, 165, 233, .10);
  --surface: #10131d;
  --surface-2: #171b28;
  --surface-3: #1e2333;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .15);
  --text: #eef0f7;
  --text-2: #b4bacb;
  --text-3: #7f869b;
  --accent: #8b7bff;
  --accent-2: #22d3ee;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, #8b6cff 0%, #5b8cff 50%, #22d3ee 100%);
  --series-1: #8b7bff;
  --series-2: #1aa5c4;
  --series-3: #d07434;
  --good: #34d399;
  --bad: #fb7185;
  --warn: #f5b942;
  --grid: rgba(255, 255, 255, .06);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 30px -18px rgba(0, 0, 0, .8);
  --shadow-pop: 0 24px 60px -24px rgba(0, 0, 0, .85);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5fa;
  --bg-glow-1: rgba(109, 92, 232, .10);
  --bg-glow-2: rgba(14, 143, 176, .07);
  --surface: #ffffff;
  --surface-2: #f2f3f8;
  --surface-3: #e9ebf3;
  --border: #e4e6ef;
  --border-2: #d3d7e4;
  --text: #0e1120;
  --text-2: #4a5068;
  --text-3: #767c92;
  --accent: #6d5ce8;
  --accent-2: #0e8fb0;
  --series-1: #6d5ce8;
  --series-2: #0e8fb0;
  --series-3: #c4621c;
  --good: #14895a;
  --bad: #d23b55;
  --warn: #b36b00;
  --grid: #eceef4;
  --shadow: 0 1px 2px rgba(16, 24, 64, .05), 0 8px 24px -16px rgba(16, 24, 64, .18);
  --shadow-pop: 0 24px 60px -24px rgba(16, 24, 64, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.boot { padding: 48px; color: var(--text-3); }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; padding: 4px 10px 18px; }
.logo svg { width: 26px; height: 26px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .spacer { flex: 1; }
.who { font-size: 12px; color: var(--text-3); padding: 10px; border-top: 1px solid var(--border); }
.who b { color: var(--text-2); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.topbar h1 { font-size: 18px; margin: 0; font-weight: 650; flex: 1; min-width: 160px; }
.content { padding: 24px 28px 48px; max-width: 1400px; }

/* ---------- controls */
.select, .input { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-height: 36px; }
.input:focus, .select:focus { outline: 2px solid color-mix(in oklab, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--border); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* ---------- cards & tiles */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1350px) { .kpis, .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.two { grid-template-columns: 2fr 1fr; }
.half { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 14px; margin: 0 0 2px; font-weight: 600; }
.card .sub { color: var(--text-3); font-size: 12px; margin: 0 0 12px; }
.tile .label { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta .muted { color: var(--text-3); font-weight: 400; }
.muted { color: var(--text-3); font-weight: 400; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; color: var(--text-3); font-weight: 600; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: var(--surface-2); }
tr.click { cursor: pointer; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--text-3); font-size: 13px; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell span.bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--series-1); }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge.vip { color: #f5c75c; background: rgba(245, 185, 66, .12); border-color: rgba(245, 185, 66, .35); }
:root[data-theme="light"] .badge.vip { color: #8a5a00; background: #fff4d6; border-color: #f2d48a; }
.badge.churned { color: var(--text-3); }
.badge.bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 35%, transparent); background: color-mix(in oklab, var(--bad) 8%, transparent); }
.badge.good { color: var(--good); border-color: color-mix(in oklab, var(--good) 35%, transparent); background: color-mix(in oklab, var(--good) 8%, transparent); }
.badge.test { color: var(--warn); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .12; }
.chart .cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .endlabel { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 16px rgb(0 0 0 / .12); white-space: nowrap; z-index: 3; }
.tip .t { color: var(--text-3); margin-bottom: 4px; }
.tip .r { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tip .r i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.tip b { font-variant-numeric: tabular-nums; }

/* ---------- player profile */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 15%, var(--surface)); color: var(--accent); font-weight: 700; }
.profile-head h2 { margin: 0; font-size: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; }
.facts div span { display: block; color: var(--text-3); font-size: 12px; }
.facts div b { font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 150px 150px 1fr auto; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); align-items: center; font-size: 13px; }
.timeline .when { color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline .what { font-weight: 600; }
.timeline .detail { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline .amt { text-align: right; font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-bottom: 12px; font-size: 13px; }

/* ---------- integration */
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow-x: auto; font: 12.5px/1.5 var(--mono); }
.note { background: color-mix(in oklab, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent); border-radius: 8px; padding: 10px 14px; color: var(--text-2); margin-bottom: 16px; }
.form { display: grid; gap: 14px; max-width: 420px; }
.form label { display: grid; gap: 6px; font-weight: 500; }
.form small { color: var(--text-3); font-weight: 400; }
.msg { font-size: 13px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--good); }
.empty { color: var(--text-3); padding: 24px 0; text-align: center; }
.skeleton { height: 120px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }


/* ---------- profit & loss */
.pl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; }
.pl h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 6px 0 4px; font-weight: 600; }
.pl-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.pl-row small { display: block; color: var(--text-3); font-size: 11.5px; }
.pl-row span small { display: inline; margin-left: 6px; }
.pl-row b { font-weight: 600; }
.pl-row.sub b { font-weight: 650; }
.pl-row.total { border-bottom: 0; border-top: 2px solid var(--text); margin-top: 2px; font-weight: 650; }
.pl-row.total b { font-size: 17px; }
.pos, .pl-row.total.pos b, .value.pos { color: var(--good); }
.neg, .pl-row.total.neg b, .value.neg { color: var(--bad); }

/* ---------- segments & triggers */
.seg-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.seg-layout .form { max-width: none; }
.cb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; margin-bottom: 10px; }
.cb-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.cb-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.cb-row .input, .cb-row .select { width: 100%; min-width: 0; }
.cb-empty { padding: 6px 0; margin: 0; }
.unit-wrap { display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.unit-wrap .input { flex: 1; color: var(--text); }
.icon-btn { width: 32px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; color: var(--text-3); cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger-outline { background: none; color: var(--bad); border: 1px solid color-mix(in oklab, var(--bad) 45%, transparent); }
a.btn { display: inline-block; }
.row-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.templates { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.card h2 .count { margin-left: 6px; color: var(--accent); font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; min-width: 180px; }
.label-like { font-weight: 500; margin-bottom: 6px; }
.wrap-seg { flex-wrap: wrap; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.secret { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.secret code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font: 12.5px var(--mono); word-break: break-all; flex: 1 1 260px; }
.steps { padding-left: 18px; margin: 8px 0 12px; color: var(--text-2); line-height: 1.6; }
.howto { margin-top: 16px; }
.howto summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
[hidden] { display: none !important; }


/* ---------- journeys */
:root { --j-start: #1baf7a; --j-wait: #8a8a83; --j-cond: #2a78d6; --j-split: #8b5cf6; --j-action: #eb6834; --j-goal: #c48a00; --j-end: #5d5d58; }
.content.wide { max-width: none; padding: 14px 16px 16px; }
.title-input { font: inherit; font-weight: 650; border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 6px; padding: 2px 6px; margin-left: -6px; min-width: 0; width: min(420px, 60vw); }
.title-input:hover:not(:disabled), .title-input:focus { border-color: var(--border); background: var(--surface); outline: none; }
.save-state { color: var(--text-3); font-size: 12.5px; }
.save-state.err { color: var(--bad); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tpl { display: grid; gap: 4px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.tpl:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl span { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.jb { display: grid; grid-template-columns: 200px minmax(0, 1fr) 330px; gap: 12px; height: calc(100vh - 110px); min-height: 520px; }
.jb-palette { overflow-y: auto; }
.jb-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; margin: 4px 0 8px; }
.jb-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 9px; background: var(--surface); margin-bottom: 8px; cursor: grab; user-select: none; }
.jb-item:hover { box-shadow: var(--shadow), 0 0 0 1px var(--c); }
.jb-item svg { width: 18px; height: 18px; color: var(--c); flex: none; }
.jb-item b { display: block; font-size: 13px; font-weight: 600; }
.jb-item span { display: block; font-size: 11.5px; color: var(--text-3); }
.jb-canvas { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); outline: none; touch-action: none; cursor: grab;
  background-color: var(--surface-2); background-image: radial-gradient(var(--grid) 1.2px, transparent 1.2px); background-size: 20px 20px; }
.jb-canvas:active { cursor: grabbing; }
.jb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.jb-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.je { fill: none; stroke-width: 2.2; }
.je.selected { stroke-width: 4; filter: drop-shadow(0 0 3px var(--accent)); }
.je.temp { stroke: var(--accent); stroke-dasharray: 6 5; }
.je-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.jn { position: absolute; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: move; user-select: none; }
.jn.selected { box-shadow: 0 0 0 2px var(--accent), 0 4px 14px rgba(0,0,0,.12); }
.jn.has-error { border-color: var(--bad); border-top-color: var(--c); }
.jn.drop { box-shadow: 0 0 0 3px var(--good); }
.jn-head { display: flex; align-items: center; gap: 7px; padding: 8px 11px 2px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--c); }
.jn-head svg { width: 15px; height: 15px; }
.jn-flag { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font-size: 12px; }
.jn.has-error .jn-flag { background: var(--bad); }
.jn-body { padding: 2px 11px 22px; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.jn-body b { color: var(--text); font-weight: 600; }
.jn-in { position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text-3); }
.jn-ports { position: absolute; left: 0; right: 0; bottom: -8px; display: flex; justify-content: space-around; }
.jn-port { display: flex; flex-direction: column; align-items: center; cursor: crosshair; }
.jn-port .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--c); }
.jn-port:hover .dot { transform: scale(1.3); }
.jn-port i { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text-3); margin-bottom: 1px; }
.jn-port[data-port="yes"] .dot { background: var(--good); box-shadow: 0 0 0 1px var(--good); }
.jn-port[data-port="no"] .dot { background: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.jb-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.jb-zoom .icon-btn { background: var(--surface); }
.jb-inspector { overflow-y: auto; }
.insp-head { display: flex; gap: 8px; align-items: center; color: var(--c); margin-bottom: 10px; }
.insp-head svg { width: 18px; height: 18px; }
.insp-head h2 { margin: 0; color: var(--text); }
.insp-form { max-width: none; gap: 12px; min-width: 0; }
.insp-form .select, .insp-form .input { width: 100%; min-width: 0; max-width: 100%; }
.insp-form .cb-row { grid-template-columns: 1fr 1fr; }
.insp-form .cb-row > :nth-child(3) { grid-column: 1 / 2; }
.insp-form input[type=range] { width: 100%; }
textarea.input { resize: vertical; font: inherit; }
.dur { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.prob { padding: 7px 10px; border-radius: 7px; font-size: 12.5px; margin-bottom: 6px; line-height: 1.4; }
.prob.error { background: color-mix(in oklab, var(--bad) 10%, transparent); color: var(--bad); cursor: pointer; }
.prob.warn { background: color-mix(in oklab, var(--warn) 12%, transparent); color: color-mix(in oklab, var(--warn) 70%, var(--text)); cursor: pointer; }
.prob.ok { background: color-mix(in oklab, var(--good) 10%, transparent); color: var(--good); }
.note.live { background: color-mix(in oklab, var(--good) 10%, var(--surface)); border-color: color-mix(in oklab, var(--good) 35%, transparent); }
.note.live::first-letter { color: var(--good); }
.jn-stats { margin: -14px 11px 18px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.jn-stats .here { color: var(--accent); font-weight: 600; }
.test-run { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.path { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
@media (max-width: 1100px) { .jb { grid-template-columns: minmax(0, 1fr) 300px; } .jb-palette { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; } .jb-palette .jb-title, .jb-palette p { display: none; } .jb-item { margin: 0; flex: none; } }
@media (max-width: 760px) { .jb { grid-template-columns: 1fr; height: auto; } .jb-canvas { height: 60vh; } }


/* ---------- team, keys, websites, reports, casinos */
.once { border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent); background: color-mix(in oklab, var(--warn) 8%, var(--surface)); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.form.wide-form { max-width: none; margin: 8px 0 14px; }
.linkbtn.danger { color: var(--bad); }
.nowrap { white-space: nowrap; }
.select.small { padding: 4px 8px; min-height: 30px; }
.site { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.site.revoked { opacity: .55; }
.site-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.site-head .spacer { flex: 1; }
pre.code.small { font-size: 11.5px; padding: 10px; margin: 6px 0 12px; white-space: pre-wrap; word-break: break-all; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
td.heat { background: color-mix(in oklab, var(--series-1) calc(var(--h) * 0.9%), transparent); }
.forgot { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.forgot summary { cursor: pointer; color: var(--accent); }
.forgot p { margin: 6px 0 0; }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login h1 { font-size: 20px; margin: 0 0 4px; }
.login p { color: var(--text-3); margin: 0 0 20px; }
.login .form { max-width: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 8px; position: sticky; top: 0; z-index: 6; }
  .nav { display: flex; gap: 2px; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .kpis, .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .value { font-size: 21px; }
  .topbar { position: static; }
  .logo, .sidebar .spacer, .who { display: none; }
  .two, .half { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .timeline li { grid-template-columns: 1fr auto; grid-template-areas: "what amt" "when when" "detail detail"; row-gap: 2px; }
  .timeline .what { grid-area: what; } .timeline .amt { grid-area: amt; }
  .timeline .when { grid-area: when; font-size: 12px; } .timeline .detail { grid-area: detail; font-size: 12px; }
  .pl, .seg-layout { grid-template-columns: 1fr; }
  .cb-row { grid-template-columns: 1fr 1fr 32px; }
  .cb-row > :nth-child(3) { grid-column: 1 / 3; }
}

/* payments funnel */
.funnel { margin-bottom: 16px; display: grid; gap: 6px; }
.f-row { display: grid; grid-template-columns: 150px 1fr 80px 56px; align-items: center; gap: 10px; font-size: 13px; }
.f-row b { text-align: right; font-variant-numeric: tabular-nums; }
.f-row small { color: var(--text-3); text-align: right; }
.f-bar { background: var(--surface-2); border-radius: 4px; height: 14px; overflow: hidden; }
.f-bar i { display: block; height: 100%; background: var(--series-1); }
.f-out { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 600px) { .f-row { grid-template-columns: 100px 1fr 60px; } .f-row small { display: none; } }

/* bonuses */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }
a.chip { text-decoration: none; }
.wager { min-width: 120px; display: grid; gap: 3px; }
.wager small { color: var(--text-3); font-size: 11.5px; }
.contrib { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.contrib label { font-size: 12.5px; }
.contrib span { display: flex; align-items: center; gap: 4px; }
.contrib input { width: 70px; }
.steps-list { margin: 8px 0 0 18px; padding: 0; display: grid; gap: 8px; color: var(--text-2); font-size: 13.5px; }
ul.plain { margin: 6px 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.give select { min-width: 180px; }
.bonus-form .grid.half { align-items: end; }
.bonus-form .row-btns { margin-top: 16px; }
.card-head .chips { flex: 1 1 auto; }
.card.form { max-width: none; align-content: start; }
table.compact td { padding: 6px 8px; vertical-align: top; font-size: 13px; white-space: normal; }
table.compact td:first-child { white-space: nowrap; }

/* data health */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
ul.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
ul.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.health-pill { font-size: 17px; white-space: nowrap; } .health-pill.good { color: var(--good); } .health-pill.warn { color: var(--warn); } .health-pill.bad { color: var(--bad); }
.alert-note { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
tr.raw td { background: var(--surface-2); }
tr.raw pre { margin: 4px 0; font: 12px var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }
ul.err-list { margin: 0; color: var(--bad); }
.check-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.events-tbl td.sub { max-width: 360px; }

/* database sync */
.map-layout { grid-template-columns: minmax(340px, 5fr) minmax(0, 6fr); align-items: start; }
.map-field { border-top: 1px solid var(--border); padding-top: 10px; }
.map-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.map-pick .select { flex: 1 1 200px; }
.map-values { margin: 8px 0 0 12px; display: grid; gap: 4px; }
.map-row { display: grid; grid-template-columns: minmax(80px, 1fr) 14px minmax(120px, 1fr); gap: 6px; align-items: center; font-size: 12.5px; }
.select.small { padding: 4px 8px; font-size: 12.5px; }
.sample-wrap { max-height: 260px; overflow: auto; }
details summary { cursor: pointer; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }
.preview-tbl td:first-child { width: 42%; white-space: normal; }
.preview-tbl td { white-space: normal; }

/* Player privacy (GDPR deletion) */
.callout { background: color-mix(in oklab, var(--bad) 6%, var(--surface)); border: 1px solid color-mix(in oklab, var(--bad) 30%, transparent); border-radius: 8px; padding: 12px 14px; }
.callout p { margin: 0 0 10px; }
td.small, .muted.small, div.small { font-size: 12.5px; }
.profile-head .linkbtn.danger { align-self: center; white-space: nowrap; }

.note.warn-note { background: color-mix(in oklab, var(--warn) 10%, var(--surface)); border-color: color-mix(in oklab, var(--warn) 35%, transparent); }

/* Game catalogue */
.game-cell { display: flex; align-items: center; gap: 10px; }
.game-thumb { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.game-thumb.none { display: inline-block; }

/* Live / online now */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 25%, transparent); vertical-align: middle; margin-right: 4px; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--good) 8%, transparent); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-strip { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 14px; padding: 7px 14px; border-radius: 999px; background: color-mix(in oklab, var(--good) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--good) 30%, transparent); color: var(--text); text-decoration: none; font-size: 14px; }
.live-strip:hover { border-color: var(--good); }
.live-strip.quiet { background: var(--surface-2); border-color: var(--border); }
.live-strip.quiet .live-dot { background: var(--text-3); animation: none; box-shadow: none; }

/* messaging: channel badges and template previews */
.badge.kind-email { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.badge.kind-sms, .badge.kind-whatsapp { background: color-mix(in srgb, #1f9d55 15%, transparent); color: #1f8a4c; }
.badge.kind-push { background: color-mix(in srgb, #d97706 16%, transparent); color: #b45309; }
.badge.kind-telegram { background: color-mix(in srgb, #229ed9 16%, transparent); color: #1d87ba; }
.badge.kind-onsite { background: color-mix(in srgb, #8b5cf6 16%, transparent); color: #7c3aed; }
.span2 { grid-column: 1 / -1; }
.pv-phone { background: var(--surface-2); border-radius: 14px; padding: 18px; }
.pv-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 10px 12px; max-width: 320px; white-space: normal; line-height: 1.45; }
.pv-bubble.wa { background: #dcf8c6; color: #111; border-color: #cbe9b5; }
.pv-bubble.tg a, .pv-bubble a { color: var(--accent); }
.pv-tgbtn { max-width: 320px; margin: 6px 18px 0; text-align: center; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.pv-push { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; max-width: 380px; box-shadow: var(--shadow); }
.pv-push img, .pv-push .pv-icon { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--accent); }
.pv-img { display: block; max-width: 380px; width: 100%; border-radius: 10px; margin-top: 8px; }
.pv-site { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px); border-radius: 12px; padding: 24px 16px; display: flex; justify-content: center; min-height: 240px; align-items: center; }
.pv-site.bottom { justify-content: flex-end; align-items: flex-end; }
.pv-pop { position: relative; background: #fff; color: #111; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 20px; max-width: 320px; line-height: 1.5; }
.pv-pop b { display: block; font-size: 17px; margin: 0 24px 6px 0; }
.pv-pop p { margin: 0 0 8px; } .pv-pop a { color: #2563eb; }
.pv-pop img { display: block; width: 100%; border-radius: 10px; margin-bottom: 10px; }
.pv-x { position: absolute; top: 6px; right: 12px; font-size: 22px; color: #666; }
.pv-go { display: block; text-align: center; background: #111; color: #fff; border-radius: 10px; padding: 10px; font-weight: 600; margin-top: 10px; }


/* ======================================================================== brand refresh (2026-10-13)
   Overrides the base styles above: same structure and class names, a richer look. */
html, body { font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(900px 600px at 12% -10%, var(--bg-glow-1), transparent 60%),
  radial-gradient(800px 500px at 100% 0%, var(--bg-glow-2), transparent 60%), var(--bg); background-attachment: fixed; }
h1, h2, .tile .value, .logo span { font-family: var(--display); letter-spacing: -.015em; }
a { color: var(--accent); }
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }

/* sidebar */
.shell { grid-template-columns: 236px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(18px); border-right: 1px solid var(--border); padding: 18px 12px 14px; gap: 2px; }
.logo { font-size: 16px; font-weight: 700; padding: 6px 10px 20px; gap: 11px; }
.logo svg { width: 30px; height: 30px; filter: drop-shadow(0 6px 14px rgba(109, 75, 255, .45)); }
.nav-group { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 14px 12px 6px; }
.nav a { position: relative; padding: 8px 12px; border-radius: 10px; font-weight: 500; transition: background .2s, color .2s; }
.nav a svg { color: var(--text-3); transition: color .2s; }
.nav a:hover svg { color: var(--text-2); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 22%, transparent), color-mix(in oklab, var(--accent) 4%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 28%, transparent); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav a.active svg { color: var(--accent); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 60%, transparent)); }
.who { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; margin-top: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--border); }
.who .me { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); font-size: 13px; }
.who b { font-size: 12.5px; }
.theme-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.theme-btn:hover { color: var(--text); border-color: var(--border-2); }
.theme-btn svg { width: 16px; height: 16px; }

/* top bar */
.topbar { background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--border); padding: 14px 32px; }
.topbar h1 { font-size: 21px; font-weight: 700; }
.content { padding: 26px 32px 56px; max-width: 1480px; }
.content > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.content > *:nth-child(2) { animation-delay: .04s; } .content > *:nth-child(3) { animation-delay: .08s; } .content > *:nth-child(4) { animation-delay: .12s; } .content > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* controls */
.select, .input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; min-height: 38px; padding: 8px 12px; transition: border-color .2s, box-shadow .2s, background .2s; }
.select:hover, .input:hover { border-color: var(--border-2); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); background: var(--surface); }
.seg { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.seg button { border-radius: 8px; padding: 6px 13px; transition: color .2s, background .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px color-mix(in oklab, var(--accent) 80%, transparent); }
.btn { background: var(--grad); color: #fff; border-radius: 10px; padding: 9px 18px; box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22); transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.btn.secondary { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn.secondary:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--border-2); }
.linkbtn { color: var(--accent); font-weight: 500; }

/* cards */
.card { position: relative; background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 100%, transparent), color-mix(in oklab, var(--surface) 88%, var(--bg))); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: var(--border-2); }
.card h2 { font-size: 15px; font-weight: 600; }
.card .sub { font-size: 12.5px; }
.grid { gap: 18px; }

/* KPI tiles */
.tile { overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 12px; }
.tile .head { display: flex; align-items: center; gap: 10px; }
.tile .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--c, var(--accent)); background: color-mix(in oklab, var(--c, var(--accent)) 14%, transparent); border: 1px solid color-mix(in oklab, var(--c, var(--accent)) 30%, transparent); }
.tile .ic svg { width: 17px; height: 17px; }
.tile .label { font-size: 12.5px; color: var(--text-2); }
.tile .value { font-size: clamp(19px, 1.75vw, 27px); font-weight: 700; margin: 10px 0 4px; white-space: nowrap; }
.tile .spark { display: block; width: calc(100% + 36px); margin: 8px -18px -12px; height: 44px; }
.tile::after { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--c, var(--accent)) 60%, transparent), transparent); opacity: .7; }
.delta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delta.up b, .delta.down b { padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.delta.up b { background: color-mix(in oklab, var(--good) 14%, transparent); }
.delta.down b { background: color-mix(in oklab, var(--bad) 14%, transparent); }

/* overview banner + live strip */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h2 { font-size: 26px; margin: 0; font-weight: 700; }
.hello h2 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello p { margin: 4px 0 0; color: var(--text-3); }
.live-strip { display: inline-flex; align-items: center; gap: 2px; padding: 8px 16px; border-radius: 999px; background: color-mix(in oklab, var(--good) 10%, var(--surface)); border: 1px solid color-mix(in oklab, var(--good) 30%, transparent); color: var(--text); font-weight: 500; box-shadow: 0 10px 30px -18px color-mix(in oklab, var(--good) 80%, transparent); transition: transform .2s; margin: 0; }
.live-strip:hover { text-decoration: none; transform: translateY(-1px); }
.live-strip b { font-family: var(--display); font-size: 16px; }

/* tables */
th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; padding: 10px 10px; }
td { border-bottom-color: var(--border); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in oklab, var(--accent) 6%, transparent); }
.bar-cell span.bar { height: 7px; border-radius: 99px; background: var(--grad); box-shadow: 0 0 12px -2px color-mix(in oklab, var(--accent) 60%, transparent); }
.game-thumb { border-radius: 8px; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); }

/* badges */
.badge { border-radius: 999px; padding: 2px 9px; }

/* charts */
.chart .gridline { stroke: var(--grid); }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .line { stroke-width: 2.25; }
.chart .area { opacity: 1; }
.chart .cross { stroke: var(--border-2); stroke-dasharray: 3 4; }
.chart .dot { stroke: var(--surface); stroke-width: 2.5; }
.chart .halo { opacity: .25; }
.chart .endlabel { fill: var(--text-2); }
.chart .bar { transition: opacity .15s; }
.chart.hovering .bar { opacity: .45; } .chart .bar.on { opacity: 1; }
.chart svg .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: chartdraw 1.1s cubic-bezier(.3, .7, .2, 1) forwards; }
.chart svg .fadein { opacity: 0; animation: chartfade .8s .35s forwards; }
.chart svg .grow { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); animation: chartgrow .7s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes chartdraw { to { stroke-dashoffset: 0; } } @keyframes chartfade { to { opacity: 1; } } @keyframes chartgrow { to { transform: scaleY(1); } }
.legend { gap: 16px; font-size: 12.5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.tip { background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-pop); min-width: 160px; }
.tip .t { font-size: 11.5px; letter-spacing: .02em; }
.tip .r { padding: 2px 0; gap: 18px; }
.tip .r i { width: 8px; height: 8px; border-radius: 50%; }

/* P&L */
.pl-row.total { border-top: 1px solid var(--border-2); }
.pl-row.total b { font-family: var(--display); font-size: 19px; }

/* player profile */
.avatar { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); color: #fff; font-family: var(--display); font-size: 18px; box-shadow: 0 10px 26px -12px color-mix(in oklab, var(--accent) 90%, transparent); }
.profile-head h2 { font-size: 24px; }

/* login */
.login { position: relative; overflow: hidden; isolation: isolate; }
.login::before, .login::after { content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 18s ease-in-out infinite; }
.login::before { background: #6d4bff; left: -120px; top: -160px; }
.login::after { background: #0ea5e9; right: -160px; bottom: -200px; animation-delay: -8s; opacity: .35; }
@keyframes drift { 50% { transform: translate(60px, 40px) scale(1.08); } }
.login .card { max-width: 400px; padding: 34px; background: color-mix(in oklab, var(--surface) 80%, transparent); backdrop-filter: blur(22px); border-color: var(--border-2); box-shadow: var(--shadow-pop); }
.login h1 { font-size: 26px; font-weight: 700; }
.login .btn { width: 100%; padding: 12px; font-size: 15px; }

/* notes, empties, skeletons */
.note { border-radius: 12px; background: color-mix(in oklab, var(--accent) 9%, var(--surface)); border-color: color-mix(in oklab, var(--accent) 26%, transparent); }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; }
pre.code { border-radius: 12px; background: color-mix(in oklab, var(--bg) 70%, var(--surface)); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; flex-direction: row; padding: 8px; align-items: center; }
  .nav { align-items: center; }
  .nav-group, .who, .logo, .sidebar .spacer { display: none; }
  .nav a.active::before { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .hello h2 { font-size: 22px; }
}
/* Less motion requested (e.g. Windows "Animation effects" off): keep fades and charts drawing in, stop big movement. */
@media (prefers-reduced-motion: reduce) {
  .login::before, .login::after { animation: none !important; }
  .content > * { animation-name: fadeonly; }
  .btn:hover:not(:disabled), .live-strip:hover { transform: none; }
}
@keyframes fadeonly { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------- player insights, game profit & loss, fraud */
.tile.pick { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.tile.pick:hover { border-color: color-mix(in oklab, var(--c, var(--accent)) 45%, var(--border)); }
.tile.pick.on { border-color: var(--c, var(--accent)); box-shadow: var(--shadow), 0 0 0 1px var(--c, var(--accent)); }
.tile.pick:focus-visible { outline: 2px solid var(--c, var(--accent)); outline-offset: 2px; }
.insight-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 900px) { .insight-top { grid-template-columns: 1fr; } }
.cmp3 { display: inline-flex; align-items: flex-end; gap: 3px; height: 24px; vertical-align: middle; }
.cmp3 span { width: 10px; height: 24px; display: flex; align-items: flex-end; }
.cmp3 i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: var(--series-1); }
.cmp3 span:nth-child(2) i { background: var(--series-2); }
.cmp3 span:nth-child(3) i { background: var(--series-3); }
.cmp3-num { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-cell span.bar.pos { background: var(--good); }
.bar-cell span.bar.neg { background: var(--bad); }
tr.winners > td { background: var(--surface-2); padding: 10px 14px 14px; }
.thresholds { margin-bottom: 16px; }
.th-form { max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 22px; align-items: start; }
.th-form fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.th-form legend { font-weight: 650; padding: 0 6px; color: var(--text); }
.th-form .row-btns, .th-form .msg { grid-column: 1 / -1; }
.th-input { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.th-input i { font-style: normal; color: var(--text-3); }
.th-input .input { max-width: 160px; }
.btn.danger-fill { background: var(--bad); box-shadow: none; }
.review-form .input { max-width: 200px; }

/* ---------------------------------------------------------- staff player tags */
.tagc { --tc: var(--text-3); display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  color: color-mix(in oklab, var(--tc) 85%, var(--text)); background: color-mix(in oklab, var(--tc) 14%, transparent); border: 1px solid color-mix(in oklab, var(--tc) 40%, transparent); white-space: nowrap; }
.tagc.c-red { --tc: #f05d6c; } .tagc.c-orange { --tc: #f08a3c; } .tagc.c-yellow { --tc: #e0b028; } .tagc.c-green { --tc: #2fbf71; }
.tagc.c-teal { --tc: #1fb5a8; } .tagc.c-blue { --tc: #3b8cf0; } .tagc.c-violet { --tc: #8b6cff; } .tagc.c-pink { --tc: #e65fa8; } .tagc.c-grey { --tc: #8a93a6; }
.tagc small { font-weight: 500; opacity: .75; }
button.tagc.pickable { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 11px; }
button.tagc.pickable:hover { border-color: var(--tc); }
button.tagc.pickable.on { background: color-mix(in oklab, var(--tc) 32%, transparent); border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-groups { display: grid; gap: 10px; margin-top: 10px; }
.tag-group { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.tg-name { color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
@media (max-width: 600px) { .tag-group { grid-template-columns: 1fr; gap: 4px; } }
th.sel, td.sel { width: 34px; padding-right: 0 !important; }
td.sel input, th.sel input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.bulk-bar { position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px;
  background: color-mix(in oklab, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); border-radius: 10px; }
.bulk-bar .input.small, .bulk-bar .select.small { padding: 6px 9px; font-size: 13px; }
.bulk-bar #bb-note { flex: 1; min-width: 180px; }
.note-cell { max-width: 280px; font-size: 13px; }
.ptags { display: grid; gap: 8px; margin: 6px 0 10px; }
.ptag { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ptag .ptag-meta { flex: 1; font-size: 13px; min-width: 0; }
.color-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.color-pick label { display: inline-flex; cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick input:checked + .tagc { box-shadow: 0 0 0 2px var(--tc); }
.color-pick input:focus-visible + .tagc { outline: 2px solid var(--accent); outline-offset: 2px; }
ul.history { margin: 8px 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.empty-state .row-btns { margin-top: 12px; }
.tag-form { max-width: 760px; }
.sugg { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------- AI assistant */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px; border: 0; border-radius: 999px;
  background: var(--grad); color: #fff; font: inherit; font-weight: 650; cursor: pointer; box-shadow: 0 12px 30px -10px color-mix(in oklab, var(--accent) 85%, transparent); }
.ai-fab svg { width: 18px; height: 18px; }
.ai-fab:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ai-fab[hidden] { display: none; }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .5); }
.ai-drawer[hidden] { display: none; }
.ai-drawer header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ai-drawer header b { display: inline-flex; align-items: center; gap: 6px; flex: 1; white-space: nowrap; }
.ai-drawer header b svg { width: 18px; height: 18px; color: var(--accent); }
.ai-drawer header .select { max-width: 150px; padding: 5px 8px; font-size: 12.5px; }
.ai-x { border: 0; background: none; color: var(--text-2); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-empty { margin: auto 0; text-align: center; padding: 10px; }
.ai-empty .sub { margin: 6px auto 14px; max-width: 360px; }
.ai-hero { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.ai-hero svg { width: 26px; height: 26px; }
.ai-sugg { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ai-sugg .chip { text-align: left; border-radius: 10px; }
.ai-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg.me { align-self: flex-end; background: color-mix(in oklab, var(--accent) 22%, var(--surface-2)); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ai-msg.bot p { margin: 0 0 8px; } .ai-msg.bot p:last-child { margin-bottom: 0; }
.ai-msg.bot ul, .ai-msg.bot ol { margin: 4px 0 8px 18px; padding: 0; }
.ai-msg.bot h4 { margin: 8px 0 4px; font-size: 13.5px; }
.ai-msg.bot .ai-table { margin: 6px 0 8px; max-height: 320px; overflow: auto; }
.ai-msg.bot .ai-table table { font-size: 12.5px; }
.ai-steps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ai-steps span { font-size: 11px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.ai-steps span::before { content: "✓ "; color: var(--good); }
.ai-acts { display: grid; gap: 8px; margin-top: 10px; }
.ai-act { border: 1px solid var(--border); border-left: 3px solid var(--accent, #8b7bff); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.ai-act.st-done { border-left-color: var(--good); }
.ai-act.st-failed { border-left-color: var(--bad); }
.ai-act.st-cancelled { opacity: .6; border-left-color: var(--border); }
.ai-act-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ai-act-h b { font-size: 13px; line-height: 1.35; }
.ai-act ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--text-2); }
.ai-act li { margin: 1px 0; overflow-wrap: anywhere; }
.ai-act .row-btns { margin-top: 8px; }
.ai-act-r { margin: 6px 0 0; font-size: 12px; }
.ai-more summary { cursor: pointer; font-size: 12px; color: var(--accent); margin-top: 4px; }
.ai-steps span.bad::before { content: "! "; color: var(--bad); }
.ai-msg.thinking { color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.ai-msg.thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: aidot 1s infinite ease-in-out; }
.ai-msg.thinking span:nth-child(2) { animation-delay: .15s; } .ai-msg.thinking span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ai-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.ai-input[hidden] { display: none; }
.ai-input textarea { flex: 1; resize: none; font: inherit; font-size: 13.5px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.ai-input textarea:focus { outline: none; border-color: var(--accent); }
.ai-foot { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: var(--text-3); }
#ai-card h2 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }
.nora-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; font-size: 15px;
  color: #fff; background: radial-gradient(circle at 30% 25%, #f9a8d4, transparent 55%), var(--grad); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
.nora-av.sm { width: 24px; height: 24px; font-size: 12.5px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.nora-av.lg { width: 56px; height: 56px; font-size: 26px; margin: 0 auto 10px; }
.ai-drawer header b { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
.ai-drawer header b small { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.ai-icon { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; flex: none; }
.ai-icon svg { width: 17px; height: 17px; }
.ai-icon.on { color: #fff; background: var(--grad); border-color: transparent; }
.ai-icon.mic { align-self: center; }
.ai-icon.mic.on { animation: aidot 1s infinite ease-in-out; }
.ai-listen { border: 1px solid var(--border); background: var(--surface); color: var(--accent); font: inherit; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 9px; cursor: pointer; }
.ai-msg.bot .ai-table td { white-space: nowrap; }
