/* ============================================================
   Modern SaaS/Fintech Redesign
   Design System: Stripe / Linear / Vercel inspired
   Primary:    #0F172A  (deep navy)
   Secondary:  #06B6D4  (cyan)
   Accent:     #22D3EE  (light cyan)
   Background: #F8FAFC  (off-white)
   Text:       #1E293B
   Success:    #10B981
   Warning:    #F59E0B
   Danger:     #EF4444
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --primary:       #0F172A;
  --primary-mid:   #1E293B;
  --primary-light: #334155;
  --secondary:     #06B6D4;
  --secondary-mid: #0891B2;
  --accent:        #22D3EE;
  --accent-pale:   #ECFEFF;
  --accent-dim:    #CFFAFE;

  /* Semantic status */
  --green:         #10B981;
  --green-mid:     #059669;
  --green-dim:     #D1FAE5;
  --red:           #EF4444;
  --red-mid:       #DC2626;
  --red-dim:       #FEE2E2;
  --yellow:        #F59E0B;
  --yellow-mid:    #D97706;
  --yellow-dim:    #FEF3C7;

  /* Surfaces */
  --bg:            #F8FAFC;
  --bg-white:      #FFFFFF;
  --surface:       #FFFFFF;
  --surface-alt:   #F1F5F9;
  --surface-hover: #E2E8F0;
  --border:        #E2E8F0;
  --border-light:  #F1F5F9;
  --border-focus:  #06B6D4;

  /* Text */
  --text-dark:     #0F172A;
  --text-body:     #1E293B;
  --text-muted:    #64748B;
  --text-subtle:   #94A3B8;
  --text-cyan:     #0891B2;
  --text-on-dark:  #F8FAFC;

  /* Radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Shadows — refined, desaturated */
  --shadow-xs:  0 1px 2px rgba(15,23,42,.06);
  --shadow-sm:  0 1px 4px rgba(15,23,42,.08), 0 0 0 1px rgba(15,23,42,.03);
  --shadow-md:  0 4px 16px rgba(15,23,42,.10), 0 1px 4px rgba(15,23,42,.06);
  --shadow-lg:  0 8px 32px rgba(15,23,42,.14), 0 2px 8px rgba(15,23,42,.08);
  --shadow-xl:  0 20px 48px rgba(15,23,42,.18), 0 4px 16px rgba(15,23,42,.10);
  --shadow-glow: 0 0 0 3px rgba(6,182,212,.18);

  /* Sizing */
  --header-h:  56px;
  --banner-h:  60px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;

  --t:  200ms cubic-bezier(.4,0,.2,1);
  --t-fast: 130ms ease;
}

/* ── Dark Mode ──────────────────────────────────────────────── */
[data-theme="dark"] {
  --accent-pale:   #083344;
  --accent-dim:    #164E63;

  --green-dim:     #064E3B;
  --red-dim:       #450A0A;
  --yellow-dim:    #451A03;

  --bg:            #020B18;
  --bg-white:      #0C1B2E;
  --surface:       #0C1B2E;
  --surface-alt:   #112035;
  --surface-hover: #162840;
  --border:        #1E3448;
  --border-light:  #162840;

  --text-dark:     #F1F5F9;
  --text-body:     #CBD5E1;
  --text-muted:    #64748B;
  --text-subtle:   #475569;
  --text-cyan:     #22D3EE;

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

  color-scheme: dark;
}

