/* ═══════════════════════════════════════════════════════════════
   OTPBazaar — Dark UI  |  Mobile-First
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:          #0f172a;
  --bg-deep:     #080f1e;
  --surface:     #1e293b;
  --surface-2:   #263348;
  --surface-3:   #2e3d56;
  --border:      #334155;
  --border-light:#3d4f68;

  --accent:      #3b82f6;
  --accent-hover:#2563eb;
  --accent-dim:  rgba(59,130,246,.15);
  --accent-glow: rgba(59,130,246,.35);

  --success:     #22c55e;
  --success-dim: rgba(34,197,94,.15);
  --warning:     #f59e0b;
  --warning-dim: rgba(245,158,11,.15);
  --danger:      #ef4444;
  --danger-dim:  rgba(239,68,68,.15);
  --danger-hover:#dc2626;

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

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   22px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.4);
  --shadow:      0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.6);

  --font:        'Space Grotesk', system-ui, sans-serif;
  --mono:        'JetBrains Mono', 'Courier New', monospace;

  --nav-h:       60px;
  --transition:  .18s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img, svg { display: block; max-width: 100%; }

input, button, select, textarea { font-family: inherit; }

ul { list-style: none; }

/* ── Utility ───────────────────────────────────────────────── */
.hidden   { display: none !important; }
.center   { text-align: center; }
.mt-4     { margin-top: 1.5rem; }
.mono     { font-family: var(--mono); }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.link-sm  { font-size: .82rem; color: var(--accent); }
.link-sm:hover { color: var(--accent-hover); }

/* ── Loading Screen ─────────────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5rem;
}
.loading-logo {
  display: flex; align-items: center; gap: .75rem;
  font-size: 1.5rem; font-weight: 700;
}
.loading-icon { font-size: 2.5rem; animation: pulse 1.2s ease infinite; }
.loading-bar {
  width: 180px; height: 3px;
  background: var(--surface-2);
  border-radius: 99px; overflow: hidden;
}
.loading-bar-fill {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 99px;
  animation: loadBar 1.4s ease forwards;
}
@keyframes loadBar { to { width: 100%; } }
@keyframes pulse   { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; padding: 0 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
  flex-shrink: 0;
}
.navbar-brand:hover { color: var(--text); }
.brand-icon { font-size: 1.4rem; }

.nav-links {
  display: none;
  flex: 1; gap: .25rem;
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}
.nav-link {
  padding: .4rem .75rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-admin-link { color: var(--warning) !important; }

.nav-right {
  margin-left: auto; display: flex; align-items: center; gap: .75rem;
}
.nav-balance {
  display: flex; align-items: center; gap: .4rem;
  background: var(--accent-dim); border: 1px solid var(--accent-glow);
  padding: .3rem .75rem; border-radius: 99px;
  font-size: .82rem; font-weight: 600; color: var(--accent);
}

.nav-guest { display: flex; gap: .5rem; }

/* Avatar + Dropdown */
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: .9rem;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition);
}
.nav-avatar:hover { opacity: .85; }
.nav-user { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 210px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .5rem 0; z-index: 200;
  animation: fadeDown .15s ease;
}
@keyframes fadeDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }
.nav-dropdown-header {
  padding: .5rem 1rem .75rem;
  font-size: .78rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dropdown-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; font-size: .87rem; color: var(--text);
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item i { width: 16px; color: var(--text-muted); }
.dropdown-item-danger { color: var(--danger) !important; }
.dropdown-item-danger:hover { background: var(--danger-dim) !important; }
.dropdown-divider { height: 1px; background: var(--border); margin: .35rem 0; }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav drawer */
.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: .5rem 0;
}
.mobile-nav-link {
  display: block; padding: .75rem 1.5rem;
  color: var(--text); font-size: .95rem;
  transition: background var(--transition);
}
.mobile-nav-link:hover { background: var(--surface-2); color: var(--text); }
.mobile-nav-danger  { color: var(--danger) !important; }
.mobile-nav-divider { height: 1px; background: var(--border); margin: .35rem 0; }

