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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Styles */
section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

section h2 i {
    color: #667eea;
}

/* Month Selector */
.month-selector {
    text-align: center;
}

.month-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.current-month {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 150px;
}

.month-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.month-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.has-data {
    background: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.2);
}

.status-indicator.no-data {
    background: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.status-text {
    font-weight: 500;
    color: #4a5568;
}

.available-months {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #718096;
}

.available-label {
    font-weight: 500;
}

.month-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

/* Fixed Costs Section */
.fixed-costs-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
}

.section-description {
    color: #4a5568;
    margin-bottom: 20px;
    font-style: italic;
}

.fixed-costs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fixed-cost-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.fixed-cost-card label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #4a5568;
}

/* Tax Estimation Section */
.tax-estimation-section {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border: 2px solid #9ae6b4;
}

.tax-settings {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.tax-settings h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.tax-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tax-setting-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.tax-setting-card label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #4a5568;
}

.tax-setting-card select,
.tax-setting-card input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tax-setting-card select:focus,
.tax-setting-card input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tax-info {
    background: #f0fff4;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #9ae6b4;
}

.tax-info p {
    margin: 5px 0;
    color: #2d3748;
    font-size: 0.95rem;
}

.tax-info strong {
    color: #22543d;
}

.tax-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tax Payment Instructions */
.tax-payment-instructions {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border: 1px solid #e2e8f0;
}

.tax-payment-instructions h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

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

