/* ========== Theme tokens ========== */
/* ===== Premium dark + gold (allinvex-inspired) — default theme ===== */
:root {
    /* base surfaces — deep, slightly warm near-black */
    --bg:            #0a0b0f;
    --bg-2:          #0e1016;
    --surface:       #14161d;   /* solid card */
    --surface-soft:  #101218;
    --surface-2:     #1b1e27;
    --surface-3:     #232734;
    --border:        rgba(255, 255, 255, 0.08);
    --border-soft:   rgba(255, 255, 255, 0.05);

    /* glassmorphism (opt-in on premium components) */
    --glass:         rgba(255, 255, 255, 0.045);
    --glass-strong:  rgba(255, 255, 255, 0.07);
    --glass-border:  rgba(255, 255, 255, 0.10);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    --blur:          20px;

    /* text */
    --text:          #f3f4f6;
    --text-2:        #a8aebb;
    --text-3:        #6c7380;
    --text-4:        #474d59;

    /* brand — naghdex gold, with gradient pair */
    --brand:         #f0b90b;
    --brand-2:       #fcd535;
    --brand-dark:    #d9a400;
    --brand-light:   #ffe15c;
    --brand-tint:    rgba(240, 185, 11, 0.13);
    --brand-faint:   rgba(240, 185, 11, 0.055);
    --brand-ink:     #fcd535;
    --on-brand:      #1a1305;
    --brand-grad:    linear-gradient(135deg, #fcd535 0%, #f0b90b 100%);

    /* market direction */
    --up:            #2ebd85;
    --down:          #f6465d;

    /* radii */
    --radius-lg:     20px;
    --radius:        14px;
    --radius-sm:     10px;

    /* shadows — deep for dark premium */
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.40);
    --shadow-md:     0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-lg:     0 30px 70px -22px rgba(0, 0, 0, 0.72);
    --shadow-brand:  0 12px 34px rgba(240, 185, 11, 0.30);

    /* ambient corner glows + grain */
    --bg-glow-1:     rgba(240, 185, 11, 0.11);
    --bg-glow-2:     rgba(245, 158, 11, 0.06);
    --bg-noise-opacity: 0.5;
}

/* dark toggle = same premium dark (keeps theme switch harmless) */
[data-theme="dark"] { color-scheme: dark; }

