/* === CSS VARIABLES & RESET === */
        :root {
            --primary: #3a86ff;
            --primary-dark: #2667cc;
            --secondary: #8338ec;
            --success: #48bb78;
            --warning: #ed8936;
            --danger: #f56565;
            --light-bg: #f8f9fa;
            --card-bg: #ffffff;
            --text: #2d3748;
            --text-light: #718096;
            --border: #e2e8f0;
            --shadow: 0 2px 10px rgba(0,0,0,0.05);
            --radius: 12px;
            --sidebar-width: 280px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: var(--light-bg);
            color: var(--text);
            line-height: 1.6;
            overflow-x: hidden;
        }

        .hidden {
            display: none !important;
        }

        /* === LOADING SCREEN === */
        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: opacity 0.5s ease;
        }

        .loading-content {
            text-align: center;
            animation: fadeInUp 1s ease;
        }

        .loading-logo {
            font-size: 4rem;
            margin-bottom: 1rem;
            animation: pulse 2s infinite;
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        /* === ONBOARDING SCREEN === */
        #onboarding-screen {
            min-height: 100vh;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .onboarding-card {
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            padding: 2rem;
            border-radius: var(--radius);
            max-width: 500px;
            width: 100%;
            animation: slideInUp 0.8s ease;
        }

        @keyframes slideInUp {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .form-group {
            margin-bottom: 1.5rem;
            text-align: left;
        }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        input, select, textarea {
            width: 100%;
            padding: 1rem;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            font-size: 1rem;
            background: rgba(255,255,255,0.1);
            color: white;
        }

        input::placeholder, textarea::placeholder {
            color: rgba(255,255,255,0.7);
        }

        /* === MAIN APP LAYOUT === */
        #app-container {
            min-height: 100vh;
            display: flex;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        /* Sidebar */
        #app-sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--border);
            text-align: center;
        }

        .user-brand {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .user-logo {
            width: 50px;
            height: 50px;
            border-radius: 10px;
            object-fit: cover;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
        }

        .company-name {
            font-weight: bold;
            color: var(--primary);
            font-size: 1.2rem;
        }

        .progress-path {
            flex: 1;
            padding: 1.5rem;
        }

        .path-item {
            display: flex;
            align-items: center;
            padding: 1rem;
            margin-bottom: 0.5rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .path-item:hover {
            background: rgba(58, 134, 255, 0.1);
        }

        .path-item.active {
            background: rgba(58, 134, 255, 0.15);
            border-left: 4px solid var(--primary);
        }

        .path-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: var(--light-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            font-size: 0.9rem;
        }

        .path-item.active .path-icon {
            background: var(--primary);
            color: white;
        }

        .path-item.completed .path-icon {
            background: var(--success);
            color: white;
        }

        .path-content {
            flex: 1;
        }

        .path-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }

        .path-desc {
            font-size: 0.8rem;
            color: var(--text-light);
        }

        .sidebar-footer {
            padding: 1.5rem;
            border-top: 1px solid var(--border);
        }

        /* Main Content */
        #app-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .app-header {
            background: var(--card-bg);
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-actions {
            display: flex;
            gap: 0.5rem;
        }

        .main-content {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
        }

        /* Cards */
        .card {
            background: var(--card-bg);
            padding: 1.5rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            margin-bottom: 1.5rem;
        }

        .welcome-card {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            text-align: center;
            padding: 2rem;
        }

        .metric-card {
            text-align: center;
            padding: 1.5rem 1rem;
        }

        .metric-value {
            font-size: 2rem;
            font-weight: bold;
            color: var(--primary);
            margin: 0.5rem 0;
        }

        .metric-label {
            color: var(--text-light);
            font-size: 0.9rem;
        }

        /* Buttons */
        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: var(--border);
            color: var(--text);
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-danger {
            background: var(--danger);
            color: white;
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
        }

        .btn-full {
            width: 100%;
            justify-content: center;
        }

        /* Form Elements */
        .input-group {
            margin-bottom: 1.5rem;
        }

        .input-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        .input-group input, .input-group select, .input-group textarea {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            background: white;
            color: var(--text);
        }

        .input-group textarea {
            min-height: 100px;
            resize: vertical;
            font-family: inherit;
        }

        .text-hint {
            color: var(--text-light);
            font-size: 0.85rem;
            margin-top: 0.25rem;
        }

        /* Help System */
        .help-trigger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            font-size: 0.7rem;
            margin-left: 0.5rem;
            cursor: help;
        }

        .help-content {
            display: none;
            background: var(--light-bg);
            padding: 1rem;
            border-radius: 8px;
            margin-top: 0.5rem;
            border-left: 3px solid var(--primary);
        }

        .help-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .help-example {
            background: white;
            padding: 0.75rem;
            border-radius: 6px;
            margin-top: 0.5rem;
            font-style: italic;
            border-left: 2px solid var(--success);
        }

        /* Progress & Toggles */
        .progress-bar {
            height: 8px;
            background: var(--border);
            border-radius: 4px;
            overflow: hidden;
            margin: 1rem 0;
        }

        .progress-fill {
            height: 100%;
            background: var(--success);
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .toggle-section {
            margin: 1.5rem 0;
        }

        .toggle-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            padding: 1rem;
            background: var(--light-bg);
            border-radius: 8px;
            margin-bottom: 0.5rem;
        }

        .toggle-content {
            display: none;
            padding: 1rem;
            background: var(--light-bg);
            border-radius: 8px;
            margin-top: 0.5rem;
        }

        .toggle-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        /* Dashboard Grid */
        .dashboard-grid {
            display: grid;
            gap: 1.5rem;
            grid-template-columns: 1fr;
        }

        @media (min-width: 768px) {
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* KPI Cards */
        .kpi-grid {
            display: grid;
            gap: 1rem;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        }

        .kpi-card {
            background: var(--light-bg);
            padding: 1rem;
            border-radius: 8px;
            text-align: center;
        }

        .kpi-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--primary);
        }

        .kpi-label {
            font-size: 0.9rem;
            color: var(--text-light);
        }

        /* Modal */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 1rem;
        }

        .modal-content {
            background: white;
            padding: 2rem;
            border-radius: var(--radius);
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-light);
        }

        /* Notifications */
        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger);
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notification-item {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: flex-start;
            gap: 1rem;
        }

        .notification-item:last-child {
            border-bottom: none;
        }

        .notification-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--light-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .notification-content {
            flex: 1;
        }

        .notification-time {
            font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 0.25rem;
        }

        /* Goal Tracking */
        .goal-card {
            border-left: 4px solid var(--primary);
            padding-left: 1rem;
            margin: 1.5rem 0;
        }

        .goal-progress {
            display: flex;
            justify-content: space-between;
            margin-top: 0.5rem;
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            #app-container {
                flex-direction: column;
            }

            .app-header {flex-direction: column;}
            
            #app-sidebar {
                width: 100%;
                height: auto;
                border-right: none;
                border-bottom: 1px solid var(--border);
            }
            
            .progress-path {
                display: flex;
                overflow-x: auto;
                padding: 1rem;
            }
            
            .path-item {
                flex-direction: column;
                min-width: 120px;
                text-align: center;
                margin-right: 1rem;
                margin-bottom: 0;
            }
            
            .path-icon {
                margin-right: 0;
                margin-bottom: 0.5rem;
            }
        }

