/* ============================================
   FX HORIZON PRO — EXCHANGE DASHBOARD FRAMEWORK
   Institutional-grade dark exchange UI
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Institutional Palette (Refined Light Mode) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-input: #ffffff;
    
    /* Brand Accents */
    --accent: #2563eb; /* Pro Blue from reference image */
    --accent-hover: #1d4ed8;
    --accent-dim: rgba(37, 99, 235, 0.05);
    --accent-glow: 0 4px 12px rgba(37, 99, 235, 0.15);
    
    /* Market Status */
    --green: #00f2a9;
    --green-dim: rgba(0, 242, 169, 0.08);
    --red: #ff3b5c;
    --red-dim: rgba(255, 59, 92, 0.08);
    --yellow: #fbc62d;
    --yellow-dim: rgba(251, 198, 45, 0.08);
    
    /* Text Hierarchy */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    
    /* Layout */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Effects */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --glass: blur(12px) saturate(180%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

body.dashboard-body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* ---------- Layout Shell ---------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.15;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.custom-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-shape {
    width: 8px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
    transform: skewX(-20deg);
    position: relative;
}

.logo-shape::before, .logo-shape::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
}

.logo-shape::before {
    left: -12px;
    top: 4px;
}

.logo-shape::after {
    right: -12px;
    bottom: 4px;
    opacity: 0.3;
}

.sidebar-brand span {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}



.nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
    padding: 12px 12px 8px;
}











.nav-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer-weather {
    padding: 24px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-widget i {
    font-size: 20px;
    color: var(--accent);
}

.weather-info {
    display: flex;
    flex-direction: column;
}

.weather-status {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: capitalize;
}

.weather-temp {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-user:hover {
    background: var(--bg-hover);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .email {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 209, 193, 0.02) 0%, transparent 100%),
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* ---------- Top Bar ---------- */
.top-bar {
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.top-bar-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.top-bar-btn .dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.top-bar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    position: relative;
    box-shadow: none;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(0, 242, 169, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Market Bar Upgrade */
.market-bar {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
}

.market-pair-display {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 16px;
    border-right: 1px solid var(--border);
}

.pair-info h2 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.pair-info .sub {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.market-stats-row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 12px 24px;
}

.market-bar-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border-light);
    padding: 0 16px;
}

.market-bar-item:last-child {
    border-right: none;
}

.market-bar-item .label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.market-bar-item .value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono);
}

@media (max-width: 1200px) {
    .tech-only { display: none; }
    .market-stats-row { grid-template-columns: repeat(4, 1fr); }
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(0, 209, 193, 0.2);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.card-header h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Grid Layouts ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------- Stat Cards ---------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--accent-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    margin-bottom: 6px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.stat-change.positive {
    color: var(--green);
    background: var(--green-dim);
}

.stat-change.negative {
    color: var(--red);
    background: var(--red-dim);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-accent {
    background: var(--accent);
    color: #000;
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 209, 193, 0.3);
}

.btn-green {
    background: var(--green);
    color: #fff;
}
.btn-green:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-red {
    background: var(--red);
    color: #fff;
}
.btn-red:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    padding-right: 80px;
}