[data-theme="dark"] .topbar          { background: #050E1A; border-color: #1E3448; }
[data-theme="dark"] .banner          { background: linear-gradient(135deg, #050E1A 0%, #0C2340 100%); }
[data-theme="dark"] .card            { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .auth-box        { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .modal           { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .dropdown__menu  { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .payment-method-row   { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .payment-method-body  { background: var(--surface-alt); border-color: var(--border); }
[data-theme="dark"] .mobile-nav-drawer    { background: var(--bg-white); }
[data-theme="dark"] .history-table thead th      { background: var(--surface-alt); }
[data-theme="dark"] .history-table tbody tr:nth-child(even) { background: var(--surface-alt); }
[data-theme="dark"] pre              { background: var(--surface-alt); border-color: var(--border); }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea         { background: var(--surface-alt); border-color: var(--border); color: var(--text-dark); }
[data-theme="dark"] .search-box      { background: var(--surface-alt); border-color: var(--border); }
[data-theme="dark"] .service-item,
[data-theme="dark"] .country-item    { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .service-item:hover,
[data-theme="dark"] .country-item:hover { background: var(--surface-alt); }
[data-theme="dark"] .page-tab        { background: var(--bg-white); border-color: var(--border); }
[data-theme="dark"] .captcha-box     { background: var(--surface-alt); border-color: var(--border); }
[data-theme="dark"] .topbar__signin,
[data-theme="dark"] .topbar__purchases { color: rgba(255,255,255,.6); }
[data-theme="dark"] .topbar__register  { background: var(--secondary); border-color: var(--secondary); }

/* ── Country star (is-starred) ─────────────────────────────── */
.country-item__star.is-starred { color: var(--yellow); }

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

html { font-size: 14px; scroll-behavior: smooth; }

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

a { color: var(--secondary-mid); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--secondary); }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--accent-dim); color: var(--primary); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
  background: var(--primary);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}

.topbar__left  { display: flex; align-items: center; gap: 20px; }
.topbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.topbar__menu-btn {
  color: rgba(255,255,255,.8);
  font-size: 20px;
  display: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}
.topbar__menu-btn:hover { background: rgba(255,255,255,.08); }

/* Nav links */
.topbar__nav { display: flex; align-items: center; gap: 2px; }
.topbar__nav-link {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.topbar__nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Balance badge */
.topbar__balance {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(6,182,212,.15);
  border: 1px solid rgba(6,182,212,.3);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.topbar__balance:hover {
  background: rgba(6,182,212,.22);
  border-color: rgba(6,182,212,.5);
}
.topbar__balance svg { opacity: .8; }

/* Sign in / Register */
.topbar__signin {
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--t);
}
.topbar__signin:hover { color: #fff; }

.topbar__register {
  background: var(--secondary);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.topbar__register:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,.2);
}

/* Theme & lang controls */
.topbar__icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.55);
  font-size: 16px;
  transition: all var(--t);
}
.topbar__icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.lang-badge {
  display: flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t);
}
.lang-badge:hover { color: #fff; }

/* User dropdown trigger */
.topbar__user-btn {
  display: flex; align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  gap: 7px;
  cursor: pointer;
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.topbar__user-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }

/* Purchases link */
.topbar__purchases {
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--t);
}
.topbar__purchases:hover { color: rgba(255,255,255,.9); }

/* ── Dropdown Menu ──────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 300;
  animation: dropIn 160ms ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}
.dropdown__copy-btn { color: var(--text-muted); font-size: 14px; transition: color var(--t); }
.dropdown__copy-btn:hover { color: var(--secondary-mid); }

.dropdown__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-body);
  cursor: pointer;
  transition: background var(--t-fast);
}
.dropdown__item:hover { background: var(--surface-alt); }
.dropdown__item svg, .dropdown__item .icon { color: var(--text-muted); font-size: 16px; width: 18px; }
.dropdown__item--danger { color: var(--red); }
.dropdown__item--danger:hover { background: var(--red-dim); }
.dropdown__divider { height: 1px; background: var(--border-light); }

/* ── Banner ─────────────────────────────────────────────────── */
.banner {
  background: linear-gradient(135deg, #0F1F3D 0%, #0C2A4A 50%, #083344 100%);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(6,182,212,.15);
}

.banner__brand { display: flex; align-items: center; gap: 12px; }

.banner__logo {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: 10px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(6,182,212,.35);
}

.banner__title { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.banner__subtitle { color: rgba(255,255,255,.6); font-size: 12px; font-weight: 400; margin-top: 1px; }

.banner__tg-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(6,182,212,.15);
  border: 1px solid rgba(6,182,212,.3);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--t);
}
.banner__tg-btn:hover { background: rgba(6,182,212,.25); border-color: rgba(6,182,212,.5); }

/* Breadcrumb button */
.buy-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  cursor: pointer;
  transition: all var(--t);
}
.buy-crumb:hover { background: rgba(255,255,255,.2); }

/* ── Page Tabs — 5sim-style stacked layout ──────────────────── */
/*
   Row 1: active tab (large, left-aligned) + info icon (right, never wraps)
   Row 2: secondary navigation tabs side-by-side

   ANTI-DUPLICATE: if the layout header outputs its own .page-tabs AND
   the view also provides one, the header's copy is hidden via
   body[data-page-tabs] .page-tabs:first-of-type { display:none }
   Set data-page-tabs="view" on <body> from header.php when $pageTabsHtml isset.
*/
body[data-page-tabs="view"] > .page-tabs { display: none; }

.page-tabs {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* ── Row 1: primary/active tab row ── */
.page-tabs__primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;      /* info btn always stays on same line as tab */
  padding: 0 20px;
  border-bottom: 1px solid var(--border-light);
  min-height: 52px;
  gap: 12px;
}

/* ── Row 2: secondary tabs row ── */
.page-tabs__secondary {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 44px;
}
.page-tabs__secondary::-webkit-scrollbar { display: none; }

/* ── Primary active tab (SMS Deliveries style) ── */
.page-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  margin-bottom: 0;       /* was -1px — caused vertical misalignment */
  cursor: pointer;
  transition: color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 1;
  min-width: 0;
}
.page-tab svg { opacity: .7; flex-shrink: 0; transition: opacity var(--t-fast); font-size: 18px; }
.page-tab:hover { color: var(--secondary-mid); }
.page-tab:hover svg { opacity: 1; }

/* Active state: cyan underline, like 5sim orange underline */
.page-tab.is-active {
  color: var(--secondary-mid);
  border-bottom-color: var(--secondary);
  font-weight: 700;
}
.page-tab.is-active svg { opacity: 1; color: var(--secondary-mid); }

/* Secondary tab (Prices, Statistics) — smaller, icon+label, in row 2 */
.page-tab--secondary {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary-mid);
  padding: 10px 16px;
  border-bottom: none;
  margin-bottom: 0;
  gap: 6px;
}
.page-tab--secondary svg { font-size: 16px; color: var(--secondary-mid); opacity: 1; }
.page-tab--secondary:hover { color: var(--secondary); background: var(--accent-pale); border-radius: var(--radius-sm); }
.page-tab--secondary.is-active {
  color: var(--secondary);
  font-weight: 700;
  border-bottom: none;
}

/* Info button — right side of primary row */
.page-tab__info-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  font-size: 16px;
}
.page-tab__info-btn:hover { background: var(--accent-pale); color: var(--secondary-mid); border-color: var(--accent-dim); }