.payment-method {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.payment-method h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-method p {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.payment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.payment-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.payment-note {
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
    margin-top: 8px;
}

.payment-reminders {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.payment-reminders h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-reminders ul {
    list-style: none;
    padding: 0;
}

.payment-reminders li {
    color: #4a5568;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
}

.payment-reminders li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.tax-results {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tax-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tax-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
}

.tax-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

.tax-card .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.tax-card .percentage {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tax-card.federal {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-color: #fc8181;
}

.tax-card.state {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border-color: #68d391;
}

.tax-card.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tax-card.total h4,
.tax-card.total .amount {
    color: white;
}

.tax-card.monthly {
    background: linear-gradient(135deg, #fbd38d 0%, #f6ad55 100%);
    border-color: #ed8936;
}

/* IRS Schedule Table */
.irs-schedule {
    margin-bottom: 30px;
}

.irs-schedule h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.schedule-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.schedule-table th {
    background: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.schedule-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.schedule-table tr:hover {
    background: #f7fafc;
}

.schedule-table .status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 60px;
    border: 1px solid transparent;
}

.schedule-table .status.upcoming {
    background: #fbd38d !important;
    color: #744210 !important;
    border-color: #ed8936 !important;
}

.schedule-table .status.due-soon {
    background: #fbb6ce !important;
    color: #97266d !important;
    border: 2px solid #ed64a6 !important;
    font-weight: 700 !important;
}

.schedule-table .status.due {
    background: #fed7d7 !important;
    color: #c53030 !important;
    border-color: #e53e3e !important;
}

.schedule-table .status.paid {
    background: #c6f6d5 !important;
    color: #22543d !important;
    border-color: #38a169 !important;
}

.schedule-table .status.pending {
    background: #e2e8f0 !important;
    color: #4a5568 !important;
    border-color: #cbd5e0 !important;
}

/* Additional specificity for status elements inside tables */
.irs-schedule .schedule-table .status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 60px;
    border: 1px solid transparent;
}

.irs-schedule .schedule-table .status.upcoming {
    background: #fbd38d !important;
    color: #744210 !important;
    border-color: #ed8936 !important;
}

.irs-schedule .schedule-table .status.due-soon {
    background: #fbb6ce !important;
    color: #97266d !important;
    border: 2px solid #ed64a6 !important;
    font-weight: 700 !important;
}

.irs-schedule .schedule-table .status.due {
    background: #fed7d7 !important;
    color: #c53030 !important;
    border-color: #e53e3e !important;
}

.irs-schedule .schedule-table .status.paid {
    background: #c6f6d5 !important;
    color: #22543d !important;
    border-color: #38a169 !important;
}

.irs-schedule .schedule-table .status.pending {
    background: #e2e8f0 !important;
    color: #4a5568 !important;
    border-color: #cbd5e0 !important;
}

/* Tax Breakdown */
.tax-breakdown {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tax-breakdown h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.breakdown-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.breakdown-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

.breakdown-item p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
}

/* Income Section */
.income-input {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.income-input label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4a5568;
}

.month-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.month-selector label {
    margin-bottom: 0;
    margin-right: 10px;
}

.month-selector select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.month-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.income-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.income-inputs .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: none;
}

.income-inputs .input-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0;
}

.input-with-currency {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-currency .currency {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 1;
}

.input-with-currency input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-with-currency input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    width: 100%;
}

.currency {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 1;
}

.input-group input {
    padding-left: 40px !important;
}

.income-input input,
.fixed-cost-card input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.income-input input:focus,
.fixed-cost-card input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Budget Overview */
.budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
}

.summary-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

.summary-card .amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.summary-card .percentage {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.total-income {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.total-income h3,
.total-income .amount {
    color: white;
}

.fixed-costs {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.fixed-costs h3,
.fixed-costs .amount {
    color: white;
}

.general-expenses {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
}

.general-expenses h3,
.general-expenses .amount {
    color: white;
}

.total-savings {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.total-savings h3,
.total-savings .amount {
    color: white;
}

.total-spending {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
    color: white;
}

.total-spending h3,
.total-spending .amount {
    color: white;
}

/* Category Groups */
.category-group {
    margin-bottom: 30px;
}

.category-group h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

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

.category-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

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

.category-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.category-percentage {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.category-description {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.4;
}

/* Category Type Colors */
.fixed {
    border-left: 4px solid #ed8936;
}

.fixed .category-percentage {
    background: #ed8936;
}

.savings {
    border-left: 4px solid #4299e1;
}

.savings .category-percentage {
    background: #4299e1;
}

.essential {
    border-left: 4px solid #48bb78;
}

.essential .category-percentage {
    background: #48bb78;
}

.discretionary {
    border-left: 4px solid #9f7aea;
}

.discretionary .category-percentage {
    background: #9f7aea;
}

.other {
    border-left: 4px solid #9f7aea;
}

.other .category-percentage {
    background: #9f7aea;
}

/* Monthly Tracker */
.tracker-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tracker-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tracker-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.tracker-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.tracker-card .amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
}

/* Data Management Section */
.data-management-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
}

.data-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.data-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.export-card {
    border-color: #4299e1;
}

.export-card:hover {
    border-color: #3182ce;
}

.import-card {
    border-color: #48bb78;
}

.import-card:hover {
    border-color: #38a169;
}

.info-card {
    border-color: #ed8936;
}

.info-card:hover {
    border-color: #dd6b20;
}

.data-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.data-card-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.data-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.data-card-description {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
}

.import-controls, .cookie-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .data-management-grid {
        grid-template-columns: 1fr;
    }
    
    .data-card {
        padding: 20px;
    }
    
    .data-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .data-card-header i {
        font-size: 1.25rem;
    }
    
    .import-controls, .cookie-controls {
        flex-direction: column;
    }
    
    .import-controls button, .cookie-controls button {
        width: 100%;
    }
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2020 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Historical Data */
.historical-data {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
}

.historical-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.historical-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.historical-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.historical-card .amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
}

/* Chart Section */
.chart-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.chart-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
    background: #fafbfc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.chart-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.chart-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chart-controls .btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.chart-controls .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.monthly-history {
    max-height: 400px;
    overflow-y: auto;
}

.month-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.month-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.month-info {
    flex: 1;
}

.month-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.month-summary {
    font-size: 0.9rem;
    color: #718096;
}

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

.month-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-month {
    background: #4299e1;
    color: white;
}

.view-month:hover {
    background: #3182ce;
}

.delete-month {
    background: #fed7d7;
    color: #c53030;
}

.delete-month:hover {
    background: #feb2b2;
}

/* Expense List */
.expense-list {
    max-height: 400px;
    overflow-y: auto;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.expense-info {
    flex: 1;
}

.expense-description {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 4px;
}

.expense-category {
    font-size: 0.8rem;
    color: #718096;
    text-transform: capitalize;
}

.expense-amount {
    font-weight: 600;
    color: #e53e3e;
    font-size: 1.1rem;
}

.delete-expense {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.delete-expense:hover {
    background: #feb2b2;
}

/* Modal Styles */
.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(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #718096;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2d3748;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.3rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Save Notification */
.save-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.save-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.save-notification i {
    animation: checkmark 0.6s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Yearly Overview Chart Styles */
.yearly-overview-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.yearly-overview-section h2 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.yearly-overview-section .section-description {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Yearly Summary Cards */
.yearly-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.yearly-summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yearly-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.yearly-summary-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yearly-summary-card .amount {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

.yearly-summary-card.income .amount {
    color: #48bb78;
}

.yearly-summary-card.expenses .amount {
    color: #ed8936;
}

.yearly-net-amount {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.yearly-net-amount.positive {
    color: #48bb78;
}

.yearly-net-amount.negative {
    color: #e53e3e;
}

.yearly-chart-container {
    position: relative;
    width: 100%;
}

.yearly-chart-container .chart-wrapper {
    position: relative;
    height: 400px;
    margin-bottom: 1rem;
    width: 100%;
    max-width: none !important;
}

.yearly-chart-container canvas {
    max-height: 400px;
    width: 100% !important;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

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

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.legend-color.income {
    background: rgba(72, 187, 120, 0.8);
}

.legend-color.total-expenses {
    background: rgba(229, 62, 62, 0.8);
}

.legend-label {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    section {
        padding: 20px;
    }

    .budget-summary {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .tracker-summary {
        grid-template-columns: 1fr;
    }

    .tracker-controls {
        flex-direction: column;
    }

    .month-controls {
        flex-direction: column;
        gap: 15px;
    }

    .month-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .fixed-costs-grid {
        grid-template-columns: 1fr;
    }

    .historical-summary {
        grid-template-columns: 1fr;
    }

    .tax-settings-grid {
        grid-template-columns: 1fr;
    }

    .tax-summary {
        grid-template-columns: 1fr;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .income-inputs {
        grid-template-columns: 1fr;
    }

    .month-selector {
        text-align: center;
    }

    .chart-container {
        height: 300px;
    }

    .chart-wrapper {
        height: 300px;
    }

    .chart-controls {
        flex-direction: column;
    }

    .schedule-table {
        font-size: 0.8rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 8px 4px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }

    /* Integrated Month Selector Mobile Styles */
    .month-selector-integrated .month-controls {
        flex-direction: column;
        gap: 15px;
    }

    .month-selector-integrated .current-month {
        min-width: 120px;
        font-size: 1rem;
        padding: 10px 20px;
    }

    .month-selector-integrated .month-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .month-selector-integrated .month-status {
        justify-content: center;
    }

    .month-selector-integrated .available-months {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .income-input input,
    .fixed-cost-card input {
        font-size: 1rem;
        padding: 12px 12px 12px 35px;
    }

    .summary-card .amount {
        font-size: 1.5rem;
    }

    .category-amount {
        font-size: 1.3rem;
    }

    .month-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .month-actions {
        width: 100%;
        justify-content: space-between;
    }

    .chart-container {
        height: 250px;
        padding: 10px;
    }

    .tax-card .amount {
        font-size: 1.2rem;
    }

    .breakdown-item p {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.budget-overview,
.budget-categories,
.monthly-tracker,
.historical-data,
.tax-estimation-section {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar Styling */
.expense-list::-webkit-scrollbar,
.monthly-history::-webkit-scrollbar {
    width: 8px;
}

.expense-list::-webkit-scrollbar-track,
.monthly-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.expense-list::-webkit-scrollbar-thumb,
.monthly-history::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.expense-list::-webkit-scrollbar-thumb:hover,
.monthly-history::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.total-spending h3,
.total-spending .amount {
    color: #ffffff;
}

/* Budget Chart */
.budget-chart-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.budget-chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    height: 400px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
}

.chart-wrapper canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Budget Overview - First Section */
.budget-overview {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.budget-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.budget-overview h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.budget-overview h2 i {
    color: #667eea;
    font-size: 1.6rem;
}

/* Integrated Month Selector */
.month-selector-integrated {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
}

.month-selector-integrated .month-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.month-selector-integrated .current-month {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.month-selector-integrated .month-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.month-selector-integrated .month-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-selector-integrated .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e53e3e;
    display: inline-block;
}

.month-selector-integrated .status-indicator.has-data {
    background: #38a169;
}

.month-selector-integrated .status-indicator.no-data {
    background: #e53e3e;
}

.month-selector-integrated .status-text {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.month-selector-integrated .available-months {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

.month-selector-integrated .available-label {
    font-weight: 500;
}

.month-selector-integrated .month-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

.budget-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.budget-actions .btn-primary,
.budget-actions .btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.data-indicator {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-weight: normal;
}

.data-indicator.has-data {
    background-color: #10b981;
    color: white;
}

.data-indicator.no-data {
    background-color: #6b7280;
    color: white;
}

/* Additional Mobile Styles for Yearly Chart */
@media (max-width: 768px) {
    .yearly-overview-section {
        padding: 1rem;
    }

    .yearly-chart-container .chart-wrapper {
        height: 300px;
        width: 100%;
        max-width: none !important;
    }
    
    .yearly-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .yearly-summary-card {
        padding: 1rem;
    }
    
    .yearly-summary-card .amount,
    .yearly-net-amount {
        font-size: 1.5rem;
    }

    .chart-legend {
        gap: 1rem;
        justify-content: flex-start;
    }

    .legend-item {
        font-size: 0.85rem;
    }
}
