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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 50%, #141414 100%);
    min-height: 100vh;
    padding: 20px;
    color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px 0;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #E88A1A, #CF3030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.subtitle {
    font-size: 1.3em;
    opacity: 0.9;
    color: #E88A1A;
    font-weight: 500;
}

.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: rgba(20, 20, 20, 0.8);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    padding: 14px 28px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #f5f5f5;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(232, 138, 26, 0.2);
    border-color: #E88A1A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 138, 26, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #CF3030, #E88A1A);
    color: white;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(207, 48, 48, 0.4);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    display: block;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-color: rgba(232, 138, 26, 0.3);
}

.card h2 {
    margin-bottom: 24px;
    color: #E88A1A;
    font-size: 1.6em;
    font-weight: 600;
    border-bottom: 2px solid rgba(232, 138, 26, 0.3);
    padding-bottom: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amount {
    font-size: 2.2em;
    font-weight: 700;
    color: #f5f5f5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.label {
    color: #b0b0b0;
    font-size: 0.95em;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 12px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    transition: width 0.4s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #E88A1A, #ffa726);
    box-shadow: 0 2px 8px rgba(232, 138, 26, 0.4);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #CF3030, #ef5350);
    box-shadow: 0 2px 8px rgba(207, 48, 48, 0.4);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #f5f5f5;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
    color: #f5f5f5;
}

.form-group input::placeholder {
    color: #888;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #E88A1A;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(232, 138, 26, 0.2);
}

.form-group select option {
    background: #141414;
    color: #f5f5f5;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #CF3030, #E88A1A);
    color: white;
    box-shadow: 0 4px 16px rgba(207, 48, 48, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(207, 48, 48, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.btn-danger {
    background: #CF3030;
    color: white;
    padding: 8px 16px;
    font-size: 0.85em;
    box-shadow: 0 2px 8px rgba(207, 48, 48, 0.3);
}

.btn-danger:hover {
    background: #b82828;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(207, 48, 48, 0.4);
}

.filter-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group input,
.filter-group select {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #f5f5f5;
}

.expense-item,
.subscription-item,
.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}

.expense-item:hover,
.subscription-item:hover,
.budget-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(232, 138, 26, 0.3);
}

.expense-item:last-child,
.subscription-item:last-child,
.budget-item:last-child {
    border-bottom: none;
}

.expense-info,
.subscription-info,
.budget-info {
    flex: 1;
}

.expense-amount,
.subscription-amount,
.budget-amount {
    font-weight: 700;
    font-size: 1.3em;
    color: #f5f5f5;
    margin-bottom: 6px;
}

.expense-category,
.subscription-cycle,
.budget-type {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-top: 8px;
    background: rgba(232, 138, 26, 0.2);
    color: #E88A1A;
    border: 1px solid rgba(232, 138, 26, 0.3);
    font-weight: 500;
}

.category-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-right: 8px;
    margin-bottom: 8px;
    background: rgba(232, 138, 26, 0.2);
    color: #E88A1A;
    border: 1px solid rgba(232, 138, 26, 0.3);
    font-weight: 500;
}

.category-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.2s;
}

.category-breakdown-item:hover {
    background: rgba(255,255,255,0.05);
}

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

.upcoming-bill-item {
    padding: 16px;
    border-left: 4px solid #E88A1A;
    background: rgba(232, 138, 26, 0.1);
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(232, 138, 26, 0.2);
}

.jarvis-response {
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
    border: 2px solid;
}

.jarvis-response.allowed {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.jarvis-response.risky {
    background: rgba(232, 138, 26, 0.1);
    border-color: #E88A1A;
}

.jarvis-response.not_recommended {
    background: rgba(207, 48, 48, 0.1);
    border-color: #CF3030;
}

.jarvis-message {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 18px;
    font-weight: 500;
    color: #f5f5f5;
}

.jarvis-details {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.jarvis-details h3 {
    margin-bottom: 12px;
    color: #E88A1A;
    font-size: 1.1em;
}

.jarvis-details ul {
    list-style: none;
    padding-left: 0;
}

.jarvis-details li {
    padding: 8px 0;
    color: #b0b0b0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.jarvis-details li:last-child {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #888;
}

.empty-state::before {
    content: "📭";
    font-size: 4em;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 54px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 28px;
    transition: background 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, #CF3030, #E88A1A);
    border-color: transparent;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.95em;
    color: #f5f5f5;
    font-weight: 600;
}

.form-disabled {
    opacity: 0.5;
    pointer-events: none;
}

canvas {
    max-height: 400px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    padding: 10px;
}

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

table th,
table td {
    padding: 10px;
    text-align: left;
}

table thead {
    background: rgba(232, 138, 26, 0.2);
}

table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }
    
    .tabs {
        padding: 8px;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    table {
        font-size: 0.85em;
    }
    
    table th,
    table td {
        padding: 6px;
    }
}
