/* ============================================================
   YPG STOREFRONT DESIGN SYSTEM — hand-written, token driven.
   Two themes via [data-theme] on <html>. Mobile-first.
   Display: Sora · Body: Inter · Numbers/code: JetBrains Mono
   ============================================================ */

:root {
    --brand-1: #6366f1;
    --brand-2: #8b5cf6;
    --brand-3: #d946ef;
    --accent: #22d3ee;
    --ok: #10b981;
    --warn: #f59e0b;
    --bad: #f43f5e;

    --canvas: #f5f6fb;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --raised: #eef0f7;
    --line: rgba(15, 18, 34, 0.08);
    --line-strong: rgba(15, 18, 34, 0.14);
    --text: #10132a;
    --text-2: #4c5169;
    --text-3: #8388a0;
    --shadow: 0 1px 2px rgba(16, 20, 40, .05), 0 10px 30px -14px rgba(80, 70, 200, .22);
    --shadow-lg: 0 30px 70px -26px rgba(80, 60, 200, .40);
    --glow: 0 0 0 1px rgba(99, 102, 241, .25), 0 10px 40px -8px rgba(99, 102, 241, .5);
    --glow-strong: 0 0 40px -6px rgba(124, 58, 237, .45);
    --blur: saturate(1.4) blur(14px);
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
}

[data-theme="dark"] {
    --canvas: #070a15;
    --surface: rgba(18, 21, 40, 0.62);
    --surface-solid: #141830;
    --raised: rgba(255, 255, 255, 0.05);
    --line: rgba(235, 238, 255, 0.09);
    --line-strong: rgba(235, 238, 255, 0.16);
    --text: #eef0fb;
    --text-2: #a6abc6;
    --text-3: #6d7290;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 36px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 34px 84px -30px rgba(0, 0, 0, .85), 0 0 40px -18px rgba(139, 92, 246, .4);
    --glow-strong: 0 0 44px -4px rgba(139, 92, 246, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { max-width: 100vw; overflow-x: hidden; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.011em;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

/* Aurora canvas — fixed, subtle, both themes */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(50% 44% at 10% -8%, rgba(99, 102, 241, .28), transparent 62%),
        radial-gradient(46% 40% at 94% 2%, rgba(217, 70, 239, .20), transparent 62%),
        radial-gradient(52% 46% at 80% 98%, rgba(34, 211, 238, .18), transparent 62%),
        radial-gradient(40% 40% at 45% 55%, rgba(139, 92, 246, .10), transparent 70%);
    pointer-events: none;
    animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
    to { transform: translate3d(0, -1.5%, 0) scale(1.04); }
}
[data-theme="dark"] body::before {
    background:
        radial-gradient(50% 44% at 10% -8%, rgba(99, 102, 241, .40), transparent 60%),
        radial-gradient(46% 40% at 94% 2%, rgba(217, 70, 239, .26), transparent 60%),
        radial-gradient(52% 46% at 80% 98%, rgba(34, 211, 238, .20), transparent 60%),
        radial-gradient(40% 40% at 45% 55%, rgba(139, 92, 246, .16), transparent 70%);
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

h1, h2, h3, h4 { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.03em; line-height: 1.15; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; vertical-align: middle; }
button { font: inherit; cursor: pointer; }

.mono, .num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Type helpers ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
    color: var(--brand-1);
}
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand-1), var(--brand-3)); }
.grad-text {
    background: linear-gradient(92deg, var(--brand-1) 10%, var(--brand-2) 45%, var(--brand-3) 80%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------- Surfaces ---------- */
.card {
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-hover { transition: transform .25s cubic-bezier(.2,.8,.3,1), border-color .25s, box-shadow .25s; }
.card-hover:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line)); box-shadow: var(--shadow-lg), var(--glow-strong); }

/* Glow ring — a soft brand halo on emphasis cards. */
.card-glow { position: relative; }
.card-glow::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 60%, transparent), transparent 40%, color-mix(in srgb, var(--brand-3) 55%, transparent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: .5; pointer-events: none; transition: opacity .3s;
}
.card-glow:hover::after { opacity: 1; }