/* ===== Light alternative (preserved as toggle option) ===== */
[data-theme="light"] {
    color-scheme: light;
    --bg:            #f7f6f3;
    --bg-2:          #faf9f6;
    --surface:       #ffffff;
    --surface-soft:  #f6f5f1;
    --surface-2:     #faf9f6;
    --surface-3:     #efece6;
    --border:        #eae7e0;
    --border-soft:   #f1efe9;
    --glass:         rgba(255, 255, 255, 0.65);
    --glass-strong:  rgba(255, 255, 255, 0.82);
    --glass-border:  rgba(20, 17, 12, 0.08);
    --glass-border-hover: rgba(20, 17, 12, 0.14);
    --text:          #16130d;
    --text-2:        #56514a;
    --text-3:        #847f74;
    --text-4:        #aaa499;
    --brand:         #f0b90b;
    --brand-2:       #fcd535;
    --brand-dark:    #d9a400;
    --brand-light:   #fcd535;
    --brand-tint:    #fdf3d0;
    --brand-faint:   #fefaef;
    --brand-ink:     #8a6800;
    --on-brand:      #1a1a1a;
    --brand-grad:    linear-gradient(135deg, #fcd535 0%, #f0b90b 100%);
    --up:            #0fae6a;
    --down:          #e23b58;
    --shadow-sm:     0 2px 8px rgba(20, 17, 12, 0.04);
    --shadow-md:     0 8px 24px rgba(20, 17, 12, 0.06);
    --shadow-lg:     0 20px 50px rgba(20, 17, 12, 0.08);
    --shadow-brand:  0 10px 30px rgba(240, 185, 11, 0.30);
    --bg-glow-1:     rgba(240, 185, 11, 0.12);
    --bg-glow-2:     rgba(240, 160, 32, 0.07);
    --bg-noise-opacity: 1;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', system-ui, sans-serif; }

html, body { background: var(--bg); color: var(--text); min-height: 100vh; }
body { padding: 20px; overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; position: relative; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 650px at 10% -8%, var(--bg-glow-1), transparent 60%),
        radial-gradient(ellipse 750px 550px at 92% 18%, var(--bg-glow-2), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: multiply;
    opacity: var(--bg-noise-opacity, 1);
}
.app, .topnav, .footer, .topbar { position: relative; z-index: 2; }

button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

/* ========== Main layout ========== */
.app {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 18px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 20px;
}

/* ========== Top navigation ========== */
.desktop-only { display: flex; }

.topnav {
    background: var(--surface);
    border-radius: 22px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 1600px;
    margin: 0 auto 18px;
}
.topnav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.topnav__brand .brand-coin {
    width: 44px;
    height: 44px;
    font-size: 24px;
}
.topnav__brand .brand-info h1 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.topnav__brand .brand-info p {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

.topnav__menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.topnav__menu::-webkit-scrollbar { display: none; }

.topnav__item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 11px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.topnav__item:hover { background: var(--surface-soft); color: var(--text); }
.topnav__item.is-active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 700;
}
.topnav__item svg { width: 17px; height: 17px; stroke-width: 1.8; flex-shrink: 0; }

.topnav__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.topnav__actions .theme-switch {
    margin: 0;
    padding: 4px;
    box-shadow: none;
    background: var(--surface-soft);
}
.topnav__actions .theme-switch__btn { width: 32px; height: 32px; }
.topnav__actions .btn { padding: 9px 18px; font-size: 13px; }
.topnav__actions .btn--outline { background: transparent; }

/* ========== Brand card (right sidebar) ========== */
.brand-card {
    background: var(--surface);
    padding: 18px 20px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.brand-info h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.4px;
}
.brand-info p {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
}
.brand-coin {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    box-shadow: var(--shadow-brand);
    flex-shrink: 0;
}
.brand-coin svg {
    width: 56%;
    height: 56%;
    display: block;
}

/* ========== Menu ========== */
.menu {
    background: var(--surface);
    padding: 10px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.menu__item:hover { background: var(--surface-soft); color: var(--text); }
.menu__item.is-active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 700;
}
.menu__item svg { width: 20px; height: 20px; stroke-width: 1.8; }

/* ========== Theme switch ========== */
.theme-switch {
    display: flex;
    background: var(--surface);
    border-radius: 99px;
    padding: 5px;
    width: max-content;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.theme-switch__btn {
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theme-switch__btn svg { width: 18px; height: 18px; }
.theme-switch__btn.is-active {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

/* ========== Shield promo card ========== */
.promo-shield {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border);
}
.promo-shield__visual {
    background: linear-gradient(135deg, var(--brand-tint), transparent 80%);
    border-radius: 18px;
    height: 130px;
    position: relative;
    margin-bottom: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shield-svg {
    width: 90px;
    height: 100px;
    filter: drop-shadow(0 10px 20px rgba(240, 185, 11, 0.35));
}
.shield-coin {
    position: absolute;
    bottom: 14px;
    inset-inline-end: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: var(--shadow-brand);
}
.promo-shield h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}
.promo-shield p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.8;
    margin-bottom: 14px;
}
.promo-shield__btn {
    color: var(--brand-ink);
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 13px;
}


/* ========== Top bar (left sidebar) ========== */
.topbar {
    background: var(--surface);
    border-radius: 22px;
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.icon-btn {
    width: 38px; height: 38px;
    background: var(--surface-soft);
    border: none;
    border-radius: 12px;
    position: relative;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    background: var(--down);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

.btn {
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    box-shadow: var(--shadow-brand);
}
.btn--outline {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn--outline:hover { border-color: var(--brand); color: var(--brand-ink); }

.topbar .btn { padding: 9px 20px; }
.topbar .btn--outline { background: transparent; }

/* ========== Market Overview ========== */
.market-overview {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.market-overview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.market-overview__head h4 {
    font-size: 14px;
    font-weight: 700;
}
.market-overview__head svg { width: 18px; height: 18px; color: var(--text-3); }

.market-overview__tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--surface-soft);
    border-radius: 11px;
    margin-bottom: 14px;
}
.market-overview__tab {
    flex: 1;
    padding: 7px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 600;
}
.market-overview__tab.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.market-overview__chart {
    margin: 8px -8px 14px;
    height: 100px;
}

.market-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.market-stat {
    background: var(--surface-soft);
    padding: 12px 8px;
    border-radius: 14px;
    text-align: center;
}
.market-stat__label {
    font-size: 10.5px;
    color: var(--text-3);
    margin-bottom: 4px;
}
.market-stat__value {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 3px;
}
.market-stat__change {
    font-size: 11px;
    color: var(--up);
    font-weight: 700;
}

/* ========== Experience promo (green card) ========== */
.promo-experience {
    background: linear-gradient(135deg, #fcd535, #d9a400);
    border-radius: 22px;
    padding: 22px 22px 0;
    color: var(--on-brand);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-brand);
}
.promo-experience__deco {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
}
.promo-experience h4 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    position: relative;
}
.promo-experience p {
    font-size: 12px;
    opacity: 0.92;
    line-height: 1.8;
    margin-bottom: 14px;
    position: relative;
}
.promo-experience__btn {
    background: white;
    color: #8a6800;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    position: relative;
    z-index: 2;
}
.promo-experience__visual {
    margin: 18px -10px -4px;
    height: 140px;
    position: relative;
}
.phone-mock {
    position: absolute;
    inset-inline-end: 16px;
    bottom: 0;
    width: 80px;
    height: 130px;
    background: linear-gradient(135deg, #15130e, #26231a);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.phone-mock__coin {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
}
.promo-experience__cheetah {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 110px;
    height: 110px;
    object-fit: contain;
}
.promo-coin-fly {
    position: absolute;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.promo-coin-fly--a { top: 10px; inset-inline-end: 50px; }
.promo-coin-fly--b { top: 50px; inset-inline-end: 95px; }
.promo-coin-fly--c { bottom: 70px; inset-inline-start: 100px; transform: scale(0.85); }


/* ========== Transactions card ========== */
.transactions {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.transactions__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.transactions__head h4 {
    font-size: 14px;
    font-weight: 700;
}
.transactions__head a {
    color: var(--text-3);
    font-size: 12px;
}

.transaction {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-soft);
}
.transaction:last-child { border-bottom: none; }

.tx-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 900;
    color: white;
    font-size: 14px;
}
.tx-icon.usdt { background: #f0b90b; }
.tx-icon.btc { background: #f7931a; }
.tx-icon.eth { background: #627eea; }

.tx-arrow {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.tx-arrow.in { color: var(--up); }
.tx-arrow.out { color: var(--down); }

.tx-info { flex: 1; min-width: 0; }
.tx-info__line1 {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
    font-size: 13px;
}
.tx-info__title { font-weight: 600; color: var(--text); }
.tx-info__amount {
    font-weight: 700;
    font-size: 12px;
}
.tx-info__amount.up { color: var(--up); }
.tx-info__amount.down { color: var(--down); }
.tx-info__line2 {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-3);
}


/* ========== Clickable banners (sidebar cards) ========== */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 22px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    cursor: pointer;
    outline: none;
}
.card-link:hover { transform: translateY(-4px); }
.card-link:hover .market-overview { box-shadow: var(--shadow-md); border-color: var(--brand-tint); }
.card-link:hover .promo-experience { box-shadow: 0 18px 40px rgba(240, 185, 11, 0.35); }
.card-link:focus-visible { box-shadow: 0 0 0 3px var(--brand-tint), 0 0 0 4px var(--brand); }
.card-link:active { transform: translateY(-1px); }

.market-overview { transition: box-shadow 0.22s ease, border-color 0.22s ease; }
.promo-experience { transition: box-shadow 0.22s ease; }

.transactions {
    cursor: default;
}
.transactions__see-all {
    transition: color 0.18s ease;
}
.transactions__see-all:hover { color: var(--brand-ink); }

a.transaction {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 10px;
    margin: 0 -6px;
    padding-left: 6px;
    padding-right: 6px;
    transition: background 0.18s ease;
}
a.transaction:hover { background: var(--surface-soft); }


/* ========== Main content ========== */
.main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Hero */
.hero {
    background: var(--hero-bg, var(--surface));
    border-radius: 26px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

/* Hero sanctions warning banner */
.hero-warning {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: auto;
    max-width: 100%;
    margin: 14px 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(246, 70, 93, 0.10);
    border: 1px solid rgba(246, 70, 93, 0.45);
    box-shadow: 0 0 0 1px rgba(246, 70, 93, 0.08), 0 10px 28px rgba(246, 70, 93, 0.12);
    animation: hero-warning-glow 1.6s ease-in-out infinite;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero-warning__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.hero-warning__pulse {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--down);
    box-shadow: 0 0 0 0 rgba(246, 70, 93, 0.55);
    animation: hero-warning-pulse 1.4s ease-in-out infinite;
}
.hero-warning__body {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hero-warning__title {
    display: block;
    min-width: 0;
    font-size: 13px;
    font-weight: 800;
    color: #ff7a8a;
    letter-spacing: -0.2px;
    line-height: 1.4;
    animation: hero-warning-blink 1.6s ease-in-out infinite;
}
.hero-warning__text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-2);
    text-align: start;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero-warning__text--en {
    direction: ltr;
    text-align: start;
    unicode-bidi: isolate;
    font-size: 12px;
    line-height: 1.7;
    padding-top: 10px;
    border-top: 1px solid rgba(246, 70, 93, 0.22);
}
.hero-warning__text b { color: var(--text); font-weight: 800; }
[data-theme="light"] .hero-warning {
    background: rgba(226, 59, 88, 0.08);
    border-color: rgba(226, 59, 88, 0.35);
}
[data-theme="light"] .hero-warning__title { color: #c81e3a; }
[data-theme="light"] .hero-warning__text--en {
    border-top-color: rgba(226, 59, 88, 0.2);
}
@keyframes hero-warning-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(246, 70, 93, 0.55); opacity: 1; }
    70%  { box-shadow: 0 0 0 10px rgba(246, 70, 93, 0); opacity: 0.85; }
    100% { box-shadow: 0 0 0 0 rgba(246, 70, 93, 0); opacity: 1; }
}
@keyframes hero-warning-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}
@keyframes hero-warning-glow {
    0%, 100% { border-color: rgba(246, 70, 93, 0.35); box-shadow: 0 0 0 1px rgba(246, 70, 93, 0.06), 0 8px 22px rgba(246, 70, 93, 0.08); }
    50%      { border-color: rgba(246, 70, 93, 0.75); box-shadow: 0 0 0 1px rgba(246, 70, 93, 0.16), 0 12px 32px rgba(246, 70, 93, 0.22); }
}
:root        { --hero-bg: #e7e4d5; --hero-text: #16130d; --hero-art-bg: #e7e4d5; }
[data-theme="dark"] { --hero-bg: #181a20; --hero-text: #eaecef; --hero-art-bg: #181a20; }
.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    gap: 0;
    padding: 0;
    position: relative;
    min-height: 480px;
}
.hero__content {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero__content h2 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.05;
    letter-spacing: -1.5px;
}
.hero__content h3 {
    font-size: 32px;
    color: var(--brand-ink);
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.2;
}
.hero__content p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 2;
    margin-bottom: 26px;
    max-width: 95%;
}
.btn--hero {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    padding: 14px 32px;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-brand);
}
.btn--hero svg { width: 18px; height: 18px; }

/* Hero signup form */
.hero__signup {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    box-shadow: var(--shadow-md);
    max-width: 560px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero__signup:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint), var(--shadow-md);
}
.hero__signup-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    outline: none;
    direction: rtl;
    text-align: right;
}
.hero__signup-input::placeholder {
    color: var(--text-3);
    font-weight: 400;
}
.hero__signup-btn {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    padding: 14px 26px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    box-shadow: var(--shadow-brand);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}
.hero__signup-btn:hover { transform: translateY(-1px); }

.hero__signup-btn--solo {
    padding: 20px 48px;
    font-size: 18px;
    border-radius: 16px;
    margin-top: 8px;
}
.hero__signup-btn--solo:hover { transform: translateY(-2px); }

.hero__image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero__art {
    position: relative;
    width: auto;
    height: auto;
    max-width: 75%;
    max-height: 78%;
    object-fit: contain;
    animation: heroFloat 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 22px 38px rgba(240, 185, 11, 0.30));
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

[data-theme="dark"] .hero__art {
    filter: drop-shadow(0 26px 50px rgba(252, 213, 53, 0.38));
}

/* Theme-conditional swap between the light and dark hero artworks */
.hero__art--dark { display: none; }
[data-theme="dark"] .hero__art--light { display: none; }
[data-theme="dark"] .hero__art--dark  { display: block; }

/* Stats bar */
.stats-bar {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border-inline-start: 1px solid var(--border-soft);
}
.stat:first-child { border-inline-start: none; padding-inline-start: 8px; }
.stat__icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat__icon svg { width: 22px; height: 22px; }
.stat__value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}
.stat__label {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

/* Markets card */
.markets {
    background: var(--surface);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.markets__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    justify-content: flex-end;
    overflow-x: auto;
}
.markets__tab {
    padding: 9px 18px;
    border-radius: 11px;
    border: none;
    background: transparent;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.markets__tab.is-active {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.markets__table {
    width: 100%;
    border-collapse: collapse;
}
.markets__table thead th {
    text-align: end;
    padding: 12px 10px;
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.markets__table thead th:last-child { text-align: center; }
.markets__table tbody td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
    text-align: end;
}
.markets__table tbody tr:last-child td { border-bottom: none; }
.markets__table tbody tr:hover { background: var(--surface-soft); }

.asset {
    display: flex;
    align-items: center;
    gap: 11px;
    justify-content: flex-end;
}
.asset__info { text-align: end; }
.asset__name { font-weight: 700; font-size: 14px; }
.asset__sym { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.asset__logo {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}
.asset__logo.usdt { background: linear-gradient(135deg, var(--brand-light), var(--brand-dark)); }
.asset__logo.btc  { background: #f7931a; }
.asset__logo.eth  { background: linear-gradient(135deg, #8a92b2, #454a75); }
.asset__logo.xrp  { background: #23292f; }
.asset__logo.sol  { background: linear-gradient(135deg, #9945ff, #14f195); }

.cell-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cell-price small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
    margin-top: 3px;
}
.cell-change { font-weight: 700; font-variant-numeric: tabular-nums; }
.cell-change.up { color: var(--up); }
.cell-change.down { color: var(--down); }
.cell-volume { color: var(--text-2); font-variant-numeric: tabular-nums; }
.mini-chart { width: 100px; height: 36px; margin-inline-start: auto; }

.cell-star {
    color: var(--text-4);
    cursor: pointer;
    transition: color 0.2s;
    width: 18px; height: 18px;
}
.cell-star:hover, .cell-star.is-active { color: #f7c948; }

.see-all {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--brand-ink);
    font-weight: 700;
    font-size: 14px;
    margin-top: 6px;
}
.see-all svg { width: 16px; height: 16px; }


/* ========== Mobile responsive ========== */
.mobile-only { display: none; }

@media (max-width: 1180px) {
    .app { grid-template-columns: 1fr 260px; gap: 14px; }
    .topnav { gap: 12px; padding: 10px 14px; }
    .topnav__brand .brand-info { display: none; }
    .topnav__item { padding: 8px 10px; font-size: 12.5px; }
    .topnav__item span { display: none; }
    .topnav__menu { justify-content: flex-start; }
    .hero__content h2 { font-size: 44px; }
    .hero__content h3 { font-size: 26px; }
}

@media (max-width: 960px) {
    body { padding: 12px; }
    .app {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    .sidebar { display: none; }
    .sidebar.is-open { display: flex; position: static; }
    .mobile-only { display: flex; }
    .desktop-only { display: none; }

    .mobile-header {
        background: var(--surface);
        border-radius: 22px;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: space-between;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border);
    }
    .mobile-header .brand-info h1 { font-size: 18px; }
    .mobile-header .brand-info p { font-size: 11px; }
    .mobile-header .brand-coin { width: 44px; height: 44px; font-size: 24px; }

    .mobile-header__actions { display: flex; gap: 8px; align-items: center; }
    .mobile-header .btn { padding: 8px 18px; font-size: 13px; }
    .mobile-header__menu {
        width: 38px; height: 38px;
        background: var(--surface-soft);
        border: none;
        border-radius: 11px;
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        min-height: auto;
    }
    .hero-warning {
        margin: 10px 10px 0;
        padding: 12px 12px;
        gap: 6px;
        border-radius: 12px;
    }
    .hero-warning__head { gap: 8px; }
    .hero-warning__title { font-size: 12.5px; }
    .hero-warning__text { font-size: 12px; line-height: 1.85; }
    .hero-warning__text--en { font-size: 11.5px; line-height: 1.65; padding-top: 8px; }
    .hero__content { padding: 30px 20px; }
    .hero__content h2 { font-size: 40px; }
    .hero__content h3 { font-size: 22px; }
    .hero__content p { font-size: 14px; }
    .hero__image { min-height: 320px; height: 320px; }
    .hero__art { position: relative; max-width: 80%; max-height: 88%; padding: 0; }

    .stats-bar {
        grid-template-columns: repeat(4, 1fr);
        padding: 18px 14px;
    }
    .stat {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 0 6px;
    }
    .stat__icon { width: 42px; height: 42px; }
    .stat__value { font-size: 18px; }
    .stat__label { font-size: 11px; }

    .markets { padding: 18px 14px; }
    .markets__table thead th { font-size: 11px; padding: 8px 4px; }
    .markets__table tbody td { padding: 12px 4px; font-size: 13px; }
    .asset__logo { width: 32px; height: 32px; font-size: 14px; }
    .asset__name { font-size: 13px; }
    .asset__sym { font-size: 10px; }
    .cell-volume-col, .mini-chart-col { display: none; }
    .mini-chart { display: none; }

    .gift-banner {
        display: flex !important;
        background: var(--surface);
        border-radius: 22px;
        padding: 18px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border);
        align-items: center;
        gap: 16px;
        justify-content: space-between;
    }
    .gift-banner__text h4 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
    .gift-banner__text p { font-size: 12px; color: var(--text-3); line-height: 1.7; }
    .gift-banner .btn { padding: 12px 22px; font-size: 13px; }
    .gift-banner__visual {
        width: 90px; height: 90px;
        flex-shrink: 0;
        background: linear-gradient(135deg, var(--brand-tint), transparent);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 50;
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.04);
    }
    .bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-3);
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        padding: 6px 8px;
    }
    .bottom-nav__item svg { width: 22px; height: 22px; }
    .bottom-nav__item.is-active { color: var(--brand-ink); }
    .bottom-nav__item--center {
        width: 50px; height: 50px;
        background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
        color: var(--on-brand) !important;
        border-radius: 50%;
        margin-top: -25px;
        box-shadow: var(--shadow-brand);
    }
    .bottom-nav__item--center svg { width: 24px; height: 24px; }

    body { padding-bottom: 90px; }
}

@media (max-width: 520px) {
    .hero__content h2 { font-size: 34px; }
    .hero__content h3 { font-size: 20px; }
    .stat__value { font-size: 16px; }
    .markets__tabs { justify-content: flex-start; }
    .markets__table thead th:nth-child(3) { display: none; }
    .markets__table tbody td:nth-child(3) { display: none; }
    .hero-warning {
        margin: 8px 8px 0;
        padding: 11px 10px;
    }
    .hero-warning__title { font-size: 12px; }
    .hero-warning__text { font-size: 11.5px; line-height: 1.8; }
    .hero-warning__text--en { font-size: 11px; }
}

/* ===================================================== */
/* ============== Internal Pages Shared ================= */
/* ===================================================== */

.app--page {
    grid-template-columns: 1fr;
    max-width: 1320px;
}

.page-header {
    background: var(--surface);
    border-radius: 22px;
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 600px 240px at 100% 0%, var(--brand-tint), transparent 60%);
    pointer-events: none;
}
.page-header__text { position: relative; z-index: 1; }
.page-header__crumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
}
.page-header__crumb svg { width: 13px; height: 13px; }
.page-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 8px;
}
.page-header p {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.8;
    max-width: 540px;
}
.page-header__visual {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-brand);
    flex-shrink: 0;
    box-shadow: var(--shadow-brand);
    position: relative;
    z-index: 1;
}
.page-header__visual svg { width: 50px; height: 50px; }

.card {
    background: var(--surface);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.card__title {
    font-size: 16px;
    font-weight: 800;
}
.card__subtitle {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.kpi {
    background: var(--surface);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 14px;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi__icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kpi__icon svg { width: 22px; height: 22px; }
.kpi__icon--gold { background: rgba(247, 201, 72, 0.15); color: #f7c948; }
.kpi__icon--blue { background: rgba(80, 140, 255, 0.12); color: #5078ff; }
.kpi__icon--red  { background: rgba(236, 86, 102, 0.12); color: var(--down); }
.kpi__label {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 4px;
}
.kpi__value {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.kpi__change {
    font-size: 11.5px;
    font-weight: 700;
    margin-top: 4px;
}
.kpi__change.up { color: var(--up); }
.kpi__change.down { color: var(--down); }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.search-input {
    flex: 1;
    min-width: 220px;
    position: relative;
}
.search-input input {
    width: 100%;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 12px 44px 12px 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}
.search-input svg {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--text-3);
    pointer-events: none;
}
.chip {
    padding: 9px 16px;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.is-active {
    background: var(--brand-tint);
    border-color: transparent;
    color: var(--brand-ink);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    text-align: end;
    padding: 12px 12px;
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.data-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13.5px;
    text-align: end;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-soft); }
.data-table .col-num { font-variant-numeric: tabular-nums; font-weight: 700; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.badge--up    { background: rgba(240, 185, 11,0.12); color: var(--up); }
.badge--down  { background: rgba(236,86,102,0.12); color: var(--down); }
.badge--info  { background: rgba(80,140,255,0.12); color: #5078ff; }
.badge--soon {
    background: rgba(247,201,72,0.16);
    color: #b58509;
    border: 1px solid rgba(247,201,72,0.35);
    font-size: 10.5px;
    padding: 3px 8px;
    margin-inline-start: 6px;
    vertical-align: middle;
}
[data-theme="dark"] .badge--soon { color: #f1c155; background: rgba(247,201,72,0.12); }
.badge--warn  { background: rgba(247,201,72,0.15); color: #d49a14; }
.badge--muted { background: var(--surface-soft); color: var(--text-3); }

.btn--ghost {
    background: transparent;
    color: var(--text-2);
    border: 1.5px solid var(--border);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
}
.btn--ghost:hover { color: var(--brand-ink); border-color: var(--brand); }
.btn--soft {
    background: var(--brand-tint);
    color: var(--brand-ink);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    border: none;
}
.btn--block { width: 100%; justify-content: center; }

.split-2 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
}
.split-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
@media (max-width: 960px) {
    .split-2, .split-3 { grid-template-columns: 1fr; }
}

/* ============ Trade page ============ */
.trade-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 14px;
}
@media (max-width: 1180px) {
    .trade-layout { grid-template-columns: 280px 1fr; }
    .trade-layout .order-form { grid-column: span 2; }
}
@media (max-width: 800px) {
    .trade-layout { grid-template-columns: 1fr; }
    .trade-layout .order-form { grid-column: span 1; }
}
.orderbook {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.orderbook__row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.orderbook__row span:nth-child(1) { text-align: start; font-weight: 700; }
.orderbook__row span:nth-child(2) { text-align: center; color: var(--text-2); }
.orderbook__row span:nth-child(3) { text-align: end; color: var(--text-3); }
.orderbook__row.ask span:nth-child(1) { color: var(--down); }
.orderbook__row.bid span:nth-child(1) { color: var(--up); }
.orderbook__row::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    inset-inline-end: 0;
    width: var(--bar, 0%);
    pointer-events: none;
    opacity: 0.12;
}
.orderbook__row.ask::after { background: var(--down); }
.orderbook__row.bid::after { background: var(--up); }
.orderbook__spread {
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    border-block: 1px solid var(--border-soft);
    margin: 6px 0;
}
.orderbook__head {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 6px 8px;
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 4px;
}
.orderbook__head span:nth-child(1) { text-align: start; }
.orderbook__head span:nth-child(2) { text-align: center; }
.orderbook__head span:nth-child(3) { text-align: end; }

.chart-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chart-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.chart-card__pair {
    display: flex;
    align-items: center;
    gap: 12px;
}
.chart-card__price {
    font-size: 28px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.chart-svg {
    width: 100%;
    height: 320px;
    background: var(--surface-soft);
    border-radius: 16px;
}

.order-form {
    background: var(--surface);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.order-form__tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-soft);
    border-radius: 12px;
    margin-bottom: 16px;
}
.order-form__tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    border-radius: 9px;
    color: var(--text-3);
    font-weight: 700;
    font-size: 13px;
}
.order-form__tab.is-active.buy { background: var(--up); color: var(--on-brand); }
.order-form__tab.is-active.sell { background: var(--down); color: white; }
.field {
    margin-bottom: 12px;
}
.field__label {
    font-size: 11.5px;
    color: var(--text-3);
    margin-bottom: 6px;
    display: block;
}
.field__input {
    display: flex;
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 4px 12px;
}
.field__input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    text-align: end;
    min-width: 0;
}
.field__input .field__suffix {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 700;
}
.percent-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}
.percent-row button {
    background: var(--surface-soft);
    border: none;
    padding: 8px;
    border-radius: 9px;
    color: var(--text-2);
    font-weight: 700;
    font-size: 12px;
}
.percent-row button:hover { background: var(--brand-tint); color: var(--brand-ink); }

/* ============ Wallet page ============ */
.balance-card {
    background: linear-gradient(135deg, #fcd535, #d9a400);
    border-radius: 26px;
    padding: 30px 32px;
    color: var(--on-brand);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-brand);
}
.balance-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,0.18), transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
}
.balance-card__label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    position: relative;
}
.balance-card__amount {
    font-size: 42px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
    line-height: 1.1;
    position: relative;
    letter-spacing: -1px;
}
.balance-card__amount small {
    font-size: 18px;
    font-weight: 700;
    opacity: 0.85;
    margin-inline-start: 8px;
}
.balance-card__sub {
    font-size: 13px;
    opacity: 0.92;
    position: relative;
}
.balance-card__actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    position: relative;
}
.balance-card__btn {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    color: var(--on-brand);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.balance-card__btn svg { width: 16px; height: 16px; }
.balance-card__btn:hover { background: rgba(255,255,255,0.28); }
.balance-card__btn--solid {
    background: white;
    color: #8a6800;
}

.asset-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}
.asset-row:last-child { border-bottom: none; }
.asset-row__info { flex: 1; min-width: 0; }
.asset-row__name { font-weight: 700; font-size: 14px; }
.asset-row__sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.asset-row__amount {
    text-align: end;
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.asset-row__amount small {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    margin-top: 3px;
    font-weight: 500;
}
.asset-row__actions {
    display: flex;
    gap: 6px;
}
.asset-row__actions button {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text-2);
    font-size: 11.5px;
    font-weight: 700;
}
.asset-row__actions button:hover { color: var(--brand-ink); border-color: var(--brand); }

/* ============ Invite page ============ */
.referral-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.referral-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, var(--brand-tint), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(247,201,72,0.12), transparent 50%);
    pointer-events: none;
}
.referral-card > * { position: relative; z-index: 1; }
.referral-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-soft);
    border: 1.5px dashed var(--brand);
    border-radius: 14px;
    padding: 14px 22px;
    font-family: 'Plus Jakarta Sans', Vazirmatn, monospace;
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-ink);
    letter-spacing: 2px;
    margin: 16px 0 14px;
}
.referral-code button {
    background: var(--brand);
    color: var(--on-brand);
    border: none;
    padding: 6px 12px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 12px;
    font-family: Vazirmatn;
    letter-spacing: 0;
}
.share-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.share-btn {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.share-btn:hover { background: var(--brand-tint); color: var(--brand-ink); }
.share-btn svg { width: 20px; height: 20px; }

.step-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 760px) { .step-row { grid-template-columns: 1fr; } }
.step {
    background: var(--surface);
    border-radius: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
}
.step__num {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 900;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.step h5 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
}
.step p {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.9;
}