/* ── Layout ─────────────────────────────────────────────────── */
.page-wrap      { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.page-wrap--wide { max-width: 1280px; margin: 0 auto; padding: 24px 20px; }

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: box-shadow var(--t);
}
.card:hover { box-shadow: var(--shadow-md); }
.card--flat { box-shadow: none !important; }

/* ── Step label ─────────────────────────────────────────────── */
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}

.step-label__sort-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-pale);
  color: var(--secondary-mid);
  display: grid; place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--t);
  border: 1px solid var(--accent-dim);
}
.step-label__sort-btn:hover { background: var(--accent-dim); }

/* ── Search Box ─────────────────────────────────────────────── */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 18px;
  margin-bottom: 12px;
  transition: all var(--t);
}
.search-box:focus-within {
  border-color: var(--secondary);
  box-shadow: var(--shadow-glow);
}
.search-box input { flex: 1; font-size: 13px; color: var(--text-body); background: none; }
.search-box input::placeholder { color: var(--text-subtle); }
.search-box svg { color: var(--text-muted); font-size: 16px; flex-shrink: 0; }

/* Selected chip */
.selected-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent-pale);
  border: 1.5px solid var(--accent-dim);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-mid);
  margin-bottom: 12px;
}
.selected-chip__clear {
  color: var(--secondary-mid);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center;
  transition: color var(--t-fast);
}
.selected-chip__clear:hover { color: var(--secondary); }
.selected-chip__icon { font-size: 16px; }

/* ── Service List ────────────────────────────────────────────── */
.service-list {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--t-fast);
}
.service-item:last-child { border-bottom: none; }
.service-item:hover { background: var(--surface-alt); }
.service-item.is-active {
  background: var(--accent-pale);
  border-left: 2px solid var(--secondary);
}

