/* Base Styles */
.swpm-dashboard {
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    color: #2d3748;
    line-height: 1.6;
}

/* Header Section */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #edf2f7;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-avatar {
    font-size: 3rem;
    color: #4a5568;
}

.member-details h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a202c;
    font-weight: 600;
}

.member-id {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #718096;
}

.year-display {
    text-align: right;
}

.current-year {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #4299e1;
    line-height: 1;
}

.year-label {
    font-size: 0.9rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Section */
.progress-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-header h4 i {
    color: #4299e1;
}

.completion {
    background: #4299e1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-bar-container {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    margin: 1.5rem 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #38b2ac);
    transition: width 1s ease;
    position: relative;
}

.progress-marker {
    position: absolute;
    right: 0;
    top: -3px;
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #4299e1;
    border-radius: 50%;
    transform: translateX(50%);
}

.progress-stats {
    display: flex;
    gap: 2rem;
}

.progress-stats .stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #718096;
}

/* Financial Overview */
.financial-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.balance-forward .card-icon {
    color: #9f7aea;
    background: rgba(159, 122, 234, 0.1);
}

.total-paid .card-icon {
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.balance-due .card-icon {
    color: #f56565;
    background: rgba(245, 101, 101, 0.1);
}

.card-content {
    flex: 1;
}

.card-label {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

/* Monthly Breakdown */
.monthly-breakdown {
    margin-bottom: 2rem;
}

.monthly-breakdown h4 {
    font-size: 1.1rem;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d3748;
}

.monthly-breakdown h4 i {
    color: #4299e1;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.month-card {
    padding: 1rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.month-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.month-card.paid {
    border-top: 3px solid #48bb78;
}

.month-card.pending {
    border-top: 3px solid #ed8936;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.month-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4a5568;
}

.month-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
}

.paid .month-status {
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.pending .month-status {
    color: #ed8936;
    background: rgba(237, 137, 54, 0.1);
}

.month-amount {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: #2d3748;
}

/* Payment Summary */
.payment-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.payment-summary h4 {
    font-size: 1.1rem;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d3748;
}

.payment-summary h4 i {
    color: #4299e1;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

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

.summary-card.highlight {
    border-top: 3px solid #f56565;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    display: block;
    margin-bottom: 0.25rem;
}

.highlight .summary-value {
    color: #f56565;
}

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

/* Messages */
.swpm-message {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 800px;
    text-align: center;
    font-weight: 500;
}

.swpm-message.info {
    background: #ebf8ff;
    color: #3182ce;
    border-left: 4px solid #3182ce;
}

.swpm-message.error {
    background: #fff5f5;
    color: #e53e3e;
    border-left: 4px solid #e53e3e;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .financial-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .year-display {
        text-align: left;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .months-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .swpm-dashboard {
        padding: 1.5rem;
    }
    
    .months-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
}