/* ============ Support page ============ */
.support-tile {
    background: var(--surface);
    border-radius: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.support-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.support-tile__icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.support-tile__icon svg { width: 24px; height: 24px; }
.support-tile h5 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}
.support-tile p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.8;
}
.support-tile--action {
    border: none;
    font: inherit;
    font-family: inherit;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
.contact-channel-btn {
    display: inline-flex;
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 10px 14px;
}

.faq-item {
    border-bottom: 1px solid var(--border-soft);
}
.faq-item:last-child { border-bottom: none; }
.faq-item__q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    gap: 14px;
}
.faq-item__q svg {
    width: 18px; height: 18px;
    color: var(--text-3);
    transition: transform 0.25s;
    flex-shrink: 0;
}
.faq-item.is-open .faq-item__q svg { transform: rotate(180deg); color: var(--brand-ink); }
.faq-item__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 2;
}
.faq-item.is-open .faq-item__a {
    max-height: 1200px;
    padding: 0 4px 18px;
}

/* ============ Settings page ============ */
.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 800px) {
    .settings-layout { grid-template-columns: 1fr; }
}
.settings-nav {
    background: var(--surface);
    border-radius: 22px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 20px;
}
.settings-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 11px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.settings-nav__item:hover { background: var(--surface-soft); color: var(--text); }
.settings-nav__item.is-active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 700;
}
.settings-nav__item svg { width: 17px; height: 17px; }

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-soft);
    gap: 14px;
}
.setting-row:last-child { border-bottom: none; }
.setting-row__info { flex: 1; min-width: 0; }
.setting-row__title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.setting-row__desc {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.7;
}
.toggle {
    width: 46px;
    height: 26px;
    background: var(--surface-soft);
    border-radius: 99px;
    border: 1px solid var(--border-soft);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 20px; height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}
