/* ============================================================
   desawarking — Admin Design System
   Navy + Gold · royal/premium · compact
   ============================================================ */

:root {
  /* Navy scale */
  --navy-900: #0c1633;
  --navy-800: #0f1c3f;
  --navy-700: #14224e;
  --navy-600: #1c2f63;
  --navy-500: #2a3f7a;
  --navy-line: #243463;

  /* Gold scale */
  --gold-700: #9a7322;
  --gold-600: #c79a3a;
  --gold-500: #d4af37;
  --gold-400: #e3c463;
  --gold-200: #f0dca6;
  --gold-soft: #f7efd9;

  /* Paper / neutrals */
  --paper: #f5f2ea;
  --paper-2: #efeadd;
  --card: #ffffff;
  --line: #e7e0d0;
  --line-2: #efe9da;

  /* Text */
  --ink: #181c2a;
  --ink-2: #4a4f60;
  --ink-3: #868b9c;
  --ink-faint: #aab0c0;

  /* Status */
  --green: #2f9e62;
  --red: #cf4d4d;
  --blue: #2c5fd1;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 34, 78, .06);
  --shadow: 0 6px 22px -10px rgba(20, 34, 78, .18);
  --shadow-lg: 0 24px 60px -28px rgba(12, 22, 51, .5);

  --sidebar-w: 256px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;

  /* glass system */
  --glass-bg: rgba(255,255,255,.50);
  --glass-bg-strong: rgba(255,255,255,.72);
  --glass-brd: rgba(255,255,255,.75);
  --glass-blur: blur(20px) saturate(185%);
  --glass-shadow: 0 14px 40px -16px rgba(20,34,78,.26), 0 2px 8px -3px rgba(20,34,78,.10);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,.85), inset 0 0 0 1px rgba(255,255,255,.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.serif { font-family: 'Marcellus', serif; }

/* ===== Ambient premium aurora (gives glass something to refract) ===== */
body {
  background:
    radial-gradient(38% 34% at 72% 6%, rgba(214,176,74,.55), transparent 58%),
    radial-gradient(34% 40% at 96% 40%, rgba(206,166,72,.40), transparent 60%),
    radial-gradient(40% 44% at 2% 80%, rgba(54,86,170,.20), transparent 62%),
    radial-gradient(30% 30% at 30% 16%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(155deg, #efe7d6 0%, #e7ddc8 48%, #ddd0b6 100%);
  background-attachment: fixed;
}
.app { position: relative; z-index: 1; }

/* ============================================================
   App shell
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns .28s cubic-bezier(.4,0,.2,1);
}
.app.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(199,154,58,.12), transparent 60%),
    linear-gradient(190deg, var(--navy-700), var(--navy-900));
  color: #c6cde4;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.04);
  overflow: hidden;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 20px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-mark {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: none; place-items: center;
  background: linear-gradient(140deg, var(--gold-400), var(--gold-700));
  color: var(--navy-900);
  font-family: 'Marcellus', serif;
  font-size: 17px;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px -6px rgba(199,154,58,.6), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-logo {
  display: flex; align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
}
.brand-logo img {
  height: 34px; width: auto; display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.4));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.brand-text .b1 {
  font-family: 'Marcellus', serif;
  font-size: 17px;
  color: #fff;
  letter-spacing: .3px;
}
.brand-text .b2 {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-top: 3px;
}
.collapsed .brand { padding: 0 19px; }
.collapsed .brand-text { display: none; }
.collapsed .brand-logo { display: none; }
.collapsed .brand-mark { display: grid; }

.nav {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}

/* ===== Apple-style Liquid Glass selection pill ===== */
.nav-glass {
  position: absolute;
  top: 0; left: 14px;
  width: 40px; height: 38px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(212,175,55,.32), rgba(199,154,58,.07));
  -webkit-backdrop-filter: blur(12px) saturate(200%);
  backdrop-filter: blur(12px) saturate(200%);
  border: 1px solid rgba(212,175,55,.42);
  box-shadow:
    0 10px 26px -10px rgba(199,154,58,.55),
    0 2px 6px -2px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -2px 5px rgba(120,80,10,.22);
  overflow: hidden;
  transition:
    top .52s cubic-bezier(.34,1.42,.5,1),
    height .44s cubic-bezier(.34,1.42,.5,1),
    width .44s cubic-bezier(.34,1.42,.5,1),
    left .44s cubic-bezier(.34,1.42,.5,1),
    opacity .35s ease,
    transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nav-glass::before {
  content: '';
  position: absolute;
  inset: 0 0 45% 0;
  border-radius: 12px 12px 40% 40% / 12px 12px 100% 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events: none;
}
.nav-glass::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -50%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  opacity: 0;
  pointer-events: none;
}
.nav-glass.show { opacity: 1; }
.nav-glass.is-moving { transform: scaleY(1.06); }
.nav-glass.is-moving::after { animation: glassSweep .6s cubic-bezier(.4,0,.2,1); }
@keyframes glassSweep {
  0%   { left: -50%; opacity: 0; }
  35%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-glass { transition: opacity .2s ease; }
  .nav-glass.is-moving { transform: none; }
  .nav-glass.is-moving::after { animation: none; }
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 4px; }
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6f79a0;
  padding: 0 12px 8px;
  white-space: nowrap;
}
.collapsed .nav-label { display: none; }

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 12px;
  color: #aeb6d4;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color .3s ease, background .25s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.nav-item svg {
  width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.7;
  transition: color .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nav-item:hover { background: rgba(255,255,255,.045); color: #e7ebf7; }
.nav-item:hover svg { transform: scale(1.08); }
.nav-item:active { transform: scale(.965); }
.nav-item.active {
  background: transparent;
  color: #fff;
  border-color: transparent;
}
.nav-item.active svg {
  color: var(--gold-400);
  animation: navIconPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes navIconPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.24) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}
.nav-text { transition: opacity .2s; }
.collapsed .nav-text { display: none; }
.collapsed .nav-item { justify-content: center; gap: 0; padding: 10px; margin: 4px 0; }
.collapsed .nav-group { margin-top: 10px; }
.collapsed .nav-group:first-child { margin-top: 4px; }
/* slim divider between collapsed groups so sections stay readable */
.collapsed .nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--gold-500);
  color: var(--navy-900);
  border-radius: 20px;
  padding: 1px 7px;
}
.collapsed .nav-badge { display: none; }

.sidebar-foot {
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.collapse-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  color: #aeb6d4;
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  white-space: nowrap;
}
.collapse-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.collapse-btn svg { width: 18px; height: 18px; transition: transform .28s; }
.collapsed .collapse-btn svg { transform: rotate(180deg); }
.collapsed .collapse-btn { justify-content: center; }
.collapsed .collapse-btn span { display: none; }

