/* ═══════════════════════════════════════════════════════════════
   NexaOTP v8 — Complete Professional SaaS UI
   Dark Cyber Default · Midnight Glass · Minimal Pro · Neon Matrix
   ═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ────────────────────────────────────────────── */
:root {
  --primary: #7c3aed;
  --primary-h: #6d28d9;
  --primary-glow: rgba(124,58,237,0.35);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6,182,212,0.3);
  --blue: #3b82f6;
  --pink: #ec4899;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --orange: #f97316;

  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #18181f;
  --bg4: #1e1e28;
  --panel: #13131a;
  --panel2: #1a1a24;
  --card: #16161f;
  --card2: #1c1c28;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --muted: #475569;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px var(--primary-glow);

  --font-head: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Poppins', 'Inter', system-ui, sans-serif;

  --sidebar-w: 240px;
  --topbar-h: 60px;

  --transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);

  --purple: #8b5cf6;
  --mono: 'Courier New', 'Fira Code', monospace;
  --yellow-dim: rgba(245,158,11,0.15);
  --cyan-dim: rgba(6,182,212,0.15);
  --green-dim: rgba(16,185,129,0.15);
  --red-dim: rgba(239,68,68,0.15);
}

/* ── LIGHT THEME ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg: #f1f5f9; --bg2: #e2e8f0; --bg3: #fff; --bg4: #f8fafc;
  --panel: #fff; --panel2: #f8fafc; --card: #fff; --card2: #f1f5f9;
  --border: rgba(0,0,0,0.08); --border2: rgba(0,0,0,0.12);
  --text: #0f172a; --text2: #334155; --text3: #64748b; --muted: #94a3b8;
}

/* ── MIDNIGHT GLASS THEME ────────────────────────────────────── */
[data-theme="glass"] {
  --bg: #0d0d1a; --bg2: #0f0f20; --bg3: rgba(20,20,40,0.9);
  --panel: rgba(255,255,255,0.04); --card: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.1); --border2: rgba(255,255,255,0.15);
  --text: #e0e7ff; --text2: #a5b4fc; --text3: #818cf8;
}

/* ── NEON MATRIX THEME ───────────────────────────────────────── */
[data-theme="matrix"] {
  --bg: #020809; --bg2: #030e0a; --bg3: #071410; --bg4: #0a1a12;
  --panel: #071410; --card: #0a1a12; --card2: #0d201a;
  --border: rgba(0,255,128,0.12); --border2: rgba(0,255,128,0.2);
  --text: #ccffe8; --text2: #67e8a0; --text3: #4ade80;
  --muted: #2d6a4f; --cyan: #00ff80; --primary: #00e060;
  --primary-glow: rgba(0,255,128,0.3);
}

[data-theme="matrix"] body { background-image: radial-gradient(ellipse at 20% 50%, rgba(0,255,128,0.03) 0%, transparent 70%), radial-gradient(ellipse at 80% 50%, rgba(0,200,80,0.03) 0%, transparent 70%); }

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; background: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

/* ── ROOT PAGES ──────────────────────────────────────────────── */
.root-page { min-height: 100vh; }

/* ════════════════════════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════════════════════════ */
.land-nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 68px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.land-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.08em; color: var(--text); font-family: var(--font-head); }
.logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--cyan)); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; box-shadow: 0 0 16px var(--primary-glow); }
.logo-icon.sm { width: 28px; height: 28px; font-size: 0.85rem; border-radius: 7px; }
.land-nav-links { display: flex; align-items: center; gap: 24px; }
.land-nav-links span { color: var(--text2); cursor: pointer; font-size: 0.88rem; font-weight: 500; transition: var(--transition); }
.land-nav-links span:hover { color: var(--text); }
.lnav-hbg { display: none; color: var(--text); font-size: 1.2rem; padding: 8px; background: var(--bg3); border-radius: 8px; border: 1px solid var(--border); }
.lnav-mobile { display: none; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.lnav-mobile a { padding: 10px 14px; border-radius: 8px; color: var(--text2); display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.lnav-mobile a:hover { background: var(--bg3); color: var(--text); }
.lnav-mobile.open { display: flex; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 32px 80px; min-height: 88vh;
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-glow {
  position: absolute; top: -30%; left: 10%; width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(124,58,237,0.18) 0%, transparent 70%);
  animation: heroGlow 6s ease-in-out infinite alternate;
}
.hero-glow::after {
  content: ''; position: absolute; right: -30%; top: 20%; width: 50%; height: 70%;
  background: radial-gradient(ellipse, rgba(6,182,212,0.12) 0%, transparent 70%);
}
@keyframes heroGlow { 0% { transform: scale(1) rotate(0deg); } 100% { transform: scale(1.15) rotate(8deg); } }
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.25); border-radius: 100px; font-size: 0.75rem; color: var(--cyan); margin-bottom: 24px; font-weight: 600; letter-spacing: 0.03em; }
.dot-live { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); } 50% { box-shadow: 0 0 0 5px rgba(16,185,129,0); } }
.hero-h1 { font-family: var(--font-head); font-size: clamp(2.2rem,5vw,3.8rem); font-weight: 900; line-height: 1.12; color: var(--text); margin-bottom: 20px; }
.hero-h1 em { font-style: normal; background: linear-gradient(135deg, var(--primary), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--text2); font-size: 1.05rem; line-height: 1.75; margin-bottom: 32px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hstat { text-align: center; }
.hstat-num { display: block; font-size: 1.5rem; font-weight: 900; font-family: var(--font-head); color: var(--text); }
.hstat-lbl { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.hstat-div { width: 1px; height: 40px; background: var(--border); }

/* PHONE MOCK */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.phone-mock {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124,58,237,0.15);
}
.pm-header { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; color: var(--cyan); letter-spacing: 0.06em; margin-bottom: 20px; }
.pm-num-box, .pm-otp-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.pm-label { font-size: 0.68rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.pm-number { font-size: 1.2rem; font-weight: 800; color: var(--cyan); font-family: monospace; }
.pm-otp-val { font-size: 2rem; font-weight: 900; color: var(--green); font-family: monospace; letter-spacing: 0.1em; }
.pm-otp-msg { font-size: 0.72rem; color: var(--text3); margin-top: 4px; }
.pm-status { font-size: 0.7rem; color: var(--text3); display: flex; align-items: center; gap: 6px; }

/* SECTIONS */
.land-section { padding: 80px 32px; }
.sec-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 12px; }
.sec-title { font-family: var(--font-head); font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 900; color: var(--text); margin-bottom: 14px; }
.sec-sub { color: var(--text2); font-size: 1.02rem; margin-bottom: 48px; max-width: 560px; line-height: 1.7; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; max-width: 1080px; margin: 0 auto; }
.feat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: var(--transition-slow); }
.feat-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: var(--shadow); }
.fic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 16px; }
.fic-c { background: rgba(6,182,212,0.15); color: var(--cyan); }
.fic-g { background: rgba(16,185,129,0.15); color: var(--green); }
.fic-p { background: rgba(124,58,237,0.15); color: var(--primary); }
.fic-o { background: rgba(249,115,22,0.15); color: var(--orange); }
.fic-y { background: rgba(245,158,11,0.15); color: var(--yellow); }
.fic-r { background: rgba(239,68,68,0.15); color: var(--red); }
.feat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feat-card p { font-size: 0.85rem; color: var(--text2); line-height: 1.65; }

/* PRICING */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; position: relative; transition: var(--transition-slow); }
.price-card.featured { border-color: var(--primary); background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.06)); box-shadow: 0 0 40px rgba(124,58,237,0.2); }
.pc-top-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--cyan)); color: #fff; padding: 4px 16px; border-radius: 100px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.pc-plan { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--text3); margin-bottom: 12px; }
.pc-price { font-size: 2.8rem; font-weight: 900; color: var(--text); font-family: var(--font-head); margin-bottom: 24px; }
.pc-price sup { font-size: 1.2rem; vertical-align: super; }
.pc-price span { font-size: 1rem; color: var(--text3); font-weight: 400; }
.pc-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pc-features li { display: flex; align-items: center; gap: 10px; font-size: 0.87rem; color: var(--text2); }
.pc-features li i { color: var(--green); font-size: 0.75rem; }
.land-cta-btn { width: 100%; justify-content: center; padding: 12px; font-size: 0.9rem; }

