:root {
  --navy-900: #070d1a;
  --navy-800: #0b1424;
  --navy-700: #111d33;
  --navy-600: #1a2944;
  --line-dark: #24365a;
  --gold-300: #ffe08a;
  --gold-400: #f6c94c;
  --gold-500: #e6ad2a;
  --gold-600: #b9831a;
  --silver-300: #e9edf3;
  --silver-500: #a9b3c2;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --paper: #ffffff;
  --paper-2: #f5f7fb;
  --line: #e5e9f0;
  --green: #16a34a;
  --green-bg: #e8f7ee;
  --red: #dc2626;
  --red-bg: #fdecec;
  --amber: #b45309;
  --amber-bg: #fff4e0;
  --blue: #2563eb;
  --blue-bg: #e8effd;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(3, 8, 20, .18);
  --gold-grad: linear-gradient(180deg, #ffd766 0%, #f2b832 55%, #dc9c1f 100%);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #1c2c4f 0%, transparent 60%), var(--navy-900);
  color: #e8edf6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2));
  background: rgba(7, 13, 26, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 40px; height: 30px; }
.brand .wordmark { line-height: 1; }
.brand .wordmark b { display: block; font-size: 18px; letter-spacing: .06em; color: #fff; font-weight: 700; }
.brand .wordmark span { font-size: 11px; color: var(--gold-400); font-weight: 500; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; font-size: 14px; color: #c5cee0; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.06); }
.top-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- layout ---------- */
main { padding: 24px max(16px, calc((100vw - 1180px) / 2)) 110px; }
.narrow { max-width: 560px; margin: 0 auto; }
.mid { max-width: 820px; margin: 0 auto; }
.page-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 20px; }
.page-title h1 { font-size: 24px; margin: 0; font-weight: 600; }
.back { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); text-decoration: none; color: #fff; border: 0; cursor: pointer; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-3); }
.dim { color: #9aa7bf; }
.small { font-size: 12px; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.hidden { display: none !important; }

/* ---------- cards ---------- */
.card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.dark { background: var(--navy-700); color: #e8edf6; border: 1px solid var(--line-dark); box-shadow: none; }
.card h2, .card h3 { margin: 0 0 6px; }
.card h2 { font-size: 18px; }
.card h3 { font-size: 16px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.kv b { font-weight: 600; }
.kv.total { font-size: 16px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: transform .05s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold-grad); color: #2b1d02; box-shadow: 0 6px 18px rgba(230, 173, 42, .28); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.07); color: #fff; border: 1px solid rgba(255,255,255,.14); }
.btn-light { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.dark-form .field label { color: #b8c3d8; }
.input {
  width: 100%; padding: 13px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(230,173,42,.2); }
.dark-form .input { background: rgba(255,255,255,.04); border-color: #33476e; color: #fff; }
.dark-form .input::placeholder { color: #8796b3; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold-500); margin-top: 2px; }
.hint { font-size: 12px; color: var(--ink-3); }
.dark-form .hint { color: #8fa0bf; }

/* ---------- misc ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.grey { background: #eef1f6; color: var(--ink-2); }
.badge.kyc { background: #0f3b23; color: #7ee2a2; border: 1px solid #1d6b40; }
.up { color: var(--green); font-weight: 600; }
.down { color: var(--red); font-weight: 600; }
.tabs { display: flex; background: rgba(255,255,255,.06); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: transparent; color: #c8d1e3; padding: 10px; border-radius: 9px; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--gold-grad); color: #2b1d02; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--amber-bg); color: #7c3d06; }
.alert.err { background: var(--red-bg); color: #991b1b; }
.alert.ok { background: var(--green-bg); color: #14532d; }
.alert.info { background: var(--blue-bg); color: #1e3a8a; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 100; font-size: 14px; max-width: calc(100vw - 32px); }
.toast.err { background: #7f1d1d; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold-400); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- coins ---------- */
.coin { --size: 64px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; position: relative; filter: drop-shadow(0 6px 10px rgba(0,0,0,.28)); }
.coin svg { width: 100%; height: 100%; display: block; }
.coin.lg { --size: 150px; }
.coin.md { --size: 88px; }
.coin.sm { --size: 44px; }

/* ---------- landing ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 56px 44px; min-height: 380px;
  background: radial-gradient(600px 400px at 85% 60%, rgba(246,201,76,.25), transparent 70%), linear-gradient(120deg, #101a2e 0%, #1b1a17 55%, #3a2a10 100%);
  border: 1px solid rgba(246,201,76,.18); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center;
}
.hero h1 { font-size: 44px; line-height: 1.12; margin: 0 0 18px; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero p { color: #c6cfdf; font-size: 16px; max-width: 520px; }
.hero-coins { position: relative; height: 260px; }
.hero-coins .coin { position: absolute; }
.hero-coins .coin.g { --size: 210px; right: 70px; top: 10px; }
.hero-coins .coin.s { --size: 160px; right: 0; top: 110px; }
.feature-row { display: flex; gap: 22px; flex-wrap: wrap; margin: 22px 0 26px; }
.feature { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #d7deeb; }
.feature i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--gold-400); color: var(--gold-400); font-style: normal; font-size: 15px; }
.section-title { font-size: 20px; margin: 34px 0 14px; font-weight: 600; }
.step-card { background: var(--navy-700); border: 1px solid var(--line-dark); border-radius: 16px; padding: 20px; }
.step-card .n { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-grad); color: #2b1d02; display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.step-card h3 { margin: 0 0 6px; font-size: 16px; }
.step-card p { margin: 0; color: #a9b6cc; font-size: 14px; }

/* ---------- prices ---------- */
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-tile { background: var(--paper-2); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); }
.price-tile .label { font-size: 13px; color: var(--ink-2); }
.price-tile .value { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.paused-strip { background: var(--amber-bg); color: #7c3d06; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-top: 10px; }

/* ---------- dashboard ---------- */
.greet { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.greet h1 { font-size: 22px; margin: 0; font-weight: 500; }
.banner {
  border-radius: 18px; padding: 26px; position: relative; overflow: hidden; min-height: 170px;
  background: radial-gradient(400px 220px at 90% 70%, rgba(246,201,76,.35), transparent 70%), linear-gradient(110deg, #16213a, #2a2414 70%, #4a3612);
  border: 1px solid rgba(246,201,76,.2);
}
.banner h2 { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.banner p { margin: 0 0 4px; color: #d5dceb; font-size: 14px; }
.banner .coins { position: absolute; right: 24px; top: 26px; display: flex; }
.banner .coins .coin { --size: 100px; }
.banner .coins .coin.silver { margin-right: -22px; z-index: 1; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick a { background: var(--paper); color: var(--ink); text-decoration: none; border-radius: 14px; padding: 16px 8px; text-align: center; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.quick a .ico { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 12px; display: grid; place-items: center; background: #fff6dc; font-size: 22px; }

/* ---------- product & coin rows ---------- */
.product-row { display: flex; gap: 16px; align-items: center; }
.product-row .info { flex: 1; min-width: 0; }
.product-row .name { font-weight: 600; font-size: 16px; }
.product-row .price { font-size: 22px; font-weight: 700; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--paper-2); cursor: pointer; font-size: 18px; color: var(--ink); }
.qty span { min-width: 34px; text-align: center; font-weight: 600; }
.cart-btn { width: 42px; height: 42px; border-radius: 11px; border: 0; background: var(--gold-grad); cursor: pointer; font-size: 18px; }
.coin-row { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.coin-row .meta { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.coin-row .meta b { font-size: 15px; color: var(--ink); display: block; }
.chev { color: var(--ink-3); font-size: 22px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 36px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: #cbd5e1; }
.timeline li.done .dot { background: var(--green); }
.timeline li.done::before { background: var(--green); }
.timeline li.bad .dot { background: var(--red); }
.timeline .t { font-weight: 600; font-size: 14px; }
.timeline .s { font-size: 12px; color: var(--ink-3); }

/* ---------- steps / wizard ---------- */
.stepper { display: flex; justify-content: center; align-items: center; gap: 0; margin-bottom: 18px; }
.stepper i { width: 12px; height: 12px; border-radius: 50%; background: #3a4c70; display: block; }
.stepper i.on { background: var(--gold-400); box-shadow: 0 0 0 4px rgba(246,201,76,.2); }
.stepper b { width: 50px; height: 2px; background: #3a4c70; display: block; }
.kyc-step { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.kyc-step:last-child { border-bottom: 0; }
.kyc-step .ico { width: 44px; height: 44px; border-radius: 10px; background: #e9f7ef; display: grid; place-items: center; font-size: 20px; flex: none; }
.kyc-step .txt { flex: 1; }
.kyc-step .txt b { display: block; font-size: 15px; }
.kyc-step .txt span { font-size: 13px; color: var(--ink-3); }
.tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--green); flex: none; }
.tick.no { background: #e2e8f0; color: var(--ink-3); }

/* ---------- scanner ---------- */
.scanner { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #1b2436; display: grid; place-items: center; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.qr-art { width: 120px; height: 120px; background:
  conic-gradient(from 90deg at 2px 2px, transparent 90deg, #fff 0) 0 0 / 12px 12px; opacity: .25; border-radius: 8px; }

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- footer ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 32px 22px; }
  .hero h1 { font-size: 32px; }
  .hero-coins { height: 200px; }
  .hero-coins .coin.g { --size: 150px; right: auto; left: 10px; top: 10px; }
  .hero-coins .coin.s { --size: 120px; right: auto; left: 130px; top: 70px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .nav { display: none; }
  .topbar { gap: 10px; justify-content: space-between; }
  main { padding-top: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick a { padding: 12px 4px; font-size: 11px; }
  .quick a .ico { width: 36px; height: 36px; font-size: 18px; }
  .banner .coins .coin { --size: 64px; }
  .banner h2 { font-size: 21px; padding-right: 110px; }
  .banner p { padding-right: 100px; }
  .product-row .price { font-size: 19px; }
  .product-row .coin { --size: 56px; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff;
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--ink-3); font-size: 11px; padding: 4px 0; }
  .bottom-nav a .i { display: block; font-size: 19px; line-height: 1.3; }
  .bottom-nav a.active { color: var(--gold-600); font-weight: 600; }
}
