:root {
    --bg: #030712;
    --panel-bg: rgba(17, 24, 39, 0.55);
    --panel-border: rgba(255, 255, 255, 0.06);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;

    --grade-A: #10b981;
    --grade-B: #0ea5e9;
    --grade-C: #f59e0b;
    --grade-D: #f97316;
    --grade-E: #ef4444;
}

body[data-project="gold"] {
    --accent: #f59e0b;
    --accent-rgb: 245, 158, 11;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

/* Subtly animated gradient background with cybergrid */
.bg-gradient {
    position: fixed;
    top: -10%; left: -10%; right: -10%; bottom: -10%;
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
    animation: ambientDrift 25s ease-in-out infinite;
}
body[data-project="gold"] .bg-gradient {
    background:
        radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(217, 119, 6, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
}
.bg-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 95%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 95%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ===== Project Switcher ===== */
.project-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
}
.header .project-switcher {
    align-self: center;
}
.switcher-btn {
    padding: 8px 24px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.switcher-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
}
.switcher-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.3);
}

/* Dashboard containers */
.dashboard-container { display: none; }
.dashboard-container.active { display: block; }

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

.dashboard > div {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.dashboard > div:nth-child(1) { animation-delay: 0s; }
.dashboard > div:nth-child(2) { animation-delay: 0.1s; }
.dashboard > div:nth-child(3) { animation-delay: 0.2s; }
.dashboard > div:nth-child(4) { animation-delay: 0.25s; }

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--panel-border);
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo span {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
    animation: logoGlow 4s ease-in-out infinite;
}
body[data-project="gold"] .logo span {
    background-image: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.3));
}
.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.header-info { text-align: right; }
.update-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
}
.update-time svg {
    margin-right: 6px;
}
.data-source {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Panels ===== */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.03),
        0 8px 32px -4px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.panel-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
}
.panel-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 14px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 10px;
    box-shadow: 0 0 8px var(--accent);
}

/* ===== Dashboard Layout ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.top-row {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
}

/* ===== Hero Panel Redesign ===== */
.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.4s, box-shadow 0.4s;
}

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

.hero-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.hero-grade-badge {
    font-size: 14px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
    letter-spacing: 1px;
}

.hero-score-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 24px;
}

.hero-score {
    font-size: 64px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -2px;
    line-height: 1;
    color: #fff;
}

.hero-score-suffix {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 600;
}

.hero-action-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-multiplier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.multiplier-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.multiplier-value {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.hero-advice {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Hero Panel Color States with Dynamic Gradient & Glow */
.hero-panel.panel-grade-A {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(16, 185, 129, 0.12);
    background: radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.1) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-grade-B {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(14, 165, 233, 0.12);
    background: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.1) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-grade-C {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(245, 158, 11, 0.12);
    background: radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.1) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-grade-D {
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(249, 115, 22, 0.12);
    background: radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.1) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-grade-E {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(239, 68, 68, 0.12);
    background: radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.1) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-status-blocked {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 32px rgba(239, 68, 68, 0.15);
    background: radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.08) 0%, var(--panel-bg) 60%);
}
.hero-panel.panel-status-degraded { border-color: rgba(245,158,11,0.3); }
.grade-blocked { color: #fca5a5; }

/* ===== Metrics Grid ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric-card {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

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

/* NDX metric card hover colors */
.metric-card[data-metric="valuation"]:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(59, 130, 246, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="spread"]:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(139, 92, 246, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="trend"]:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(16, 185, 129, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="position"]:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(245, 158, 11, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="vix"]:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(239, 68, 68, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(239, 68, 68, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="rate"]:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(236, 72, 153, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}

/* Gold metric card hover colors */
.metric-card[data-metric="dxy"]:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(59, 130, 246, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="realRate"]:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(139, 92, 246, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="breakeven"]:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(16, 185, 129, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="gld"]:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(245, 158, 11, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="centralBank"]:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(139, 92, 246, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}
.metric-card[data-metric="technical"]:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 25px rgba(16, 185, 129, 0.15);
    background: radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, rgba(17, 24, 39, 0.65) 80%);
}

.metric-card:hover .progress-bg {
    height: 6px;
}
.metric-card:hover .progress-bar {
    filter: brightness(1.2);
}

.metric-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-icon {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.metric-card:hover .metric-icon {
    color: var(--accent);
    transform: scale(1.15);
}

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

.metric-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-score {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.metric-value {
    font-size: 26px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1.2;
    word-break: break-word;
}

.progress-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s;
    width: 0%;
}

/* ===== Middle Row (Charts) ===== */
.middle-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-container {
    height: 320px;
    width: 100%;
}

/* ===== Warning Banner ===== */
.warning-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.warning-banner svg {
    flex-shrink: 0;
    stroke: var(--accent);
}

/* ===== DCA Multiplier ===== */
.dca-multiplier {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}
.dca-multiplier strong {
    color: var(--accent);
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

/* ===== Data Quality Panel ===== */
.data-quality-panel {
    animation-delay: 0.15s;
}
.quality-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.quality-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px 16px;
    background: rgba(17, 24, 39, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Glow thematic background/borders */
.quality-item[data-quality="status"] {
    background: radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.05), transparent 70%), rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}
.quality-item[data-quality="status"]:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
    transform: translateY(-2px);
}