/* ---------------- Main ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0;
  z-index: 20;
  background: rgba(245,242,234,.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
}
.menu-toggle {
  display: none;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  cursor: pointer; place-items: center;
}

.search {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  border-radius: 11px;
  padding: 0 14px;
  height: 42px;
  width: 340px;
  max-width: 42vw;
  box-shadow: 0 4px 14px -8px rgba(20,34,78,.18), var(--glass-inset);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: rgba(212,175,55,.6); box-shadow: 0 6px 18px -8px rgba(199,154,58,.3), var(--glass-inset); }
.search svg { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }
.search input {
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 13.5px; width: 100%;
  color: var(--ink);
}
.search .kbd {
  font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 6px; background: var(--paper);
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { border-color: var(--gold-400); color: var(--navy-700); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--card);
}
.icon-btn .notif-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 13px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--card); box-sizing: content-box;
}
/* `.icon-btn{display:grid}` would beat the UA `[hidden]{display:none}` rule, so
   the bell's `hidden` attribute needs an explicit reset (same pitfall handled
   for `.field[hidden]` below) — otherwise an empty bell shows to staff who lack
   notifications.view and flashes for everyone before JS runs. */
.icon-btn[hidden] { display: none !important; }

.profile {
  display: flex; align-items: center; gap: 11px;
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.profile:hover { border-color: var(--gold-400); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--navy-500), var(--navy-800));
  color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
  border: 2px solid var(--gold-400);
}
.profile-meta { display: flex; flex-direction: column; line-height: 1.15; }
.profile-meta .pn { font-weight: 600; font-size: 13px; color: var(--ink); }
.profile-meta .pr { font-size: 11px; color: var(--ink-3); }
.profile .chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .25s; }
.profile-wrap.open .profile .chev { transform: rotate(180deg); }
.profile-wrap.open .profile { border-color: var(--gold-400); }

/* ===== Profile dropdown menu ===== */
.profile-wrap { position: relative; }
.profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 296px;
  z-index: 90;
  background: linear-gradient(155deg, rgba(255,255,255,.95), rgba(255,255,255,.88));
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  box-shadow: 0 28px 60px -22px rgba(20,34,78,.42), var(--glass-inset);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.97);
  transform-origin: top right;
  transition: opacity .22s ease, transform .26s cubic-bezier(.34,1.46,.5,1), visibility .22s;
}
.profile-wrap.open .profile-menu { opacity: 1; visibility: visible; transform: none; }
.profile-menu::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 44%;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
  pointer-events: none;
}
.pm-head {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.55);
}
.pm-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: 'Marcellus', serif; font-size: 17px; letter-spacing: .5px;
  color: var(--navy-900);
  background: linear-gradient(140deg, var(--gold-400), var(--gold-700));
  box-shadow: 0 6px 16px -6px rgba(199,154,58,.7), inset 0 1px 0 rgba(255,255,255,.6);
}
.pm-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-name { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25; white-space: nowrap; }
.pm-email { font-size: 11.5px; line-height: 1.2; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-role { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; line-height: 1.2; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gold-700); margin-top: 3px; }
.pm-role-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-600); box-shadow: 0 0 0 3px rgba(212,175,55,.2); }
.pm-stats {
  position: relative;
  display: grid; grid-template-columns: 1.5fr 1fr;
  padding: 12px 18px;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.55);
}
.pm-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pm-stat:nth-child(2) { border-left: 1px solid rgba(20,34,78,.08); padding-left: 14px; }
.pms-k { font-size: 8.5px; line-height: 1.3; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; white-space: nowrap; }
.pms-v { font-size: 11px; line-height: 1.25; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pms-on { display: inline-flex; align-items: center; gap: 5px; color: var(--green); }
.pms-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47,158,98,.18); }
.pm-list { position: relative; padding: 8px; }
.pm-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 11px;
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; text-align: left;
  transition: background .15s, color .15s, transform .15s;
}
.pm-item svg { width: 18px; height: 18px; color: var(--ink-3); transition: color .15s; flex-shrink: 0; }
.pm-item span { white-space: nowrap; }
.pm-item:hover { background: rgba(255,255,255,.7); color: var(--navy-700); transform: translateX(2px); }
.pm-item:hover svg { color: var(--gold-600); }
.pm-signout {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 4px 8px 10px; padding: 11px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(207,77,77,.12), rgba(207,77,77,.06));
  border: 1px solid rgba(207,77,77,.28);
  color: var(--red); font-size: 13.5px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .12s;
}
.pm-signout svg { width: 17px; height: 17px; }
.pm-signout:hover { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(207,77,77,.6); }
.pm-signout:active { transform: scale(.98); }

/* ---------------- Content ---------------- */
.content { position: relative; z-index: 1; padding: 26px; max-width: 1280px; width: 100%; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); margin-bottom: 9px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--gold-700); }
.crumbs .sep { color: var(--ink-faint); }
.crumbs .cur { color: var(--ink-2); font-weight: 600; }
.page-title { font-family: 'Marcellus', serif; font-size: 27px; color: var(--ink); letter-spacing: .2px; }
.page-sub { font-size: 13px; color: var(--ink-3); margin-top: 5px; }

/* ---------------- Card ---------------- */
.card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-2);
}
.card-head .ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(140deg, var(--gold-soft), #fff);
  border: 1px solid var(--gold-200);
  color: var(--gold-700);
}
.card-head .ico svg { width: 20px; height: 20px; }
.card-head h2 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.card-head .head-tag {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--gold-700);
  background: var(--gold-soft);
  border: 1px solid var(--gold-200);
  padding: 4px 11px; border-radius: 20px;
}
.card-body { padding: 24px; }

/* ---------------- Form ---------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field.col-2 { grid-column: 1 / -1; }
/* `.field` sets display:flex, which beats the UA `[hidden]{display:none}` rule —
   so a hidden field would stay visible. This restores hide-on-[hidden] for the
   conditional payment-method (UPI vs bank) and send-type (schedule/daily) fields. */
.field[hidden] { display: none !important; }
.field label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.field label .req { color: var(--red); }
.field label .hint { white-space: nowrap; }
.field .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; }

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fdfcfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 46px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.textarea { height: auto; padding: 13px 14px; resize: vertical; min-height: 120px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #d6cdb8; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(212,175,55,.14);
}
.select {
  appearance: none;
  background-color: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23868b9c' stroke-width='2' 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 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ===== Checkbox-dropdown multi-select (Bet History → Market(s)) ===== */
.ag-ms { position: relative; min-width: 190px; }
.ag-ms-btn {
  display: flex; align-items: center; justify-content: flex-start;
  text-align: left; width: 100%;
}
.ag-ms-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ms.open .ag-ms-btn {
  border-color: var(--gold-500); background: #fff;
  box-shadow: 0 0 0 4px rgba(212,175,55,.14);
}
.ag-ms-pop {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 100%; width: max-content; max-width: 280px;
  z-index: 60;
  background: linear-gradient(155deg, rgba(255,255,255,.97), rgba(255,255,255,.92));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd); border-radius: 14px;
  box-shadow: 0 24px 50px -20px rgba(20,34,78,.4), var(--glass-inset);
  padding: 6px; max-height: 290px; overflow-y: auto;
}
.ag-ms-pop[hidden] { display: none; }
.ag-ms-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--ink); user-select: none;
  transition: background .14s;
}
.ag-ms-opt:hover { background: rgba(212,175,55,.10); }
.ag-ms-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ag-ms-check {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 6px;
  border: 1.5px solid var(--line); background: #fff;
  display: grid; place-items: center; transition: background .14s, border-color .14s;
}
.ag-ms-opt input:checked + .ag-ms-check {
  background: linear-gradient(140deg, var(--gold-400), var(--gold-700));
  border-color: var(--gold-600);
}
.ag-ms-check::after {
  content: ''; width: 5px; height: 9px; margin-top: -2px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); opacity: 0; transition: opacity .14s;
}
.ag-ms-opt input:checked + .ag-ms-check::after { opacity: 1; }
.ag-ms-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ms-all { font-weight: 600; }
.ag-ms-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.ag-ms-empty { padding: 12px 10px; color: var(--ink-3); font-size: 13px; }