/* FAQ */
.faq-list { max-width: 720px; display: flex; flex-direction: column; gap: 10px; }
.faq-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.faq-card:hover { border-color: var(--border2); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.faq-q i { transition: transform 0.2s; color: var(--text3); font-size: 0.8rem; }
.faq-ans { display: none; padding: 0 20px 18px; color: var(--text2); font-size: 0.87rem; line-height: 1.7; }
.faq-card.open .faq-ans { display: block; }
.faq-card.open .faq-q i { transform: rotate(45deg); }

/* FOOTER */
.land-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 40px 32px; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 1rem; color: var(--text); margin-bottom: 12px; }
.land-footer p { color: var(--text3); font-size: 0.82rem; margin-bottom: 16px; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-links span { color: var(--text3); font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.footer-links span:hover { color: var(--text); }

/* ════════════════════════════════════════════════════════════════
   AUTH PAGE
   ════════════════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: flex-start; justify-content: center;
  padding: 24px; position: relative; overflow-y: auto;
  background: radial-gradient(ellipse at 30% 50%, rgba(124,58,237,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(6,182,212,0.1) 0%, transparent 60%),
              var(--bg);
}
/* Center vertically only when content fits in viewport */
@supports (min-height: 100dvh) { .auth-wrap { min-height: 100dvh; } }
.auth-wrap::before { content:''; flex:1; min-height:24px; }
.auth-wrap::after  { content:''; flex:1; min-height:24px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124,58,237,0.12);
  position: relative; z-index: 1;
  margin: auto 0;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-logo-text { font-family: var(--font-head); font-size: 1.3rem; font-weight: 900; letter-spacing: 0.08em; }
.auth-logo-sub { font-size: 0.72rem; color: var(--text3); }
.auth-title { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-sub { color: var(--text2); font-size: 0.85rem; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.82rem; color: var(--text3); }
.auth-footer a { color: var(--cyan); font-weight: 600; cursor: pointer; }

/* ════════════════════════════════════════════════════════════════
   APP LAYOUT
   ════════════════════════════════════════════════════════════════ */
#page-app { display: none; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-head); font-size: 0.95rem; font-weight: 900; letter-spacing: 0.08em; line-height: 1.2; }
.brand-ver { font-size: 0.6rem; color: var(--text3); letter-spacing: 0.08em; }
.role-chip {
  margin: 10px 14px 8px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  width: fit-content;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
}
.side-nav { flex: 1; overflow-y: auto; padding: 8px 10px; min-height: 0; }
.side-nav::-webkit-scrollbar { width: 3px; }
.nav-section-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
  padding: 10px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--text2);
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active {
  background: rgba(124,58,237,0.15);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.82rem; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 0.58rem; font-weight: 700; padding: 2px 6px; border-radius: 100px; min-width: 18px; text-align: center; }

.sidebar-foot {
  padding: 12px 10px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--panel);
  min-height: fit-content;
}
.sidebar-bal {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-bal:hover { border-color: var(--cyan); }
.sidebar-bal > i { color: var(--cyan); font-size: 0.9rem; }
.sbal-texts { display: flex; flex-direction: column; }
.sbal-lbl { font-size: 0.62rem; color: var(--text3); }
.sbal-val { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.btn-logout2 {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px;
  border-radius: 9px;
  color: var(--text3);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
}
.btn-logout2:hover { background: rgba(239,68,68,0.12); color: var(--red); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; backdrop-filter: blur(2px); }
.sidebar-overlay.show { display: block; }
.sidebar.mobile-open { transform: translateX(0) !important; }

/* MAIN AREA */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* TOPBAR */
.top-bar {
  height: var(--topbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.tb-left { display: flex; align-items: center; gap: 14px; }
.hamburger { display: none; width: 36px; height: 36px; border-radius: 8px; color: var(--text2); font-size: 1rem; align-items: center; justify-content: center; transition: var(--transition); background: var(--bg3); border: 1px solid var(--border); }
.hamburger:hover { color: var(--text); }
.tb-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--text); }
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-balance {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
}
.tb-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 0.9rem;
  background: var(--bg3); border: 1px solid var(--border);
  transition: var(--transition);
}
.tb-icon:hover { color: var(--text); border-color: var(--border2); }
.avatar-wrap { position: relative; }
/* topbar-avatar defined below in FIX 4 */
.user-drop {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column;
  overflow: hidden; z-index: 500;
}
.user-drop.open { display: flex; }
.ud-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.ud-name { font-weight: 700; font-size: 0.88rem; }
.ud-role { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.ud-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text2); font-size: 0.83rem; cursor: pointer; transition: var(--transition); }
.ud-item:hover { background: var(--bg3); color: var(--text); }
.ud-item.danger:hover { background: rgba(239,68,68,0.1); color: var(--red); }
.ud-sep { height: 1px; background: var(--border); }

/* PAGE BODY */
.page-body { flex: 1; padding: 24px 20px; overflow-y: auto; }
.pg-hdr { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.pg-hdr h1 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.pg-hdr h1 i { color: var(--primary); font-size: 1.1rem; }
.pg-hdr .pg-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════════
   COMPONENTS
   ════════════════════════════════════════════════════════════════ */

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none; outline: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text2); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: rgba(124,58,237,0.08); }
.btn-success { background: linear-gradient(135deg, #10b981,#059669); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ef4444,#dc2626); color: #fff; }
.btn-warn { background: linear-gradient(135deg, #f59e0b,#d97706); color: #fff; }
.btn-ghost { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.btn-ghost:hover { background: var(--bg4); color: var(--text); }
.btn-cyan { background: linear-gradient(135deg, var(--cyan),#0891b2); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 0.78rem; border-radius: 7px; gap: 6px; }
.btn-lg { padding: 13px 26px; font-size: 0.97rem; border-radius: 11px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; justify-content: center; }

/* CARDS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border2); }
.card-title { font-size: 0.8rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.card-title i { font-size: 0.75rem; }

/* STAT CARDS */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sc-color, var(--primary)), transparent);
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.sc-label { font-size: 0.7rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.sc-value { font-family: var(--font-head); font-size: 1.7rem; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 6px; }
.sc-sub { font-size: 0.72rem; color: var(--text3); }
.sc-icon { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }

/* FORM ELEMENTS */
.fg { display: flex; flex-direction: column; gap: 5px; }
.fl { font-size: 0.78rem; font-weight: 600; color: var(--text3); }
.iw { position: relative; }
.ii { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 0.82rem; pointer-events: none; }
.inp {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.87rem;
  transition: var(--transition);
}
.iw .inp { padding-left: 34px; }
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.inp::placeholder { color: var(--text3); }
select.inp { cursor: pointer; }
textarea.inp { resize: vertical; min-height: 80px; }

/* TABLES */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.tbl th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--bg3); }
.tbl-mono { font-family: monospace; font-size: 0.85rem; }

/* BADGES */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.badge-cyan { background: rgba(6,182,212,0.15); color: var(--cyan); border: 1px solid rgba(6,182,212,0.25); }
.badge-purple { background: rgba(124,58,237,0.15); color: var(--primary); border: 1px solid rgba(124,58,237,0.25); }
.badge-gray { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

/* ALERTS */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 12px;
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); color: #93c5fd; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); color: #6ee7b7; }
.alert-warn { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #fcd34d; }
.alert-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }

/* MODALS */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-lg { max-width: 720px; }
.modal-box { /* alias used by openModal() JS */
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-hdr h3 { font-size: 1.05rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-close { color: var(--text3); font-size: 1.1rem; cursor: pointer; padding: 4px; transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* TOAST */
#toast-cnt { position: fixed; bottom: 24px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.84rem;
  animation: toastIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  color: var(--text);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(0.95); } to { opacity: 1; transform: none; } }
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.success i { color: var(--green); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.error i { color: var(--red); }
.toast.warn { border-color: rgba(245,158,11,0.4); }
.toast.warn i { color: var(--yellow); }
.toast i { font-size: 0.9rem; flex-shrink: 0; }

/* COPY BUTTON */
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text3);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}
.copy-btn:hover { background: var(--bg4); color: var(--cyan); border-color: var(--cyan); }
.copy-btn.copied { background: rgba(16,185,129,0.15); color: var(--green); border-color: var(--green); }
.copy-btn.failed { background: rgba(239,68,68,0.15); color: var(--red); border-color: var(--red); }

/* SPINNER */
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border2); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spin-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* SKELETON */
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* SEPARATOR */
.sep { height: 1px; background: var(--border); margin: 16px 0; }

/* TOGGLE SWITCH */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 42px; height: 22px;
  background: var(--bg4);
  border-radius: 11px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle.on { background: var(--primary); border-color: var(--primary); }
.toggle::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle.on::after { left: calc(100% - 18px); }
.toggle-label { font-size: 0.82rem; color: var(--text2); }

/* PAGINATION */
.pag { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pag-btn {
  padding: 6px 12px; border-radius: 7px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: 0.78rem;
  cursor: pointer; transition: var(--transition);
}
.pag-btn:hover { border-color: var(--primary); color: var(--primary); }
.pag-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pag-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* TABS */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; gap: 4px; overflow-x: auto; }
.tab {
  padding: 10px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-state i { font-size: 2.5rem; margin-bottom: 14px; display: block; opacity: 0.5; }
.empty-state p { font-size: 0.88rem; }

/* CHART CONTAINER */
.chart-wrap { position: relative; height: 220px; }

/* OTP LOG */
.otp-log-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  font-size: 0.82rem;
  position: relative;
}
.otp-log-item:hover { background: var(--bg3); }
.oli-time { font-size: 0.72rem; color: var(--text3); font-family: monospace; }
.oli-num { font-weight: 700; color: var(--cyan); font-family: monospace; font-size: 0.88rem; }
.oli-carrier { color: var(--text3); font-size: 0.72rem; }
.oli-otp { font-family: monospace; font-weight: 900; font-size: 1rem; color: var(--green); letter-spacing: 0.05em; }
.oli-msg { color: var(--text3); font-size: 0.75rem; line-height: 1.4; }
.oli-service { position: absolute; right: 14px; top: 12px; }
.oli-earn { color: var(--green); font-size: 0.72rem; font-weight: 700; }

/* ACTIVITY ANALYSIS */
.activity-report {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.ar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ar-time { font-size: 0.72rem; color: var(--text3); font-family: monospace; }
.ar-title { font-size: 0.82rem; font-weight: 700; }
.ar-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.ar-stat { text-align: center; }
.ar-stat-val { font-size: 1.1rem; font-weight: 800; color: var(--text); display: block; }
.ar-stat-lbl { font-size: 0.65rem; color: var(--text3); }

/* NUMBER DISPLAY */
.num-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.num-value { font-family: monospace; font-size: 1.4rem; font-weight: 900; color: var(--cyan); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.num-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.76rem; color: var(--text3); }
.num-meta span { display: flex; align-items: center; gap: 4px; }
.otp-result {
  background: linear-gradient(135deg,rgba(16,185,129,0.12),rgba(6,182,212,0.06));
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}
.otp-digits { font-family: monospace; font-size: 2.4rem; font-weight: 900; color: var(--green); letter-spacing: 0.15em; }

/* PROGRESS BAR */
.prog-bar { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* OWNER CONSOLE */
.console-box {
  background: #0a0a0a;
  border: 1px solid rgba(0,255,128,0.15);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  height: 340px;
  overflow-y: auto;
  padding: 12px;
  position: relative;
}
.console-box::-webkit-scrollbar { width: 4px; }
.console-line { display: flex; gap: 8px; line-height: 1.5; margin-bottom: 2px; }
.cl-time { color: #6b7280; flex-shrink: 0; }
.cl-num { color: #06b6d4; }
.cl-platform { color: #a855f7; }
.cl-otp { color: #22c55e; font-weight: 800; }
.cl-msg { color: #94a3b8; }
.console-cursor { display: inline-block; width: 8px; height: 14px; background: #22c55e; animation: blink 1s step-end infinite; margin-left: 4px; vertical-align: middle; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* DASHBOARD GRID */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.dash-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid-3 { grid-template-columns: 1fr; } }

/* MISSION */
.mission-card { background: linear-gradient(135deg,rgba(124,58,237,0.12),rgba(6,182,212,0.06)); border: 1px solid rgba(124,58,237,0.25); border-radius: var(--radius-lg); padding: 20px; }

/* OWNER MONITOR */
.monitor-live {
  background: #06040a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mon-header { background: var(--bg3); border-bottom: 1px solid var(--border); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.mon-body { height: 280px; overflow-y: auto; }
.mon-entry { padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.78rem; font-family: monospace; }
.mon-entry:hover { background: rgba(255,255,255,0.02); }

/* SETTINGS PANEL */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 14px; }
.settings-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.settings-card h3 { font-size: 0.88rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.settings-row:last-child { border-bottom: none; }
.sr-label { font-size: 0.82rem; color: var(--text2); flex: 1; }
.sr-desc { font-size: 0.7rem; color: var(--text3); }

/* THEME SWITCHER */
.theme-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-pill {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  transition: var(--transition);
}
.theme-pill:hover { border-color: var(--border2); color: var(--text); }
.theme-pill.active { border-color: var(--primary); color: var(--primary); background: rgba(124,58,237,0.1); }

/* REVENUE PAGE */
.rev-summary { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; margin-bottom: 20px; }

/* BROADCAST */
.broadcast-target-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.broadcast-target-btns .btn { border: 1.5px solid var(--border); background: var(--bg3); color: var(--text2); }
.broadcast-target-btns .btn.selected { border-color: var(--primary); color: var(--primary); background: rgba(124,58,237,0.1); }

/* GLASS THEME SPECIFIC */
[data-theme="glass"] .card,
[data-theme="glass"] .sidebar,
[data-theme="glass"] .top-bar,
[data-theme="glass"] .auth-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
[data-theme="glass"] body {
  background: radial-gradient(ellipse at 20% 30%, rgba(124,58,237,0.2) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 70%, rgba(6,182,212,0.15) 0%, transparent 60%),
              #0d0d1a;
}

/* AGENTS COMMISSION DISPLAY */
.comm-info {
  background: linear-gradient(135deg,rgba(6,182,212,0.08),rgba(124,58,237,0.06));
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.comm-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; margin-bottom: 6px; }
.comm-row:last-child { margin-bottom: 0; }
.comm-row span:first-child { color: var(--text3); }
.comm-row span:last-child { font-weight: 700; color: var(--text); }
.comm-profit { color: var(--green) !important; }

/* RANGE SELECTOR */
.range-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(100px,1fr)); gap: 8px; margin-bottom: 16px; }
.range-btn {
  padding: 8px 10px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: monospace;
}
.range-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.range-btn.selected { border-color: var(--cyan); background: rgba(6,182,212,0.1); color: var(--cyan); }

/* COUNTRY FLAG EMOJIS */
.country-flag { font-size: 1.1rem; margin-right: 4px; }

/* PLATFORM BREAKDOWN BARS */
.plat-bar-item { margin-bottom: 10px; }
.plat-bar-label { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--text2); margin-bottom: 4px; }
.plat-bar-track { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.plat-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .main-area { margin-left: 0; }
  .hamburger { display: flex; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .land-nav-links { display: none; }
  .lnav-hbg { display: flex; }
}
@media (max-width: 600px) {
  :root { --topbar-h: 54px; }
  .page-body { padding: 16px 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .land-section { padding: 56px 16px; }
  .auth-card { padding: 24px 20px; }
  .hero { padding: 60px 16px 40px; }
  .modal { padding: 20px; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .pag { gap: 4px; }
  .settings-grid { grid-template-columns: 1fr; }
  #toast-cnt { right: 8px; left: 8px; max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════
   OWNER SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.owner-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.oqa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-width: 80px;
  text-align: center;
}
.oqa-btn i { font-size: 1.1rem; color: var(--primary); }
.oqa-btn span { font-size: 0.7rem; color: var(--text3); }
.oqa-btn:hover { border-color: var(--primary); background: rgba(124,58,237,0.08); }

/* SYS HEALTH BARS */
.sys-metric { margin-bottom: 12px; }
.sys-metric-top { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 5px; }
.sys-metric-name { color: var(--text2); }
.sys-metric-val { color: var(--text); font-weight: 700; }

/* ANNOUNCEMENT BANNER */
.announcement-bar {
  background: linear-gradient(90deg, rgba(124,58,237,0.2), rgba(6,182,212,0.1));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}
.announcement-bar i { color: var(--yellow); flex-shrink: 0; }

/* FILTERS BAR */
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-chip {
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text2);
  cursor: pointer;
  transition: var(--transition);
}
.filter-chip:hover { border-color: var(--border2); color: var(--text); }
.filter-chip.active { background: rgba(124,58,237,0.15); border-color: var(--primary); color: var(--primary); }

/* SEARCH INPUT */
.search-inp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 14px;
}
.search-inp i { color: var(--text3); font-size: 0.82rem; }
.search-inp input { background: none; border: none; outline: none; color: var(--text); font-size: 0.84rem; width: 200px; }
.search-inp input::placeholder { color: var(--text3); }

/* TICKET */
.ticket-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; transition: var(--transition); }
.ticket-card:hover { border-color: var(--border2); }
.ticket-subj { font-weight: 700; margin-bottom: 6px; }
.ticket-msg { font-size: 0.83rem; color: var(--text2); margin-bottom: 10px; }
.ticket-reply { background: var(--bg3); border-radius: 8px; padding: 10px 12px; font-size: 0.82rem; color: var(--cyan); border-left: 3px solid var(--cyan); }

/* ═══════════════════════════════════════════════════════════
   GET NUMBER PAGE — New Layout (Screenshots reference)
   ═══════════════════════════════════════════════════════════ */

/* Two-panel layout */
.gn-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: start;
}
@media(max-width:768px) { .gn-layout { grid-template-columns: 1fr; } }

/* LEFT PANEL */
.gn-left { display: flex; flex-direction: column; gap: 10px; }
.gn-search-wrap .inp { width: 100%; }
.gn-filter-btns { display: flex; flex-direction: column; gap: 6px; }
.gn-fbtn {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); padding: 9px 12px; border-radius: 8px;
  font-size: .81rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.gn-fbtn:hover { border-color: var(--cyan); color: var(--cyan); }
.gn-fbtn.active { background: rgba(6,182,212,.12); border-color: var(--cyan); color: var(--cyan); }

/* Success rate box */
.gn-rate-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-top: 4px;
}
.gn-rate-lbl { font-size: .62rem; color: var(--muted); font-weight: 700; letter-spacing: 1px; margin-bottom: 4px; }
.gn-rate-val { font-size: 1.4rem; font-weight: 900; color: var(--yellow); margin-bottom: 8px; }
.gn-rate-bar { height: 5px; background: var(--bg3); border-radius: 50px; overflow: hidden; }
.gn-rate-fill { height: 100%; border-radius: 50px; transition: width .4s; }

/* Stat rows */
.gn-stat-row { display: flex; }
.gn-stat-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; font-size: .82rem;
}
.gn-stat-item span { color: var(--text2); display: flex; align-items: center; gap: 7px; }
.gn-stat-item strong { font-weight: 800; font-size: 1rem; }
.gn-stat-item.success { border-left: 3px solid var(--green); }
.gn-stat-item.success strong { color: var(--green); }
.gn-stat-item.failed { border-left: 3px solid var(--red); }
.gn-stat-item.failed strong { color: var(--red); }
.gn-stat-item.pending { border-left: 3px solid var(--yellow); }
.gn-stat-item.pending strong { color: var(--yellow); }

/* RIGHT PANEL */
.gn-right { display: flex; flex-direction: column; gap: 12px; }

/* Range input card */
.gn-input-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.gn-input-label {
  font-size: .65rem; font-weight: 700; color: var(--cyan);
  letter-spacing: 1px; margin-bottom: 10px;
}
.gn-range-wrap {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 2px 12px; margin-bottom: 12px;
  transition: border-color .15s;
}
.gn-range-wrap:focus-within { border-color: var(--cyan); }
.gn-range-icon { color: var(--cyan); font-size: .9rem; margin-right: 8px; flex-shrink: 0; }
.gn-range-inp {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 1rem;
  font-weight: 700; padding: 10px 0; letter-spacing: 1px;
}
.gn-fmt-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.gn-chk {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--text2); cursor: pointer;
}
.gn-get-btn {
  margin-left: auto; padding: 10px 22px !important;
  font-size: .88rem !important;
}

/* History card */
.gn-hist-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.gn-hist-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.gn-hist-cols {
  display: grid; grid-template-columns: 1.8fr 1.2fr 1.2fr 0.8fr;
  gap: 8px; flex: 1; font-size: .65rem; font-weight: 700;
  color: var(--muted); letter-spacing: .5px; text-transform: uppercase;
}

/* History rows */
.gn-row {
  display: grid; grid-template-columns: 1.8fr 1.2fr 1.2fr 0.8fr;
  gap: 8px; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.gn-row:hover { background: rgba(255,255,255,.02); }
.gn-row:last-child { border-bottom: none; }

.gn-row-num {}
.gn-num-text {
  font-family: var(--mono); font-size: .88rem; font-weight: 700;
  color: var(--text); transition: color .15s;
}
.gn-num-text:hover { color: var(--cyan); }

/* Status badges */
.gn-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 50px; font-size: .63rem; font-weight: 800;
  letter-spacing: .3px;
}
.gn-badge.success { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.gn-badge.failed  { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.gn-badge.pending { background: rgba(245,158,11,.15); color: var(--yellow); border: 1px solid rgba(245,158,11,.25); }

.gn-row-otp {}
.gn-otp-val {
  font-family: var(--mono); font-size: .95rem; font-weight: 900;
  color: var(--green); letter-spacing: 1px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity .15s;
}
.gn-otp-val:hover { opacity: .75; }
.gn-sms-lbl { font-size: .68rem; color: var(--muted); }

/* OTP line format: ✅ OTP 1: 680639 [Copy] */
.gn-otp-line {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 3px;
}
.gn-otp-label {
  font-size: .7rem; color: var(--text3); font-weight: 600;
  white-space: nowrap;
}
.gn-otp-copy-btn {
  padding: 1px 7px !important; font-size: .62rem !important;
  border-radius: 5px !important; height: auto !important;
  line-height: 1.6 !important; opacity: .75;
  transition: opacity .15s;
}
.gn-otp-copy-btn:hover { opacity: 1; }
.gn-otp-copy-btn.copied { background: rgba(16,185,129,.2) !important; color: var(--green) !important; }

/* Skeleton loading rows for search */
.gn-row-skeleton {
  display: grid; grid-template-columns: 1.8fr 1.2fr 1.2fr 0.8fr;
  gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.skel-col {
  height: 38px; border-radius: 7px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.skel-wide  { width: 90%; }
.skel-med   { width: 70%; }
.skel-narrow { width: 50%; margin-left: auto; }

/* New row fade-in */
@keyframes shakeInput { 0%,100%{transform:translateX(0)} 15%{transform:translateX(-6px)} 30%{transform:translateX(6px)} 45%{transform:translateX(-5px)} 60%{transform:translateX(5px)} 75%{transform:translateX(-3px)} 90%{transform:translateX(3px)} }
.shake { animation: shakeInput 0.6s ease; }
@keyframes gnRowFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gn-row-country {}
.gn-row-timer { text-align: right; }

.gn-date-footer {
  padding: 10px 16px; text-align: center;
  font-size: .7rem; color: var(--muted); border-top: 1px solid var(--border);
  letter-spacing: .5px;
}

/* ═══════════════════════════════════════════════════════════
   DEV API PAGE STYLES
   ═══════════════════════════════════════════════════════════ */
.api-ref-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 14px; }

.api-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.api-card-hdr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.api-method {
  padding: 2px 8px; border-radius: 4px; font-size: .68rem;
  font-weight: 800; font-family: var(--mono);
}
.api-method.post { background: rgba(16,185,129,.15); color: var(--green); }
.api-method.get  { background: rgba(6,182,212,.15); color: var(--cyan); }
.api-path { font-family: var(--mono); font-size: .78rem; color: var(--text); }
.api-desc { font-size: .74rem; color: var(--muted); margin-left: auto; }
.api-section-lbl { font-size: .63rem; font-weight: 700; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; }
.api-code {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-family: var(--mono); font-size: .76rem;
  color: var(--text2); line-height: 1.7; white-space: pre; overflow-x: auto;
}
.api-comment { color: var(--muted); font-style: italic; }
.api-hl { color: var(--yellow); }

/* Language tabs */
.api-lang-tabs { display: flex; gap: 4px; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.api-lang {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 8px 14px; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .15s; margin-bottom: -1px;
}
.api-lang:hover { color: var(--text); }
.api-lang.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.api-code-block {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 0 0 10px 10px; padding: 16px 18px;
  font-family: var(--mono); font-size: .77rem; color: var(--text2);
  line-height: 1.8; white-space: pre; overflow-x: auto;
}

/* Toggle switch (for settings page) */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 50px; transition: .25s;
}
.toggle-slider:before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 2px; top: 2px; background: var(--muted); border-radius: 50%; transition: .25s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(6,182,212,.2); border-color: var(--cyan); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); background: var(--cyan); }

/* ═══════════════════════════════════════════════════════════
   MISSING CLASSES FROM v7 — Complete Fix
   ═══════════════════════════════════════════════════════════ */

/* NAV LINK (v7 sidebar uses nav-link not nav-item) */
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
  color: var(--text2); font-size: 0.83rem; font-weight: 500;
  margin-bottom: 2px; transition: var(--transition); position: relative;
}
.nav-link:hover { background: var(--bg3); color: var(--text); }
.nav-link.active { background: rgba(124,58,237,0.15); color: var(--primary); font-weight: 600; }
.nav-link.active::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; background: var(--primary); border-radius: 0 3px 3px 0; }
.nav-link i { width: 18px; text-align: center; font-size: 0.82rem; }
.nl-label { flex: 1; }
.nl-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 0.58rem; font-weight: 700; padding: 2px 6px; border-radius: 100px; min-width: 18px; text-align: center; }
.nav-sec-lbl { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text3); padding: 10px 8px 4px; }

/* STATS GRID (v7 style) */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 12px; margin-bottom: 16px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: var(--transition); cursor: default;
  border-left: 3px solid transparent;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.stat-card.sc-c { border-left-color: var(--cyan); }
.stat-card.sc-g { border-left-color: var(--green); }
.stat-card.sc-y { border-left-color: var(--yellow); }
.stat-card.sc-r { border-left-color: var(--red); }
.stat-card.sc-p { border-left-color: var(--primary); }
.stat-card.sc-o { border-left-color: var(--orange); }
.stat-ico {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.si-c { background: rgba(6,182,212,0.15); color: var(--cyan); }
.si-g { background: rgba(16,185,129,0.15); color: var(--green); }
.si-y { background: rgba(245,158,11,0.15); color: var(--yellow); }
.si-r { background: rgba(239,68,68,0.15); color: var(--red); }
.si-p { background: rgba(124,58,237,0.15); color: var(--primary); }
.si-o { background: rgba(249,115,22,0.15); color: var(--orange); }
.stat-body h4 { font-size: 0.72rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.stat-body p { font-size: 1.2rem; font-weight: 800; color: var(--text); font-family: var(--font-head); }

/* CHART GRID */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media(max-width:700px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart-lbl { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 0.78rem; font-weight: 600; color: var(--text2); }

/* CARD HDR (v7 style) */
.card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-hdr .card-title { margin-bottom: 0; }

/* TABLE WRAP */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.table-wrap table thead tr { border-bottom: 1px solid var(--border); }
.table-wrap table th { padding: 10px 12px; text-align: left; font-size: 0.68rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.table-wrap table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-wrap table tbody tr:last-child td { border-bottom: none; }
.table-wrap table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* INFO ROWS (profile page) */
.ir { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; }
.ir:last-child { border-bottom: none; }
.ir-lbl { color: var(--text3); font-size: 0.8rem; }
.ir-val { font-weight: 600; }

/* WALLET METHODS */
.wallet-methods { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 10px; }
.wm { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; transition: var(--transition); }
.wm:hover { border-color: var(--border2); }
.wm-top { display: flex; align-items: center; justify-content: space-between; }
.wm-lbl { font-size: 0.62rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.wm-logo { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 800; }
.wm-num { font-size: 0.72rem; color: var(--text2); font-family: monospace; word-break: break-all; }
.wm-num.empty { color: var(--text3); font-style: italic; }

/* CONSOLE ENTRIES (OTP console) */
.console-entries { padding: 8px 4px; max-height: 480px; overflow-y: auto; }
.ce {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px; margin-bottom: 4px;
  background: var(--bg3); border: 1px solid var(--border);
  transition: var(--transition);
}
.ce:hover { border-color: var(--border2); }
.ce-app-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.ce-left { flex: 1; min-width: 0; }
.ce-num { font-family: monospace; font-size: 0.84rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ce-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ce-tag { background: var(--bg4); color: var(--text3); font-size: 0.65rem; padding: 1px 7px; border-radius: 50px; font-weight: 600; }
.ce-sms-col { flex: 1.5; min-width: 0; }
.ce-sms-text { font-size: 0.75rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-time { font-size: 0.68rem; color: var(--text3); white-space: nowrap; flex-shrink: 0; }
.ce-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* RADAR (console bar chart) */
.radar-chart-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.radar-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.radar-hdr-title { font-size: 0.8rem; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 7px; }
.radar-live { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; font-weight: 700; color: var(--green); }
.radar-live-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: livePulse 2s ease-in-out infinite; }
.radar-search-wrap { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.radar-search { flex: 1; font-size: 0.82rem; color: var(--text); background: none; border: none; outline: none; }

/* NUMBER ROW (get-number table) */
.nr-num { font-family: monospace; font-size: 0.9rem; font-weight: 700; color: var(--text); }
.nr-otp-val {
  font-family: monospace; font-size: 1rem; font-weight: 800; color: var(--green);
  cursor: pointer; padding: 2px 8px; border-radius: 6px; background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2); letter-spacing: 1px; transition: var(--transition);
  display: inline-block;
}
.nr-otp-val:hover { background: rgba(16,185,129,0.2); }
.nr-row-border-s { border-left: 3px solid var(--green) !important; }
.nr-row-border-p { border-left: 3px solid var(--yellow) !important; }
.nr-row-border-f { border-left: 3px solid var(--red) !important; }

/* TIMER CHIP */
.timer-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--cyan); font-family: monospace; font-size: 0.82rem; font-weight: 700;
  padding: 4px 10px; border-radius: 7px; min-width: 56px; text-align: center;
}
.timer-chip.exp { color: var(--text3); border-color: transparent; }

/* HIST SELECT */
.hist-sel {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: 0.78rem; padding: 6px 10px;
  border-radius: 7px; cursor: pointer; outline: none;
}

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 12px 0 4px; }
.pg-btn {
  min-width: 34px; height: 34px; border-radius: 7px; font-size: 0.8rem; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);
}
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* LOG ENTRIES (system logs) */
.console-log-text { background: var(--bg); border-radius: var(--radius); padding: 8px 4px; font-family: monospace; font-size: 0.74rem; overflow-y: auto; }
.log-l { display: flex; gap: 8px; padding: 3px 10px; line-height: 1.6; border-bottom: 1px solid rgba(255,255,255,0.02); }
.log-l:hover { background: rgba(255,255,255,0.02); }
.log-t { color: var(--text3); flex-shrink: 0; min-width: 60px; }
.log-i { color: var(--text2); flex: 1; word-break: break-all; }
.log-f { color: var(--red); }
.log-p { color: var(--yellow); }
.log-warn { color: var(--yellow); }
.log-err  { color: var(--red); }

/* SECTION HEADER */
.section-hdr {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text3); margin: 16px 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.section-hdr::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* VAULT (agent wallet) */
.vault-card {
  background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(124,58,237,0.08));
  border: 1px solid rgba(6,182,212,0.25); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; margin-bottom: 14px;
}
.vault-lbl { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3); margin-bottom: 8px; }
.vault-amount { font-family: var(--font-head); font-size: 2.4rem; font-weight: 900; color: var(--cyan); }

/* LEADERBOARD */
.lb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; }
.lb-col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lb-col-hdr { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg3); }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.83rem; transition: var(--transition); }
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(255,255,255,0.02); }
.lb-rank { width: 26px; text-align: center; font-weight: 800; color: var(--text3); font-size: 0.82rem; flex-shrink: 0; }
.lb-rank.r1 { color: var(--yellow); }
.lb-rank.r2 { color: var(--text2); }
.lb-rank.r3 { color: var(--orange); }
.lb-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 600; }
.lb-score { font-family: monospace; font-weight: 700; color: var(--cyan); font-size: 0.82rem; }
.lb-tab { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: .76rem; font-weight: 600; color: var(--text2); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.lb-tab:hover { border-color: var(--cyan); color: var(--cyan); }
.lb-tab.active { background: rgba(0,212,255,.12); border-color: var(--cyan); color: var(--cyan); }

/* MY RANK BAR */
.my-rank-bar { display: flex; justify-content: center; }
.my-rank-pill { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 100px; padding: 8px 18px; font-size: 0.82rem; }
.mrp-rank { font-weight: 800; color: var(--cyan); }
.mrp-otp { color: var(--text2); }

/* MISSION CARD */
.mission-progress-wrap { margin-top: 8px; }
.mission-reward-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(249,115,22,0.1));
  border: 1px solid rgba(245,158,11,0.3); border-radius: 9px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 700; color: var(--yellow);
}