/* ── App Container ───────────────────────────────────────────── */
.app-container {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Page Base ───────────────────────────────────────────────── */
.page {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  animation: fadeIn .22s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; }

.section { margin-top: 3rem; }
.section-title {
  font-size: 1.2rem; font-weight: 600; margin-bottom: 1.25rem;
  color: var(--text-muted);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; padding: .55rem 1.25rem;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }
.btn-ghost   { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)   { background: var(--surface-3); transform: translateY(-1px); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: var(--danger-hover); transform: translateY(-1px); }
.btn-sm { padding: .38rem .9rem; font-size: .82rem; }
.btn-lg { padding: .72rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-back {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; font-family: var(--font); font-size: .88rem;
  transition: color var(--transition);
}
.btn-back:hover { color: var(--text); }

/* ── Cards & Surfaces ────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow); }

/* ── Skeleton Loader ─────────────────────────────────────────── */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 120px;
  position: relative; overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from{transform:translateX(-100%)} to{transform:translateX(100%)} }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select, textarea {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: .6rem .9rem;
  border-radius: var(--radius-sm); font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
input::placeholder { color: var(--text-faint); }
select option { background: var(--surface-2); }

.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 2.5rem; }
.toggle-password {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  transition: color var(--transition);
}
.toggle-password:hover { color: var(--text); }

.field-error { font-size: .78rem; color: var(--danger); min-height: 1rem; }

.select-sm {
  padding: .35rem .7rem; font-size: .82rem; width: auto;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  font-size: .87rem; display: flex; align-items: center; gap: .5rem;
}
.alert-error   { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3);   }
.alert-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(34,197,94,.3);  }
.alert-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.alert-info    { background: var(--accent-dim);  color: var(--accent);  border: 1px solid rgba(59,130,246,.3); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .6rem; border-radius: 99px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-success  { background: var(--success-dim); color: var(--success); }
.badge-danger   { background: var(--danger-dim);  color: var(--danger);  }
.badge-warning  { background: var(--warning-dim); color: var(--warning); }
.badge-accent   { background: var(--accent-dim);  color: var(--accent);  }
.badge-muted    { background: var(--surface-2);   color: var(--text-muted); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center; padding: 4rem 1rem 3rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,.12) 0%, transparent 70%);
}
.hero-badge {
  display: inline-block; margin-bottom: 1.25rem;
  background: var(--accent-dim); color: var(--accent);
  padding: .3rem .9rem; border-radius: 99px;
  font-size: .8rem; font-weight: 600; border: 1px solid var(--accent-glow);
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 1rem;
}
.hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  color: var(--text-muted); max-width: 520px; margin: 0 auto 2rem;
}
.hero-actions {
  display: flex; gap: .75rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 3rem;
}
.hero-stats {
  display: flex; justify-content: center; gap: 3rem;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.hero-stat-num {
  font-size: 1.8rem; font-weight: 700; color: var(--accent);
}
.hero-stat span:last-child { font-size: .8rem; color: var(--text-muted); }

/* ── Service Grid ────────────────────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: .85rem;
}
.service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem;
  cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; text-align: center;
}
.service-card:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.service-card-icon { font-size: 2rem; line-height: 1; }
.service-card-name {
  font-size: .88rem; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.service-card-meta {
  display: flex; flex-direction: column; align-items: center;
  gap: .15rem; margin-top: auto;
}
.service-card-price {
  font-size: .82rem; color: var(--success); font-weight: 600;
}
.service-card-servers {
  font-size: .72rem; color: var(--text-faint);
}

/* ── Features Grid ───────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.feature-card p  { font-size: .85rem; color: var(--text-muted); }

/* ── Auth Page ───────────────────────────────────────────────── */
.page-auth { max-width: 420px; padding-top: 3rem; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 1.75rem; }
.auth-logo { font-size: 2.5rem; margin-bottom: .75rem; }
.auth-header h1 { font-size: 1.4rem; font-weight: 700; }
.auth-header p  { font-size: .88rem; color: var(--text-muted); margin-top: .25rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-switch { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 1.25rem; }

/* ── Search Bar ──────────────────────────────────────────────── */
.search-bar-wrap { margin-bottom: 1.5rem; }
.search-bar {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .6rem 1rem;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-bar i { color: var(--text-faint); flex-shrink: 0; }
.search-bar input {
  background: none; border: none; padding: 0;
  font-size: .92rem; flex: 1;
}
.search-bar input:focus { box-shadow: none; }

/* ── Servers Page ────────────────────────────────────────────── */
.page-servers .page-header { flex-direction: column; align-items: flex-start; }
.service-hero {
  display: flex; align-items: center; gap: 1rem;
}
.service-hero-icon { font-size: 2.5rem; }
.service-hero h1   { font-size: 1.5rem; font-weight: 700; margin-bottom: .15rem; }
.service-hero p    { font-size: .88rem; color: var(--text-muted); }
.servers-section-title {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 600; margin-bottom: 1rem;
}

/* Recommended Banner */
.recommended-banner {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(59,130,246,.06));
  border: 1px solid var(--accent-glow); border-radius: var(--radius-lg);
  padding: .85rem 1.25rem; margin-bottom: 1.5rem;
}
.recommended-label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); flex-shrink: 0;
}
.recommended-server { flex: 1; font-size: .88rem; }