.quality-item[data-quality="valuation"] {
    background: radial-gradient(circle at top left, rgba(168, 85, 247, 0.05), transparent 70%), rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(168, 85, 247, 0.1);
}
.quality-item[data-quality="valuation"]:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.quality-item[data-quality="health"] {
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.05), transparent 70%), rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(249, 115, 22, 0.1);
}
.quality-item[data-quality="health"]:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
    transform: translateY(-2px);
}

.quality-item[data-quality="update"] {
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.05), transparent 70%), rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(16, 185, 129, 0.1);
}
.quality-item[data-quality="update"]:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

/* Icon styling */
.quality-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.quality-item:hover .quality-icon-wrapper {
    transform: scale(1.1);
}

.quality-item[data-quality="status"] .quality-icon-wrapper {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}
.quality-item[data-quality="valuation"] .quality-icon-wrapper {
    background: rgba(168, 85, 247, 0.08);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.quality-item[data-quality="health"] .quality-icon-wrapper {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.15);
}
.quality-item[data-quality="update"] .quality-icon-wrapper {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.quality-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Content styling */
.quality-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
}
.quality-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.quality-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.quality-source {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
}
.quality-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.quality-high {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.quality-medium {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.quality-low {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== Metric Unavailable State ===== */
.metric-unavailable {
    opacity: 0.5;
    pointer-events: none;
}

.pe-quality-badge {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
}

.warning-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.warning-error svg {
    stroke: #fca5a5;
}
.warning-caution {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}
.warning-caution svg {
    stroke: #fbbf24;
}

/* ===== Footer & Disclaimer ===== */
.footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: none;
    text-align: center;
    position: relative;
}
.disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto;
}

/* ===== Table Panel ===== */
.table-panel {
    padding: 0; /* padding applied to children to allow full bleed scrollbar */
    display: flex;
    flex-direction: column;
}

.table-header-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-panel .panel-title {
    padding: 0;
    margin-bottom: 0;
}

/* ===== Table Filters ===== */
.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.filter-btn.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.15);
}

.filter-btn.grade-btn-A.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--grade-A);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.filter-btn.grade-btn-B.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--grade-B);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
}

.filter-btn.grade-btn-C.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--grade-C);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.filter-btn.grade-btn-D.active {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    color: var(--grade-D);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.15);
}

.filter-btn.grade-btn-E.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--grade-E);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* ===== Custom Tooltip ===== */
.custom-tooltip {
    position: fixed;
    z-index: 9999;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.96) translateY(4px);
    transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-tooltip.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.custom-tooltip strong {
    color: #fff;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 4px;
}

/* ===== Table Row Sync Highlight ===== */
tbody tr.row-highlight td {
    background: rgba(var(--accent-rgb), 0.08) !important;
}
tbody tr.row-highlight td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

.table-wrapper {
    max-height: 380px; /* Fixed height! */
    overflow-y: auto;
    padding: 0 24px 24px 24px;
}

/* Scrollbar Customization */
.table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 3px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.15);
    border-radius: 3px;
    transition: background 0.3s ease;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.4);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

th {
    position: sticky;
    top: 0;
    background: #0b0f19;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

td {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
}
td:first-child {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
}
td:last-child {
    font-family: 'Inter', sans-serif;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.008);
}
tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.04);
}

/* Grade Colors & Badges */
.grade-A { color: var(--grade-A); }
.grade-B { color: var(--grade-B); }
.grade-C { color: var(--grade-C); }
.grade-D { color: var(--grade-D); }
.grade-E { color: var(--grade-E); }