.service-item__star {
  color: var(--border);
  font-size: 16px;
  flex-shrink: 0;
  transition: color var(--t);
  cursor: pointer;
}
.service-item__star:hover,
.service-item__star.is-starred { color: var(--yellow); }

.service-item__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 18px;
  background: var(--surface-alt);
  overflow: hidden;
  white-space: nowrap;
}
.service-item__icon img { width: 22px; height: 22px; object-fit: contain; display: block; }

.service-item__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.service-item__right { text-align: right; flex-shrink: 0; }
.service-item__price-row { font-size: 12px; color: var(--text-muted); display: flex; align-items: baseline; gap: 4px; }
.service-item__price { font-size: 14px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.02em; }
.service-item__qty   { font-size: 11px; font-weight: 600; color: var(--secondary-mid); }

.show-all-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary-mid);
  cursor: pointer;
  transition: background var(--t-fast);
}
.show-all-btn:hover { background: var(--accent-pale); }

/* ── Country List ────────────────────────────────────────────── */
.country-list {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.country-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--t-fast);
}
.country-item:last-child { border-bottom: none; }
.country-item:hover { background: var(--surface-alt); }
.country-item.is-active {
  background: var(--accent-pale);
  border-left: 2px solid var(--secondary);
}

.country-item__star { color: var(--border); font-size: 16px; cursor: pointer; transition: color var(--t); }
.country-item__star:hover { color: var(--yellow); }
.country-item__flag { font-size: 20px; }
.country-item__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

/* ── Operator Section ────────────────────────────────────────── */
.operator-section {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.operator-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  background: var(--bg-white);
}
.operator-item:hover {
  background: var(--accent-pale);
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-sm);
}
.operator-item--best {
  border-color: var(--secondary);
  box-shadow: 0 0 0 1px var(--secondary);
}
.operator-item--any {
  border-color: var(--border);
  background: var(--surface-alt);
}
.operator-item--any:hover { background: var(--accent-pale); }
.operator-item:last-child { border-bottom: none; }

.best-rate-badge {
  position: absolute; top: -10px; left: 12px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 10px; border-radius: 20px;
  box-shadow: 0 2px 6px rgba(6,182,212,.3);
}

.sms-badge {
  display: inline-block; font-size: 11px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 1px 6px; margin-left: 4px; color: var(--text-muted);
}

.cart-btn-v2 {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff; border: none;
  cursor: pointer; display: grid; place-items: center;
  transition: all var(--t);
  box-shadow: 0 2px 6px rgba(6,182,212,.25);
}
.cart-btn-v2:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 4px 12px rgba(6,182,212,.35);
  transform: translateY(-1px);
}

.operator-item__info { flex: 1; min-width: 0; }
.operator-item__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.operator-item__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.operator-item__meta-icon { color: var(--text-muted); }

.operator-item__right { text-align: right; flex-shrink: 0; }
.operator-item__price {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}
.operator-item__qty { font-size: 11px; color: var(--secondary-mid); font-weight: 600; }

/* Cart/Buy button */
.cart-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  display: grid; place-items: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(6,182,212,.2);
}
.cart-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(6,182,212,.35);
}
.cart-btn:active { transform: scale(0.97); }

/* "Any operator" info bar */
.any-operator-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--accent-pale);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-body);
  margin: 0 14px 12px;
  line-height: 1.6;
}

.set-max-price-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--secondary-mid);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  justify-content: center;
  transition: color var(--t);
}
.set-max-price-btn:hover { text-decoration: underline; color: var(--secondary); }

/* Placeholder operator state */
.operator-placeholder {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--accent-pale);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--accent-dim);
}

/* Repeat purchase bar */
.repeat-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 13px 18px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.repeat-bar:hover { background: var(--surface-alt); border-color: var(--border); }
.repeat-bar__label { font-size: 13px; font-weight: 600; color: var(--text-dark); letter-spacing: -0.01em; }
.repeat-bar__count {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* ── Home Two-Col Layout ─────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-col  { display: flex; flex-direction: column; gap: 10px; }

/* ── Marketing Section ───────────────────────────────────────── */
.marketing-section { padding: 36px 0 0; }
.marketing-section h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 22px;
  letter-spacing: -0.03em;
}
.marketing-item {
  display: flex; gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.marketing-item__img { width: 72px; height: 72px; flex-shrink: 0; object-fit: contain; }
.marketing-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}
.marketing-item__desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; }