/* Server List */
.servers-list { display: flex; flex-direction: column; gap: .75rem; }
.server-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  cursor: pointer; transition: all var(--transition);
}
.server-card:hover { border-color: var(--accent); box-shadow: 0 2px 12px var(--accent-glow); }
.server-card.recommended { border-color: var(--accent-glow); }
.server-info { flex: 1; min-width: 0; }
.server-name {
  font-weight: 600; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-country { font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.server-badges  { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.server-price {
  font-size: 1.1rem; font-weight: 700; color: var(--success);
  flex-shrink: 0;
}
.server-price-label { font-size: .72rem; color: var(--text-faint); text-align: right; }
.server-buy-btn { flex-shrink: 0; }

/* Speed indicator */
.speed-fast   { background: var(--success-dim); color: var(--success); }
.speed-medium { background: var(--warning-dim); color: var(--warning); }
.speed-slow   { background: var(--danger-dim);  color: var(--danger); }
.speed-unknown{ background: var(--surface-2);   color: var(--text-faint); }

/* ── Order Page ──────────────────────────────────────────────── */
.page-order { max-width: 500px; }
.order-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.order-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.order-service-info { display: flex; align-items: center; gap: .75rem; }
.order-icon { font-size: 2rem; }
.order-service-info h2 { font-size: 1.1rem; font-weight: 700; }
.order-server-name { font-size: .8rem; color: var(--text-muted); }
.order-status-badge {
  padding: .3rem .75rem; border-radius: 99px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.status-active    { background: var(--accent-dim);  color: var(--accent);  }
.status-completed { background: var(--success-dim); color: var(--success); }
.status-refunded, .status-cancelled { background: var(--danger-dim); color: var(--danger); }
.status-timeout, .status-error { background: var(--warning-dim); color: var(--warning); }
.status-pending   { background: var(--surface-2); color: var(--text-muted); }

.order-number-section, .order-otp-section {
  margin-bottom: 1.25rem;
}
.order-number-section label,
.order-otp-section label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); font-weight: 600; display: block; margin-bottom: .4rem;
}
.order-number, .order-otp {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.order-number .mono { font-size: 1.05rem; letter-spacing: .05em; }
.otp-code {
  font-size: 2rem; font-weight: 700; color: var(--success);
  letter-spacing: .25em;
}
.otp-success-msg {
  font-size: .8rem; color: var(--success); margin-top: .5rem;
  display: flex; align-items: center; gap: .4rem;
}
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); transition: color var(--transition); padding: .25rem;
}
.copy-btn:hover { color: var(--accent); }

/* Waiting animation */
.order-waiting {
  text-align: center; padding: 1.5rem 0;
}
.waiting-dots {
  display: flex; justify-content: center; gap: .5rem; margin-bottom: 1rem;
}
.waiting-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  animation: bounce 1.2s ease infinite;
}
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.order-waiting p { color: var(--text-muted); font-size: .9rem; margin-bottom: .75rem; }
.order-timer {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--warning); font-family: var(--mono); font-size: 1rem; font-weight: 600;
}
.order-meta {
  display: flex; gap: 1.25rem; padding: .85rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem; font-size: .82rem; color: var(--text-muted); flex-wrap: wrap;
}
.order-meta i { color: var(--text-faint); }
.order-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Dashboard ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem; margin-bottom: 1.75rem;
}
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem;
}
.stat-card-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); font-weight: 600; margin-bottom: .4rem;
}
.stat-card-value { font-size: 1.6rem; font-weight: 700; }
.stat-card-sub   { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

.dashboard-grid {
  display: grid; gap: 1.25rem;
}
@media (min-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
}
.dashboard-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { font-size: 1rem; font-weight: 600; }

/* ── Order Row ───────────────────────────────────────────────── */
.order-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .75rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity var(--transition);
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { opacity: .8; }
.order-row-icon { font-size: 1.5rem; flex-shrink: 0; }
.order-row-info { flex: 1; min-width: 0; }
.order-row-name { font-size: .88rem; font-weight: 600; }
.order-row-number { font-size: .78rem; color: var(--text-muted); font-family: var(--mono); }
.order-row-right { text-align: right; flex-shrink: 0; }
.order-row-price { font-size: .85rem; font-weight: 600; }
.order-row-date  { font-size: .72rem; color: var(--text-faint); margin-top: .15rem; }

/* ── Transaction Row ─────────────────────────────────────────── */
.tx-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: none; }
.tx-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.tx-icon-deposit  { background: var(--success-dim); color: var(--success); }
.tx-icon-refund   { background: var(--accent-dim);  color: var(--accent); }
.tx-icon-purchase { background: var(--danger-dim);  color: var(--danger); }
.tx-icon-adjust   { background: var(--warning-dim); color: var(--warning); }
.tx-info  { flex: 1; min-width: 0; }
.tx-desc  { font-size: .85rem; font-weight: 500; }
.tx-date  { font-size: .74rem; color: var(--text-faint); margin-top: .1rem; }
.tx-amount { font-size: .95rem; font-weight: 700; flex-shrink: 0; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }

