/* ============================================================
   GoNums — Shared design system
   Extracted from gonums/Login.html, Country Plans.html, Orders.html
   ============================================================ */
:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --ink: #0f1230;
  --ink-2: #3a3e63;
  --muted: #6b7094;
  --line: #ececf3;
  --line-2: #e3e3ee;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-3: #7c3aed;
  --brand-soft: #eef0ff;
  --brand-softer: #f5f6ff;
  --green: #15a36b;
  --green-soft: #e6f7ee;
  --amber: #d18a00;
  --amber-soft: #fdf3dc;
  --red: #d4344c;
  --red-soft: #fde7eb;
  --gray-soft: #eef0f4;
  --shadow-sm: 0 1px 2px rgba(15,18,48,.04), 0 1px 1px rgba(15,18,48,.03);
  --shadow-md: 0 4px 14px -2px rgba(15,18,48,.08), 0 1px 2px rgba(15,18,48,.04);
  --shadow-lg: 0 18px 40px -16px rgba(15,18,48,.18), 0 2px 6px rgba(15,18,48,.05);
  --radius: 14px;
}

/* Language switcher */
.gn-lang { display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 8px;
  background:#fff; border:1px solid var(--line-2); border-radius:10px; color:var(--ink-2); margin-right:8px; cursor:pointer; }
.gn-lang svg { color:var(--muted); flex:none; }
.gn-lang select { border:0; background:transparent; font:inherit; font-size:13.5px; font-weight:600;
  color:var(--ink); cursor:pointer; outline:none; max-width:130px; }
.page-foot .gn-lang { background:transparent; border-color:var(--line); height:34px; }
[dir="rtl"] .gn-lang { margin-right:0; margin-left:8px; }
[dir="rtl"] body, [dir="rtl"] .page { text-align:right; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
a { color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 18px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -.02em; font-size: 20px;
  color: var(--ink); text-decoration: none;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-3) 100%);
  display: grid; place-items: center; color: white;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 12px -4px rgba(var(--brand-rgb),.5);
}
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  color: var(--ink-2); text-decoration: none;
  padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14.5px;
}
.nav a:hover { background: var(--brand-softer); color: var(--brand); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.spacer { flex: 1; }
.user-chip {
  height: 38px; padding: 0 10px 0 6px;
  background: white; border: 1px solid var(--line-2); border-radius: 10px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; color: var(--ink); font-size: 14px;
  text-decoration: none;
}
.user-chip:hover { border-color: var(--brand); }
.avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: white; font-weight: 700; font-size: 12px;
  display: grid; place-items: center;
}
.chev { color: var(--muted); }
.hamburger {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-2); background: white;
  cursor: pointer; align-items: center; justify-content: center;
  color: var(--ink);
}
@media (max-width: 720px) {
  .nav { display: none; }
  .hamburger { display: inline-flex; }
  .user-chip .uname { display: none; }
  .user-chip { padding: 0 6px; }
  .topbar-inner { gap: 10px; padding: 12px 16px; }
}

/* Responsive visibility utilities (public site has no Bootstrap) */
.d-none { display: none !important; }
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}

