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

:root {
    /* Premium Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);

    /* Neutral Colors - Dark Mode (Default) */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252541;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b4b4c8;
    --text-muted: #7a7a8c;

    /* Accent Colors */
    --accent-purple: #667eea;
    --accent-pink: #f093fb;
    --accent-blue: #4facfe;
    --accent-green: #43e97b;
    --accent-orange: #fa709a;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Light Mode Theme */
[data-theme="light"] {
    /* Neutral Colors - Light Mode */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf1;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);

    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #8a8aa0;

    /* Slightly adjusted accent colors for better contrast on light */
    --accent-purple: #5a6fd6;
    --accent-pink: #e080e8;
    --accent-blue: #3a9ce8;
    --accent-green: #2eb86b;
    --accent-orange: #e85a80;

    /* Glassmorphism - Light */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);

    /* Shadows - Light Mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.15);
}

/* Light mode specific overrides */
[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(79, 172, 254, 0.08) 0%, transparent 50%);
}

[data-theme="light"] .logo {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-link:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
}

[data-theme="light"] .nav-link.active {
    color: white;
}

[data-theme="light"] .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-purple);
}

[data-theme="light"] .card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .card:hover {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .modal-content {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: var(--bg-tertiary);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
    background: var(--bg-secondary);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(79, 172, 254, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease infinite;
}

@keyframes backgroundShift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Header */
.header {
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-xl);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Profile Dropdown */
.profile-container {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.profile-trigger:hover {
    background: var(--bg-card-hover);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all var(--transition-fast);
}

.profile-trigger:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-card);
}

.profile-dropdown-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.profile-dropdown-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.profile-dropdown-menu {
    padding: 0.5rem 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
}

.profile-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent-purple);
}

.profile-dropdown-item.danger:hover {
    background: rgba(250, 112, 154, 0.1);
    color: var(--accent-orange);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

/* Light mode overrides for profile dropdown */
[data-theme="light"] .profile-dropdown {
    background: var(--bg-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .profile-dropdown-header {
    background: var(--bg-tertiary);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

/* Net Worth Card */
.net-worth-card {
    background: var(--primary-gradient);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.net-worth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.net-worth-amount {
    font-size: 3rem;
    font-weight: 800;
    margin: var(--spacing-sm) 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.net-worth-label {
    font-size: 0.95rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.net-worth-breakdown {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.breakdown-item {
    flex: 1;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.breakdown-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.breakdown-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Cash Flow Card */
.cash-flow-progress {
    margin: var(--spacing-md) 0;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 100px;
    transition: width var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.cash-flow-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
}

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

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

/* Bills List */
.bills-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.bill-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
    transform: translateX(4px);
}

.bill-info {
    flex: 1;
}

.bill-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bill-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bill-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-orange);
}

/* Goals */
.goals-grid {
    display: grid;
    gap: var(--spacing-md);
}

.goal-card {
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.goal-name {
    font-weight: 600;
}

.goal-percentage {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.goal-progress {
    margin: var(--spacing-sm) 0;
}

.goal-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.action-card {
    padding: var(--spacing-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.action-card:hover::before {
    opacity: 0.1;
}

.action-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
}

.action-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.action-icon.purple {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: var(--accent-purple);
}

.action-icon.pink {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.2) 100%);
    color: var(--accent-pink);
}

.action-icon.blue {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    color: var(--accent-blue);
}

.action-icon.green {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    color: var(--accent-green);
}

.action-title {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-normal);
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--transition-normal);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }

    .net-worth-amount {
        font-size: 2rem;
    }

    .net-worth-breakdown {
        flex-direction: column;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
}

/* ==================== Sidebar Layout ==================== */

/* Main layout wrapper */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

/* Sidebar Header - App Branding */
.sidebar-header {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.sidebar-brand-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.sidebar-nav-link.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
    border-left: 3px solid var(--accent-purple);
    margin-left: -3px;
}

.sidebar-nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    opacity: 0.9;
}

.sidebar-nav-link.active .sidebar-nav-icon {
    opacity: 1;
}

/* Sidebar Footer - Profile Section */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-profile {
    position: relative;
}

.sidebar-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}

.sidebar-profile-trigger:hover {
    background: var(--bg-card);
}

.sidebar-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-chevron {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
}

.sidebar-profile.open .sidebar-profile-chevron {
    transform: rotate(180deg);
}

/* Sidebar Profile Dropdown */
.sidebar-profile-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.sidebar-profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sidebar-profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
}

.sidebar-profile-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent-purple);
}

.sidebar-profile-dropdown-item.danger:hover {
    background: rgba(250, 112, 154, 0.1);
    color: var(--accent-orange);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    padding: var(--spacing-lg);
    padding-left: var(--spacing-lg);
}

.main-content .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Page Header for Sidebar Layout */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Light mode sidebar overrides */
[data-theme="light"] .sidebar {
    background: var(--bg-secondary);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-nav-link:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
}

[data-theme="light"] .sidebar-profile-dropdown {
    background: var(--bg-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.open {
    display: block;
}

/* ==================== Dashboard Redesign Styles ==================== */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header__left {
    flex: 1;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.dashboard-header__actions {
    display: flex;
    gap: 0.75rem;
}

/* Stat Cards Row */
.stat-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stat-cards-row {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.stat-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.stat-card__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.stat-card__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
}

.stat-card__amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-card__trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card__trend.positive {
    color: #4ade80;
}

.stat-card__trend.negative {
    color: #f87171;
}

.trend-arrow {
    font-weight: 600;
}

.stat-card__sublabel {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Stat Card Variants */
.stat-card--networth {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card--income {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
}

.stat-card--expenses {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.stat-card--cashflow {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard Grid - Bills & Goals */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 400px;
}

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

.dashboard-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dashboard-card__icon {
    font-size: 1.25rem;
}

.dashboard-card__count {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-link:hover {
    color: var(--accent-purple);
    background: var(--bg-card);
}

/* Bills List Redesign */
.bills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.bill-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
}

.bill-info {
    flex: 1;
}

.bill-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.bill-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bill-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bill-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.days-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}

.days-badge--urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.days-badge--soon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.days-badge--normal {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Goals List Redesign */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.goal-item {
    padding: 0;
}

.goal-amounts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

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

.goal-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.goal-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width var(--transition-slow);
}

.goal-progress-fill--blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.goal-progress-fill--green {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.goal-progress-fill--purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* Quick Actions Section */
.quick-actions-section {
    margin-top: 1rem;
}

.quick-actions-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-action-icon--expense {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
}

.quick-action-icon--income {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(74, 222, 128, 0.2));
}

.quick-action-icon--goal {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.2));
}

.quick-action-icon--budget {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.2));
}

.quick-action-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Sidebar Version Info */
.sidebar-version {
    padding: 0.75rem 1rem;
    margin: 0 0.75rem 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.1));
    border-radius: var(--radius-md);
}

.sidebar-version__text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.sidebar-version__subtext {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* ============================================
   ACCOUNTS PAGE REDESIGN STYLES
   ============================================ */

/* Summary Cards Container */
.accounts-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

@media (max-width: 768px) {
    .accounts-summary {
        grid-template-columns: 1fr;
    }
}

/* Summary Card Styles */
.summary-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.summary-card--assets {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15) 0%, rgba(56, 249, 215, 0.1) 100%);
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.summary-card--liabilities {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.15) 0%, rgba(254, 225, 64, 0.05) 100%);
    border: 1px solid rgba(250, 112, 154, 0.3);
}

