:root {
    --db-bg: #050b14;
    --db-surface: rgba(10, 22, 40, 0.7);
    --db-surface-soft: rgba(255, 255, 255, 0.03);
    --db-border: rgba(99, 179, 237, 0.1);
    --db-border-bright: rgba(99, 179, 237, 0.22);
    --db-blur: 20px;

    --db-accent: #4fa3e8;
    --db-violet: #8b5cf6;
    --db-cyan: #22d3ee;
    --db-gradient: linear-gradient(135deg, #4fa3e8, #8b5cf6);
    --db-gradient-warm: linear-gradient(135deg, #f97316, #ef4444);

    --db-bull: #22c55e;
    --db-bear: #ef4444;

    --db-text: #e8f0fe;
    --db-muted: #6b7fa3;
    --db-label: #94a3b8;

    --db-radius: 16px;
    --db-radius-sm: 10px;

    --ticker-h: 36px;
    --header-h: 60px;
    --bnav-h: 70px;

    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset & base ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    overflow-x: hidden;
}

.main-body {
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    background: var(--db-bg);
    color: var(--db-text);
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ── Background ──────────────────────────────────────────── */
.bg-orbs {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: drift 12s ease-in-out infinite alternate;
}
.orb-1 {
    width: 60vw;
    height: 60vw;
    max-width: 340px;
    max-height: 340px;
    background: #4fa3e8;
    top: -80px;
    left: -60px;
}
.orb-2 {
    width: 50vw;
    height: 50vw;
    max-width: 280px;
    max-height: 280px;
    background: #8b5cf6;
    bottom: -60px;
    right: -60px;
    animation-delay: -4s;
}
.orb-3 {
    width: 40vw;
    height: 40vw;
    max-width: 220px;
    max-height: 220px;
    background: #22d3ee;
    top: 40%;
    left: 40%;
    opacity: 0.06;
    animation-delay: -8s;
}
@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(15px, 10px) scale(1.05);
    }
}

.bg-grid {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(79, 163, 232, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 163, 232, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ── Wrapper ────────────────────────────────────────────── */
.dash-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
}

/* ── Notification ticker ────────────────────────────────── */
.notif-ticker {
    height: var(--ticker-h);
    background: rgba(79, 163, 232, 0.06);
    border-bottom: 1px solid var(--db-border);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.ticker-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: tickerScroll 28s linear infinite;
    will-change: transform;
    height: 100%;
    align-items: center;
}

.notif-ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    font-size: 11px;
    color: var(--db-label);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.ticker-item svg {
    color: var(--db-accent);
    flex-shrink: 0;
}

/* ── Header ─────────────────────────────────────────────── */
.dash-header {
    height: var(--header-h);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--db-border);
    background: rgba(5, 11, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-avatar-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50px;
    transition: background 0.2s;
}
.header-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--db-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo-mark {
    width: 22px;
    height: 22px;
}

.header-brand-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: var(--db-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-notif-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--db-border);
    background: var(--db-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--db-label);
    transition:
        border-color 0.2s,
        color 0.2s;
    text-decoration: none;
}
.header-notif-btn:hover {
    border-color: var(--db-accent);
    color: var(--db-accent);
}

.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--db-bear);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--db-bg);
}

/* ── Rank badges ─────────────────────────────────────────── */
.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(
        135deg,
        rgba(79, 163, 232, 0.15),
        rgba(139, 92, 246, 0.15)
    );
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
}
.rank-xs {
    font-size: 9px;
    padding: 2px 7px;
}
.rank-sm {
    font-size: 11px;
    padding: 3px 9px;
}
.rank-lg {
    font-size: 12px;
    padding: 5px 12px;
}

/* ── Scroll container ────────────────────────────────────── */
.dash-scroll {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 14px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.dash-scroll::-webkit-scrollbar {
    display: none;
}

/* ── Balance card ────────────────────────────────────────── */
@keyframes bc-spin { to { --bc-angle: 360deg; } }
@property --bc-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.balance-card {
    background: var(--db-surface);
    border-radius: var(--db-radius);
    backdrop-filter: blur(var(--db-blur));
    padding: 22px 20px 18px;
    margin-bottom: 14px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(79, 163, 232, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    /* spinning border via conic-gradient background */
    background:
        linear-gradient(var(--db-surface), var(--db-surface)) padding-box,
        conic-gradient(
            from var(--bc-angle),
            transparent 0%,
            transparent 30%,
            rgba(79, 163, 232, 0.9) 45%,
            rgba(139, 92, 246, 0.9) 55%,
            transparent 70%,
            transparent 100%
        ) border-box;
    border: 1.5px solid transparent;
    animation: bc-spin 4s linear infinite;
}

/* top highlight line kept as ::before */
.balance-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,.045) 0%,
        transparent 40%
    );
    z-index: 0;
}