/* Keep the brand from pushing the header items off-screen */
.logo { min-width: 0; }
.logo-mark { flex-shrink: 0; }
.logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-img { height: 34px; max-width: 170px; object-fit: contain; display: block; }
.logo-fallback { align-items: center; gap: 10px; }
@media (max-width: 480px) { .logo-img { height: 28px; max-width: 130px; } }
/* Wallet pill must always fit its amount (e.g. ₹1,000.00) without clipping */
.wallet-chip { flex-shrink: 0; }
.wallet-chip .mono { overflow: visible; }
/* Wallet balance stays visible in the top bar (incl. mobile) */
.wallet-chip { white-space: nowrap; }
@media (max-width: 480px) {
  .logo { font-size: 16px; gap: 7px; }
  .logo-mark { width: 28px; height: 28px; font-size: 13px; }
  .topbar-inner { gap: 7px; padding: 10px 10px; }
  .user-chip { height: 34px; }
  .avatar { width: 26px; height: 26px; }
  .wallet-chip { padding: 0 8px; font-size: 13px; margin-right: 4px !important; }
  .wallet-chip svg { width: 14px; height: 14px; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(15,18,48,.4); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mobile-menu.show { opacity: 1; pointer-events: auto; }
.mobile-menu-panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 80vw; max-width: 320px;
  background: white;
  transform: translateX(-100%);
  transition: transform .25s ease;
  padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu.show .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-panel a {
  padding: 14px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.mobile-menu-panel a.active { background: var(--brand-soft); color: var(--brand); }
.mobile-menu-panel a:hover { background: var(--brand-softer); }
.mm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mm-close {
  width: 36px; height: 36px; border-radius: 9px;
  border: 0; background: var(--bg); cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
}

/* ---------- Page container ---------- */
.page {
  max-width: 1180px; margin: 0 auto;
  padding: 28px 24px 80px;
}
@media (max-width: 720px) { .page { padding: 20px 16px 80px; } }

/* ---------- Hero ---------- */
.hero {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hero-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--brand-soft);
  display: grid; place-items: center; color: var(--brand);
  flex-shrink: 0;
}
.hero h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 6px 0; line-height: 1.15;
}
.hero p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 580px; line-height: 1.5; }
.hero-stats { display:flex; gap:14px; margin-left:auto; flex-wrap:wrap; }
.hstat {
  background: white; border:1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; min-width: 110px;
}
.hstat-k { font-size: 11.5px; color:var(--muted); text-transform: uppercase; letter-spacing:.04em; font-weight: 700; }
.hstat-v { font-size: 20px; font-weight: 800; margin-top: 2px; letter-spacing:-.01em; }
.hstat-v .sm { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.hstat.active .hstat-v { color: var(--green); }
.hstat.expiring .hstat-v { color: var(--amber); }
.hstat.expired .hstat-v { color: var(--red); }
@media (max-width: 540px) {
  .hero h1 { font-size: 24px; }
  .hero-icon { width: 44px; height: 44px; }
  .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; width: 100%; margin-left: 0; }
  .hstat { min-width: 0; padding: 8px 10px; overflow: hidden; }
  .hstat-v { white-space: nowrap; }
  .hstat-k { font-size: 10px; }
  .hstat-v { font-size: 16px; }
}

/* ---------- Filter / Toolbar ---------- */
.filterbar, .toolbar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; align-items: center;
}
.search { flex: 1; min-width: 200px; position: relative; }
.search input {
  width: 100%; height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: white;
  font: inherit; font-size: 14.5px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.12); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.seg {
  display: inline-flex; background: white;
  border: 1px solid var(--line-2); border-radius: 11px;
  padding: 4px; gap: 2px;
}
.seg button {
  height: 34px; padding: 0 12px;
  border: 0; background: transparent; border-radius: 8px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--brand); color: white; box-shadow: 0 2px 6px -2px rgba(var(--brand-rgb),.5); }
