
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-family: 'Inter', 'Inter var', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 300;
    --font-weight-medium: 400;
    --font-weight-semibold: 500;
    --font-weight-bold: 600;
    --bg-primary: #1f1f1f;
    --bg-secondary: #3a3a3a;
    --bg-tertiary: #474747;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --border-color: #525252;
    --accent-primary: #ffffff;
    --accent-secondary: #d4d4d4;
    --card-bg: #333333;
    --sidebar-bg: #1a1a1a;
    --sidebar-border: #2a2a2a;
    --sidebar-text: rgba(255, 255, 255, 0.82);
    --sidebar-muted: rgba(255, 255, 255, 0.6);
    --sidebar-hover-bg: #222222;
    --sidebar-active-bg: #2c2c2c;
    --sidebar-active-text: #ffffff;
    --sidebar-pill-radius: 12px;
    --brand-accent: #0082FB;
    --positive: #10b981;
    --negative: #ef4444;
}

body.light-mode {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --card-bg: #ffffff;
    --sidebar-bg: #f8fafc;
    --sidebar-border: #e5e7eb;
    --sidebar-text: #3f3a33;
    --sidebar-muted: #9ca3af;
    --sidebar-hover-bg: #eef1f7;
    --sidebar-active-bg: #18181b;
    --sidebar-active-text: #ffffff;
    --brand-accent: #0082FB;
    --sidebar-gradient-start: #1e3a8a;
    --sidebar-gradient-end: #1e40af;
    --positive: #10b981;
    --negative: #ef4444;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    letter-spacing: -0.01em;
    line-height: 1.6;
    font-synthesis: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.text-thin {
    font-weight: var(--font-weight-light);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 0.75rem 0 1.25rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body.light-mode .sidebar {
    color: var(--sidebar-text);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    min-height: 4.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    text-align: center;
}

body.light-mode .sidebar-header {
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
    color: var(--sidebar-text);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

body.light-mode .sidebar-header h2 {
    color: var(--sidebar-text);
}

.logo-dot {
    color: var(--brand-accent);
    font-weight: 800;
}

.sidebar-logo {
    width: 115px;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 1.2rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.95rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    gap: 0.75rem;
    border-radius: var(--sidebar-pill-radius);
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    border: 1px solid transparent;
}

body.light-mode .nav-item {
    color: var(--sidebar-text);
}

.nav-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
    border-color: var(--sidebar-border);
}

body.light-mode .nav-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-color: var(--sidebar-active-bg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    box-shadow: 0 8px 18px rgba(24, 24, 27, 0.2);
}

.nav-item .icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.nav-item.active .icon {
    opacity: 1;
}

.nav-section-title {
    font-size: 0.5625rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.08em;
    color: #000000;
    text-transform: uppercase;
    padding: 0 1rem 0;
    text-align: left;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle .moon {
    stroke: #ffffff;
}

body.light-mode .theme-toggle .sun {
    stroke: #1e293b;
}

/* Theme transition overlay for premium wash effect */
.theme-transition-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), rgba(0, 130, 251, 0.18), rgba(255, 255, 255, 0.12)),
        linear-gradient(120deg, rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.04));
    mix-blend-mode: screen;
    opacity: 0;
    transform: scale(1);
    z-index: 9999;
    backdrop-filter: blur(18px);
}

.theme-transition-overlay.active {
    animation: theme-wash 1s ease-out forwards;
}

@keyframes theme-wash {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    20% {
        opacity: 0.7;
    }
    60% {
        opacity: 0.35;
        transform: scale(1.02);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem !important;
    min-height: 91.5px !important;
    height: 91.5px !important;
    max-height: 91.5px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    backdrop-filter: blur(10px);
    background: rgba(31, 31, 31, 0.9);
    box-sizing: border-box !important;
}

body.light-mode .sticky-header {
    background: rgba(245, 247, 250, 0.95);
}

.header-title {
    font-size: 1.5rem !important;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    white-space: nowrap;
}

.header-stats {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex: 1;
    justify-content: flex-end !important;
}

.stat-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 1rem !important;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px !important;
    min-width: 120px !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
}