/* lift content above pseudo-elements */
.balance-card > * { position: relative; z-index: 1; }

.balance-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.balance-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.balance-amount {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--db-text);
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.balance-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}
.balance-change.positive {
    color: var(--db-bull);
}
.balance-change.negative {
    color: var(--db-bear);
}
.balance-pct {
    font-size: 11px;
    opacity: 0.8;
}
.balance-period {
    font-size: 11px;
    color: var(--db-muted);
    margin-left: 2px;
}

.balance-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.balance-eye-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--db-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--db-muted);
    transition:
        color 0.2s,
        border-color 0.2s;
}
.balance-eye-btn:hover {
    color: var(--db-accent);
    border-color: var(--db-accent);
}

/* Sub-balances */
.sub-balances {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--db-border);
}

.sub-balance-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sub-icon-blue {
    background: rgba(79, 163, 232, 0.12);
    color: var(--db-accent);
}
.sub-icon-violet {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}
.sub-icon-green {
    background: rgba(34, 197, 94, 0.12);
    color: var(--db-bull);
}

.sub-balance-item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sub-label {
    font-size: 10px;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sub-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--db-text);
    font-variant-numeric: tabular-nums;
}

/* ── Quick actions ───────────────────────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--db-radius-sm);
    background: var(--db-surface);
    border: 1px solid var(--db-border);
    text-decoration: none;
    transition:
        transform 0.15s,
        border-color 0.2s,
        background 0.2s;
    backdrop-filter: blur(12px);
}
.action-btn:hover {
    transform: translateY(-2px);
}

.action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--db-label);
}

.action-deposit .action-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--db-bull);
}
.action-withdraw .action-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--db-bear);
}
.action-trade .action-icon {
    background: rgba(79, 163, 232, 0.12);
    color: var(--db-accent);
}
.action-history .action-icon {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

.action-deposit:hover {
    border-color: rgba(34, 197, 94, 0.3);
}
.action-withdraw:hover {
    border-color: rgba(239, 68, 68, 0.3);
}
.action-trade:hover {
    border-color: rgba(79, 163, 232, 0.3);
}
.action-history:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

/* ── Section cards ───────────────────────────────────────── */
.section-card {
    background: var(--db-surface);
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    backdrop-filter: blur(12px);
    padding: 18px 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--db-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-count {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(79, 163, 232, 0.12);
    color: var(--db-accent);
}

.section-link {
    font-size: 12px;
    color: var(--db-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.section-link:hover {
    opacity: 0.7;
}

/* live dot */
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--db-bull);
    display: inline-block;
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
    }
}

/* ── Active trades ───────────────────────────────────────── */
.active-trades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.active-trade-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius-sm);
}

.trade-pair-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(79, 163, 232, 0.1);
    color: var(--db-accent);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.trade-meta {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-dir {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}
.dir-buy {
    background: rgba(34, 197, 94, 0.1);
    color: var(--db-bull);
}
.dir-sell {
    background: rgba(239, 68, 68, 0.1);
    color: var(--db-bear);
}

.trade-amount {
    font-size: 12px;
    color: var(--db-label);
    font-variant-numeric: tabular-nums;
}

/* ── Transaction list ────────────────────────────────────── */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.tx-row:last-child {
    border-bottom: none;
}

.tx-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tx-icon-deposit {
    background: rgba(34, 197, 94, 0.1);
    color: var(--db-bull);
}
.tx-icon-withdrawal {
    background: rgba(239, 68, 68, 0.1);
    color: var(--db-bear);
}
.tx-icon-trades {
    background: rgba(79, 163, 232, 0.1);
    color: var(--db-accent);
}
.tx-icon-bonus {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.tx-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tx-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--db-text);
}
.tx-date {
    font-size: 11px;
    color: var(--db-muted);
}

.tx-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.tx-amount {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--db-text);
}
.tx-pos {
    color: var(--db-bull);
}
.tx-neg {
    color: var(--db-bear);
}

.tx-status-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: capitalize;
}
.status-pending {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}
.status-completed,
.status-finished {
    background: rgba(34, 197, 94, 0.1);
    color: var(--db-bull);
}
.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--db-bear);
}
.status-active {
    background: rgba(79, 163, 232, 0.1);
    color: var(--db-accent);
}
.status-live {
    background: rgba(34, 197, 94, 0.15);
    color: var(--db-bull);
}
.status-won {
    background: rgba(34, 197, 94, 0.1);
    color: var(--db-bull);
}
.status-lost {
    background: rgba(239, 68, 68, 0.1);
    color: var(--db-bear);
}