/* ── Pill Tabs ───────────────────────────────────────────────── */
.pill-tabs {
  display: flex;
  border: 1.5px solid var(--secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.pill-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary-mid);
  cursor: pointer;
  transition: all var(--t);
  background: var(--bg-white);
  letter-spacing: -0.01em;
}
.pill-tab:not(:last-child) { border-right: 1.5px solid var(--secondary); }
.pill-tab.is-active {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
}

/* ── Activation Tabs ─────────────────────────────────────────── */
.act-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.act-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.act-tab:hover { color: var(--text-dark); }
.act-tab.is-active { color: var(--secondary-mid); border-bottom-color: var(--secondary); }

/* ── Empty Cart ──────────────────────────────────────────────── */
.empty-cart {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px 28px;
  text-align: center;
}
.empty-cart__img { width: 120px; opacity: .5; margin-bottom: 16px; }
.empty-cart__title { font-size: 15px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.02em; }

/* ── Toggle Switch ───────────────────────────────────────────── */
.toggle-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  margin-bottom: 12px;
}
.toggle-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--t);
}
.toggle__slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--t);
  box-shadow: var(--shadow-xs);
}
.toggle input:checked + .toggle__slider { background: var(--secondary); }
.toggle input:checked + .toggle__slider::before { transform: translateX(16px); }

/* ── How-To Steps ────────────────────────────────────────────── */
.how-to { padding: 24px 0; }
.how-to h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.step-item {
  display: flex; gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}
.step-item__num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 2px 6px rgba(6,182,212,.25);
}
.step-item__num--done    { background: linear-gradient(135deg, var(--green), var(--green-mid)); box-shadow: 0 2px 6px rgba(16,185,129,.25); }
.step-item__num--current { background: linear-gradient(135deg, var(--yellow), var(--yellow-mid)); box-shadow: 0 2px 6px rgba(245,158,11,.25); }
.step-item__body  { flex: 1; }
.step-item__title { font-size: 13px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.01em; }
.step-item__desc  { font-size: 12px; color: var(--text-muted); line-height: 1.65; margin-top: 3px; }
.step-item__desc a { color: var(--secondary-mid); font-weight: 600; }

.step-note {
  display: flex; align-items: flex-start; gap: 7px;
  background: var(--accent-pale);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--text-body);
  margin: 6px 0;
  line-height: 1.55;
}