.sortwrap { position: relative; }
.sortwrap select {
  appearance: none; height: 42px; padding: 0 36px 0 14px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: white; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink); cursor: pointer;
}
.sortwrap::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 8px; height: 8px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  height: 42px; padding: 0 18px;
  border: 0; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s; white-space: nowrap;
  text-decoration: none; color: inherit;
}
.btn-primary { background: var(--brand); color: white; box-shadow: 0 4px 14px -4px rgba(var(--brand-rgb),.55); }
.btn-primary:hover { background: #4338ca; transform: translateY(-1px); color: white; }
.btn-primary:disabled { background: var(--line-2); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-outline { background: white; color: var(--brand); border: 1.5px solid var(--brand-soft); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: white; color: var(--ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

/* ---------- Country card ---------- */
.country-list { display: flex; flex-direction: column; gap: 12px; }
.country {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.country.open { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.country-head {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer; user-select: none;
}
.flag {
  width: 44px; height: 32px; border-radius: 5px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.04) inset;
  background: #ddd;
  font-size: 28px; display: grid; place-items: center;
  line-height: 1;
}
.country-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.country-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.avail {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 12.5px;
  padding: 6px 11px; border-radius: 999px;
  white-space: nowrap;
}
.avail.low { background: var(--amber-soft); color: var(--amber); }
.avail.out { background: var(--red-soft); color: var(--red); }
.avail-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.toggle {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line-2);
  background: white; display: grid; place-items: center;
  color: var(--ink-2); transition: transform .25s ease, background .2s;
  flex-shrink: 0;
}
.country.open .toggle { transform: rotate(180deg); background: var(--brand-soft); color: var(--brand); border-color: transparent; }
@media (max-width: 540px) {
  .country-head { grid-template-columns: auto 1fr auto; gap: 10px; padding: 14px; }
  .country-head .toggle { display: none; }
  .avail { font-size: 11.5px; padding: 5px 9px; }
  .country-name { font-size: 15px; }
}
.country-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.country.open .country-body { grid-template-rows: 1fr; }
.country-body > div { overflow: hidden; }
.body-inner { padding: 18px; border-top: 1px dashed var(--line); }

/* ---------- Plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: white;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  cursor: pointer;
  transition: all .18s;
  display: flex; flex-direction: column; gap: 10px;
}
.plan:hover { border-color: var(--brand-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan.selected {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-softer) 0%, white 70%);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.15), var(--shadow-md);
}
.plan-badge {
  position: absolute; top: -9px; right: 12px;
  background: var(--ink); color: white;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 999px;
  text-transform: uppercase;
}
.plan-badge.save { background: var(--green); }
.plan-badge.best { background: linear-gradient(135deg, var(--brand), var(--brand-3)); }
.plan-row { display: flex; align-items: center; justify-content: space-between; }
.plan-name { font-weight: 700; font-size: 14px; }
.plan-dur { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.plan-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-2); background: white;
  display: grid; place-items: center;
  transition: border-color .15s;
}
.plan.selected .plan-radio { border-color: var(--brand); }
.plan.selected .plan-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
}
.plan-price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.plan-price .ccy { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-right: 1px; }
.plan-per { font-size: 12px; color: var(--muted); margin-top: -3px; }
.plan-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-tag {
  font-size: 11.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  background: var(--green-soft); color: var(--green);
}
.plan-tag.muted { background: var(--line); color: var(--muted); }
.usage-rates {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
  font-size: 12.5px; color: var(--ink-2);
}
.usage-rates span {
  display: inline-flex; gap: 5px; align-items: center;
  background: var(--line); padding: 4px 10px; border-radius: 8px;
}
.usage-rates strong { color: var(--ink); font-weight: 700; }
.body-actions {
  display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap;
}
.feats { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
.feat { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.feat svg { color: var(--green); }
@media (max-width: 540px) {
  .feats { display: none; }
  .body-actions .btn { flex: 1; }
  .body-inner { padding: 14px; }
}
.country.out .country-head { opacity: .55; cursor: not-allowed; }

/* ---------- Order card ---------- */
.orders { display: flex; flex-direction: column; gap: 12px; }
.order {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.order:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); }
.order-head {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px dashed var(--line);
}
.o-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.o-plan { font-size: 13.5px; color: var(--muted); margin-top: 2px; display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.o-number { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size:12px; background: var(--gray-soft); padding:2px 8px; border-radius:5px; color: var(--ink-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
  text-transform: capitalize;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { background: var(--green-soft); color: var(--green); }
.pill.expiring, .pill.expiring_soon, .pill.pending_assignment { background: var(--amber-soft); color: var(--amber); }
.pill.expired, .pill.pending_payment { background: var(--gray-soft); color: var(--ink-2); }
.pill.cancelled { background: var(--red-soft); color: var(--red); }
.pill.paid { background: var(--green-soft); color: var(--green); }
.order-row {
  display: grid; grid-template-columns: repeat(4, 1fr) auto;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
}
.o-cell .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-bottom: 3px; }
.o-cell .v { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.o-cell .vsub { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.vsub.ok { color: var(--green); }
.vsub.warn { color: var(--amber); }
.vsub.bad { color: var(--red); }
.order-actions {
  display: flex; gap: 8px;
  padding: 12px 20px 16px;
  justify-content: flex-end;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}
.progress { height: 4px; background: var(--gray-soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > span { display:block; height: 100%; border-radius:999px; }
.progress.ok > span { background: var(--green); }
.progress.warn > span { background: var(--amber); }
.progress.bad > span { background: var(--red); }
@media (max-width: 780px) { .order-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) {
  .order-head { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px; }
  .o-title { font-size: 15px; }
  .order-row { padding: 12px 14px; gap: 10px; }
  .order-actions { padding: 10px 14px 14px; }
  .order-actions .btn { flex: 1; }
}

/* ---------- Empty state ---------- */
.empty {
  background: white; border: 1px dashed var(--line-2);
  border-radius: 14px; padding: 48px 24px; text-align: center;
}
.empty-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.empty h3 { margin: 0 0 4px; font-size: 18px; }
.empty p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  border: 0; background: transparent;
  padding: 10px 14px 14px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab .cnt {
  background: var(--gray-soft); color: var(--ink-2);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  min-width: 20px; text-align: center;
}
.tab.on .cnt { background: var(--brand-soft); color: var(--brand); }

/* ---------- Modal ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(15,18,48,.45);
  z-index: 70; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card {
  background: white; border-radius: 18px;
  width: 100%; max-width: 440px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transform: scale(.96);
  transition: transform .2s;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.modal.show .modal-card { transform: scale(1); }
.modal h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.modal p.sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }
@media (max-width: 540px) {
  .modal { padding: 12px; }
  .modal-card { padding: 18px; border-radius: 14px; max-height: calc(100dvh - 24px); }
  .modal h2 { font-size: 19px; }
  .modal-actions { flex-wrap: wrap; }
}
.success-circle {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.receipt {
  text-align: left; background: var(--bg);
  border-radius: 12px; padding: 14px;
  margin-bottom: 16px;
}
.receipt-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; gap: 12px; }
.receipt-row .k { color: var(--muted); }
.receipt-row .v { font-weight: 700; text-align: right; }
.pay-summary {
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex; gap: 14px; align-items: center;
}
.pay-summary .flag { width: 44px; height: 32px; }
.pay-summary .pn { font-weight: 700; font-size: 15px; }
.pay-summary .pp { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pay-summary .pa { margin-left: auto; font-weight: 800; font-size: 20px; }
.pay-options { display: grid; gap: 8px; margin-bottom: 14px; }
.pay-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line-2);
  cursor: pointer; transition: all .15s;
  background: white;
}
.pay-opt:hover { border-color: var(--brand-2); }
.pay-opt.on { border-color: var(--brand); background: var(--brand-softer); }
.pay-opt-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
}
.pay-opt-title { font-weight: 700; font-size: 14px; }
.pay-opt-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pay-opt-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-2); margin-left: auto;
  display: grid; place-items: center;
}
.pay-opt.on .pay-opt-radio { border-color: var(--brand); }
.pay-opt.on .pay-opt-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: white;
  padding: 12px 18px; border-radius: 11px;
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ok { color: #4ade80; }
.toast .err { color: #f87171; }

/* ---------- Footer ---------- */
.page-foot {
  max-width: 1180px; margin: 0 auto;
  padding: 18px 24px 36px;
  color: var(--muted); font-size: 12.5px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--line);
}
/* Internal-linking footer */
.site-foot { display: block; }
.site-foot .foot-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px; margin-bottom: 16px;
}
.site-foot .foot-h { font-weight: 700; color: var(--ink-2); font-size: 13px; margin-bottom: 8px; }
.site-foot .foot-col a {
  display: block; color: var(--muted); text-decoration: none;
  font-size: 13px; padding: 3px 0;
}
.site-foot .foot-col a:hover { color: var(--brand); }
.site-foot .foot-copy { border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Internal-link chip grids (browse countries / apps) ---------- */
.browse-countries { margin: 26px 0; }
.browse-countries h2 { margin: 0 0 14px; }
.browse-countries .bc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px;
}
.browse-countries .bc-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; overflow: hidden;
  transition: border-color .15s, color .15s;
}
.browse-countries .bc-chip:hover { border-color: var(--brand); color: var(--brand); }
.browse-countries .bc-flag { font-size: 16px; flex-shrink: 0; }
.browse-countries .bc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 540px) {
  .browse-countries .bc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
}

/* ---------- Global mobile safeguards ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, table, pre { max-width: 100%; }
table { display: block; overflow-x: auto; }
@media (max-width: 540px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero h1 { font-size: 22px; }
}

/* ---------- Alerts (replaces Bootstrap) ---------- */
.alert {
  padding: 12px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--green-soft); color: var(--green); border-color: rgba(21,163,107,.2); }
.alert-danger, .alert-error { background: var(--red-soft); color: var(--red); border-color: rgba(212,52,76,.2); }
.alert-warning { background: var(--amber-soft); color: var(--amber); border-color: rgba(209,138,0,.2); }
.alert-info { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb),.2); }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.country, .order, .hero { animation: fadeUp .4s ease both; }
.country:nth-child(2),.order:nth-child(2){animation-delay:.03s}
.country:nth-child(3),.order:nth-child(3){animation-delay:.06s}
.country:nth-child(4),.order:nth-child(4){animation-delay:.09s}
.country:nth-child(5),.order:nth-child(5){animation-delay:.12s}
.country:nth-child(6),.order:nth-child(6){animation-delay:.15s}