.toggle.is-on { background: var(--brand); border-color: var(--brand); }
.toggle.is-on::after { transform: translateX(-20px); }
[dir="rtl"] .toggle.is-on::after { transform: translateX(20px); }

.avatar-large {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    box-shadow: var(--shadow-brand);
}

/* ============ Sparkline mini chart ============ */
.spark {
    width: 90px;
    height: 30px;
    margin-inline-start: auto;
}

/* ============ Empty state ============ */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
}
.empty__icon {
    width: 64px; height: 64px;
    background: var(--surface-soft);
    border-radius: 20px;
    color: var(--text-3);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty__icon svg { width: 28px; height: 28px; }
.empty h5 { font-size: 15px; color: var(--text-2); margin-bottom: 6px; font-weight: 700; }
.empty p { font-size: 12.5px; line-height: 1.9; }

/* ============ Internal pages responsive ============ */
@media (max-width: 760px) {
    .page-header {
        padding: 22px;
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
    }
    .page-header__visual { width: 70px; height: 70px; border-radius: 18px; }
    .page-header__visual svg { width: 34px; height: 34px; }
    .page-header h2 { font-size: 22px; }
    .card { padding: 18px; }
    .data-table thead th { font-size: 11px; padding: 10px 6px; }
    .data-table tbody td { padding: 12px 6px; font-size: 12.5px; }
}

/* ===================================================== */
/* ============ Public Marketing Pages ================= */
/* ===================================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.feature-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 26px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-tint);
}
.feature-card__icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-tint), var(--brand-faint));
    color: var(--brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-card__icon svg { width: 26px; height: 26px; }
.feature-card h4 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 2;
}
.feature-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-ink);
    font-weight: 700;
    font-size: 13px;
    margin-top: 14px;
}
.feature-card__link svg { width: 14px; height: 14px; }

/* Account / pricing cards */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.account-grid--single {
    grid-template-columns: minmax(0, 440px);
    justify-content: center;
}
.account-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 30px 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.account-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.account-card--featured {
    background: linear-gradient(150deg, var(--surface) 0%, var(--brand-faint) 100%);
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}
.account-card--featured::before {
    content: 'پیشنهادی';
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 800;
    box-shadow: var(--shadow-brand);
}
.account-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-3);
    margin-bottom: 6px;
}
.account-card__title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.account-card__price {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 22px;
}
.account-card__price strong {
    color: var(--brand-ink);
    font-weight: 800;
    font-size: 18px;
}
.account-card__list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    flex: 1;
}
.account-card__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-2);
    padding: 8px 0;
    line-height: 1.9;
}
.account-card__list li::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 4px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300b96d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Platform device showcase */
.platform-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.platform-row--single {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}
.platform-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
}
.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.platform-card__icon {
    width: 90px; height: 90px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--brand-tint), var(--brand-faint));
    color: var(--brand-ink);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.platform-card__icon svg { width: 44px; height: 44px; }
