/* Silver Gate Exchange — Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --c-primary:  #B4B4CC;      /* silver accent */
  --c-accent:   #D8D8F0;      /* bright silver */
  --c-bg:       #0A0A0E;      /* near-black bg */
  --c-surface:  #12121A;      /* dark card surface */
  --c-surface2: #1A1A24;      /* slightly lighter surface */
  --c-text:     #EEEEF4;      /* near-white text */
  --c-muted:    #7070888;     /* muted text — overridden below for valid hex */
  --c-muted:    #747490;      /* muted gray-purple */
  --c-border:   #252535;      /* dark border */
  --c-success:  #22C55E;
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,.55);
  --shadow-sm:  0 1px 6px rgba(0,0,0,.40);

  /* Metallic button gradient — dark text on silver */
  --c-btn-bg:   linear-gradient(135deg, #C4C4DC 0%, #888898 100%);
  --c-btn-text: #0A0A0E;
}

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

html, body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════════════════════
   LANDING PAGE — MOBILE FIRST
   ══════════════════════════════════════════════════════════════════ */
.stub-page {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  padding-bottom: 72px;
}
@media (min-width: 768px) { .stub-page { padding-bottom: 0; } }

/* ── Navbar ── */
.lp-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,14,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.lp-nav-inner {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lp-nav-logo { height: 42px; max-width: 220px; width: auto; object-fit: contain; }
.lp-nav-brand { font-size: 15px; font-weight: 800; color: var(--c-primary); letter-spacing: -.02em; }
.lp-nav-right { display: flex; align-items: center; gap: 10px; }
.lp-nav-right .lp-btn-primary { display: none; }
@media (min-width: 768px) {
  .lp-nav-inner { max-width: 1100px; margin: 0 auto; padding: 14px 24px; }
  .lp-nav-right .lp-btn-primary { display: inline-flex; }
}

/* ── Language switcher ── */
.lp-lang { display: flex; gap: 4px; }
.lp-lang-btn {
  font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 20px; border: 1px solid var(--c-border);
  color: var(--c-muted); text-decoration: none; transition: all .15s;
  min-height: 32px; display: flex; align-items: center;
}
.lp-lang-btn.active, .lp-lang-btn:hover { color: var(--c-accent); border-color: var(--c-primary); }

/* ── Shared buttons ── */
.lp-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 50px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: opacity .15s; border: none; cursor: pointer; font-family: inherit;
}
.lp-btn-primary:hover { opacity: .85; }
.lp-btn-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 340px;
  padding: 16px 28px; border-radius: 50px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 17px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.40);
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.lp-btn-hero:active { transform: scale(.97); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (min-width: 768px) {
  .lp-btn-hero { width: auto; font-size: 16px; }
  .lp-btn-hero:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,0,0,.50); }
}

/* ── Section base ── */
.lp-section-inner { padding: 0 16px; }
.lp-section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-primary); text-align: center; margin-bottom: 8px;
}
.lp-section-title {
  font-size: 22px; font-weight: 800; color: var(--c-text);
  letter-spacing: -.02em; margin-bottom: 10px; text-align: center; line-height: 1.2;
}
.lp-section-title.lp-left { text-align: left; }
.lp-section-sub {
  font-size: 14px; color: var(--c-muted); text-align: center;
  margin-bottom: 28px; line-height: 1.55;
}
@media (min-width: 768px) {
  .lp-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
  .lp-section-title { font-size: 30px; }
  .lp-section-sub { font-size: 15px; margin-bottom: 40px; }
}

