:root {
  --bg: #0b1220;
  --bg2: #101a2e;
  --card: #16233c;
  --card2: #1c2c4a;
  --line: #24365a;
  --text: #eaf1ff;
  --muted: #8ea3c8;
  /* theme trio: swapped per-theme by /js/themes.js */
  --primary: #0e4aa8;
  --primary2: #0b3a86;
  --accent: #ffb400;
  --accent2: #ffd257;
  --accent-rgb: 255,180,0;   /* same color as --accent, as an r,g,b triplet for rgba() use */
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html, body, .auth-modal, .drawer-body, .mobile-menu-contents, .table_cont {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar, .auth-modal::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar, .mobile-menu-contents::-webkit-scrollbar,
.table_cont::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #14264a 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
/* Buttons must react to the first tap. Without this, mobile browsers wait
   ~300ms after touchend to see if a second tap follows (double-tap-to-zoom),
   which reads as "the button needs two presses" — critical for bet/cashout. */
button, .btn, a[onclick], [role="button"] { touch-action: manipulation; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
  background: rgba(11, 18, 32, .85);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.brand span { color: var(--accent); }
.topbar nav { display: flex; gap: 6px; flex: 1; }
.topbar nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--muted);
  font-weight: 600; font-size: 14px;
}
.topbar nav a:hover { color: var(--text); background: var(--card); }
.topbar nav a.active { color: var(--accent); background: var(--card); }
.balance-chip {
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.balance-chip b { color: var(--accent); }
/* Balance + eye toggle as one pill, not two separate controls sitting side by
   side — the eye belongs visually inside the balance box it's revealing. */
.balance-box {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--card); border: 1px solid var(--line);
  padding: 4px 6px 4px 14px; border-radius: 999px;
}
.balance-box .balance-chip { background: none; border: 0; padding: 0; }
.balance-box .eye-btn { padding: 4px; }
.app-header .balance-box { background: rgba(255,255,255,.12); border: 0; color: #fff; }
.app-header .balance-box .balance-chip { background: none; border: 0; color: #fff; }
.user-chip { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #22180a; font-weight: 800; font-size: 15px;
  padding: 12px 22px; border-radius: 10px;
  transition: transform .08s, filter .15s;
}
.btn [data-icon] { display: flex; font-size: 1.15em; line-height: 0; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn.green { background: linear-gradient(180deg, #34d97b, var(--green)); color: #052e16; }
.btn.red { background: linear-gradient(180deg, #f87171, var(--red)); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
h1.page { font-size: 26px; margin-bottom: 18px; }
h1.page small { color: var(--muted); font-size: 14px; font-weight: 400; display: block; margin-top: 4px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.grid { display: grid; gap: 18px; }

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card { width: 100%; max-width: 400px; padding: 34px 30px; }
.auth-card .brand { text-align: center; display: block; font-size: 30px; margin-bottom: 6px; }
.auth-card .tagline { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.tabs2 { display: flex; background: var(--bg2); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tabs2 button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 14px; padding: 10px; border-radius: 8px; cursor: pointer;
}
.tabs2 button.active { background: var(--card2); color: var(--text); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font-size: 15px; outline: none;
}
.field select {
  cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea3c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
.field select option { background: var(--bg2); color: var(--text); }
.field input:focus, .field select:focus { border-color: var(--accent); }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 10px; font-weight: 600; }
.form-ok { color: var(--green); font-size: 13px; min-height: 18px; margin-bottom: 10px; font-weight: 600; }
/* An error div and an ok div sit side by side in every auth screen, but only one
   is ever filled at a time — collapse whichever is empty so they don't both
   reserve height (18px + 10px margin each) and stack into a big dead gap. */
.form-error:empty, .form-ok:empty { min-height: 0; margin-bottom: 0; }

/* ---------- lobby ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(var(--accent-rgb),.14), var(--card) 60%);
  transition: transform .15s, border-color .15s, background .25s; display: block;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.game-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.game-card .gc-body {
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, rgba(var(--accent-rgb),.16), transparent 75%);
  transition: background .25s;
}
.game-card .gc-title { font-weight: 800; font-size: 17px; }
.game-card .gc-tag { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--bg); letter-spacing: .5px; transition: background .25s; }
.game-card.soon { filter: saturate(.4); }
.game-card.soon:hover { transform: none; border-color: var(--line); }
.game-card.soon .gc-tag { background: var(--card2); color: var(--muted); }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 6px;
  box-shadow: 0 0 6px 1px var(--blue), 0 0 2px var(--blue);
  animation: live-glow 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 5px 1px var(--blue), 0 0 2px var(--blue); opacity: 1; }
  50% { box-shadow: 0 0 11px 3px var(--blue), 0 0 4px var(--blue); opacity: .75; }
}
.hero {
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(120deg, #182a4d 0%, #0f1a30 70%), url('/keno/img/bg.jpg') center/cover;
  background-blend-mode: overlay;
  padding: 40px 34px; margin-bottom: 26px;
}
.hero h2 { font-size: 32px; margin-bottom: 8px; }
.hero h2 span { color: var(--accent); }
.hero p { color: var(--muted); margin-bottom: 18px; max-width: 480px; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
table.list td { padding: 11px 12px; border-bottom: 1px solid rgba(36,54,90,.5); }
table.list tr:last-child td { border-bottom: 0; }
table.list th.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; transition: color .15s; }
table.list th.sortable-th:hover { color: var(--text); }
table.list th.sortable-th::after { content: '\2195'; opacity: .35; margin-left: 5px; font-size: 10px; }
table.list th.sortable-th.sort-asc::after { content: '\2191'; opacity: 1; color: var(--accent); }
table.list th.sortable-th.sort-desc::after { content: '\2193'; opacity: 1; color: var(--accent); }
.pill { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.pill.completed { background: rgba(34,197,94,.15); color: var(--green); }
.pill.pending { background: rgba(var(--accent-rgb),.15); color: var(--accent); }
.pill.rejected { background: rgba(239,68,68,.15); color: var(--red); }
.amt-pos { color: var(--green); font-weight: 700; }
.amt-neg { color: var(--red); font-weight: 700; }
.muted { color: var(--muted); }

/* ---------- wallet ---------- */
.wallet-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .wallet-grid { grid-template-columns: 1fr; } }
.big-balance { font-size: 34px; font-weight: 800; color: var(--accent); }
.method-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.method-row .m {
  flex: 1; min-width: 90px; text-align: center; padding: 10px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.method-row .m.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.06); }
.quick-amounts { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.quick-amounts button {
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 700;
}
.quick-amounts button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- admin ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-tabs button {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13px;
}
.admin-tabs button.active { color: #22180a; background: var(--accent); border-color: var(--accent); }
input.inline { width: 90px; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); }
input.inline, select.inline { font-family: inherit; font-size: 13.5px; transition: border-color .15s, box-shadow .15s; }
input.inline:focus, select.inline:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
select.inline {
  width: 90px; padding: 6px 26px 6px 8px; border-radius: 7px; border: 1px solid var(--line);
  background-color: var(--bg2); color: var(--text); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea3c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 13px;
}
select.inline:hover { border-color: rgba(var(--accent-rgb),.5); }
select.inline option { background: var(--bg2); color: var(--text); }

/* ---------- game wrapper ---------- */
.game-frame-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; }
.game-frame-bar {
  display: flex; align-items: center; gap: 14px; padding: 8px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.game-frame-bar .spacer { flex: 1; }
iframe.game { flex: 1; border: 0; width: 100%; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-weight: 600; z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.show { opacity: 1; }
.toast.toast-win {
  background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.5); color: #eafff2;
}
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; }
  .hero { padding: 26px 20px; }
  .hero h2 { font-size: 24px; }
}

/* ================= gashabet-style additions ================= */
.link-muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.link-muted:hover { color: var(--accent); }

/* app header */
.app-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  position: sticky; top: 0; z-index: 60;
}
.app-header .brand { font-size: 20px; color: #fff; }
.app-header .main-brand {
  display: flex; align-items: center; width: 126px; height: 30px;
  flex: 0 0 126px; overflow: hidden;
}
.app-header .brand-logo {
  display: block; width: 126px; height: 30px;
  object-fit: contain; object-position: left center;
}
.brand-fallback { color: #fff; font-size: 18px; font-weight: 800; white-space: nowrap; }
.app-header .spacer { flex: 1; }
.app-header .balance-chip { background: rgba(255,255,255,.12); border: 0; color: #fff; cursor: pointer; }
.deposit-btn { background: var(--accent); color: #22180a; border-radius: 8px; font-weight: 800; }
.avatar-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 18px;
}

/* quick nav */
.quicknav { display: flex; background: #fff; border-bottom: 1px solid #e3e7ee; }
.quicknav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0 8px; color: #333; font-size: 13px; font-weight: 600;
  border-right: 1px solid #eef1f5;
}
.quicknav a:last-child { border-right: 0; }
.quicknav .qn-ico { font-size: 20px; }

/* carousel */
.carousel { position: relative; overflow: hidden; background: #0b1220; }
.carousel .slides { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.carousel .slide {
  min-width: 100%; min-height: 240px; display: flex; align-items: center;
  padding: 30px 8%;
  background: linear-gradient(115deg, #0e2a5c 0%, #0b1a38 60%, #0a1428 100%);
}
.carousel .slide2 { background: linear-gradient(115deg, #143c1e 0%, rgba(10,31,16,.75) 65%), url("/img/thumbs/keno.jpg") right center/contain no-repeat #0a1f10; }
.carousel .slide3 { background: linear-gradient(115deg, #3c1420 0%, rgba(26,10,16,.75) 65%), url("/img/thumbs/aviator.webp") right center/contain no-repeat #1a0a10; }
.carousel .slide4 { background: linear-gradient(115deg, #4a3708 0%, #211803 70%); }
.slide-txt h2 { font-size: 34px; color: #fff; line-height: 1.1; margin-bottom: 8px; font-style: italic; }
.slide-txt h2 span { color: var(--accent); }
.slide-txt p { color: #b8c6e0; margin-bottom: 14px; font-size: 15px; }
.carousel .dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
}
.carousel .dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; }
.carousel .dots span.active { background: #fff; }

/* drawer / account panel */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(4,8,16,.6); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: -340px; width: 320px; max-width: 88vw; height: 100vh;
  background: var(--card); color: var(--text); z-index: 100; transition: right .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.45);
  border-left: 1px solid var(--line);
}
.drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; padding: 16px 18px;
  font-weight: 800; letter-spacing: .8px; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.drawer-head button { background: none; border: 0; color: rgba(255,255,255,.85); font-size: 16px; cursor: pointer; padding: 4px; }
.drawer-head button:hover { color: #fff; }
.drawer-body { padding: 6px 18px 24px; overflow-y: auto; flex: 1; }

.drawer-profile { display: flex; align-items: center; gap: 12px; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.dp-info { min-width: 0; }
.dp-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-id { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .3px; margin-top: 2px; }

.drawer-bal { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.drawer-bal .db-ico {
  width: 34px; height: 34px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(var(--accent-rgb),.12); color: var(--accent); font-size: 16px;
}
.drawer-bal .db-l { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .5px; }
.drawer-bal .db-v { font-size: 18px; font-weight: 800; margin-top: 2px; }
.drawer-sec { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .8px; margin: 18px 0 6px; text-transform: uppercase; }
.drawer-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 4px; border-bottom: 1px solid rgba(36,54,90,.5);
  color: var(--text); font-weight: 600; font-size: 14px;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit; text-align: left; cursor: pointer;
}
.drawer-link span[data-icon] { color: var(--muted); font-size: 16px; display: flex; }
.drawer-link:hover { color: var(--accent); }
.drawer-link:hover span[data-icon] { color: var(--accent); }
.drawer-link.as-btn { -webkit-appearance: none; appearance: none; }

/* avatar */
.nb-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(150deg, var(--accent2), var(--accent));
  color: #22180a; font-weight: 800; font-size: 14px; letter-spacing: .3px;
  flex: 0 0 auto;
}
.nb-avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.nb-avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.nb-avatar .fa-user { line-height: 1; }

/* small "who" chip in admin sidebar footer */
.sb-who { display: flex; align-items: center; gap: 10px; }

/* ============ wallet (gashabet style) ============ */
.wallet-page { max-width: 620px; margin: 0 auto; padding: 0 0 40px; }
.notice-bar {
  background: rgba(var(--accent-rgb),.08); border-bottom: 1px solid rgba(var(--accent-rgb),.2);
  color: #dce8fb; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px;
}
.notice-bar:empty { display: none; }
.support-line { font-size: 12.5px; line-height: 1.5; display: flex; align-items: flex-start; gap: 6px; }
.support-line [data-icon] { flex: 0 0 auto; color: var(--accent); font-size: 14px; margin-top: 1px; }
.support-line a { color: var(--accent); }
.support-line a:hover { text-decoration: underline; }
.wallet-title {
  text-align: center; padding: 18px 0; font-size: 20px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.wallet-tabs { display: flex; background: var(--card); }
.wallet-tabs button {
  flex: 1; padding: 14px 0; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 800; font-size: 14px;
  border-bottom: 3px solid transparent;
}
.wallet-tabs button.active { color: var(--text); background: var(--card2); border-bottom-color: var(--accent); }
.wallet-section { padding: 14px; }
.info-callout {
  background: rgba(150, 90, 160, .18); border: 1px solid rgba(190, 120, 200, .35);
  color: #e9d6ee; border-radius: 12px; padding: 14px 16px; font-size: 13.5px;
  line-height: 1.5; margin-bottom: 14px; text-align: center;
}
.method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.method-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; cursor: pointer; color: var(--text); text-align: left;
}
.method-item:hover { border-color: var(--accent); }
.method-logo { width: 52px; height: 38px; object-fit: contain; flex: 0 0 52px; border-radius: 8px; background: rgba(255,255,255,.92); padding: 4px; }
.method-item .mi-name { font-size: 16px; font-weight: 800; flex: 1; }
.method-item .mi-time { color: var(--muted); font-size: 12px; }
.method-item .mi-arrow { color: var(--muted); font-size: 22px; }

/* big deposit-method picker card: logo on top, process time, full-width action */
.method-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px 20px; cursor: pointer; color: var(--text); text-align: center;
  transition: border-color .15s, transform .15s;
}
.method-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.method-card-logo { height: 54px; max-width: 78%; object-fit: contain; }
.method-card-logo-fallback { font-size: 18px; font-weight: 800; padding: 10px 0; }
.method-card-time { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; border-top: 1px solid var(--line); width: 100%; }
.method-card-time span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.method-card-time b { font-size: 15px; }
.link-back {
  background: none; border: 0; color: var(--text); font-size: 15px; font-weight: 700;
  cursor: pointer; padding: 4px 0 12px;
}
.pay-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.pay-card .ph { margin-bottom: 12px; }
.pay-instructions {
  color: #cfe0ff; background: rgba(24,119,242,.12); border: 1px solid rgba(24,119,242,.3);
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; margin-bottom: 14px;
}
.account-box {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.account-box .ab-l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.account-box .ab-v { font-size: 20px; font-weight: 800; margin-top: 3px; letter-spacing: .3px; }
.account-box .ab-holder { font-size: 16px; font-weight: 600; color: var(--text); margin-top: 3px; }
.account-method-logo { width: 56px; height: 44px; object-fit: contain; margin-right: 12px; border-radius: 9px; background: rgba(255,255,255,.94); padding: 5px; }
.account-method-logo[hidden] { display: none; }
.copy-btn { border: 0; background: none; color: #34d97b; font-weight: 800; cursor: pointer; font-size: 14px; }
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; resize: vertical;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font-size: 14px; outline: none; font-family: inherit;
}
.field textarea:focus { border-color: var(--accent); }
.process-time { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 14px; }
.process-time b { color: var(--text); font-size: 15px; }
.deposit-result {
  display: grid; grid-template-columns: 42px 1fr; gap: 11px; align-items: center;
  margin: 12px 0; padding: 13px 14px; border: 1px solid; border-radius: 12px;
}
.deposit-result[hidden] { display: none; }
.deposit-result.success { color: #dfffea; background: rgba(28,167,89,.14); border-color: rgba(52,217,123,.52); }
.deposit-result.fail { color: #ffe4e8; background: rgba(214,45,72,.14); border-color: rgba(244,78,105,.52); }
.deposit-result-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 25px; font-weight: 800; }
.deposit-result.success .deposit-result-icon { background: #1ca759; color: #fff; }
.deposit-result.fail .deposit-result-icon { background: #d62d48; color: #fff; }
.deposit-result b { display: block; margin-bottom: 3px; font-size: 14px; }
.deposit-result p { margin: 0; color: inherit; opacity: .86; font-size: 12.5px; line-height: 1.4; word-break: break-word; }
.btn.big { width: 100%; padding: 16px 0; font-size: 16px; border-radius: 12px; }
.small-note { font-size: 12px; margin-top: 10px; }
.balance-hero { text-align: center; padding: 10px 0 16px; }
.balance-hero .bh-l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.balance-hero .bh-v { font-size: 34px; font-weight: 800; color: var(--accent); }
.balance-hero .bh-cur { font-size: 16px; }
.tx-list { display: flex; flex-direction: column; }
.history-disclosure { padding: 0; overflow: hidden; }
.history-disclosure summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 18px; cursor:pointer; list-style:none; font-weight:800; }
.history-disclosure summary::-webkit-details-marker { display:none; }
.history-disclosure summary b { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.history-disclosure[open] summary { border-bottom:1px solid var(--line); }
.history-disclosure .tx-list { padding:0 18px 12px; max-height:460px; overflow:auto; scrollbar-width:none; }
.tx-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px;
  border-bottom: 1px solid rgba(36,54,90,.5);
}
.tx-row:last-child { border-bottom: 0; }
.tx-ico { font-size: 18px; }
.tx-mid { flex: 1; min-width: 0; }
.tx-type { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.tx-sub { color: var(--muted); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-right { text-align: right; }

@media (max-width: 560px) {
  .slide-txt h2 { font-size: 26px; }
  .carousel .slide { min-height: 200px; padding: 24px 6%; }
  .app-header { gap: 6px; padding: 8px 10px; }
  .app-header .main-brand { width: 100px; height: 25px; flex-basis: 100px; }
  .app-header .brand-logo { width: 100px; height: 25px; }
  #hdr-user { gap: 5px !important; min-width: 0; }
  #hdr-user .avatar-btn { flex: 0 0 32px; width: 32px; height: 32px; }
  #hdr-user .balance-box { padding: 4px 4px 4px 8px; }
  #hdr-user .balance-chip { font-size: 11.5px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
  #hdr-user .deposit-btn { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  #hdr-user .eye-btn { padding: 2px; flex: 0 0 20px; }
}

/* ===== auth modal + blur + eye ===== */
#page { transition: filter .25s; }
#page.blurred { filter: blur(7px) brightness(.7); pointer-events: none; }
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 12, 24, .55);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.auth-modal-overlay.open { opacity: 1; pointer-events: auto; }
.auth-modal {
  position: relative; width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transform: translateY(12px) scale(.98); transition: transform .25s;
  max-height: 92vh; overflow-y: auto;
}
.auth-modal-overlay.open .auth-modal { transform: none; }
.auth-brand-logo {
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; margin: 0 auto 8px; overflow: hidden;
}
.auth-brand-logo .brand-logo { width: 72px; height: 72px; object-fit: contain; }
.auth-close {
  position: absolute; top: 12px; right: 14px; background: none; border: 0;
  color: var(--muted); font-size: 18px; cursor: pointer;
}
.auth-close:hover { color: var(--text); }

.eye-btn {
  background: none; border: 0; color: rgba(255,255,255,.85);
  font-size: 18px; cursor: pointer; padding: 4px;
  display: inline-flex; align-items: center;
}
.eye-btn:hover { color: #fff; }
.app-header .eye-btn { color: rgba(255,255,255,.85); }

/* ===================== icon-button / general polish pass ===================== */
[data-icon] svg { display: block; }
.avatar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 17px;
  transition: background .15s;
}
.avatar-btn:hover { background: rgba(255,255,255,.2); }
.avatar-btn .nb-avatar { width: 100%; height: 100%; border-radius: 10px; font-size: 14px; }

/* compact game wrapper header */
.game-frame-bar { min-height: 48px; flex: 0 0 48px; }
.game-close {
  width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center;
  border-radius: 50%; border:1px solid rgba(255,255,255,.22); background:linear-gradient(145deg,#eb4251,#aa1827); color:#fff;
  text-decoration:none; font-weight:400; box-shadow:0 4px 12px rgba(217,45,62,.35),inset 0 1px rgba(255,255,255,.22);
}
.game-close > span { display:block; font:400 25px/1 Arial,sans-serif; transform:translateY(-1px); }
.game-frame-bar .game-balance { background: transparent; border: 0; padding: 4px 0; font-weight: 800; }
.game-frame-bar .game-balance b { color: #28a909; }
.game-frame-bar .game-balance #cur { color: #9ea0a3; font-weight: 500; }
.game-brand { display: flex; align-items: center; width: 118px; height: 28px; overflow: hidden; }
.game-brand .brand-logo { width: 118px; height: 28px; object-fit: contain; object-position: left center; }
.game-back, .game-deposit { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 600px) {
  .auth-brand-logo { width:54px; height:54px; margin-bottom:5px; }
  .auth-brand-logo .brand-logo { width:50px; height:50px; }
  .method-item { padding:14px 13px; }
  .method-logo { width:46px; height:34px; flex-basis:46px; }
  .account-box { padding:12px; }
  .account-method-logo { width:48px; height:38px; }
  .game-frame-bar { min-height: 42px; flex-basis: 42px; gap: 5px; padding: 5px 7px; }
  .game-back, .game-deposit { width: 32px; height: 32px; padding: 0; flex: 0 0 32px; }
  .game-back-label, .game-deposit-label { display: none; }
  .game-brand { width: 78px; height: 24px; flex: 0 0 78px; }
  .game-brand .brand-logo { width: 78px; height: 24px; }
  .game-frame-bar .balance-chip { padding: 6px 8px; font-size: 12px; max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
  .game-frame-bar .game-balance { padding: 3px 0; max-width: 150px; }
  .game-frame-bar .eye-btn { flex: 0 0 24px; padding: 2px; }
}

.quicknav .qn-ico { font-size: 21px; display: flex; }
.tab-ico { font-size: 15px; vertical-align: -3px; margin-right: 2px; display: inline-flex; }
.wallet-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; }

.tx-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--bg2); color: var(--muted);
}
.tx-ico.pos { background: rgba(34,197,94,.14); color: var(--green); }
.tx-ico.neg { background: rgba(239,68,68,.14); color: var(--red); }

.copy-btn { display: inline-flex; align-items: center; }

.banner-warn {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35);
  color: #ffd7d7; border-radius: 12px; padding: 12px 16px; margin: 0 0 18px;
  font-size: 13.5px; font-weight: 600;
}
.banner-warn [data-icon] { color: var(--red); font-size: 18px; flex: 0 0 auto; }
.banner-warn .btn { margin-left: auto; }

/* elevation + focus polish */
.card, .stat, .kpi, .chart-card, .panel-card, .game-card, .method-item, .account-box, .pay-card {
  box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 24px -12px rgba(0,0,0,.5);
}
/* Stacked game cards on narrow screens sit close together (single column) — the
   shared elevation shadow above was bleeding into the gap and reading as a hard
   seam between Keno and Aviator. Softer, tighter shadow for this grid specifically. */
.games-grid .game-card { box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 4px 10px -8px rgba(0,0,0,.4); }
.auth-modal-overlay { backdrop-filter: blur(4px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.pwa-install {
  position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border: 1px solid rgba(var(--accent-rgb), .5); border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 22px rgba(var(--accent-rgb),.22);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.pwa-install:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 26px rgba(var(--accent-rgb),.32); }
.pwa-install:active { transform: translateY(0) scale(.97); }
.pwa-install-logo { width: 34px; height: 34px; padding: 6px; box-sizing: border-box; border-radius: 50%; object-fit: contain; background: #060a18; flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.5); }
.pwa-install-badge {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #081426;
}
.pwa-install-badge svg { width: 17px; height: 17px; }
.pwa-install-text { white-space: nowrap; }
.pwa-install-arrow { display: grid; place-items: center; opacity: .7; }
.pwa-install-arrow svg { width: 14px; height: 14px; }
@media (max-width: 600px) {
  .pwa-install { right: 10px; bottom: 10px; padding: 6px 13px 6px 6px; font-size: 12.5px; }
  .pwa-install-logo, .pwa-install-badge { width: 28px; height: 28px; }
  .pwa-install-arrow { display: none; }
}
.field input, .field select, .field textarea { transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12); }
.btn { box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb),.4); }
.btn.secondary { box-shadow: none; }
.btn.green { box-shadow: 0 6px 16px -6px rgba(34,197,94,.4); }
.btn.red { box-shadow: 0 6px 16px -6px rgba(239,68,68,.4); }
table.list td, table.list th { font-variant-numeric: tabular-nums; }
.amt-pos, .amt-neg { font-variant-numeric: tabular-nums; }

/* ===== footer ===== */
.site-footer {
  border-top: 1px solid var(--line); padding: 26px 20px 34px; margin-top: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.footer-social a svg { width: 100%; height: 100%; display: block; }
.footer-social a:hover { transform: translateY(-3px); box-shadow: 0 8px 18px -8px rgba(0,0,0,.6); }
.footer-note { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .5px; }

/* ===== recent withdrawal accounts dropdown ===== */
.recent-acct-drop {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  max-height: 240px; overflow-y: auto; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); padding: 6px;
}
.rad-label { padding: 6px 10px 4px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.rad-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px; border-radius: 9px;
  background: none; border: 0; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.rad-item:hover { background: var(--bg2); }
.rad-ico { flex: 0 0 auto; opacity: .7; font-size: 14px; }
.rad-num { flex: 1; font-variant-numeric: tabular-nums; }
.rad-time { font-size: 11px; color: var(--muted); flex: 0 0 auto; }

/* ===== zero-balance deposit nudge ===== */
@keyframes nudge-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); transform: scale(1); }
  50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); transform: scale(1.05); }
}
[data-deposit-nudge].nudge { animation: nudge-ring 1.4s ease-out infinite; position: relative; }
[data-deposit-nudge].nudge::after {
  content: ''; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--accent);
  animation: nudge-bounce 1.1s ease-in-out infinite;
}
@keyframes nudge-bounce { 0%, 100% { bottom: -13px; opacity: .9; } 50% { bottom: -8px; opacity: .45; } }

/* ===== toast with inline action button ===== */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action {
  flex: 0 0 auto; background: var(--accent); color: #22180a; border: 0; border-radius: 7px;
  padding: 6px 12px; font-weight: 800; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.toast-action:hover { filter: brightness(1.08); }

/* ===== inline insufficient-balance message (Aviator bet panel) ===== */
.bp-msg {
  display: none; flex-direction: column; align-items: center; gap: 6px;
  margin-top: 8px; padding: 10px 12px; border-radius: 10px; text-align: center;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35);
  color: #ffd7d7; font-size: 12.5px; font-weight: 700;
}
.bp-msg.show { display: flex; }
.bp-msg .bp-msg-deposit {
  background: var(--accent); color: #22180a; border: 0; border-radius: 8px;
  padding: 6px 16px; font-weight: 800; font-size: 12.5px; cursor: pointer; text-decoration: none;
}

/* ===== drawer / sidebar unread-count badge ===== */
.drawer-badge, .sb-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: auto;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 800; line-height: 1;
}
/* ===== generic small modal body content (reused for Keno zero-balance overlay etc.) ===== */
.mini-modal-icon { font-size: 34px; text-align: center; margin-bottom: 10px; }
.mini-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ===== support ticket thread ===== */
.ticket-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.ticket-msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.ticket-msg.from-user { align-self: flex-end; background: rgba(var(--accent-rgb),.14); border: 1px solid rgba(var(--accent-rgb),.3); }
.ticket-msg.from-admin { align-self: flex-start; background: var(--bg2); border: 1px solid var(--line); }
.ticket-msg .tm-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.ticket-list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; margin-bottom: 10px;
}
.ticket-list-item:hover { border-color: var(--accent); }
.ticket-list-item .ti-subject { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list-item .ti-date { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; }

/* ===== referral / promo page ===== */
.referral-code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg2); border: 1px dashed rgba(var(--accent-rgb),.5); border-radius: 12px;
  padding: 14px 16px; margin: 12px 0;
}
.referral-code-box b { font-size: 20px; letter-spacing: 2px; color: var(--accent); }
.referral-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin: 16px 0; }
.referral-stats .rs { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.referral-stats .rs b { display: block; font-size: 20px; margin-top: 4px; }
.referral-stats .rs { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; }
.referral-stats .rs b { margin: 0 0 0 auto; padding-left: 12px; }
.rf-bonus-money { color: var(--green); white-space: nowrap; }
.page-back, .link-back { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 460px) {
  .page-back { width: 34px; min-width: 34px; height: 34px; padding: 0; gap: 0; }
  .page-back .back-label, .link-back .back-label { display: none; }
  .link-back { width: 34px; min-width: 34px; padding: 7px 0; justify-content: center; }
}

/* ===== admin: SMS broadcast recipient chips ===== */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip-list .chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 12.5px; font-weight: 700;
}
.chip-list .chip button { background: none; border: 0; color: var(--muted); cursor: pointer; width: 18px; height: 18px; border-radius: 50%; }
.chip-list .chip button:hover { background: rgba(239,68,68,.2); color: var(--red); }
.search-results { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.search-results .sr-item { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid rgba(36,54,90,.4); }
.search-results .sr-item:last-child { border-bottom: 0; }
.search-results .sr-item:hover { background: var(--bg2); color: var(--accent); }
.footer-note span { color: var(--accent); }