/* ── Order History Table ─────────────────────────────────────── */
.history-table-wrap {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.history-table thead th {
  background: var(--surface-alt);
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.history-table tbody td {
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr:hover { background: var(--surface-alt); }

.cell-id      { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.cell-service { display: flex; align-items: center; gap: 6px; }
.cell-service-icon { width: 22px; height: 22px; border-radius: 4px; }
.cell-country { display: flex; align-items: center; gap: 5px; }
.cell-flag    { font-size: 18px; }
.cell-phone   { font-family: var(--mono); font-size: 12.5px; color: var(--text-dark); font-weight: 600; }
.cell-code    { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--green); }
.cell-price   { font-family: var(--mono); font-size: 12.5px; }

/* Status icons */
.status-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
}
.status-icon--green  { background: var(--green);  color: #fff; }
.status-icon--red    { background: var(--red);    color: #fff; }
.status-icon--yellow { background: var(--yellow); color: #fff; }
.status-icon--gray   { background: var(--text-subtle); color: #fff; }

/* ── Payment Page ────────────────────────────────────────────── */
.payment-method-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--t);
}
.payment-method-row:hover {
  border-color: var(--secondary);
  background: var(--accent-pale);
  box-shadow: var(--shadow-sm);
}
.payment-method-row.is-open {
  border-color: var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.payment-method-row__left     { display: flex; align-items: center; gap: 12px; }
.payment-method-row__icons    { display: flex; gap: 3px; }
.payment-method-row__icons img { width: 24px; height: 18px; object-fit: contain; border-radius: 2px; }
.payment-method-row__label    { font-size: 13px; font-weight: 600; color: var(--text-dark); letter-spacing: -0.01em; }
.payment-method-row__chevron  {
  color: var(--text-muted); font-size: 14px; transition: transform var(--t);
}
.payment-method-row.is-open .payment-method-row__chevron { transform: rotate(180deg); }

.payment-method-body {
  background: var(--surface-alt);
  border: 1px solid var(--secondary);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: none;
}
.payment-method-body.is-open { display: block; }

.payment-method-sub-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: color var(--t-fast);
}
.payment-method-sub-item:last-child { border-bottom: none; }
.payment-method-sub-item:hover { color: var(--secondary-mid); }

/* ── Payment History ─────────────────────────────────────────── */
.payment-history-table thead th {
  background: var(--surface-alt);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.payment-history-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
}
.payment-history-table tbody tr:last-child td { border-bottom: none; }
.payment-history-table tbody tr:hover { background: var(--surface-alt); }
.amount--neg { color: var(--red);   font-weight: 700; font-family: var(--mono); }
.amount--pos { color: var(--green); font-weight: 700; font-family: var(--mono); }

/* ── Filters / Controls ──────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}
.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 28px 7px 12px;
  font-size: 12.5px;
  color: var(--text-body);
  background: var(--bg-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%2364748B' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color var(--t);
}
.filter-select:focus { border-color: var(--secondary); box-shadow: var(--shadow-glow); }

.date-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--text-body);
  background: var(--bg-white);
  transition: border-color var(--t);
}
.date-input:focus { border-color: var(--secondary); box-shadow: var(--shadow-glow); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 4px;
  justify-content: center;
  padding: 16px;
}
.page-btn {
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-white);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--t-fast);
}
.page-btn:hover { border-color: var(--secondary); color: var(--secondary-mid); }
.page-btn.is-active {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  border-color: var(--secondary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(6,182,212,.3);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis { color: var(--text-muted); font-size: 13px; padding: 0 4px; }

/* ── Search by Number ────────────────────────────────────────── */
.search-number {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  background: var(--bg-white);
  min-width: 200px;
  transition: all var(--t);
}
.search-number:focus-within { border-color: var(--secondary); box-shadow: var(--shadow-glow); }
.search-number input { flex: 1; font-size: 12.5px; color: var(--text-body); }
.search-number input::placeholder { color: var(--text-subtle); }
.search-number svg { color: var(--text-muted); font-size: 14px; }

/* ── Settings Page ───────────────────────────────────────────── */
.settings-tabs {
  display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.settings-tab {
  padding: 13px 20px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: all var(--t);
  letter-spacing: -0.01em;
}
.settings-tab:hover { color: var(--text-dark); }
.settings-tab.is-active { color: var(--secondary-mid); border-bottom-color: var(--secondary); }

.settings-profile {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border-light);
}
.settings-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
  display: grid; place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6,182,212,.25);
}
.settings-user-id {
  font-size: 14px; font-weight: 700; color: var(--text-dark);
  display: flex; align-items: center; gap: 6px;
  letter-spacing: -0.02em;
}
.settings-user-email { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row__label { font-size: 13px; font-weight: 600; color: var(--text-dark); letter-spacing: -0.01em; }
.settings-row__desc  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.btn-enable-2fa {
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  box-shadow: 0 2px 6px rgba(16,185,129,.2);
}
.btn-enable-2fa:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16,185,129,.3); }

.pw-input-wrap { position: relative; }
.pw-input-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color var(--t);
}
.pw-input-wrap input:focus { border-color: var(--secondary); box-shadow: var(--shadow-glow); }
.pw-show-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  transition: color var(--t-fast);
}
.pw-show-btn:hover { color: var(--text-body); }

.btn-change-pw {
  width: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(6,182,212,.25);
}
.btn-change-pw:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 4px 14px rgba(6,182,212,.35);
  transform: translateY(-1px);
}

.btn-delete-account {
  width: 100%;
  background: var(--red);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px;
}
.btn-delete-account:hover { background: var(--red-mid); transform: translateY(-1px); }

/* ── API Key Page ────────────────────────────────────────────── */
.api-note {
  background: var(--accent-pale);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 12px;
  color: var(--text-body);
  margin-bottom: 18px;
  display: flex; gap: 8px;
  line-height: 1.6;
}
.api-key-section { margin-bottom: 24px; }
.api-key-section h4 {
  font-size: 13px; font-weight: 700; color: var(--text-dark);
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.api-key-display {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}
.api-key-display__input {
  flex: 1;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-body);
  background: var(--surface-alt);
  border: none;
  min-width: 0;
}
.api-key-display__copy {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
}
.api-key-display__copy:hover { background: linear-gradient(135deg, var(--accent), var(--secondary)); }