/* ── Hero ── */
.lp-hero {
  background: radial-gradient(ellipse at 50% 0%, #1E1E30 0%, #0A0A0E 60%);
  padding: 44px 0 36px;
}
.lp-hero-inner {
  padding: 0 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.lp-hero-logo-card {
  display: flex; align-items: center; justify-content: center;
  background: #0E0E14;
  border-radius: 22px;
  border: 1px solid rgba(180,180,204,.12);
  box-shadow: 0 8px 48px rgba(0,0,0,.60), 0 0 0 1px rgba(180,180,204,.05);
  padding: 24px 32px;
  margin: 0 auto 22px;
  width: fit-content;
}
.lp-hero-logo {
  display: block;
  width: 300px; height: auto;
  max-height: 120px;
  object-fit: contain;
}
@media (min-width: 768px) {
  .lp-hero-logo { width: 400px; max-height: 160px; }
  .lp-hero-logo-card { border-radius: 28px; padding: 28px 40px; }
}
.lp-trust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--c-primary);
  background: rgba(180,180,204,.10); border-radius: 50px;
  padding: 5px 12px; margin-bottom: 18px;
}
.lp-hero-title {
  font-size: 26px; font-weight: 800;
  color: var(--c-text); letter-spacing: -.03em;
  line-height: 1.15; margin-bottom: 14px;
}
.lp-hero-desc {
  font-size: 15px; color: var(--c-muted); line-height: 1.6;
  margin: 0 auto 28px;
}
/* Stats — 2x2 on mobile, 1 row desktop */
.lp-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; margin-top: 32px;
  background: var(--c-border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.30);
}
.lp-stat { background: var(--c-surface2); padding: 16px 12px; text-align: center; }
.lp-stat-num { display: block; font-size: 20px; font-weight: 800; color: var(--c-accent); }
.lp-stat-label { display: block; font-size: 11px; color: var(--c-muted); margin-top: 2px; }
.lp-stat-div { display: none; }
@media (min-width: 768px) {
  .lp-hero { padding: 64px 0 56px; }
  .lp-hero-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }
  .lp-hero-title { font-size: 42px; }
  .lp-hero-desc { font-size: 16px; margin-bottom: 32px; }
  .lp-stats { grid-template-columns: repeat(3, 1fr); }
  .lp-stat { padding: 20px 24px; }
  .lp-stat-num { font-size: 24px; }
}

/* ── Rates ── */
.lp-rates { padding: 44px 0; background: var(--c-surface2); }
.lp-rates-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 540px) {
  .lp-rates-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .lp-rates { padding: 60px 0; }
  .lp-rates-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .lp-rates-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}