/* input with leading icon / addon */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .lead {
  position: absolute; left: 13px;
  color: var(--ink-3); pointer-events: none;
  display: grid; place-items: center;
}
.input-wrap .lead svg { width: 17px; height: 17px; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .suffix {
  position: absolute; right: 14px;
  font-size: 12.5px; color: var(--ink-3); font-weight: 600;
  pointer-events: none;
}
/* R18: an interactive suffix (the show-password eye) must receive clicks — the
   default suffix is a passive label, but [data-eye] / [role=button] toggles. */
.input-wrap .suffix[data-eye],
.input-wrap .suffix[role="button"] { pointer-events: auto; cursor: pointer; }
.input-wrap .input.has-suffix { padding-right: 46px; }

/* file dropzone */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: #fdfcfa;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: border-color .16s, background .16s;
}
.dropzone:hover { border-color: var(--gold-500); background: var(--gold-soft); }
.dropzone .dz-ico {
  width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--navy-600), var(--navy-800));
  color: var(--gold-400);
}
.dropzone .dz-ico svg { width: 24px; height: 24px; }
.dz-text .t1 { font-size: 14px; font-weight: 600; color: var(--ink); }
.dz-text .t1 b { color: var(--gold-700); }
.dz-text .t2 { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.dz-preview {
  margin-left: auto;
  display: none;
  align-items: center; gap: 12px;
  padding-left: 18px; border-left: 1px solid var(--line);
}
.dropzone.filled .dz-preview { display: flex; }
.dz-preview .thumb {
  width: 56px; height: 40px; border-radius: 8px;
  background: var(--paper-2) center/cover; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-3);
  overflow: hidden;
}
.dz-preview .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dz-preview .fname { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-preview .fsize { font-size: 11px; color: var(--ink-3); }

/* segmented toggle */
.seg {
  position: relative;
  display: inline-flex;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}
.seg button {
  position: relative; z-index: 1;
  border: none; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  padding: 8px 20px; border-radius: 8px;
  transition: background .14s, color .14s, box-shadow .14s;
}
.seg button { transition: color .3s ease; }
.seg button.on { background: transparent; color: var(--navy-700); }
.seg button.on.danger { color: var(--red); }

/* ---------------- Buttons ---------------- */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
}
.btn {
  font-family: inherit; font-weight: 600; font-size: 14px;
  border-radius: var(--radius);
  padding: 0 22px; height: 46px;
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .08s, box-shadow .16s, background .16s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-900);
  box-shadow: 0 10px 22px -10px rgba(199,154,58,.7), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:hover { box-shadow: 0 14px 26px -10px rgba(199,154,58,.85), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: #d6cdb8; color: var(--ink); }
.btn-navy {
  background: var(--navy-700); color: #fff;
}
.btn-navy:hover { background: var(--navy-600); }
.spacer { flex: 1; }
.req-note { font-size: 12px; color: var(--ink-3); }
.req-note .req { color: var(--red); }

/* ---------------- Empty state (stub pages) ---------------- */
.empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 80px 30px;
}
.empty .e-ico {
  width: 78px; height: 78px; border-radius: 22px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--gold-soft), #fff);
  border: 1px solid var(--gold-200);
  color: var(--gold-700);
  margin-bottom: 22px;
}
.empty .e-ico svg { width: 34px; height: 34px; }
.empty h3 { font-family: 'Marcellus', serif; font-size: 22px; margin: 0 0 8px; color: var(--ink); }
.empty p { font-size: 13.5px; color: var(--ink-3); max-width: 380px; line-height: 1.6; margin: 0; }
.empty .pill {
  margin-top: 18px; font-size: 12px; font-weight: 600;
  color: var(--gold-700); background: var(--gold-soft);
  border: 1px solid var(--gold-200); border-radius: 20px; padding: 6px 14px;
}

