/* ========== Theme tokens ========== */
:root {
    --bg:           #f7f6f3;
    --surface:      #ffffff;
    --surface-soft: #f6f5f1;
    --surface-2:    #faf9f6;
    --border:       #eae7e0;
    --border-soft:  #f1efe9;
    --text:         #16130d;
    --text-2:       #56514a;
    --text-3:       #847f74;
    --text-4:       #aaa499;
    --brand:        #f0b90b;
    --brand-dark:   #d9a400;
    --brand-light:  #fcd535;
    --brand-tint:   #fdf3d0;
    --brand-faint:  #fefaef;
    --brand-ink:    #8a6800;
    --on-brand:     #1a1a1a;
    --up:           #9a7400;
    --down:         #ec5666;
    --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;
}

[data-theme="dark"] {
    --bg:           #181a20;
    --surface:      #1e2026;
    --surface-soft: #161a1f;
    --surface-2:    #2b3139;
    --border:       #2b3139;
    --border-soft:  #23272e;
    --text:         #eaecef;
    --text-2:       #848e9c;
    --text-3:       #5e6673;
    --text-4:       #474d57;
    --brand:        #fcd535;
    --brand-dark:   #f0b90b;
    --brand-light:  #ffe15c;
    --brand-tint:   rgba(252, 213, 53, 0.13);
    --brand-faint:  rgba(252, 213, 53, 0.06);
    --brand-ink:    #fcd535;
    --on-brand:     #1a1a1a;
    --up:           #fcd535;
    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:    0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-brand: 0 10px 30px rgba(252, 213, 53, 0.25);
    --bg-glow-1:    rgba(252, 213, 53, 0.08);
    --bg-glow-2:    rgba(240, 185, 11, 0.05);
    --bg-noise-opacity: 0.4;
}

* { 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;
}
: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__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; }
}

/* ===================================================== */
/* ============== 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;
}

.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: 300px;
    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; }

/* 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;
}

.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; }


/* =====================================================
   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; }
