/* ================================================================
   UNIVERSAL ICON-BAR SIDEBAR — Shared across all terminals
   Desktop: 60px collapsed → 225px on hover (CSS-only)
   Mobile:  Slides in from left as expanded panel
   ================================================================ */

/* ── Icon Sidebar Container ──────────────────────────────────────── */
.icon-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100dvh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--panel-border);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    transition: transform var(--duration-slow) var(--ease-out);
}
.icon-sidebar::-webkit-scrollbar { display: none; }

/* ── Sidebar Logo (top icon) ─────────────────────────────────────── */
.icon-sidebar .isb-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    padding: 0;
    margin: 0 auto 8px;
}
.icon-sidebar .isb-logo:hover {
    background: rgba(var(--accent-rgb), 0.18);
}

/* Logo label text — hidden in collapsed state like nav item labels */
.icon-sidebar .isb-logo .isb-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent);
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease,
                margin-left 0.28s ease;
    margin-left: 0;
    pointer-events: none;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Divider ─────────────────────────────────────────────────────── */
.icon-sidebar .isb-divider {
    width: 28px;
    height: 1px;
    background: var(--panel-border);
    margin: 4px 0;
    flex-shrink: 0;
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: center;
}

/* ── Nav group ───────────────────────────────────────────────────── */
.icon-sidebar .isb-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    width: 100%;
    padding: 0 6px;
}

/* ── Nav Items ───────────────────────────────────────────────────── */
.icon-sidebar .isb-item {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
    border: none;
    background: transparent;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    padding: 0;
}
.icon-sidebar .isb-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: inherit;
    transition: transform 0.2s ease;
}
.icon-sidebar .isb-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.icon-sidebar .isb-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ── Inline Label (hidden in collapsed state) ────────────────────── */
.icon-sidebar .isb-item .isb-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: inherit;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                margin-left 0.28s ease;
    margin-left: 0;
    pointer-events: none;
}

/* ── Tooltip (collapsed state only) ─────────────────────────────── */
.icon-sidebar .isb-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: var(--bg-elevated);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
    z-index: var(--z-tooltip);
    box-shadow: var(--shadow-md);
}

/* ── Bottom pinned items ─────────────────────────────────────────── */
.icon-sidebar .isb-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    padding: 0 6px 0;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--panel-border);
    flex-shrink: 0;
}

/* ── Special icon colors ─────────────────────────────────────────── */
.icon-sidebar .isb-item[data-page="syrpts"]     { color: var(--accent); }
.icon-sidebar .isb-item[data-page="delchain"]    { color: var(--cyan); }
.icon-sidebar .isb-item[data-page="openchain"]   { color: var(--orange); }
.icon-sidebar .isb-item[data-page="datachain"]   { color: var(--purple); }
.icon-sidebar .isb-item[data-page="simulations"] { color: var(--pink); }
.icon-sidebar .isb-item[data-page="cash"]        { color: var(--success); }
.icon-sidebar .isb-item[data-page="whitepaper"]  { color: var(--text-secondary); }
.icon-sidebar .isb-item[data-page="info"]        { color: var(--text-secondary); }

/* Active state keeps the page color */
.icon-sidebar .isb-item.active[data-page="syrpts"]     { color: var(--accent);  background: var(--accent-dim); }
.icon-sidebar .isb-item.active[data-page="delchain"]   { color: var(--cyan);    background: rgba(6,182,212,0.08); }
.icon-sidebar .isb-item.active[data-page="openchain"]  { color: var(--orange);  background: rgba(249,115,22,0.08); }
.icon-sidebar .isb-item.active[data-page="datachain"]  { color: var(--purple);  background: rgba(168,85,247,0.08); }
.icon-sidebar .isb-item.active[data-page="simulations"]{ color: var(--pink);    background: rgba(236,72,153,0.08); }

/* ── Sidebar Overlay (mobile backdrop) ───────────────────────────── */
.isb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--z-sidebar) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base);
}
.isb-overlay.active { opacity: 1; pointer-events: auto; }