.platform-card h4 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 8px;
}
.platform-card__sub {
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.9;
}
.platform-card__store-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.platform-card__store-row .chip { padding: 7px 12px; font-size: 12px; }

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.blog-card {
    background: var(--surface);
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card__cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--brand-tint), rgba(247,201,72,0.15));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-ink);
}
.blog-card__cover svg { width: 56px; height: 56px; opacity: 0.7; }
.blog-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.blog-card__tag {
    display: inline-flex;
    align-items: center;
    background: var(--brand-tint);
    color: var(--brand-ink);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    width: fit-content;
}
.blog-card h4 {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 10px;
}
.blog-card__excerpt {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.9;
    flex: 1;
    margin-bottom: 14px;
}
.blog-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-3);
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

/* Academy courses */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.course-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-card__level {
    display: inline-flex;
    background: var(--brand-tint);
    color: var(--brand-ink);
    padding: 5px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 14px;
}
.course-card__level--mid { background: rgba(247,201,72,0.15); color: #d49a14; }
.course-card__level--adv { background: rgba(236,86,102,0.12); color: var(--down); }
.course-card h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.55;
}
.course-card p {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.9;
    margin-bottom: 14px;
}
.course-card__meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-2);
    border-top: 1px solid var(--border-soft);
    padding-top: 12px;
}
.course-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.course-card__meta svg { width: 14px; height: 14px; }

/* Legal pages (terms / privacy / security / fees) */
.legal-doc {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}
.legal-doc .card {
    line-height: 2;
    font-size: 14.5px;
    color: var(--text-2);
}
.legal-doc .card p { margin: 0 0 10px; }
.legal-doc .card p:last-child { margin-bottom: 0; }
.legal-doc__effective {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 12px !important;
    font-weight: 600;
}
.legal-doc__h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px;
}
.legal-doc__list {
    list-style: disc;
    padding-inline-start: 22px;
    margin: 6px 0;
}
.legal-doc__list li {
    margin-bottom: 8px;
}
.legal-doc__list li:last-child { margin-bottom: 0; }
.legal-doc .data-table { margin-top: 4px; }
.legal-doc__h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin: 18px 0 10px;
}
.legal-doc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px !important;
}
.legal-doc__actions .btn { text-decoration: none; }
.legal-warning {
    padding: 18px 18px 16px;
    border-radius: 14px;
    background: rgba(246, 70, 93, 0.08);
    border: 1px solid rgba(246, 70, 93, 0.32);
    line-height: 2;
    font-size: 14px;
    color: var(--text-2);
}
.legal-warning__title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ff7a8a;
    margin-bottom: 10px;
}
.legal-warning p { margin: 0 0 10px; }
.legal-warning p:last-child { margin-bottom: 0; }
[data-theme="light"] .legal-warning {
    background: rgba(226, 59, 88, 0.06);
    border-color: rgba(226, 59, 88, 0.22);
}
[data-theme="light"] .legal-warning__title { color: #c81e3a; }

/* Big CTA section */
.big-cta {
    background: linear-gradient(135deg, #fcd535, #d9a400);
    border-radius: 28px;
    padding: 56px 40px;
    color: var(--on-brand);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-brand);
}
.big-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 400px at 15% 30%, rgba(255,255,255,0.18), transparent 70%),
        radial-gradient(circle 400px at 85% 70%, rgba(255,255,255,0.10), transparent 70%);
    pointer-events: none;
}
.big-cta > * { position: relative; }
.big-cta h2 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 14px;
    letter-spacing: -0.8px;
    line-height: 1.2;
}
.big-cta p {
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 28px;
    max-width: 620px;
    margin-inline: auto;
    line-height: 2;
}
.big-cta__actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.big-cta__actions .btn--primary {
    background: white;
    color: #8a6800;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 14px 28px;
    font-size: 14px;
}
.big-cta__actions .btn--outline {
    background: rgba(255,255,255,0.15);
    color: var(--on-brand);
    border-color: rgba(255,255,255,0.3);
    padding: 14px 28px;
    font-size: 14px;
}

/* IB tier table */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.tier {
    background: var(--surface);
    border-radius: 22px;
    padding: 26px 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.tier__badge {
    width: 64px; height: 64px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--brand-tint), var(--brand-faint));
    color: var(--brand-ink);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
}
.tier--gold .tier__badge { background: linear-gradient(135deg, rgba(247,201,72,0.25), rgba(247,201,72,0.1)); color: #d49a14; }
.tier--silver .tier__badge { background: linear-gradient(135deg, rgba(160,170,180,0.25), rgba(160,170,180,0.1)); color: #6b7480; }
.tier--bronze .tier__badge { background: linear-gradient(135deg, rgba(205,127,50,0.25), rgba(205,127,50,0.1)); color: #b07028; }
.tier h4 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 8px;
}
.tier__commission {
    font-size: 30px;
    font-weight: 900;
    color: var(--brand-ink);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}
.tier__commission small { font-size: 14px; font-weight: 700; color: var(--text-3); }
.tier__req {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.9;
}

/* Team / about */
.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .team-grid { grid-template-columns: 1fr; } }

.team-card {
    position: relative;
    background: var(--surface);
    border-radius: 20px;
    padding: 26px 22px 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.team-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
    opacity: 0;
    transition: opacity .25s ease;
}
.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card, var(--shadow-md));
    border-color: rgba(240, 185, 11,0.35);
}
.team-card:hover::before { opacity: 1; }

