/* ===== OKX-style landing — color scheme & base ===== */
:root {
  --bg: #000000;
  --bg-2: #0b0b0c;
  --bg-3: #111114;
  --card: #16161a;
  --card-2: #1c1c22;
  --border: #2a2a30;
  --text: #ffffff;
  --text-dim: #a0a0a8;
  --text-mute: #6d6d76;
  --accent: #c6ff00;        /* OKX lime */
  --accent-dim: #aadb00;
  --green: #21c45d;
  --red: #f6465d;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --header-h: 64px;
}

/* the [hidden] attribute must always win over display rules below */
[hidden] { display: none !important; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, video { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.header.scrolled { border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.9); }

.header .container { display: flex; align-items: center; gap: 28px; }

.logo {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -1px;
  font-family: "Arial Black", Arial, sans-serif;
  display: flex; align-items: center;
}
.logo span { color: var(--accent); }
.logo img { height: 28px; width: auto; display: block; }

.nav { display: flex; gap: 2px; align-items: center; flex: 1; }
.nav a {
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s;
  cursor: pointer;
}
.nav a:hover { background: var(--card-2); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--card-2); color: var(--accent); }

/* ===== Language switcher ===== */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: border-color .2s, color .2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; min-width: 150px;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 950;
}
.lang-switch.open .lang-menu { display: flex; }
.lang-menu a {
  padding: 9px 12px; border-radius: 8px; font-size: 14px;
  color: var(--text); cursor: pointer; transition: background .15s;
}
.lang-menu a:hover { background: var(--card-2); }
.lang-menu a.active { color: var(--accent); background: rgba(198,255,0,.08); }
[dir="rtl"] .lang-menu { right: auto; left: 0; }