.lp-rate-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.lp-rate-card-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 6px;
}
.lp-rate-card-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  padding: 8px 12px 12px;
}
.lp-rate-val { font-size: 12px; color: var(--c-text); }
.lp-rate-val strong { color: var(--c-accent); font-weight: 700; }
.lp-rate-trend {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  white-space: nowrap;
}
.lp-rates-pair { display: flex; align-items: center; gap: 5px; }
.lp-rates-coin {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: 5px;
  font-size: 11px; font-weight: 700; color: #fff;
}
.lp-coin-usdt { background: #1A7A5A; }
.lp-coin-uah  { background: #1A4A9A; }
.lp-coin-usd  { background: #1E6A1E; }
.lp-coin-eur  { background: #1A3A8A; }
.lp-coin-eth  { background: #3A4EA0; }
.lp-coin-btc  { background: #8A5010; }
canvas.rate-sparkline { width: 100%; height: 100px; display: block; }
.ma-rate-card canvas.rate-sparkline { height: 86px; }
.lp-rates-btn {
  display: inline-block; padding: 5px 12px; border-radius: 50px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 11px; font-weight: 600; text-decoration: none;
  white-space: nowrap; transition: opacity .15s;
}
.lp-rates-btn:hover { opacity: .80; }

/* ── Feature cards ── */
.lp-features { padding: 44px 0; background: var(--c-bg); }
.lp-cards {
  display: grid; grid-template-columns: 1fr;
  gap: 14px; margin-top: 28px;
}
@media (min-width: 480px) { .lp-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .lp-cards { grid-template-columns: repeat(4, 1fr); } }
.lp-card {
  background: var(--c-surface); border-radius: 14px; padding: 22px 18px;
  border: 1px solid var(--c-border);
  -webkit-tap-highlight-color: transparent;
}
.lp-card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.lp-icon-blue   { background: rgba(180,180,220,.12); color: var(--c-accent); }
.lp-icon-green  { background: rgba(34,197,94,.12);  color: #4ADE80; }
.lp-icon-yellow { background: rgba(234,179,8,.12);  color: #FACC15; }
.lp-icon-purple { background: rgba(167,139,250,.12); color: #A78BFA; }
.lp-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 7px; color: var(--c-text); }
.lp-card p  { font-size: 13px; color: var(--c-muted); line-height: 1.5; margin: 0; }
@media (min-width: 768px) { .lp-features { padding: 60px 0; } }

/* ── No limits ── */
.lp-nolimits { padding: 44px 0; background: var(--c-surface2); }
.lp-nolimits-inner { display: block; }
.lp-nolimits-visual { display: none; }
.lp-checklist { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 13px; }
.lp-checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.lp-checklist li svg { flex-shrink: 0; margin-top: 2px; }
.lp-dir-row { display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) {
  .lp-nolimits { padding: 60px 0; }
  .lp-nolimits-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .lp-nolimits-visual { display: flex; justify-content: center; }
  .lp-dir-card {
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 20px;
    padding: 24px 28px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
    min-width: 280px;
  }
}
.lp-dir-row { display: flex; align-items: center; gap: 8px; }
@media (min-width: 768px) { .lp-dir-card-mobile { display: none !important; } }

/* ── Control finances ── */
.lp-control { padding: 44px 0; background: var(--c-bg); }
.lp-control-grid {
  display: flex; flex-direction: column;
  gap: 14px; margin-top: 28px;
}
.lp-control-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--c-surface); border-radius: 14px; padding: 20px 16px;
  border: 1px solid var(--c-border);
}
.lp-control-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: rgba(180,180,204,.12); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
}
.lp-control-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 5px; color: var(--c-text); }
.lp-control-item p  { font-size: 13px; color: var(--c-muted); line-height: 1.45; margin: 0; }
@media (min-width: 768px) {
  .lp-control { padding: 60px 0; }
  .lp-control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ── Advantages (6 cards) ── */
.lp-adv { padding: 44px 0; background: var(--c-surface2); }
.lp-adv-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-top: 28px;
}
@media (min-width: 768px) {
  .lp-adv { padding: 60px 0; }
  .lp-adv-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.lp-adv-card {
  background: var(--c-surface); border-radius: 14px; padding: 18px 14px;
  border: 1px solid var(--c-border);
}
.lp-adv-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(180,180,204,.12); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.lp-adv-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--c-text); }
.lp-adv-card p  { font-size: 12px; color: var(--c-muted); line-height: 1.45; margin: 0; }

/* ── CTA section ── */
.lp-cta {
  padding: 52px 16px;
  background: linear-gradient(135deg, #1A1A28 0%, #0E0E16 50%, #14141E 100%);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text); text-align: center;
}
.lp-cta-inner { max-width: 540px; margin: 0 auto; }
.lp-cta h2 { font-size: 24px; font-weight: 800; margin-bottom: 12px; letter-spacing: -.02em; }
.lp-cta p  { font-size: 15px; opacity: .75; line-height: 1.55; margin-bottom: 28px; }
.lp-cta .lp-btn-hero {
  background: var(--c-btn-bg); color: var(--c-btn-text);
  box-shadow: 0 6px 24px rgba(180,180,204,.25);
}
@media (min-width: 768px) {
  .lp-cta { padding: 72px 24px; }
  .lp-cta h2 { font-size: 32px; }
}

/* ── Footer ── */
.lp-footer {
  padding: 18px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-muted);
  background: var(--c-surface);
}

/* ── Fixed mobile CTA bar ── */
.lp-mob-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  padding: 10px 16px;
  background: rgba(18,18,26,.97);
  border-top: 1px solid var(--c-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.40);
}
.lp-mob-bar-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 0; border-radius: 14px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 16px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 768px) { .lp-mob-bar { display: none; } }

/* ── Mini App — informational sections ──────────────────────────────────── */
.ma-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--c-border);
  margin: 0 16px 4px; border-radius: 14px; overflow: hidden;
}
.ma-stat { background: var(--c-surface2); padding: 14px 8px; text-align: center; }
.ma-stat-num { display: block; font-size: 18px; font-weight: 800; color: var(--c-accent); }
.ma-stat-lbl { display: block; font-size: 10px; color: var(--c-muted); margin-top: 2px; }