.grade-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    min-width: 38px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.bg-A { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 10px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-B { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.3); box-shadow: 0 0 10px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-C { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); box-shadow: 0 0 10px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-D { background: rgba(249, 115, 22, 0.12); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); box-shadow: 0 0 10px rgba(249, 115, 22, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-E { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 0 10px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg--- { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.18); }
.bg-status-ok { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 10px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-status-degraded { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); box-shadow: 0 0 10px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.bg-status-blocked, .bg-status-stale { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 0 10px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05); }

/* Responsive Adjustments */
/* ===== Loading Overlay ===== */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Skeleton Loading ===== */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton active state rule overrides */
body.loading-active .hero-grade-badge,
body.loading-active .hero-score,
body.loading-active .hero-score-suffix,
body.loading-active .multiplier-value,
body.loading-active .hero-advice,
body.loading-active .metric-value,
body.loading-active .metric-score,
body.loading-active .update-time,
body.loading-active .data-source,
body.loading-active .quality-source,
body.loading-active .quality-badge,
body.loading-active .historyBody tr td {
    color: transparent !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
    position: relative;
}

body.loading-active .hero-grade-badge::after,
body.loading-active .hero-score::after,
body.loading-active .multiplier-value::after,
body.loading-active .hero-advice::after,
body.loading-active .metric-value::after,
body.loading-active .metric-score::after,
body.loading-active .update-time::after,
body.loading-active .data-source::after,
body.loading-active .quality-source::after,
body.loading-active .quality-badge::after,
body.loading-active .historyBody tr td::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 14px;
    width: 80%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    z-index: 1;
}

body.loading-active .hero-score::after {
    height: 48px;
    width: 140px;
}

body.loading-active .metric-value::after {
    height: 24px;
    width: 80px;
}

body.loading-active .hero-grade-badge::after {
    height: 20px;
    width: 60px;
}

body.loading-active .progress-bg {
    background: rgba(255, 255, 255, 0.01) !important;
}

body.loading-active .progress-bar {
    opacity: 0 !important;
}

body.loading-active .chart-container {
    opacity: 0.05;
    pointer-events: none;
}

body.loading-active .chart-panel {
    position: relative;
}

body.loading-active .chart-panel::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 60px;
    bottom: 24px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

body.loading-active .table-wrapper {
    overflow: hidden;
}

body.loading-active .historyBody tr {
    background: transparent !important;
}

/* ===== Retry Button ===== */
.retry-btn {
    margin-left: auto;
    padding: 6px 16px;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.retry-btn:hover {
    background: rgba(var(--accent-rgb), 0.25);
}

/* ===== Staleness indicator ===== */
.panel-stale {
    border-color: rgba(239, 68, 68, 0.3) !important;
}
.stale-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
    margin-left: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .top-row {
        grid-template-columns: 1fr;
    }
    .middle-row {
        grid-template-columns: 1fr;
    }
    .hero-panel {
        align-items: center;
        text-align: center;
    }
    .hero-main {
        flex-direction: column;
        gap: 12px;
    }
    .hero-details {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-info {
        text-align: left;
    }
    .table-header-group {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }
    .filter-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .container { padding: 12px; }
    .header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .header-info { text-align: left; }
    .logo { font-size: 20px; }
    .hero-grade { font-size: 48px; }
    .hero-score { font-size: 24px; }
    .hero-main { gap: 12px; }
    .hero-panel { padding: 16px; }
    .metrics-grid { grid-template-columns: 1fr; }
    .metric-card { padding: 14px; }
    .metric-value { font-size: 22px; }
    .quality-grid { grid-template-columns: 1fr; }
    .table-wrapper { max-height: 280px; padding: 0 12px 12px 12px; }
    th, td { padding: 10px 8px; font-size: 11px; }
    .panel { padding: 16px; }
    .panel-title { font-size: 14px; }
    .middle-row { grid-template-columns: 1fr; }
    .chart-container { height: 260px; }
    .data-quality-panel .quality-grid { gap: 8px; }
    .quality-item {
        padding: 14px 12px;
        gap: 12px;
    }
    .quality-icon-wrapper {
        width: 36px;
        height: 36px;
    }
    .quality-icon {
        width: 16px;
        height: 16px;
    }
    .quality-source {
        font-size: 13px;
    }
}

/* ===== Info Icon (Tooltip Trigger positioned next to title) ===== */
.metric-card .info-icon {
    width: 13px;
    height: 13px;
    color: var(--text-muted);
    opacity: 0.45;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.metric-card .info-icon:hover {
    color: var(--accent);
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 4px var(--accent));
}

/* ===== Staggered Table Row Fade-in ===== */
@keyframes rowFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-row {
    animation: rowFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* ===== ECharts Glassmorphism Tooltip ===== */
.echarts-glass-tooltip {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.6) !important;
}

/* ===== Enhanced Ambient Animations ===== */
@keyframes ambientDrift {
    0%, 100% { transform: scale(1) translate(0, 0); }
    25% { transform: scale(1.03) translate(12px, -8px); }
    50% { transform: scale(0.97) translate(-6px, 10px); }
    75% { transform: scale(1.02) translate(8px, 5px); }
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(var(--accent-rgb), 0.6)) drop-shadow(0 0 40px rgba(var(--accent-rgb), 0.15)); }
}