/* ENGINE ACCOUNT STATUS */
.acc-status-online { display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 0.78rem; font-weight: 600; }
.acc-status-error { color: var(--red); font-size: 0.78rem; font-weight: 600; }
.acc-status-idle { color: var(--text3); font-size: 0.78rem; }
.acc-err-detail { font-size: 0.68rem; color: var(--red); margin-top: 2px; }

/* MODAL BOX */
.modal-box {
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); width: 90%; max-width: 500px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.modal-title { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close { width: 28px; height: 28px; border-radius: 7px; color: var(--text3); font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); cursor: pointer; }
.modal-close:hover { background: rgba(239,68,68,0.12); color: var(--red); }

/* FGRID (2-col form) */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:500px) { .fgrid { grid-template-columns: 1fr; } }

/* AGENT WELCOME (agent dash) */
.champ-banner-main { 
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.08));
  border: 1px solid rgba(124,58,237,0.2); border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between;
}
.agent-welcome h2 { font-size: 1.2rem; font-weight: 800; }
.agent-welcome h2 span { color: var(--cyan); }
.agent-welcome p { color: var(--text2); font-size: 0.82rem; }
.agent-welcome-mail { color: var(--text3); font-size: 0.78rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; }

/* BADGE b- aliases (v7 style) */
.b-g { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.b-r { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.b-y { background: rgba(245,158,11,0.15); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.b-c { background: rgba(6,182,212,0.15); color: var(--cyan); border: 1px solid rgba(6,182,212,0.25); }
.b-p { background: rgba(124,58,237,0.15); color: var(--primary); border: 1px solid rgba(124,58,237,0.25); }
.b-m { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.badge.b-g,.badge.b-r,.badge.b-y,.badge.b-c,.badge.b-p,.badge.b-m { padding: 2px 9px; border-radius: 50px; font-size: 0.65rem; font-weight: 700; display: inline-flex; align-items: center; }

/* INP-SM */
.inp-sm { padding: 6px 10px !important; font-size: 0.8rem !important; }

/* EMPTY BTN SIZES */
.btn-xs { padding: 4px 10px !important; font-size: 0.72rem !important; border-radius: 6px !important; gap: 4px !important; }
.btn-icon.sm { width: 28px; height: 28px; }
.btn-purple { background: linear-gradient(135deg, #7c3aed,#6d28d9); color: #fff; }

/* PROGRESS BAR */
.prog-bar { height: 6px; background: var(--bg3); border-radius: 50px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 50px; transition: width 0.4s; }
.prog-fill.complete { background: linear-gradient(90deg, var(--green), #059669); }

/* ALERT (info/warn) */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; line-height: 1.6; margin-bottom: 12px; }
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-info { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.25); color: var(--cyan); }
.alert-warn { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: var(--yellow); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: var(--red); }

/* SEARCH INPUT */
.search-inp { display: flex; align-items: center; gap: 7px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; }
.search-inp input { background: none; border: none; outline: none; color: var(--text); font-size: 0.82rem; min-width: 120px; }
.search-inp i { color: var(--text3); font-size: 0.8rem; }

/* EMPTY STATE */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; color: var(--text3); text-align: center; }
.empty-state i { font-size: 2rem; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 0.85rem; }

/* SKELETON */
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 7px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* SPIN */
.spin { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-lg { width: 36px; height: 36px; border-width: 3px; }

/* FORM */
.fg { display: flex; flex-direction: column; gap: 5px; }
.fl { font-size: 0.73rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.inp {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.85rem;
  padding: 9px 12px; transition: var(--transition); width: 100%;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.inp::placeholder { color: var(--text3); }
.inp[disabled] { opacity: 0.55; cursor: not-allowed; }
.iw { position: relative; display: flex; align-items: center; }
.iw .inp { padding-left: 34px; }
.ii { position: absolute; left: 11px; color: var(--text3); font-size: 0.82rem; pointer-events: none; }
select.inp { cursor: pointer; }
textarea.inp { resize: vertical; min-height: 80px; }

/* TOAST */
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 8px;
  font-size: 0.83rem; font-weight: 500; min-width: 260px; max-width: 380px;
  box-shadow: var(--shadow); animation: toastIn .25s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: var(--green); }
.toast.error { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: var(--red); }
.toast.warn { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: var(--yellow); }
.toast.info { background: rgba(6,182,212,0.12); border-color: rgba(6,182,212,0.25); color: var(--cyan); }
#toast-cnt { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; pointer-events: none; }

/* SEP */
.sep { height: 1px; background: var(--border); margin: 12px 0; }

/* DASH GRID */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:768px) { .dash-grid { grid-template-columns: 1fr; } }

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 14px; }
.settings-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.settings-card h3 { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.sr-label { font-size: 0.83rem; font-weight: 600; }
.sr-desc { font-size: 0.73rem; color: var(--text3); margin-top: 2px; }

/* COMM (commission display) */
.comm-info { background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin-bottom: 12px; }
.comm-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; padding: 4px 0; }
.comm-profit { color: var(--green) !important; font-weight: 800; }

/* ANNOUNCEMENT BAR */
.announcement-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(245,158,11,0.1); border-bottom: 1px solid rgba(245,158,11,0.25); font-size: 0.82rem; color: var(--yellow); }

/* COPY BTN states */
button.copied { background: rgba(16,185,129,0.15) !important; color: var(--green) !important; border-color: rgba(16,185,129,0.3) !important; }
button.copy-failed { background: rgba(239,68,68,0.15) !important; color: var(--red) !important; }

/* TICKET CARD */
.ticket-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.ticket-msg { font-size: 0.82rem; color: var(--text2); line-height: 1.65; padding: 10px; background: var(--bg3); border-radius: 7px; }
.ticket-reply { font-size: 0.8rem; color: var(--text2); padding: 8px 12px; margin-top: 8px; border-left: 3px solid var(--cyan); background: rgba(6,182,212,0.06); border-radius: 0 7px 7px 0; }

/* OWNER QUICK ACTIONS */
.owner-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.oqa-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.75rem; color: var(--text2); transition: var(--transition); min-width: 72px; }
.oqa-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(6,182,212,0.08); }
.oqa-btn i { font-size: 1.1rem; }

/* SYS METRIC */
.sys-metric { margin-bottom: 10px; }
.sys-metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sys-metric-name { font-size: 0.8rem; color: var(--text2); }
.sys-metric-val { font-size: 0.8rem; font-weight: 700; }

/* MONITOR LIVE */
.monitor-live { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* PLAT BAR */
.plat-bar-item { margin-bottom: 8px; }
.plat-bar-label { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--text2); margin-bottom: 3px; }
.plat-bar-track { height: 5px; background: var(--bg3); border-radius: 50px; overflow: hidden; }
.plat-bar-fill { height: 100%; border-radius: 50px; transition: width 0.4s; }

/* OTP LOG ITEM */
.otp-log-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.otp-log-item:last-child { border-bottom: none; }
.oli-num { font-family: monospace; font-size: 0.87rem; font-weight: 700; color: var(--text); }
.oli-otp { font-family: monospace; font-size: 0.9rem; font-weight: 800; color: var(--green); background: rgba(16,185,129,0.1); padding: 1px 8px; border-radius: 5px; cursor: pointer; }
.oli-carrier { font-size: 0.72rem; color: var(--text3); }
.oli-earn { font-size: 0.72rem; color: var(--green); font-weight: 700; }

/* CONSOLE BOX (owner monitor) */
.console-box { background: #0a0a0a; padding: 12px 14px; max-height: 380px; overflow-y: auto; font-family: monospace; font-size: 0.75rem; line-height: 1.6; }
[data-theme="matrix"] .console-box { background: #020809; }
.console-cursor { display: inline-block; width: 8px; height: 14px; background: var(--green); animation: blink 1s step-end infinite; margin-left: 3px; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0; } }

/* AR (activity report) */
.ar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ar-time { font-size: 0.72rem; color: var(--text3); font-family: monospace; }
.ar-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.ar-stat { text-align: center; }
.ar-stat-val { font-size: 1.1rem; font-weight: 800; color: var(--text); display: block; }
.ar-stat-lbl { font-size: 0.65rem; color: var(--text3); }

/* RANGE GRID (get number presets - if needed) */
.range-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.range-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); padding: 5px 12px; border-radius: 7px; font-family: monospace; font-size: 0.78rem; cursor: pointer; transition: var(--transition); }
.range-btn:hover,.range-btn.selected { border-color: var(--cyan); color: var(--cyan); background: rgba(6,182,212,0.08); }

/* MOBILE RESPONSIVE */
@media(max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-area { margin-left: 0; }
  .hamburger { display: flex; }
  .land-nav-links { display: none; }
  .lnav-hbg { display: flex; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .wallet-methods { grid-template-columns: 1fr 1fr; }
  .tb-balance { display: none; }
}
@media(max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px 12px; }
  .pg-hdr { gap: 8px; margin-bottom: 16px; }
  .pg-hdr h1 { font-size: 1.1rem; }
  .auth-card { padding: 24px 20px; }
}

/* Dynamic button classes used in table rows */
.acc-del-btn,.acc-relogin-btn,.ap-btn,.au-ban-btn,.au-edit-btn,
.cp-num,.cp-otp,.cp-otp-log,.oa-bal-btn,.oa-edit-btn,
.otp-copy,.ou-edit-btn,.rj-btn,.su-edit-btn,.svc-save-btn,
.tk-reply-btn,.wd-app-btn,.wd-rej-btn { cursor: pointer; }
.cp-num,.cp-otp,.cp-otp-log,.otp-copy { cursor: pointer; user-select: none; }

/* ═══════════════════════════════════════════════════════════
   AI SUPPORT CHAT
   ═══════════════════════════════════════════════════════════ */
.ai-msg {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1.6;
  max-width: 90%;
  word-break: break-word;
}
.ai-bot {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.ai-user {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  margin-left: auto;
}
.ai-thinking {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
}
.ai-quick-btn {
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.ai-quick-btn:hover {
  background: rgba(124,58,237,.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   TELEGRAM JOIN BUTTON
   ═══════════════════════════════════════════════════════════ */
.tg-join-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0,136,204,.1);
  border: 1px solid rgba(0,136,204,.25);
  border-radius: 9px;
  color: #0088cc;
  font-size: .81rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.tg-join-bar:hover { background: rgba(0,136,204,.18); }


/* ═══════════════════════════════════════════════════════════
   UI POLISH v12 — ALL ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

/* 1. OTP DISPLAY — clean format already exists, polish the copy button */
.gn-otp-copy-btn.btn-xs {
  padding: 2px 8px !important;
  font-size: .65rem !important;
  border-radius: 5px !important;
  gap: 4px !important;
  background: rgba(6,182,212,.1) !important;
  border: 1px solid rgba(6,182,212,.22) !important;
  color: var(--cyan) !important;
  opacity: 1 !important;
}
.gn-otp-copy-btn.btn-xs:hover { background: rgba(6,182,212,.2) !important; }
.gn-otp-copy-btn.btn-xs.copied { background: rgba(16,185,129,.18) !important; color: var(--green) !important; border-color: rgba(16,185,129,.3) !important; }

/* 2. NUMBER ROW — flag + operator chip */
.num-flag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px;
  font-size: .72rem; color: var(--text2); font-weight: 600;
}
.num-flag-chip .flag { font-size: .9rem; }
.num-flag-chip .op-name { color: var(--text); font-size: .71rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 3. STATUS BADGES — enhanced with glow + EXPIRED */
.gn-badge.success {
  background: rgba(16,185,129,.15); color: var(--green);
  border: 1px solid rgba(16,185,129,.3);
  box-shadow: 0 0 8px rgba(16,185,129,.12);
}
.gn-badge.failed {
  background: rgba(239,68,68,.15); color: var(--red);
  border: 1px solid rgba(239,68,68,.3);
  box-shadow: 0 0 8px rgba(239,68,68,.12);
}
.gn-badge.pending {
  background: rgba(245,158,11,.15); color: var(--yellow);
  border: 1px solid rgba(245,158,11,.3);
  box-shadow: 0 0 8px rgba(245,158,11,.12);
  animation: pendingPulse 2.2s ease-in-out infinite;
}
@keyframes pendingPulse { 0%,100%{opacity:1;}50%{opacity:.72;} }
.gn-badge.expired {
  background: rgba(100,116,139,.12); color: var(--text3);
  border: 1px solid rgba(100,116,139,.2);
}

/* 4. COUNTDOWN TIMER CHIP */
.timer-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.25);
  color: var(--yellow); border-radius: 6px;
  padding: 3px 8px; font-family: var(--mono); font-size: .78rem; font-weight: 700;
  white-space: nowrap; letter-spacing: .5px;
}
.timer-chip.exp {
  background: rgba(100,116,139,.1); border-color: rgba(100,116,139,.18);
  color: var(--text3);
}
.timer-chip.urgent { /* under 60s */
  background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.28);
  color: var(--red); animation: timerUrgent 1s ease-in-out infinite;
}
@keyframes timerUrgent { 0%,100%{opacity:1;}50%{opacity:.6;} }

/* 5. LOADING SKELETONS — full-page skeleton grids */
.skel-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 12px; margin-bottom: 16px;
}
.skel-stat-card {
  height: 80px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.skel-table-row {
  display: grid; gap: 8px; padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.skel-table-row > div {
  height: 16px; border-radius: 5px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.skel-card {
  height: 100px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  margin-bottom: 10px;
}

/* 6. BUTTON LOADING STATE */
.btn.btn-loading {
  pointer-events: none; opacity: .82;
  gap: 6px;
}
.btn.btn-loading .btn-spin {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
}
.btn-primary.btn-loading .btn-spin { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.btn-ghost.btn-loading .btn-spin { border-color: var(--border2); border-top-color: var(--text); }

/* 7. TOAST — already exists, but add slide-from-bottom on mobile */
@media(max-width:600px) {
  #toast-cnt { bottom: 80px; /* above FAB */ }
  .toast { font-size: .8rem; padding: 10px 14px; }
}

/* 8. MOBILE — gn-row stack on small screens */
@media(max-width:600px) {
  .gn-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .gn-row-num { grid-column: 1; grid-row: 1; }
  .gn-row-otp { grid-column: 2; grid-row: 1; }
  .gn-row-country { grid-column: 1; grid-row: 2; }
  .gn-row-timer { grid-column: 2; grid-row: 2; justify-self: end; }
  .gn-hist-cols { display: none; }
  .gn-layout { grid-template-columns: 1fr; }
  .gn-left { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .gn-rate-box { grid-column: 1 / -1; }
}

/* 9. CONSOLE SOURCE FILTER BUTTONS — styled properly */
#consoleTabBar .console-tab-btn {
  border-radius: 7px !important;
  font-size: .72rem !important;
  padding: 5px 12px !important;
  gap: 5px !important;
  transition: all .15s !important;
}
#consoleTabBar .console-tab-btn.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9) !important;
  border: none !important; color: #fff !important;
  box-shadow: 0 2px 8px rgba(124,58,237,.3) !important;
}
#consoleTabBar .console-tab-btn[data-tab="nexa"]:not(.btn-primary) {
  border: 1px solid rgba(6,182,212,.3) !important;
  color: var(--cyan) !important;
  background: rgba(6,182,212,.07) !important;
}
#consoleTabBar .console-tab-btn[data-tab="nexa"]:not(.btn-primary):hover {
  background: rgba(6,182,212,.14) !important;
}
#consoleTabBar .console-tab-btn[data-tab="xmnit"]:not(.btn-primary) {
  border: 1px solid rgba(139,92,246,.35) !important;
  color: var(--purple) !important;
  background: rgba(139,92,246,.07) !important;
}
#consoleTabBar .console-tab-btn[data-tab="xmnit"]:not(.btn-primary):hover {
  background: rgba(139,92,246,.14) !important;
}