.ma-section { padding: 28px 16px; background: var(--c-surface2); border-top: 1px solid var(--c-border); }
.ma-section-blue { background: #12121E; }
.ma-section-gray { background: var(--c-surface); }
.ma-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary); margin-bottom: 6px; }
.ma-section-title { font-size: 18px; font-weight: 800; color: var(--c-text); letter-spacing: -.02em; margin-bottom: 16px; line-height: 1.2; }

/* rates — miniapp card grid: 2 cols mobile, 3 cols wider */
.ma-rate-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (min-width: 480px) {
  .ma-rate-cards { grid-template-columns: repeat(3, 1fr); }
}
.ma-rate-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}
.ma-rate-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 4px;
}
.ma-rate-pair2 { display: flex; align-items: center; gap: 4px; }
.ma-rate-bottom { padding: 6px 10px 10px; }
.ma-rate-val { font-size: 11px; color: var(--c-text); }
.ma-rate-val strong { color: var(--c-accent); font-weight: 700; }

/* feature mini-cards */
.ma-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ma-card {
  background: var(--c-surface); border-radius: 12px; padding: 14px 12px;
  border: 1px solid var(--c-border);
}
.ma-card .lp-card-icon { width: 38px; height: 38px; border-radius: 9px; margin-bottom: 10px; }
.ma-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--c-text); }
.ma-card p  { font-size: 11px; color: var(--c-muted); line-height: 1.4; margin: 0; }

/* checklist */
.ma-checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.ma-checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.45; }
.ma-checklist li svg { flex-shrink: 0; margin-top: 2px; }

/* control items */
.ma-ctrl-list { display: flex; flex-direction: column; gap: 12px; }
.ma-ctrl-item { display: flex; align-items: flex-start; gap: 12px; }
.ma-ctrl-item .lp-control-icon { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0; }
.ma-ctrl-item h4 { font-size: 13px; font-weight: 700; margin-bottom: 3px; color: var(--c-text); }
.ma-ctrl-item p  { font-size: 12px; color: var(--c-muted); line-height: 1.4; margin: 0; }

/* advantages grid */
.ma-adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ma-adv-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; }
.ma-adv-item .lp-adv-icon { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 0; }
.ma-adv-item h4 { font-size: 12px; font-weight: 700; margin: 0; color: var(--c-text); }

/* bottom cta */
.ma-bottom-cta { padding: 20px 16px 28px; background: var(--c-surface); border-top: 1px solid var(--c-border); }
.ma-bottom-cta .btn-exchange { width: 100%; }

/* ── Mini App Layout ─────────────────────────────────────────────────────── */
.miniapp-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--c-bg);
}

/* Topbar */
.topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 36px; max-width: 180px; object-fit: contain; }
.brand-text { font-size: 17px; font-weight: 800; color: var(--c-primary); letter-spacing: -.02em; }