.team-card__icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease;
}
.team-card:hover .team-card__icon { transform: scale(1.06) rotate(-2deg); }
.team-card__icon svg { width: 26px; height: 26px; }

.team-card h5 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}
.team-card__role {
    font-size: 12px;
    color: var(--brand-ink);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}
.team-card p {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.85;
    margin: 0;
}

/* keep old avatar style if used elsewhere */
.team-card__avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    color: var(--on-brand);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: var(--shadow-brand);
}

/* Contact form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s;
}
.contact-info-item:hover { transform: translateY(-2px); border-color: var(--brand-tint); }
.contact-info-item__icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-item__icon svg { width: 22px; height: 22px; }
.contact-info-item__label {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 3px;
}
.contact-info-item__value {
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
a.support-phone {
    font-family: Vazirmatn, system-ui, sans-serif;
    font-weight: 800;
    color: inherit;
    text-decoration: none;
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}
a.support-phone:hover { color: var(--brand); }

.support-widget-embed {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    min-height: 720px;
}
.support-widget-embed iframe {
    width: 100%;
    height: 720px;
    border: 0;
    display: block;
    background: #fff8df;
}
.contact-ticket-msg {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 600;
}
.contact-ticket-msg--error {
    background: rgba(226, 59, 88, 0.12);
    color: var(--down, #e23b58);
}
.contact-ticket-msg--success {
    background: rgba(15, 174, 106, 0.12);
    color: var(--up, #0fae6a);
}
.contact-ticket-success {
    padding: 8px 0 4px;
    text-align: center;
}
.contact-ticket-success p {
    color: var(--text-2);
    line-height: 1.9;
    margin-bottom: 10px;
}
.contact-ticket-success__num {
    font-size: 15px;
    margin-bottom: 16px !important;
}
.contact-ticket-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.contact-ticket-welcome {
    padding: 4px 0 8px;
}
.contact-ticket-welcome__card {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface-soft);
    padding: 18px 16px;
    margin-bottom: 16px;
    text-align: right;
}
.contact-ticket-welcome__greet {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.contact-ticket-welcome__text {
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--text-2);
}
.contact-ticket-welcome__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-ticket-welcome__actions .btn--block {
    width: 100%;
    justify-content: center;
}
@media (max-width: 760px) {
    .support-widget-embed,
    .support-widget-embed iframe {
        min-height: 640px;
        height: 640px;
    }
}

.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 12.5px;
    color: var(--text-2);
    font-weight: 600;
    margin-bottom: 8px;
}
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field textarea { min-height: 140px; resize: vertical; line-height: 1.9; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

/* Section title (centered) */
.section-title {
    text-align: center;
    margin-bottom: 14px;
}
.section-title__eyebrow {
    display: inline-flex;
    background: var(--brand-tint);
    color: var(--brand-ink);
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 800;
    margin-bottom: 12px;
}
.section-title h3 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.6px;
    margin-bottom: 12px;
}
.section-title p {
    font-size: 14.5px;
    color: var(--text-3);
    line-height: 2;
    max-width: 620px;
    margin-inline: auto;
}
@media (max-width: 760px) {
    .section-title h3 { font-size: 22px; }
    .big-cta { padding: 36px 22px; }
    .big-cta h2 { font-size: 24px; }
}

/* Footer */
.footer {
    background: var(--surface);
    border-radius: 24px;
    padding: 36px 32px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-top: 8px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border-soft);
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.footer__brand h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}
.footer__brand p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 2;
    margin-bottom: 16px;
}
.footer__col h5 {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text);
}
.footer__col a {
    display: block;
    color: var(--text-3);
    font-size: 13px;
    padding: 6px 0;
    transition: color 0.2s;
}
.footer__col a:hover { color: var(--brand-ink); }
.footer__bottom {
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-3);
    font-size: 12px;
}
.footer__social {
    display: flex;
    gap: 8px;
}
.footer__social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.footer__social a:hover { background: var(--brand-tint); color: var(--brand-ink); }
.footer__social svg { width: 16px; height: 16px; }

/* Footer sanctions disclaimer */
.footer-disclaimer {
    margin: 22px 0 4px;
    padding: 18px 18px 16px;
    border-radius: 14px;
    background: rgba(246, 70, 93, 0.07);
    border: 1px solid rgba(246, 70, 93, 0.28);
}
.footer-disclaimer__title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #ff7a8a;
    margin-bottom: 10px;
}
.footer-disclaimer__text {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.95;
    color: var(--text-2);
}
.footer-disclaimer__list {
    margin: 0 0 12px;
    padding-inline-start: 18px;
    display: grid;
    gap: 8px;
}
.footer-disclaimer__list li {
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-2);
}
.footer-disclaimer__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.9;
    color: var(--text-3);
}
.footer-disclaimer__note a {
    color: var(--brand-ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-disclaimer__note a:hover { color: var(--brand-2); }
[data-theme="light"] .footer-disclaimer {
    background: rgba(226, 59, 88, 0.06);
    border-color: rgba(226, 59, 88, 0.22);
}
[data-theme="light"] .footer-disclaimer__title { color: #c81e3a; }


/* =====================================================
   LIVE CHAT WIDGET
   ===================================================== */
.chat-fab {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, #fcd535 100%);
    color: var(--on-brand);
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(240, 185, 11, 0.45), 0 4px 12px rgba(12, 18, 48, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: transform 0.25s cubic-bezier(.2,.9,.3,1.4), box-shadow 0.25s;
    animation: chatFabIn 0.5s cubic-bezier(.2,.9,.3,1.4) both;
}
@keyframes chatFabIn {
    from { transform: scale(0) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);    opacity: 1; }
}
.chat-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 18px 40px rgba(240, 185, 11, 0.55), 0 6px 16px rgba(12, 18, 48, 0.22);
}
.chat-fab svg { width: 26px; height: 26px; }
.chat-fab__icon--close { display: none; }
.chat-fab.is-open .chat-fab__icon--open { display: none; }
.chat-fab.is-open .chat-fab__icon--close { display: block; }
.chat-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(240, 185, 11, 0.55);
    z-index: -1;
    animation: chatPulse 2.4s ease-out infinite;
}
@keyframes chatPulse {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.7);  opacity: 0; }
}
.chat-fab__badge {
    position: absolute;
    top: -2px;
    inset-inline-end: -2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.45);
}
.chat-fab.is-open .chat-fab__badge,
.chat-fab.is-open .chat-fab__pulse { display: none; }

/* ---- Chat panel ---- */
.chat-panel {
    position: fixed;
    bottom: 96px;
    inset-inline-end: 24px;
    width: 380px;
    height: min(620px, calc(100vh - 140px));
    background: var(--surface);
    border-radius: 22px;
    box-shadow: 0 24px 72px rgba(12, 18, 48, 0.28), 0 4px 16px rgba(12, 18, 48, 0.12);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(.2,.9,.3,1.2);
}
[dir="rtl"] .chat-panel { transform-origin: bottom left; }
.chat-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ---- Chat header ---- */
.chat-header {
    background: linear-gradient(135deg, #f0b90b 0%, #fcd535 100%);
    color: var(--on-brand);
    padding: 18px 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.chat-header__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--on-brand);
    position: relative;
    flex-shrink: 0;
}
.chat-header__avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    inset-inline-end: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}
.chat-header__info { flex: 1; min-width: 0; }
.chat-header__name { font-size: 15px; font-weight: 800; margin: 0; }
.chat-header__sub {
    font-size: 11.5px;
    opacity: 0.9;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-header__sub::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: chatBlink 1.6s ease-in-out infinite;
}
@keyframes chatBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
.chat-header__actions { display: flex; gap: 6px; }
.chat-header__btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--on-brand);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
}
.chat-header__btn:hover { background: rgba(255, 255, 255, 0.28); }
.chat-header__btn svg { width: 16px; height: 16px; }

/* ---- Body / Messages ---- */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 12px;
    background: var(--bg);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }

