/* =========================================================================
   TuniBet365 — Mobile-First Multi-Module iGaming Design System
   ("Obsidian & Emerald Neon" — Full LTR + RTL Support)
   ========================================================================= */

:root {
  --bg-base: #090c12;
  --bg-elev: #0f141e;
  --surface-1: #151c2a;
  --surface-2: #1c2536;
  --surface-3: #243046;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --primary: #00e785;
  --primary-hover: #1aff9c;
  --primary-ink: #04160e;
  --accent-cyan: #00b8ff;
  --accent-amber: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 9999px;

  --header-h: 60px;
  --bottom-nav-h: 64px;
  --sidebar-w: 250px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 8px 25px -6px rgba(0, 231, 133, 0.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  --font-ar: 'Cairo', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Crisp Arabic Typography (Cairo + IBM Plex Sans Arabic) & RTL polish */
html[lang="ar"], html[dir="rtl"] {
  --font: var(--font-ar) !important;
  font-family: var(--font-ar) !important;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[lang="ar"] body, html[dir="rtl"] body,
html[lang="ar"] button, html[dir="rtl"] button,
html[lang="ar"] input, html[dir="rtl"] input,
html[lang="ar"] select, html[dir="rtl"] select,
html[lang="ar"] textarea, html[dir="rtl"] textarea {
  font-family: var(--font-ar);
}
/* Arabic is cursive: prevent letter-spacing from disconnecting glyphs */
html[lang="ar"] :not([data-brand-logo]):not([data-brand-logo] *),
html[dir="rtl"] :not([data-brand-logo]):not([data-brand-logo] *) {
  letter-spacing: 0 !important;
}
html[lang="ar"] .num, html[dir="rtl"] .num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(800px 400px at 15% -5%, rgba(0, 231, 133, 0.07), transparent 60%),
    radial-gradient(700px 380px at 85% -5%, rgba(0, 184, 255, 0.06), transparent 60%),
    var(--bg-base);
  color: var(--text);
  overflow-x: clip;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Sticky Top Header (Mobile-First) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(9, 12, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
}

@media (min-width: 768px) {
  .topbar { padding: 0 20px; gap: 16px; }
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 10px !important;
    gap: 6px !important;
    max-width: 100%;
    overflow-x: clip;
  }
  .topbar-left, .topbar-right {
    gap: 5px !important;
  }
  .topbar-right .btn-sm {
    padding: 0 8px !important;
    height: 30px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }
  .brand, html[data-theme="bet365"] .brand {
    font-size: 15px !important;
    gap: 5px !important;
  }
  .brand small, .hide-xs {
    display: none !important;
  }
  .brand-mark, html[data-theme="bet365"] .brand-mark {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
  }
  .lang-select {
    height: auto !important;
    min-height: 0 !important;
    line-height: 16px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    flex-shrink: 0;
  }
  .wallet-badge {
    height: 30px !important;
    padding: 0 7px !important;
    gap: 4px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .wallet-amount {
    font-size: 11px !important;
    white-space: nowrap;
  }
  .topbar-right .btn-sm {
    min-height: 30px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    flex-shrink: 0;
  }
  #adminNavBtn, #resellerNavBtn, #logoutBtn {
    display: none !important;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: var(--primary-ink);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: var(--shadow-glow);
}

.brand em {
  font-style: normal;
  color: var(--primary);
}

/* Module Switcher Pills (Casino | Sportsbook) */
.module-switcher {
  display: none;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: var(--r-pill);
  gap: 2px;
}

@media (min-width: 640px) {
  .module-switcher { display: inline-flex; }
}

.module-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.module-tab.is-active {
  background: var(--surface-3);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Wallet Pill (Read-Only Balance + Opens Wallet Drawer) */
.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid rgba(0, 231, 133, 0.3);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.wallet-badge:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.wallet-amount {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Language & Theme Switcher */
.lang-select, .theme-select {
  height: auto;
  min-height: 0;
  line-height: 18px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  vertical-align: middle;
  color-scheme: dark;
  transition: all 0.15s ease;
}
.theme-select:hover, .lang-select:hover {
  border-color: var(--primary);
}

/* ---------- Buttons & Inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #00c470);
  color: var(--primary-ink);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: var(--primary-ink);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 6px; }

.input, .select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Native <select>: never use min-height with padding-block:0 (Chromium top-aligns text); use symmetric vertical padding */
select, select.select {
  height: auto !important;
  min-height: 0 !important;
  line-height: 20px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  padding-inline: 12px !important;
  color-scheme: dark;
  cursor: pointer;
  vertical-align: middle;
}
select option {
  background: #0f141e;
  color: #f1f5f9;
}

.input:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 231, 133, 0.15);
}

/* ---------- App Shell (Collapsible Sidebar + Main Stage) ---------- */
.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100dvh - var(--header-h));
  transition: grid-template-columns 0.22s ease;
}

@media (min-width: 1024px) {
  .app-shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-toggle-btn:hover {
  background: rgba(255, 223, 27, 0.18);
  border-color: var(--primary);
  color: var(--primary);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}

.sidebar {
  display: none;
  background: var(--bg-elev);
  border-inline-end: 1px solid var(--border);
  padding: 14px 10px;
  position: sticky;
  top: var(--header-h);
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.22s ease, padding 0.22s ease;
}

@media (min-width: 1024px) {
  .sidebar { display: flex; flex-direction: column; gap: 16px; }
  body.sidebar-collapsed .sidebar {
    padding: 14px 8px;
  }
  body.sidebar-collapsed .sidebar .nav-group-title,
  body.sidebar-collapsed .sidebar .nav-label {
    display: none;
  }
  body.sidebar-collapsed .sidebar .nav-item {
    justify-content: center;
    padding: 0;
    min-height: 44px;
  }
  body.sidebar-collapsed .sidebar .nav-ico {
    font-size: 19px;
  }
}

.sidebar.is-mobile-open {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: fixed;
  top: var(--header-h);
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  inset-inline-start: 0;
  width: min(290px, 84vw);
  z-index: 56;
  height: auto;
  box-shadow: 12px 0 36px rgba(0, 0, 0, 0.75);
}

.nav-ico {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

@media (max-width: 767px) {
  .hide-mobile-tabs {
    display: none !important;
  }
}

.nav-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 0 10px;
  margin-bottom: 6px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: start;
  transition: all 0.14s ease;
}

.nav-item:hover {
  background: var(--surface-1);
  color: var(--text);
}

.nav-item.is-active {
  background: rgba(0, 231, 133, 0.12);
  color: var(--primary);
  font-weight: 700;
}

.nav-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.nav-item.is-active .nav-badge {
  background: rgba(0, 231, 133, 0.2);
  color: var(--primary);
}

/* ---------- Main Stage ---------- */
.main-stage {
  padding: 14px 12px 32px;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .main-stage { padding: 22px 24px 48px; }
}

/* Notice Banner */
.notice-bar {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Hero Banner */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 260px at 85% 20%, rgba(0, 231, 133, 0.22), transparent 65%),
    radial-gradient(500px 240px at 15% 90%, rgba(0, 184, 255, 0.18), transparent 65%),
    linear-gradient(135deg, #121a28 0%, #0d131d 100%);
  border: 1px solid var(--border-strong);
  padding: 20px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 768px) {
  .hero-banner {
    flex-direction: row;
    align-items: center;
    padding: 28px 32px;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 231, 133, 0.14);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.hero-title span { color: var(--primary); }
.hero-sub { color: var(--text-muted); font-size: 13.5px; max-width: 560px; }

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-kpis {
    gap: 10px;
    width: auto;
    min-width: 340px;
    grid-template-columns: repeat(3, minmax(106px, auto));
  }
}

.hero-kpi {
  background: rgba(15, 20, 30, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 10px;
  text-align: center;
  min-width: 0;
}

.hero-kpi b {
  display: block;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
}

.hero-kpi span {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Filter, Search & Sort Control Bar ---------- */
.control-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 768px) {
  .control-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search-box input {
  padding-inline-start: 38px;
  padding-inline-end: 36px;
}

.search-icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Horizontal Swipeable Pills (Mobile-First) */
.pill-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pill-rail::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pill:hover {
  background: var(--surface-2);
  color: var(--text);
}

.pill.is-active {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.pill-count {
  font-size: 11px;
  opacity: 0.8;
}

/* ---------- Game Poster Grid (Mobile-First 2/3 cols -> Desktop 6 cols) ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 480px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (min-width: 768px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1200px) {
  .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
}

.game-card {
  position: relative;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 231, 133, 0.45);
  box-shadow: var(--shadow-card);
}

.game-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1b2436, #0f1522);
  overflow: hidden;
}

.game-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.game-card:hover .game-thumb-wrap img {
  transform: scale(1.06);
}

.game-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-muted);
}

.game-provider-tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(9, 12, 18, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 800;
  color: var(--text);
  z-index: 2;
}

.game-fav-btn {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(9, 12, 18, 0.82);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.15s;
}

.game-fav-btn.is-fav, .game-fav-btn:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 18, 0.76);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.18s ease;
  padding: 12px;
}

.game-card:hover .game-overlay,
.game-card:focus-within .game-overlay {
  opacity: 1;
}

.game-mobile-actions {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 5px;
  padding: 0 8px 8px;
}

@media (max-width: 768px), (hover: none) {
  .game-overlay {
    display: none;
  }
  .game-mobile-actions {
    display: grid;
  }
  .game-info {
    padding: 8px 10px 6px;
  }
}

.game-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.game-title {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Full Numbered Pagination Bar ---------- */
.pagination-bar {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 768px) {
  .pagination-bar { flex-direction: row; }
}

.pagination-info {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s;
}

.page-btn:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--primary);
}

.page-btn.is-active {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
}

.page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pagination-Jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-Jump input {
  width: 66px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 12px;
}
.pagination-Jump select {
  width: auto !important;
  min-width: 68px;
  height: auto !important;
  min-height: 0 !important;
  line-height: 18px !important;
  padding: 7px 10px !important;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 12.5px;
}

/* ---------- Tables, Cards & Badges ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

.kpi-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-val {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 11px 14px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(15, 20, 30, 0.6);
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge-green { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.badge-amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.badge-red { background: rgba(239, 68, 68, 0.16); color: #f87171; }
.badge-cyan { background: rgba(0, 184, 255, 0.16); color: #38bdf8; }
.badge-purple { background: rgba(168, 85, 247, 0.16); color: #c084fc; }

/* ---------- Modals & Drawers (Centered Responsive Dialogs) ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

@media (min-width: 640px) {
  .backdrop { padding: 20px; }
}

.modal {
  width: 100%;
  max-width: 440px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

@media (min-width: 640px) {
  .modal { max-width: 460px; padding: 24px; }
}

.modal-lg { max-width: 680px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-title { font-size: 17px; font-weight: 800; }

.close-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------- Mobile Fixed Bottom Navigation Bar ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 65;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(13, 18, 28, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.bottom-nav-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.bottom-nav-btn.is-active { color: var(--primary); }
.bottom-nav-icon { font-size: 18px; line-height: 1; }

/* ---------- Toast Stack ---------- */
.toast-stack {
  position: fixed;
  top: 72px;
  inset-inline-end: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-success { border-inline-start: 4px solid var(--primary); }
.toast-error { border-inline-start: 4px solid var(--danger); }

/* =========================================================================
   OFFICIAL BET365 THEME (data-theme="bet365")
   Mirrors casino.bet365.com/home (Casino) & www.bet365.com (Sportsbook)
   ========================================================================= */
html[data-theme="bet365"] {
  --bg-base: #181f1d;
  --bg-elev: #1e2624;
  --surface-1: #282828;
  --surface-2: #333333;
  --surface-3: #3d3d3d;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #e4e4e4;
  --text-muted: #a8a8a8;
  --text-faint: #757575;

  --primary: #ffdf1b;
  --primary-hover: #ffe74d;
  --primary-ink: #141414;
  --accent-cyan: #00ffb6;
  --accent-amber: #ffdf1b;
  --danger: #e53935;
  --success: #26a67e;

  --r-xs: 3px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-pill: 4px;

  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 2px 10px rgba(255, 223, 27, 0.25);
}

html[data-theme="bet365"] body {
  background: #181f1d;
}

html[data-theme="bet365"] .topbar {
  background: #126e51 !important;
  border-bottom: 1px solid #0b4f3a !important;
}

html[data-theme="bet365"] .brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #ffffff;
}

html[data-theme="bet365"] .brand-mark {
  background: #0b4f3a;
  color: #ffdf1b;
  border: 1px solid rgba(255, 223, 27, 0.4);
  box-shadow: none;
}

html[data-theme="bet365"] .brand em {
  color: #ffdf1b !important;
}

html[data-theme="bet365"] .module-switcher {
  background: #0b4f3a;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="bet365"] .module-tab {
  color: rgba(255, 255, 255, 0.82);
}

html[data-theme="bet365"] .module-tab.is-active {
  background: #126e51;
  color: #ffdf1b;
  border-bottom: 2px solid #ffdf1b;
  border-radius: 3px;
}

html[data-theme="bet365"] .nav-item.is-active {
  background: rgba(18, 110, 81, 0.35);
  color: #00ffb6;
  border-inline-start: 3px solid #ffdf1b;
}

/* Mobile Responsive Refinements for bet365 Header & Quick Menu Drawer */
@media (max-width: 767px) {
  .b365-product-nav {
    display: none !important;
  }
  html[data-theme="bet365"] .brand span {
    font-size: 18px !important;
  }
}

.mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  text-align: start;
}

.mobile-menu-link:hover, .mobile-menu-link.is-active {
  border-color: var(--primary);
  color: var(--primary);
}




/* Always-visible Mobile Quick Product Switcher (Default Theme) */
.tb-mob-switcher {
  display: none;
  position: sticky;
  top: var(--header-h, 58px);
  z-index: 39;
  height: 38px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #0b4f3a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
@media (max-width: 767px) {
  .tb-mob-switcher { display: grid; }
}
.tb-mob-sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  min-width: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 0 !important;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 767px) {
  .toast-stack { top: 102px; }
}
.tb-mob-sw-btn.is-active {
  color: #ffdf1b !important;
  background: rgba(255, 223, 27, 0.12) !important;
  border-bottom-color: #ffdf1b !important;
}
.adm-sw-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
  flex-shrink: 0;
}

/* Password Show/Hide Eye Toggle Wrapper (Shared across all themes) */
.pass-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-field-wrap .input {
  width: 100%;
  padding-inline-end: 42px;
}
.pass-toggle-btn {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.pass-toggle-btn:hover {
  color: var(--primary, #ffcd00);
  background: rgba(255, 255, 255, 0.06);
}
.pass-toggle-btn .ico-eye-off { display: none; }
.pass-toggle-btn.is-visible .ico-eye { display: none; }
.pass-toggle-btn.is-visible .ico-eye-off { display: block; }

/* Floating Back-to-Top Button */
.adm-back-top-btn {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 16px;
  z-index: 44;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--primary, #ffdf1b);
  background: rgba(15, 23, 42, 0.92);
  color: var(--primary, #ffdf1b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.adm-back-top-btn:hover {
  transform: translateY(-2px);
  background: var(--primary, #ffdf1b);
  color: #141414;
}
@media (min-width: 1024px) {
  .adm-back-top-btn { bottom: 24px; }
}

/* Floating Telegram Live Support Button (Opposite side from Back-to-Top, hidden on /sports) */
.tg-support-fab {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  inset-inline-start: 14px;
  z-index: 44;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2AABEE, #229ED9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tg-support-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 158, 217, 0.6);
  color: #ffffff;
}
@media (max-width: 639px) {
  .tg-support-fab {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  .tg-support-fab span { display: none; }
}
@media (max-width: 1023px) {
  body.layout-admiral:not(.is-auth) .tg-support-fab {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px));
  }
  body.layout-admiral.is-auth .tg-support-fab {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 1024px) {
  .tg-support-fab { bottom: 24px; }
}

/* SoftAggregator Nocturn Sport Full-Viewport Embed (Desktop & Mobile) */
body.is-sports-view .main-stage {
  padding: 0 !important;
  max-width: none !important;
}
body.is-sports-view.sb-iframe-active.sb-hide-header-balance #walletBtn {
  display: none !important;
}
@media (max-width: 1023px) {
  body.is-sports-view.sb-iframe-active.sb-hide-mobile-dock .bottom-nav {
    display: none !important;
  }
  body.is-sports-view.sb-iframe-active.sb-hide-mobile-dock {
    padding-bottom: 0 !important;
  }
}
.sa-sports-stage {
  width: 100%;
  margin: 0;
  padding: 0;
  background: #f3f5f8;
}
body.sb-theme-dark .sa-sports-stage {
  background: #0b0f15;
}
.sa-sports-bar {
  background: #001b40;
  border-bottom: 1px solid rgba(255, 205, 0, 0.28);
  padding: 0 12px;
  height: 38px;
}
.sa-sports-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}
.sa-sports-bar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-sports-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e785;
  box-shadow: 0 0 8px #00e785;
  flex-shrink: 0;
}
.sa-sports-iframe {
  display: block;
  width: 100%;
  height: calc(100dvh - var(--header-h, 58px));
  min-height: 440px;
  border: 0;
  background: #f3f5f8;
}
body.sb-theme-dark .sa-sports-iframe {
  background: #0b0f15;
}
body.sb-has-bar .sa-sports-iframe {
  height: calc(100dvh - var(--header-h, 58px) - 38px);
}
@media (max-width: 767px) {
  .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - 38px);
  }
  body.sb-has-bar .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - 38px - 38px);
  }
  body.is-sports-view:not(.sb-hide-mobile-dock) .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - 38px - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px));
  }
  body.is-sports-view.sb-has-bar:not(.sb-hide-mobile-dock) .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - 38px - 38px - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.is-sports-view:not(.sb-hide-mobile-dock) .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px));
  }
  body.is-sports-view.sb-has-bar:not(.sb-hide-mobile-dock) .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 58px) - 38px - var(--bottom-nav-h, 64px) - env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 1024px) {
  .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 62px));
    min-height: 680px;
  }
  body.sb-has-bar .sa-sports-iframe {
    height: calc(100dvh - var(--header-h, 62px) - 38px);
  }
}