/* Topbar right cluster */
.topbar-right {
  display: flex; align-items: center; gap: 8px;
}
.topbar-client {
  font-size: 13px; font-weight: 600;
  color: var(--c-primary); text-decoration: none;
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-logout, .topbar-login {
  font-size: 12px; color: var(--c-muted);
  text-decoration: none; padding: 4px 8px;
  border-radius: 6px; border: 1px solid var(--c-border);
  transition: all .15s;
}
.topbar-logout:hover, .topbar-login:hover {
  color: var(--c-accent); border-color: var(--c-primary);
}

/* Language switch */
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: transparent; color: var(--c-muted);
  cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.lang-btn.active {
  background: var(--c-primary); color: var(--c-btn-text);
  border-color: var(--c-primary);
}

/* ── Calculator ──────────────────────────────────────────────────────────── */
.calc-wrap {
  flex: 1; padding: 20px 16px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.calc-card {
  width: 100%; max-width: 480px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  border: 1px solid var(--c-border);
}

.calc-title {
  font-size: 16px; font-weight: 700;
  color: var(--c-text); margin-bottom: 20px;
  letter-spacing: -.01em;
}

.calc-row { margin-bottom: 12px; }

.calc-label {
  display: block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-muted); margin-bottom: 6px;
}

.calc-field {
  display: flex; align-items: center;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  background: #0D0D14;
  overflow: hidden;
  transition: border-color .2s;
}
.calc-field:focus-within { border-color: var(--c-primary); background: #10101A; }

.calc-input {
  flex: 1; border: none; outline: none;
  padding: 13px 14px;
  font-size: 22px; font-weight: 700;
  color: var(--c-text); background: transparent;
  min-width: 0;
  font-family: inherit;
}
.calc-input::placeholder { color: var(--c-border); }

.currency-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border: none; border-left: 1.5px solid var(--c-border);
  background: transparent; cursor: pointer;
  font-family: inherit; transition: background .15s;
  flex-shrink: 0;
}
.currency-btn:hover { background: rgba(255,255,255,.04); }
.currency-btn:active { background: var(--c-border); }

.currency-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.currency-icon svg { width: 28px; height: 28px; display: block; }

.currency-code {
  font-size: 14px; font-weight: 700;
  color: var(--c-text); min-width: 36px;
}

.chevron { color: var(--c-muted); flex-shrink: 0; }

.min-label {
  display: block;
  font-size: 11px; color: var(--c-muted);
  margin-top: 4px; min-height: 16px;
}

/* Swap row */
.swap-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 12px; gap: 8px;
}

.rate-badge {
  font-size: 11.5px; color: var(--c-muted);
  background: rgba(255,255,255,.04); border-radius: 10px;
  border: 1px solid var(--c-border);
  padding: 7px 11px;
  line-height: 1.5;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rate-badge strong { color: var(--c-accent); font-weight: 700; }
.rate-badge .rate-line {
  display: block;
  text-align: left;
  font-size: 11.5px;
  color: var(--c-muted);
  margin: 0;
  line-height: 1.5;
}
.rate-badge .rate-line + .rate-line { margin-top: 3px; }
.rate-personal-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #FBBF24;
  font-size: 11px;
  margin-left: 3px;
  cursor: help;
  outline: none;
  vertical-align: middle;
}
.rate-personal-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  min-width: 160px;
  max-width: 220px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1E1E2A;
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #EEEEF4;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.rate-personal-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(251, 191, 36, 0.35);
}
.rate-personal-tag:hover .rate-personal-tip,
.rate-personal-tag:focus .rate-personal-tip,
.rate-personal-tag.is-open .rate-personal-tip {
  opacity: 1;
  visibility: visible;
}

.swap-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-surface2);
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  align-self: center;
  transition: all .15s; color: var(--c-primary);
}
.swap-btn svg { display: block; }
.swap-btn:hover { background: rgba(180,180,204,.15); border-color: var(--c-primary); }
.swap-btn:active { transform: rotate(180deg); }

/* Validation error */
.calc-error {
  font-size: 13px; color: #F87171;
  background: rgba(248,113,113,.10); border-radius: 8px;
  padding: 8px 12px; margin-top: 4px; margin-bottom: 2px;
}
.calc-field.field-error {
  border-color: #F87171 !important;
}