.summary-card--networth {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.summary-card__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.summary-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.summary-card--assets .summary-card__value {
    color: var(--accent-green);
}

.summary-card--liabilities .summary-card__value {
    color: var(--accent-orange);
}

.summary-card--networth .summary-card__value {
    color: var(--accent-purple);
}

.summary-card__change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.summary-card__change--positive {
    color: var(--accent-green);
    background: rgba(67, 233, 123, 0.1);
}

.summary-card__change--negative {
    color: var(--accent-orange);
    background: rgba(250, 112, 154, 0.1);
}

/* Account Type Section */
.account-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

.account-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

.account-section__title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.account-section__icon {
    font-size: 1.25rem;
}

.account-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.account-section__total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.account-section__body {
    padding: var(--spacing-sm);
}

/* Account Row Styles */
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-xs) 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border-left: 4px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.account-row:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.account-row--bank {
    border-left-color: var(--accent-blue);
}

.account-row--credit_card {
    border-left-color: var(--accent-orange);
}

.account-row--cash {
    border-left-color: var(--accent-green);
}

.account-row--wallet {
    border-left-color: var(--accent-pink);
}

.account-row--investment {
    border-left-color: var(--accent-purple);
}

.account-row--loan {
    border-left-color: #f59e0b;
}

.account-row__info {
    flex: 1;
}

.account-row__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.account-row__details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.account-row__balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: var(--spacing-md);
}

.account-row__amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.account-row__amount--positive {
    color: var(--accent-green);
}

.account-row__amount--negative {
    color: var(--accent-orange);
}

/* Credit Card Specific */
.credit-card-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
}

.credit-card-row__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.credit-card-row__usage {
    width: 100%;
}

.credit-usage-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

.credit-usage-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 100px;
    transition: width var(--transition-slow);
}

.credit-usage-bar__fill--warning {
    background: linear-gradient(90deg, var(--accent-orange), #f59e0b);
}

.credit-usage-bar__fill--danger {
    background: linear-gradient(90deg, #ef4444, var(--accent-orange));
}

.credit-usage-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

/* Account Actions */
.account-row__actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.account-row:hover .account-row__actions {
    opacity: 1;
}

.account-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.account-action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.account-action-btn--delete:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Add Account Link in Section */
.account-section__add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--spacing-md);
    margin: var(--spacing-xs);
    background: transparent;
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.account-section__add:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.05);
}

/* Empty State for Section */
.account-section__empty {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Light Mode Overrides */
[data-theme="light"] .account-section {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .account-row {
    background: var(--bg-tertiary);
}

[data-theme="light"] .account-row:hover {
    background: rgba(102, 126, 234, 0.08);
}

[data-theme="light"] .summary-card--assets {
    background: linear-gradient(135deg, rgba(46, 184, 107, 0.1) 0%, rgba(56, 249, 215, 0.05) 100%);
}

[data-theme="light"] .summary-card--liabilities {
    background: linear-gradient(135deg, rgba(232, 90, 128, 0.1) 0%, rgba(254, 225, 64, 0.03) 100%);
}

[data-theme="light"] .summary-card--networth {
    background: linear-gradient(135deg, rgba(90, 111, 214, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
}

/* ============================================ */
/* Amount Hiding - Hover to Reveal */
/* ============================================ */

.amount-hidden {
    position: relative;
    display: inline-block;
    cursor: help;
    transition: all var(--transition-fast);
    border-radius: 4px;
    padding: 2px 4px;
}

.amount-hidden:hover,
.amount-hidden:focus {
    background: rgba(102, 126, 234, 0.1);
}

.amount-hidden .amount-masked {
    display: inline;
    letter-spacing: 2px;
}

.amount-hidden .amount-real {
    display: none;
}

.amount-hidden:hover .amount-masked,
.amount-hidden:focus .amount-masked {
    display: none;
}

.amount-hidden:hover .amount-real,
.amount-hidden:focus .amount-real {
    display: inline;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Make amount-hidden focusable for keyboard accessibility */
.amount-hidden {
    outline: none;
}

.amount-hidden:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* ============================================ */
/* Account Detail Page Styles */
/* ============================================ */

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb__link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
    color: var(--accent-purple);
}

.breadcrumb__separator {
    color: var(--text-muted);
}

.breadcrumb__current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Account Detail Header */
.account-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.account-detail-header__info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-detail-header__name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.account-badge {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-badge--blue {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.1) 100%);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.account-badge--purple {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--accent-purple);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.account-badge--green {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.1) 100%);
    color: var(--accent-green);
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.account-badge--orange {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.2) 0%, rgba(254, 225, 64, 0.1) 100%);
    color: var(--accent-orange);
    border: 1px solid rgba(250, 112, 154, 0.3);
}

.account-badge--red {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 111, 0.1) 100%);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.account-badge--pink {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.1) 100%);
    color: var(--accent-pink);
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.account-detail-header__actions {
    display: flex;
    gap: 1rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.tab-nav__item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    bottom: -2px;
}

.tab-nav__item:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.tab-nav__item--active {
    border-bottom-color: var(--accent-purple);
    color: var(--accent-purple);
    background: var(--bg-card);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content--active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Transaction Controls */
.transaction-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls .form-select {
    min-width: 150px;
}

/* Transactions Container */
.transactions-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#transactions-list {
    min-height: 200px;
}

/* Transaction Item */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item:hover {
    background: var(--bg-card-hover);
}