#sp500-chart-container,
#nasdaq-chart-container {
    min-width: 180px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 1rem;
    align-items: center;
}

#sp500-chart-container .stat-label,
#nasdaq-chart-container .stat-label {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

#sp500-chart-container .stat-value,
#nasdaq-chart-container .stat-value {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

#sp500-chart-container .stat-chart,
#nasdaq-chart-container .stat-chart {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    margin-top: 0;
    align-self: center;
}

.stat-label {
    font-size: 0.7rem !important;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-semibold);
}

.stat-value {
    font-size: 0.95rem !important;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.stat-value.positive {
    color: var(--positive);
}

.stat-value.negative {
    color: var(--negative);
}

.stat-chart {
    margin-top: 0.25rem;
    height: 30px;
    width: 80px;
}

.stat-chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-content {
    flex: 1;
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
        padding-bottom: 80px; /* Extra space for mobile nav */
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    color: var(--text-secondary);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    border-color: var(--negative);
    color: var(--negative);
}

.btn-logout .icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
}

.theme-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.welcome-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 1.25rem;
}

.welcome-left h1 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.welcome-sub {
    color: var(--text-secondary);
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.welcome-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0 0 0.25rem 0;
    font-weight: var(--font-weight-semibold);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
}

.chip.subtle {
    color: var(--text-secondary);
}

.chip.positive {
    color: var(--positive);
}

.chip.negative {
    color: var(--negative);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 1rem 1.25rem;
    align-items: start;
    width: 100%;
}

body[data-page="overview"] .dashboard-grid {
    grid-template-areas:
        "ai return"
        "performance movers";
    grid-template-rows: auto 1fr;
    align-items: stretch;
}

body[data-page="overview"] .main-column,
body[data-page="overview"] .side-column {
    display: contents;
}

body[data-page="overview"] .ai-insights-section {
    grid-area: ai;
    margin-bottom: 0;
    height: 100%;
}

body[data-page="overview"] .performance-section {
    grid-area: performance;
    margin-bottom: 0;
    height: 100%;
}

body[data-page="overview"] .return-breakdown-card {
    grid-area: return;
    height: 100%;
}

body[data-page="overview"] .top-movers-card {
    grid-area: movers;
    height: 100%;
}

body[data-page="overview"] .main-column > * + *,
body[data-page="overview"] .side-column > * + * {
    margin-top: 0;
}

.main-column,
.side-column {
    width: 100%;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapshot-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    width: 100%;
}

.snapshot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.snapshot-header h3 {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
}

.snapshot-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.snapshot-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.snapshot-label {
    flex: 1;
    color: var(--text-secondary);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
}

.snapshot-value {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.dot.green { background: #22c55e; }
.dot.blue { background: #3b82f6; }
.dot.gray { background: #94a3b8; }
.dot.orange { background: #f97316; }

#top-movers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mover-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.light-mode .mover-row {
    border-color: #e2e8f0;
    background: linear-gradient(140deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.mover-row:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

body.light-mode .mover-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.mover-row.is-gain {
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.14);
}

.mover-row.is-loss {
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.12);
}

.mover-row.is-gain:hover {
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.18);
}

.mover-row.is-loss:hover {
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18);
}

.mover-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
}

body.light-mode .mover-dot {
    box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.04);
}

.mover-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mover-symbol {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.mover-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mover-change {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: right;
    align-items: flex-end;
}

.mover-change-pct {
    font-weight: 800;
    font-size: 1rem;
}

.mover-change-pct.positive {
    color: var(--positive);
}

.mover-change-pct.negative {
    color: var(--negative);
}

.mover-change-amt {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .mover-change-amt {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.4);
}

.mover-change-amt.positive {
    color: var(--positive);
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.12);
}

.mover-change-amt.negative {
    color: var(--negative);
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(239, 68, 68, 0.12);
}

.empty-state.small {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.holdings-fullwidth {
    margin-top: 1.25rem;
    width: 100%;
}

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

    body[data-page="overview"] .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "ai"
            "return"
            "performance"
            "movers";
        grid-auto-rows: auto;
    }
}

