/* Playcore v4 "Clean": light by default, dark on demand (html[data-theme=dark]), collapsible sidebar
   (html.side-min). Loaded after admin.css: same class names, so every page (admin, operator portal, agent portal)
   picks it up. Skins (html[data-skin]) only change the accent colours. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #f4f6f9; --bg-2: #eef1f5; --surface: #ffffff; --surface-2: #f7f9fb; --surface-3: #eef2f6;
  --text: #0f1b2d; --muted: #5b6b80; --faint: #8a97a8; --line: #e3e8ef; --line-2: #d3dbe5;
  --head: #0b1626;
  --primary: #0f6e7a; --primary-2: #0b5a64; --primary-ink: #ffffff; --primary-soft: #e3f2f3; --primary-line: #b7dfe2;
  --brand: #f07a12; --brand-2: #e06a05; --brand-ink: #ffffff; --brand-soft: #fff1e4;
  --accent: var(--primary); --accent-soft: var(--primary-soft); --accent-glow: none;
  --data: #0f6e7a; --data-soft: #e3f2f3;
  --ok: #128a5b; --ok-soft: #e4f6ee; --warn: #b8640a; --warn-soft: #fff3e2; --bad: #c8334b; --bad-soft: #fdebee;
  --info: #1f6fb2; --info-soft: #e6f0fa;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 20px -12px rgba(15, 27, 45, .18);
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 264px;
  --side-bg: #ffffff; --side-text: #3a4a5e; --side-ico: #7b899b; --side-hover: #f1f5f8;
  --side-on-bg: var(--primary); --side-on-text: #ffffff; --side-line: var(--line);
}
/* skin B: Playcore orange */
html[data-skin=orange] { --primary: #e8730c; --primary-2: #c95f04; --primary-soft: #fff1e3; --primary-line: #ffd3aa; --data: #e8730c; --data-soft: #fff1e3; }
/* skin C: casino — deep navy sidebar, gold accents */
html[data-skin=casino] {
  --primary: #b8860b; --primary-2: #9a6f06; --primary-ink: #1b1200; --primary-soft: #fbf3dc; --primary-line: #ecd79a; --data: #9a6f06; --data-soft: #fbf3dc;
  --side-bg: #0d1a33; --side-text: #c8d2e3; --side-ico: #7f8fab; --side-hover: rgba(255, 255, 255, .06); --side-on-bg: #d4a017; --side-on-text: #1b1200; --side-line: rgba(255, 255, 255, .08);
}

html[data-theme=dark] {
  color-scheme: dark;
  --bg: #0b1220; --bg-2: #0e1626; --surface: #111a2b; --surface-2: #142035; --surface-3: #1a2740;
  --text: #e6ecf5; --muted: #95a3b8; --faint: #6c7a90; --line: #1f2c43; --line-2: #2a3a55; --head: #f3f6fb;
  --primary: #5fd0dc; --primary-2: #7fdde6; --primary-ink: #04232a; --primary-soft: rgba(95, 208, 220, .12); --primary-line: rgba(95, 208, 220, .35);
  --ok: #3ccf8e; --ok-soft: rgba(60, 207, 142, .12); --warn: #f4a64a; --warn-soft: rgba(244, 166, 74, .12); --bad: #ff7a8c; --bad-soft: rgba(255, 122, 140, .12);
  --info: #6cb4f0; --info-soft: rgba(108, 180, 240, .12); --brand-soft: rgba(240, 122, 18, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 10px 28px -18px rgba(0, 0, 0, .8);
  --side-bg: #0e1626; --side-text: #b4c0d3; --side-ico: #73829a; --side-hover: rgba(255, 255, 255, .04); --side-on-bg: var(--primary); --side-on-text: var(--primary-ink); --side-line: var(--line);
}
html[data-theme=dark][data-skin=orange] { --primary: #ff9a3d; --primary-2: #ffb06a; --primary-ink: #2a1300; --primary-soft: rgba(255, 154, 61, .13); --primary-line: rgba(255, 154, 61, .35); }
html[data-theme=dark][data-skin=casino] { --primary: #e2b23a; --primary-2: #efc565; --primary-ink: #1b1200; --primary-soft: rgba(226, 178, 58, .13); --primary-line: rgba(226, 178, 58, .35); --side-bg: #091226; --side-on-bg: #e2b23a; --side-on-text: #1b1200; }

/* ───────── Base ───────── */
html { background: var(--bg); }
body { font: 15px/1.55 var(--sans); color: var(--text); letter-spacing: -.005em; }
h1, h2, h3 { font-family: var(--display); color: var(--head); text-transform: none; letter-spacing: -.01em; }
h1 { font-weight: 600; } .pagehead h1 { font-size: 2.15rem; }
h2 { font-size: 1.12rem; font-weight: 600; text-transform: none; letter-spacing: -.005em; }
::selection { background: var(--primary-soft); color: var(--head); }
a, .card-head a, .pager a { color: var(--primary); } a:hover { color: var(--primary-2); }
code { background: var(--surface-3); color: var(--head); border-color: var(--line); border-radius: 6px; }
pre { background: #0f1b2d; color: #e6ecf5; border-radius: var(--radius-sm); }
.muted { color: var(--muted); }
* { scrollbar-color: var(--line-2) transparent; }
.bg-mosaic { background: var(--bg); background-image: none; } .bg-mosaic::before, .bg-mosaic::after { display: none; }
.eyebrow { color: var(--primary); text-shadow: none; font: 600 .74rem/1.4 var(--mono); letter-spacing: .12em; }
.eyebrow::before { content: '● '; color: var(--primary); opacity: 1; font-size: .7em; vertical-align: .15em; }
.hl { color: var(--primary); text-shadow: none; }
:focus-visible { outline-color: var(--primary); }

/* ───────── Shell ───────── */
.side { width: var(--side-w); background: var(--side-bg); border-right: 1px solid var(--side-line); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 1.1rem .9rem 1rem; transition: width .2s ease; }
.side-logo img { max-width: 150px; }
html[data-theme=light]:not([data-skin=casino]) .side-logo img, html:not([data-theme]):not([data-skin=casino]) .side-logo img { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.side-tag { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-line); border-radius: 8px; font-weight: 600; }
.side-org { background: var(--surface-2); border: 1px solid var(--side-line); border-left: 1px solid var(--side-line); border-radius: var(--radius-sm); }
html[data-skin=casino] .side-org, html[data-theme=dark] .side-org { background: rgba(255, 255, 255, .04); }
.side-org b { color: var(--head); } html[data-skin=casino] .side-org b { color: #fff; }
.nav { gap: 3px; }
.nav a { color: var(--side-text); border-radius: 11px; padding: .62rem .8rem; font-size: .95rem; font-weight: 500; }
.nav a .ico { color: var(--side-ico); }
.nav a:hover { background: var(--side-hover); color: var(--side-text); }
.nav a:hover .ico { color: var(--primary); }
.nav a.on { background: var(--side-on-bg); color: var(--side-on-text); font-weight: 600; box-shadow: 0 6px 16px -10px var(--side-on-bg); }
.nav a.on .ico { color: var(--side-on-text); }
.nav a.on::before { display: none; }
.nav .grp { color: var(--side-ico); font: 600 .68rem/1.4 var(--mono); letter-spacing: .14em; padding: 1.1rem .8rem .35rem; }
.nav .grp::before { content: ''; }
.usercard { background: var(--surface-2); border-color: var(--side-line); border-radius: var(--radius-sm); }
html[data-skin=casino] .usercard, html[data-theme=dark] .usercard { background: rgba(255, 255, 255, .04); }
.usercard .av { background: var(--primary); color: var(--primary-ink); border-radius: 10px; font-family: var(--display); }
.usercard .who b { color: var(--head); } html[data-skin=casino] .usercard .who b { color: #fff; }
.usercard button { border-radius: 9px; border-color: var(--side-line); }
.content { padding: 2rem 2.4rem 3rem; }
.side-tools { display: flex; gap: .4rem; margin: 0 0 .6rem; }
.side-tools button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 34px; border-radius: 9px; border: 1px solid var(--side-line); background: transparent; color: var(--side-ico); cursor: pointer; font: 500 .74rem var(--mono); }
.side-tools button:hover { color: var(--primary); border-color: var(--primary-line); }
.side-tools .t-dark { display: none; } html[data-theme=dark] .side-tools .t-dark { display: inline; } html[data-theme=dark] .side-tools .t-light { display: none; }

/* collapsed sidebar (desktop only) */
@media (min-width: 901px) {
  html.side-min { --side-w: 78px; }
  html.side-min .side { padding: 1rem .6rem; }
  html.side-min .side-logo img { max-width: 52px; content: url('logo-mark.webp'); margin: 0 auto; }
  html.side-min .side-org, html.side-min .side-tag, html.side-min .side-search, html.side-min .nav .grp, html.side-min .usercard .who, html.side-min .side-foot .prefs, html.side-min .side-tools .lbl { display: none; }
  html.side-min .nav a { font-size: 0; justify-content: center; padding: .7rem 0; }
  html.side-min .nav a .ico { width: 20px; height: 20px; }
  html.side-min .nav a > *:not(.ico) { display: none; }
  html.side-min .usercard { flex-direction: column; padding: .45rem; background: transparent; border: 0; }
  html.side-min .side-tools { flex-direction: column; }
}
@media (max-width: 900px) {
  .topbar { background: var(--surface); border-bottom: 1px solid var(--line); backdrop-filter: none; }
  .topbar .brand { color: var(--head); text-transform: none; letter-spacing: 0; font-family: var(--display); }
  .topbar label { background: var(--surface); color: var(--head); border-color: var(--line-2); border-radius: 10px; }
  .side { box-shadow: 0 0 40px rgba(15, 27, 45, .25); }
  .scrim { background: rgba(15, 27, 45, .35); }
  .content { padding: 1.2rem 1rem 2.5rem; }
  .side-tools .t-min { display: none; }
}
.brand { color: var(--head); text-transform: none; letter-spacing: 0; }

/* ───────── Components ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; }
.card::before, .card::after { display: none; }
.card.glow { background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%); border-color: var(--primary-line); }
.card-head h2 .ico { color: var(--primary); }
.stat .label { color: var(--muted); font: 500 .72rem/1.4 var(--mono); letter-spacing: .12em; }
.stat .value { color: var(--head); font-family: var(--display); font-weight: 600; font-size: 1.75rem; letter-spacing: -.02em; }
.kpi-ico { border-radius: 10px; background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); }
.badge { border-radius: 999px; font: 500 .72rem/1.5 var(--sans); padding: .16rem .6rem; background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.gray { background: var(--surface-3); color: var(--muted); border-color: transparent; }
.badge.ok::before, .badge.warn::before, .badge.bad::before { box-shadow: none; }
.btn { border-radius: 10px; background: var(--surface); color: var(--head); border: 1px solid var(--line-2); font: 600 .88rem var(--sans); text-transform: none; letter-spacing: 0; box-shadow: 0 1px 2px rgba(15, 27, 45, .05); }
.btn:hover { background: var(--surface-2); border-color: var(--primary-line); color: var(--primary); }
.btn.primary, .btn.sm.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); clip-path: none; box-shadow: 0 6px 16px -8px var(--primary); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: var(--primary-ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.sm, .btn.small { border-radius: 8px; font-size: .8rem; }
.btn.lg { border-radius: 12px; }
.alert { border-radius: var(--radius-sm); border-left-width: 1px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.alert a { color: inherit; }
label { color: var(--head); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], input[type=tel], input[type=file], input[type=month], select, textarea {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; }
select option { background: var(--surface); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
th { background: var(--surface-2); color: var(--muted); font: 500 .72rem/1.4 var(--sans); letter-spacing: .06em; border-bottom-color: var(--line); }
th, td { border-bottom-color: var(--line); padding: .8rem .8rem; }
tbody tr:hover { background: var(--surface-2); }
.card > .table-wrap:first-child, .card.table-wrap { padding: 0; } .card.table-wrap > h2, .card.table-wrap > p { padding: 1.2rem 1.3rem 0; }
@media (max-width: 700px) { table.cards tr { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); } }
.tabs a { font: 600 .9rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); }
.tabs a:hover { color: var(--head); } .tabs a.on { color: var(--primary); border-bottom-color: var(--primary); box-shadow: none; }
.bars .bar i { background: linear-gradient(180deg, var(--primary), var(--primary-soft)); box-shadow: none; border-radius: 4px 4px 0 0; }
.bars .bar .tip { background: var(--head); border-color: var(--head); color: #fff; border-radius: 8px; }
.legend span::before { background: var(--primary); border-radius: 3px; }
.meter { background: var(--surface-3); border-radius: 99px; } .meter i { background: var(--primary); box-shadow: none; border-radius: 99px; }
.meter.bad i { background: var(--bad); box-shadow: none; } .meter.warn i { background: var(--warn); box-shadow: none; }
.rank { border-radius: 8px; } .rank.top { background: var(--primary); color: var(--primary-ink); }
.thumb { border-radius: 8px; }
tfoot tr.total td { border-top-color: var(--primary-line); background: var(--primary-soft); }
table.matrix th:first-child, table.matrix td:first-child { background: var(--surface); }
.odo-up { text-shadow: none; } .odo-down { text-shadow: none; }

/* login / public */
.auth-art { background: linear-gradient(160deg, #0d1a33, #13284d); border-right: 0; }
.auth-art::after { display: none; }
.auth-art .pitch h2, .auth-art .pitch .eyebrow { color: #fff; } .auth-art .pitch .muted, .auth-art li { color: #c3cee0 !important; }
.auth-form { background: var(--surface); }
@media (max-width: 900px) { .auth-form { background: var(--surface); } }
.auth-form .mlogo { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

/* ───────── Motion: cards rise in, lift on hover; menu and buttons ease (off for reduced motion) ───────── */
@keyframes hs-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hs-pulse { 0%, 100% { box-shadow: 0 0 0 0 currentColor; } 50% { box-shadow: 0 0 0 4px transparent; } }
/* 'backwards': only the start state is forced, so hidden or positioned children (toasts, modals) keep their own styles */
.content > *:not([id$=toast]):not(.modal-overlay):not([hidden]) { animation: hs-rise .45s cubic-bezier(.2, .7, .2, 1) backwards; }
.content > *:nth-child(2) { animation-delay: .04s; } .content > *:nth-child(3) { animation-delay: .08s; } .content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(5) { animation-delay: .16s; } .content > *:nth-child(n+6) { animation-delay: .2s; }
.grid > .card { animation: hs-rise .45s cubic-bezier(.2, .7, .2, 1) backwards; }
.grid > .card:nth-child(2) { animation-delay: .05s; } .grid > .card:nth-child(3) { animation-delay: .1s; } .grid > .card:nth-child(4) { animation-delay: .15s; }
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.grid > .card:hover, .kpis > .card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(15, 27, 45, .35); border-color: var(--primary-line); }
.nav a { transition: background .18s, color .18s, transform .18s; } .nav a:hover { transform: translateX(2px); }
html.side-min .nav a:hover { transform: none; }
.btn { transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; } .btn:hover { transform: translateY(-1px); } .btn:active { transform: translateY(0) scale(.98); }
.badge.ok::before { animation: hs-pulse 2.4s ease-in-out infinite; }
tbody tr { transition: background .15s; }
.kpi-ico { width: 38px; height: 38px; transition: transform .25s; } .card:hover .kpi-ico { transform: rotate(-6deg) scale(1.06); }
.alert { animation: hs-fade .35s ease backwards; }
@media (prefers-reduced-motion: reduce) { .content > *, .grid > .card, .alert { animation: none !important; } .card, .btn, .nav a { transition: none !important; } }

/* ───────── Page-level styles written for the old dark look (higher specificity than their inline <style>) ───────── */
html .credit-banner.low { color: var(--warn); border-color: transparent; }
html .credit-banner.out { color: var(--bad); border-color: transparent; }
html .credit-banner { border-radius: var(--radius-sm); }
html .credit-banner .cb-text > b, html .realbox .rb-side b, html .fee-row b, html .modal-title { color: var(--head); }
html .realbox { border-radius: var(--radius); }
html .realbox .rb-label { color: var(--muted); }
html .mc-pill, html .pl-pill { border-radius: 999px; font-family: var(--sans); font-weight: 600; }
html .mc-pill.ok, html .pl-pill.ms { background: var(--ok-soft); color: var(--ok); }
html .mc-pill.warn, html .pl-pill.warn { background: var(--warn-soft); color: var(--warn); }
html .mc-pill.bad, html .pl-pill.bad { background: var(--bad-soft); color: var(--bad); }
html .pl-pill.nv { background: var(--info-soft); color: var(--info); }
html .pl-up { color: var(--bad); } html .pl-down { color: var(--ok); }
html .mc-bar { background: var(--surface-3); border-radius: 99px; } html .mc-bar i { background: var(--ok); border-radius: 99px; }
html .pl-formula span { border-color: var(--line-2); border-radius: 10px; background: var(--surface-2); } html .pl-formula b { color: var(--primary); }
html .auth-art li { color: #c3cee0; }
html .kpi-ico.ok, html .kpi-ico.info { border-color: transparent; } html .kpi-ico { border-color: transparent; }
html .stepper .st.now span { color: var(--head); }
@media (max-width: 900px) {
  html .bottomnav { background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(15, 27, 45, .3); }
  html .bottomnav a.on { color: var(--primary); background: var(--primary-soft); border-radius: 12px; }
  html .bottomnav a, html .bottomnav label { color: var(--muted); }
}

/* Tables that fit the screen on desktop: no sliding left/right (the "fit" wrappers, e.g. Daily deductions) */
.fit { container-type: inline-size; }
@media (min-width: 701px) {
  .fit > table { width: 100%; }
  .fit th { white-space: normal; line-height: 1.3; vertical-align: bottom; font-size: .6rem; letter-spacing: .04em; padding: .6rem .3rem; }
  .fit td { padding: .55rem .3rem; font-size: .77rem; vertical-align: top; }
  .fit th:first-child, .fit td:first-child { padding-left: .7rem; }
  .fit td.num, .fit th.num { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
  .fit td.num { white-space: nowrap; }
  .fit td.num .small { font-size: .66rem; line-height: 1.35; }
  .fit td.num div[title] { white-space: normal; }
  .fit td:first-child { white-space: nowrap; }
  .fit td:first-child .small, .fit td:first-child .badge { display: block; width: fit-content; margin-top: .1rem; }
  .fit .matrix .oc { gap: .3rem; }
  .fit .matrix .oc-tag { font-size: .55rem; padding: .05rem .3rem; }
}
/* too narrow for every column (tablet, small laptop): the big table becomes cards, like on a phone */
@container (max-width: 899px) {
  .fit table.cards thead { display: none; }
  .fit table.cards, .fit table.cards tbody, .fit table.cards tfoot, .fit table.cards tr, .fit table.cards td { display: block; width: 100%; }
  .fit table.cards tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .65rem; }
  .fit table.cards tr { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: .4rem .6rem; }
  .fit table.cards tfoot tr { margin-top: .65rem; }
  .fit table.cards td { border: 0; display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .2rem; text-align: right !important; min-width: 0; }
  .fit table.cards td::before { content: attr(data-label); color: var(--muted); font: 500 .62rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .08em; text-align: left; flex-shrink: 0; max-width: 50%; white-space: normal; }
  .fit table.cards td[data-label=""]::before { display: none; }
  .fit table.cards td:first-child .small, .fit table.cards td:first-child .badge { display: inline-block; margin: 0 0 0 .3rem; }
  .fit table.cards td > div { text-align: right; }
}
@container (max-width: 899px) {
  .fit .matrix .oc { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; }
  .fit .matrix th, .fit .matrix td { white-space: normal; }
  .fit .matrix td:first-child { white-space: nowrap; }
}
html table.matrix tr.sum td:first-child { background: var(--surface); }
/* Daily deductions: Metasoft's tag next to Nuvik's in the per-operator cells */
.oc-tag.oc-ms { color: #8b5cf6; border-color: rgba(139, 92, 246, .45); background: rgba(139, 92, 246, .12); }

/* ═════════ v5 "Elegant": simple, clean, quiet (Dec 2026). Same class names; everything above still applies. ═════════ */
:root { --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Inter', system-ui, sans-serif;
  --radius: 12px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(15, 27, 45, .04); --side-w: 248px; }
html[data-theme=dark] { --shadow: none; --bg: #0a111e; --surface: #0f1828; --surface-2: #121d30; --line: #1c2a40; }
body { font-size: 14.5px; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }

/* headings and page head: smaller, calmer */
.pagehead { margin-bottom: 1.4rem; gap: 1rem; align-items: flex-end; }
.pagehead h1 { font-size: 1.65rem; font-weight: 650; letter-spacing: -.02em; margin: .1rem 0 .25rem; }
h2 { font-size: 1rem; font-weight: 600; }
.eyebrow { font: 600 .66rem/1.4 var(--mono); letter-spacing: .14em; color: var(--muted); }
.eyebrow::before { content: ''; }
.pagehead .muted.small, .pagehead .muted { font-size: .84rem; max-width: 70ch; }
.clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .1rem !important; }
.more-toggle { display: block; font: 600 .76rem var(--sans); background: none; border: 0; padding: 0; margin: 0 0 .7rem; color: var(--primary); cursor: pointer; }
.pagehead .more-toggle { margin: .1rem 0 0; }

/* sidebar: smaller logo, quieter items, a thin gold mark on the open page */
.side { padding: 1rem .75rem .9rem; }
.side-logo img { max-width: 116px; }
.side-tag { font-size: .62rem; padding: .18rem .5rem; }
.side-search input { font-size: .82rem; }
.nav { gap: 1px; }
.nav a { font-size: .88rem; padding: .5rem .7rem; border-radius: 8px; font-weight: 500; }
.nav a .ico { width: 17px; height: 17px; }
.nav a:hover { transform: none; }
.nav a.on { background: var(--side-hover); color: #fff; box-shadow: inset 3px 0 0 var(--side-on-bg); font-weight: 600; }
html:not([data-skin=casino]):not([data-theme=dark]) .nav a.on { color: var(--head); }
.nav a.on .ico { color: var(--side-on-bg); }
.nav .grp { font-size: .6rem; padding: .95rem .7rem .3rem; opacity: .8; }

/* cards: flat, thin line, no lift */
.card { padding: 1.1rem 1.2rem; }
.card.glow { background: var(--surface); border-color: var(--line); }
.grid > .card:hover, .kpis > .card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line-2); }
.card:hover .kpi-ico { transform: none; }
.card-head { margin-bottom: .8rem; }
.card-head h2 { display: flex; align-items: center; gap: .45rem; }
.card-head h2 .ico { width: 16px; height: 16px; }
.kpi-ico { width: 32px; height: 32px; border-radius: 8px; }
.stat .label { font-size: .64rem; letter-spacing: .12em; color: var(--muted); }
.stat .value { font-size: 1.55rem; font-weight: 650; margin: .3rem 0 .15rem; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.grid { gap: .9rem; }

/* tables */
th { font: 600 .66rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: transparent; color: var(--faint); }
th, td { padding: .7rem .75rem; }
td.num, th.num { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--surface-2); }

/* buttons, badges, inputs: lighter */
.btn { font-weight: 600; font-size: .84rem; box-shadow: none; }
.btn:hover { transform: none; }
.btn.primary, .btn.sm.primary { box-shadow: none; }
.badge { font-size: .7rem; font-weight: 600; }
.alert { font-size: .88rem; }

/* motion: a short fade only */
.content > *:not([id$=toast]):not(.modal-overlay):not([hidden]) { animation: hs-fade .25s ease backwards; }
.grid > .card { animation: none; }

/* section tabs (pages that share one menu item: Billing, Agents, Logs) */
.section-tabs { display: flex; gap: .25rem; margin: -.4rem 0 1.2rem; padding: .25rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; width: fit-content; max-width: 100%; overflow-x: auto; }
.section-tabs a { padding: .42rem .85rem; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: .84rem; white-space: nowrap; text-decoration: none; }
.section-tabs a:hover { color: var(--head); }
.section-tabs a.on { background: var(--surface); color: var(--head); box-shadow: 0 1px 2px rgba(15, 27, 45, .08); }
html[data-theme=dark] .section-tabs a.on { background: var(--surface-3); }

/* ⓘ help: the long explanations, shown when asked */
details.help { display: inline-block; position: relative; vertical-align: middle; }
details.help > summary { list-style: none; cursor: pointer; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--faint); font: italic 700 .7rem/15px Georgia, 'Times New Roman', serif; text-align: center; user-select: none; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary:hover, details.help[open] > summary { color: var(--primary); border-color: var(--primary-line); }
details.help > div { position: absolute; z-index: 30; top: 24px; left: 0; width: min(380px, 80vw); padding: .75rem .85rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(15, 27, 45, .35); font-size: .8rem; line-height: 1.5; color: var(--text); font-weight: 400; text-transform: none; letter-spacing: 0; white-space: normal; }
details.help.right > div { left: auto; right: 0; }
@media (max-width: 700px) { details.help > div { position: fixed; left: 1rem !important; right: 1rem; top: auto; bottom: 5.5rem; width: auto; } }

@media (max-width: 900px) { .pagehead h1 { font-size: 1.4rem; } .stat .value { font-size: 1.35rem; } }

/* mobile top bar: the search button showed empty */
.topbar-btn { color: var(--head); display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.topbar-btn .ico { color: var(--head); }