/* ===== Hero Score Glow Per Grade ===== */
.hero-panel.panel-grade-A .hero-score {
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.4), 0 0 80px rgba(16, 185, 129, 0.12);
}
.hero-panel.panel-grade-B .hero-score {
    text-shadow: 0 0 40px rgba(14, 165, 233, 0.4), 0 0 80px rgba(14, 165, 233, 0.12);
}
.hero-panel.panel-grade-C .hero-score {
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.35), 0 0 80px rgba(245, 158, 11, 0.1);
}
.hero-panel.panel-grade-D .hero-score {
    text-shadow: 0 0 40px rgba(249, 115, 22, 0.35), 0 0 80px rgba(249, 115, 22, 0.1);
}
.hero-panel.panel-grade-E .hero-score {
    text-shadow: 0 0 40px rgba(239, 68, 68, 0.35), 0 0 80px rgba(239, 68, 68, 0.1);
}

/* ===== Metric Card Top-Line Accent ===== */
.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 1px;
    background: transparent;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}
.metric-card:hover::before {
    left: 10%;
    right: 10%;
    opacity: 1;
}

/* NDX top-line accents */
.metric-card[data-metric="valuation"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}
.metric-card[data-metric="spread"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
.metric-card[data-metric="trend"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.6), transparent);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.metric-card[data-metric="position"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
.metric-card[data-metric="vix"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.6), transparent);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
.metric-card[data-metric="rate"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.6), transparent);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.3);
}

/* Gold top-line accents */
.metric-card[data-metric="dxy"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}
.metric-card[data-metric="realRate"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
.metric-card[data-metric="breakeven"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.6), transparent);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.metric-card[data-metric="gld"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
.metric-card[data-metric="centralBank"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
.metric-card[data-metric="technical"]:hover::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.6), transparent);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* ===== Per-Card Metric Icon Hover Colors (NDX) ===== */
.metric-card[data-metric="valuation"]:hover .metric-icon { color: #3b82f6; }
.metric-card[data-metric="spread"]:hover .metric-icon { color: #8b5cf6; }
.metric-card[data-metric="trend"]:hover .metric-icon { color: #10b981; }
.metric-card[data-metric="position"]:hover .metric-icon { color: #f59e0b; }
.metric-card[data-metric="vix"]:hover .metric-icon { color: #ef4444; }
.metric-card[data-metric="rate"]:hover .metric-icon { color: #ec4899; }

/* ===== Per-Card Metric Icon Hover Colors (Gold) ===== */
.metric-card[data-metric="dxy"]:hover .metric-icon { color: #3b82f6; }
.metric-card[data-metric="realRate"]:hover .metric-icon { color: #0ea5e9; }
.metric-card[data-metric="breakeven"]:hover .metric-icon { color: #f59e0b; }
.metric-card[data-metric="gld"]:hover .metric-icon { color: #fbbf24; }
.metric-card[data-metric="centralBank"]:hover .metric-icon { color: #8b5cf6; }
.metric-card[data-metric="technical"]:hover .metric-icon { color: #10b981; }

/* ===== Progress Bar (shimmer removed to reduce GPU load) ===== */
.progress-bar {
    position: relative;
    overflow: hidden;
}

/* ===== Chart Panel Hover ===== */
.chart-panel {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.chart-panel:hover {
    border-color: rgba(var(--accent-rgb), 0.15);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03), 0 8px 32px -4px rgba(0, 0, 0, 0.5), 0 0 24px rgba(var(--accent-rgb), 0.06);
}

/* ===== Table Row Left Accent on Hover ===== */
tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 rgba(var(--accent-rgb), 0.5);
}

/* ===== Quality Items (inherited fade-in from parent dashboard animation) ===== */

/* ===== Footer Gradient Divider ===== */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.4), rgba(var(--accent-rgb), 0.25), transparent);
}

/* ===== Hero Action Box Grade Accent ===== */
.hero-panel.panel-grade-A .hero-action-box {
    border-color: rgba(16, 185, 129, 0.15);
    box-shadow: inset 0 0 24px rgba(16, 185, 129, 0.03);
}
.hero-panel.panel-grade-B .hero-action-box {
    border-color: rgba(14, 165, 233, 0.15);
    box-shadow: inset 0 0 24px rgba(14, 165, 233, 0.03);
}
.hero-panel.panel-grade-C .hero-action-box {
    border-color: rgba(245, 158, 11, 0.12);
}
.hero-panel.panel-grade-D .hero-action-box {
    border-color: rgba(249, 115, 22, 0.12);
}
.hero-panel.panel-grade-E .hero-action-box {
    border-color: rgba(239, 68, 68, 0.12);
}

/* ===== Data Reveal Transitions ===== */
.hero-score, .metric-value, .multiplier-value, .hero-advice,
.quality-source, .quality-badge, .metric-score {
    transition: opacity 0.5s ease, color 0.3s ease, text-shadow 0.6s ease;
}

/* ===== Panel Title Accent Glow on Hover ===== */
.panel:hover .panel-title::before {
    box-shadow: 0 0 14px var(--accent), 0 0 4px var(--accent);
}
