/* ==========================================================================
   Hudio panel — design system "Royal Navy & Gold"
   Palette sampled from the reference screen recording:
   navy #521e22 · gold #a08438 · cream card #f8f4ec · page #d2d0c9.
   Mobile first. Every control is ≥ 44 px tall; text inputs are 16 px so
   iOS does not zoom. No external JS, no CDN CSS (fonts are the only request).
   ========================================================================== */

:root {
  --navy-900: #2b0f12;
  --navy-800: #521e22;
  --navy-700: #5d2227;
  --navy-600: #6b2229;
  --navy-500: #7a2d34;
  --navy-400: #6b2229;
  --gold-700: #3f1317;
  --gold-600: #5a1d23;
  --gold-500: #6b2229;
  --gold-400: #d9a9ae;
  --gold-300: #e6c3c6;
  --gold-200: #f1dcde;
  --cream: #f2efe6;
  --cream-2: #f7f4ec;
  --cream-3: #ebe6d9;
  --page: #efeadf;
  --line: #ddd6c8;
  --line-2: #d3cbb9;
  --ink: #3a2b2d;
  --ink-2: #4a3a3c;
  --muted: #6f6466;
  --muted-2: #9a8f91;
  --ctl: #808080;
  --ok: #0b6b4f;
  --ok-bg: #e1f1ea;
  --warn: #7d5205;
  --warn-bg: #fbefd2;
  --err: #a3231f;
  --err-bg: #f9e0de;
  --info: #1d4f91;
  --info-bg: #dfeaf8;
  --violet: #5b3a99;
  --violet-bg: #ece5f8;
  --font-serif: 'Gelasio', Georgia, 'Times New Roman', serif;
  --font-display: 'Playfair Display', 'Gelasio', Georgia, serif;
  --font-sans: 'Poppins', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --r: 2px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 26px -14px rgba(82, 30, 34, .45);
  --head-h: 58px;
  --tabs-h: 46px;
  --drawer-w: 292px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--navy-600); text-underline-offset: 3px; }