/* ── Orders List (history) ───────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: .75rem; }
.order-history-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  cursor: pointer; transition: border-color var(--transition);
}
.order-history-card:hover { border-color: var(--border-light); }
.order-history-info { flex: 1; min-width: 0; }
.order-history-title { font-size: .92rem; font-weight: 600; }
.order-history-number { font-size: .78rem; color: var(--text-muted); font-family: var(--mono); }
.order-history-meta  { font-size: .74rem; color: var(--text-faint); margin-top: .2rem; }
.order-history-right { text-align: right; }
.order-history-price { font-size: .92rem; font-weight: 700; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .4rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.page-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: .85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover     { background: var(--surface-2); border-color: var(--border-light); }
.page-btn.active    { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled  { opacity: .4; cursor: not-allowed; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3.5rem 1rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.empty-state p { font-size: .95rem; }

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  z-index: 9000; display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: .65rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1.1rem;
  box-shadow: var(--shadow-lg); font-size: .875rem;
  pointer-events: all; max-width: 320px;
  animation: slideInRight .2s ease;
}
@keyframes slideInRight {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: none; }
}
.toast.removing { animation: slideOutRight .2s ease forwards; }
@keyframes slideOutRight {
  to { opacity:0; transform: translateX(20px); }
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--accent); }
.toast-icon    { font-size: 1rem; flex-shrink: 0; }

/* ── Confirm Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2rem 1.75rem;
  max-width: 380px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg); animation: fadeIn .18s ease;
}
.modal-icon   { font-size: 2.5rem; margin-bottom: .75rem; }
.modal-title  { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.modal-body   { font-size: .88rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: center; }

/* ── Admin Panel ─────────────────────────────────────────────── */
.page-admin { max-width: 100%; padding: 0; }
.admin-layout {
  display: flex; min-height: calc(100vh - var(--nav-h));
}

/* Sidebar */
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
@media (max-width: 767px) {
  .admin-sidebar {
    position: fixed; top: var(--nav-h); left: 0; bottom: 0;
    z-index: 300; transform: translateX(-100%);
    transition: transform .22s ease;
    width: 240px;
  }
  .admin-sidebar.open { transform: none; }
}
.admin-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .95rem;
}
.admin-sidebar-close {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  display: none;
}
@media (max-width: 767px) { .admin-sidebar-close { display: flex; } }
.admin-nav { padding: .75rem .6rem; display: flex; flex-direction: column; gap: .2rem; }
.admin-nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .9rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .88rem; font-weight: 500;
  transition: all var(--transition);
}
.admin-nav-link:hover { color: var(--text); background: var(--surface-2); }
.admin-nav-link.active { color: var(--accent); background: var(--accent-dim); }
.admin-nav-link i { width: 16px; }

/* Admin Main */
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: var(--nav-h); z-index: 10;
}
.admin-menu-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.1rem; display: none;
}
@media (max-width: 767px) { .admin-menu-btn { display: flex; } }
.admin-page-title { font-size: 1rem; font-weight: 600; }
.admin-content { padding: 1.5rem; }

/* Admin Stats Row */
.admin-stats-row {
  display: grid; gap: .85rem; margin-bottom: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
  .admin-stats-row { grid-template-columns: repeat(4, 1fr); }
}

/* Admin Table */
.admin-table-wrap {
  overflow-x: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.admin-table th {
  background: var(--surface-2); padding: .75rem 1rem;
  text-align: left; font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-table .actions { display: flex; gap: .4rem; }

/* Admin toolbar */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.admin-toolbar h3 { font-size: 1rem; font-weight: 600; }

/* Admin Form Card */
.admin-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-form-title {
  font-size: .95rem; font-weight: 600; margin-bottom: 1.25rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.admin-form-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .admin-form-grid { grid-template-columns: 1fr 1fr; }
}
.admin-form-actions {
  display: flex; gap: .75rem; margin-top: 1.25rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}

/* Sync button special style */
.btn-sync {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn-sync:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124,58,237,.4);
}

/* API status pill in admin */
.api-status-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: .35rem;
}
.dot-active   { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot-inactive { background: var(--text-faint); }
.dot-error    { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
  .hero { padding: 2.5rem .5rem 2rem; }
  .hero-stats { gap: 1.5rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
  .order-card { padding: 1.25rem; }
  .otp-code { font-size: 1.6rem; }
}