/* ===== RTL (Arabic) ===== */
[dir="rtl"] .scroll-progress { left: auto; right: 0; }
[dir="rtl"] .header-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero p.lead,
[dir="rtl"] .section-sub,
[dir="rtl"] .page-hero p { margin-left: auto; }
[dir="rtl"] .hero::before { right: auto; left: -200px; }
[dir="rtl"] .chart-toolbar .tf,
[dir="rtl"] .trust { margin-right: 0; }
[dir="rtl"] .chart-toolbar .price,
[dir="rtl"] .chart-toolbar .tf { margin-left: 0; margin-right: auto; }
[dir="rtl"] .coins-table th,
[dir="rtl"] .coins-table td { text-align: right; }
[dir="rtl"] .card .link { flex-direction: row-reverse; }
[dir="rtl"] .footer-bottom,
[dir="rtl"] .breadcrumb { direction: rtl; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 24px;
  transition: transform .15s ease, background .2s, color .2s, box-shadow .2s;
  font-family: inherit;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: var(--accent); box-shadow: 0 0 24px rgba(198,255,0,.35); }
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { box-shadow: 0 0 24px rgba(198,255,0,.45); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* Primary login CTA — prominent, always visible (incl. mobile) */
.btn-login {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: 11px 30px;
  box-shadow: 0 0 16px rgba(198,255,0,.35);
  animation: loginGlow 2.6s ease-in-out infinite;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(198,255,0,.6); }
.btn-login.btn-lg { padding: 16px 44px; font-size: 18px; }
@keyframes loginGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(198,255,0,.3); }
  50% { box-shadow: 0 0 26px rgba(198,255,0,.55); }
}
@media (max-width: 980px) {
  .header-actions .btn-login { display: inline-flex; padding: 9px 22px; font-size: 14px; }
}
@media (max-width: 380px) {
  .header-actions .btn-login { padding: 8px 16px; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 70px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(198,255,0,.12), transparent 60%);
  pointer-events: none;
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 28px;
}
.hero h1 .hl { color: var(--accent); }
.hero p.lead { color: var(--text-dim); font-size: 18px; max-width: 460px; margin-bottom: 28px; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.email-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.email-cta input {
  flex: 1;
  min-width: 200px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.email-cta input:focus { border-color: var(--accent); }
.email-cta input::placeholder { color: var(--text-mute); }

.trust { margin-top: 44px; display: flex; align-items: center; gap: 36px; opacity: .8; flex-wrap: wrap; }
.trust .label { color: var(--text-mute); font-size: 13px; }
.trust .partner { font-weight: 800; letter-spacing: 1px; color: #cfcfd4; font-size: 15px; }

/* ===== Phone mockup ===== */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone {
  width: 320px;
  background: var(--bg-3);
  border: 2px solid #26262c;
  border-radius: 38px;
  padding: 14px;
  box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03);
  position: relative;
}
.phone .notch {
  width: 120px; height: 22px;
  background: #000;
  border-radius: 0 0 14px 14px;
  margin: -14px auto 6px;
}
.phone-screen { background: #0c0c0e; border-radius: 26px; padding: 16px; }
.ps-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.ps-balance-label { font-size: 12px; color: var(--text-mute); }
.ps-balance { font-size: 30px; font-weight: 700; margin: 2px 0; }
.ps-balance small { font-size: 14px; color: var(--text-mute); }
.ps-change { color: var(--green); font-size: 13px; font-weight: 600; }
.chart-mini { width: 100%; height: 120px; margin: 12px 0; }
.ps-tabs { display: flex; gap: 6px; font-size: 11px; color: var(--text-mute); margin-bottom: 14px; }
.ps-tabs span { padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.ps-tabs span.active { background: var(--card-2); color: var(--text); }
.ps-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.ps-actions .btn { flex: 1; padding: 10px; font-size: 14px; }
.ps-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid #1c1c20; font-size: 14px; }
.ps-row .coin { display: flex; align-items: center; gap: 8px; }
.ps-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-size: 11px; }
img.ps-dot { background: transparent; object-fit: contain; }

/* ===== Section base ===== */
section.block { padding: 90px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .5px; margin-bottom: 12px; }
.eyebrow-ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
[dir="rtl"] .eyebrow-ico { margin-right: 0; margin-left: 6px; }
h2.section-title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.section-sub { color: var(--text-dim); font-size: 18px; margin-top: 16px; }

/* ===== Stats ribbon ===== */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats .container { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.stat .num { font-size: 40px; font-weight: 800; color: var(--accent); }
.stat .lbl { color: var(--text-dim); font-size: 14px; margin-top: 6px; }

/* ===== Feature cards ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); border-color: #3a3a42; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.card .ico { width: 48px; height: 48px; border-radius: 12px; background: rgba(198,255,0,.12); display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); }
.card .ico img { width: 24px; height: 24px; display: block; }
.play-badge img { width: 18px; height: 18px; display: block; margin-left: 2px; }
.socials .icon-btn img { width: 18px; height: 18px; }
.store-badge img { width: 22px; height: 22px; display: block; }
.social-login img { width: 18px; height: 18px; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; }
.card .link { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 14px; display: inline-flex; gap: 6px; align-items: center; }

/* ===== Trading / chart section ===== */
.trade-section .container { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.chart-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.chart-toolbar .pair { font-weight: 700; font-size: 16px; }
.chart-toolbar .price { font-weight: 700; font-size: 16px; color: var(--green); }
.chart-toolbar .tf { display: flex; gap: 4px; margin-left: auto; }
.chart-toolbar .tf span { font-size: 12px; color: var(--text-mute); padding: 4px 9px; border-radius: 6px; cursor: pointer; transition: .2s; }
.chart-toolbar .tf span:hover { color: var(--text); }
.chart-toolbar .tf span.active { background: var(--card-2); color: var(--accent); }
canvas.candles { width: 100%; height: 360px; display: block; }

/* ===== Video section ===== */
.video-section { background: var(--bg-2); }
.video-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.video-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.video-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  cursor: pointer;
}
.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .vc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}
.video-card .vc-overlay h3 { font-size: 22px; font-weight: 700; }
.video-card .vc-overlay p { color: var(--text-dim); font-size: 14px; }
.video-card .play-badge {
  position: absolute; top: 16px; left: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.video-card.big { min-height: 420px; }
.video-card.small { min-height: 200px; }

/* ===== Earn / coins table ===== */
.coins-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.coins-table th { text-align: left; padding: 16px 20px; font-size: 13px; color: var(--text-mute); font-weight: 500; border-bottom: 1px solid var(--border); }
.coins-table td { padding: 16px 20px; border-bottom: 1px solid #1b1b1f; font-size: 15px; }
.coins-table tr:last-child td { border-bottom: none; }
.coins-table tr:hover td { background: var(--bg-3); }
.coin-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.coin-name .tk { color: var(--text-mute); font-weight: 400; font-size: 13px; }
.coin-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; object-fit: contain; background: #fff1; flex-shrink: 0; }
img.coin-ico { padding: 0; background: transparent; }
.up { color: var(--green); }
.down { color: var(--red); }
.spark { width: 110px; height: 36px; }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 18px; border-top: 2px solid var(--border); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 14px; color: var(--accent); font-weight: 700;
  position: absolute; top: -28px;
}
.step h3 { font-size: 20px; margin: 6px 0 8px; }
.step p { color: var(--text-dim); font-size: 15px; }

/* ===== App download ===== */
.app-section .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.qr { width: 130px; height: 130px; background: #fff; border-radius: 14px; padding: 10px; }
.store-badges { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.store-badge { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 18px; cursor: pointer; transition: .2s; }
.store-badge:hover { border-color: var(--accent); }
.store-badge small { display: block; color: var(--text-mute); font-size: 11px; }
.store-badge b { font-size: 15px; }

/* ===== CTA banner ===== */
.cta-banner { text-align: center; padding: 80px 0; background:
  radial-gradient(circle at 50% 0%, rgba(198,255,0,.14), transparent 60%); }
.cta-banner h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -1.5px; }
.cta-banner p { color: var(--text-dim); font-size: 18px; margin: 16px 0 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FAQ ===== */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; color: var(--text); text-align: left; padding: 22px 0; font-size: 18px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: inherit; }
.faq-q .plus { color: var(--accent); font-size: 24px; transition: transform .3s; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; color: var(--text-dim); font-size: 16px; }
.faq-a .inner { padding-bottom: 22px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 60px 0 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4,1fr); gap: 30px; margin-bottom: 40px; }
.footer h4 { font-size: 14px; margin-bottom: 16px; color: var(--text); }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: var(--text-dim); font-size: 14px; transition: color .2s; }
.footer ul li a:hover { color: var(--accent); }
.footer .socials { display: flex; gap: 12px; margin-top: 18px; }
.footer .socials .icon-btn { border: 1px solid var(--border); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; color: var(--text-mute); font-size: 13px; flex-wrap: wrap; gap: 12px; }

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--accent); color: #000; font-weight: 600;
  padding: 14px 26px; border-radius: 999px; z-index: 2000;
  box-shadow: 0 12px 40px rgba(198,255,0,.4);
  transition: transform .4s cubic-bezier(.2,.9,.3,1.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Page hero (subpages) ===== */
.page-hero { padding: 60px 0 30px; }
.page-hero h1 { font-size: clamp(32px,4vw,52px); font-weight: 800; letter-spacing: -1px; }
.page-hero p { color: var(--text-dim); font-size: 18px; margin-top: 12px; max-width: 600px; }
.breadcrumb { color: var(--text-mute); font-size: 13px; margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--accent); }

/* ===== Mobile ===== */
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .nav, .header-actions .desktop-only { display: none; }
  .menu-toggle { display: grid; }
  .hero .container, .trade-section .container, .app-section .container { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-2, .video-grid, .footer-grid { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2,1fr); }
  .video-side { grid-template-rows: auto auto; }
  .phone-wrap { margin-top: 30px; }
}

/* ===== Account / auth / dashboard / admin ===== */
.acct-chip { display: flex; align-items: center; gap: 10px; }

.auth-center { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 34px; }
.auth-box h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-box .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-mute); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; outline: none; font-family: inherit;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.form-err { color: var(--red); font-size: 13px; min-height: 18px; margin: 4px 0; }
.form-ok { color: var(--green); font-size: 13px; min-height: 18px; margin: 4px 0; }
.auth-switch { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 16px; }
.auth-switch a { color: var(--accent); }