/* ============================================================
   Dashboard
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.kpi {
  position: relative;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: 0 8px 24px -14px rgba(20,34,78,.22), var(--glass-inset);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.34,1.42,.5,1), box-shadow .22s ease, border-color .16s;
}
.kpi:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(20,34,78,.32), var(--glass-inset); border-color: rgba(212,175,55,.5); }
.kpi::after {
  content: '';
  position: absolute; right: -28px; top: -28px;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent, var(--gold-soft)); opacity: .12;
}
.kpi .k-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kpi .k-ico {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft, var(--gold-soft));
  color: var(--accent-ink, var(--gold-700));
}
.kpi .k-ico svg { width: 19px; height: 19px; }
.kpi .k-label { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .2px; }
.kpi .k-value { font-family: 'Marcellus', serif; font-size: 30px; color: var(--ink); line-height: 1; letter-spacing: .3px; }
.kpi .k-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.kpi .k-trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.kpi .k-trend svg { width: 13px; height: 13px; }
.kpi .k-trend.up { color: var(--green); }
.kpi .k-trend.down { color: var(--red); }

/* accent variants */
.kpi.gold  { --accent:#d4af37; --accent-soft:var(--gold-soft); --accent-ink:var(--gold-700); }
.kpi.navy  { --accent:#1c2f63; --accent-soft:#eef1f9; --accent-ink:#1c2f63; }
.kpi.green { --accent:#2f9e62; --accent-soft:#e8f5ee; --accent-ink:#1f7a49; }
.kpi.blue  { --accent:#2c5fd1; --accent-soft:#e9f0fc; --accent-ink:#2350b3; }
.kpi.red   { --accent:#cf4d4d; --accent-soft:#fbecec; --accent-ink:#b23b3b; }

/* hero (highlighted) KPI */
.kpi.hero {
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900));
  border-color: var(--navy-line);
}
.kpi.hero::after { background: var(--gold-400); opacity: .18; }
.kpi.hero .k-label { color: #9aa4c8; }
.kpi.hero .k-value { color: #fff; }
.kpi.hero .k-foot { color: #8d97bd; }
.kpi.hero .k-ico { background: rgba(212,175,55,.16); color: var(--gold-400); }

/* small stat tiles (secondary metrics) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: 0 6px 18px -12px rgba(20,34,78,.2), var(--glass-inset);
  transition: transform .2s cubic-bezier(.34,1.42,.5,1), box-shadow .2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(20,34,78,.28), var(--glass-inset); }
.stat .s-label { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; }
.stat .s-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); flex-shrink: 0; }
.stat .s-value { font-size: 21px; font-weight: 700; color: var(--ink); margin-top: 7px; font-variant-numeric: tabular-nums; }

/* dashboard split row */
.dash-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-bottom: 22px; }
.panel { background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow), var(--glass-inset); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.panel-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.panel-head .ph-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); border: 1px solid var(--gold-200); color: var(--gold-700); }
.panel-head .ph-ico svg { width: 17px; height: 17px; }
.panel-head .ph-date { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.panel-body { padding: 20px; }

/* market bid details — empty state inside panel */
.market-empty { text-align: center; padding: 26px 16px; }
.market-empty .me-amount { font-family: 'Marcellus', serif; font-size: 34px; color: var(--gold-700); }
.market-empty .me-label { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.market-empty .me-na { display: inline-block; margin: 14px 0; font-size: 13px; font-weight: 700; color: var(--ink-faint); background: var(--paper-2); border-radius: 20px; padding: 6px 18px; }

/* result declaration uses table.data */
.digit-cell { font-family: 'Marcellus', serif; font-size: 16px; color: var(--navy-700); letter-spacing: 2px; }
.ab-cell { font-weight: 700; color: var(--ink); }

/* ============================================================
   Tables & list pages
   ============================================================ */
.table-card { padding: 0; overflow: hidden; background: rgba(255,255,255,.74); }

/* Toolbar (results selector + search + tabs) */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.results-ctl { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.results-ctl .select {
  height: 38px; width: auto; padding: 0 34px 0 12px; font-size: 13px; font-weight: 600;
}
.table-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 9px;
  background: #fdfcfa; border: 1px solid var(--line);
  border-radius: var(--radius); height: 40px; padding: 0 13px; width: 248px;
}
.table-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(212,175,55,.14); background: #fff; }
.table-search svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.table-search input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 13px; width: 100%; color: var(--ink); }

/* Status filter tabs */
.tabs { position: relative; display: flex; gap: 4px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.tabs button {
  position: relative; z-index: 1;
  border: none; background: transparent; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: color .3s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
  padding: 7px 15px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .14s, color .14s, box-shadow .14s;
}
.tabs button .cnt {
  font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 10px;
  background: rgba(20,34,78,.08); color: var(--ink-2);
}
.tabs button.on { background: transparent; color: var(--navy-700); }
.tabs button:active { transform: scale(.95); }
.tabs button.on .cnt { background: var(--gold-soft); color: var(--gold-700); }

/* ===== Liquid glass sliding thumb (seg + tabs) ===== */
.tab-thumb {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 8px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.98), rgba(255,255,255,.78));
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow:
    0 4px 12px -4px rgba(20,34,78,.22),
    0 1px 2px rgba(20,34,78,.10),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -2px 4px rgba(180,150,90,.10);
  overflow: hidden;
  transition:
    left .46s cubic-bezier(.34,1.46,.5,1),
    width .46s cubic-bezier(.34,1.46,.5,1),
    transform .3s cubic-bezier(.34,1.56,.64,1),
    opacity .3s ease;
}
.tab-thumb::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 8px 8px 30% 30% / 8px 8px 100% 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,.9), rgba(255,255,255,0));
}
.tab-thumb::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -45%;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.7), transparent);
  opacity: 0;
}
.tab-thumb.show { opacity: 1; }
.tab-thumb.is-moving { transform: scaleY(1.05); }
.tab-thumb.is-moving::after { animation: thumbSweep .55s cubic-bezier(.4,0,.2,1); }
@keyframes thumbSweep {
  0% { left: -45%; opacity: 0; }
  35% { opacity: 1; }
  100% { left: 125%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-thumb { transition: opacity .2s ease; }
  .tab-thumb.is-moving { transform: none; }
  .tab-thumb.is-moving::after { animation: none; }
}

/* ===== Clay morphism — data card revealed by tabs ===== */
.clay-card {
  background: linear-gradient(150deg, #fdfbf6 0%, #f2ece1 100%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow:
    14px 16px 34px -14px rgba(40,52,90,.20),
    -10px -10px 24px rgba(255,255,255,.85),
    inset 0 1px 0 rgba(255,255,255,.8),
    inset 0 -3px 8px rgba(120,90,40,.05);
}
.clay-card .table-toolbar {
  background: transparent;
}
.clay-card .table-scroll {
  margin: 0 12px 4px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 0 0 1px rgba(255,255,255,.5),
    0 2px 10px -4px rgba(40,52,90,.12);
}
.clay-card .table-foot {
  background: transparent;
}
/* soft clay row hover inside clay cards */
.clay-card tbody tr { transition: background .2s ease, transform .2s ease; }
.clay-card tbody tr:hover {
  background: linear-gradient(90deg, rgba(212,175,55,.07), rgba(212,175,55,.02));
}

/* ===== Smooth content fade when a tab/filter changes ===== */
@keyframes tabFade {
  from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.tab-fade { animation: tabFade .4s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) {
  .tab-fade { animation: none; }
}

/* ===== points-tabs: glassy sheen + smoother ===== */
.points-tab { position: relative; overflow: hidden; transition: background .3s ease, color .3s ease, box-shadow .35s cubic-bezier(.34,1.42,.5,1), transform .2s cubic-bezier(.34,1.56,.64,1); }
.points-tab:active { transform: scale(.96); }
.points-tab.on::before {
  content: '';
  position: absolute;
  inset: 0 0 55% 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.3), rgba(255,255,255,0));
  pointer-events: none;
}

/* Filter bar (betting history) */
.filter-bar {
  display: flex; align-items: flex-end; gap: 14px;
  padding: 20px 24px; border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.filter-bar .field { gap: 6px; }
.filter-bar .field label { font-size: 10.5px; }
.filter-bar .input, .filter-bar .select { height: 42px; }
.filter-bar .fb-input { width: 200px; }
.filter-bar .fb-date { width: 180px; }
.filter-bar .fb-select { width: 160px; }
.filter-bar .fb-actions { display: flex; gap: 10px; margin-left: auto; }
.filter-bar .btn { height: 42px; }

/* The table */
.table-scroll { overflow-x: auto; }
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}
table.data thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--navy-600);
  padding: 14px 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data thead th.sortable { cursor: pointer; user-select: none; }
table.data thead th .th-in { display: inline-flex; align-items: center; gap: 6px; }
table.data thead th .sort {
  width: 13px; height: 13px; color: var(--ink-faint); flex-shrink: 0;
}
table.data thead th.sortable:hover .sort { color: var(--gold-600); }
table.data tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
  vertical-align: middle;
}
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #fdfbf6; }
table.data tbody tr:last-child td { border-bottom: none; }
/* The games/markets table is dense (9 columns); tighten its horizontal cell
   padding so the Actions column fits at laptop widths instead of overflowing
   and clipping (R13-10). Scoped to gameslist so other tables are untouched. */