/* Exchange button */
.btn-exchange {
  display: block; width: 100%;
  padding: 15px; margin-top: 20px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 16px; font-weight: 700;
  text-align: center; text-decoration: none;
  border-radius: var(--radius); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  transition: transform .15s, box-shadow .15s, opacity .15s;
  font-family: inherit;
}
.btn-exchange:active { transform: scale(.98); box-shadow: none; }
.btn-exchange:hover { opacity: .88; }
.btn-exchange:disabled {
  background: var(--c-border); color: var(--c-muted);
  box-shadow: none; cursor: not-allowed; transform: none; opacity: 1;
}

/* Direction list */
.dir-list {
  width: 100%; max-width: 480px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.dir-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-muted);
  padding: 14px 16px 8px;
}
.dir-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-top: 1px solid var(--c-border);
  text-decoration: none; color: var(--c-text);
  font-weight: 500; font-size: 14px;
  transition: background .15s;
}
.dir-item:hover { background: rgba(255,255,255,.04); }
.dir-arrow { color: var(--c-muted); font-size: 18px; }

/* ── Currency Picker Modal ────────────────────────────────────────────────── */
.picker-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.70);
  display: none; align-items: flex-end;
  animation: fadeIn .15s;
}
.picker-overlay.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.picker-sheet {
  width: 100%; max-width: 480px;
  margin: 0 auto;
  background: var(--c-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--c-border);
  border-bottom: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: slideUp .2s ease-out;
  max-height: 60vh; display: flex; flex-direction: column;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.picker-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 700; font-size: 15px;
  color: var(--c-text);
}
.picker-close {
  border: none; background: rgba(255,255,255,.06);
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; color: var(--c-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.picker-close:hover { background: var(--c-border); }
.picker-close svg { display: block; }

.picker-list {
  overflow-y: auto; padding: 8px 0;
}

.picker-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 20px;
  border: none; background: transparent; cursor: pointer;
  text-align: left; font-family: inherit;
  transition: background .1s;
}
.picker-item:hover { background: rgba(255,255,255,.05); }

.picker-coin {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.picker-coin svg { width: 36px; height: 36px; display: block; }
.picker-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--c-text); }
.picker-ticker { font-size: 13px; font-weight: 700; color: var(--c-muted); }

/* ── Category page ───────────────────────────────────────────────────────── */
.dir-from  { font-weight: 700; color: var(--c-text); }
.dir-to    { font-weight: 700; color: var(--c-accent); }
.dir-arrow-inner { color: var(--c-muted); margin: 0 6px; }

/* ── Option page ─────────────────────────────────────────────────────────── */
.option-badge {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.option-badge-from, .option-badge-to {
  font-size: 22px; font-weight: 800; color: var(--c-text);
}
.option-badge-to { color: var(--c-accent); }
.option-badge-arrow { font-size: 20px; color: var(--c-muted); }

.option-text {
  font-size: 14px; line-height: 1.6; color: var(--c-text);
  white-space: pre-line; margin-bottom: 16px;
  background: var(--c-surface2); border-radius: var(--radius-sm);
  padding: 12px 14px; border: 1px solid var(--c-border);
}

.rate-info-block {
  border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 16px; border: 1px solid var(--c-border);
}
.rate-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: rgba(180,180,204,.07);
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
}
.rate-info-row:last-child { border-bottom: none; }
.rate-info-row span { color: var(--c-muted); }
.rate-info-row strong { color: var(--c-accent); }