.hairline-t { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
    font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
    transition: transform .18s, box-shadow .25s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
    background-size: 160% 160%;
    box-shadow: 0 8px 24px -10px rgba(109, 90, 245, .65);
    position: relative; overflow: hidden;
}
.btn-primary:hover { background-position: 90% 50%; box-shadow: 0 12px 32px -10px rgba(109, 90, 245, .8); transform: translateY(-1px); }
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.35) 50%, transparent 58%);
    transform: translateX(-120%); transition: transform .6s;
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--raised); }
.btn-soft { background: color-mix(in srgb, var(--brand-1) 12%, transparent); color: var(--brand-1); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand-1) 18%, transparent); }
[data-theme="dark"] .btn-soft { color: #b9bcff; }
.btn-danger { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.btn-lg { padding: 15px 28px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block; margin-bottom: 7px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3);
}
.input, select.input, textarea.input {
    width: 100%; padding: 12px 14px;
    border-radius: 12px; border: 1px solid var(--line-strong);
    background: var(--surface-solid); color: var(--text);
    font: inherit; font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
    appearance: none; -webkit-appearance: none;
}
select.input {
    background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat;
    padding-right: 36px;
}
.input:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 18%, transparent); }
.input::placeholder { color: var(--text-3); }

/* ---------- Badges / pills ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.badge-ok    { background: color-mix(in srgb, var(--ok) 14%, transparent);    color: var(--ok); }
.badge-warn  { background: color-mix(in srgb, var(--warn) 16%, transparent);  color: #b45309; }
[data-theme="dark"] .badge-warn { color: #fbbf24; }
.badge-bad   { background: color-mix(in srgb, var(--bad) 14%, transparent);   color: var(--bad); }
.badge-brand { background: color-mix(in srgb, var(--brand-1) 13%, transparent); color: var(--brand-1); }
[data-theme="dark"] .badge-brand { color: #b9bcff; }

.dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.dot-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Flash / alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; margin-bottom: 18px; }
.alert-ok   { border-left: 3px solid var(--ok); }
.alert-bad  { border-left: 3px solid var(--bad); }
.alert-warn { border-left: 3px solid var(--warn); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--raised); }

/* ============================================================
   APP SHELL — sidebar + topbar
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: 264px;
    display: flex; flex-direction: column;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .sidebar { transform: none; } }

.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; }
.sidebar-brand img { width: 30px; height: 30px; object-fit: contain; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-nav .group-label { padding: 14px 12px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); }

.navlink {
    position: relative; display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; margin: 2px 0; border-radius: 11px;
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    transition: background .18s, color .18s;
}
.navlink svg { width: 19px; height: 19px; opacity: .75; transition: opacity .18s; }
.navlink:hover { background: var(--raised); color: var(--text); }
.navlink:hover svg { opacity: 1; }
.navlink.active {
    color: var(--brand-1);
    background: color-mix(in srgb, var(--brand-1) 10%, transparent);
}
[data-theme="dark"] .navlink.active { color: #c3c6ff; }
.navlink.active svg { opacity: 1; }
.navlink.active::before {
    content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 3px;
    border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--brand-1), var(--brand-3));
}

.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); }

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5, 6, 15, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.show { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) { .scrim { display: none; } }

.main { flex: 1; min-width: 0; }
@media (min-width: 1024px) { .main { margin-left: 264px; } }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    height: 60px; padding: 0 16px;
    background: color-mix(in srgb, var(--canvas) 72%, transparent);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) { .topbar { padding: 0 32px; } }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 11px; border: none; background: transparent; color: var(--text-2);
    transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 999px; color: #fff;
    font-size: 12.5px; font-weight: 700;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
    box-shadow: 0 4px 14px -4px rgba(109, 90, 245, .6);
}

.menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 220px;
    background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-lg); padding: 6px;
    opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
    transition: opacity .18s, transform .18s;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text); text-align: left; }
.menu a:hover, .menu button:hover { background: var(--raised); }
.menu a svg, .menu button svg { width: 17px; height: 17px; flex-shrink: 0; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.content { padding: 20px 16px 64px; }
@media (min-width: 1024px) { .content { padding: 32px 32px 80px; } }
.content-inner { max-width: 1120px; margin: 0 auto; }

/* Balance chip in topbar */
.bal-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 11px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #fff; font-weight: 700; font-size: 13px;
    box-shadow: 0 6px 18px -8px rgba(109, 90, 245, .7);
    transition: transform .18s;
}
.bal-chip:hover { transform: translateY(-1px); }