table[data-table="gameslist"] thead th,
table[data-table="gameslist"] tbody td { padding-left: 12px; padding-right: 12px; }
table[data-table="gameslist"] tbody td { padding-top: 12px; padding-bottom: 12px; }
table.data .t-id { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
table.data .t-strong { color: var(--ink); font-weight: 600; }
table.data .t-mono { font-family: 'Plus Jakarta Sans', monospace; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
table.data .t-amount { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
table.data .t-muted { color: var(--ink-3); }
table.data .t-pos { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
table.data .t-neg { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }

/* payment details cell */
.pay-detail { white-space: normal; line-height: 1.65; font-size: 12.5px; min-width: 230px; }
.pay-detail .pd-row { color: var(--ink-3); }
.pay-detail .pd-row b { color: var(--ink); font-weight: 600; }
.pay-mode {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--navy-700);
  background: rgba(28,47,99,.07); border-radius: 6px; padding: 2px 8px; margin-bottom: 4px;
}

/* status badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  padding: 4px 11px 4px 9px; border-radius: 20px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.approved, .badge.win { color: var(--green); background: rgba(47,158,98,.12); }
.badge.pending { color: #b07a16; background: rgba(212,162,55,.16); }
.badge.declined, .badge.loss { color: var(--red); background: rgba(207,77,77,.12); }

/* row action buttons */
.row-actions { display: inline-flex; gap: 6px; }
.row-btn {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  transition: all .14s;
}
.row-btn svg { width: 16px; height: 16px; }
.row-btn:hover { border-color: var(--gold-400); color: var(--navy-700); }
.row-btn.danger:hover { border-color: var(--red); color: var(--red); background: rgba(207,77,77,.06); }
.row-link { color: var(--navy-600); font-weight: 600; text-decoration: none; font-size: 12.5px; }
.row-link:hover { color: var(--gold-700); text-decoration: underline; }
/* Text action button (e.g. "Void" in betting history). .row-btn is a fixed
   32×32 icon button, so text content cramped it — this auto-sizes with padding. */
.ag-void-btn {
  height: 30px; padding: 0 15px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(207,77,77,.35); background: rgba(207,77,77,.07);
  color: var(--red); font: 700 12px/1 inherit; letter-spacing: .2px; white-space: nowrap;
  transition: all .14s;
}
.ag-void-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* banner thumbnail */
.banner-thumb {
  width: 120px; height: 52px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  display: grid; place-items: center; flex-shrink: 0;
}
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* table footer / pagination */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
}
.foot-info { font-size: 12.5px; color: var(--ink-3); }
.foot-info b { color: var(--ink-2); font-weight: 600; }
.pager { display: flex; align-items: center; gap: 6px; }
.pager button {
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  display: grid; place-items: center;
}
.pager button svg { width: 16px; height: 16px; }
.pager button:hover:not(:disabled) { border-color: var(--gold-400); color: var(--navy-700); }
.pager button.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* empty row */
.table-empty { text-align: center; padding: 54px 20px; color: var(--ink-3); }
.table-empty .te-ico {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--paper-2); color: var(--ink-faint);
}
.table-empty .te-ico svg { width: 26px; height: 26px; }
.table-empty h4 { margin: 0 0 5px; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.table-empty p { margin: 0; font-size: 13px; }

/* hidden row helper */
tr.hidden-row { display: none; }

/* ===== Manual Result / Jantri ===== */
.result-toolbar { display: flex; align-items: center; gap: 16px; background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow), var(--glass-inset); padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.btn-danger { background: var(--card); border-color: rgba(207,77,77,.4); color: var(--red); }
.btn-danger:hover { background: rgba(207,77,77,.06); border-color: var(--red); }
.date-pick { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.date-pick input { height: 42px; width: 180px; }
.counter-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--navy-800); color: #fff; padding: 8px 15px; border-radius: 11px; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.counter-chip .cc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 0 4px rgba(212,175,55,.2); }
.counter-chip .cc-label { font-size: 11px; color: #9aa4c8; font-weight: 600; letter-spacing: .5px; }
.counter-chip .cc-time { font-family: 'Marcellus', serif; font-size: 17px; }
.game-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--navy-700); background: var(--gold-soft); border: 1px solid var(--gold-200); padding: 4px 12px; border-radius: 20px; letter-spacing: .3px; }
.digit-entry { max-width: 460px; }
.digit-input { font-family: 'Marcellus', serif !important; font-size: 26px !important; letter-spacing: 8px; text-align: center; height: 64px !important; }
.note-box { margin-top: 14px; background: linear-gradient(135deg, #eef2fb, #f6f4ee); border: 1px solid #dde3f1; border-radius: var(--radius); padding: 14px 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.note-box b { color: var(--navy-700); }
.note-box .nb-title { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--navy-700); margin-bottom: 6px; }
.note-box .nb-title svg { width: 16px; height: 16px; color: var(--gold-600); }
.note-box ul { margin: 4px 0 0; padding-left: 18px; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.switch { position: relative; width: 44px; height: 25px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; cursor: pointer; background: var(--line); border-radius: 20px; transition: background .18s; }
.switch .track::before { content: ''; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::before { transform: translateX(19px); }
.switch-row .sw-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.filter-strip { display: flex; align-items: center; gap: 12px; background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow), var(--glass-inset); padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-strip .fs-label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.filter-strip .input { width: 200px; height: 42px; }
.filter-strip .btn { height: 42px; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #288954; }
.btn-slate { background: var(--navy-600); color: #fff; }
.btn-slate:hover { background: var(--navy-500); }
.jantri-head { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(100deg, var(--navy-700), var(--navy-900)); color: #fff; padding: 13px 20px; border-radius: var(--radius) var(--radius) 0 0; }
.jantri-head h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .4px; }
.jantri-head .jh-total { font-size: 13px; color: var(--gold-400); font-weight: 700; }
.jantri-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: none; }
.jcell { background: #fff; aspect-ratio: 1.5 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: background .12s; padding: 4px; }
.jcell:hover { background: var(--gold-soft); }
.jcell.has-bet { background: #fbf6e8; }
.jcell .jn { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.jcell .ja { font-size: 10px; font-weight: 700; color: var(--gold-700); margin-top: 1px; min-height: 12px; }
.jcell.has-bet .jn { color: var(--navy-700); }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.ab-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.ab-head { background: linear-gradient(100deg, var(--gold-600), var(--gold-700)); color: #fff; padding: 11px 18px; font-size: 12.5px; font-weight: 700; letter-spacing: .4px; text-align: center; }
.ab-head .en { opacity: .8; font-weight: 600; }
.ab-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); }
.ab-cell-num { background: #fff; padding: 14px 6px; text-align: center; font-family: 'Marcellus', serif; font-size: 18px; color: var(--ink); cursor: pointer; transition: background .12s; }
.ab-cell-num:hover { background: var(--gold-soft); color: var(--gold-700); }
.badge.active { color: var(--green); background: rgba(47,158,98,.12); }
.badge.disabled { color: #b07a16; background: rgba(212,162,55,.16); }
.btn-pill { height: 30px; padding: 0 14px; font-size: 12px; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.btn-pill.update { background: rgba(47,158,98,.12); color: var(--green); }
.btn-pill.update:hover { background: var(--green); color: #fff; }
/* ===== Type tags / chips ===== */
.type-tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; white-space: nowrap; letter-spacing: .2px; }
.type-tag.blue { color: var(--navy-700); background: rgba(44,95,209,.12); }
.type-tag.gold { color: var(--gold-700); background: var(--gold-soft); border: 1px solid var(--gold-200); }
/* extra activity-feed event colours (R13-9) */
.type-tag.green { color: #15803d; background: rgba(22,163,74,.12); }
.type-tag.red { color: #b91c1c; background: rgba(220,38,38,.12); }
.type-tag.purple { color: #6d28d9; background: rgba(124,58,237,.12); }
.type-tag.slate { color: #475569; background: rgba(100,116,139,.14); }
.badge.verified { color: var(--green); background: rgba(47,158,98,.12); }
.badge.expired { color: #6d46c7; background: rgba(109,70,199,.12); }
.otp-chip { display: inline-block; font-family: 'Plus Jakarta Sans', monospace; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 3px; font-size: 13.5px; color: var(--navy-700); background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; }
.btn-read { height: 32px; padding: 0 16px; font-size: 12px; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; background: rgba(47,158,98,.12); color: var(--green); transition: all .14s; }
.btn-read:hover { background: var(--green); color: #fff; }
.btn-read svg { width: 14px; height: 14px; }
.btn-read.is-read { background: var(--paper-2); color: var(--ink-3); cursor: default; }
.btn-read.is-read:hover { background: var(--paper-2); color: var(--ink-3); }

/* ===== Wave 6: bet-history click-to-expand detail ===== */
.ag-bet-expand { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: inherit; color: var(--navy-700); background: transparent; border: none; padding: 2px 4px; margin: -2px -4px; border-radius: 7px; cursor: pointer; text-align: left; }
.ag-bet-expand:hover { background: rgba(44,95,209,.08); }
.ag-bet-expand .ag-chev { width: 14px; height: 14px; transition: transform .18s; flex: 0 0 auto; opacity: .7; }
.ag-bet-expand.open .ag-chev { transform: rotate(180deg); }
.ag-bet-detail { padding: 12px 16px 16px; }
.ag-bet-detail-head { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }
.ag-bet-detail-head b { color: var(--ink); }
table.ag-bet-legs { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.ag-bet-legs th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--ink-3); padding: 8px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
table.ag-bet-legs td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,.05); }
table.ag-bet-legs tr:last-child td { border-bottom: none; }
table.ag-bet-legs .t-amount { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== Wave 6: KYC review page ===== */
.kyc-docs { display: flex; gap: 8px; align-items: flex-start; }
.kyc-thumb { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: none; background: transparent; cursor: pointer; font-family: inherit; }
.kyc-thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); transition: border-color .14s, transform .14s; }
.kyc-thumb:hover img { border-color: var(--gold-400); transform: scale(1.04); }
.kyc-thumb span { font-size: 10.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .2px; }
.kyc-doc-none { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 8px; border: 1px dashed var(--line); color: var(--ink-3); font-weight: 700; }
.kyc-actions { display: inline-flex; gap: 8px; justify-content: flex-end; }
.kyc-reason { margin-top: 4px; font-size: 11px; color: var(--red); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc-cell { white-space: normal; max-width: 360px; line-height: 1.55; color: var(--ink-2); }
.desc-cell b { color: var(--ink); font-weight: 600; }
.records-tag { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-left: 8px; }

/* ===== Row action pills (accept/reject/decline) ===== */
.act-pills { display: inline-flex; gap: 8px; }
.act-pill { height: 32px; padding: 0 16px; font-size: 12.5px; font-weight: 700; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; transition: all .14s; white-space: nowrap; }
.act-pill svg { width: 14px; height: 14px; }
.act-pill.accept { background: rgba(47,158,98,.12); color: var(--green); }
.act-pill.accept:hover { background: var(--green); color: #fff; }
.act-pill.reject { background: rgba(207,77,77,.1); color: var(--red); }
.act-pill.reject:hover { background: var(--red); color: #fff; }
.act-pill.done { background: var(--paper-2); color: var(--ink-3); cursor: default; pointer-events: none; }
.t-acno { font-family: 'Plus Jakarta Sans', monospace; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2); letter-spacing: .2px; }
.screenshot-link { display: inline-flex; align-items: center; gap: 7px; color: var(--navy-600); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.screenshot-link:hover { color: var(--gold-700); }
.screenshot-link .ss-thumb { width: 38px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper-2); display: grid; place-items: center; color: var(--ink-faint); }
.screenshot-link .ss-thumb svg { width: 16px; height: 16px; }

/* ===== Rich text editor (mock) ===== */
.rte { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 7px 10px; border-bottom: 1px solid var(--line-2); background: var(--paper); }
.rte-btn { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; border: none; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; transition: background .12s, color .12s; }
.rte-btn:hover { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-sm); }
.rte-btn svg { width: 15px; height: 15px; }
.rte-btn.has-caret { width: auto; padding: 0 8px; gap: 4px; }
.rte-btn.has-caret .ca { width: 8px; height: 8px; opacity: .5; }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 5px; }
.rte-body { padding: 16px 18px; min-height: 150px; max-height: 280px; overflow-y: auto; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.rte-body[contenteditable]:focus { outline: none; }
.rte-body h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); font-weight: 700; }
.rte-body p { margin: 0 0 10px; }
.rte-body ul { margin: 0 0 10px; padding-left: 20px; }
.rte-body li { margin-bottom: 5px; }
.rte-body .hl { background: var(--gold-soft); padding: 0 3px; border-radius: 3px; }
.rte-body strong { color: var(--ink); }
/* settings divider with section label */
.settings-section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.settings-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.settings-section > .ss-title { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: var(--navy-700); letter-spacing: .3px; margin-bottom: 4px; }
.settings-section > .ss-title svg { width: 17px; height: 17px; color: var(--gold-600); }
.settings-section > .ss-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 18px; }
.full-row { grid-column: 1 / -1; }

/* ===== User detail (view user) ===== */
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line-2); }
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-key { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.detail-row .dr-val { font-size: 13.5px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-row .dr-val.mono { font-family: 'Plus Jakarta Sans', monospace; }
.yn-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 5px 14px; border-radius: 7px; letter-spacing: .3px; }
.yn-badge.yes { color: #fff; background: var(--green); }
.yn-badge.no { color: #fff; background: var(--red); }
.wallet-hero { text-align: center; padding: 30px 20px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 4px 0 22px; }
.wallet-hero .wh-label { font-family: 'Marcellus', serif; font-size: 26px; color: var(--ink); letter-spacing: .3px; }
.wallet-hero .wh-amount { margin-top: 12px; font-family: 'Marcellus', serif; font-size: 40px; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.wallet-hero .wh-amount .pts { font-size: 22px; color: var(--gold-700); margin-left: 8px; }
.points-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.points-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 10px; font-size: 13px; font-weight: 700; font-family: inherit; border: none; cursor: pointer; transition: filter .12s, box-shadow .14s; }
.points-tab svg { width: 15px; height: 15px; }
.points-tab.add { background: rgba(47,158,98,.13); color: var(--green); }
.points-tab.add.on { background: var(--green); color: #fff; box-shadow: 0 8px 18px -8px rgba(47,158,98,.6); }
.points-tab.debit { background: rgba(207,77,77,.12); color: var(--red); }
.points-tab.debit.on { background: var(--red); color: #fff; box-shadow: 0 8px 18px -8px rgba(207,77,77,.55); }
.points-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fdfcfa; }
.points-panel[hidden] { display: none; }
.points-panel h3 { margin: 0 0 14px; font-family: 'Marcellus', serif; font-size: 20px; color: var(--ink); }
.points-panel .pp-row { display: flex; gap: 12px; align-items: stretch; max-width: 560px; }
.points-panel .pp-row .input-wrap { flex: 1; }
.points-panel .pp-btn { height: 46px; padding: 0 26px; border-radius: 10px; font-size: 13.5px; font-weight: 700; font-family: inherit; border: none; cursor: pointer; color: #fff; transition: filter .12s; white-space: nowrap; }
.points-panel .pp-btn:hover { filter: brightness(1.06); }
.points-panel .pp-btn.add { background: var(--green); }
.points-panel .pp-btn.debit { background: var(--red); }
.contact-btns { display: flex; gap: 12px; margin-top: 4px; }
.contact-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #fff; border: none; cursor: pointer; font-family: inherit; transition: filter .12s, transform .12s; }
.contact-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.contact-btn svg { width: 16px; height: 16px; }
.contact-btn.wa { background: #25a861; }
.contact-btn.call { background: var(--blue); }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--gold-700); margin: 26px 0 6px; }

/* ===== User table — contacts / wallet ===== */
.contact-cell { display: inline-flex; align-items: center; gap: 8px; }
.contact-cell .num { font-family: 'Plus Jakarta Sans', monospace; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ico-btn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; transition: transform .12s, filter .12s; }
.ico-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.ico-btn svg { width: 15px; height: 15px; color: #fff; }
.ico-btn.wa { background: #25a861; }
.ico-btn.call { background: var(--blue); }
.ico-btn.history { background: var(--blue); }
.wallet-cell { display: inline-flex; align-items: center; gap: 12px; }
.wallet-cell .bal { font-family: 'Marcellus', serif; font-size: 18px; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.wallet-cell .bal.pos { color: var(--gold-700); }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 16px; border-radius: 8px; font-size: 12px; font-weight: 700; font-family: inherit; border: none; cursor: pointer; letter-spacing: .2px; transition: filter .12s; }
.pill-btn:hover { filter: brightness(1.05); }
.pill-btn svg { width: 13px; height: 13px; }
.pill-btn.view { background: rgba(47,158,98,.13); color: var(--green); }
.pill-btn.view:hover { background: var(--green); color: #fff; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 5px 13px; border-radius: 20px; letter-spacing: .2px; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.active { color: var(--green); background: rgba(47,158,98,.12); }
.status-pill.blocked { color: var(--red); background: rgba(207,77,77,.12); }
/* wallet history txn badges */
.txn-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 6px; letter-spacing: .5px; text-transform: uppercase; }
.txn-badge.credit { color: #fff; background: var(--green); }
.txn-badge.debit { color: #fff; background: var(--red); }
.amt-pos { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.amt-neg { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
.user-ref { line-height: 1.4; }
.user-ref .ur-id { font-size: 12.5px; font-weight: 700; color: var(--navy-700); }
.user-ref .ur-name { font-size: 12.5px; color: var(--ink); }
.user-ref .ur-phone { font-size: 11.5px; color: var(--ink-3); font-family: 'Plus Jakarta Sans', monospace; }
.dt-cell { line-height: 1.4; }
.dt-cell .dt-date { font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dt-cell .dt-time { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ===== Staff permissions ===== */
.perm-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.perm-section > h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.perm-section > p { margin: 0 0 18px; font-size: 12.5px; color: var(--ink-3); }
.perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 28px; }
.perm-col { display: flex; flex-direction: column; gap: 12px; }
.perm-col .pc-title { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--gold-700); }
.perm-col .pc-title svg { width: 14px; height: 14px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding: 2px 0; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 19px; height: 19px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--line); background: #fdfcfa; display: grid; place-items: center; transition: all .14s; }
.check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: all .14s; }
.check input:checked + .box { background: linear-gradient(140deg, var(--gold-500), var(--gold-700)); border-color: var(--gold-600); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(212,175,55,.25); }
.check .ck-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.check:hover .box { border-color: #d6cdb8; }
.perm-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.perm-toolbar .pt-link { font-size: 12px; font-weight: 600; color: var(--navy-700); background: none; border: none; cursor: pointer; font-family: inherit; padding: 6px 12px; border-radius: 8px; transition: background .14s; }
.perm-toolbar .pt-link:hover { background: var(--paper-2); }
.perm-toolbar .pt-count { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.perm-toolbar .pt-count b { color: var(--gold-700); }

/* ===== Quick filter chips + legend (result chart) ===== */
.quick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.quick-row .qr-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.chip { font-size: 12px; font-weight: 600; color: var(--navy-700); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 7px 15px; cursor: pointer; font-family: inherit; transition: all .14s; }
.chip:hover { border-color: var(--gold-400); background: var(--gold-soft); }
.chip.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.legend-row { display: flex; align-items: center; justify-content: center; gap: 26px; }
.legend-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.legend-item .sw { width: 16px; height: 16px; border-radius: 5px; }
.sw.complete { background: rgba(47,158,98,.18); border: 1px solid rgba(47,158,98,.4); }
.sw.pending { background: var(--gold-soft); border: 1px solid var(--gold-200); }

/* result chart grid */
.chart-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.chart-table thead th { position: sticky; top: 0; z-index: 2; background: linear-gradient(160deg, var(--navy-600), var(--navy-800)); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 14px 10px; text-align: center; }
.chart-table thead th:first-child { text-align: left; padding-left: 22px; border-top-left-radius: var(--radius); }
.chart-table thead th:last-child { border-top-right-radius: var(--radius); }
.chart-table tbody td { padding: 13px 10px; text-align: center; font-family: 'Marcellus', serif; font-size: 17px; letter-spacing: 1px; color: var(--navy-700); border-bottom: 1px solid var(--line-2); }
.chart-table tbody td.rc-date { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; padding-left: 22px; white-space: nowrap; }
.chart-table tbody tr:nth-child(even) td.rc-date { background: var(--paper); }
.chart-table td.rc-cell { background: var(--gold-soft); position: relative; }
.chart-table td.rc-cell.done { background: rgba(47,158,98,.1); color: var(--green); }
.chart-table tbody tr:hover td { background: rgba(212,175,55,.14); }
.chart-table tbody tr:hover td.rc-cell.done { background: rgba(47,158,98,.18); }
.chart-stats { display: flex; flex-wrap: wrap; gap: 32px; padding: 18px 22px; border-top: 1px solid var(--line-2); }
.chart-stats .cs-item { font-size: 13px; color: var(--ink-3); }
.chart-stats .cs-item b { color: var(--ink); font-weight: 700; }
.chart-stats .cs-title { font-family: 'Marcellus', serif; font-size: 16px; color: var(--gold-700); margin-right: 8px; }

/* ===== Push notification builder ===== */
.push-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.cron-box { background: linear-gradient(135deg, #eef2fb, #f6f4ee); border: 1px solid #dde3f1; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px; }
.cron-box .cb-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--navy-700); letter-spacing: .4px; text-transform: uppercase; }
.cron-box .cb-title svg { width: 16px; height: 16px; color: var(--gold-600); }
.cron-box .cb-url { margin-top: 10px; font-family: 'Plus Jakarta Sans', monospace; font-size: 12px; color: var(--navy-600); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; word-break: break-all; }
.cron-box .cb-note { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: #fdfcfa; transition: all .14s; }
.radio-card:hover { border-color: #d6cdb8; }
.radio-card.on { border-color: var(--gold-500); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(212,175,55,.14); }
.radio-card .rc-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; transition: border-color .14s; }
.radio-card.on .rc-dot { border-color: var(--gold-600); }
.radio-card.on .rc-dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-600); }
.radio-card .rc-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.radio-card .rc-sub { font-size: 11px; color: var(--ink-3); }
/* preview */
.preview-card { background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow), var(--glass-inset); overflow: hidden; position: sticky; top: 88px; }
.preview-card .pc-head { padding: 16px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.preview-card .pc-head svg { width: 16px; height: 16px; color: var(--gold-600); }
.preview-card .pc-body { padding: 18px; }
.notif-preview { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fdfcfa; }
.notif-preview .np-ico { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; background: linear-gradient(140deg, var(--navy-600), var(--navy-900)); color: var(--gold-400); display: grid; place-items: center; }
.notif-preview .np-ico svg { width: 20px; height: 20px; }
.notif-preview .np-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.notif-preview .np-msg { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.tips-box { margin-top: 16px; background: var(--gold-soft); border: 1px solid var(--gold-200); border-radius: var(--radius); padding: 14px 16px; }
.tips-box .tb-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--gold-700); letter-spacing: .3px; }
.tips-box .tb-title svg { width: 15px; height: 15px; }
.tips-box ul { margin: 9px 0 0; padding-left: 18px; }
.tips-box li { font-size: 12px; color: var(--ink-2); line-height: 1.75; }
.badge.instant { color: var(--navy-700); background: rgba(44,95,209,.12); }
.badge.scheduled { color: #7a5cc0; background: rgba(122,92,192,.14); }
.badge.daily { color: #b07a16; background: rgba(212,162,55,.16); }
.badge.sent { color: var(--green); background: rgba(47,158,98,.12); }
@media (max-width: 980px) { .push-grid { grid-template-columns: 1fr; } .preview-card { position: static; } }

/* ===== Modal ===== */
.modal-scrim { position: fixed; inset: 0; z-index: 70; background: radial-gradient(60% 50% at 50% 40%, rgba(40,52,90,.34), rgba(12,22,51,.5)); -webkit-backdrop-filter: blur(9px) saturate(140%); backdrop-filter: blur(9px) saturate(140%); display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .26s; }
.modal-scrim.show { opacity: 1; pointer-events: auto; }
.modal { position: relative; background: linear-gradient(155deg, rgba(255,255,255,.82), rgba(255,255,255,.66)); -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg); box-shadow: 0 30px 70px -22px rgba(20,34,78,.5), var(--glass-inset); width: 440px; max-width: 100%; transform: translateY(16px) scale(.96); transition: transform .3s cubic-bezier(.34,1.46,.5,1); overflow: hidden; }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 40%; background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent); pointer-events: none; }
.modal-scrim.show .modal { transform: none; }
/* wide modal for the staff permissions editor */
.modal.modal-wide { width: 760px; }
.modal-body.spm-body { text-align: left; padding: 20px 22px; max-height: 60vh; overflow-y: auto; }
.modal-body.spm-body .spm-hint { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px; border-top: 1px solid rgba(255,255,255,.5); }
@media (max-width: 820px) { .modal.modal-wide { width: 100%; } .modal-body.spm-body .perm-grid { grid-template-columns: repeat(2, 1fr); } }
.modal-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.5); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.modal-head .m-close { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; display: grid; place-items: center; color: var(--ink-3); transition: all .14s; }
.modal-head .m-close:hover { border-color: var(--red); color: var(--red); }
.modal-head .m-close svg { width: 16px; height: 16px; }
.modal-body { position: relative; padding: 30px 22px; text-align: center; }
.modal-body .mb-ico { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--glass-inset); color: var(--gold-700); }
.modal-body .mb-ico svg { width: 26px; height: 26px; }
.modal-body p { margin: 0; font-size: 14px; color: var(--ink-2); }
.modal-body .mb-num { font-family: 'Marcellus', serif; color: var(--navy-700); }

/* ---------------- Pages ---------------- */
.page { display: none; }
.page.active { display: block; animation: pageIn .42s cubic-bezier(.22,.61,.36,1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px) scale(.992); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}

/* toast */
.toast {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(150deg, rgba(28,42,86,.78), rgba(16,26,58,.72));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  color: #fff;
  padding: 14px 18px; border-radius: 14px;
  box-shadow: 0 22px 50px -18px rgba(8,16,40,.6), inset 0 1px 0 rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  transform: translateY(140%); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.9,.2,1), opacity .3s;
}
.toast.show { transform: none; opacity: 1; }
.toast .tk {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--gold-400), var(--gold-600));
  color: var(--navy-900);
}
.toast .tk svg { width: 18px; height: 18px; }
.toast .tt { font-weight: 600; font-size: 13.5px; }
.toast .ts { font-size: 12px; color: #aeb6d4; margin-top: 1px; }

/* scrim for mobile sidebar */
.scrim {
  position: fixed; inset: 0; background: rgba(12,22,51,.5);
  z-index: 25; opacity: 0; pointer-events: none; transition: opacity .25s;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar .fb-input, .filter-bar .fb-date, .filter-bar .fb-select { width: 100%; }
  .filter-bar .field { flex: 1 1 140px; }
  .filter-bar .fb-actions { margin-left: 0; width: 100%; }
  .filter-bar .fb-actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
  }
  .app.mobile-open .sidebar { transform: none; }
  .app.mobile-open .scrim { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: grid; }
  .sidebar-foot { display: none; }
  .search { width: 100%; }
  .profile-meta { display: none; }
}


/* ===== Route loader (logo splash on tab switch) ===== */
.route-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(40,52,90,.42), transparent 70%),
    rgba(12,20,46,.40);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .26s ease, visibility .26s ease;
}
.route-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.rl-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 34px 46px 30px;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(255,255,255,.95), rgba(246,242,234,.88));
  border: 1px solid rgba(255,255,255,.85);
  box-shadow:
    0 40px 90px -30px rgba(8,16,40,.6),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(10px) scale(.97);
  transition: transform .34s cubic-bezier(.34,1.46,.5,1);
  position: relative;
  overflow: hidden;
}
.route-loader.show .rl-plate { transform: none; }
.rl-plate::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-12deg);
}
.route-loader.show .rl-plate::after { animation: rlSheen 1s ease-in-out .1s infinite; }
@keyframes rlSheen {
  0% { left: -60%; }
  60%, 100% { left: 130%; }
}
.rl-logo {
  width: auto;
  height: 160px;
  max-width: 60vw;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.16));
  animation: rlPulse 1.1s ease-in-out infinite;
}
@keyframes rlPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
.rl-bar {
  position: relative;
  width: 260px;
  max-width: 60vw;
  height: 5px;
  border-radius: 99px;
  background: rgba(20,34,78,.10);
  overflow: hidden;
}
.rl-bar span {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600), var(--gold-400));
  box-shadow: 0 0 12px rgba(199,154,58,.6);
  animation: rlSlide 1s cubic-bezier(.55,.1,.25,1) infinite;
}
@keyframes rlSlide {
  0% { left: -42%; }
  100% { left: 102%; }
}
.rl-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--navy-700);
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.rl-dots { display: inline-flex; }
.rl-dots i {
  font-style: normal;
  animation: rlDot 1.1s ease-in-out infinite;
}
.rl-dots i:nth-child(2) { animation-delay: .18s; }
.rl-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes rlDot {
  0%, 100% { opacity: .2; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rl-logo, .rl-bar span, .rl-plate::after, .rl-dots i { animation: none; }
  .rl-bar span { left: 0; width: 100%; }
}