.transaction-item__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.transaction-date__day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.transaction-date__month {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.transaction-item__info {
    flex: 1;
}

.transaction-item__payee {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.transaction-item__details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transaction-item__amount {
    font-size: 1.125rem;
    font-weight: 700;
    min-width: 120px;
    text-align: right;
}

.transaction-amount--positive {
    color: var(--accent-green);
}

.transaction-amount--negative {
    color: var(--accent-orange);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

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

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Account Info Container */
.account-info-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.account-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.account-info-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Info Field */
.info-field {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.info-field:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.info-field--full {
    grid-column: 1 / -1;
}

.info-field__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-field__value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.info-field__value input,
.info-field__value textarea {
    margin-top: 0.25rem;
}

.account-info-actions {
    display: none;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Light mode adjustments for account detail page */
[data-theme="light"] .account-detail-header {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .transactions-container,
[data-theme="light"] .account-info-container {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .transaction-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .info-field {
    background: var(--bg-tertiary);
}

[data-theme="light"] .info-field:hover {
    background: rgba(102, 126, 234, 0.08);
}

/* ==================== Reports & Analytics Page ==================== */

/* Reports Header - Secondary heading with time filter */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.reports-header__left {
    flex: 1;
}

.reports-tab-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.reports-tab-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.reports-header__right {
    display: flex;
    align-items: center;
}

/* Time Filter Dropdown */
.time-filter {
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
    min-width: 160px;
}

.time-filter:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
}

.time-filter:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-filter option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Mini Tabs Container */
.mini-tabs-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.mini-tabs-container::-webkit-scrollbar {
    height: 6px;
}

.mini-tabs-container::-webkit-scrollbar-track {
    background: transparent;
}

.mini-tabs-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.mini-tabs-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Mini Tab Buttons */
.mini-tab {
    flex-shrink: 0;
    padding: 0.875rem 1.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.mini-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.mini-tab:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.mini-tab.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.mini-tab.active::before {
    opacity: 1;
}

/* Reports Content Area */
.reports-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    min-height: 400px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.reports-content:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Placeholder Message */
.placeholder-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.placeholder-message h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.placeholder-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.placeholder-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: left;
}

.placeholder-details p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.placeholder-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.placeholder-details li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.placeholder-details li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Responsive Design for Reports Page */
@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
        gap: 1rem;
    }

    .reports-header__right {
        width: 100%;
    }

    .time-filter {
        width: 100%;
    }

    .reports-tab-title {
        font-size: 1.5rem;
    }

    .mini-tabs-container {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .mini-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .reports-content {
        padding: 2rem 1.5rem;
    }

    .placeholder-message {
        padding: 1rem;
    }

    .placeholder-icon {
        font-size: 3rem;
    }

    .placeholder-message h3 {
        font-size: 1.5rem;
    }

    .placeholder-message p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .mini-tab {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    .placeholder-details {
        padding: 1rem;
    }
}

/* Light Mode Adjustments for Reports Page */
[data-theme="light"] .reports-header {
    border-bottom-color: var(--glass-border);
}

[data-theme="light"] .time-filter {
    background: var(--bg-secondary);
    border-color: var(--glass-border);
}

[data-theme="light"] .time-filter:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .mini-tab {
    background: var(--bg-secondary);
    border-color: var(--glass-border);
}

[data-theme="light"] .mini-tab:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .mini-tab.active {
    background: var(--primary-gradient);
    color: white;
}

[data-theme="light"] .reports-content {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .reports-content:hover {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .placeholder-details {
    background: var(--bg-tertiary);
    border-color: var(--glass-border);
}

/* ==================== Spending Dashboard ==================== */

.spending-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Summary Cards Row */
.spending-summary-cards {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

.spending-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.spending-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.spending-card--total {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

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

.spending-card__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.spending-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.spending-card__change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.spending-card__change.positive {
    color: var(--accent-green);
}

.spending-card__change.negative {
    color: var(--accent-orange);
}

.spending-card--fixed,
.spending-card--discretionary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.spending-card__icon {
    font-size: 1.75rem;
    opacity: 0.8;
}

.spending-card__details {
    display: flex;
    flex-direction: column;
}

.spending-card__details .spending-card__label {
    margin-bottom: 0.25rem;
}

.spending-card__details .spending-card__value {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.spending-card__percent {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-filter-mini {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* Main Content Grid */
.spending-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1.5rem;
}

.spending-chart-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.spending-chart-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.chart-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-card__subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

/* Categories List */
.categories-list {
    display: flex;
    flex-direction: column;
}

.category-row {
    display: grid;
    grid-template-columns: 4px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-row:hover {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
}

.category-row:last-child {
    border-bottom: none;
}

.category-indicator {
    width: 4px;
    height: 100%;
    min-height: 24px;
    border-radius: 2px;
}

.category-info {
    display: flex;
    flex-direction: column;
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-amount {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.category-percent {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

.category-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.categories-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Donut Chart Container */
.spending-chart-card--donut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.donut-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-label {
    color: var(--text-secondary);
}

.legend-percent {
    color: var(--text-primary);
    font-weight: 500;
}

/* Right Column */
.spending-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Transactions List */
.transactions-list {
    display: flex;
    flex-direction: column;
}

.transaction-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.transaction-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.transaction-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Summary Metrics */
.summary-metrics {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.summary-row:last-child {
    border-bottom: none;
}

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

.summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.summary-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.summary-amount {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.summary-amount.accent {
    color: var(--accent-green);
    font-weight: 600;
}

/* Bottom Charts Grid */
.spending-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    height: 200px;
    position: relative;
}

.stacked-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.legend-dot--fixed {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
}

.legend-dot--disc {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .spending-summary-cards {
        grid-template-columns: 1fr;
    }

    .spending-main-grid {
        grid-template-columns: 1fr;
    }

    .spending-bottom-grid {
        grid-template-columns: 1fr;
    }

    .donut-container {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 768px) {
    .spending-card__value {
        font-size: 1.5rem;
    }

    .spending-card__details .spending-card__value {
        font-size: 1.25rem;
    }

    .category-row {
        grid-template-columns: 4px 1fr auto auto;
    }

    .category-arrow {
        display: none;
    }

    .donut-container {
        width: 200px;
        height: 200px;
    }

    .donut-value {
        font-size: 1.5rem;
    }

    .chart-legend {
        gap: 0.5rem 1rem;
    }
}

/* Light Mode - Spending Dashboard */
[data-theme="light"] .spending-card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .spending-card--total {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

[data-theme="light"] .spending-chart-card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .time-filter-mini {
    background: var(--bg-tertiary);
}

[data-theme="light"] .transaction-icon {
    background: var(--bg-tertiary);
}

/* ==================== NEW SPENDING LAYOUT ==================== */

/* Summary Row - All 3 cards in one row with dividers */
.spending-summary-row {
    display: flex;
    align-items: stretch;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.spending-summary-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
}

.spending-summary-card--total {
    flex: 1.3;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
}

.spending-divider {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: -0.5rem 0;
}

.summary-card-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.summary-card-content {
    display: flex;
    flex-direction: column;
}

.summary-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.summary-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.spending-summary-card--total .summary-card-value {
    font-size: 2.25rem;
}

.summary-card-change {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.summary-card-change.positive {
    color: #4ade80;
}

.summary-card-change.negative {
    color: #f97316;
}

.summary-card-percent {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* Main Layout - Combined Categories + Pie Chart | Transactions */
.spending-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Combined Categories + Pie Chart Card */
.spending-combined-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.combined-card-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: start;
}

.categories-column {
    display: flex;
    flex-direction: column;
    padding-right: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.categories-list {
    flex: 1;
}

/* Subtle divider between Categories and Pie Chart */
.combined-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(102, 126, 234, 0.3) 20%,
            rgba(118, 75, 162, 0.4) 50%,
            rgba(102, 126, 234, 0.3) 80%,
            transparent 100%);
    margin: 0 1rem;
}

.donut-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 1.5rem;
}

/* Smaller donut chart to reduce empty space */
.spending-combined-card .donut-container {
    width: 220px;
    height: 220px;
}

.spending-combined-card .chart-legend {
    margin-top: 1rem;
    gap: 0.5rem 1rem;
}

/* Right Panel - Transactions + Summary */
.spending-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* More vibrant category colors */
.category-row .category-indicator {
    box-shadow: 0 0 8px currentColor;
}

/* Responsive */
@media (max-width: 1200px) {
    .spending-summary-row {
        flex-direction: column;
        gap: 1rem;
    }

    .spending-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .spending-summary-card {
        padding: 0.5rem 0;
    }

    .spending-main-layout {
        grid-template-columns: 1fr;
    }

    .combined-card-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .combined-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg,
                transparent 0%,
                rgba(102, 126, 234, 0.3) 20%,
                rgba(118, 75, 162, 0.4) 50%,
                rgba(102, 126, 234, 0.3) 80%,
                transparent 100%);
        margin: 0.5rem 0;
    }

    .categories-column {
        padding-right: 0;
    }

    .donut-column {
        padding-left: 0;
    }
}

/* Light mode adjustments */
[data-theme="light"] .spending-summary-row {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .spending-combined-card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .spending-divider {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* ==================== 4-BOX GRID LAYOUT ==================== */

/* 4-Box Grid container */
.spending-four-box-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
}

.spending-box-item {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Pie chart box specific - fill the space */
.spending-box-item:nth-child(2) {
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Compact categories list - less padding */
.categories-list--compact .category-row {
    padding: 0.625rem 0;
}

.categories-list--compact .category-name {
    font-size: 0.9rem;
}

.categories-list--compact .category-amount {
    font-size: 0.9rem;
}

.categories-list--compact .categories-footer {
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

/* Compact donut chart - Fill the box better */
.donut-container--compact {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.donut-container--compact .donut-label {
    font-size: 0.85rem;
}

.donut-container--compact .donut-value {
    font-size: 1.5rem;
}

/* Compact chart legend */
.chart-legend--compact {
    margin-top: 0.75rem;
    gap: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.chart-legend--compact .legend-item {
    font-size: 0.8rem;
}

/* Compact chart containers */
.chart-container--compact {
    height: 150px;
    position: relative;
}

/* Make chart card titles smaller in grid */
.spending-four-box-grid .chart-card__title {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.spending-four-box-grid .chart-card__subtitle {
    font-size: 0.8rem;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
}

/* Adjust stacked legend in compact mode */
.spending-four-box-grid .stacked-legend {
    margin-top: 0.5rem;
    gap: 1rem;
    font-size: 0.85rem;
}

/* Update main layout for new structure */
.spending-main-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 1rem;
}

/* Right panel adjustments */
.spending-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .spending-main-layout {
        grid-template-columns: 1.8fr 1fr;
    }
}

@media (max-width: 1200px) {
    .spending-main-layout {
        grid-template-columns: 1fr;
    }

    .spending-four-box-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .spending-four-box-grid {
        grid-template-columns: 1fr;
    }

    .donut-container--compact {
        width: 160px;
        height: 160px;
    }

    .chart-container--compact {
        height: 130px;
    }
}

/* Light mode */
[data-theme="light"] .spending-four-box-grid .spending-chart-card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

/* ==================== INTERACTIVE ELEMENTS ==================== */

/* Category Arrow - Enhanced Clickable */
.category-arrow {
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.category-arrow:hover {
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent-purple);
    transform: translateX(2px);
}

/* Clickable Transaction Rows */
.transaction-row--clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.transaction-row--clickable:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

/* ==================== TRANSACTION POPUP ==================== */

.transaction-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.transaction-popup-overlay.active {
    opacity: 1;
}

.transaction-popup-card {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.98) 0%, rgba(20, 20, 35, 0.98) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-xl);
    padding: 0;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(102, 126, 234, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.transaction-popup-overlay.active .transaction-popup-card {
    transform: scale(1) translateY(0);
}

.popup-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    line-height: 1;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: var(--radius-md);
    font-size: 1.75rem;
}

.popup-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.popup-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: block;
}

.popup-body {
    padding: 1.5rem;
}

.popup-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.popup-detail-row:last-child {
    border-bottom: none;
}

.popup-detail-row--notes {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

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

.popup-value {
    font-weight: 500;
    color: var(--text-primary);
}

.popup-value--amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f87171;
}

.popup-footer {
    padding: 1rem 1.5rem 1.5rem;
}

.popup-action-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.popup-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Light mode popup */
[data-theme="light"] .transaction-popup-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

[data-theme="light"] .popup-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
}

[data-theme="light"] .popup-detail-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .popup-close-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

[data-theme="light"] .popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ==================== EARNINGS DASHBOARD - NEW DESIGN ==================== */

.earnings-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Common Card Style */
.earnings-card {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 22, 38, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.earnings-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

/* Top Row: Total Income + Active vs Passive */
.earnings-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Totals Card */
.earnings-totals-card {
    display: flex;
    align-items: center;
    gap: 0;
}

.totals-section {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem;
}

.totals-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 12px;
}

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

.totals-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.totals-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.totals-value--large {
    font-size: 2rem;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.totals-suffix {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.totals-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.totals-change.positive {
    color: #22c55e;
}

.totals-change.negative {
    color: #ef4444;
}

.totals-divider {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    margin: 0 0.5rem;
}

.totals-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.totals-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.totals-badge.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Active vs Passive Card */
.earnings-active-passive-card {
    display: flex;
    flex-direction: column;
}

.active-passive-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.active-passive-icon {
    font-size: 1.25rem;
}

.active-passive-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.active-passive-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.active-passive-values {
    display: flex;
    gap: 2rem;
}

.ap-value-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ap-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ap-value--passive {
    color: #a855f7;
}

.ap-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Stability Gauge Section */
.stability-gauge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stability-gauge-wrapper {
    position: relative;
    width: 100px;
    height: 55px;
    overflow: hidden;
}

.stability-gauge-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

.stability-gauge-center {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.stability-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stability-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.stability-info .stability-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stability-indicator {
    font-size: 0.7rem;
    font-weight: 600;
}

.stability-indicator--high {
    color: #22c55e;
}

.stability-indicator--medium {
    color: #fbbf24;
}

.stability-indicator--low {
    color: #ef4444;
}

/* Charts Row */
.earnings-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.earnings-trend-card,
.earnings-growth-card {
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.chart-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-icon {
    font-size: 0.9rem;
}

.info-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: help;
}

.chart-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.indicator-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.chart-indicator.positive .indicator-value {
    color: #22c55e;
}

.chart-indicator.negative .indicator-value {
    color: #ef4444;
}

.indicator-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chart-wrapper {
    flex: 1;
    min-height: 160px;
}

.chart-wrapper--tall {
    min-height: 200px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chart-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chart-legend .legend-dot--dashed {
    border: 2px dashed;
    background: transparent !important;
}

/* Bottom Row: Consistency + Reliability */
.earnings-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Consistency Card */
.earnings-consistency-card {
    display: flex;
    flex-direction: column;
}

.consistency-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.15);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

.consistency-month {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a855f7;
}

.consistency-variance {
    font-size: 0.8rem;
    font-weight: 600;
}

.consistency-variance.positive {
    color: #22c55e;
}

.consistency-variance.negative {
    color: #ef4444;
}

/* Reliability Card */
.earnings-reliability-card {
    display: flex;
    flex-direction: column;
}

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

.reliability-sources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.reliability-source {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.reliability-source:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.source-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.source-icon {
    font-size: 1.25rem;
}

.source-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.source-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.source-percentage {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.source-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.source-consistency {
    font-size: 0.75rem;
    color: #22c55e;
}

.source-amount {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Reliability Footer */
.reliability-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.dependency-risk,
.passive-growth-stat {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.risk-icon,
.passive-growth-icon {
    font-size: 1rem;
}

.passive-growth-icon {
    color: var(--text-secondary);
}

.risk-content,
.passive-growth-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.risk-label,
.passive-growth-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.risk-value,
.passive-growth-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.passive-growth-value strong {
    color: #22c55e;
}

.passive-growth-period {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Stats Row: Best & Worst Month */
.earnings-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.earnings-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 22, 38, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.earnings-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.earnings-stat-card--best {
    border-left: 3px solid #22c55e;
}

.earnings-stat-card--worst {
    border-left: 3px solid #ef4444;
}

.stat-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 14px;
}

.stat-icon--worst {
    background: rgba(239, 68, 68, 0.12);
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-label--worst {
    color: #fca5a5;
}

.stat-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value--worst {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-month {
    font-size: 0.9rem;
    font-weight: 600;
    color: #22c55e;
}

.stat-month--worst {
    color: #ef4444;
}

.stat-comparison {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-comparison.positive {
    color: #22c55e;
}

.stat-comparison.negative {
    color: #ef4444;
}

.stat-chart-icon {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1200px) {

    .earnings-top-row,
    .earnings-charts-row,
    .earnings-bottom-row,
    .earnings-stats-row {
        grid-template-columns: 1fr;
    }

    .totals-divider {
        display: none;
    }

    .earnings-totals-card {
        flex-direction: column;
        gap: 1rem;
    }

    .reliability-sources {
        grid-template-columns: 1fr;
    }

    .reliability-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .active-passive-content {
        flex-direction: column;
        gap: 1rem;
    }

    .stability-gauge-section {
        align-items: flex-start;
    }

    .active-passive-values {
        gap: 1.5rem;
    }

    .ap-value {
        font-size: 1.25rem;
    }

    .totals-value--large {
        font-size: 1.75rem;
    }
}

/* Light Mode */
[data-theme="light"] .earnings-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .earnings-stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

[data-theme="light"] .totals-divider {
    background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.2), transparent);
}

[data-theme="light"] .reliability-source {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .dependency-risk,
[data-theme="light"] .passive-growth-stat {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .consistency-tag {
    background: rgba(139, 92, 246, 0.1);
}

/* End of Earnings Dashboard Styles */


/* ==================== CASH FLOW DASHBOARD ==================== */

.cashflow-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.cashflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

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

.cashflow-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.cashflow-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cashflow-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

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

.cashflow-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cashflow-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
}

.cashflow-period-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #a855f7;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Summary Row */
.cashflow-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.cashflow-summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.cashflow-summary-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.cashflow-summary-card--netflow {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.05));
    border-color: rgba(34, 197, 94, 0.3);
}

.cashflow-summary-card--outflow {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
}

.summary-card-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.summary-card-icon--green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.2));
}

.summary-card-icon--red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.2));
}

.summary-card-icon--purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(139, 92, 246, 0.2));
}

.summary-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-card-value--large {
    font-size: 1.75rem;
    color: #22c55e;
}

.summary-card-value--red {
    color: #ef4444;
}

.summary-card-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.summary-card-change.positive {
    color: #22c55e;
}

.summary-card-change.negative {
    color: #ef4444;
}

.summary-card-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.summary-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.summary-badge.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.summary-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.summary-badge-pct {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.summary-badge-pct.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.summary-badge-pct.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.surplus-stats {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.surplus-count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.deficit-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.burnrate-link {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-top: 0.5rem;
}

/* Charts Row */
.cashflow-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.cashflow-chart-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
}

.cashflow-trend-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cashflow-chart-wrapper {
    height: 250px;
    position: relative;
}

.cashflow-chart-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cashflow-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cashflow-stat-value {
    font-size: 1rem;
    font-weight: 600;
}

.cashflow-stat-value.positive {
    color: #22c55e;
}

.cashflow-stat-value.negative {
    color: #ef4444;
}

.cashflow-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cashflow-stat-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cashflow-stat-badge.positive {
    color: #22c55e;
}

.cashflow-tooltip-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border-left: 3px solid #a855f7;
}

/* Burn Rate Card */
.cashflow-burnrate-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.burnrate-gauge-container {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.burnrate-gauge-center {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.burnrate-percentage {
    font-size: 2rem;
    font-weight: 800;
}

.burnrate-percentage.positive {
    color: #22c55e;
}

.burnrate-percentage.warning {
    color: #f59e0b;
}

.burnrate-percentage.negative {
    color: #ef4444;
}

.burnrate-ratio {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.burnrate-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.burnrate-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.burnrate-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.burnrate-stat-value.positive {
    color: #22c55e;
}

.burnrate-stat-value.negative {
    color: #ef4444;
}

.burnrate-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Bottom Row */
.cashflow-bottom-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
}

/* Breakdown Card */
.cashflow-breakdown-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breakdown-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.breakdown-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
}

.breakdown-donut-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.breakdown-donut-wrapper {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

.breakdown-divider {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.breakdown-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.legend-row .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-row .legend-name {
    flex: 1;
    color: var(--text-secondary);
}

.legend-row .legend-pct {
    font-weight: 600;
    color: var(--text-primary);
}

.legend-row--total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-row--total .legend-icon {
    font-size: 0.9rem;
}

.legend-row--total .legend-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Streaks Card */
.cashflow-streaks-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.streaks-tabs {
    display: flex;
    gap: 0.5rem;
}

.streak-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.streak-tab.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.1));
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.streak-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.streaks-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.streak-count {
    font-size: 0.9rem;
    font-weight: 600;
}

.streak-count.positive {
    color: #22c55e;
}

.streak-count.negative {
    color: #ef4444;
}

.streak-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.streaks-details {
    margin-top: 0.5rem;
}

.streaks-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.streak-item {
    display: grid;
    grid-template-columns: 24px 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.streak-icon {
    font-size: 1rem;
}

.streak-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

.streak-amount {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.streak-pct {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.streak-bar {
    grid-column: 1 / -1;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.streak-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #10b981);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Burn Rate Details Card */
.cashflow-burnrate-details-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.burnrate-main {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.burnrate-main-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.burnrate-main-value.positive {
    color: #22c55e;
}

.burnrate-main-value.warning {
    color: #f59e0b;
}

.burnrate-main-value.negative {
    color: #ef4444;
}

.burnrate-main-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.burnrate-main-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.burnrate-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.burnrate-detail-card {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.burnrate-detail-card--best {
    border-left: 3px solid #22c55e;
}

.burnrate-detail-card--worst {
    border-left: 3px solid #ef4444;
}

.burnrate-detail-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.burnrate-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.burnrate-detail-value.positive {
    color: #22c55e;
}

.burnrate-detail-value.negative {
    color: #ef4444;
}

.burnrate-detail-sublabel {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .cashflow-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .cashflow-charts-row {
        grid-template-columns: 1fr;
    }

    .cashflow-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cashflow-summary-row {
        grid-template-columns: 1fr;
    }

    .cashflow-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .breakdown-content {
        grid-template-columns: 1fr;
    }

    .breakdown-divider {
        width: 100%;
        height: 1px;
    }

    .cashflow-chart-footer {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Light mode overrides for Cash Flow */
[data-theme="light"] .cashflow-summary-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cashflow-chart-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cashflow-filter-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cashflow-tooltip-note {
    background: rgba(139, 92, 246, 0.08);
}

/* End of Cash Flow Dashboard Styles */


/* ============================================
   NET WORTH DASHBOARD STYLES
   ============================================ */

.networth-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Summary Row - 4 Cards */
.networth-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1200px) {
    .networth-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .networth-summary-row {
        grid-template-columns: 1fr;
    }
}

/* Summary Card Base */
.networth-summary-card {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.networth-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.networth-card__icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.networth-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.networth-card__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.networth-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.networth-card__value--large {
    font-size: 2rem;
}

.networth-card__change {
    font-size: 0.8rem;
    font-weight: 500;
}

.networth-card__change.positive {
    color: #43e97b;
}

.networth-card__change.negative {
    color: #f59e0b;
}

.networth-card__status {
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.networth-card__status.positive {
    color: #43e97b;
}

.networth-card__status.negative {
    color: #f59e0b;
}

/* Card Variants */
.networth-card--primary {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15) 0%, rgba(56, 249, 215, 0.08) 100%);
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.networth-card--primary .networth-card__icon {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
}

.networth-card--primary .networth-card__value {
    color: #43e97b;
}

.networth-card--assets {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.networth-card--assets .networth-card__icon {
    background: rgba(34, 197, 94, 0.2);
}

.networth-card--liabilities {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.networth-card--liabilities .networth-card__icon {
    background: rgba(245, 158, 11, 0.2);
}

.networth-card--ratio {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(168, 85, 247, 0.06) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.networth-card--ratio .networth-card__icon {
    background: rgba(139, 92, 246, 0.2);
}

/* Charts Row */
.networth-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .networth-charts-row {
        grid-template-columns: 1fr;
    }
}

/* Chart Card Base */
.networth-chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.networth-chart-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.networth-chart-card .chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-title--highlight {
    color: #43e97b;
}

.networth-chart-card .chart-indicator {
    text-align: right;
}

.networth-chart-card .indicator-value {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

.networth-chart-card .indicator-value.positive,
.networth-chart-card .chart-indicator.positive .indicator-value {
    color: #43e97b;
}

.networth-chart-card .indicator-value.negative,
.networth-chart-card .chart-indicator.negative .indicator-value {
    color: #f59e0b;
}

.networth-chart-card .indicator-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Chart Wrapper */
.networth-chart-card .chart-wrapper {
    height: 180px;
    position: relative;
}

.networth-chart-card .chart-wrapper--tall {
    height: 250px;
}

/* Chart Footer */
.networth-chart-card .chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.chart-summary {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.chart-summary .summary-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-summary .summary-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.chart-summary .summary-dot--assets {
    background: #43e97b;
}

.chart-summary .summary-label {
    font-weight: 400;
    color: var(--text-secondary);
}

.chart-summary .summary-divider {
    color: #f59e0b;
}

.chart-summary .summary-item--liabilities {
    color: #f59e0b;
}

.chart-summary .summary-equals {
    color: var(--text-secondary);
}

.chart-summary .summary-item--networth {
    color: #8b5cf6;
    font-weight: 700;
}

.chart-legend {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chart-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Net Worth Trend Card */
.networth-trend-card {
    min-height: 420px;
}

/* Net Worth Growth Card */
.networth-growth-card {
    display: flex;
    flex-direction: column;
}

.growth-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.growth-gauge-wrapper {
    position: relative;
    width: 180px;
    height: 100px;
}

.growth-gauge-wrapper canvas {
    width: 100% !important;
    height: auto !important;
}

.growth-gauge-center {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.growth-percentage {
    font-size: 2rem;
    font-weight: 700;
}

.growth-percentage.positive {
    color: #43e97b;
}

.growth-percentage.negative {
    color: #f59e0b;
}

.growth-status {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: var(--spacing-sm);
}

.growth-status.positive {
    color: #43e97b;
}

.growth-status.warning {
    color: #f59e0b;
}

.growth-details {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

.growth-detail-item {
    text-align: center;
}

.growth-detail-item .detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    color: #43e97b;
}

.growth-detail-item--liabilities .detail-value {
    color: #f59e0b;
}

.growth-detail-item .detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Bottom Row - 3 Cards */
.networth-bottom-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.networth-bottom-row>.networth-chart-card {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1200px) {
    .networth-bottom-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .networth-bottom-row {
        grid-template-columns: 1fr;
    }
}

/* Balance Analysis Card */
.balance-analysis-card .chart-wrapper {
    height: 120px;
}

.balance-summary {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.balance-summary-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.balance-summary-item .balance-icon {
    color: #43e97b;
}

.balance-summary-item--liab {
    color: #f59e0b;
}

.balance-summary-item--net {
    color: #a855f7;
}

.balance-summary-item .balance-label {
    font-weight: 400;
    color: var(--text-secondary);
}

.balance-footer {
    margin-top: var(--spacing-md);
}

.balance-analysis-card .chart-wrapper {
    flex-shrink: 0;
}

.balance-analysis-card .balance-stats-row {
    margin-top: auto;
}

.balance-footer-summary {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.balance-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
}

.balance-stat-card {
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.balance-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

.balance-stat-card .stat-value {
    font-size: 1rem;
    font-weight: 600;
}

.balance-stat-card .stat-value.positive {
    color: #43e97b;
}

.balance-stat-card .stat-pct {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Assets Breakdown Card */
.assets-breakdown-card {
    display: flex;
    flex-direction: column;
}

.assets-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.asset-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.asset-breakdown-item .asset-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
}

.asset-breakdown-item .asset-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.asset-breakdown-item .asset-amount {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.assets-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm);
    border-top: 1px solid var(--glass-border);
    margin-bottom: var(--spacing-md);
}

.breakdown-total-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breakdown-total-value {
    font-size: 1rem;
    font-weight: 700;
    color: #43e97b;
}

.surplus-deficit-section {
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.surplus-deficit-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--spacing-sm);
}

.sd-toggle-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sd-toggle-btn--active {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.surplus-deficit-values {
    display: flex;
    justify-content: space-between;
}

.sd-value-item {
    text-align: center;
    padding: var(--spacing-sm);
}

.sd-value-item--surplus .sd-label {
    color: #43e97b;
    font-weight: 600;
}

.sd-value-item--deficit .sd-label {
    color: #f59e0b;
    font-weight: 600;
}

/* Debt Ratio Card - Compact Layout */
.debt-ratio-card {
    display: flex;
    flex-direction: column;
}

.debt-ratio-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.ratio-info-icon {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: help;
}

.debt-ratio-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    flex: 1;
}

.debt-ratio-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.debt-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.debt-gauge-wrapper {
    position: relative;
    width: 120px;
    height: 70px;
}

.debt-gauge-wrapper canvas {
    width: 120px !important;
    height: 70px !important;
}

.debt-gauge-center {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
    z-index: 2;
}

.debt-percentage {
    font-size: 1.4rem;
    font-weight: 700;
}

.debt-percentage.good {
    color: #22c55e;
}

.debt-percentage.warning {
    color: #f59e0b;
}

.debt-percentage.danger {
    color: #ef4444;
}

.debt-status-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.debt-status-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--spacing-xs);
    text-align: center;
}

.debt-status-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.debt-status-value {
    font-size: 1rem;
    font-weight: 600;
}

.debt-status-value.positive {
    color: #43e97b;
}

.debt-status-value.warning {
    color: #f59e0b;
}

.debt-status-value.danger {
    color: #ef4444;
}

.debt-description {
    text-align: center;
    padding: 0;
}

.debt-description p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.debt-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    width: 100%;
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.debt-detail-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(67, 233, 123, 0.08);
    border-radius: var(--radius-md);
    border: 1px solid rgba(67, 233, 123, 0.2);
}

.debt-detail-card--worst {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.debt-detail-icon {
    font-size: 0.9rem;
    color: #43e97b;
}

.debt-detail-card--worst .debt-detail-icon {
    color: #f59e0b;
}

.debt-detail-content {
    display: flex;
    flex-direction: column;
}

.debt-detail-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.debt-detail-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #43e97b;
}

.debt-detail-value.negative {
    color: #f59e0b;
}

/* ===== ENHANCED NET WORTH DASHBOARD STYLES ===== */

/* Page Header */
.networth-page-header {
    margin-bottom: var(--spacing-lg);
}

.networth-page-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.networth-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.1));
    border-radius: var(--radius-md);
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.networth-title-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.networth-title-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

/* Enhanced Summary Cards */
.networth-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.networth-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    width: fit-content;
}

.networth-card__badge .badge-icon {
    font-size: 1rem;
}

.networth-card__badge .badge-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.networth-card__value-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.networth-card__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.networth-card__value--ratio {
    font-size: 2.2rem;
}

.networth-card--primary .networth-card__value {
    color: #43e97b;
}

.networth-card--assets .networth-card__value {
    color: #f59e0b;
}

.networth-card--liabilities .networth-card__value {
    color: #f97316;
}

/* Chart Indicator Badge */
.chart-indicator-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.2);
}

.chart-indicator-badge.negative {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.chart-indicator-badge .indicator-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: #43e97b;
}

.chart-indicator-badge.negative .indicator-pct {
    color: #f59e0b;
}

.chart-indicator-badge .indicator-amt {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Enhanced Chart Footer */
.chart-footer-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-summary-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-summary-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-summary-item .footer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #43e97b;
}

.footer-summary-item .footer-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-summary-item .footer-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-summary-item--assets .footer-value {
    color: #43e97b;
}

.footer-summary-item--liabilities {
    color: #f59e0b;
}

.footer-summary-item--liabilities .footer-value {
    color: #f59e0b;
}

.footer-summary-item--networth .footer-value {
    color: #8b5cf6;
    font-weight: 700;
}

.footer-divider,
.footer-equals {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-growth-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.2);
}

.footer-growth-badge .growth-icon {
    font-size: 1rem;
}

.footer-growth-badge .growth-pct {
    font-size: 0.9rem;
    font-weight: 600;
    color: #43e97b;
}

.footer-growth-badge .growth-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Enhanced Growth Gauge */
.growth-gauge-wrapper-lg {
    position: relative;
    width: 200px;
    height: 110px;
}

.growth-gauge-wrapper-lg canvas {
    width: 100% !important;
    height: auto !important;
}

.growth-gauge-center-lg {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.growth-percentage-lg {
    font-size: 2.5rem;
    font-weight: 700;
}

.growth-percentage-lg.positive {
    color: #43e97b;
}

.growth-percentage-lg.negative {
    color: #f59e0b;
}

.growth-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    margin-top: var(--spacing-sm);
}

.growth-status-badge.positive {
    background: rgba(67, 233, 123, 0.15);
    color: #43e97b;
}

.growth-status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.growth-status-badge .status-check {
    font-size: 0.9rem;
}

.growth-status-badge .status-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Growth Details */
.growth-details-enhanced {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
}

.growth-detail-box {
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.growth-detail-box .detail-value-lg {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
}

.growth-detail-box--assets .detail-value-lg {
    color: #43e97b;
}

.growth-detail-box--liabilities .detail-value-lg {
    color: #f59e0b;
}

.growth-detail-box .detail-label-lg {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Balance Analysis Enhanced */
.balance-header-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.balance-badge--assets {
    background: rgba(67, 233, 123, 0.1);
    color: #43e97b;
}

.balance-badge--liab {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.balance-badge--net {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.balance-badge .badge-icon-sm {
    font-size: 0.85rem;
}

.balance-badge .badge-suffix {
    font-weight: 400;
    opacity: 0.8;
}

.chart-wrapper--balance {
    height: 130px;
}

/* Balance Footer Summary Row */
.balance-footer-summary-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.summary-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-pill .pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #43e97b;
}

.summary-pill--assets {
    color: #43e97b;
}

.summary-pill--liab {
    color: #f59e0b;
}

.summary-pill--net {
    color: #a855f7;
}

.summary-pill .pill-label {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.pill-divider {
    color: var(--text-muted);
}

/* Balance Stat Cards */
.balance-stat-card--change,
.balance-stat-card--best {
    background: rgba(67, 233, 123, 0.05);
    border-color: rgba(67, 233, 123, 0.15);
}

/* Surplus Deficit Enhanced */
.sd-toggle-btn--surplus.sd-toggle-btn--active {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.sd-toggle-btn--deficit.sd-toggle-btn--active {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.toggle-icon {
    font-size: 0.9rem;
}

.toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.toggle-suffix {
    font-weight: 400;
    opacity: 0.8;
}

.sd-value-item .sd-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.sd-value-item--surplus .sd-value {
    color: #43e97b;
}

.sd-value-item--deficit .sd-value {
    color: #f59e0b;
}

/* Debt Ratio Enhanced */
.ratio-info-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
}

.ratio-info-badge .info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.ratio-info-badge .info-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: help;
}

.debt-ratio-gauge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.debt-gauge-wrapper-lg {
    position: relative;
    width: 160px;
    height: 90px;
    margin: 0 auto;
}

.debt-gauge-wrapper-lg canvas {
    width: 160px !important;
    height: 90px !important;
}

.debt-gauge-center-lg {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.debt-percentage-lg {
    font-size: 1.75rem;
    font-weight: 700;
}

.debt-percentage-lg.good {
    color: #22c55e;
}

.debt-percentage-lg.warning {
    color: #f59e0b;
}

.debt-percentage-lg.danger {
    color: #ef4444;
}

.debt-health-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.debt-health-badge.good {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.debt-health-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.debt-health-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.debt-description-enhanced {
    text-align: center;
    padding: 0 var(--spacing-sm);
}

.debt-description-enhanced p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.debt-description-enhanced strong {
    color: var(--text-primary);
}

.debt-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    width: 100%;
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.debt-detail-card-enhanced {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

.debt-detail-card--delta {
    background: rgba(67, 233, 123, 0.08);
    border: 1px solid rgba(67, 233, 123, 0.2);
}

.debt-detail-card--worst {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.debt-detail-card-enhanced .detail-icon {
    font-size: 0.9rem;
    margin-top: 2px;
}

.debt-detail-card--delta .detail-icon {
    color: #43e97b;
}

.debt-detail-card--worst .detail-icon {
    color: #f59e0b;
}

.debt-detail-card-enhanced .detail-info {
    display: flex;
    flex-direction: column;
}

.debt-detail-card-enhanced .detail-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.debt-detail-card-enhanced .detail-value-lg {
    font-size: 0.9rem;
    font-weight: 600;
}

.debt-detail-card--delta .detail-value-lg {
    color: #43e97b;
}

.debt-detail-card--worst .detail-value-lg {
    color: #f59e0b;
}

.debt-detail-card-enhanced .detail-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* End of Net Worth Dashboard Styles */
[data-theme="light"] .networth-summary-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .networth-chart-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .networth-card--primary {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.05) 100%);
    border-color: rgba(67, 233, 123, 0.2);
}

[data-theme="light"] .networth-card--assets {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(34, 197, 94, 0.15);
}

[data-theme="light"] .networth-card--liabilities {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .networth-card--ratio {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.03) 100%);
    border-color: rgba(139, 92, 246, 0.15);
}

/* End of Net Worth Dashboard Styles */


/* ==================== ASSETS DASHBOARD STYLES ==================== */

.assets-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.assets-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.assets-page-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.assets-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15) 0%, rgba(56, 249, 215, 0.1) 100%);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
}

.assets-title-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.assets-title-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

/* Summary Cards Row */
.assets-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.assets-summary-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assets-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Card Variants */
.assets-card--primary {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.05) 100%);
    border-color: rgba(67, 233, 123, 0.2);
}

.assets-card--liquid {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(56, 189, 248, 0.03) 100%);
    border-color: rgba(14, 165, 233, 0.15);
}

.assets-card--fixed {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(244, 114, 182, 0.03) 100%);
    border-color: rgba(236, 72, 153, 0.15);
}

.assets-card--idle {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.03) 100%);
    border-color: rgba(139, 92, 246, 0.15);
}

.assets-card__badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assets-card__badge .badge-icon {
    font-size: 1rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

.assets-card__badge .badge-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.assets-card__value-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assets-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.assets-card__change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.assets-card__change.positive {
    color: #22c55e;
}

.assets-card__change.negative {
    color: #ef4444;
}

.assets-card__pct {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.assets-card__pct .pct-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.assets-manage-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-sm);
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assets-manage-btn:hover {
    background: rgba(139, 92, 246, 0.3);
}

/* Charts Row */
.assets-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
}

.assets-chart-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

/* Assets Growth Card */
.assets-growth-card {
    display: flex;
    flex-direction: column;
}

.assets-growth-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.assets-growth-card .chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.assets-growth-card .chart-title--highlight {
    color: #22c55e;
}

.monthly-values-row {
    display: flex;
    justify-content: space-around;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.monthly-value-item {
    text-align: center;
}

.mv-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.mv-change.positive {
    color: #22c55e;
}

.mv-change.negative {
    color: #ef4444;
}

/* Breakdown Card */
.assets-breakdown-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.breakdown-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-title .title-highlight {
    color: #ec4899;
}

.breakdown-content {
    display: flex;
    gap: var(--spacing-lg);
}

.breakdown-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-section--liquid {
    padding-right: var(--spacing-md);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.breakdown-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.breakdown-header .breakdown-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.breakdown-section--liquid .breakdown-value {
    color: #22c55e;
}

.breakdown-section--fixed .breakdown-value {
    color: #ec4899;
}

.breakdown-header .breakdown-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-item .item-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.item-icon--bank {
    background: #0ea5e9;
}

.item-icon--cash {
    background: #f59e0b;
}

.item-icon--investment {
    background: #a855f7;
}

.item-icon--property {
    background: #ec4899;
}

.breakdown-item .item-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-item .item-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.dead-burn-indicator {
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dead-burn-indicator .indicator-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
}

.dead-burn-indicator .indicator-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Bottom Row */
.assets-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: var(--spacing-md);
}

/* Allocation Card */
.assets-allocation-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.allocation-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.allocation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.allocation-chart-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}

.allocation-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.allocation-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.allocation-total-pct {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.allocation-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.allocation-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.allocation-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.allocation-legend .legend-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    flex: 1;
}

.allocation-legend .legend-pct {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.allocation-footer {
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.allocation-footer .footer-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.allocation-footer .footer-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.allocation-footer .footer-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Details Card */
.assets-details-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-buttons {
    display: flex;
    gap: 0.25rem;
}

.toggle-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.details-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.details-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.details-subtitle .subtitle-highlight {
    color: #ec4899;
}

.details-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.detail-row--muted {
    opacity: 0.7;
}

.detail-row .detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-row .detail-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.detail-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
}

.detail-summary .summary-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.detail-summary .summary-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: auto;
}

.detail-summary .summary-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Growth Opportunity */
.growth-opportunity {
    margin-top: auto;
    padding: var(--spacing-sm);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-md);
}

.opportunity-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #22c55e;
    margin: 0 0 0.25rem;
}

.opportunity-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}

.opportunity-text strong {
    color: #22c55e;
}

.opportunity-suggestion {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.opportunity-suggestion .suggestion-value {
    color: var(--text-primary);
    font-weight: 600;
}

.opportunity-suggestion .suggestion-desc {
    color: #22c55e;
}

.opportunity-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.opportunity-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.opportunity-stats .stat-icon {
    color: #22c55e;
}

.opportunity-stats .stat-value {
    color: #22c55e;
    font-weight: 600;
}

.opportunity-stats .stat-item--muted .stat-label {
    color: var(--text-muted);
    font-size: 0.65rem;
}

/* Accounts Card */
.assets-accounts-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.accounts-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border-left: 3px solid #22c55e;
    transition: all 0.2s ease;
}

.account-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-row:nth-child(2) {
    border-left-color: #0ea5e9;
}

.account-row:nth-child(3) {
    border-left-color: #a855f7;
}

.account-row:nth-child(4) {
    border-left-color: #f59e0b;
}

.account-row:nth-child(5) {
    border-left-color: #ec4899;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.account-info .account-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.account-info .account-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.account-info .account-sub .sub-label {
    color: var(--text-muted);
    font-size: 0.6rem;
}

.account-value .value-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .assets-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .assets-charts-row {
        grid-template-columns: 1fr;
    }

    .assets-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .assets-summary-row {
        grid-template-columns: 1fr;
    }

    .breakdown-content {
        flex-direction: column;
    }

    .breakdown-section--liquid {
        padding-right: 0;
        padding-bottom: var(--spacing-md);
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* Light Theme Support */
[data-theme="light"] .assets-summary-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .assets-chart-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .assets-card--primary {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.05) 100%);
    border-color: rgba(67, 233, 123, 0.2);
}

/* End of Assets Dashboard Styles */


/* ==================== LIABILITIES DASHBOARD STYLES ==================== */

.liabilities-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.liabilities-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.liabilities-page-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.liabilities-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
}

.liabilities-title-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.liabilities-title-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

/* Summary Cards Row */
.liabilities-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.liabilities-summary-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.liabilities-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Card Variants */
.liabilities-card--primary {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.liabilities-card--credit {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.03) 100%);
    border-color: rgba(239, 68, 68, 0.15);
}

.liabilities-card--loan {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.15);
}

.liabilities-card--interest {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-color: rgba(168, 85, 247, 0.15);
}

.liabilities-card__badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.liabilities-card__badge .badge-icon {
    font-size: 1rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

.liabilities-card__badge .badge-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.liabilities-card__value-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.liabilities-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.liabilities-card__change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.liabilities-card__change.positive {
    color: #22c55e;
}

.liabilities-card__change.negative {
    color: #ef4444;
}

.liabilities-card__pct {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.liabilities-card__pct.negative {
    color: #ef4444;
}

.liabilities-card__pct .pct-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Charts Row */
.liabilities-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
}

.liabilities-chart-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

/* Trend Card */
.liabilities-trend-card .chart-title--highlight {
    color: #ef4444;
}

/* Utilization Card */
.liabilities-utilization-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.utilization-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.utilization-title .title-highlight {
    color: #ef4444;
}

.utilization-gauge-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.utilization-gauge-wrapper {
    position: relative;
    width: 160px;
    height: 120px;
}

.utilization-gauge-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.utilization-gauge-center {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.utilization-percentage {
    font-size: 1.5rem;
    font-weight: 700;
}

.utilization-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.utilization-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.utilization-breakdown .breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.utilization-breakdown .breakdown-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.utilization-breakdown .breakdown-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.utilization-breakdown .breakdown-value.positive {
    color: #22c55e;
}

/* Bottom Row */
.liabilities-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: var(--spacing-md);
}

/* Allocation Card */
.liabilities-allocation-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.liabilities-allocation-card .allocation-chart-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

/* Interest Card */
.liabilities-interest-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.interest-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.interest-title .title-highlight {
    color: #f59e0b;
}

.interest-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.interest-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.interest-row .interest-icon {
    font-size: 1.25rem;
}

.interest-row .interest-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.interest-row .interest-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.interest-row .interest-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.interest-row .interest-value.negative {
    color: #ef4444;
}

.payoff-section {
    padding: var(--spacing-sm);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.03) 100%);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-md);
}

.payoff-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 0 0 0.5rem;
}

.payoff-stats {
    display: flex;
    gap: var(--spacing-md);
}

.payoff-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.payoff-stat .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.payoff-stat .stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.debt-health {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.debt-health .health-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.debt-health .health-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debt-health .score-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.debt-health .score-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.debt-health .health-score.positive .score-value {
    color: #22c55e;
}

.debt-health .health-score.positive .score-status {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.debt-health .health-score.warning .score-value {
    color: #f59e0b;
}

.debt-health .health-score.warning .score-status {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.debt-health .health-score.negative .score-value {
    color: #ef4444;
}

.debt-health .health-score.negative .score-status {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Debts Card */
.liabilities-debts-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.debts-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.debts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.debt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border-left: 3px solid #ef4444;
    transition: all 0.2s ease;
}

.debt-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.debt-row:nth-child(2) {
    border-left-color: #f59e0b;
}

.debt-row:nth-child(3) {
    border-left-color: #a855f7;
}

.debt-row:nth-child(4) {
    border-left-color: #0ea5e9;
}

.debt-row:nth-child(5) {
    border-left-color: #ec4899;
}

.debt-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.debt-info .debt-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.debt-info .debt-type {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.debt-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.debt-value .value-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ef4444;
}

.debt-value .value-rate {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .liabilities-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .liabilities-charts-row {
        grid-template-columns: 1fr;
    }

    .liabilities-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .liabilities-summary-row {
        grid-template-columns: 1fr;
    }
}

/* Light Theme Support */
[data-theme="light"] .liabilities-summary-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .liabilities-chart-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

/* End of Liabilities Dashboard Styles */


/* End of Stylesheet */