/* ════════════════════════════════════════════════════════════════════
   DESKTOP (≥ 900px): CSS-only hover-expand
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {

    /* Base: 60px icon-only strip */
    .icon-sidebar {
        transform: translateX(0);
        width: 60px;
        align-items: flex-start;
        transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.32s ease,
                    background 0.32s ease;
    }

    /* ── HOVER: expand to 225px ─────────────────────────────────── */
    .icon-sidebar:hover {
        width: 225px;
        background: var(--bg-elevated);
        box-shadow: 6px 0 40px rgba(0, 0, 0, 0.6),
                    1px 0 0 rgba(var(--accent-rgb), 0.12);
    }

    /* Logo: full width when expanded */
    .icon-sidebar .isb-logo {
        transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        width: 44px;
        margin: 0 auto 8px;
    }
    .icon-sidebar:hover .isb-logo {
        width: calc(100% - 16px);
        margin: 0 8px 8px;
        justify-content: flex-start;
        padding: 0 12px;
        gap: 10px;
        background: rgba(var(--accent-rgb), 0.12);
        overflow: visible;
    }
    /* Show NEXUS label text when sidebar is expanded */
    .icon-sidebar:hover .isb-logo .isb-label {
        max-width: 160px;
        opacity: 1;
        margin-left: 0;
    }

    /* Divider stretches */
    .icon-sidebar:hover .isb-divider {
        width: calc(100% - 16px);
        align-self: auto;
        margin: 4px 8px;
    }

    /* Nav fills width */
    .icon-sidebar:hover .isb-nav { align-items: stretch; }
    .icon-sidebar:hover .isb-bottom { align-items: stretch; }

    /* Items fill row */
    .icon-sidebar .isb-item {
        transition: all var(--duration-fast),
                    width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .icon-sidebar:hover .isb-item {
        width: 100%;
        height: 44px;
        justify-content: flex-start;
        padding: 0 12px;
        border-radius: var(--radius-md);
    }
    .icon-sidebar:hover .isb-item i { transform: none; }

    /* Labels appear */
    .icon-sidebar:hover .isb-item .isb-label {
        max-width: 160px;
        opacity: 1;
        margin-left: 12px;
    }

    /* Active indicator: left border */
    .icon-sidebar:hover .isb-item.active {
        border-left: 3px solid currentColor;
        border-radius: 0 var(--radius-md) var(--radius-md) 0;
    }

    /* Tooltips: show only in collapsed state */
    .icon-sidebar .isb-item:hover::after {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    /* Hide tooltips when expanded (labels replace them) */
    .icon-sidebar:hover .isb-item::after { display: none; }

    /* Hide mobile hamburger */
    .isb-mobile-toggle { display: none !important; }

    /* Shift layout to make room for icon-bar */
    body.has-icon-sidebar .top-nav {
        margin-left: 60px;
        width: calc(100% - 60px);
        position: sticky;
        top: 0;
        z-index: calc(var(--z-sidebar) - 2);
    }
    body.has-icon-sidebar .layout-wrapper {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    body.has-icon-sidebar header {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    body.has-icon-sidebar .price-ticker-bar,
    body.has-icon-sidebar main,
    body.has-icon-sidebar .site-footer,
    body.has-icon-sidebar footer {
        margin-left: 60px;
    }

    .mobile-tab-nav { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE (< 900px): Full-width scrollable slide-in drawer
   Labels always visible, items use flex-start layout
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
    .icon-sidebar {
        transform: translateX(-100%);
        width: min(88vw, 300px);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.7);
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .icon-sidebar.open {
        transform: translateX(0);
    }

    /* ── Mobile: Logo always shows label ── */
    .icon-sidebar .isb-logo {
        width: calc(100% - 16px);
        height: 52px;
        margin: 0 8px 4px;
        justify-content: flex-start;
        padding: 0 14px;
        gap: 12px;
        background: rgba(var(--accent-rgb), 0.12);
        border-radius: var(--radius-md);
        overflow: visible;
    }
    .icon-sidebar .isb-logo .isb-label {
        max-width: 200px;
        opacity: 1;
        margin-left: 0;
        font-size: 0.85rem;
        font-weight: 800;
        letter-spacing: 1.5px;
    }

    /* ── Mobile: Divider full width ── */
    .icon-sidebar .isb-divider {
        width: calc(100% - 16px);
        margin: 6px 8px;
        align-self: auto;
    }

    /* ── Mobile: Nav fills drawer width ── */
    .icon-sidebar .isb-nav,
    .icon-sidebar .isb-bottom {
        align-items: stretch;
        width: 100%;
    }

    /* ── Mobile: All nav items are full-width rows with labels ── */
    .icon-sidebar .isb-item {
        width: 100%;
        height: 48px;
        justify-content: flex-start;
        padding: 0 14px;
        border-radius: var(--radius-md);
        overflow: visible;
    }
    .icon-sidebar .isb-item i {
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    /* ── Mobile: Labels always visible ── */
    .icon-sidebar .isb-item .isb-label {
        max-width: 200px;
        opacity: 1;
        margin-left: 12px;
        font-size: 0.82rem;
        pointer-events: auto;
    }

    /* ── Mobile: No tooltips (labels replace them) ── */
    .icon-sidebar .isb-item::after { display: none !important; }

    /* ── Mobile: Active state left border ── */
    .icon-sidebar .isb-item.active {
        border-left: 3px solid currentColor;
        border-radius: 0 var(--radius-md) var(--radius-md) 0;
        padding-left: 11px;
    }

    /* ── No content shift on mobile ── */
    body.has-icon-sidebar header,
    body.has-icon-sidebar .top-nav,
    body.has-icon-sidebar .price-ticker-bar,
    body.has-icon-sidebar main,
    body.has-icon-sidebar .layout-wrapper,
    body.has-icon-sidebar .site-footer,
    body.has-icon-sidebar footer {
        margin-left: 0;
        width: 100%;
    }
    body.has-icon-sidebar header {
        width: 100%;
    }

    /* ── Mobile hamburger button ── */
    .isb-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--accent);
        font-size: 1.3rem;
        cursor: pointer;
        padding: 8px;
        border-radius: var(--radius-sm);
        transition: background var(--duration-fast);
    }
    .isb-mobile-toggle:hover {
        background: var(--accent-dim);
    }
}

/* ════════════════════════════════════════════════════════════════════
   PROFILE PANEL — Slides down from top-right
   ════════════════════════════════════════════════════════════════════ */
.profile-panel {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + 4px);
    right: 12px;
    width: min(400px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--header-h) - 20px);
    background: var(--bg-elevated);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-lg);
    z-index: var(--z-toast);
    overflow-y: auto;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.08),
                0 16px 48px rgba(0, 0, 0, 0.8),
                0 0 24px rgba(var(--accent-rgb), 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: slideDown var(--duration-base) var(--ease-out);
    scrollbar-width: thin;
    scrollbar-color: var(--panel-border) transparent;
}
.profile-panel.open { display: block; }
.profile-panel::-webkit-scrollbar { width: 4px; }
.profile-panel::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 2px; }