a:hover { color: var(--gold-700); }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 12px; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid rgba(107, 34, 41, .7); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ic { flex: none; vertical-align: -0.18em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1239px) { .hide-md { display: none; } }
.mt0 { margin-top: 0 !important; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0 !important; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.nowrapx { flex-wrap: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.spread { justify-content: space-between; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------------------------ wordmark */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.2px;
  text-decoration: none;
  filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, .55));
}
.wordmark .wm-a, .wordmark .wm-b {
  background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 38%, #bdbdbd 72%, #9a9a9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.wordmark .wm-b { background-image: linear-gradient(180deg, #ffffff 0%, #e6e6e6 40%, #cfa13a 100%); }

/* ------------------------------------------------------------------ app shell (panel + admin) */
.app-h {
  position: sticky; top: 0; z-index: 60;
  height: var(--head-h);
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, #5d2227 0%, #521e22 100%);
  border-bottom: 3px solid var(--gold-500);
  color: #fff;
}
.h-menu {
  flex: none; width: 56px; display: grid; place-items: center;
  background: none; border: 0; color: #fff; cursor: pointer;
}
.h-menu .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.h-menu:hover { background: rgba(255, 255, 255, .06); }
.h-brand { display: flex; align-items: center; padding-right: 14px; text-decoration: none; min-width: 0; }
.h-brand .wordmark { font-size: 27px; }
.h-badge {
  align-self: center; margin-left: -6px; margin-right: 8px; padding: 2px 8px;
  font: 700 11px/1.5 var(--font-sans); letter-spacing: 1.4px; text-transform: uppercase;
  color: #e6e6e6; border: 1px solid rgba(240, 208, 112, .55); border-radius: 3px;
}
.h-acct {
  margin-left: auto; padding: 0 12px; min-width: 0; max-width: 46%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
  border-left: 1px solid rgba(255, 255, 255, .14);
  line-height: 1.2;
}
.h-acct b { font: 400 20px/1.15 var(--font-serif); letter-spacing: .3px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .h-badge { display: none; }                       /* the account block already says “Administrator” */
  .h-brand { padding-right: 8px; }
  .h-brand .wordmark { font-size: 25px; }
  .h-acct { padding: 0 10px; max-width: 50%; }
  .h-acct b { font-size: 18px; }
}
.h-acct span { font-size: 14px; color: #d6cfd0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-out { margin: 0; display: flex; }
.h-out button {
  width: 52px; display: grid; place-items: center; background: none; border: 0; color: #fff; cursor: pointer;
}
.h-out button:hover { background: rgba(255, 255, 255, .08); }
.h-out .ic { width: 24px; height: 24px; }

.tabs {
  position: sticky; top: var(--head-h); z-index: 55;
  height: var(--tabs-h);
  display: flex; align-items: stretch;
  background: var(--navy-700);
  border-bottom: 2px solid var(--gold-500);
}
.tabs-btn { flex: none; width: 34px; background: none; border: 0; color: #d6cfd0; cursor: pointer; display: grid; place-items: center; }
.tabs-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.tabs-scroll { flex: 1 1 auto; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: flex; align-items: stretch; position: relative;
  color: #3a2b2d; font-size: 19px; white-space: nowrap;
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; pointer-events: none; }
.tab a { display: flex; align-items: center; gap: 9px; padding: 0 8px 0 14px; color: inherit; text-decoration: none; }
.tab:not(:has(.tab-x)) a { padding-right: 16px; }
.tab .dot { width: 11px; height: 11px; border-radius: 50%; background: #b7a9ab; }
.tab:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.tab.active { background: var(--navy-400); color: #fff; }
.tab.active::after { background: var(--gold-500); }
.tab.active .dot { background: var(--gold-400); }
.tab .tab-x {
  align-self: center; width: 28px; height: 28px; margin-right: 8px; display: grid; place-items: center; background: none; border: 0;
  color: #8a7f80; cursor: pointer; font-size: 19px; line-height: 1; border-radius: 50%;
}
.tab .tab-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.drawer-bg { position: fixed; top: var(--head-h); right: 0; bottom: 0; left: 0; z-index: 57; background: rgba(20, 8, 10, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; z-index: 58; top: var(--head-h); bottom: 0; left: 0; width: min(78vw, var(--drawer-w));
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1c1c1c 0%, #161616 100%);
  border-right: 2px solid var(--gold-500);
  transform: translateX(-102%); transition: transform .22s ease;
  color: #fff; overflow-y: auto;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-bg { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-lbl { flex: none; padding: 16px 18px 8px; font: 700 14px/1 var(--font-serif); letter-spacing: 3px; color: var(--gold-400); text-transform: uppercase; }
.nav { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; }
.nav a {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .09); position: relative;
}
.nav a .ic { width: 24px; height: 24px; color: #d6cfd0; }
.nav a .t { display: flex; flex-direction: column; line-height: 1.2; }
.nav a .t b { font: 400 21px/1.15 var(--font-serif); letter-spacing: .2px; }
.nav a .t i { font-style: normal; font-size: 14px; color: #a9a2a3; margin-top: 3px; }
.nav a:hover { background: rgba(255, 255, 255, .05); }
.nav a.active { background: var(--navy-400); box-shadow: inset 4px 0 0 var(--gold-500); }
.nav a .n { margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--gold-500); color: #1b1404; font: 700 12px/1.7 var(--font-sans); text-align: center; }
.nav .sep { padding: 14px 18px 6px; font: 700 12px/1 var(--font-sans); letter-spacing: 1.6px; color: #8d8586; text-transform: uppercase; }
.drawer-foot { flex: none; padding: 16px 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 15px; letter-spacing: 1px; color: #b5adae; text-transform: uppercase; }

.app-main { padding: 14px 14px 56px; max-width: 1060px; margin: 0 auto; }
@media (min-width: 1100px) {
  .h-menu { display: none; }
  .drawer { width: var(--drawer-w); transform: none; z-index: 50; }
  .drawer-bg { display: none; }
  body.drawer-open { overflow: auto; }
  .tabs, .app-main { margin-left: var(--drawer-w); }
  .app-main { max-width: none; padding: 20px 28px 64px; }
  .app-main > * { max-width: 920px; margin-left: auto; margin-right: auto; }
  .app-h .h-brand { padding-left: 18px; }
}

a.skip { position: absolute; left: 8px; top: -60px; z-index: 200; padding: 10px 14px; background: #fff; color: #000; border: 2px solid var(--gold-500); }
a.skip:focus { top: 8px; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--cream); border: 1px solid var(--line-2); box-shadow: var(--shadow); margin: 0 0 16px; }
.card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px; color: #fff;
  background: linear-gradient(180deg, #5d2227 0%, #521e22 100%);
  border-bottom: 3px solid var(--gold-500);
}
.card-h h1, .card-h h2, .card-h h3 { margin: 0; font: 400 19px/1.25 var(--font-serif); letter-spacing: .2px; color: #fff; }
.card-h .sub { font-size: 14px; color: #e6d3d5; }
.card-b { padding: 16px; }
.card-b > :last-child { margin-bottom: 0; }
.card-f { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--cream-3); }
.card.flat { box-shadow: none; }
.card.inner { background: var(--cream-2); border: 1px solid #d9c98f; box-shadow: 0 8px 20px -14px rgba(82, 30, 34, .5); position: relative; }
.card.inner.reco { border: 2px solid var(--gold-500); }
.page-title { margin: 4px 0 14px; font: 700 24px/1.2 var(--font-serif); color: var(--navy-800); }
.page-sub { margin: -8px 0 14px; color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* key / value rows (Credentials) */
.kv { padding: 14px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; padding-top: 0; }
.kv-l { font-weight: 700; font-size: 17px; margin-bottom: 4px; color: var(--navy-800); }
.kv-v { font-size: 16px; word-break: break-all; }
.kv-v.mono { font-size: 15px; }
.kv-a { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.kv-a > .btn, .kv-a > form { flex: 1 1 120px; }
.kv-a > form .btn { width: 100%; }
.kv-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  background: #fcfcfc; color: var(--ink);
  border: 2px solid var(--ctl); border-radius: var(--r);
  font: 700 17px/1.1 var(--font-serif);
  cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--navy-700); background: #fff; color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 12px -8px rgba(82, 30, 34, .55); }
.btn:active { transform: none; box-shadow: none; }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-off { color: #5b6676; background: #f1efe9; border-color: #d7d3c8; box-shadow: none; pointer-events: none; cursor: default; }
.btn-primary { background: linear-gradient(180deg, #6b2229 0%, #521a20 100%); color: #fff; border-color: #3a1013; box-shadow: 0 8px 16px -10px rgba(82, 26, 32, .9); }
.btn-primary:hover { background: linear-gradient(180deg, #7a2a31 0%, #5a1d23 100%); color: #fff; border-color: var(--gold-600); }
.btn-gold { background: linear-gradient(180deg, #7a2a31 0%, #5a1d23 100%); color: #ffffff; border-color: #3a1013; }
.btn-gold:hover { background: linear-gradient(180deg, #8a3139 0%, #651f26 100%); color: #ffffff; border-color: #2b0b0e; }
.btn-danger { color: #fff; background: linear-gradient(180deg, #b3302b 0%, #8f201c 100%); border-color: #6c1512; }
.btn-danger:hover { color: #fff; border-color: #3d0b09; background: linear-gradient(180deg, #c03a35 0%, #99231f 100%); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 15px; border-width: 1.5px; }
@media (max-width: 767px) {
  .btn-sm { min-height: 44px; }
  .tabs-btn { width: 44px; }
  .tab .tab-x { width: 40px; height: 40px; margin-right: 2px; }
}
.btn-block { display: flex; width: 100%; }
.btn .ic { width: 18px; height: 18px; }

label.lbl, .lbl { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 16px; color: var(--navy-800); }
.lbl:first-child { margin-top: 0; }
.lbl small { font-weight: 400; color: var(--muted); }
.in, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=tel], input[type=date], input[type=datetime-local], select, textarea {
  display: block; width: 100%; min-height: 46px; padding: 10px 12px;
  background: #fff; color: var(--ink);
  border: 2px solid var(--ctl); border-radius: var(--r);
  font: 400 16px/1.3 var(--font-serif);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23102844' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.in:focus, input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(107, 34, 41, .3); }
input::placeholder, textarea::placeholder { color: #8a8f98; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--navy-700); margin: 0; flex: none; }
input[type=file] { font-size: 15px; padding: 8px; min-height: 46px; background: #fff; border: 2px dashed var(--ctl); width: 100%; }
.field { margin: 0 0 14px; }
.field:last-child { margin-bottom: 0; }
.field.has-err .in, .field.has-err input, .field.has-err select { border-color: var(--err); }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.ferr { font-size: 14px; color: var(--err); margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
.check span { font-size: 16px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.inline-form .in, .inline-form input, .inline-form select { flex: 1 1 160px; width: auto; }
.inline-form .btn { flex: 0 0 auto; }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.qa .btn { min-height: 50px; font-size: 18px; }
.qa .btn.on { border-color: var(--gold-600); background: #fff8e3; box-shadow: 0 0 0 3px rgba(107, 34, 41, .28); }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.search .in { padding-left: 40px; }
.box { background: #fff; border: 2px solid var(--line-2); padding: 12px 14px; border-radius: var(--r); }
.box.paybox { background: var(--cream-2); border: 1px dashed var(--gold-600); }
.paybox pre { margin: 0; white-space: pre-wrap; font: 400 15px/1.5 var(--font-mono); }
.qr { display: block; max-width: 220px; width: 100%; margin: 10px auto 0; background: #fff; padding: 8px; border: 1px solid var(--line-2); }

/* ------------------------------------------------------------------ flash + notices */
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line-2); border-left: 5px solid var(--info); box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .5); }
.flash .ic { margin-top: 2px; }
.flash.ok { border-left-color: var(--ok); } .flash.ok .ic { color: var(--ok); }
.flash.err { border-left-color: var(--err); } .flash.err .ic { color: var(--err); }
.flash.warn { border-left-color: #b9801a; } .flash.warn .ic { color: #b9801a; }
.flash.info .ic { color: var(--info); }
.note { padding: 10px 12px; background: var(--warn-bg); border-left: 4px solid #b9801a; color: #4d3203; font-size: 15px; margin: 0 0 14px; }
.note.info { background: var(--info-bg); border-left-color: var(--info); color: #11335f; }
.note.ok { background: var(--ok-bg); border-left-color: var(--ok); color: #0a4a37; }
.note.err { background: var(--err-bg); border-left-color: var(--err); color: #6f1612; }

/* ------------------------------------------------------------------ chips / badges */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 700 12px/1.7 var(--font-sans); letter-spacing: .5px; text-transform: uppercase; background: #e7e9ee; color: #3a4558; white-space: nowrap; }
.chip.login, .chip.info { background: var(--info-bg); color: var(--info); }
.chip.launch, .chip.violet { background: var(--violet-bg); color: var(--violet); }
.chip.wallet, .chip.ok, .chip.approved, .chip.active, .chip.sent { background: var(--ok-bg); color: var(--ok); }
.chip.provider { background: #dcf0f1; color: #0b5a63; }
.chip.account { background: #e7e9ee; color: #3a4558; }
.chip.security, .chip.err, .chip.rejected, .chip.suspended, .chip.failed { background: var(--err-bg); color: var(--err); }
.chip.payment, .chip.pending, .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.callback { background: #e1e3f8; color: #3340a3; }
.chip.system { background: #ececec; color: #555; }
.chip.gold { background: #f5e6b3; color: #5b4306; }
.pos { color: var(--ok); } .neg { color: var(--err); }

/* ------------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 10px 12px; font: 700 12px/1.2 var(--font-sans); letter-spacing: .8px; text-transform: uppercase; color: var(--navy-700); background: var(--cream-3); border-bottom: 2px solid var(--gold-500); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: rgba(255, 255, 255, .6); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: var(--cream-3); border-top: 2px solid var(--line-2); }
@media (max-width: 719px) {
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack thead, .tbl.stack tfoot { display: none; }
  .tbl.stack tr { padding: 10px 0; border-bottom: 2px solid var(--line-2); }
  .tbl.stack td { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; padding: 4px 0; border: 0; text-align: right; background: none !important; }
  .tbl.stack td::before { content: attr(data-label); flex: none; font-weight: 700; color: var(--navy-700); text-align: left; }
  .tbl.stack td.num { text-align: right; }
  .tbl.stack td[data-label=""]::before { display: none; }
  .tbl.stack td.wrap-v { text-align: right; word-break: break-word; }
}
/* bets list: a real table on wide screens, one compact card per bet on phones */
.tbl.bets td.b-time { white-space: nowrap; }
.tbl.bets td.b-game { overflow-wrap: anywhere; word-break: break-word; min-width: 140px; }
.tbl.bets td.b-res { white-space: nowrap; }
.tbl.bets .b-why { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--err); }
@media (min-width: 720px) { .tbl.bets td.b-game { width: 36%; } }
@media (max-width: 719px) {
  .tbl.bets, .tbl.bets tbody, .tbl.bets tr, .tbl.bets td { display: block; width: 100%; }
  .tbl.bets thead { display: none; }
  .tbl.bets tr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: start; padding: 12px 0; border-bottom: 2px solid var(--line-2); }
  .tbl.bets td { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; background: none !important; overflow-wrap: anywhere; }
  .tbl.bets td::before { content: attr(data-label); display: block; margin-bottom: 1px; font: 700 11px/1.3 var(--font-sans); letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
  .tbl.bets td.b-game::before, .tbl.bets td.b-res::before, .tbl.bets td.b-time::before { display: none; }
  .tbl.bets td.b-game { grid-column: span 8; order: 1; font-size: 16px; }
  .tbl.bets td.b-res { grid-column: span 4; order: 2; text-align: right; }
  .tbl.bets td.b-time { grid-column: span 6; order: 3; font-size: 13px; color: var(--muted); }
  .tbl.bets td.b-player { grid-column: span 6; order: 4; text-align: right; font-size: 13px; color: var(--muted); }
  .tbl.bets td.b-player::before { display: inline; margin: 0 4px 0 0; font: 400 13px/1.3 var(--font-sans); letter-spacing: 0; text-transform: none; }
  .tbl.bets td.b-bet, .tbl.bets td.b-win, .tbl.bets td.b-ggr, .tbl.bets td.b-wal { grid-column: span 3; }
  .tbl.bets td.b-bet { order: 5; } .tbl.bets td.b-win { order: 6; } .tbl.bets td.b-ggr { order: 7; } .tbl.bets td.b-wal { order: 8; }
  .tbl.bets td.num { text-align: left; white-space: normal; font-size: 14px; }
}
@media (max-width: 359px) {
  .tbl.bets td.b-game, .tbl.bets td.b-res { grid-column: span 12; text-align: left; }
  .tbl.bets td.b-bet, .tbl.bets td.b-win, .tbl.bets td.b-ggr, .tbl.bets td.b-wal { grid-column: span 6; }
}
.empty { padding: 26px 12px; text-align: center; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--gold-600); margin-bottom: 6px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pager .info { font-size: 15px; color: var(--muted); }

/* ------------------------------------------------------------------ stats / money */
.bal { font: 700 34px/1.1 var(--font-serif); color: var(--navy-800); letter-spacing: .3px; }
.bal small { font-size: 18px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line-2); padding: 12px 14px; border-top: 3px solid var(--gold-500); }
.stat .k { font: 700 11px/1.2 var(--font-sans); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.stat .v { margin-top: 6px; font: 700 24px/1.15 var(--font-serif); color: var(--navy-800); font-variant-numeric: tabular-nums; word-break: break-word; }
.stat .v small { font-size: 14px; font-weight: 400; color: var(--muted); }
.stat.pos .v { color: var(--ok); } .stat.neg .v { color: var(--err); }
.month { margin-bottom: 14px; }
.month-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.month-h h3 { font: 700 20px/1.2 var(--font-serif); letter-spacing: 1px; text-transform: uppercase; color: var(--navy-800); }

/* ------------------------------------------------------------------ providers */
.plist { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .plist { grid-template-columns: 1fr 1fr; } }
.ptile {
  position: relative; display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 14px 16px; min-height: 104px; text-align: left; color: #fff;
  background: linear-gradient(135deg, #2b2119 0%, #36291f 55%, #241b14 100%);
  border: 1px solid #17100a; box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .8);
  overflow: hidden; cursor: pointer; font-family: inherit;
}
.ptile::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 18px); }
.ptile::after { content: ""; position: absolute; right: -25%; top: -70%; width: 70%; height: 240%; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); transform: rotate(6deg); }
.ptile > * { position: relative; z-index: 1; }
.ptile:hover { border-color: var(--gold-600); }
.plogo { flex: none; width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--gold-400); background: #0e0e10; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.plogo img { width: 100%; height: 100%; object-fit: contain; }
.plogo b { font: 700 20px/1 var(--font-sans); color: var(--gold-300); letter-spacing: .5px; }
.pinfo { min-width: 0; flex: 1 1 auto; display: block; }
.pname { display: block; font: 700 19px/1.2 var(--font-sans); text-transform: uppercase; letter-spacing: .2px; overflow-wrap: anywhere; }
.pmeta { display: block; margin-top: 4px; font: 400 15px/1.3 var(--font-mono); color: #bdb4a6; }
.pill { flex: none; display: inline-block; white-space: nowrap; padding: 9px 16px; border-radius: 999px; font: 800 12.5px/1 var(--font-sans); letter-spacing: 1px; text-transform: uppercase; border: 2px solid #b9983c; color: #dcefc2; background: #044034; }
.pill.more { background: rgba(0, 0, 0, .25); color: var(--gold-300); }
.ptile .pick { position: absolute; top: 12px; right: 12px; z-index: 2; }
.ptile .pick input { width: 28px; height: 28px; accent-color: #c8a040; border-radius: 6px; }
.ptile.sel { border-color: var(--gold-400); box-shadow: 0 0 0 2px var(--gold-500), 0 10px 22px -14px rgba(0, 0, 0, .8); }
.ptile .pcol { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; }
.pmeta .pm-sep { opacity: .7; }
@media (max-width: 520px) {
  .ptile { gap: 12px; padding: 12px; min-height: 92px; }
  .plogo { width: 56px; height: 56px; border-width: 3px; }
  .plogo b { font-size: 17px; }
  .pname { font-size: 16px; letter-spacing: 0; }
  .pmeta { font-size: 13px; }
  .pmeta .pm-sep { display: none; }
  .pmeta .pm-g, .pmeta .pm-p { display: block; }
  .pill { padding: 10px 12px; font-size: 12px; letter-spacing: .8px; }
  .plab { padding-right: 0; }
}
.pbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.pbar .tot { font: 700 18px/1.2 var(--font-serif); }

.plab { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; cursor: pointer; padding-right: 8px; }
@media (max-width: 520px) { .plab { gap: 12px; } }
.ptile:has(.pick) .pcol { margin-top: 28px; }
button.ptile { -webkit-appearance: none; appearance: none; }
button.pill { font-family: var(--font-sans); cursor: pointer; }
.ptile .pcol .pill { cursor: pointer; }
.stackbtns { display: grid; gap: 10px; margin: 12px 0 4px; }
@media (min-width: 720px) { .stackbtns { grid-template-columns: repeat(2, 1fr); } }
.rec { background: #fff; border: 1px solid var(--line-2); padding: 8px 12px; margin: 0 0 12px; }
.rec .lr { padding: 4px 0; align-items: baseline; }
.rec .lr b { font-size: 14px; }
.rec .lr span { word-break: break-word; }
.rec .mono { font-family: var(--font-mono); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.print-only { display: none; }
@media print { .print-only { display: block; } }
.btn-red { background: #fff; border-color: #c0392b; color: #c0392b; }
.pdf-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 4px; background: #fff; border: 0; display: grid; place-items: center; color: #c0392b; cursor: pointer; }
.pdf-btn .ic { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ plans */
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { padding: 18px 16px 16px; }
.plan h3 { font: 700 22px/1.2 var(--font-serif); color: var(--navy-800); }
.plan h3 + .price { margin-top: 12px; }
.plan .price { font: 700 40px/1.1 var(--font-serif); color: var(--navy-800); letter-spacing: .3px; }
.plan .price s.was { font-size: 19px; font-weight: 400; color: var(--muted); margin-right: 6px; letter-spacing: 0; text-decoration-thickness: 1.5px; }
.plan .price small { font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan .tag { color: var(--muted); margin: 6px 0 12px; font-size: 16px; }
.plan ul { list-style: none; margin: 0 0 16px; padding: 0; }
.plan li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.plan li:first-child { border-top: 1px solid var(--line); }
.plan li .ic { width: 22px; height: 22px; color: var(--ink); }
.plan .flag { position: absolute; top: -1px; right: -1px; padding: 5px 18px 5px 14px; background: linear-gradient(180deg, #9a7b2e, #7d6120); color: #fff; font: 700 11px/1.4 var(--font-sans); letter-spacing: 1.4px; text-transform: uppercase; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); }
.plan.owned { background: #f3f8f4; }

/* ------------------------------------------------------------------ log / ledger rows */
.logrow { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.logrow:first-child { padding-top: 0; }
.logrow .t { font: 400 14px var(--font-mono); color: var(--muted); }
.logrow .e { font-weight: 700; }
.logrow .d { font-size: 15px; color: var(--ink-2); word-break: break-word; }
.lr { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.lr b { color: var(--navy-700); flex: none; }
.lr span { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.hist { border-bottom: 2px solid var(--line-2); padding: 12px 0; }
.hist:first-child { padding-top: 0; }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center; background: rgba(20, 8, 10, .62); }
.modal.open { display: flex; }
.modal-card { width: 100%; max-width: 820px; max-height: 92vh; overflow: auto; background: var(--cream); border-top: 3px solid var(--gold-500); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); animation: rise .22s ease; }
.modal-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; color: #fff; background: linear-gradient(180deg, #5d2227, #521e22); border-bottom: 3px solid var(--gold-500); }
.modal-h h3 { margin: 0; font: 400 19px/1.25 var(--font-serif); }
.modal-b { padding: 16px; }
@keyframes rise { from { transform: translateY(24px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (min-width: 760px) { .modal { align-items: center; padding: 24px; } .modal-card { border: 1px solid var(--line-2); border-top: 3px solid var(--gold-500); } }
.gamelist { display: grid; gap: 8px; }
.gline { display: flex; align-items: center; gap: 12px; padding: 8px; background: #fff; border: 1px solid var(--line-2); }
.gline img, .gline .gph { width: 56px; height: 56px; object-fit: cover; flex: none; background: #1d2b3f; }
.gline .gph { display: grid; place-items: center; color: var(--gold-300); font: 700 15px var(--font-sans); }
.gline .gn { flex: 1 1 auto; min-width: 0; }
.gline .gn b { display: block; line-height: 1.25; word-break: break-word; }
.gline .gn span { font: 400 13px var(--font-mono); color: var(--muted); word-break: break-all; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(82, 30, 34, .2); border-top-color: var(--navy-700); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ docs */
.doc h3 { font: 700 20px/1.25 var(--font-serif); color: var(--navy-800); margin: 22px 0 8px; padding-top: 6px; }
.doc h3:first-child { margin-top: 0; }
.doc h4 { font: 700 17px/1.25 var(--font-serif); margin: 16px 0 6px; }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 12px; }
.doc code { background: #fff; border: 1px solid var(--line); padding: 1px 5px; font-size: 14px; word-break: break-word; }
.code { position: relative; margin: 8px 0 14px; }
.code pre { margin: 0; padding: 14px; overflow-x: auto; background: #1a1a1a; color: #e6edf7; font: 400 13.5px/1.55 var(--font-mono); border-left: 4px solid var(--gold-500); tab-size: 2; -webkit-overflow-scrolling: touch; }
.code .btn { position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 0 10px; font-size: 13px; border-width: 1.5px; background: rgba(255, 255, 255, .92); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 7px 12px; background: #fff; border: 1px solid var(--line-2); text-decoration: none; font-size: 15px; }
.toc a:hover { border-color: var(--gold-600); }
.tabsel { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.tabsel button { min-height: 38px; padding: 0 14px; background: #fff; border: 1.5px solid var(--ctl); font: 700 15px var(--font-serif); cursor: pointer; }
.tabsel button[aria-selected=true] { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.docs-table td, .docs-table th { vertical-align: top; }
#wc .docs-table td:first-child code { white-space: nowrap; word-break: normal; }      /* a short field name such as "logo" must never be cut in two */

/* ------------------------------------------------------------------ auth pages */
body.theme-auth { background: radial-gradient(900px 400px at 50% -10%, rgba(107, 34, 41, .18), transparent 60%), var(--cream); min-height: 100vh; }
.auth-top { display: flex; align-items: center; justify-content: center; height: var(--head-h); background: linear-gradient(180deg, #5d2227, #521e22); border-bottom: 3px solid var(--gold-500); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 22px 14px 48px; }
.auth-wrap .card { box-shadow: 0 18px 40px -22px rgba(82, 30, 34, .6); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 15px; }
.auth-links a, .auth-note a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-top a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-note { text-align: center; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.otp { font: 700 28px/1 var(--font-mono); letter-spacing: 10px; text-align: center; }
.steps { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy-700); color: #fff; font: 700 14px/26px var(--font-sans); text-align: center; }

/* ------------------------------------------------------------------ admin extras */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin: 0 0 14px; }
.toolbar .in, .toolbar select, .toolbar input { flex: 1 1 150px; width: auto; }
.toolbar .btn { flex: 0 0 auto; }
.tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tabbar a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; background: #fff; border: 1.5px solid var(--ctl); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.tabbar a.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.tabbar a .n { background: var(--gold-500); color: #1b1404; font: 700 12px/1.6 var(--font-sans); padding: 0 7px; border-radius: 999px; }
.progress { height: 12px; background: #fff; border: 1px solid var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-600), var(--gold-300)); transition: width .25s; }
.console { background: #1a1a1a; color: #dbe6f5; padding: 12px; font: 400 13px/1.5 var(--font-mono); max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; border-left: 4px solid var(--gold-500); }
.switch { display: flex; align-items: center; gap: 10px; }
.kvgrid { display: grid; grid-template-columns: 1fr; gap: 0; }
.kvgrid .lr { border-bottom: 1px solid var(--line); padding: 9px 0; }
.userlist .u { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.userlist .u:first-child { padding-top: 0; }
.userlist .u b { word-break: break-all; }

details > summary { cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { border-color: var(--gold-600); background: #fff8e3; }

/* ------------------------------------------------------------------ misc */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120; background: #1a1a1a; color: #fff; padding: 10px 16px; border-left: 4px solid var(--gold-500); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 15px; max-width: calc(100vw - 28px); }
.skeleton { background: linear-gradient(90deg, #ece6d8 25%, #f6f1e5 37%, #ece6d8 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; min-height: 18px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .app-h, .tabs, .drawer, .drawer-bg, .no-print, .btn, .flash { display: none !important; }
  body { background: #fff; }
  .app-main, .tabs { margin: 0 !important; padding: 0 !important; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .card-h { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .card-h h1, .card-h h2, .card-h h3 { color: #000 !important; }
}

/* ------------------------------------------------------------------ admin helpers */
.prow { background: #fff; border: 1px solid var(--line-2); padding: 12px; margin: 0 0 12px; }
.prow-h { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.prow-f { display: grid; gap: 10px; grid-template-columns: 1fr; }
.prow .field { margin-bottom: 6px; }
.prow .check { margin: 4px 0; }
@media (min-width: 720px) { .prow-f { grid-template-columns: 1.3fr 1fr .6fr 1.1fr; } }
.prow-logo { flex: none; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #1d2740, #0e1422); }
.prow-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-mono { color: #e6e6e6; font: 700 14px var(--font-sans); letter-spacing: .3px; }
.code-box { background: #1a1a1a; color: #dbe6f5; padding: 12px; font: 400 14px/1.55 var(--font-mono); overflow: auto; white-space: pre-wrap; word-break: break-all; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); margin-right: 6px; vertical-align: baseline; }
.status-dot.ok { background: var(--ok); } .status-dot.bad { background: var(--err); } .status-dot.warn { background: #b9801a; }
details.logrow > summary { cursor: pointer; list-style: none; }
details.logrow > summary .lr { flex-wrap: wrap; }
details.logrow > summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------------ admin: create-user steps, GGR field, provider picker */
.fs { margin: 0 0 26px; }
.fs-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 0 0 9px; border-bottom: 2px solid var(--gold-500); font: 700 18px/1.25 var(--font-serif); color: var(--navy-800); }
.fs-h .step { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #3a1013; background: linear-gradient(180deg, #7a2a31 0%, #5a1d23 100%); color: #ffffff; font: 700 14px/1 var(--font-sans); }
.fs-h small { margin-left: auto; font: 400 14px/1.3 var(--font-serif); color: var(--muted); text-align: right; }

.pct-wrap { display: flex; align-items: stretch; max-width: 300px; }
.pct-wrap .in { flex: 1 1 auto; min-width: 0; min-height: 56px; border-right: 0; font: 700 24px/1.1 var(--font-sans); letter-spacing: .3px; }
.pct-wrap .pct-sign { flex: none; display: grid; place-items: center; min-width: 56px; padding: 0 12px; border: 2px solid #3a1013; background: linear-gradient(180deg, #7a2a31 0%, #5a1d23 100%); color: #ffffff; font: 800 24px/1 var(--font-sans); }
.field.has-err .pct-wrap .pct-sign { border-color: var(--err); }
.pct-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.ggr-example { margin: 12px 0 0; padding: 10px 12px; background: #fff; border: 1px dashed var(--gold-600); font-size: 15px; }
.field.has-err .ggr-example { border-color: var(--err); color: var(--err); }

.pp { margin: 2px 0 0; }
.pp-modes { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pp-modes { grid-template-columns: 1fr 1fr; } }
.pp-mode { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 66px; padding: 14px 16px; background: #fff; border: 2px solid var(--line-2); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.pp-mode:hover { border-color: var(--gold-600); }
.pp-mode input { margin-top: 2px; }
.pp-mode b { display: block; font: 700 17px/1.25 var(--font-serif); color: var(--navy-800); }
.pp-mode small { display: block; margin-top: 2px; font: 400 14px/1.35 var(--font-serif); color: var(--muted); }
.pp-mode.is-on { border-color: var(--gold-500); background: #fff8e3; box-shadow: 0 0 0 3px rgba(107, 34, 41, .25); }
.pp-mode:focus-within { outline: 3px solid rgba(107, 34, 41, .5); outline-offset: 2px; }

.pp-body { margin-top: 14px; }
.pp-tools { display: grid; gap: 10px; margin-bottom: 10px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 2px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); font: 600 14px/1 var(--font-sans); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pp-chip small { padding: 3px 7px; border-radius: 999px; background: var(--cream-3); color: var(--muted); font: 600 12px/1 var(--font-sans); }
.pp-chip:hover { border-color: var(--navy-700); }
.pp-chip.is-on { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.pp-chip.is-on small { background: rgba(255, 255, 255, .18); color: #fff; }
.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pp-count { margin-left: auto; font: 600 15px/1.2 var(--font-sans); color: var(--navy-800); }
.pp-count b { font-size: 19px; color: var(--gold-700); }
.pp-grid { display: grid; grid-template-columns: 1fr; gap: 8px; max-height: 470px; overflow: auto; padding: 10px; background: var(--cream-2); border: 1px solid var(--line-2); overscroll-behavior: contain; }
@media (min-width: 560px) { .pp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .pp-grid { grid-template-columns: repeat(3, 1fr); } }
.pp-item { position: relative; display: block; cursor: pointer; }
.pp-item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pp-box { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px 10px 50px; background: #fff; border: 2px solid var(--line-2); transition: border-color .15s, background .15s, box-shadow .15s; }
.pp-box::before { content: ""; position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border: 2px solid var(--ctl); border-radius: 4px; background: #fff; transition: background .12s, border-color .12s; }
.pp-box::after { content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 11px; margin-top: -8px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.pp-item:hover .pp-box { border-color: var(--gold-600); }
.pp-item input:checked + .pp-box { border-color: var(--gold-500); background: #fff8e3; box-shadow: 0 6px 14px -10px rgba(122, 98, 32, .8); }
.pp-item input:checked + .pp-box::before { border-color: var(--navy-800); background: var(--navy-800); }
.pp-item input:checked + .pp-box::after { transform: rotate(45deg) scale(1); }
.pp-item input:focus-visible + .pp-box { outline: 3px solid rgba(107, 34, 41, .65); outline-offset: 1px; }
.pp-logo { flex: none; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, #1d2740, #0e1422); }
.pp-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-logo .pp-mono { font-size: 13px; }
.pp-txt { display: block; min-width: 0; flex: 1 1 auto; }
.pp-name { display: block; font: 700 16px/1.25 var(--font-serif); color: var(--navy-800); overflow-wrap: anywhere; }
.pp-meta { display: block; margin-top: 2px; font: 400 13.5px/1.3 var(--font-sans); color: var(--muted); }
.pp-own { display: inline-block; margin-top: 5px; padding: 1px 9px; border-radius: 999px; background: #f5e6b3; color: #5b4306; font: 700 11px/1.7 var(--font-sans); letter-spacing: .4px; text-transform: uppercase; }
.pp-empty { margin: 10px 0 0; padding: 16px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line-2); }
.pp-allnote { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 14px 16px; background: var(--ok-bg); border-left: 4px solid var(--ok); color: #0a4a37; }
.pp-allnote .ic { flex: none; color: var(--ok); }
.pp-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pp-save .hint { margin: 0; flex: 1 1 220px; }
.rate-badge { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 12px; border-radius: 999px; border: 1px solid #3a1013; background: linear-gradient(180deg, #f8e7a6 0%, #e6c566 100%); color: #ffffff; font: 800 14px/1.7 var(--font-sans); letter-spacing: .3px; }

/* ------------------------------------------------------------------ touch targets (phones) — kept last so they win */
@media (max-width: 767px) {
  .pp-chip { min-height: 44px; }
  .pp-grid { max-height: 60vh; }
  .tabsel button, .code .btn { min-height: 44px; }
  .toc a { padding: 12px 14px; }
  .pdf-btn { width: 44px; height: 44px; min-height: 44px; }
  button.pill { padding: 14px 18px; }
  .tbl.stack td > a:not(.btn), .kv-inline > a:not(.btn), .rec a:not(.btn), .lr a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  a.chip { display: inline-flex; align-items: center; min-height: 44px; }
}

/* two fields side by side on wider screens (sign-up page, online-pay settings) */
.sg-two { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sg-two { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ client credentials sheet (views/partials/cred_card.php) */
/* The layout follows the card's own width (container query), so it holds with or without the side menu; old browsers keep the stacked phone layout. */
.cred-card { border-top: 0; container: cred / inline-size; scroll-margin-top: calc(var(--head-h) + var(--tabs-h) + 10px); }
.cred-brand { margin-right: 8px; font-family: var(--font-display); font-weight: 900; letter-spacing: -.2px; color: var(--gold-300); }
.cred-date { margin-left: 6px; }
.cred-note { line-height: 1.5; }
.cred-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; }
.cred-actions .btn-primary { grid-column: 1 / -1; }
.cred-actions .btn { width: 100%; }
.cred-actions .btn:not(.btn-primary) { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: 14.5px; line-height: 1.2; }
.cred-ext { display: none; }
@container cred (min-width: 780px) {
  .cred-actions { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .cred-actions .btn-primary { grid-column: auto; }
  .cred-actions .btn:not(.btn-primary) { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 14px; font-size: 17px; }
  .cred-ext { display: inline; }
}
.cred-sec { margin: 22px 0 4px; padding: 0 0 7px; border-bottom: 2px solid var(--gold-500); font: 700 12px/1.2 var(--font-sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy-700); }
.cred-list { margin: 0; }
.cred-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l b" "v v"; gap: 6px 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cred-row:last-child { border-bottom: 0; }
.cred-row.nobtn { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "v"; }
.cred-row dt { grid-area: l; margin: 0; font: 600 13px/1.3 var(--font-sans); color: var(--muted); }
.cred-row .cred-v { grid-area: v; margin: 0; min-width: 0; padding: 9px 11px; background: #fff; border: 1px solid var(--line-2); font: 400 15px/1.45 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; word-break: break-all; }
.cred-row .cred-v a { color: var(--navy-600); }
.cred-row .cred-b { grid-area: b; margin: 0; }
.cred-row.hot .cred-v { background: #fff8e3; border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(107, 34, 41, .18); font-weight: 700; letter-spacing: .3px; }
.cred-row.hot dt { color: var(--gold-700); }
@container cred (min-width: 640px) {
  .cred-row { grid-template-columns: 170px minmax(0, 1fr) auto; grid-template-areas: "l v b"; gap: 10px 14px; }
  .cred-row.nobtn { grid-template-columns: 170px minmax(0, 1fr); grid-template-areas: "l v"; }
  .cred-row dt { font-size: 14px; }
}
.cred-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cred-foot form { margin: 0; }
.cred-foot .muted { flex: 1 1 220px; }
.cred-pw-tools { display: flex; gap: 10px; align-items: stretch; }
.cred-pw-tools .in { flex: 1 1 auto; min-width: 0; }
.cred-pw-tools .btn { flex: 0 0 auto; }
@media print {
  /* "Print / PDF" on the sheet prints just the sheet */
  body.print-cred .app-main > :not(.cred-card), body.print-cred .flash { display: none !important; }
  body.print-cred .cred-card { border: 1px solid #000; margin: 0; }
  body.print-cred .cred-brand, body.print-cred .cred-date, body.print-cred .cred-card .card-h .sub { color: #000; }
  body.print-cred .cred-row .cred-v, body.print-cred .cred-row.hot .cred-v { background: #fff; border: 1px solid #888; box-shadow: none; }
  body.print-cred .cred-row { break-inside: avoid; }
}

/* ------------------------------------------------------------------ kits (admin upload page, users' Kits page) */
.kit-list { margin: 0 0 14px; padding-left: 20px; }
.kit-list li { margin: 0 0 6px; }
.kit-hero { border-top: 3px solid var(--gold-500); }
.kit-group { margin: 24px 0 10px; padding: 0 0 7px; border-bottom: 2px solid var(--gold-500); font: 700 12px/1.2 var(--font-sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy-700); }
.kit { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic body" "act act"; gap: 12px 14px; padding: 14px 16px; }
.kit-ic { grid-area: ic; width: 44px; height: 44px; display: grid; place-items: center; background: var(--navy-800); color: var(--gold-300); }
.kit-body { grid-area: body; min-width: 0; }
.kit-body h3 { margin: 0 0 4px; font: 700 18px/1.35 var(--font-serif); color: var(--navy-800); overflow-wrap: anywhere; }
.kit-body h3 .chip { margin-left: 6px; vertical-align: middle; }
.kit-desc { margin: 6px 0 10px; color: var(--ink-2); overflow-wrap: anywhere; }
.kit-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-meta span { padding: 1px 9px; background: #fff; border: 1px solid var(--line-2); font-size: 13px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.kit-sum { margin-top: 10px; font-size: 14px; }
.kit-sum summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; color: var(--navy-600); }
.kit-sum code { display: block; margin: 6px 0 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--line-2); font-size: 12.5px; word-break: break-all; }
.kit-act { grid-area: act; }
.kit-act .btn { width: 100%; }
@media (min-width: 640px) {
  .kit { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "ic body act"; align-items: start; }
  .kit-ic { width: 52px; height: 52px; }
  .kit-act { align-self: center; }
  .kit-act .btn { width: auto; min-width: 150px; }
}
[data-kit-file] { display: block; width: 100%; padding: 10px; background: #fff; border: 1.5px dashed var(--ctl); font: inherit; color: var(--ink); }
[data-kit-file].has-err { border-color: var(--err); }
.kit-progress { margin: 14px 0 0; }
.kit-bar { height: 14px; background: #fff; border: 1px solid var(--line-2); overflow: hidden; }
.kit-fill { display: block; height: 100%; width: 0; background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); transition: width .15s linear; }
.kit-pct { margin-top: 6px; font-size: 14px; color: var(--muted); }
.kit-rec.is-hidden { background: var(--cream-3); }
.kit-rec.is-hidden .kit-ic { opacity: .55; }
/* the administrator's cards: the same card, four small buttons instead of one big one */
.kit-act-adm { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.kit-act-adm form { margin: 0; }
.kit-act-adm .btn { width: 100%; min-width: 0; justify-content: center; }
@media (min-width: 640px) { .kit-act-adm { grid-template-columns: repeat(2, 112px); align-self: start; } }
.kit-quick { align-items: center; gap: 8px; }
.kit-quick .btn { flex: 0 1 auto; }
/* game categories: one compact row each (name, counts, the two download buttons) */
.cat-list { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line-2); }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
.cat-main { min-width: 0; }
.cat-main b { font: 700 16px/1.35 var(--font-serif); color: var(--navy-800); }
.cat-main code { margin-left: 6px; font-size: 12.5px; color: var(--muted); }
.cat-meta { margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cat-act { display: flex; gap: 8px; }
@media (max-width: 359px) {
  .cat-row { grid-template-columns: minmax(0, 1fr); }
  .cat-act .btn { flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) { .kit-fill { transition: none; } }
@media print { .kit-act, .kit-sum, .kit-quick, .cat-act { display: none; } .kit { break-inside: avoid; } }

/* ------------------------------------------------------------------ delete user (admin) */
/* a link to a card (#delete, #session, …) must not leave its heading under the sticky header and tab bar */
.card[id] { scroll-margin-top: calc(var(--head-h) + var(--tabs-h) + 10px); }
.card.danger { border-color: #c98f8b; }
.card.danger .card-h { background: linear-gradient(180deg, #a02a25 0%, #7a1b17 100%); border-bottom-color: #d9a3a0; }
.card.danger .card-h .chip { background: #fff; color: #7a1b17; border-color: #fff; }
.del-list { margin: 8px 0 16px; padding-left: 20px; }
.del-list li { margin: 0 0 8px; line-height: 1.5; }

/* ==========================================================================
   Theme "Maroon & Cream" — the look of the World Casino client panel:
   maroon header, white tab strip, charcoal drawer, cream page, maroon serif headings with a rule.
   ========================================================================== */
body.theme-panel { background: var(--page); color: var(--ink); }
.app-h { background: #521e22; border-bottom: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.h-acct { border-left: 0; }
.h-acct b { font-size: 19px; }
.h-acct span { color: #e3cfd1; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.wordmark { filter: none; }
.wordmark .wm-a, .wordmark .wm-b { background-image: linear-gradient(180deg, #ffffff 0%, #dcdcdc 55%, #b8b8b8 100%); }

.tabs { background: #fff; border-bottom: 1px solid var(--line-2); box-shadow: 0 2px 5px rgba(0, 0, 0, .06); }
.tabs-btn { color: #6f6466; }
.tabs-btn:hover { color: #521e22; background: rgba(82, 30, 34, .06); }
.tab { color: #5a4a4c; font: 500 15px/1 var(--font-serif); letter-spacing: .6px; text-transform: uppercase; }
.tab .dot { display: none; }
.tab:hover { background: rgba(82, 30, 34, .05); color: #521e22; }
.tab.active { background: #fff; color: #521e22; font-weight: 700; }
.tab.active::after { height: 3px; background: #6b2229; }
.tab .tab-x { color: #8a7f80; }
.tab .tab-x:hover { background: rgba(82, 30, 34, .1); color: #521e22; }

.drawer-bg { background: rgba(20, 8, 10, .6); }
.drawer { background: #1b1b1b; border-right: 0; }
.drawer-lbl { color: #8d8586; font: 500 12px/1 var(--font-sans); letter-spacing: 2px; }
.nav a { border-bottom: 0; padding: 12px 18px; }
.nav a .ic { color: #b33a45; }
.nav a .t b { font: 500 17px/1.15 var(--font-serif); text-transform: uppercase; letter-spacing: .5px; }
.nav a .t i { font-size: 12px; color: #a9a2a3; }
.nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a.active { background: #6b2229; box-shadow: none; }
.nav a.active .ic { color: #ffd2d6; }
.nav a .n { background: #b33a45; color: #fff; }
.drawer-foot { border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: #8d8586; }

.card { background: transparent; border: 0; box-shadow: none; }
.card-h { background: transparent; color: #521e22; padding: 10px 0 8px; border-bottom: 3px solid #6b2229; }
.card-h h1, .card-h h2, .card-h h3 { color: #5a1d23; font: 700 22px/1.25 var(--font-serif); letter-spacing: 0; }
.card-h .sub { color: var(--muted); }
.card-b { padding: 14px 0; }
.card-f { background: transparent; padding: 12px 0; }
.card.inner { background: #f7f4ec; border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset; }
.card.inner.reco { border: 2px solid #6b2229; }
.page-title { color: #5a1d23; border-bottom: 3px solid #6b2229; padding-bottom: 8px; }
.kv-l { color: #5a4a4c; font-weight: 600; }

.btn { background: #fff; color: #521e22; border: 1px solid #c9bfae; border-radius: 3px; font-weight: 600; box-shadow: none; text-transform: uppercase; letter-spacing: .4px; font-size: 15px; }
.btn:hover { background: #f7f2e8; color: #3f1317; border-color: #6b2229; transform: none; box-shadow: none; }
.btn-primary { background: #6b2229; color: #fff; border: 1px solid #521a1f; border-bottom: 3px solid #3a1013; box-shadow: none; }
.btn-primary:hover { background: #7a2a31; color: #fff; border-color: #521a1f; }
.btn-gold { background: #6b2229; color: #fff; border: 1px solid #521a1f; border-bottom: 3px solid #3a1013; }
.btn-gold:hover { background: #7a2a31; color: #fff; }

.in, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=tel], input[type=date], input[type=datetime-local], select, textarea { background: #fff; border: 1px solid #cfc6b4; border-radius: 3px; }
.in:focus, input:focus, select:focus, textarea:focus { border-color: #6b2229; outline: 3px solid rgba(107, 34, 41, .2); }
pre, .codebox { background: #0c2340; color: #dbe6f5; }
:focus-visible { outline-color: rgba(107, 34, 41, .7); }
a { color: #6b2229; }
a:hover { color: #3f1317; }