.input-suffix {
    position: absolute;
    right: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-prefix-icon {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.input-group .input-prefix-icon ~ .form-input {
    padding-left: 40px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23848e9c' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-select:focus {
    border-color: var(--accent);
}

/* ---------- Tables ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 18px 20px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    white-space: nowrap;
    transition: var(--transition);
}

.data-table tr {
    transition: var(--transition);
}

.data-table tr:hover td {
    background: var(--bg-hover);
    color: #fff;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* ---------- Status Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-success { background: var(--green-dim); color: var(--green); }
.badge-danger { background: var(--red-dim); color: var(--red); }
.badge-warning { background: var(--yellow-dim); color: var(--yellow); }
.badge-info { background: var(--accent-dim); color: var(--accent); }
.badge-neutral { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 0;
}

.tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-main);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Price Display ---------- */
.price-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-ticker .symbol {
    font-weight: 700;
    color: var(--text-primary);
}

.price-ticker .price {
    font-family: var(--font-mono);
    font-weight: 600;
}

.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-yellow { color: var(--yellow) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-mono { font-family: var(--font-mono) !important; }

/* ---------- Crypto Icons ---------- */
.crypto-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.crypto-icon.btc { background: #f7931a; color: #fff; }
.crypto-icon.eth { background: #627eea; color: #fff; }
.crypto-icon.usdt { background: #26a17b; color: #fff; }
.crypto-icon.bnb { background: #f0b90b; color: #000; }
.crypto-icon.sol { background: #9945FF; color: #fff; }
.crypto-icon.xrp { background: #23292f; color: #fff; }
.crypto-icon.ada { background: #0033ad; color: #fff; }
.crypto-icon.doge { background: #c3a634; color: #fff; }

/* ---------- Asset Row ---------- */
.asset-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-info {
    display: flex;
    flex-direction: column;
}

.asset-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.asset-symbol {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ---------- Order Book ---------- */
.orderbook {
    font-family: var(--font-mono);
    font-size: 12px;
}

.orderbook-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 8px 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.orderbook-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 3px 12px;
    font-size: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.1s ease;
}

.orderbook-row:hover {
    background: var(--bg-hover);
}

.orderbook-row .bar {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    opacity: 0.08;
}

.orderbook-row.ask .bar { background: var(--red); }
.orderbook-row.bid .bar { background: var(--green); }
.orderbook-row.ask .price { color: var(--red); }
.orderbook-row.bid .price { color: var(--green); }

.orderbook-spread {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ---------- Trade Panel ---------- */
.trade-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.trade-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.trade-tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    font-family: var(--font-main);
    color: var(--text-secondary);
}

.trade-tab.buy.active {
    color: var(--green);
    border-bottom: 2px solid var(--green);
}

.trade-tab.sell.active {
    color: var(--red);
    border-bottom: 2px solid var(--red);
}

.trade-form {
    padding: 20px;
}

/* ---------- Copy Box ---------- */
.copy-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    gap: 12px;
}

.copy-box code {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-box button {
    background: var(--accent-dim);
    border: none;
    color: var(--accent);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.copy-box button:hover {
    background: var(--accent);
    color: #000;
}

/* ---------- QR Code ---------- */
.qr-container {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-container img {
    width: 180px;
    height: 180px;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    height: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    background: var(--accent);
    transition: width 0.5s ease;
}

.progress-fill.green { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red { background: var(--red); }

/* ---------- Verification Steps ---------- */
.verify-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
}

.verify-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.verify-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: var(--border);
}

.verify-step.completed:not(:last-child)::after {
    background: var(--accent);
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-tertiary);
    z-index: 1;
    transition: var(--transition);
}

.verify-step.active .step-circle {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.verify-step.completed .step-circle {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verify-step.active .step-label,
.verify-step.completed .step-label {
    color: var(--text-primary);
}

/* ---------- Settings ---------- */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.settings-nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.settings-row-info {
    flex: 1;
}

.settings-row-info h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.settings-row-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ---------- Alert Boxes ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.alert i {
    margin-top: 2px;
    font-size: 14px;
}

.alert-info {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(0, 209, 193, 0.2);
}

.alert-warning {
    background: var(--yellow-dim);
    color: var(--yellow);
    border: 1px solid rgba(240, 185, 11, 0.2);
}

.alert-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(246, 70, 93, 0.2);
}

.alert-success {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(14, 203, 129, 0.2);
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 300px;
    margin: 0 auto 20px;
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }

/* ---------- Trading Grid (Binance-style) ---------- */
.trading-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: auto 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.trading-layout > * {
    background: var(--bg-card);
}

.chart-area {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 500px;
}

.market-sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

/* ---------- Market Pairs Bar ---------- */
.market-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.market-bar-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.market-bar-item .label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
}

.market-bar-item .value {
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.market-pair-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-pair-display h2 {
    font-size: 18px;
    font-weight: 700;
}

.market-pair-display .pair-price {
    font-size: 22px;
    font-family: var(--font-mono);
    font-weight: 700;
}

/* ---------- Price Ticker Row ---------- */
.price-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
    gap: 12px;
}

.price-row:hover {
    background: var(--bg-hover);
}

/* ---------- Portfolio Donut ---------- */
.portfolio-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* ---------- Toast Notification ---------- */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translate(-50%, -100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* ---------- File Upload ---------- */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.file-upload i {
    font-size: 36px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.file-upload p {
    color: var(--text-secondary);
    font-size: 13px;
}

.file-upload input[type="file"] {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .trading-layout { grid-template-columns: 1fr; }
    .market-sidebar { display: none; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        display: flex;
    }
    .sidebar.open { z-index: 10005 !important;
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.5);
    }
    .main-content { margin-left: 0; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .verify-steps { flex-direction: column; gap: 16px; }
    .verify-step:not(:last-child)::after { display: none; }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 99;
    }
    .sidebar-overlay.active {
        display: block;
    }

    /* Mobile menu button in top bar */
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: none;
        background: var(--bg-hover);
        border-radius: var(--radius-md);
        color: var(--text-primary);
        font-size: 16px;
        cursor: pointer;
        margin-right: 12px;
        transition: var(--transition);
    }

    .mobile-menu-btn:hover {
        background: var(--accent-dim);
        color: var(--accent);
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
    .sidebar-overlay {
        display: none !important;
    }
}

/* ---------- Global Loader & Animations ---------- */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}
.loader-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse 1.5s ease infinite alternate;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.6; }
}

/* ---------- Trade Page Mobile Adjustments ---------- */
@media (max-width: 768px) {
    .trade-top-row {
        flex-direction: column;
    }
    .mobile-chart-toggle-wrapper {
        display: flex !important;
    }
    .hide-chart-mobile-btn {
        background: #4f46e5;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        z-index: 10;
    }
    .order-console {
        width: 100% !important;
    }
}

/* ---------- Institutional Terminal Animations ---------- */
@keyframes high-velocity-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); transform: scale(1); }
}

@keyframes terminal-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.institutional-pulse {
    animation: high-velocity-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    position: relative;
    z-index: 10;
}

.shimmer-institutional {
    position: relative;
    overflow: hidden;
}

.shimmer-institutional::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40px;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(25deg);
    animation: shimmer-institutional-streak 3s infinite cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes shimmer-institutional-streak {
    0% { left: -60%; }
    20% { left: 120%; }
    100% { left: 120%; }
}


.lightning-bolt-active {
    animation: bolt-flicker 3s infinite;
}

@keyframes bolt-flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    5%, 15%, 25% { opacity: 0.4; transform: scale(0.9); }
    10%, 20% { opacity: 1; transform: scale(1.1); }
}

/* Ensure global clickability */
.main-content, .top-bar, .sidebar {
    pointer-events: auto !important;
}

[style*="cursor: pointer"] {
    pointer-events: auto !important;
}

/* ============================================
   SCROLL REVEAL ANIMATION SYSTEM
   ============================================ */

/* Base hidden state — all reveal elements start invisible */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.reveal-left {
    transform: translateX(-32px);
}

.reveal.reveal-right {
    transform: translateX(32px);
}

.reveal.reveal-zoom {
    transform: scale(0.94) translateY(16px);
}

/* Visible state — triggered by JS IntersectionObserver */
.reveal.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Staggered delay classes */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* Spinner for infinite scroll loader */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   GLOBAL INSTITUTIONAL DASHBOARD GRID STRUCTURES
   ============================================ */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* ============================================
   GLOBAL INSTITUTIONAL MOBILE OVERRIDES
   Automatically handles all inline grid column
   structures across all dashboard/terminal pages.
   ============================================ */
@media (max-width: 991px) {
    /* Stacking grids */
    .dashboard-main-grid,
    .dashboard-chart-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    div[style*="grid-template-columns: 1.2fr 0.8fr"],
    div[style*="grid-template-columns: 1.1fr 0.9fr"],
    div[style*="grid-template-columns: 1fr 400px"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: repeat(auto-fit, minmax(440px, 1fr))"],
    div[style*="grid-template-columns: repeat(auto-fill, minmax(400px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Layout flow */
    .page-content {
        padding: 16px !important;
    }
    
    .top-bar {
        padding: 16px 20px !important;
    }
    
    .top-bar-right {
        gap: 8px !important;
    }
    
    #top-bar-balance {
        font-size: 12px !important;
    }
    
    /* Settings drawer custom mobile styling */
    #settings-drawer {
        width: 100% !important;
        right: -100% !important;
    }
    #settings-drawer.open {
        right: 0 !important;
    }
    
    /* Leverage component mobile adjustments */
    #leverage-ticks {
        gap: 2px !important;
    }
    
    /* Wrap tables or make them scrollable */
    div[style*="grid-template-columns: 2.5fr 1fr 1.5fr 1.2fr 1.2fr"],
    div[style*="grid-template-columns: 2.5fr 1fr 1.5fr 1.2fr 1fr"],
    div[style*="grid-template-columns: 2fr 1.5fr 1.5fr 1fr"],
    div[style*="grid-template-columns: 40px 2fr 1fr 1.5fr 1fr 80px"] {
        min-width: 700px !important;
    }
    
    /* Auto-detect parent containers of wide tables and make them scrollable natively */
    .page-content > div:has(> div[style*="grid-template-columns: 2.5fr"]),
    .page-content > div:has(> div[style*="grid-template-columns: 2fr"]),
    div[id$="-section"],
    .card:has(> div[style*="grid-template-columns"]),
    div:has(> div[style*="grid-template-columns: 2.5fr"]) {
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Scroll wrappers for tabular layouts */
    div[style*="overflow-y: auto"] {
        overflow-x: auto !important;
    }
}


.percent-btn {
    transition: transform 0.1s ease, background-color 0.2s ease, opacity 0.2s ease, color 0.2s ease !important;
}
.percent-btn:hover {
    opacity: 0.7;
    filter: brightness(0.9);
}
.percent-btn:active {
    transform: scale(0.9);
}
.percent-btn.active {
    background: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
}


@media (max-width: 900px) {
    .mobile-chart-toggle-wrapper {
        display: flex !important;
        margin-top: 10px;
    }
    .hide-chart-mobile-btn {
        background: #2563eb;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    .market-grid-5 {
        grid-template-columns: 40px 2fr 1.5fr 100px !important;
    }
    .portfolio-grid-4 {
        grid-template-columns: 2fr 1.5fr 100px !important;
    }
}

/* Wallet Hover Feature */
.wallet-hover-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    width: 100%;
}
.wallet-balance-text {
    position: absolute;
    left: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: translateY(0);
}
.wallet-trade-btn {
    position: absolute;
    left: 0;
    background: #6366f1; /* Purple-indigo like screenshot */
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 24px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Show Trade button on hover OR when tapped on mobile */
.market-grid-5:hover .wallet-balance-text,
.portfolio-grid-4:hover .wallet-balance-text,
.mobile-tap-active .wallet-balance-text {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.market-grid-5:hover .wallet-trade-btn,
.portfolio-grid-4:hover .wallet-trade-btn,
.mobile-tap-active .wallet-trade-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---------- Dark Mode Theme ---------- */
[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --bg-card: #121212;
    --bg-hover: #2a2a2a;
    --bg-input: #1a1a1a;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #717171;
    
    --border: #333333;
    --border-light: #222222;
}


/* Explicitly force white text for all inputs and selects in dark mode */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] [id*="-input"],
[data-theme="dark"] [id*="trade-amount"] {
    color: #ffffff !important;
}

/* =========================================
   MOBILE FULL-SCREEN GRID MENU 
   ========================================= */
#mobile-grid-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1c1d21; /* Match the dark theme of the screenshot */
    z-index: 99999;
    display: none;
    flex-direction: column;
    color: white;
    overflow-y: auto;
}

#mobile-grid-menu.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
}

.mobile-grid-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-grid-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 59, 92, 0.1);
    color: #ff3b5c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.mobile-grid-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.mobile-grid-nav {
    padding: 10px 20px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mobile-grid-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.2s;
}

.mobile-grid-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-grid-item i {
    font-size: 20px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.mobile-grid-item span {
    font-size: 11px;
    font-weight: 500;
}

/* Settings Layout Mobile Responsiveness */
#settings-layout-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
}

@media (max-width: 900px) {
    #settings-layout-grid {
        grid-template-columns: 1fr !important;
    }
}


.sidebar-nav {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--bg-hover);
    border-color: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    border-color: var(--accent);
}

.nav-link i {
    font-size: 20px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.nav-link.active i {
    color: var(--accent);
}