/* ── Profile sections ────────────────────────────────────────────── */
.pp-section {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pp-section:last-child { border-bottom: none; }

.pp-section-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

/* ── Wallet address row ──────────────────────────────────────────── */
.pp-wallet {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pp-wallet-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}
.pp-wallet-addr {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.pp-copy-btn {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--duration-fast);
    flex-shrink: 0;
}
.pp-copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ── Balance rows ────────────────────────────────────────────────── */
.pp-balance-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pp-bal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.pp-bal-token {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-bal-token i {
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}
.pp-bal-amount {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}
.pp-bal-usd {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 6px;
}

/* ── Quick action buttons ────────────────────────────────────────── */
.pp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pp-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
}
.pp-action-btn:hover {
    background: rgba(var(--accent-rgb), 0.06);
    border-color: rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
}
.pp-action-btn i {
    font-size: 0.85rem;
}

/* ── Referral section ────────────────────────────────────────────── */
.pp-referral-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(234, 179, 8, 0.04);
    border: 1px solid rgba(234, 179, 8, 0.1);
    border-radius: var(--radius-sm);
}
.pp-referral-code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
}
.pp-referral-earnings {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--success);
    font-weight: 600;
}

/* ── Settings toggles ────────────────────────────────────────────── */
.pp-settings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pp-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.pp-setting-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-setting-label i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Toggle switch ───────────────────────────────────────────────── */
.pp-toggle {
    position: relative;
    width: 38px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--duration-fast);
    border: none;
    flex-shrink: 0;
}
.pp-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--duration-fast);
}
.pp-toggle.on {
    background: rgba(var(--accent-rgb), 0.3);
}
.pp-toggle.on::after {
    left: 20px;
    background: var(--accent);
}

/* ── Settings link buttons ───────────────────────────────────────── */
.pp-setting-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
    width: 100%;
    border: none;
    background: none;
}
.pp-setting-link:hover {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.04);
}
.pp-setting-link i {
    width: 18px;
    text-align: center;
}
.pp-setting-link .pp-link-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Disconnect button ───────────────────────────────────────────── */
.pp-disconnect {
    width: 100%;
    padding: 10px;
    background: var(--danger-dim);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-md);
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pp-disconnect:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Profile trigger button (replaces old balance display) ───────── */
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: transparent;
    transition: all var(--duration-fast);
    min-height: 38px;
    color: var(--text-secondary);
    font-size: 1rem;
}
.profile-trigger:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.04);
    color: var(--accent);
}
.profile-trigger .pt-balance {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Notification drawer "View All" link ─────────────────────────── */
.notif-view-all {
    display: block;
    text-align: center;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-decoration: none;
    border-top: 1px solid var(--panel-border);
    transition: background var(--duration-fast);
}
.notif-view-all:hover {
    background: var(--accent-dim);
}

/* ── Profile panel overlay (click-outside-to-close) ──────────────── */
.pp-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-toast) - 1);
    display: none;
}
.pp-overlay.active { display: block; }

/* ════════════════════════════════════════════════════════════════════
   MOBILE ADJUSTMENTS
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
    .profile-panel {
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100dvh - var(--header-h) - 16px);
    }

    .pp-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .pp-action-btn {
        padding: 8px 6px;
        font-size: 0.68rem;
    }
}

/* ════════════════════════════════════════════════════════════════════
   INTERNAL SECTION SUB-NAV (DelChain / OpenChain)
   Horizontal tab bar below top-nav for switching views
   ════════════════════════════════════════════════════════════════════ */

/* Layout wrapper needs column direction to stack subnav above content */
.has-icon-sidebar .layout-wrapper {
    display: flex;
    flex-direction: column;
}

.dc-subnav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--panel-border);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    flex-shrink: 0;
    height: 48px;
}
.dc-subnav::-webkit-scrollbar { display: none; }

.dc-subnav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    height: 100%;
    position: relative;
}
.dc-subnav-item i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}
.dc-subnav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}
.dc-subnav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.04);
}

/* When token-dashboard-view is active, hide the subnav */
.dc-subnav.hidden { display: none; }

/* ── Main content fills remaining space ──────────────────────────── */
.has-icon-sidebar .layout-wrapper .main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