/* ── Auth page ───────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex; border-bottom: 2px solid var(--c-border);
  margin-bottom: 0;
}
.auth-tab {
  flex: 1; padding: 11px; border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--c-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-family: inherit; transition: all .15s;
}
.auth-tab.active {
  color: var(--c-accent); border-bottom-color: var(--c-primary);
}

/* ── Apply form ──────────────────────────────────────────────────────────── */
.topbar-back {
  font-size: 14px; font-weight: 500; color: var(--c-muted);
  text-decoration: none; display: flex; align-items: center; gap: 4px;
}
.topbar-back:hover { color: var(--c-accent); }

.form-dir-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-muted); margin-bottom: 4px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--c-text); margin-bottom: 6px;
}
.form-hint {
  font-size: 12px; color: var(--c-muted); margin-top: 5px;
}

.form-select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--c-border); border-radius: var(--radius);
  font-size: 15px; color: var(--c-text);
  background: #0D0D14; outline: none;
  font-family: inherit; transition: border-color .2s;
  appearance: none;
}
.form-select:focus { border-color: var(--c-primary); }

.form-divider { height: 1px; background: var(--c-border); margin: 20px 0; }

/* Summary card */
.apply-summary-card {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 18px 16px;
  margin-bottom: 18px;
}
.apply-summary-title {
  font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--c-text);
}
.apply-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.apply-summary-row:last-child { border-bottom: none; }
.apply-summary-label { color: var(--c-muted); }
.apply-summary-val { font-weight: 600; color: var(--c-text); }

/* Method toggle */
.method-toggle {
  display: flex; gap: 8px;
}
.method-btn {
  flex: 1; padding: 11px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface2); color: var(--c-muted);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s;
  font-family: inherit; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.method-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.method-btn.active {
  background: rgba(180,180,204,.14); color: var(--c-accent);
  border-color: var(--c-primary); font-weight: 700;
}
.method-btn:hover:not(.active) { background: rgba(255,255,255,.05); }

/* ── Bank picker ─────────────────────────────────────────────────────────── */
.bank-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 400px) { .bank-picker { grid-template-columns: repeat(4, 1fr); } }

.bank-option {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px 6px;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  background: var(--c-surface2); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.bank-option:hover { background: rgba(180,180,204,.12); border-color: var(--c-primary); }
.bank-option.selected {
  background: rgba(180,180,204,.14); border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(180,180,204,.20);
}
.bank-logo {
  width: 32px; height: 32px;
  border-radius: 8px; object-fit: contain;
  display: block;
}
.bank-logo-other {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--c-border); font-size: 18px; color: var(--c-muted);
}
.bank-name {
  font-size: 10px; font-weight: 600; color: var(--c-text);
  text-align: center; line-height: 1.2; word-break: break-word;
}
.bank-option.selected .bank-name { color: var(--c-accent); }

/* ── Form steps (application flow) ──────────────────────────────────────── */
.form-step {
  background: var(--c-surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
  margin-bottom: 14px; width: 100%; max-width: 480px;
  border: 1px solid var(--c-border);
}
.form-step__label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-muted); margin-bottom: 6px;
}
.form-step__prompt {
  font-size: 15px; color: var(--c-text); margin-bottom: 12px;
}
.form-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--c-border); border-radius: var(--radius);
  font-size: 15px; outline: none; transition: border-color .2s;
  font-family: inherit; background: #0D0D14; color: var(--c-text);
}
.form-input:focus { border-color: var(--c-primary); background: #10101A; }

/* Option / category list */
.option-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.option-item a {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--c-border);
  text-decoration: none; color: var(--c-text);
  font-weight: 600; transition: all .15s;
}
.option-item a:hover { border-color: var(--c-primary); background: rgba(180,180,204,.08); }
.option-item .arrow { color: var(--c-muted); font-size: 18px; }