.chat-msg {
    display: flex;
    gap: 8px;
    max-width: 88%;
    animation: chatMsgIn 0.32s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes chatMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, #fcd535 100%);
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.chat-msg__bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.75;
    word-wrap: break-word;
    position: relative;
}
.chat-msg--bot .chat-msg__bubble {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
}
[dir="rtl"] .chat-msg--bot .chat-msg__bubble {
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}
.chat-msg--user .chat-msg__bubble {
    background: linear-gradient(135deg, var(--brand) 0%, #fcd535 100%);
    color: var(--on-brand);
    border-top-right-radius: 4px;
}
[dir="rtl"] .chat-msg--user .chat-msg__bubble {
    border-top-right-radius: 16px;
    border-top-left-radius: 4px;
}
.chat-msg__meta {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 4px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.chat-msg--user .chat-msg__meta { justify-content: flex-end; }
.chat-msg__check { color: var(--brand-ink); }
.chat-msg__wrap { display: flex; flex-direction: column; min-width: 0; }

/* Day separator */
.chat-day {
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    margin: 12px 0 4px;
    position: relative;
}
.chat-day span {
    background: var(--bg);
    padding: 0 12px;
    position: relative;
    z-index: 1;
}
.chat-day::before {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 1px;
    background: var(--border);
}

/* Typing indicator */
.chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 8px;
    align-items: center;
}
.chat-typing__bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    border-top-left-radius: 4px;
    padding: 12px 14px;
    display: flex;
    gap: 4px;
}
[dir="rtl"] .chat-typing__bubble {
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}
.chat-typing__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
    animation: chatTypeDot 1.2s ease-in-out infinite;
}
.chat-typing__dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes chatTypeDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 4px 0;
    align-self: flex-start;
    max-width: 100%;
}
.chat-quick__btn {
    background: var(--surface);
    border: 1px solid var(--brand);
    color: var(--brand-ink);
    padding: 7px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, color 0.18s, transform 0.18s;
}
.chat-quick__btn:hover {
    background: var(--brand);
    color: var(--on-brand);
    transform: translateY(-1px);
}

/* Footer input */
.chat-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 10px 12px;
}
.chat-input {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 6px;
    transition: border-color 0.2s;
}
.chat-input:focus-within { border-color: var(--brand); }
.chat-input textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 6px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    resize: none;
    max-height: 100px;
    min-height: 22px;
    line-height: 1.5;
    width: 100%;
}
.chat-input textarea::placeholder { color: var(--text-3); }
.chat-input__icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}
.chat-input__icon-btn:hover { background: var(--surface-soft); color: var(--brand-ink); }
.chat-input__icon-btn svg { width: 18px; height: 18px; }
.chat-input__send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, #fcd535 100%);
    color: var(--on-brand);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s, opacity 0.18s;
    flex-shrink: 0;
}
.chat-input__send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-input__send:not(:disabled):hover { transform: scale(1.08); }
.chat-input__send svg { width: 16px; height: 16px; }
[dir="rtl"] .chat-input__send svg { transform: scaleX(-1); }

.chat-foot-note {
    text-align: center;
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 6px;
}
.chat-foot-note strong { color: var(--brand-ink); font-weight: 700; }

