/* ===== FINANCIAL HEALTH SCORE STYLES ===== */

.financial-health-section {
    margin-bottom: 2rem;
}

.health-score-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.health-score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.health-score-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(8, 145, 178, 0.3);
}

.health-score-card:hover::before {
    opacity: 1;
}

.health-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.health-score-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #059669 0%, #0891b2 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.health-score-grade {
    font-size: 2rem;
    font-weight: 800;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.health-score-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Circular Progress Indicator */
.score-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: rgba(148, 163, 184, 0.2);
    stroke-width: 12;
}

.score-circle-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.score-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Use percentage-based positioning relative to parent container for responsiveness */
    position: relative;
    top: -3%;
    left: -3%;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1;
}

.score-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Score Breakdown */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-icon {
    font-size: 1.25rem;
}

.breakdown-score {
    font-weight: 700;
    color: var(--text-secondary);
}

.breakdown-progress {
    width: 100%;
    height: 8px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.breakdown-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.breakdown-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.breakdown-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Score Improvement Tips */
.score-tips {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(8, 145, 178, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.score-tips h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tip-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .health-score-main {
        grid-template-columns: 1fr;
    }

    .score-circle {
        width: 180px;
        height: 180px;
    }

    .score-number {
        font-size: 3rem;
    }

    .health-score-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .score-circle {
        width: 160px;
        height: 160px;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .health-score-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Dark Mode */
[data-theme="dark"] .health-score-card {
    background: rgba(31, 41, 55, 0.85);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .score-circle-bg {
    stroke: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .score-tips {
    background: rgba(8, 145, 178, 0.1);
}