* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}
.navbar {
    background: #fffeff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 20px;
            font-weight: 700;
            color: #3b82f6;
            text-decoration: none;
            
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            list-style: none;
        }

        .nav-links a {
            text-decoration: none;
            color: #64748b;
            font-weight: 500;
            transition: color 0.3s;
        }

        .nav-links a:hover, .nav-links a.active {
            color: #3b82f6;
        }

        .main-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 2rem;
            min-height: calc(100vh - 70px);
        }

        .card {
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            border: 1px solid #e2e8f0;
            transition: all 0.3s ease;
        }

        .card:hover {
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }

        .card-header {
            padding: 1.5rem;
            border-bottom: 1px solid #e2e8f0;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-body {
            padding: 1.5rem;
        }

        /* Overview Panel */
        .overview-panel {
            grid-row: span 2;
        }

        .budget-overview {
            text-align: center;
            margin-bottom: 2rem;
        }

        .budget-amount {
            font-size: 48px;
            font-weight: 700;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
        }
        .budget-amount-good {
            font-size: 48px;
            font-weight: 700;
            background: linear-gradient(135deg, #276300, #28d606);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
        }
        .budget-amount-warning {
            font-size: 48px;
            font-weight: 700;
            background: linear-gradient(135deg, #f16f33, #ff8f25);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
        }
        .budget-amount-stop {
            font-size: 48px;
            font-weight: 700;
            background: linear-gradient(135deg, #ff1c1c, #a80000);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
        }
        .budget-subtitle {
            color: #64748b;
            font-size: 14px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .stat-item {
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 12px;
            text-align: center;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 0.5rem;
        }

        .stat-label {
            font-size: 12px;
            color: #64748b;
            text-transform: uppercase;
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        .progress-section {
            margin-bottom: 2rem;
        }

        .progress-bar {
            background: #e2e8f0;
            height: 12px;
            border-radius: 6px;
            overflow: hidden;
            margin: 1rem 0;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #10b981, #059669);
            border-radius: 6px;
            transition: width 0.6s ease;
            position: relative;
        }

        .progress-fill.warning {
            background: linear-gradient(90deg, #f59e0b, #d97706);
        }

        .progress-fill.danger {
            background: linear-gradient(90deg, #ef4444, #dc2626);
        }

        .budget-setup {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            text-align: center;
            padding: 3rem 2rem;
        }

        .setup-title {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .setup-form {
            max-width: 300px;
            margin: 0 auto;
        }

        .setup-input {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 10px;
            font-size: 18px;
            text-align: center;
            margin-bottom: 1rem;
        }

        .setup-btn {
            background: white;
            color: #3b82f6;
            border: none;
            padding: 15px 30px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            width: 100%;
        }

        .setup-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        }

        /* Expense Tracking Panel */
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }

        .quick-action-btn {
            background: linear-gradient(135deg, #f8fafc, #e2e8f0);
            border: 1px solid #e2e8f0;
            padding: 1rem;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-weight: 500;
        }

        .quick-action-btn:hover {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }

        .expense-form {
            background: #f8fafc;
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-label {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.5rem;
        }

        .form-input {
            padding: 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        .form-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .add-btn {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            width: 100%;
        }

        .add-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
        }

        /* Expenses List Panel */
        .expense-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            border-bottom: 1px solid #f1f5f9;
            transition: background-color 0.3s;
        }

        .expense-item:hover {
            background: #f8fafc;
        }

        .expense-item:last-child {
            border-bottom: none;
        }

        .expense-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .expense-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .expense-info h4 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .expense-meta {
            font-size: 12px;
            color: #64748b;
        }

        .expense-amount {
            font-size: 18px;
            font-weight: 700;
            color: #ef4444;
        }

        .expense-delete {
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 4px;
            margin-left: 1rem;
            transition: all 0.3s;
        }

        .expense-delete:hover {
            background: #fee2e2;
            color: #dc2626;
        }

        /* AI Coach Panel */
        .ai-panel {
            grid-row: span 2;
        }

        .chat-container {
            height: 400px;
            display: flex;
            flex-direction: column;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 0;
            margin-bottom: 1rem;
        }

        .chat-message {
            margin-bottom: 1rem;
            max-width: 85%;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.5;
        }

        .chat-message.user {
            background: #3b82f6;
            color: white;
            margin-left: auto;
            border-bottom-right-radius: 4px;
        }

        .chat-message.ai {
            background: #f1f5f9;
            color: #334155;
            border-bottom-left-radius: 4px;
        }

        .chat-input-container {
            display: flex;
            gap: 0.75rem;
        }

        .chat-input {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid #d1d5db;
            border-radius: 24px;
            font-size: 14px;
        }

        .chat-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .chat-send-btn {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 24px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }

        .chat-send-btn:hover {
            background: #2563eb;
        }

        .ai-suggestions {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid #e2e8f0;
        }

        .suggestion-chip {
            display: inline-block;
            background: #eff6ff;
            color: #1e40af;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 12px;
            margin: 0.25rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .suggestion-chip:hover {
            background: #3b82f6;
            color: white;
        }

        .empty-state {
            text-align: center;
            color: #64748b;
            padding: 2rem;
        }

        .empty-state-icon {
            font-size: 48px;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        .category-food { background: #fef3c7; }
        .category-transport { background: #dbeafe; }
        .category-entertainment { background: #fce7f3; }
        .category-shopping { background: #ecfdf5; }
        .category-books { background: #f3e8ff; }
        .category-other { background: #f1f5f9; }

        .insights-panel {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            color: white;
            margin-bottom: 1.5rem;
        }

        .insight-content {
            padding: 1.5rem;
        }

        .insight-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .insight-text {
            font-size: 14px;
            opacity: 0.9;
        }

        .spending-chart {
            height: 200px;
            background: #f8fafc;
            border-radius: 12px;
            margin: 1rem 0;
            display: flex;
            align-items: end;
            justify-content: space-around;
            padding: 1rem;
            position: relative;
        }

        .chart-bar {
            background: linear-gradient(to top, #3b82f6, #60a5fa);
            width: 30px;
            border-radius: 4px 4px 0 0;
            transition: all 0.3s ease;
            position: relative;
        }

        .chart-bar:hover {
            background: linear-gradient(to top, #1d4ed8, #3b82f6);
        }

        .chart-label {
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 10px;
            color: #64748b;
            font-weight: 500;
        }

        .status-indicator {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .status-good {
            background: #dcfce7;
            color: #166534;
        }

        .status-warning {
            background: #fef3c7;
            color: #92400e;
        }

        .status-danger {
            background: #fee2e2;
            color: #991b1b;
        }

        @media (max-width: 1200px) {
            .main-container {
                grid-template-columns: 1fr 1fr;
                gap: 1.5rem;
            }
            
            .overview-panel {
                grid-column: span 2;
                grid-row: span 1;
            }
        }

        @media (max-width: 768px) {
            .main-container {
                grid-template-columns: 1fr;
                padding: 1rem;
            }
            
            .overview-panel {
                grid-column: span 1;
            }
            
            .nav-container {
                padding: 0 1rem;
            }
            
            .nav-links {
                display: none;
            }
        }

        .welcome-screen {
            grid-column: span 3;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 60vh;
        }

        .welcome-content {
            text-align: center;
            max-width: 500px;
        }

        .welcome-title {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #8c1197, #d81d1d);
    
            -webkit-text-fill-color: transparent;
        }

        .welcome-subtitle {
            font-size: 18px;
            color: #64748b;
            margin-bottom: 2rem;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin: 2rem 0;
        }

        .feature-item {
            text-align: center;
            padding: 1rem;
        }

        .feature-icon {
            font-size: 32px;
            margin-bottom: 0.5rem;
        }

        .feature-text {
            font-size: 14px;
            color: #64748b;
        }