/* ---------- Quick actions ---------- */
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 600px) { .qa-grid { grid-template-columns: repeat(6, 1fr); } }
.qa {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 8px; text-align: center; position: relative; overflow: hidden;
    transition: transform .22s cubic-bezier(.2,.8,.3,1), border-color .22s, box-shadow .3s;
}
.qa::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--brand-1) 16%, transparent), transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.qa:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line)); box-shadow: var(--shadow-lg), var(--glow-strong); }
.qa:hover::before { opacity: 1; }
.qa .qa-ico {
    position: relative; z-index: 1;
    width: 46px; height: 46px; border-radius: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
    box-shadow: 0 8px 20px -6px rgba(109,90,245,.6);
    transition: transform .22s, box-shadow .3s;
}
.qa:hover .qa-ico { transform: translateY(-2px) scale(1.06); box-shadow: 0 12px 28px -6px rgba(109,90,245,.85); }
.qa .qa-ico svg { width: 21px; height: 21px; }
.qa .qa-label { position: relative; z-index: 1; font-size: 12.5px; font-weight: 700; color: var(--text); }

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 18px; position: relative; overflow: hidden; }
.stat .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); }
.stat .v { margin-top: 6px; font-family: 'Sora', sans-serif; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.stat .s { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.stat .ico { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: color-mix(in srgb, var(--brand-1) 11%, transparent); color: var(--brand-1); }
[data-theme="dark"] .stat .ico { color: #b9bcff; }
.stat .ico svg { width: 17px; height: 17px; }

/* ---------- Hero (dashboard wallet) ---------- */
.wallet-hero {
    position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 30px 26px;
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(217, 70, 239, .45), transparent 55%),
        radial-gradient(100% 140% at 0% 100%, rgba(34, 211, 238, .38), transparent 55%),
        linear-gradient(135deg, #4f46e5, #6d28d9 55%, #9333ea);
    color: #fff;
    box-shadow: var(--shadow-lg), 0 0 60px -12px rgba(124, 58, 237, .6);
}
.wallet-hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.4px);
    background-size: 22px 22px; opacity: .35; pointer-events: none;
}
.wallet-hero > * { position: relative; z-index: 1; }
.wallet-hero .amount { font-family: 'Sora', sans-serif; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; }

/* ---------- Product cards ---------- */
.prod-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }

.prod {
    display: flex; flex-direction: column; padding: 18px;
    position: relative; overflow: hidden;
}
.prod::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3));
    opacity: 0; transition: opacity .25s;
}
.prod:hover::before { opacity: 1; }
.prod-head { display: flex; gap: 12px; align-items: flex-start; }
.prod .cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.prod .title { margin-top: 4px; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.prod .foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.prod .price { font-family: 'Sora', sans-serif; font-size: 19px; font-weight: 700; }
.prod .stock { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.prod .stock.low { color: var(--warn); }

/* Platform tile — the square logo chip with SVG fallback. */
.ptile {
    position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 15%, transparent), color-mix(in srgb, var(--brand-3) 13%, transparent));
    color: var(--brand-1); border: 1px solid var(--line);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 6px 16px -8px rgba(99,102,241,.5);
}
[data-theme="dark"] .ptile { color: #b9bcff; }
/* img sits on top of the always-present fallback glyph; removing it on error reveals the glyph. */
.ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ptile svg { width: 22px; height: 22px; }
.ptile.sm { width: 40px; height: 40px; border-radius: 11px; }
.ptile.sm svg { width: 19px; height: 19px; }

/* ---------- Catalog: platform tabs strip ---------- */
.ptabs-wrap { position: relative; margin-bottom: 18px; }
.ptabs {
    display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 10px;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ptabs::-webkit-scrollbar { height: 6px; }
.ptabs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.ptab {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 8px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--line); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text-2);
    transition: transform .18s, border-color .2s, box-shadow .25s, color .2s;
}
.ptab:hover { transform: translateY(-2px); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow); }
.ptab .ptile { width: 30px; height: 30px; border-radius: 9px; box-shadow: none; }
.ptab .ptile svg { width: 15px; height: 15px; }
.ptab .ptab-ico {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--brand-1) 14%, transparent); color: var(--brand-1);
}
.ptab .ptab-ico svg { width: 16px; height: 16px; }
.ptab.active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
    box-shadow: 0 8px 24px -8px rgba(109,90,245,.7), var(--glow-strong);
}
.ptab.active .ptab-ico, .ptab.active .ptile { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Catalog: listing rows ---------- */
.lrow {
    display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
    padding: 14px 16px; position: relative; overflow: hidden;
}
.lrow::before {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: linear-gradient(180deg, var(--brand-1), var(--brand-3));
    opacity: 0; transition: opacity .25s;
}
.lrow:hover::before { opacity: 1; }
.lrow .lr-main { min-width: 0; }
.lrow .lr-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); }
.lrow .lr-title { font-family: 'Sora', sans-serif; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.lrow .lr-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.lrow .lr-right { display: flex; align-items: center; gap: 16px; }
.lrow .lr-stocknum { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; }
.lrow .lr-stocklbl, .lrow .lr-pricelbl { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.lrow .lr-price { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 17px; color: var(--brand-1); }
[data-theme="dark"] .lrow .lr-price { color: #c3c6ff; }
.lrow .lr-buy {
    display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
    box-shadow: 0 6px 16px -6px rgba(109,90,245,.6); transition: transform .18s, box-shadow .25s;
}
.lrow:hover .lr-buy { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(109,90,245,.8); }
.lr-hide-sm { display: none; }
@media (min-width: 640px) { .lr-hide-sm { display: block; } }

/* ============================================================
   MARKETING SHELL
   ============================================================ */
.site-nav {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 18px;
    height: 66px; padding: 0 clamp(16px, 4vw, 48px);
    background: color-mix(in srgb, var(--canvas) 68%, transparent);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--line);
}
.site-nav .brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; }
.site-nav .brand img { width: 30px; height: 30px; }
.site-nav .links { display: none; gap: 4px; margin-left: 10px; }
@media (min-width: 860px) { .site-nav .links { display: flex; } }
.site-nav .links a { padding: 9px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: background .18s, color .18s; }
.site-nav .links a:hover { background: var(--raised); color: var(--text); }
.site-nav .cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.hero {
    position: relative; overflow: hidden;
    padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 48px) clamp(56px, 8vw, 96px);
    text-align: center;
}
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 38%, #000 30%, transparent 75%);
    mask-image: radial-gradient(70% 60% at 50% 38%, #000 30%, transparent 75%);
}
.hero h1 {
    max-width: 820px; margin: 18px auto 0;
    font-size: clamp(34px, 6.4vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.06;
}
.hero .sub { max-width: 620px; margin: 20px auto 0; font-size: clamp(15px, 1.9vw, 17.5px); color: var(--text-2); line-height: 1.65; }
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

.hero-pill {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 16px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.hero-pill .dot { background: var(--ok); }

/* Floating platform chips around hero */
.float-chip {
    position: absolute; display: none; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    box-shadow: var(--shadow); color: var(--text-2);
    animation: floaty 7s ease-in-out infinite;
}
.float-chip svg { width: 24px; height: 24px; }
@media (min-width: 980px) { .float-chip { display: inline-flex; } }
@keyframes floaty { 50% { transform: translateY(-12px) rotate(var(--tilt, 0deg)); } }

.section { padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 48px); }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; margin-top: 12px; }
.section-head p { margin-top: 12px; color: var(--text-2); font-size: 15.5px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.feat-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.feat { padding: 24px; }
.feat .ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 16%, transparent), color-mix(in srgb, var(--brand-3) 14%, transparent));
    color: var(--brand-1);
}
[data-theme="dark"] .feat .ico { color: #b9bcff; }
.feat .ico svg { width: 21px; height: 21px; }
.feat h3 { font-size: 16.5px; font-weight: 700; }
.feat p { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

.steps { display: grid; grid-template-columns: 1fr; gap: 14px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 26px 24px; position: relative; counter-increment: step; }
.step::before {
    content: counter(step, decimal-leading-zero);
    font-family: 'Sora', sans-serif; font-size: 40px; font-weight: 800;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-1) 55%, transparent), transparent);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    display: block; margin-bottom: 8px;
}
.step h3 { font-size: 16px; }
.step p { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

.stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .stats-strip { grid-template-columns: repeat(4, 1fr); } }
.stats-strip .cell { text-align: center; padding: 26px 12px; }
.stats-strip .n { font-family: 'Sora', sans-serif; font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.stats-strip .l { margin-top: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); }

.quote { padding: 24px; }
.quote .txt { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.quote .who { display: flex; align-items: center; gap: 11px; margin-top: 18px; }
.quote .who .nm { font-size: 13.5px; font-weight: 700; }
.quote .who .rl { font-size: 12px; color: var(--text-3); }
.starrow { color: var(--warn); letter-spacing: 2px; font-size: 13px; margin-bottom: 12px; }

.cta-banner {
    position: relative; overflow: hidden; text-align: center;
    border-radius: var(--r-lg); padding: clamp(44px, 7vw, 80px) 24px;
    background:
        radial-gradient(120% 160% at 85% 0%, rgba(217, 70, 239, .4), transparent 55%),
        radial-gradient(110% 150% at 10% 100%, rgba(34, 211, 238, .3), transparent 55%),
        linear-gradient(135deg, #4338ca, #6d28d9 55%, #7c3aed);
    color: #fff; box-shadow: var(--shadow-lg);
}
.cta-banner h2 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 800; color: #fff; }
.cta-banner p { max-width: 520px; margin: 14px auto 0; font-size: 15px; color: rgba(255,255,255,.82); }
.cta-banner .btn { margin-top: 28px; background: #fff; color: #4338ca; }
.cta-banner .btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); }

.site-footer { padding: 40px clamp(16px, 4vw, 48px) 48px; border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-3); }