.card {
    background: var(--card-bg);
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    border-color: rgba(0, 0, 0, 0.04);
}

.card-header {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    letter-spacing: -0.01em;
    font-weight: var(--font-weight-semibold);
}

.card-value {
    font-size: 1.9rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.card-value.positive {
    color: var(--positive);
}

.card-value.negative {
    color: var(--negative);
}

.card-change {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.card-change.positive {
    color: var(--positive);
}

.card-change.negative {
    color: var(--negative);
}

/* Holdings Section */
.holdings-section {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.news-section {
    margin-top: 1.25rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.news-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)), var(--card-bg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.3s ease;
    color: inherit;
    text-decoration: none;
}

body.light-mode .news-card {
    border-color: #e2e8f0;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

body.light-mode .news-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.news-dot {
    margin-top: 6px;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-title {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.news-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.1rem;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.05rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--accent-primary);
    color: #000000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.btn-refresh {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
}

.btn-refresh:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.btn-refresh:active {
    transform: scale(0.95);
}

.btn-refresh .icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Table Styles */
.holdings-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem !important;
}

td.positive {
    color: var(--positive);
}

td.negative {
    color: var(--negative);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem 0.75rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.light-mode .sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    padding: 0.85rem;
    background: var(--sidebar-hover-bg);
    border-radius: var(--sidebar-pill-radius);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--sidebar-border);
}

body.light-mode .user-profile {
    background: var(--sidebar-hover-bg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--sidebar-border);
}

.user-avatar .icon {
    width: 24px;
    height: 24px;
    stroke: var(--brand-accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.light-mode .user-avatar .icon {
    stroke: var(--brand-accent);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

body.light-mode .user-name {
    color: var(--sidebar-text);
}

.user-email-small {
    font-size: 0.75rem;
    color: var(--sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

body.light-mode .user-email-small {
    color: var(--sidebar-muted);
}

.footer-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    background: transparent;
    color: var(--sidebar-text);
    text-decoration: none;
    border: 1px solid var(--sidebar-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .icon-btn {
    background: transparent;
    color: var(--sidebar-text);
}

.icon-btn:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
}

body.light-mode .icon-btn:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
}

.icon-btn.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-color: var(--sidebar-active-bg);
}

body.light-mode .icon-btn.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-color: var(--sidebar-active-bg);
}

.icon-btn .icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn .moon {
    stroke: #ffffff;
}

body.light-mode .icon-btn .moon {
    stroke: var(--text-secondary);
}

body.light-mode .icon-btn .sun {
    stroke: #1e293b;
}

.version-info {
    text-align: center;
    font-size: 0.75rem;
    color: var(--sidebar-muted);
    padding: 0.5rem;
    transition: color 0.3s ease;
}

body.light-mode .version-info {
    color: var(--sidebar-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0;
        right: 0;
        width: 100%;
        height: 60px;
        max-height: 60px;
        z-index: 100;
        border-right: none;
        border-top: 1px solid var(--border-color);
        flex-direction: row;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        padding: 0;
    }

    body.light-mode .sidebar {
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        height: 60px;
    }

    .nav-section-title {
        display: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0.5rem;
        font-size: 0.65rem;
        white-space: nowrap;
        min-width: fit-content;
        border-left: none;
        border: none;
        box-shadow: none;
        border-bottom: 3px solid transparent;
        text-align: center;
        flex: 1;
        justify-content: center;
        height: 100%;
    }

    .nav-item.active {
        background: transparent;
        border-left: none;
        border-bottom: 3px solid var(--brand-accent);
        color: var(--brand-accent);
    }

    body.light-mode .nav-item.active {
        background: transparent;
        color: var(--brand-accent);
    }

    .nav-item .icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 1rem;
        padding-bottom: 60px;
        margin-left: 0;
        margin-bottom: 0;
        min-height: 100vh;
        overflow-y: auto;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .sticky-header {
        display: none !important;
    }
}