.dash { padding: 30px 0 80px; }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.balance-card { background: linear-gradient(135deg, rgba(198,255,0,.16), rgba(198,255,0,.03)); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.balance-card .lbl { color: var(--text-dim); font-size: 14px; }
.balance-card .amt { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 6px 0 18px; }
.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.panel-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.panel-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.req-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #1b1b1f; font-size: 14px; }
.req-line:last-child { border-bottom: none; }
.req-line .k { color: var(--text-mute); }
.req-line .v { font-weight: 600; font-family: monospace; }
.copy-btn { cursor: pointer; color: var(--accent); font-size: 12px; margin-left: 8px; }

.tx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx-table th { text-align: left; padding: 10px; color: var(--text-mute); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--border); }
.tx-table td { padding: 10px; border-bottom: 1px solid #1b1b1f; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: rgba(246,189,0,.15); color: #f6c000; }
.badge.approved { background: rgba(33,196,93,.15); color: var(--green); }
.badge.rejected { background: rgba(246,70,93,.15); color: var(--red); }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: var(--card); border: 1px solid var(--border); color: var(--text-dim); padding: 9px 16px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 14px; }
.tabs button.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 12px 10px; color: var(--text-mute); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid #1b1b1f; }
.admin-table tr:hover td { background: var(--bg-3); }
.admin-table input { background: var(--bg-3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 9px; font-size: 13px; width: 120px; outline: none; }
.admin-table input:focus { border-color: var(--accent); }
.mini-btn { padding: 6px 12px; font-size: 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); cursor: pointer; font-family: inherit; }
.mini-btn:hover { border-color: var(--accent); }
.mini-btn.green { background: var(--green); color: #000; border-color: var(--green); }
.mini-btn.red { background: var(--red); color: #fff; border-color: var(--red); }
.table-scroll { overflow-x: auto; }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 2000; display: none; place-items: center; padding: 20px; }
.modal-overlay.open { display: grid; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 20px; margin-bottom: 18px; }
.modal .modal-close { float: right; cursor: pointer; color: var(--text-mute); font-size: 22px; }

/* withdrawal error banner */
.err-modal { max-width: 440px; border-color: rgba(246,70,93,.45); box-shadow: 0 0 0 1px rgba(246,70,93,.25), 0 24px 60px rgba(0,0,0,.55); }
.err-banner { display: flex; gap: 14px; align-items: flex-start; background: rgba(246,70,93,.10); border: 1px solid rgba(246,70,93,.35); border-radius: 14px; padding: 16px; margin: 6px 0 20px; }
.err-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(246,70,93,.18); color: var(--red); }
.err-body { flex: 1; min-width: 0; }
.err-title { font-size: 16px; font-weight: 700; color: var(--red); margin-bottom: 4px; }
.err-text { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* payment proof upload (deposit) */
.upload-btn { display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center;
  background: var(--bg-3); border: 1px dashed var(--border); color: var(--text); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; font-family: inherit; cursor: pointer; transition: border-color .15s, color .15s; }
.upload-btn:hover { border-color: var(--accent); color: var(--accent); }
.proof-preview { display: block; margin-top: 10px; max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--border); object-fit: contain; }