.trade-status-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 0;
    color: var(--db-muted);
}
.empty-state p {
    font-size: 13px;
}

/* ── Referral card ───────────────────────────────────────── */
.referral-card {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.8),
        rgba(20, 14, 40, 0.8)
    );
}

.referral-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.referral-sub {
    font-size: 12px;
    color: var(--db-muted);
    margin-top: 3px;
    line-height: 1.4;
}

.referral-stat {
    text-align: right;
}
.referral-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--db-text);
    line-height: 1;
}
.referral-stat-label {
    font-size: 10px;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.referral-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.referral-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--db-border);
    border-radius: 8px;
    min-width: 0;
    color: var(--db-label);
}

.referral-url {
    font-size: 12px;
    color: var(--db-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.referral-copy-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--db-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition:
        opacity 0.2s,
        transform 0.15s;
}
.referral-copy-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.referral-details-link {
    font-size: 12px;
    color: var(--db-accent);
    text-decoration: none;
    display: block;
    transition: opacity 0.2s;
}
.referral-details-link:hover {
    opacity: 0.7;
}

/* ── Bottom nav ──────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(var(--bnav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    padding-top: 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    background: rgba(5, 11, 20, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--db-border-bright);
    z-index: 100;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--db-muted);
    flex: 1;
    padding: 4px 0;
    transition: color 0.2s;
    position: relative;
}

.bnav-icon-wrap {
    width: 42px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: background 0.2s;
}

.bnav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.bnav-item:hover {
    color: var(--db-accent);
}
.bnav-item:hover .bnav-icon-wrap {
    background: rgba(79, 163, 232, 0.08);
}

/* Active home item — more pronounced */
.bnav-active {
    color: var(--db-text);
}
.bnav-active .bnav-icon-wrap {
    background: var(--db-gradient);
    box-shadow: 0 4px 18px rgba(79, 163, 232, 0.35);
}
.bnav-active .bnav-label {
    color: var(--db-accent);
    font-weight: 600;
}

/* ── Drawer ──────────────────────────────────────────────── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 300;
    background: rgba(8, 18, 34, 0.96);
    border-right: 1px solid var(--db-border-bright);
    backdrop-filter: blur(24px);
    padding: 20px 0 32px;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}
.drawer.open {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--db-border);
    cursor: pointer;
    color: var(--db-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        color 0.2s,
        border-color 0.2s;
}
.drawer-close:hover {
    color: var(--db-text);
    border-color: var(--db-accent);
}

.drawer-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--db-border);
    margin-bottom: 0;
}

.drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--db-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.drawer-user-info {
    flex: 1;
    min-width: 0;
}
.drawer-username {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--db-text);
}
.drawer-email {
    display: block;
    font-size: 11px;
    color: var(--db-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-balance {
    padding: 16px 20px;
    border-bottom: 1px solid var(--db-border);
}
.drawer-balance-label {
    display: block;
    font-size: 10px;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}
.drawer-balance-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--db-text);
    font-variant-numeric: tabular-nums;
}

.drawer-divider {
    height: 1px;
    background: var(--db-border);
    margin: 8px 0;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 6px 12px;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--db-label);
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.drawer-nav-item:hover {
    background: rgba(79, 163, 232, 0.08);
    color: var(--db-text);
}

.drawer-logout-form {
    padding: 0 12px 0;
}
.drawer-logout {
    color: var(--db-bear) !important;
}
.drawer-logout:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

/* ── Toast (inherits from auth.css, adding if not present) ─ */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    border: 1px solid transparent;
    min-width: 270px;
    max-width: 340px;
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-family: inherit;
}
.toast.success {
    background: rgba(16, 40, 24, 0.9);
    border-color: rgba(34, 197, 94, 0.3);
}
.toast.error {
    background: rgba(40, 12, 12, 0.9);
    border-color: rgba(239, 68, 68, 0.3);
}
.toast.removing {
    animation: toastOut 0.25s ease forwards;
}
.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast.success .toast-icon {
    color: #22c55e;
}
.toast.error .toast-icon {
    color: #ef4444;
}
.toast-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}
.toast.success .toast-title {
    color: #4ade80;
}
.toast.error .toast-title {
    color: #f87171;
}
.toast-msg {
    font-size: 11px;
    color: var(--db-muted);
    line-height: 1.4;
}
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}
@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 80px;
    }
    to {
        opacity: 0;
        transform: translateX(16px);
        max-height: 0;
    }
}

/* ── Balance hidden state ────────────────────────────────── */
.balance-hidden .balance-amount,
.balance-hidden .balance-hideable {
    filter: blur(6px);
    user-select: none;
}