/* Emoji picker */
.chat-emoji-picker {
    position: absolute;
    bottom: 60px;
    inset-inline-start: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(12,18,48,0.18);
    padding: 8px;
    display: none;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    max-width: 260px;
    z-index: 10;
}
.chat-emoji-picker.is-open { display: grid; }
.chat-emoji-picker button {
    background: transparent;
    border: none;
    font-size: 18px;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.chat-emoji-picker button:hover { background: var(--surface-soft); }

/* Mobile responsive */
@media (max-width: 540px) {
    .chat-panel {
        bottom: 0;
        inset-inline-end: 0;
        inset-inline-start: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .chat-fab { bottom: 18px; inset-inline-end: 18px; width: 56px; height: 56px; }
}


/* =====================================================
   ONE-PAGE BEHAVIOR
   ===================================================== */
html { scroll-behavior: smooth; }

/* Add top offset so anchor scroll doesn't hide behind sticky navbar */
section[id], div[id] {
    scroll-margin-top: 100px;
}

/* Onepage sections inherit page padding from .app--page */
.app--page + .app--page { margin-top: 0; }


/* Footer ownership row */
.footer__owner {
    text-align: center;
    padding: 18px 0 4px;
    margin-top: 18px;
    border-top: 1px solid var(--border-soft);
    font-size: 12.5px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.footer__owner a {
    color: var(--brand-ink);
    text-decoration: none;
    font-weight: 800;
    transition: color 0.18s;
}
.footer__owner a:hover { color: var(--brand-dark); }

/* ========== Support ticket modal ========== */
.ticket-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ticket-modal.is-open { display: flex; }
.ticket-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: ticketFade 0.2s ease;
}
.ticket-modal__card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: 28px 26px;
    animation: ticketPop 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes ticketFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ticketPop {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ticket-modal__close {
    position: absolute;
    top: 16px;
    inset-inline-start: 18px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-soft);
    color: var(--text-2);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.ticket-modal__close:hover { background: var(--brand-tint); color: var(--brand-ink); }
.ticket-modal__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}
.ticket-modal__sub {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 20px;
}
.ticket-field { margin-bottom: 14px; }
.ticket-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.ticket-field input,
.ticket-field textarea {
    width: 100%;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.ticket-field textarea { resize: vertical; min-height: 96px; line-height: 1.8; }
.ticket-field input::placeholder,
.ticket-field textarea::placeholder { color: var(--text-4); }
.ticket-field input:focus,
.ticket-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.ticket-modal__msg {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.8;
    border-radius: 12px;
    padding: 11px 14px;
    margin-bottom: 14px;
}
.ticket-modal__msg--success {
    background: rgba(15, 174, 106, 0.12);
    color: #0fae6a;
    border: 1px solid rgba(15, 174, 106, 0.25);
}
.ticket-modal__msg--error {
    background: rgba(226, 59, 88, 0.1);
    color: var(--down);
    border: 1px solid rgba(226, 59, 88, 0.25);
}
.ticket-submit { margin-top: 4px; }

/* ===================================================== */
/* ===========  PREMIUM DARK · GLASS LAYER  ============ */
/* ===== allinvex-inspired finish over naghdex gold ==== */
/* ===================================================== */

:root { --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace; }

/* ---- Background: deep dark, warm gold ambience, soft grain ---- */
html, body { background: var(--bg); }
body {
    background:
        radial-gradient(1200px 700px at 8% -12%, rgba(240,185,11,0.05), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
}
body::after { mix-blend-mode: overlay; opacity: var(--bg-noise-opacity); }

/* smooth, premium interaction defaults */
.card, .feature-card, .account-card, .blog-card, .course-card, .platform-card,
.tier, .step, .support-tile, .btn, .topnav__item, .menu__item, .card-link,
.markets__tab, .cell-star, .faq-item { transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, border-color .28s ease, background .28s ease, color .2s ease; }

/* ---- Glass surfaces (applied across all card-like blocks) ---- */
.card, .market-overview, .menu, .brand-card, .feature-card, .account-card,
.blog-card, .course-card, .platform-card, .referral-card, .tier, .step,
.support-tile, .chart-card, .order-form, .orderbook, .kpi, .markets,
.stats-bar, .transactions, .promo-shield, .page-header, .settings-nav,
.contact-form, .contact-info, .ib-tier-table, .team-card, .testimonial-card {
    background: var(--glass) !important;
    border: 1px solid var(--glass-border) !important;
    -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
    backdrop-filter: blur(var(--blur)) saturate(150%);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* hover lift + gold edge for interactive cards */
.feature-card:hover, .account-card:hover, .blog-card:hover, .course-card:hover,
.platform-card:hover, .tier:hover, .step:hover, .support-tile:hover,
.team-card:hover, .testimonial-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover) !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(240,185,11,0.12), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

/* ---- Sticky glass navbar ---- */
.topnav {
    position: sticky;
    top: 10px;
    z-index: 60;
    background: rgba(15, 17, 23, 0.62) !important;
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 40px -12px rgba(0,0,0,0.6);
}
[data-theme="light"] .topnav { background: rgba(255,255,255,0.7) !important; }
.topnav__item.is-active { background: var(--brand-tint); color: var(--brand-light); }
.topnav__item:hover { background: var(--glass-strong); color: var(--text); }

/* ---- Buttons: gold gradient + glow, glass outlines ---- */
.btn--primary, .btn--hero, .big-cta__actions .btn--primary, .hero__signup-btn {
    background: var(--brand-grad) !important;
    color: var(--on-brand) !important;
    border: none !important;
    box-shadow: 0 8px 24px -6px rgba(240,185,11,0.5), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn--primary:hover, .btn--hero:hover, .hero__signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px -6px rgba(240,185,11,0.65), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn--outline, .btn--ghost, .btn--soft, .big-cta__actions .btn--outline {
    background: var(--glass) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text) !important;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn--outline:hover, .btn--ghost:hover, .btn--soft:hover {
    border-color: var(--brand) !important;
    color: var(--brand-light) !important;
    background: var(--brand-tint) !important;
}

/* ---- Section title: pill eyebrow ---- */
.section-title__eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--brand-tint);
    border: 1px solid rgba(240,185,11,0.22);
    color: var(--brand-light) !important;
    font-weight: 700;
    letter-spacing: .2px;
}

/* ---- Inputs: dark glass ---- */
.form-field input, .form-field textarea, .form-field select {
    background: var(--surface-soft) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px var(--brand-tint);
}

/* ---- Footer ---- */
.footer {
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid var(--border) !important;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ---- Tabular monospace numbers (prices, stats) ---- */
.cell-price, .cell-volume, .cell-change, .stat__value, .kpi__value,
.contact-info-item__value, .price, .market-overview__value, .tier__rate {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
}
.cell-change.up, .up { color: var(--up); }
.cell-change.down, .down { color: var(--down); }

/* ---- Hero: premium gold wordmark + lift ---- */
.hero { overflow: visible; }
.hero__content h2 {
    background: linear-gradient(135deg, #ffe79a 0%, #f0b90b 60%, #d9a400 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    letter-spacing: -1px;
}
.hero__art { filter: drop-shadow(0 30px 60px rgba(240,185,11,0.25)); will-change: transform; }

/* ---- Live pulse dot ---- */
@keyframes pulse-live {
    0%   { box-shadow: 0 0 0 0 rgba(46,189,133,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(46,189,133,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,189,133,0); }
}
.live-dot, .badge--live::before, .status-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--up); animation: pulse-live 1.8s ease-in-out infinite;
}

/* ---- Scroll reveal (toggled by JS) ---- */
@keyframes reveal-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; }
.reveal.in-view { animation: reveal-up .7s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.in-view { opacity: 1; animation: none; }
    * { scroll-behavior: auto; }
    .hero-warning,
    .hero-warning__pulse,
    .hero-warning__title { animation: none; }
}

/* ---- Refined scrollbar + selection ---- */
::selection { background: rgba(240,185,11,0.28); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ---- Market tools / widgets ---- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.tool-card { display: flex; flex-direction: column; gap: 14px; }
.tool-card[hidden] { display: none !important; }
.tool-card__head { display: flex; align-items: center; gap: 10px; }
.tool-card__head h4 { font-size: 15px; font-weight: 800; }
.tool-card__icon {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--brand-tint); color: var(--brand-light);
    border: 1px solid rgba(240,185,11,0.22);
}
.tool-card__icon svg { width: 20px; height: 20px; }
.tool-field { display: flex; flex-direction: column; gap: 7px; }
.tool-field > span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.tool-field input, .tool-field select {
    width: 100%; background: var(--surface-soft);
    border: 1px solid var(--glass-border); border-radius: 11px;
    padding: 12px 13px; font-family: inherit; font-size: 14px; color: var(--text);
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.tool-field input { font-family: var(--font-mono); }
.tool-field input:focus, .tool-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.tool-field select option { background: var(--surface); color: var(--text); }

.calc-out { margin-top: 2px; display: flex; flex-direction: column; gap: 2px; }
.calc-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-soft);
    font-size: 13px; color: var(--text-2);
}
.calc-row b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }
.calc-row--total { border-bottom: none; margin-top: 4px; padding-top: 12px; }
.calc-row--total span { color: var(--text); font-weight: 700; }
.calc-row--total b { color: var(--brand-light); font-size: 15px; }

/* Fear & Greed */
.fng { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0; }
.fng__dial {
    position: relative;
    width: 132px; height: 132px; border-radius: 50%;
    background: conic-gradient(var(--brand) 50%, rgba(255,255,255,0.08) 50% 100%);
    display: grid; place-items: center; transition: background .6s ease;
}
.fng__dial::after {
    content: ''; position: absolute; width: 104px; height: 104px;
    border-radius: 50%; background: var(--surface);
}
.fng__value { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 34px; font-weight: 800; }
.fng__label { font-size: 15px; font-weight: 700; color: var(--text); }
.fng__scale { display: flex; justify-content: space-between; width: 100%; font-size: 11px; color: var(--text-3); }

/* Trending */
.trend-list { display: flex; flex-direction: column; gap: 4px; }
.trend-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; transition: background .2s; }
.trend-item:hover { background: var(--glass-strong); }
.trend-item__rank { width: 20px; color: var(--text-3); font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.trend-item__img { width: 24px; height: 24px; border-radius: 50%; }
.trend-item__name { flex: 1; font-size: 13.5px; font-weight: 600; }
.trend-item__sym { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.trend-list__loading, .live-grid__loading { color: var(--text-3); font-size: 13px; padding: 12px 4px; }

/* Live prices grid */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.live-coin {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--border-soft);
    transition: transform .25s, border-color .25s;
}
.live-coin:hover { transform: translateY(-3px); border-color: var(--glass-border-hover); }
.live-coin__img { width: 30px; height: 30px; border-radius: 50%; }
.live-coin__id { flex: 1; min-width: 0; }
.live-coin__sym { font-weight: 800; font-size: 13.5px; }
.live-coin__name { font-size: 11px; color: var(--text-3); }
.live-coin__price { font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; text-align: start; }
.live-coin__chg { font-family: var(--font-mono); font-size: 12px; text-align: start; }
.live-coin__chg.up { color: var(--up); }
.live-coin__chg.down { color: var(--down); }

@media (max-width: 860px) {
    .tools-grid { grid-template-columns: 1fr; }
}

/* ---- Custom themed dropdown (matches dark UI) ---- */
.cselect { position: relative; }
.cselect__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cselect__btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--surface-soft); border: 1px solid var(--glass-border); border-radius: 11px;
    padding: 12px 13px; font-family: inherit; font-size: 14px; color: var(--text);
    cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.cselect__btn:hover { border-color: var(--glass-border-hover); }
.cselect.open .cselect__btn { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.cselect__btn svg { width: 16px; height: 16px; color: var(--text-3); transition: transform .25s ease; flex-shrink: 0; }
.cselect.open .cselect__btn svg { transform: rotate(180deg); }
.cselect__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__menu {
    position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 90;
    background: rgba(20, 22, 29, 0.92); border: 1px solid var(--glass-border);
    border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
    max-height: 280px; overflow: auto;
    -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
    opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.cselect.open .cselect__menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.cselect__opt {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px;
    font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s;
}
.cselect__opt:hover { background: var(--glass-strong); color: var(--text); }
.cselect__opt.is-selected { background: var(--brand-tint); color: var(--brand-light); font-weight: 700; }

/* ---- Pro navbar: dropdowns + coming-soon badges ---- */
.topnav__menu { overflow: visible; }
.topnav__group { position: relative; display: flex; align-items: center; }
.topnav__group > .topnav__item { gap: 5px; }
.topnav__caret { width: 13px !important; height: 13px !important; opacity: .55; transition: transform .25s ease; }
.topnav__group:hover .topnav__caret { transform: rotate(180deg); }
.topnav__dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 210px; z-index: 80;
    background: rgba(20, 22, 29, 0.96); border: 1px solid var(--glass-border); border-radius: 14px;
    box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}
.topnav__dropdown::before { content: ''; position: absolute; top: -8px; inset-inline: 0; height: 8px; }
.topnav__group:hover .topnav__dropdown,
.topnav__group:focus-within .topnav__dropdown,
.topnav__group.open .topnav__dropdown { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.topnav__group__btn { cursor: pointer; }
.topnav__dropdown a {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px;
    font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
    transition: background .15s, color .15s;
}
.topnav__dropdown a:hover { background: var(--glass-strong); color: var(--text); }
.topnav__dropdown a svg { width: 16px; height: 16px; flex-shrink: 0; }
.topnav__item--soon { cursor: default; color: var(--text-3); }
.topnav__item--soon:hover { background: transparent; color: var(--text-3); }
.topnav__soon {
    font-size: 9px; font-weight: 800; font-style: normal; line-height: 1;
    padding: 3px 6px; border-radius: 999px; background: var(--brand-tint);
    color: var(--brand-light); margin-inline-start: 5px; white-space: nowrap;
}

