/* ══════════════════════════════════════════════════════════════
   CodeDaisy — Design System
══════════════════════════════════════════════════════════════ */
:root {
  --bg:           #0f172a;
  --sidebar:      #1e293b;
  --card:         rgba(30, 41, 59, 0.7);
  --card-solid:   #1e293b;
  --border:       rgba(255, 255, 255, 0.07);
  --text:         #f1f5f9;
  --muted:        #94a3b8;
  --accent:       #10b981;
  --accent-h:     #059669;
  --accent-glow:  rgba(16, 185, 129, 0.25);
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --info:         #3b82f6;
  --glass:        blur(14px) saturate(160%);
  --radius:       1rem;
  --shadow:       0 8px 24px rgba(0,0,0,0.35);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── Auth ─────────────────────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 70% 20%, #1e1b4b 0%, #0f172a 65%);
  padding: 1rem;
}

.auth-card {
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  animation: slideUp .5s cubic-bezier(.16,1,.3,1);
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  justify-content: center;
  margin-bottom: 2rem;
  letter-spacing: -.02em;
}

.auth-card h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: .3rem; }
.auth-card > div > p { color: var(--muted); margin-bottom: 1.5rem; font-size: .9rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

input, select, textarea {
  width: 100%;
  padding: .7rem 1rem;
  background: rgba(15, 23, 42, .8);
  border: 1px solid var(--border);
  border-radius: .75rem;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder { color: var(--muted); }

.btn-primary {
  width: 100%;
  padding: .8rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: .75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 14px var(--accent-glow);
  margin-top: .25rem;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--muted);
}
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ── Dashboard Layout ─────────────────────────────────────────── */
#dashboard-view {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  padding: .5rem .75rem;
  margin-bottom: 2rem;
  letter-spacing: -.02em;
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: .25rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: .75rem;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: rgba(16,185,129,.12); color: var(--accent); font-weight: 600; }
.nav-item i { width: 1.1rem; text-align: center; font-size: .95rem; }

.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-name-side { font-weight: 600; font-size: .875rem; }
.user-role-side { font-size: .75rem; color: var(--muted); }

.btn-logout {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: .75rem;
  cursor: pointer;
  font-size: .875rem;
  transition: all .2s;
}
.btn-logout:hover { background: rgba(239,68,68,.1); color: var(--danger); border-color: var(--danger); }

/* ── Main Content ─────────────────────────────────────────────── */
.main-content { display: flex; flex-direction: column; overflow: hidden; }

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 72px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1.5rem;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.header-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.header-search input { padding-left: 2.75rem; }

.header-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

.balance-pill {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .875rem;
}
.balance-pill i { color: var(--accent); }
.bal-label { color: var(--muted); }
.bal-value { font-weight: 700; color: var(--accent); }
.bal-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  line-height: 1;
  transition: background .2s;
}
.bal-add:hover { background: var(--accent-h); }

.header-user-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  font-weight: 500;
}
.header-user-info img { width: 32px; height: 32px; border-radius: 50%; }

/* ── Content Body ─────────────────────────────────────────────── */
.content-body { flex: 1; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 0; }