/* === TABS STYLES === */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    flex: 1;
    text-align: center;
}

.tab:hover {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(58, 134, 255, 0.05);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Animation for tab content */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.notification-actions .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.notification-wrapper {
    position: relative;
}

.investment-type-group,
.asset-type-group,
.liability-type-group {
    display: none;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.notifications-footer {
    text-align: center;
    margin-top: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Recent Transactions Styles */
.transactions-container {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 6px;
}

.transaction-info {
    flex: 1;
}

.transaction-description {
    font-weight: 600;
}

.transaction-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

.transaction-amount.neutral {
    color: var(--text);
}

.empty-transactions {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Dashboard Styles */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.goal-progress {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.kpi-suggestions-grid {
    display: grid;
    gap: 0.5rem;
}

.kpi-suggestion-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    border-left: 3px solid var(--primary);
}

.kpi-suggestion-name {
    font-weight: 600;
}

.kpi-suggestion-target {
    font-size: 0.8rem;
    color: var(--text-light);
}

.kpi-suggestion-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.kpi-empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.kpi-grid {
    margin-top: 1rem;
}

.clickable {
    cursor: pointer;
}

.liabilities-grid,
.assets-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.liability-item,
.asset-item {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.liability-item {
    border-left: 4px solid var(--danger);
}

.asset-item {
    border-left: 4px solid var(--success);
}

.liability-header,
.asset-header {
    display: flex;
    justify-content: space-between;
}

.liability-amount {
    color: var(--danger);
}

.asset-amount {
    color: var(--success);
}

.liability-meta,
.asset-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.progress-bar {
    margin-top: 0.5rem;
}

/* Dropdown/Select Styles */
select,
input[type="text"],
input[type="number"],
input[type="date"],
textarea {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    color: var(--white);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}

select option {
    background: var(--gray-800);
    color: var(--white);
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.1);
}

/* For select dropdown arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    cursor: pointer;
}

/* Placeholder text color */
input::placeholder,
textarea::placeholder {
    color: var(--gray-500);
}