/* ---------- High-Visibility Reseller Dashboard Quick Access (Default Theme) ---------- */
.reseller-quick-bar[hidden],
.wallet-reseller-banner[hidden] {
  display: none !important;
}
.reseller-quick-bar {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 223, 27, 0.18), rgba(18, 110, 81, 0.85));
  border: 1.5px solid rgba(255, 223, 27, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.reseller-quick-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 240px;
}
.reseller-quick-bar-ico {
  font-size: 22px;
  flex-shrink: 0;
}
.reseller-quick-bar-title {
  font-size: 14px;
  font-weight: 900;
  color: #ffdf1b;
}
.reseller-quick-bar-sub {
  font-size: 12px;
  color: #e6f4ef;
  margin-top: 2px;
}
.reseller-quick-bar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 7px;
  background: #ffdf1b;
  color: #141414;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 639px) {
  .reseller-quick-bar-cta { width: 100%; }
}
.wallet-reseller-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 223, 27, 0.15), rgba(18, 110, 81, 0.45));
  border: 1.5px solid rgba(255, 223, 27, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Ultra-Simple Phone-First Reseller POS Dashboard (Default Theme) ---------- */
.res-pos-hero {
  background: linear-gradient(135deg, rgba(18, 110, 81, 0.45), rgba(20, 28, 25, 0.96));
  border: 1.5px solid rgba(255, 223, 27, 0.45);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.res-pos-bal-lbl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.res-pos-bal-val { font-size: 28px; font-weight: 900; color: var(--primary); line-height: 1.15; margin-top: 2px; }
.res-pos-meta-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.res-pos-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.res-pos-hero-actions .btn { min-height: 42px; padding: 0 16px; font-size: 13.5px; font-weight: 800; }
@media (max-width: 639px) {
  .res-pos-hero-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .res-pos-hero-actions .btn { width: 100%; padding: 0 10px; font-size: 12.5px; }
}
.res-pending-alert {
  width: 100%;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  color: #fde68a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: start;
}
.res-pending-alert[hidden] { display: none !important; }
.res-phone-search-wrap { position: relative; margin-bottom: 14px; }
.res-phone-search-wrap .search-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-size: 17px; pointer-events: none; }
.res-phone-search-input { width: 100%; height: 48px; padding-inline-start: 44px !important; padding-inline-end: 42px !important; font-size: 15px !important; font-weight: 600; border-radius: 12px !important; }
.res-phone-search-clear { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; font-size: 13px; font-weight: 800; }
.res-phone-search-clear[hidden] { display: none !important; }
.res-players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.res-player-card { background: var(--surface-2, #18221f); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.res-player-card.is-frozen { border-color: rgba(248, 113, 113, 0.5); background: rgba(68, 20, 26, 0.5); }
.res-player-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.res-player-phone { font-size: 16.5px; font-weight: 900; color: #fff; line-height: 1.2; }
.res-player-user { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.res-player-bal { font-size: 18px; font-weight: 900; color: var(--primary); white-space: nowrap; text-align: end; }
.res-player-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.res-player-actions .btn { min-height: 40px; font-size: 13px; font-weight: 800; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.res-btn-topup { background: linear-gradient(135deg, #22c55e, #16a34a) !important; border-color: #22c55e !important; color: #041d0f !important; }
.res-btn-debit { background: rgba(239, 68, 68, 0.18) !important; border-color: rgba(248, 113, 113, 0.55) !important; color: #fca5a5 !important; }
.res-btn-info { padding: 0 13px !important; }
.res-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #f59e0b; color: #141414; font-size: 10.5px; font-weight: 900; margin-inline-start: 4px; }
.res-tab-badge[hidden] { display: none !important; }
.res-pos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 10px; }
.res-tx-card { background: var(--surface-2, #18221f); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; text-align: start; width: 100%; font-family: inherit; color: inherit; }
.res-tx-left { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.res-tx-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; flex-shrink: 0; }
.res-tx-ico.is-in { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.res-tx-ico.is-out { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.res-tx-title { font-size: 14.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-tx-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-tx-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.res-tx-amt { font-size: 15.5px; font-weight: 900; white-space: nowrap; }
.res-tx-amt.is-in { color: #4ade80; }
.res-tx-amt.is-out { color: #fbbf24; }
.res-tx-eye { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.res-simple-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.res-stat-tile { background: var(--surface-2, #18221f); border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 14px; padding: 16px; }
.res-stat-tile-lbl { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.res-stat-tile-val { font-size: 22px; font-weight: 900; color: #fff; line-height: 1.15; }
.res-stat-tile.is-wide { grid-column: 1 / -1; border-color: rgba(255, 223, 27, 0.45); }
.res-modal-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 13.5px; }
.res-modal-kv:last-child { border-bottom: 0; }
.res-modal-kv-k { color: var(--text-muted); font-weight: 600; }
.res-modal-kv-v { font-weight: 800; color: #fff; text-align: end; word-break: break-word; }

/* ---------- Admin Accounts & Resellers Mobile-First Touch-Screen POS ---------- */
.adm-pos-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.adm-pos-create-btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  border-radius: 12px;
}
.adm-pos-tool-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.adm-pos-tool-btns .btn {
  min-height: 42px;
  border-radius: 11px;
  font-weight: 800;
}
.adm-pos-risk-btn {
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}
@media (max-width: 560px) {
  .adm-pos-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .adm-pos-create-btn {
    width: 100%;
    min-height: 46px;
    font-size: 15px;
  }
  .adm-pos-tool-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .adm-pos-tool-btns .btn {
    width: 100%;
    justify-content: center;
  }
}

.adm-pos-role-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.adm-pos-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.85);
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.adm-pos-role-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0b1120;
}
.adm-pos-pill-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 900;
}
.adm-pos-role-pill.is-active .adm-pos-pill-cnt {
  background: rgba(0, 0, 0, 0.18);
  color: #0b1120;
}
@media (max-width: 600px) {
  .adm-pos-role-pills {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }
  .adm-pos-role-pill {
    min-height: 40px;
    font-size: 12.5px;
  }
}

.adm-pos-parent-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 223, 27, 0.14);
  border: 1px solid rgba(255, 223, 27, 0.45);
  color: #ffdf1b;
  font-size: 13px;
  font-weight: 800;
}
.adm-pos-parent-chip[hidden] { display: none !important; }

.adm-pos-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.adm-pos-mode-tab {
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.14s ease;
}
.adm-pos-mode-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0b1120;
}
.adm-pos-mode-tab.is-credit.is-active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #22c55e;
  color: #041d0f;
}
.adm-pos-mode-tab.is-debit.is-active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  color: #fff;
}

.adm-pos-quick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 4px 0 8px;
}
.adm-pos-quick-grid .btn {
  min-height: 38px;
  font-weight: 900;
  padding: 0 4px;
  justify-content: center;
}
@media (max-width: 440px) {
  .adm-pos-quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.adm-pos-details {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  margin-top: 12px;
  overflow: hidden;
}
.adm-pos-details > summary {
  list-style: none;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e2e8f0;
  user-select: none;
}
.adm-pos-details > summary::-webkit-details-marker { display: none; }
.adm-pos-details > summary::after {
  content: '▾';
  font-size: 14px;
  color: var(--primary);
  transition: transform 0.15s ease;
}
.adm-pos-details[open] > summary::after {
  transform: rotate(180deg);
}
.adm-pos-details-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Practical Status Filter Pills (Active / Frozen / All) & Freeze Note Callouts */
.adm-pos-status-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}
.adm-pos-status-pills[hidden] { display: none !important; }
.adm-pos-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(15, 23, 42, 0.8);
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.adm-pos-status-pill.is-active-mode.is-active {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.65);
  color: #86efac;
}
.adm-pos-status-pill.is-frozen-mode.is-active {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(248, 113, 113, 0.68);
  color: #fca5a5;
}
.adm-pos-status-pill.is-all-mode.is-active {
  background: rgba(255, 223, 27, 0.18);
  border-color: rgba(255, 223, 27, 0.62);
  color: #ffdf1b;
}
.adm-pos-status-pill.is-active .adm-pos-pill-cnt {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

.adm-freeze-note-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.38);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.adm-freeze-note-bar[hidden] { display: none !important; }
.adm-quick-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.adm-quick-reasons .btn {
  min-height: 34px;
  border-radius: 999px;
  font-weight: 800;
}

.adm-freeze-cascade-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.14);
  cursor: pointer;
  user-select: none;
}
.adm-freeze-cascade-box[hidden] { display: none !important; }
.adm-freeze-cascade-box.is-reactivate {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.13);
}
.adm-freeze-cascade-box input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: #ef4444;
  cursor: pointer;
}
.adm-freeze-cascade-box.is-reactivate input[type="checkbox"] {
  accent-color: #22c55e;
}
.adm-freeze-cascade-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #fecaca;
  line-height: 1.3;
}
.adm-freeze-cascade-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3px;
  line-height: 1.35;
}

.res-player-profile-line {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