/* Exchange card (summary) */
.exchange-card {
  background: var(--c-surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
  width: 100%; max-width: 480px;
  border: 1px solid var(--c-border);
}
.exchange-card__title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--c-text); }
.exchange-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.exchange-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.exchange-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; background: #0D0D14;
}
.exchange-input-wrap:focus-within { border-color: var(--c-primary); }
.exchange-input {
  flex: 1; border: none; outline: none;
  padding: 12px 14px; font-size: 20px; font-weight: 700;
  background: transparent; font-family: inherit; color: var(--c-text);
}
.currency-badge {
  padding: 0 14px; font-size: 13px; font-weight: 700;
  color: var(--c-accent); border-left: 1px solid var(--c-border);
}
.exchange-card .rate-line { text-align: center; font-size: 12px; color: var(--c-muted); margin-bottom: 16px; }

/* ── Success page ────────────────────────────────────────────────────────── */
.success-page {
  min-height: 100vh; background: var(--c-bg);
  display: flex; flex-direction: column;
}
.success-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 10;
}
.success-main {
  flex: 1; padding: 28px 16px 40px;
  display: flex; flex-direction: column; align-items: center;
  max-width: 480px; margin: 0 auto; width: 100%;
}
.success-icon-wrap { margin-bottom: 16px; }
.success-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--c-success);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(34,197,94,.30);
}
.success-title {
  font-size: 22px; font-weight: 800; color: var(--c-text);
  text-align: center; margin-bottom: 6px;
}
.success-subtitle {
  font-size: 14px; color: var(--c-muted); text-align: center;
  margin-bottom: 24px; line-height: 1.5;
}
.success-op-header {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 16px 10px;
}
.success-coin {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 800; color: #fff; letter-spacing: .02em;
}
.success-op-text { font-size: 15px; font-weight: 700; color: var(--c-text); }
.success-amounts {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 4px 16px 16px;
}
.success-amount-box { text-align: center; }
.success-amount-label { display: block; font-size: 11px; color: var(--c-muted); margin-bottom: 3px; }
.success-amount-val { display: block; font-size: 18px; font-weight: 800; color: var(--c-text); }
.success-amount-recv { color: var(--c-success); }
.success-amount-arrow { color: var(--c-muted); display: flex; align-items: center; padding-top: 14px; }
.success-rate {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--c-muted);
  background: rgba(255,255,255,.05); border-radius: 12px;
  padding: 8px 14px; margin: 0 16px 14px;
  border: 1px solid var(--c-border);
}
.success-rate svg { flex-shrink: 0; margin-top: 1px; align-self: flex-start; }
.success-rate-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.success-rate-line { line-height: 1.35; }
.success-rate strong { color: var(--c-accent); }
.success-card {
  width: 100%; background: var(--c-surface); border-radius: 18px;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden; margin-bottom: 20px;
}
.success-divider { height: 1px; background: var(--c-border); margin: 4px 0; }
.success-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
}
.success-row-label { font-size: 12px; color: var(--c-muted); flex-shrink: 0; padding-top: 1px; }
.success-row-val { font-size: 13px; color: var(--c-text); font-weight: 500; text-align: right; }
.success-row-mono { font-family: monospace; font-size: 12px; word-break: break-all; }
.success-back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px 0; border-radius: 14px;
  background: var(--c-btn-bg); color: var(--c-btn-text);
  font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  -webkit-tap-highlight-color: transparent;
}

/* ── legacy success-wrap ────────────────────────────────────────────────── */
.success-wrap {
  display: flex; flex-direction: column;
  align-items: center; text-align: center; padding: 48px 24px;
}
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-text { color: var(--c-muted); font-size: 15px; }

/* ── Coin badges (landing coin-currency labels) ─── */
.lp-coin-usdt { background: #1A7A5A; }
.lp-coin-uah  { background: #1A4A9A; }
.lp-coin-usd  { background: #1E6A1E; }
.lp-coin-eur  { background: #1A3A8A; }
.lp-coin-eth  { background: #3A4EA0; }
.lp-coin-btc  { background: #8A5010; }

@media (max-width: 400px) {
  .calc-input { font-size: 18px; }
  .calc-card { padding: 18px 14px; }
}