.api-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.api-btn-refresh {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--t);
  box-shadow: 0 2px 6px rgba(6,182,212,.2);
}
.api-btn-refresh:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6,182,212,.3);
}
.api-btn-link {
  border: 1.5px solid var(--secondary);
  color: var(--secondary-mid);
  font-size: 12px; font-weight: 700;
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--t);
  display: block;
}
.api-btn-link:hover { background: var(--accent-pale); color: var(--secondary); }

.btn-block-keys {
  background: var(--red);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--t);
  display: flex; align-items: center; gap: 8px;
  margin: 16px auto 0;
}
.btn-block-keys:hover { background: var(--red-mid); transform: translateY(-1px); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: grid; place-items: center;
  padding: 16px;
  animation: fadeIn 160ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Crypto coin cluster (payment method row icon) ─────────────── */
.coin-cluster {
  display: inline-flex; align-items: center;
  flex-shrink: 0;
}
.coin {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: #fff;
  border: 2px solid var(--bg-white);
  margin-left: -8px;
  flex-shrink: 0;
}
.coin:first-child { margin-left: 0; }
.coin--btc  { background: #F7931A; }
.coin--eth  { background: #627EEA; }
.coin--usdt { background: #26A17B; }
.coin--bnb  { background: #F0B90B; color: #1E293B; }
.coin--ton  { background: #0088CC; font-size: 10px; }


.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  width: 100%; max-width: 460px;
  animation: slideUp 200ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
}
.modal__title { font-size: 16px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.02em; }
.modal__close {
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.modal__close:hover { background: var(--surface-alt); color: var(--text-dark); }
.modal__body { padding: 22px; }

.modal__field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }

.modal__input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-white);
  margin-bottom: 12px;
  transition: all var(--t);
}
.modal__input:focus { border-color: var(--secondary); box-shadow: var(--shadow-glow); }
.modal__hint { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }

.modal__warning {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--yellow-dim);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 12px;
  color: #92400E;
  margin-bottom: 14px;
  line-height: 1.55;
}

.modal__checkbox-row {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12px; color: var(--text-body);
  margin-bottom: 14px; cursor: pointer;
}
.modal__checkbox-row input { margin-top: 2px; accent-color: var(--secondary); }

.modal__btn-create {
  width: 100%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 13px; font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: not-allowed;
  transition: all var(--t);
}
.modal__btn-create.ready {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(6,182,212,.25);
}
.modal__btn-create.ready:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 4px 14px rgba(6,182,212,.35);
  transform: translateY(-1px);
}

.modal__fee-info { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; line-height: 1.65; }
.modal__note { font-size: 11.5px; color: var(--yellow-mid); font-weight: 600; margin-bottom: 8px; }

/* ── Auth / Login Page ───────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--header-h) - var(--banner-h));
  display: flex; flex-direction: column;
  background: var(--bg);
}

.auth-box {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  max-width: 400px;
  margin: 48px auto;
  box-shadow: var(--shadow-lg);
  width: calc(100% - 32px);
}

.auth-box h2 {
  text-align: center;
  font-size: 22px; font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 26px;
  letter-spacing: -0.03em;
}

.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 13px; font-weight: 600;
  color: var(--text-dark);
  background: var(--bg-white);
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: 16px;
}
.auth-google-btn:hover { background: var(--surface-alt); border-color: var(--border); box-shadow: var(--shadow-sm); }

.auth-divider {
  text-align: center; position: relative;
  font-size: 12px; color: var(--text-muted);
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 24px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 40px 10px 14px;
  font-size: 13px; color: var(--text-dark);
  background: var(--bg-white);
  margin-bottom: 10px;
  transition: all var(--t);
}
.auth-input:focus { border-color: var(--secondary); box-shadow: var(--shadow-glow); }
.auth-input-wrap { position: relative; }
.auth-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-60%);
  color: var(--text-muted); font-size: 15px; cursor: pointer;
  transition: color var(--t-fast);
}
.auth-eye:hover { color: var(--text-body); }

.auth-forgot {
  display: block; text-align: right;
  font-size: 12px; color: var(--secondary-mid);
  margin: -6px 0 14px;
  font-weight: 500;
}
.auth-forgot:hover { color: var(--secondary); }

.captcha-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  background: var(--surface-alt);
  font-size: 12px; color: var(--text-muted);
}

.auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(6,182,212,.3);
  letter-spacing: -0.01em;
}
.auth-submit:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 4px 18px rgba(6,182,212,.4);
  transform: translateY(-1px);
}
.auth-submit:active { transform: none; }

.auth-register-link { text-align: center; font-size: 12.5px; color: var(--text-muted); }
.auth-register-link a { color: var(--secondary-mid); font-weight: 700; }
.auth-register-link a:hover { color: var(--secondary); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 40px 24px 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 800px;
  margin: 0 auto 28px;
}
.footer-col h4 {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
  transition: color var(--t);
}
.footer-col ul li a:hover { color: rgba(255,255,255,.9); }

.footer-socials { display: flex; gap: 8px; margin-top: 6px; }
.footer-social {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  display: grid; place-items: center;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--t);
  color: rgba(255,255,255,.5);
  text-decoration: none;
}
.footer-social:hover { transform: translateY(-2px); background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.2); color: #fff; }
.footer-social[title="Instagram"]:hover  { color: #E1306C; border-color: #E1306C; }
.footer-social[title="YouTube"]:hover    { color: #FF0000; border-color: #FF0000; }
.footer-social[title="Facebook"]:hover   { color: #1877F2; border-color: #1877F2; }
.footer-social[title="Twitter / X"]:hover{ color: #fff;    border-color: rgba(255,255,255,.5); }
.footer-social[title="Telegram"]:hover   { color: #0088CC; border-color: #0088CC; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.footer-payments { display: flex; gap: 8px; align-items: center; }
.footer-payments img { height: 20px; opacity: .65; filter: brightness(0) invert(1); }
.footer-copy { font-size: 11.5px; color: rgba(255,255,255,.35); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 999; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--primary-mid);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 14px 16px;
  max-width: 340px;
  pointer-events: all;
  animation: toastIn 200ms ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}
.toast--success { border-left: 3px solid var(--green); }
.toast--error   { border-left: 3px solid var(--red); }
.toast--info    { border-left: 3px solid var(--secondary); }
.toast__msg { font-size: 12.5px; color: #F1F5F9; font-weight: 600; }

/* ── Utilities ───────────────────────────────────────────────── */
.hidden      { display: none !important; }
.flex        { display: flex; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.mt-2        { margin-top: 8px; }
.mt-3        { margin-top: 12px; }
.mt-4        { margin-top: 16px; }
.mb-2        { margin-bottom: 8px; }
.mb-3        { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-700      { font-weight: 700; }
.text-muted  { color: var(--text-muted); }
.text-blue   { color: var(--secondary-mid); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-mono   { font-family: var(--mono); }

/* ── Mobile Nav Drawer ───────────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  z-index: 399;
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-nav-overlay.is-open { display: block; opacity: 1; }

.mobile-nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 288px;
  max-width: 85vw;
  background: var(--bg-white);
  z-index: 400;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 32px rgba(15,23,42,.2);
  overflow-y: auto;
}
.mobile-nav-drawer.is-open { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--primary);
  color: #fff;
}
.mobile-nav-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
}
.mobile-nav-close {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  opacity: .85;
  transition: all .15s;
}
.mobile-nav-close:hover { opacity: 1; background: rgba(255,255,255,.14); }

.mobile-nav-links { display: flex; flex-direction: column; padding: 8px 0; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  transition: background var(--t-fast);
  letter-spacing: -0.01em;
}
.mobile-nav-link:hover { background: var(--surface-alt); }
.mobile-nav-link--danger { color: var(--red); }
.mobile-nav-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .topbar__nav, .topbar__purchases { display: none; }
  .topbar__menu-btn { display: flex; }
  .home-grid { grid-template-columns: 1fr; }
  .api-actions { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .history-table thead th:nth-child(3),
  .history-table tbody td:nth-child(3) { display: none; }
  .page-wrap, .page-wrap--wide { padding: 14px 12px; }
  .topbar { padding: 0 16px; }
  .banner { padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