.paybadge { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; }
.paybadge .sq { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Auth split ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .auth-wrap { grid-template-columns: 460px 1fr; } }
.auth-panel { display: none; position: relative; overflow: hidden;
    background:
        radial-gradient(110% 130% at 90% 10%, rgba(217, 70, 239, .38), transparent 55%),
        radial-gradient(110% 140% at 0% 100%, rgba(34, 211, 238, .3), transparent 55%),
        linear-gradient(160deg, #312e81, #4c1d95 60%, #1e1b4b);
    color: #fff; padding: 48px;
}
@media (min-width: 960px) { .auth-panel { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-panel h2 { color: #fff; font-size: 30px; line-height: 1.2; }
.auth-panel .tick { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; color: rgba(255,255,255,.85); }
.auth-panel .tick svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: #6ee7b7; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.8,.3,1), transform .6s cubic-bezier(.2,.8,.3,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .rv { opacity: 1; transform: none; transition: none; }
    .float-chip, .dot-pulse { animation: none; }
}

/* ---------- Misc utils ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; } .mt-6 { margin-top: 40px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 26px; }
.tiny { font-size: 12px; } .small { font-size: 13.5px; }
.w-600 { font-weight: 600; } .w-700 { font-weight: 700; }
.center { text-align: center; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-2); }
.empty .big { font-size: 34px; margin-bottom: 10px; }

/* ---------- Modal (quick guide) ---------- */
.modal-scrim {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center; padding: 18px;
    background: rgba(5, 6, 15, .58); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-scrim.show { opacity: 1; pointer-events: auto; }
.modal {
    width: 100%; max-width: 460px; max-height: 86vh; overflow-y: auto;
    background: var(--surface-solid); border: 1px solid var(--line);
    border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg);
    transform: translateY(14px) scale(.98); transition: transform .25s;
}
.modal-scrim.show .modal { transform: none; }

.guide-step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-of-type { border-bottom: 0; }
.gnum {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px; color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
}

/* ---------- Telegram support button (livechat-style bubble) ---------- */
.tg-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 80;
    display: inline-flex; align-items: center; justify-content: center;
    width: 58px; height: 58px; border-radius: 50%;
    background: linear-gradient(135deg, #29b6f6 0%, #229ed9 100%);
    color: #fff; text-decoration: none;
    box-shadow: 0 10px 30px -8px rgba(34, 158, 217, .7);
    transition: transform .2s, box-shadow .25s;
}
.tg-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 38px -8px rgba(34, 158, 217, .85); }
.tg-fab svg { width: 28px; height: 28px; flex-shrink: 0; position: relative; z-index: 1; }
.tg-fab-ping {
    position: absolute; inset: 0; border-radius: 50%;
    background: rgba(34, 158, 217, .55);
    animation: tg-fab-ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
.tg-fab-dot {
    position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--ok, #2ecc71); border: 2.5px solid #fff;
}
@keyframes tg-fab-ping {
    0% { transform: scale(1); opacity: .55; }
    75%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .tg-fab-ping { animation: none; display: none; } }

/* ---------- AI chat widget (legacy, unused) ---------- */
.chat-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 80;
    width: 56px; height: 56px; border-radius: 999px; border: none; font-size: 23px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-3)); color: #fff;
    box-shadow: 0 10px 30px -8px rgba(109, 90, 245, .75);
    transition: transform .2s;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.05); }

.chat-panel {
    position: fixed; right: 18px; bottom: 84px; z-index: 85;
    width: min(370px, calc(100vw - 36px)); height: min(520px, 72vh);
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface-solid); border: 1px solid var(--line);
    border-radius: 20px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none;
    transition: opacity .25s, transform .25s;
}
.chat-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #4338ca, #7c3aed);
}
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg {
    max-width: 84%; padding: 10px 13px; border-radius: 15px;
    font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word;
}
.chat-msg.bot { align-self: flex-start; background: var(--raised); color: var(--text); border-bottom-left-radius: 5px; }
.chat-msg.me { align-self: flex-end; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); border-bottom-right-radius: 5px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input .input { padding: 10px 13px; }

::selection { background: color-mix(in srgb, var(--brand-1) 30%, transparent); }