/* 10. AI SUPPORT FAB BUTTON */
.ai-fab {
  display: none !important;
}
.ai-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(124,58,237,.6);
  animation: none;
}
@keyframes fabPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(124,58,237,.45), 0 0 0 0 rgba(124,58,237,.3); }
  50% { box-shadow: 0 4px 20px rgba(124,58,237,.45), 0 0 0 10px rgba(124,58,237,0); }
}
.ai-fab-tooltip {
  position: fixed; bottom: 86px; right: 20px;
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: 9px; padding: 6px 12px;
  font-size: .75rem; color: var(--text2); white-space: nowrap;
  box-shadow: var(--shadow); z-index: 6999;
  animation: fadeIn .2s;
  pointer-events: none;
}
/* AI chat panel */
#aiChatOverlay {
  animation: chatSlideIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes chatSlideIn {
  from { opacity:0; transform:translateY(20px) scale(.97); }
  to   { opacity:1; transform:none; }
}

/* 11. TELEGRAM BUTTONS — consistent style */
.tg-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #0088cc, #0066aa);
  color: #fff; border-radius: 9px;
  font-size: .84rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: var(--transition); border: none;
  box-shadow: 0 3px 12px rgba(0,136,204,.25);
}
.tg-btn:hover { background: linear-gradient(135deg, #0099dd, #0077bb); transform: translateY(-1px); box-shadow: 0 5px 18px rgba(0,136,204,.35); color:#fff; }
.tg-btn.sm { padding: 6px 13px; font-size: .78rem; border-radius: 7px; }
.tg-btn.outline {
  background: transparent;
  border: 1px solid rgba(0,136,204,.35);
  color: #0088cc;
  box-shadow: none;
}
.tg-btn.outline:hover { background: rgba(0,136,204,.1); }
.tg-join-bar {
  background: rgba(0,136,204,.1);
  border: 1px solid rgba(0,136,204,.28);
  border-radius: 9px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; color: #0088cc; font-size: .83rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: var(--transition);
}
.tg-join-bar:hover { background: rgba(0,136,204,.18); }

/* btn-xs definition */
.btn-xs { padding: 3px 9px; font-size: .7rem; border-radius: 6px; gap: 4px; }

/* MOBILE responsive polish */
@media(max-width:480px) {
  .gn-filter-btns { flex-direction: row; flex-wrap: wrap; }
  .gn-fbtn { flex: 1; min-width: 70px; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .ai-fab { bottom: 16px; right: 14px; width: 46px; height: 46px; font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════════════
   v5 COMPREHENSIVE UI FIX — Mobile + Layout + Stats + Tables
   ═══════════════════════════════════════════════════════════ */

/* 1. STATS GRID — fix card overflow on mobile */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
@media(max-width:480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
.stat-card {
  min-width: 0;
  overflow: hidden;
}
.stat-body { min-width: 0; overflow: hidden; }
.stat-body h4 {
  font-size: 0.65rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-body p {
  font-size: 1.1rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-ico { flex-shrink: 0; }

/* 2. PAGE HEADER — wrap properly on small screens */
.pg-hdr {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.pg-hdr h1 {
  font-size: 1.2rem; line-height: 1.3;
  flex-wrap: wrap;
}
.pg-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media(max-width:480px) {
  .pg-hdr { flex-direction: column; align-items: flex-start; }
  .pg-hdr h1 { font-size: 1.05rem; }
  .pg-actions { width: 100%; }
  .pg-actions .btn { flex: 1; justify-content: center; }
}

/* 3. FILTER CHIPS — horizontal scroll on mobile */
.filter-chips-row {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; margin-bottom: 12px;
  scrollbar-width: none;
}
.filter-chips-row::-webkit-scrollbar { display: none; }
.filter-chip { flex-shrink: 0; }

/* 4. TABLE — horizontal scroll + compact on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.table-wrap table { min-width: 500px; }
@media(max-width:600px) {
  .table-wrap table { min-width: 420px; font-size: 0.76rem; }
  .table-wrap table th, .table-wrap table td { padding: 8px 8px; }
}

/* 5. CARD — no overflow clip */
.card { overflow: visible; }

/* 6. AGENT USER TABLE — action buttons wrap */
.table-wrap table td:last-child > div {
  display: flex; gap: 4px; flex-wrap: wrap;
}

/* 7. DASHBOARD QUICK STATS — prevent text cut */
.dash-stat-val {
  font-size: clamp(1rem, 3vw, 1.7rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 8. TOPBAR — proper height and icon sizing */
.top-bar {
  height: var(--topbar-h);
  display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.top-bar .tb-title {
  flex: 1; font-weight: 700; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); display: flex; align-items: center;
  justify-content: center; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.tb-icon:hover { background: var(--bg4); color: var(--text); border-color: var(--border2); }

/* 9. MAIN AREA — correct layout */
.main-area {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; margin-left: var(--sidebar-w);
  min-height: 100vh;
}
@media(max-width:900px) { .main-area { margin-left: 0; } }

/* 10. PAGE BODY — proper padding */
.page-body {
  flex: 1; padding: 20px 16px;
  overflow-y: auto; min-height: 0;
}
@media(max-width:600px) { .page-body { padding: 14px 10px; } }

/* 11. MODAL — full width on mobile */
@media(max-width:520px) {
  .modal, .modal-box {
    padding: 18px 14px;
    border-radius: var(--radius);
    margin: 8px;
    width: calc(100vw - 32px);
    max-width: none;
  }
}

/* 12. BALANCE DISPLAY — no overflow */
.balance-display, .vault-amount {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 13. ALERT — better mobile layout */
.alert { font-size: 0.8rem; padding: 10px 12px; }
@media(max-width:480px) { .alert { font-size: 0.76rem; } }

/* 14. LEADERBOARD — fix mobile overflow */
.lb-grid { gap: 8px; }
@media(max-width:480px) { .lb-grid { grid-template-columns: 1fr; } }

/* 15. BUTTON SIZES on mobile */
@media(max-width:480px) {
  .btn { padding: 7px 13px; font-size: 0.8rem; }
  .btn-sm { padding: 5px 10px; font-size: 0.74rem; }
  .btn-lg { padding: 10px 18px; font-size: 0.88rem; }
}

/* 16. CARD HDR — wrap on mobile */
.card-hdr { flex-wrap: wrap; gap: 8px; }

/* 17. FORM GRID — single column on mobile */
@media(max-width:540px) {
  .form-grid-2 { grid-template-columns: 1fr !important; }
}

/* 18. USER PAGE — search + filter bar */
.users-filter-bar {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}
.users-filter-top {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.users-filter-top::-webkit-scrollbar { display: none; }
.user-filter-chip {
  flex-shrink: 0; padding: 5px 14px;
  border-radius: 20px; font-size: 0.76rem; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.user-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.user-filter-chip.active {
  background: rgba(124,58,237,0.15); border-color: var(--primary); color: var(--primary);
}

/* 19. INP — mobile friendly */
.inp { font-size: 0.85rem; }
@media(max-width:480px) { .inp { font-size: 0.83rem; padding: 9px 12px; } }

/* 20. CONSOLE ENTRIES — mobile fix */
@media(max-width:600px) {
  .ce { flex-wrap: wrap; gap: 8px; }
  .ce-sms-col { min-width: 0; flex: 1 1 100%; order: 3; }
  .ce-time { display: none; } /* already in footer line */
}

/* 21. SIDEBAR OVERLAY */
.side-overlay {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: none;
}
.side-overlay.show { display: block; }

/* 22. SIDEBAR MOBILE — smooth open */
@media(max-width:900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,0.4); }
}

/* 23. AVATAR WRAP position fix */
.avatar-wrap { position: relative; }

/* 24. TOPBAR BALANCE CHIP */
.tb-balance {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 11px;
  font-size: 0.78rem; font-weight: 700; color: var(--cyan);
  font-family: var(--mono); white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}

/* 25. HAMBURGER BUTTON */
.hamburger {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); display: none; align-items: center;
  justify-content: center; font-size: 1rem; cursor: pointer;
  transition: var(--transition); flex-shrink: 0;
}
.hamburger:hover { background: var(--bg4); color: var(--text); }
@media(max-width:900px) { .hamburger { display: flex; } }

/* 26. PENDING / APPROVAL BADGE */
.badge.b-g { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.badge.b-y { background: rgba(245,158,11,.15); color: var(--yellow); border: 1px solid rgba(245,158,11,.25); }
.badge.b-r { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.25); }

/* 27. ACC STATUS */
.acc-status-online { color: var(--green); font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.acc-status-error  { color: var(--red);   font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.acc-status-idle   { color: var(--muted); font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.acc-err-detail { display: block; font-size: .68rem; color: var(--red); opacity: .75; margin-top: 2px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-live { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: livePulse 2s infinite; flex-shrink: 0; }

/* 28. FIX PROGRESS BAR COMPLETE STATE */
.prog-fill.complete { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.prog-fill:not(.complete) { background: linear-gradient(90deg, var(--primary), var(--cyan)); }

/* 29. MISSION REWARD BADGE */
.mission-reward-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3);
  color: var(--yellow); padding: 5px 12px; border-radius: 8px;
  font-size: .82rem; font-weight: 700;
}

/* 30. AGENT DASH — agent stat cards responsive */
@media(max-width:640px) {
  .agent-stat-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v5.1 CRITICAL BUG FIXES
   ═══════════════════════════════════════════════════════════ */

/* FIX 1: Sidebar mobile — limit width so it doesn't fill screen */
@media(max-width:900px) {
  .sidebar {
    width: min(var(--sidebar-w), 80vw) !important;
    max-width: 280px;
  }
}

/* FIX 4: Topbar avatar — single source of truth */
.avatar-wrap {
  position: relative;
  width: 36px !important; height: 36px !important;
  flex-shrink: 0 !important; flex-grow: 0 !important;
}
#topAvatar,
button.topbar-avatar,
div.topbar-avatar {
  width: 36px !important; height: 36px !important;
  min-width: 36px !important; max-width: 36px !important;
  min-height: 36px !important; max-height: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--primary), var(--cyan)) !important;
  color: #fff !important;
  font-size: 0.85rem !important; font-weight: 800 !important;
  line-height: 36px !important;
  text-align: center !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer; transition: var(--transition);
  flex-shrink: 0 !important; flex-grow: 0 !important;
  border: none !important; outline: none !important;
  box-shadow: none !important; padding: 0 !important;
  overflow: hidden !important; -webkit-appearance: none !important;
  font-family: inherit !important;
}
#topAvatar:hover,
button.topbar-avatar:hover { box-shadow: 0 0 0 3px rgba(124,58,237,0.3) !important; }

/* FIX 5: tb-balance — hide on very small screens */
@media(max-width:420px) { .tb-balance { display: none !important; } }
@media(min-width:421px) and (max-width:600px) {
  .tb-balance { padding: 5px 8px; font-size: 0.73rem; }
}

/* FIX 6: Profile page 2-col grid → 1-col on mobile */
@media(max-width:600px) {
  .profile-grid,
  div[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
}

/* FIX 7: top-bar right side — don't overflow */
.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
@media(max-width:380px) { .tb-right { gap: 5px; } }

/* FIX 8: user-drop — z-index and position */
.user-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 600;
}
.user-drop.open { display: flex; }

/* FIX 9: sidebar brand — no overflow */
.sidebar-brand {
  padding: 16px 14px 14px;
  flex-shrink: 0;
}
.brand-name { 
  font-size: 0.9rem; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FIX 10: page-app flex layout — ensure correct fill when shown */
#page-app {
  min-height: 100vh;
  position: relative;
}

/* FIX 11: main-area correct margin on mobile */
@media(max-width:900px) {
  .main-area { margin-left: 0 !important; }
}
@media(min-width:901px) {
  .main-area { margin-left: var(--sidebar-w); }
}

/* FIX 12: overlay — proper z-index under sidebar */
.sidebar-overlay {
  position: fixed; inset: 0;
  z-index: 198;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: none;
}
.sidebar-overlay.show { display: block; }
.sidebar { z-index: 200; }

/* FIX 13: card hover on profile — no transform on mobile */
@media(max-width:600px) {
  .stat-card:hover, .card:hover { transform: none !important; }
}

/* FIX 14: tb-icon proper cursor */
.tb-icon { cursor: pointer; }

/* FIX 15: nav-link active state for matrix theme */
[data-theme="matrix"] .nav-link.active {
  background: rgba(0,255,128,0.12);
  color: var(--cyan);
}
[data-theme="matrix"] .nav-link.active::before {
  background: var(--cyan);
}

/* ── Console dual charts responsive ── */
#consoleChartsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media(max-width:600px) {
  #consoleChartsGrid { grid-template-columns: 1fr; }
}
#analysisReportBar { overflow-x: auto; }


/* ════════════════════════════════════════════════════════════════
   PRODUCTION SCALE ADDITIONS  (Items 13, 14, 15)
   ════════════════════════════════════════════════════════════════ */

/* ── ITEM 15: will-change on animated elements ──────────────────────────── */
.spin        { will-change: transform; }
.dot-live    { will-change: transform, opacity; }
.nav-link    { will-change: transform; }
.feat-card   { will-change: transform; }

/* ── ITEM 14: CSS containment on heavy list containers ─────────────────── */
.gn-hist-card { contain: layout style paint; }
#histList     { contain: layout style paint; }
.page-body    { contain: layout style; }
.sidebar      { contain: layout style paint; }

/* ── ITEM 13: Connection status indicator ───────────────────────────────── */
.conn-status-wrap {
  display: flex; align-items: center; gap: 5px;
  padding: 0 6px; cursor: default; user-select: none;
}
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.4s ease;
}
.conn-green  { background: var(--green, #22c55e); box-shadow: 0 0 4px var(--green, #22c55e); }
.conn-yellow { background: #eab308;               box-shadow: 0 0 4px #eab308; animation: connPulse 1.2s ease-in-out infinite; }
.conn-red    { background: var(--red, #ef4444);   box-shadow: 0 0 6px var(--red, #ef4444);   animation: connPulse 0.7s ease-in-out infinite; }
.conn-lbl {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.4px;
  color: var(--red, #ef4444); white-space: nowrap;
}
@keyframes connPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}


/* ═══════════════════════════════════════════════════════════════
   UI POLISH v13 — COMPREHENSIVE PAGE-BY-PAGE IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. LANDING — Hero stats counter animation polish ── */
.hstat-num { font-variant-numeric: tabular-nums; }
.hero-badge { animation: fadeInDown 0.6s ease; }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:none; } }

/* ── 2. AUTH PAGE — Card entrance animation ── */
.auth-card { animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1); }

/* ── 3. GET NUMBER PAGE — Full layout improvements ── */
/* Range input focus ring more visible */
.gn-range-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}
/* GET NUMBER button — larger, more prominent */
.gn-get-btn {
  padding: 10px 26px !important;
  font-size: .9rem !important;
  letter-spacing: .3px;
  background: linear-gradient(135deg, var(--primary), var(--cyan)) !important;
  box-shadow: 0 4px 18px rgba(6,182,212,0.25) !important;
}
.gn-get-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(6,182,212,0.35) !important;
}
/* History rows — more vertical spacing for readability */
.gn-row { padding: 14px 16px; }
/* OTP value — clickable hint */
.gn-otp-val { cursor: pointer; }
/* Copy button inside row */
.gn-copy-btn {
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--cyan);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.gn-copy-btn:hover { background: rgba(6,182,212,0.18); }
.gn-copy-btn.copied { background: rgba(16,185,129,.18); color: var(--green); border-color: rgba(16,185,129,.3); }

/* ── 4. CONSOLE PAGE — Source tabs + chart improvements ── */
.console-tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  align-items: center;
}
.console-tab-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg4);
  color: var(--text2);
  font-family: inherit;
}
.console-tab-btn.active-all { background: linear-gradient(135deg,var(--primary),var(--cyan)); border-color: transparent; color: #fff; }
.console-tab-btn.active-nexa { background: rgba(6,182,212,0.15); border-color: var(--cyan); color: var(--cyan); }
.console-tab-btn.active-engine { background: rgba(139,92,246,0.15); border-color: var(--purple); color: var(--purple); }

/* ── 5. LEADERBOARD — Top 3 medal glow ── */
.lb-rank.r1 { font-size: 1.1rem; text-shadow: 0 0 10px rgba(245,158,11,0.6); }
.lb-rank.r2 { font-size: 1rem; text-shadow: 0 0 8px rgba(148,163,184,0.4); }
.lb-rank.r3 { font-size: 1rem; text-shadow: 0 0 8px rgba(249,115,22,0.4); }
.lb-tab.active { box-shadow: 0 2px 12px rgba(6,182,212,0.2); }

/* ── 6. SUMMARY PAGE — Chart wrapper better styling ── */
.chart-wrap canvas { display: block; }
.chart-wrap { position: relative; overflow: hidden; }

/* ── 7. WALLET PAGE — Balance card glow ── */
.vault-card {
  position: relative;
  overflow: hidden;
}
.vault-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.vault-amount { font-variant-numeric: tabular-nums; }
/* Wallet grid on mobile */
@media(max-width:540px) {
  .wallet-methods { grid-template-columns: 1fr 1fr; }
}

/* ── 8. DEV API PAGE — Code block copy button ── */
.api-code-wrap { position: relative; }
.api-code-copy {
  position: absolute; top: 8px; right: 10px;
  background: var(--bg4); border: 1px solid var(--border2);
  color: var(--text3); padding: 3px 8px;
  border-radius: 5px; font-size: .68rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); font-family: inherit;
}
.api-code-copy:hover { color: var(--cyan); border-color: var(--cyan); }

/* ── 9. NOTIFICATIONS PAGE — Entry animations ── */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeInUp 0.2s ease;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: .85rem; margin-bottom: 3px; }
.notif-msg { font-size: .78rem; color: var(--text2); line-height: 1.6; }
.notif-time { font-size: .68rem; color: var(--text3); margin-top: 4px; font-family: monospace; }

/* ── 10. PROFILE PAGE — Info rows hover ── */
.ir { transition: background var(--transition); }
.ir:hover { background: var(--bg3); margin: 0 -8px; padding: 10px 8px; border-radius: 7px; }

/* ── 11. AGENT DASH — Welcome banner ── */
.champ-banner-main { animation: fadeInDown 0.4s ease; }

/* ── 12. AGENT USERS — Status filter chip bar ── */
.agent-filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px; align-items: center;
}

/* ── 13. OWNER DASH — Quick action buttons ── */
.oqa-btn { min-height: 72px; }
.oqa-btn i { transition: transform var(--transition); }
.oqa-btn:hover i { transform: scale(1.15); }

/* ── 14. OWNER AGENTS / USERS — Table row actions ── */
.table-wrap table tbody tr { transition: background var(--transition); }

/* ── 15. OWNER OTP LOGS — Pinned header ── */
.table-wrap table thead { position: sticky; top: 0; z-index: 2; background: var(--bg3); }

/* ── 16. OWNER MONITOR — Live indicator pulse ── */
.radar-live-dot { animation: livePulse 1.5s ease-in-out infinite; }

/* ── 17. OWNER ACCOUNTS — Status indicator dots ── */
.acc-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}
.acc-dot-online { background: var(--green); box-shadow: 0 0 6px rgba(16,185,129,0.5); animation: livePulse 2s infinite; }
.acc-dot-error  { background: var(--red); }
.acc-dot-idle   { background: var(--muted); }

/* ── 18. OWNER SERVICES — Toggle row hover ── */
.settings-row:hover { background: var(--bg3); border-radius: 8px; }

/* ── 19. OWNER WITHDRAWALS — Status pill colors ── */
.wd-pending  { background: rgba(245,158,11,.12); color: var(--yellow); border: 1px solid rgba(245,158,11,.25); }
.wd-approved { background: rgba(16,185,129,.12); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.wd-rejected { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.25); }

/* ── 20. OWNER SETTINGS — Section dividers ── */
.settings-section-title {
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text3); margin: 20px 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.settings-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── 21. GLOBAL — Empty state improvements ── */
.empty-state { padding: 56px 24px; }
.empty-state i { font-size: 2.8rem; margin-bottom: 16px; opacity: 0.25; color: var(--primary); }
.empty-state p { max-width: 260px; line-height: 1.7; }

/* ── 22. GLOBAL — Card hover animation on desktop only ── */
@media(hover: hover) {
  .card:hover { border-color: rgba(255,255,255,0.1); }
  .stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
}

/* ── 23. GLOBAL — Focus visible for accessibility ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button:focus-visible, a:focus-visible { border-radius: 4px; }

/* ── 24. MATRIX THEME — Extra glow on active nav ── */
[data-theme="matrix"] .gn-get-btn {
  background: linear-gradient(135deg, #00e060, #00b050) !important;
  box-shadow: 0 4px 18px rgba(0,255,128,0.3) !important;
}
[data-theme="matrix"] .gn-range-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,255,128,0.15);
}
[data-theme="matrix"] .stat-card:hover { box-shadow: 0 0 20px rgba(0,255,128,0.08); }

/* ── 25. LIGHT THEME — shadow adjustments ── */
[data-theme="light"] .card { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
[data-theme="light"] .card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .stat-card { box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
[data-theme="light"] .btn-primary { box-shadow: 0 4px 12px rgba(124,58,237,0.2); }
[data-theme="light"] .top-bar { box-shadow: 0 1px 8px rgba(0,0,0,0.08); }
[data-theme="light"] .sidebar { box-shadow: 2px 0 12px rgba(0,0,0,0.06); }
[data-theme="light"] .toast { color: var(--text); }
[data-theme="light"] .inp { background: #fff; }
[data-theme="light"] .modal, [data-theme="light"] .modal-box { background: #fff; }

/* ── 26. GLASS THEME — enhanced blur ── */
[data-theme="glass"] .stat-card { backdrop-filter: blur(12px); }
[data-theme="glass"] .gn-input-card { backdrop-filter: blur(16px); }

/* ── 27. PAGINATION — active page glow ── */
.pg-btn.active { box-shadow: 0 2px 10px rgba(124,58,237,0.3); }

/* ── 28. BUTTONS — tactile press effect ── */
.btn:active:not(:disabled) { transform: scale(0.97) translateY(1px) !important; }
.btn-primary:active:not(:disabled) { box-shadow: 0 2px 8px rgba(124,58,237,0.2) !important; }

/* ── 29. MODAL — backdrop click zone ── */
.modal-overlay { cursor: pointer; }
.modal, .modal-box { cursor: default; }

/* ── 30. TOPBAR AVATAR — improved ring on hover ── */
#topAvatar:hover, button.topbar-avatar:hover, div.topbar-avatar:hover {
  box-shadow: 0 0 0 3px rgba(124,58,237,0.35) !important;
  transition: box-shadow 0.15s !important;
}

/* ── 31. SIDEBAR BALANCE — click feedback ── */
.sidebar-bal:hover { background: var(--bg4); box-shadow: 0 0 0 1px var(--cyan); }

/* ── 32. INPUT — improved placeholder contrast ── */
.inp::placeholder { color: var(--text3); opacity: 1; }
[data-theme="light"] .inp::placeholder { color: #94a3b8; }

/* ── 33. SCROLLBAR — platform-consistent ── */
* { scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ── 34. AGENT WALLET — payout form spacing ── */
#agSubmitWdBtn { gap: 8px; }

/* ── 35. OWNER LOGS — log entry color coding ── */
.log-l .log-err  { color: #f87171; font-weight: 600; }
.log-l .log-warn { color: #fbbf24; font-weight: 600; }
.log-l .log-info { color: var(--text2); }

/* ── 36. NUMBER ALLOCATION ANIMATION ── */
@keyframes numberPop {
  0%   { opacity:0; transform: scale(0.92) translateY(-4px); }
  70%  { transform: scale(1.02) translateY(0); }
  100% { opacity:1; transform: scale(1); }
}
.gn-row-injected { animation: numberPop 0.3s cubic-bezier(0.34,1.56,0.64,1) !important; }

/* ── 37. OTP ARRIVE ANIMATION ── */
@keyframes otpArrive {
  0%   { background: rgba(16,185,129,0.25); }
  100% { background: transparent; }
}
.gn-row.otp-arrived { animation: otpArrive 1.5s ease forwards; }

/* ── 38. CONNECTION STATUS BADGE ── */
.conn-status-wrap { border-radius: 20px; padding: 3px 8px; background: var(--bg3); border: 1px solid var(--border); }
.conn-status-wrap:has(.conn-yellow), .conn-status-wrap:has(.conn-red) { border-color: var(--border2); }

/* ── 39. STATS GRID — uniform icon sizing ── */
.stat-ico { font-size: 0.95rem; }

/* ── 40. MOBILE — bottom padding for FAB clearance ── */
@media(max-width:600px) {
  .page-body { padding-bottom: 32px; }
}

/* ═══════════════════════════════════════════════════════════════
   🎨 ULTRA UI v14 — Animation System + Themes + Micro-interactions
   ═══════════════════════════════════════════════════════════════ */

/* ── ANIMATION KEYFRAMES ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 var(--glow-color, rgba(124,58,237,0.4)); }
  50%      { box-shadow: 0 0 0 8px var(--glow-color, rgba(124,58,237,0)); }
}
@keyframes numberTick {
  from { opacity: 0.4; transform: translateY(6px) scale(0.95); }
  to   { opacity: 1;   transform: translateY(0)   scale(1); }
}
@keyframes dataRefreshWave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes neonFlicker {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,24%,55% { opacity: 0.6; }
}
@keyframes rgbShift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
@keyframes borderPulse {
  0%,100% { border-color: var(--primary); }
  50%      { border-color: var(--cyan); }
}
@keyframes countUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes glowPulse {
  0%,100% { text-shadow: 0 0 8px var(--cyan), 0 0 20px var(--cyan); }
  50%      { text-shadow: 0 0 16px var(--cyan), 0 0 40px var(--cyan), 0 0 60px var(--cyan); }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}
@keyframes bounceDot {
  0%,80%,100% { transform: scale(0); opacity: 0.3; }
  40%         { transform: scale(1);   opacity: 1; }
}

/* ── ANIMATION UTILITY CLASSES ───────────────────────────────── */
.anim-fadeUp    { animation: fadeUp    0.4s cubic-bezier(0.4,0,0.2,1) both; }
.anim-fadeDown  { animation: fadeDown  0.35s ease both; }
.anim-scaleIn   { animation: scaleIn   0.3s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-slideLeft { animation: slideLeft 0.35s ease both; }
.anim-slideRight{ animation: slideRight 0.35s ease both; }
.anim-delay-1   { animation-delay: 0.05s; }
.anim-delay-2   { animation-delay: 0.10s; }
.anim-delay-3   { animation-delay: 0.15s; }
.anim-delay-4   { animation-delay: 0.20s; }
.anim-delay-5   { animation-delay: 0.25s; }

/* Scroll reveal — added by JS IntersectionObserver */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.93); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34,1.56,0.64,1); }
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* ── RGB NEON THEME ──────────────────────────────────────────── */
[data-theme="neon"] {
  --bg: #080010; --bg2: #0c0018; --bg3: #100020; --bg4: #160030;
  --panel: #0d0018; --card: #120022; --card2: #160028;
  --border: rgba(180,0,255,0.18); --border2: rgba(180,0,255,0.32);
  --text: #f0e6ff; --text2: #c4a8ff; --text3: #8866cc; --muted: #5a3d8a;
  --primary: #c026d3; --primary-h: #a21caf; --primary-glow: rgba(192,38,211,0.45);
  --cyan: #00ffea; --cyan-glow: rgba(0,255,234,0.3);
  --green: #39ff14;
}
[data-theme="neon"] body {
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(192,38,211,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(0,255,234,0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(57,255,20,0.04) 0%, transparent 70%);
}
[data-theme="neon"] .card { border-color: rgba(192,38,211,0.2); }
[data-theme="neon"] .card:hover { border-color: rgba(192,38,211,0.45); box-shadow: 0 0 20px rgba(192,38,211,0.15); }
[data-theme="neon"] .btn-primary { background: linear-gradient(135deg, #c026d3, #00ffea); box-shadow: 0 0 20px rgba(192,38,211,0.4); }
[data-theme="neon"] .nav-link.active { background: rgba(192,38,211,0.15); color: #00ffea; }
[data-theme="neon"] .nav-link.active::before { background: #00ffea; }
[data-theme="neon"] .stat-card:hover { box-shadow: 0 0 24px rgba(192,38,211,0.2); }
[data-theme="neon"] .gn-range-wrap:focus-within { border-color: #00ffea; box-shadow: 0 0 0 3px rgba(0,255,234,0.15); }
[data-theme="neon"] .role-chip { background: linear-gradient(135deg, #c026d3, #00ffea); }
[data-theme="neon"] .logo-icon { background: linear-gradient(135deg, #c026d3, #00ffea); }
[data-theme="neon"] .tb-balance { border-color: rgba(0,255,234,0.25); color: #00ffea; }
[data-theme="neon"] .inp:focus { border-color: #c026d3; box-shadow: 0 0 0 3px rgba(192,38,211,0.15); }

/* ── GLASSMORPHISM ENHANCEMENT ───────────────────────────────── */
[data-theme="glass"] .card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
}
[data-theme="glass"] .stat-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(165,180,252,0.15);
}
[data-theme="glass"] .top-bar, [data-theme="glass"] .sidebar {
  background: rgba(13,13,26,0.7);
  backdrop-filter: blur(32px) saturate(200%);
}
[data-theme="glass"] .modal, [data-theme="glass"] .modal-box {
  background: rgba(30,20,60,0.75);
  backdrop-filter: blur(40px);
}
[data-theme="glass"] .btn-primary {
  background: linear-gradient(135deg, rgba(124,58,237,0.85), rgba(6,182,212,0.8));
  backdrop-filter: blur(8px);
}

/* ── MICRO-INTERACTIONS ──────────────────────────────────────── */
/* Card hover depth effect */
@media(hover: hover) {
  .card:hover   { transform: translateY(-1px); transition: all 0.22s cubic-bezier(0.4,0,0.2,1); }
  .stat-card:hover { transform: translateY(-3px); }
  .feat-card:hover { transform: translateY(-5px); }
  .price-card:hover { transform: translateY(-4px); }
}

/* Nav link hover slide */
.nav-link { transition: all 0.15s ease; }
.nav-link:hover { padding-left: 16px; }
.nav-link.active { padding-left: 16px; }

/* Button active depth */
.btn { transition: all 0.15s cubic-bezier(0.4,0,0.2,1); }
.btn:active:not(:disabled) { transform: scale(0.96) translateY(1px) !important; }

/* Input focus micro-animation */
.inp { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease; }
.inp:focus { transform: scale(1.005); }

/* Stat card number update flash */
.stat-val-updated { animation: numberTick 0.35s ease; }

/* OTP value glow */
.nr-otp-val:hover { text-shadow: 0 0 12px rgba(16,185,129,0.6); }

/* Badge hover scale */
.badge:hover { transform: scale(1.05); transition: transform 0.15s ease; }

/* ── OWNER CONTROL CENTER ────────────────────────────────────── */
.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.cc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.cc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.cc-card-green::before { background: linear-gradient(90deg, var(--green), transparent); }
.cc-card-red::before   { background: linear-gradient(90deg, var(--red),   transparent); }
.cc-card-cyan::before  { background: linear-gradient(90deg, var(--cyan),  transparent); }
.cc-card-yellow::before{ background: linear-gradient(90deg, var(--yellow),transparent); }
.cc-card-purple::before{ background: linear-gradient(90deg, var(--primary),transparent); }
.cc-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.cc-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text3); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.cc-value {
  font-size: 1.5rem; font-weight: 900; font-family: var(--font-head);
  margin-bottom: 4px; color: var(--text);
}
.cc-sub { font-size: 0.72rem; color: var(--text3); }
.cc-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cc-toggle-row:last-child { border-bottom: none; }
.cc-toggle-label { font-size: 0.84rem; font-weight: 600; }
.cc-toggle-desc  { font-size: 0.7rem; color: var(--text3); margin-top: 2px; }

/* Kill Switch */
.kill-switch {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 16px;
  background: rgba(239,68,68,0.08);
  border: 2px solid rgba(239,68,68,0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 800; font-size: 0.92rem; color: var(--red);
}
.kill-switch:hover {
  background: rgba(239,68,68,0.18);
  border-color: var(--red);
  box-shadow: 0 0 24px rgba(239,68,68,0.25);
}
.kill-switch i { font-size: 1.1rem; animation: livePulse 1.5s infinite; }

/* ── PASSWORD STRENGTH METER ─────────────────────────────────── */
.pw-strength-bar {
  height: 4px; border-radius: 2px; background: var(--bg4);
  margin-top: 6px; overflow: hidden; transition: var(--transition);
}
.pw-strength-fill {
  height: 100%; border-radius: 2px; transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-text {
  font-size: 0.67rem; font-weight: 700; margin-top: 3px;
  transition: color 0.3s ease;
}

/* ── API TESTER ───────────────────────────────────────────────── */
.api-tester {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 14px;
}
.api-tester-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.api-tester-method {
  padding: 4px 10px; border-radius: 5px;
  font-size: 0.72rem; font-weight: 800; font-family: var(--mono);
  background: rgba(16,185,129,0.15); color: var(--green);
  text-transform: uppercase;
}
.api-tester-url {
  flex: 1; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 10px;
  color: var(--text); font-size: 0.8rem; font-family: var(--mono);
  outline: none;
}
.api-tester-send {
  background: var(--primary); color: #fff; border: none;
  border-radius: 6px; padding: 6px 14px;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: var(--transition);
}
.api-tester-send:hover { background: var(--primary-h); }
.api-tester-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media(max-width:640px) { .api-tester-body { grid-template-columns: 1fr; } }
.api-tester-input-pane {
  padding: 12px; border-right: 1px solid var(--border);
}
.api-tester-output-pane {
  padding: 12px; background: #050508;
}
.api-tester-label {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text3); margin-bottom: 6px;
}
.api-tester-textarea {
  width: 100%; min-height: 120px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-family: var(--mono); font-size: 0.76rem;
  padding: 10px; resize: vertical; outline: none;
  transition: border-color 0.15s;
}
.api-tester-textarea:focus { border-color: var(--primary); }
.api-tester-response {
  font-family: var(--mono); font-size: 0.74rem;
  min-height: 120px; color: var(--text2); white-space: pre-wrap;
  word-break: break-all; line-height: 1.6;
}
.api-resp-success { color: #6ee7b7; }
.api-resp-error   { color: #fca5a5; }
.api-resp-pending { color: var(--muted); font-style: italic; }

/* ── PER-ENDPOINT TEST UI (FIX-I1) ──────────────────────────── */
.api-ep-test-bar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.api-ep-result {
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.api-ep-result pre {
  margin: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px;
  font-size: .72rem;
  font-family: var(--mono);
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
}


.wd-timeline {
  display: flex; flex-direction: column; gap: 0;
  position: relative; padding-left: 24px;
}
.wd-timeline::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.wd-step {
  position: relative; padding: 8px 0 8px 14px;
  font-size: 0.8rem;
}
.wd-step::before {
  content: ''; position: absolute; left: -20px; top: 12px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg4); border: 2px solid var(--border);
  transition: var(--transition);
}
.wd-step.done::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(16,185,129,0.4); }
.wd-step.active::before { background: var(--cyan); border-color: var(--cyan); animation: pulseGlow 1.5s infinite; --glow-color: rgba(6,182,212,0.4); }
.wd-step.failed::before { background: var(--red); border-color: var(--red); }
.wd-step-label { font-weight: 700; color: var(--text); }
.wd-step-time  { font-size: 0.68rem; color: var(--text3); margin-top: 2px; font-family: var(--mono); }

/* ── KEYBOARD SHORTCUT HINTS ─────────────────────────────────── */
.kbd {
  display: inline-flex; align-items: center;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 4px; padding: 1px 6px;
  font-family: var(--mono); font-size: 0.67rem;
  color: var(--text2); font-weight: 600;
  box-shadow: 0 2px 0 var(--border2);
}

/* ── FLOATING PARTICLES (Landing) ────────────────────────────── */
.particles-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; width: 3px; height: 3px;
  border-radius: 50%; background: var(--primary);
  opacity: 0; animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* ── TYPING HEADLINE CURSOR ──────────────────────────────────── */
.typing-cursor {
  display: inline-block; width: 3px; height: 1em;
  background: var(--cyan); margin-left: 3px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* ── LOG EXPORT BUTTONS ──────────────────────────────────────── */
.log-export-bar {
  display: flex; gap: 6px; align-items: center;
  padding: 6px 14px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

/* ── BULK ACTION BAR ─────────────────────────────────────────── */
.bulk-action-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.bulk-action-bar .bulk-count {
  font-size: 0.78rem; color: var(--text2);
  margin-right: auto;
}

/* ── ADVANCED STAT NUMBER ANIMATION ─────────────────────────── */
.stat-num-wrap { overflow: hidden; display: inline-block; }
.stat-num-inner { display: inline-block; }
.stat-num-tick  { animation: countUp 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }

/* ── CONTROL CENTER STATUS LIGHTS ───────────────────────────── */
.status-light {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
.sl-green  { background: var(--green);  box-shadow: 0 0 8px rgba(16,185,129,0.6); animation: livePulse 2s infinite; }
.sl-red    { background: var(--red);    box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.sl-yellow { background: var(--yellow); box-shadow: 0 0 8px rgba(245,158,11,0.5); animation: livePulse 1.2s infinite; }
.sl-gray   { background: var(--muted);  }

/* ── IMPROVED HERO HEADING GRADIENT ─────────────────────────── */
[data-theme="neon"] .hero-h1 em {
  background: linear-gradient(135deg, #c026d3, #00ffea, #39ff14);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="neon"] .hero-badge {
  background: rgba(192,38,211,0.12); border-color: rgba(192,38,211,0.3); color: #c026d3;
}

/* ── SETTINGS CARD ACTIVE HIGHLIGHT ─────────────────────────── */
.settings-row:hover {
  background: var(--bg3); border-radius: 8px;
  margin: 0 -8px; padding: 8px 8px;
}

/* ── PROGRESS BAR ANIMATED ───────────────────────────────────── */
.prog-fill-animated {
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--primary));
  background-size: 200% 100%;
  animation: dataRefreshWave 2s linear infinite;
}

/* ── THEME PILL NEON ──────────────────────────────────────────── */
.theme-pill[data-theme="neon"] {
  border-color: rgba(192,38,211,0.4); color: #c026d3;
  background: rgba(192,38,211,0.08);
}
.theme-pill[data-theme="neon"]:hover, .theme-pill[data-theme="neon"].active {
  border-color: #c026d3; background: rgba(192,38,211,0.2);
  box-shadow: 0 0 12px rgba(192,38,211,0.3);
}

/* ── COPY CODE BUTTON ────────────────────────────────────────── */
.code-copy-btn {
  position: absolute; top: 8px; right: 10px;
  background: var(--bg4); border: 1px solid var(--border2);
  color: var(--text3); padding: 3px 9px; border-radius: 5px;
  font-size: 0.68rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: inherit; z-index: 1;
}
.code-copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.code-copy-btn.copied { color: var(--green); border-color: var(--green); background: rgba(16,185,129,0.1); }
.api-code-block-wrap { position: relative; }

/* ── MOBILE ───────────────────────────────────────────────────── */
@media(max-width:600px) {
  .cc-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kill-switch { padding: 12px; font-size: 0.84rem; }
}

/* FIX SCROLL BUG #17: Edit modal scroll — content scrolls, body does not */
.modal-overlay { overflow-y: auto !important; }
.modal-box { max-height: 90vh; display: flex; flex-direction: column; }
.modal-box > *:last-child { overflow-y: auto; flex: 1; }
.modal-body, .modal-content-inner { overflow-y: auto; max-height: calc(90vh - 120px); }
body.modal-open { overflow: hidden !important; position: fixed; width: 100%; }

/* ══════════════════════════════════════════════════════════════
   v11 UI IMPROVEMENTS — Faster, Cleaner, More Professional
   ══════════════════════════════════════════════════════════════ */

/* ── Improved skeleton loading animation ─────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Smooth page transitions ──────────────────────────────────── */
#pageBody > * { animation: pageSlideIn 0.18s ease-out; }
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card hover lift effect ───────────────────────────────────── */
.card { transition: box-shadow 0.2s ease; }
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.25); }

/* ── Improved button active state ─────────────────────────────── */
.btn:active { transform: scale(0.97); transition: transform 0.08s; }

/* ── Better badge styles ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 50px; font-size: .68rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.b-g  { background: rgba(16,185,129,.15);  color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.b-r  { background: rgba(239,68,68,.15);   color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.b-y  { background: rgba(245,158,11,.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.b-c  { background: rgba(6,182,212,.15);   color: #06b6d4; border: 1px solid rgba(6,182,212,.3); }
.b-p  { background: rgba(168,85,247,.15);  color: #a855f7; border: 1px solid rgba(168,85,247,.3); }
.b-m  { background: rgba(100,116,139,.15); color: #94a3b8; border: 1px solid rgba(100,116,139,.3); }

/* ── Improved table rows ──────────────────────────────────────── */
table tbody tr {
  transition: background 0.12s ease;
}
table tbody tr:hover {
  background: var(--bg3) !important;
}

/* ── Stat cards — improved ────────────────────────────────────── */
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover { border-color: var(--border2); }
.stat-val  { font-size: 1.8rem; font-weight: 900; font-family: var(--mono); line-height: 1; }
.stat-lbl  { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat-sub  { font-size: .72rem; color: var(--text3); margin-top: 2px; }

/* ── Input focus improvements ─────────────────────────────────── */
.inp:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
  outline: none;
}

/* ── Alert variants ───────────────────────────────────────────── */
.alert       { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; border-radius:9px; border:1px solid; font-size:.8rem; }
.alert-info  { background:rgba(6,182,212,.08);   border-color:rgba(6,182,212,.25);  color:var(--text2); }
.alert-warn  { background:rgba(245,158,11,.08);  border-color:rgba(245,158,11,.25); color:var(--text2); }
.alert-error { background:rgba(239,68,68,.08);   border-color:rgba(239,68,68,.25);  color:var(--text2); }
.alert-ok    { background:rgba(16,185,129,.08);  border-color:rgba(16,185,129,.25); color:var(--text2); }

/* ── Improved toast notifications ────────────────────────────── */
.toast {
  border-radius: 10px !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  animation: toastIn 0.22s cubic-bezier(0.175,0.885,0.32,1.275) !important;
}
@keyframes toastIn {
  from { opacity:0; transform:translateX(24px) scale(0.95); }
  to   { opacity:1; transform:translateX(0) scale(1); }
}

/* ── Nav link active state improved ──────────────────────────── */
.nav-link.active {
  background: linear-gradient(90deg, rgba(0,212,255,0.12), transparent) !important;
  border-left: 3px solid var(--cyan) !important;
  padding-left: calc(var(--nav-pad, 14px) - 3px) !important;
}

/* ── Console entries ─────────────────────────────────────────── */
.ce {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.ce:hover { background: var(--bg3); }
.ce:last-child { border-bottom: none; }

/* ── Page header improvements ─────────────────────────────────── */
.pg-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.pg-hdr h1 {
  font-size: 1.25rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.pg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Number cards ─────────────────────────────────────────────── */
.gn-row { transition: border-color 0.15s, box-shadow 0.15s; }
.gn-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.2); }

/* ── Mobile improvements ──────────────────────────────────────── */
@media (max-width: 768px) {
  .pg-hdr { flex-direction: column; }
  .pg-actions { width: 100%; }
  .stat-val { font-size: 1.4rem; }
  .table-wrap { font-size: .78rem; }
  table th, table td { padding: 8px 10px; }
}

/* ── Scrollbar styling ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Loading spinner improved ─────────────────────────────────── */
.spin {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid var(--border2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spin-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-state i { font-size: 2.2rem; opacity: .25; display: block; margin-bottom: 12px; }
.empty-state p { font-size: .82rem; margin: 0; }

/* ── Dot live indicator ───────────────────────────────────────── */
.dot-live {
  display: inline-block; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50%      { opacity: .7; box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

/* ── Improved modal ───────────────────────────────────────────── */
.modal-box {
  animation: modalIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalIn {
  from { opacity:0; transform: scale(0.93) translateY(-8px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

/* ── PM management ────────────────────────────────────────────── */
[data-pm-toggle] { transition: all 0.2s; }
[data-pm-toggle]:hover { transform: scale(1.05); }