/* payment proof in admin requests */
.proof-thumb { display: inline-block; margin-top: 6px; width: 56px; height: 56px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; transition: border-color .15s; }
.proof-thumb:hover { border-color: var(--accent); }
.proof-overlay .proof-lightbox { position: relative; max-width: 92vw; max-height: 92vh; }
.proof-overlay .proof-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; border: 1px solid var(--border); display: block; }
.proof-overlay .modal-close { position: absolute; top: -34px; right: 0; color: #fff; font-size: 30px; cursor: pointer; }

/* payment proofs grouped by user */
.proof-group { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; background: var(--bg-3); }
.proof-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.proof-user { font-weight: 700; font-size: 15px; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.proof-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.proof-thumb.lg { width: 100%; height: 150px; }
.proof-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proof-amt { font-weight: 700; }
.proof-date { color: var(--text-mute); font-size: 12px; }
.proof-actions { display: flex; gap: 8px; }
.proof-actions .mini-btn { flex: 1; }

@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* mobile drawer */
.drawer { position: fixed; inset: 0; background: rgba(0,0,0,.97); z-index: 1500; transform: translateX(100%); transition: transform .3s; padding: 80px 30px; display: flex; flex-direction: column; gap: 8px; }
.drawer.open { transform: none; }
.drawer a { font-size: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.drawer .close { position: absolute; top: 20px; right: 24px; font-size: 30px; cursor: pointer; }

/* ===== Support chat widget (dashboard) ===== */
.support-fab { position: fixed; right: 24px; bottom: 24px; z-index: 3000; width: 60px; height: 60px;
  border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: #06121a;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.45); transition: transform .15s, background .15s; }
.support-fab:hover { transform: translateY(-2px); }
.support-fab.active { background: var(--card-2); color: var(--text); }
.support-fab-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.support-panel { position: fixed; right: 24px; bottom: 96px; z-index: 3000; width: 360px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 130px); background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.55); display: flex; flex-direction: column; overflow: hidden; }
.support-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px;
  background: var(--bg-3); border-bottom: 1px solid var(--border); }
.support-title { font-weight: 700; font-size: 16px; }
.support-sub { color: var(--text-mute); font-size: 12px; }
.support-close { background: none; border: none; color: var(--text-mute); font-size: 24px; cursor: pointer; line-height: 1; }
.support-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.support-empty { color: var(--text-mute); font-size: 14px; text-align: center; margin: auto; }
.support-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--bg-3); }
.support-input input { flex: 1; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; font-family: inherit; }
.support-input input:focus { border-color: var(--accent); }
.support-send { background: var(--accent); border: none; color: #06121a; border-radius: 10px; width: 42px; cursor: pointer; display: grid; place-items: center; }

/* chat bubbles (shared by widget + admin) */
.sup-msg { display: flex; flex-direction: column; max-width: 80%; }
.sup-msg.me { align-self: flex-end; align-items: flex-end; }
.sup-msg.them { align-self: flex-start; align-items: flex-start; }
.sup-bubble { padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
.sup-msg.me .sup-bubble { background: var(--accent); color: #06121a; border-bottom-right-radius: 4px; }
.sup-msg.them .sup-bubble { background: var(--card-2); color: var(--text); border-bottom-left-radius: 4px; }
.sup-time { font-size: 10px; color: var(--text-mute); margin-top: 3px; }

/* ===== Admin Support (messenger) ===== */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; height: 560px; }
.chat-threads { border-right: 1px solid var(--border); overflow-y: auto; background: var(--bg-3); }
.chat-thread { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.chat-thread:hover { background: var(--card); }
.chat-thread.active { background: var(--card-2); }
.chat-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-thread-name { font-weight: 600; font-size: 14px; }
.chat-thread-last { color: var(--text-dim); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-time { color: var(--text-mute); font-size: 11px; margin-top: 2px; }
.chat-empty { color: var(--text-mute); font-size: 14px; padding: 20px; text-align: center; }
.chat-conversation { display: flex; flex-direction: column; min-width: 0; }
.chat-conv-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--bg-3); }
.chat-compose input { flex: 1; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; font-family: inherit; }
.chat-compose input:focus { border-color: var(--accent); }

@media (max-width: 700px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-threads { max-height: 200px; }
  .chat-messages { height: 320px; }
  .support-panel { right: 12px; left: 12px; width: auto; }
}
