/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: white;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.header h1 {
    background: linear-gradient(135deg, #A81AD6, #1935F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.8rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #A81AD6, #1935F0);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 26, 214, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 26, 214, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.stat-card.income .stat-icon {
    background: linear-gradient(135deg, #00C851, #007E33);
}

.stat-card.expense .stat-icon {
    background: linear-gradient(135deg, #ff4444, #CC0000);
}

.stat-card.balance .stat-icon {
    background: linear-gradient(135deg, #33b5e5, #0099CC);
}

.stat-card.savings .stat-icon {
    background: linear-gradient(135deg, #ffbb33, #FF8800);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    word-break: break-all;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.1rem;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

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

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    min-height: 300px;
}

@media (max-width: 480px) {
    .chart-card {
        padding: 16px;
        min-height: 250px;
    }
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
    font-weight: 600;
    font-size: 1.3rem;
}

/* Budget List */
.budget-list {
    display: grid;
    gap: 15px;
    margin-bottom: 40px;
}

.budget-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.budget-category {
    font-weight: 600;
    color: #333;
}

.budget-amount {
    color: #666;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #A81AD6, #1935F0);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.warning {
    background: linear-gradient(135deg, #ffbb33, #FF8800);
}

.progress-fill.danger {
    background: linear-gradient(135deg, #ff4444, #CC0000);
}

.budget-status {
    font-size: 0.8rem;
    color: #666;
}

/* Transactions */
.transaction-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.transaction-filters input,
.transaction-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

.transactions-list {
    margin-bottom: 40px;
}

.transaction-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.transaction-item:hover {
    transform: translateX(4px);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.transaction-icon.income {
    background: linear-gradient(135deg, #00C851, #007E33);
}

.transaction-icon.expense {
    background: linear-gradient(135deg, #ff4444, #CC0000);
}

.transaction-details h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.transaction-details p {
    font-size: 0.8rem;
    color: #666;
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.transaction-amount.income {
    color: #00C851;
}

.transaction-amount.expense {
    color: #ff4444;
}

.transaction-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Reports */
.reports-content {
    display: grid;
    gap: 20px;
}

.report-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.report-card h4 {
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.insight-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #A81AD6;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 30px 30px 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.modal-header h3 {
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 4px;
}

.close-btn:hover {
    color: #333;
}

/* Forms */
form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #A81AD6;
    box-shadow: 0 0 0 3px rgba(168, 26, 214, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Export Options */
.export-options {
    padding: 24px;
}

.export-buttons {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    z-index: 1001;
    border-left: 4px solid #00C851;
    max-width: 90%;
    text-align: center;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification.error {
    border-left-color: #ff4444;
}

.notification.warning {
    border-left-color: #ffbb33;
}

/* Data Notice */
.data-notice {
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #A81AD6;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.notice-content i {
    color: #A81AD6;
    font-size: 1.2rem;
    margin-top: 2px;
}

.notice-text h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.notice-text p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}



/* Onboarding */
.onboarding-step {
    padding: 24px;
    text-align: center;
}

.onboarding-step h3 {
    margin-bottom: 20px;
    color: #333;
}

.onboarding-step select,
.onboarding-step input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px auto;
    display: block;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

/* Savings Goals */
.savings-goals-list {
    display: grid;
    gap: 15px;
    margin-bottom: 40px;
}

.savings-goal-item {
    background: white;
    padding: 20px 80px 20px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    position: relative;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.goal-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.goal-amount {
    color: #666;
    font-size: 0.9rem;
}

.goal-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #666;
}

.goal-completed {
    color: #00C851;
    font-weight: 600;
}

.goal-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.goal-actions .action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.progress-fill.success {
    background: linear-gradient(135deg, #00C851, #007E33);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .quick-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .transaction-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .transaction-filters input,
    .transaction-filters select {
        width: 100%;
    }
    
    .transaction-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
    }
    
    .modal-content {
        margin: 1% auto;
        width: 95%;
        max-height: 95vh;
    }
    

}