.page { animation: fadeIn .25s ease; }
.page.hidden { display: none !important; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.section { margin-bottom: 2.5rem; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title { display: flex; align-items: center; gap: .75rem; }
.section-title h2 { font-size: 1.15rem; font-weight: 700; }

.count-badge {
  background: var(--accent);
  color: #fff;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.section-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

.cate-tabs, .type-tabs {
  display: flex;
  background: rgba(255,255,255,.05);
  border-radius: .75rem;
  padding: .2rem;
  gap: .2rem;
}

.cate-btn, .type-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: .45rem 1rem;
  border-radius: .55rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.cate-btn.active, .type-btn.active {
  background: var(--accent);
  color: #fff;
}
.cate-btn:hover:not(.active), .type-btn:hover:not(.active) {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

/* ── Active Numbers Grid ──────────────────────────────────────── */
.active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.active-card {
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.active-card:hover { border-color: rgba(16,185,129,.3); }

.ac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem .75rem;
}

.ac-service { display: flex; align-items: center; gap: .875rem; }
.ac-icon {
  width: 44px; height: 44px;
  background: rgba(16,185,129,.1);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.1rem;
  flex-shrink: 0;
}
.ac-app-name { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.ac-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  letter-spacing: .03em;
}
.ac-number:hover { color: var(--accent); }
.ac-copy-icon { font-size: .75rem; color: var(--muted); }

.ac-timer {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  padding: .35rem .75rem;
  border-radius: .6rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.ac-timer.low { color: var(--warning); background: rgba(245,158,11,.1); }
.ac-timer.expired { color: var(--danger); background: rgba(239,68,68,.1); }

/* SMS Display */
.ac-sms {
  margin: 0 1.25rem .25rem;
  background: rgba(15,23,42,.5);
  border: 1px solid var(--border);
  border-radius: 1rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sms-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem;
  color: var(--muted);
  font-size: .875rem;
}

.sms-pulse {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16,185,129,.15);
  position: relative;
}
.sms-pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: .6;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(.85); opacity: .6; }
  50% { transform: scale(1.15); opacity: .15; }
}
.sms-pulse::before {
  content: '\f3cd';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
}

.sms-received { padding: 1rem 1.25rem; width: 100%; }
.otp-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.otp-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.otp-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .12em;
  text-shadow: 0 0 20px var(--accent-glow);
}
.sms-text {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

/* Footer buttons */
.ac-footer {
  display: flex;
  gap: .6rem;
  padding: .875rem 1.25rem 1.25rem;
  flex-wrap: wrap;
}

.ac-btn {
  flex: 1;
  min-width: 90px;
  padding: .55rem .75rem;
  border-radius: .65rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.ac-btn.copy { background: rgba(16,185,129,.1); color: var(--accent); border-color: rgba(16,185,129,.3); }
.ac-btn.copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ac-btn.copy-otp { background: rgba(59,130,246,.1); color: var(--info); border-color: rgba(59,130,246,.3); }
.ac-btn.copy-otp:hover { background: var(--info); color: #fff; border-color: var(--info); }
.ac-btn.extend { background: rgba(245,158,11,.1); color: #f59e0b; border-color: rgba(245,158,11,.3); }
.ac-btn.extend:hover { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.ac-btn.cancel { background: rgba(239,68,68,.08); color: var(--danger); border-color: rgba(239,68,68,.25); }
.ac-btn.cancel:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── Services Grid ────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-align: center;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(16,185,129,.07);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.service-card.out-of-stock { opacity: .45; cursor: not-allowed; }
.service-card.out-of-stock:hover { transform: none; border-color: var(--border); background: var(--card); }

.sc-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.05);
  border-radius: .875rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sc-icon img { width: 34px; height: 34px; object-fit: contain; }

.sc-name {
  font-weight: 600;
  font-size: .825rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: .18rem .55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sc-badge.nonvoip { background: rgba(16,185,129,.15); color: var(--accent); }
.sc-badge.voip    { background: rgba(239,68,68,.15); color: var(--danger); }

.sc-price { font-size: 1.05rem; font-weight: 800; color: var(--accent); }

.sc-stock { font-size: .72rem; color: var(--muted); }
.sc-stock.none { color: var(--danger); font-weight: 600; }

.sc-buy-btn {
  width: 100%;
  padding: .5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: .6rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: .25rem;
  transition: background .2s;
}
.sc-buy-btn:hover { background: var(--accent-h); }

/* ── Empty / Loading states ───────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 3rem 2rem;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.02);
  border: 1px dashed var(--border);
  border-radius: 1rem;
}
.empty-state i { font-size: 2.5rem; opacity: .35; }

.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--muted);
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tables ───────────────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.2rem; font-weight: 700; }

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}
.table-card table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table-card th {
  padding: .875rem 1.1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
}
.table-card td {
  padding: .875rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.table-card tr:last-child td { border-bottom: none; }
.table-card tr:hover td { background: rgba(255,255,255,.02); }
.empty-cell { text-align: center; color: var(--muted); padding: 2.5rem !important; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: .82rem; }
.price { font-weight: 700; color: var(--accent); }

.history-otp {
  font-family: 'JetBrains Mono', monospace;
  font-size: .95rem;
  font-weight: 800;
  color: var(--accent);
}
.history-sms { color: var(--muted); font-size: .8rem; }
.history-empty { color: var(--border); }

.status-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: capitalize;
}
.status-badge.active  { background: rgba(16,185,129,.15); color: var(--accent); }
.status-badge.expired { background: rgba(239,68,68,.12); color: var(--danger); }

.tbl-btn {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  color: var(--accent);
  padding: .35rem .75rem;
  border-radius: .55rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.tbl-btn:hover { background: var(--accent); color: #fff; }

/* ── Deposit Page ─────────────────────────────────────────────── */
.deposit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) { .deposit-layout { grid-template-columns: 1fr; } }

.deposit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
}

.deposit-card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.25rem;
}
.deposit-card-head h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.deposit-desc { color: var(--muted); font-size: .875rem; margin-bottom: 1.25rem; line-height: 1.6; }

.wallet-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.wallet-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  background: rgba(15,23,42,.5);
  border: 1px solid var(--border);
  border-radius: .875rem;
  padding: .875rem 1rem;
}
.w-icon {
  width: 38px; height: 38px;
  background: rgba(245,158,11,.1);
  color: var(--warning);
  border-radius: .65rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.w-icon.usdt { background: rgba(16,185,129,.1); color: var(--accent); }
.w-info { flex: 1; min-width: 0; }
.w-label { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.w-addr { display: block; font-size: .8rem; font-family: monospace; color: var(--text); word-break: break-all; }
.w-copy {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: .5rem;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.w-copy:hover { border-color: var(--accent); color: var(--accent); }

.recharge-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.recharge-form .form-group { margin-bottom: 1rem; }
.recharge-form .btn-primary { margin-top: .5rem; }

/* Transactions list */
.txn-list { display: flex; flex-direction: column; gap: .6rem; }
.txn-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .875rem 1rem;
  background: rgba(15,23,42,.4);
  border-radius: .75rem;
  border: 1px solid var(--border);
}
.txn-left { display: flex; align-items: center; gap: .875rem; }
.txn-type {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.txn-type.recharge  { background: rgba(16,185,129,.15); color: var(--accent); }
.txn-type.purchase  { background: rgba(59,130,246,.15); color: var(--info); }
.txn-type.refund    { background: rgba(245,158,11,.15); color: var(--warning); }
.txn-type.manual    { background: rgba(255,255,255,.08); color: var(--muted); }
.txn-note { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.txn-right { text-align: right; }
.txn-amount { font-weight: 700; font-size: .95rem; }
.txn-amount.pos { color: var(--accent); }
.txn-amount.neg { color: var(--danger); }
.txn-date { font-size: .75rem; color: var(--muted); margin-top: .15rem; }

/* ── Referral ─────────────────────────────────────────────────── */
.referral-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.referral-info h3 { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin-bottom: .5rem; }
.referral-info p { color: var(--muted); line-height: 1.6; }
.referral-code-box label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.code-row {
  display: flex;
  align-items: center;
  background: rgba(15,23,42,.6);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  gap: 1rem;
  justify-content: space-between;
}
.code-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
}
.btn-copy-code {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  color: var(--accent);
  padding: .5rem 1.1rem;
  border-radius: .6rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.btn-copy-code:hover { background: var(--accent); color: #fff; }

/* ══════════════════════════════════════════════════════════════
   BUY MODAL
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeOverlay .2s ease;
}
@keyframes fadeOverlay { from{opacity:0} to{opacity:1} }

.buy-modal {
  background: #1a2744;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0,0,0,.6);
  animation: modalIn .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}
@keyframes modalIn { from{opacity:0;transform:scale(.92) translateY(12px)} to{opacity:1;transform:scale(1) translateY(0)} }

.modal-close-btn {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: rgba(255,255,255,.08);
  border: none;
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  z-index: 1;
}
.modal-close-btn:hover { background: rgba(239,68,68,.15); color: var(--danger); }

/* Modal header */
.bm-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.bm-service-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.06);
  border-radius: .875rem;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bm-service-icon img { width: 36px; height: 36px; object-fit: contain; }
.bm-service-name { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.bm-service-tag {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(16,185,129,.12);
  padding: .15rem .55rem;
  border-radius: 999px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Modal body */
.bm-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }

.bm-section {}
.bm-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .55rem;
}
.optional { font-weight: 400; color: var(--border); text-transform: none; letter-spacing: 0; }

.bm-type-row { display: flex; gap: .5rem; }
.bm-type-btn {
  flex: 1;
  padding: .65rem .5rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: .75rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}
.bm-type-btn.active {
  background: rgba(16,185,129,.15);
  border-color: var(--accent);
  color: var(--accent);
}
.bm-type-btn:hover:not(.active) { border-color: rgba(255,255,255,.15); color: var(--text); }

.bm-select {
  width: 100%;
  padding: .65rem 1rem;
  background: rgba(15,23,42,.7);
  border: 1px solid var(--border);
  border-radius: .75rem;
  color: var(--text);
  font-size: .875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.bm-select:focus { border-color: var(--accent); }
.bm-select optgroup { font-weight: 700; }

.bm-input {
  width: 100%;
  padding: .65rem 1rem;
  background: rgba(15,23,42,.7);
  border: 1px solid var(--border);
  border-radius: .75rem;
  color: var(--text);
  font-size: .875rem;
  outline: none;
  box-sizing: border-box;
}
.bm-input:focus { border-color: var(--accent); }
.bm-label-required { color: #f87171; font-size: .75rem; font-weight: 600; margin-left: .25rem; }

/* Price row */
.bm-price-row {
  display: flex;
  background: rgba(15,23,42,.5);
  border: 1px solid var(--border);
  border-radius: .875rem;
  overflow: hidden;
}
.bm-price-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .875rem .5rem;
  gap: .2rem;
}
.bm-divider { width: 1px; background: var(--border); }
.bm-price-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bm-price-val { font-size: 1rem; font-weight: 800; color: var(--accent); }

/* Modal footer */
.bm-footer {
  display: flex;
  gap: .875rem;
  padding: 1rem 1.5rem 1.5rem;
}
.bm-cancel-btn {
  flex: 1;
  padding: .8rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: .875rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.bm-cancel-btn:hover { background: rgba(255,255,255,.05); color: var(--text); }

.bm-confirm-btn {
  flex: 2;
  padding: .8rem;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: .875rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.bm-confirm-btn:hover:not(:disabled) { background: var(--accent-h); transform: translateY(-1px); }
.bm-confirm-btn:disabled { background: rgba(255,255,255,.1); color: var(--muted); cursor: not-allowed; box-shadow: none; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: .875rem 1.5rem;
  border-radius: .875rem;
  font-size: .9rem;
  font-weight: 600;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: rgba(16,185,129,.15); border: 1px solid var(--accent); color: var(--accent); }
.toast.error   { background: rgba(239,68,68,.15); border: 1px solid var(--danger); color: var(--danger); }

/* ── Auth extras ──────────────────────────────────────────────── */
.auth-forgot { text-align: right; margin: -.4rem 0 .75rem; }
.auth-forgot a { color: var(--muted); font-size: .82rem; text-decoration: none; }
.auth-forgot a:hover { color: var(--accent); }

/* ── Profile Page ─────────────────────────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(16,185,129,.12) 0%, rgba(30,41,59,.8) 100%);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.profile-hero img {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(16,185,129,.15);
  flex-shrink: 0;
}
.profile-hero-info h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
.profile-email { color: var(--muted); font-size: .875rem; margin-bottom: .6rem; }
.profile-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.25);
  color: var(--accent); font-size: .75rem; font-weight: 600;
  padding: .25rem .7rem; border-radius: 999px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: .5rem;
}
.profile-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.profile-stat-val { font-size: 1.4rem; font-weight: 700; color: var(--accent); margin-bottom: .25rem; }
.profile-stat-label { font-size: .75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 768px) {
  .profile-hero { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

/* Mobile topbar — hidden on desktop */
.mobile-topbar { display: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 499; }
.sidebar-overlay.show { display: block; }
.hamburger { background: none; border: none; color: var(--text); font-size: 1.25rem; cursor: pointer; padding: .25rem; }

/* ── Mobile Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Auth */
  .auth-card { padding: 1.75rem 1.25rem; width: 100%; max-width: 100%; }

  /* Dashboard layout — switch from grid to block */
  #dashboard-view { display: block !important; height: 100vh; overflow: hidden; }

  /* Sidebar slides in from left */
  .sidebar {
    position: fixed; left: -260px; top: 0; bottom: 0; width: 240px;
    z-index: 500; transition: left .25s ease; box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  .sidebar.open { left: 0; }

  /* Main content takes full width */
  .main-content { height: 100vh; overflow-y: auto; }
  .top-header { display: none; }

  /* Mobile topbar visible */
  .mobile-topbar {
    display: flex; flex-direction: column;
    padding: .75rem 1rem .5rem; background: var(--sidebar);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
  }
  .mobile-topbar .mob-top-row { display: flex; align-items: center; justify-content: space-between; }
  .mobile-topbar .mob-logo { color: var(--accent); font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
  .mobile-topbar .mob-right { display: flex; align-items: center; gap: .75rem; }
  .mob-search-row { padding: .5rem 0 .25rem; }
  .mob-search-wrap { position: relative; }
  .mob-search-wrap i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
  .mob-search-wrap input { width: 100%; padding: .5rem .75rem .5rem 2.2rem; background: var(--card); border: 1px solid var(--border); border-radius: .75rem; color: var(--text); font-size: .875rem; box-sizing: border-box; }
  .mob-search-wrap input::placeholder { color: var(--muted); }

  /* Content padding */
  .content-body { padding: 1rem; }
  .services-grid { grid-template-columns: 1fr 1fr !important; }
  .active-list { gap: .75rem; }
  .number-card { padding: 1rem; }
  .bm-sheet { max-width: 100% !important; border-radius: 1.25rem 1.25rem 0 0 !important; }
  .stats-row { grid-template-columns: 1fr 1fr !important; gap: .75rem !important; }
  .toast { right: 1rem; left: 1rem; bottom: 1.5rem; max-width: none; text-align: center; }
}

@media (max-width: 400px) {
  .services-grid { grid-template-columns: 1fr !important; }
  .stats-row { grid-template-columns: 1fr !important; }
}
