/* ============================================
   LedgerIQ Overview Dashboard — Premium Visual Upgrade
   Fraunces serif headlines, DM Sans body, JetBrains Mono data
   Teal #4a9080, Cream #faf8f5, Ink #1a1a1a
   NO CSS gradient backgrounds — solid colors only
   ============================================ */

/* ============================================
   PHASE 1: EDITORIAL COLOR SYSTEM
   ============================================ */

:root {
    /* LedgerIQ product teal */
    --ov-teal: #4a9080;
    --ov-teal-deep: #3a7265;
    --ov-teal-light: #e6f2ef;
    --ov-teal-glow: rgba(74, 144, 128, 0.25);

    /* Semantic — success / warning / danger */
    --ov-success: #4a9080;
    --ov-success-light: rgba(74, 144, 128, 0.12);
    --ov-warning: #b8860b;
    --ov-warning-light: rgba(184, 134, 11, 0.12);
    --ov-danger: #a0413a;
    --ov-danger-light: rgba(160, 65, 58, 0.12);

    /* Editorial surfaces */
    --ov-cream: #faf8f5;
    --ov-ivory: #f5f2ed;
    --ov-ink: #1a1a1a;
    --ov-ink-muted: #6b6560;
    --ov-ink-light: #8a847e;
    --ov-rule: #d4d0c8;
    --ov-card: #ffffff;

    /* Typography */
    --ov-serif: 'Fraunces', Georgia, serif;
    --ov-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ov-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Shadows — upgraded */
    --ov-shadow-sm: 0 1px 3px rgba(26, 26, 26, 0.06);
    --ov-shadow-md: 0 6px 16px rgba(26, 26, 26, 0.08);
    --ov-shadow-lg: 0 8px 24px rgba(26, 26, 26, 0.10);
    --ov-shadow-xl: 0 16px 40px rgba(26, 26, 26, 0.12);

    /* Radius */
    --ov-radius: 4px;
    --ov-radius-md: 8px;
    --ov-radius-lg: 12px;
    --ov-radius-xl: 16px;

    /* Transitions */
    --ov-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ov-duration: 250ms;
}

/* ============================================
   PHASE 2: HERO SECTION
   Solid deep teal background — NO gradient
   ============================================ */

.hero-section {
    background: #1e4a3f;
    padding: 2.5rem;
    border-radius: var(--ov-radius-xl);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--ov-shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Subtle crosshatch pattern */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Ambient glow */
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 55%;
    height: 200%;
    background: radial-gradient(ellipse at center, var(--ov-teal-glow) 0%, transparent 60%);
    opacity: 0.5;
    pointer-events: none;
    animation: heroGlowPulse 10s ease-in-out infinite;
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.08); }
}

.hero-content {
    flex: 1;
    z-index: 2;
    position: relative;
    max-width: 550px;
}

.company-branding {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.company-avatar {
    width: 68px;
    height: 68px;
    border-radius: var(--ov-radius-lg);
    background: #4a9080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ov-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 20px rgba(74, 144, 128, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.company-name {
    font-family: var(--ov-serif);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
    color: white;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.company-subtitle {
    font-family: var(--ov-sans);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.75rem 0;
    font-weight: 400;
}

.period-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ov-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Health Pulse */
.hero-health-pulse {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--ov-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6cc4a8;
    box-shadow: 0 0 10px rgba(108, 196, 168, 0.5);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.pulse-indicator.warning {
    background: #d4a843;
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

.pulse-indicator.critical {
    background: #c46b64;
    box-shadow: 0 0 10px rgba(196, 107, 100, 0.5);
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.88); }
}

.pulse-text {
    font-family: var(--ov-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.pulse-value {
    font-weight: 700;
    color: #6cc4a8;
}
.pulse-value.warning { color: #d4a843; }
.pulse-value.critical { color: #c46b64; }

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-action-btn {
    font-family: var(--ov-sans);
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--ov-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--ov-duration) var(--ov-ease);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.hero-action-btn.primary {
    background: var(--ov-teal);
    color: white;
    box-shadow: 0 4px 14px rgba(74, 144, 128, 0.4);
}

.hero-action-btn.primary:hover {
    background: var(--ov-teal-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 128, 0.5);
}

.hero-action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Hero Visual */
.hero-visual {
    flex: 0 0 400px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.animated-chart-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--ov-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
}

/* ============================================
   PHASE 3: BENTO GRID — EXECUTIVE SUMMARY
   White cards with left accent bars
   ============================================ */

.executive-summary {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

/* Revenue card — white with teal left accent */
.summary-card.primary-metric {
    grid-column: span 5;
    background: var(--ov-card);
    color: var(--ov-ink);
    border: 1px solid var(--ov-rule);
    border-left: 4px solid var(--ov-teal);
    position: relative;
    overflow: hidden;
    animation: cardReveal 400ms var(--ov-ease) 80ms both;
}

.summary-card.primary-metric::before {
    display: none;
}

/* Profit card — white with ink left accent */
.summary-card.secondary-metric {
    grid-column: span 4;
    background: var(--ov-card);
    color: var(--ov-ink);
    border: 1px solid var(--ov-rule);
    border-left: 4px solid var(--ov-ink);
    animation: cardReveal 400ms var(--ov-ease) 140ms both;
}

/* Health card — white with gold accent */
.summary-card.health-metric {
    grid-column: span 3;
    background: var(--ov-card);
    color: var(--ov-ink);
    border: 1px solid var(--ov-rule);
    border-left: 4px solid var(--ov-warning);
    animation: cardReveal 400ms var(--ov-ease) 200ms both;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base Card */
.summary-card {
    border-radius: var(--ov-radius-xl);
    padding: 1.75rem;
    box-shadow: var(--ov-shadow-md);
    transition: all var(--ov-duration) var(--ov-ease);
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ov-shadow-lg);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--ov-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 144, 128, 0.08);
    color: var(--ov-teal);
}

.summary-card.secondary-metric .metric-icon {
    background: rgba(26, 26, 26, 0.06);
    color: var(--ov-ink);
}

.summary-card.health-metric .metric-icon {
    background: var(--ov-teal-light);
    color: var(--ov-teal);
}

.metric-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.metric-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--ov-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    background: var(--ov-success-light);
    color: var(--ov-teal-deep);
}

.metric-status.warning {
    background: var(--ov-warning-light);
    color: var(--ov-warning);
}

.metric-status.negative {
    background: var(--ov-danger-light);
    color: var(--ov-danger);
}

.summary-card.health-metric .metric-status {
    background: var(--ov-success-light);
    color: var(--ov-teal-deep);
}

.summary-card.health-metric .metric-status.warning {
    background: var(--ov-warning-light);
    color: var(--ov-warning);
}

.summary-card.health-metric .metric-status.negative {
    background: var(--ov-danger-light);
    color: var(--ov-danger);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.metric-content {
    position: relative;
    z-index: 1;
}

.metric-title {
    font-family: var(--ov-sans);
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ov-ink-muted);
    opacity: 1;
}

/* All cards now use ink text — no more white text overrides needed */
.summary-card.primary-metric .metric-title,
.summary-card.secondary-metric .metric-title {
    color: var(--ov-ink-muted);
}

.summary-card.primary-metric .metric-value,
.summary-card.secondary-metric .metric-value {
    color: var(--ov-ink);
}

.summary-card.primary-metric .metric-context,
.summary-card.secondary-metric .metric-context {
    color: var(--ov-ink-muted);
}

.summary-card.health-metric .metric-title {
    color: var(--ov-ink-muted);
    opacity: 1;
}

.summary-card.health-metric .metric-value {
    color: var(--ov-ink);
}

.metric-value {
    font-family: var(--ov-serif);
    font-size: 2.4rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums slashed-zero;
}

.summary-card.primary-metric .metric-value {
    font-size: 2.8rem;
}

.metric-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ov-sans);
    font-size: 0.85rem;
    color: var(--ov-ink-muted);
    opacity: 1;
}

.summary-card.health-metric .metric-context {
    color: var(--ov-ink-muted);
    opacity: 1;
}

.change-indicator {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.change-indicator.positive { color: var(--ov-teal); }
.change-indicator.negative { color: var(--ov-danger); }

.summary-card.health-metric .change-indicator.positive { color: var(--ov-teal); }
.summary-card.health-metric .change-indicator.negative { color: var(--ov-danger); }

.summary-card.primary-metric .change-indicator.positive,
.summary-card.secondary-metric .change-indicator.positive { color: var(--ov-teal); }
.summary-card.primary-metric .change-indicator.negative,
.summary-card.secondary-metric .change-indicator.negative { color: var(--ov-danger); }

/* Sparklines */
.metric-sparkline {
    height: 55px;
    margin-top: 1.25rem;
    position: relative;
    opacity: 0.9;
}

.metric-sparkline canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Health Score Ring */
.health-score-ring {
    width: 52px;
    height: 52px;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: var(--ov-rule);
    stroke-width: 3;
}

.summary-card.health-metric .circle-bg {
    stroke: var(--ov-rule);
    stroke-width: 3;
}

.summary-card.health-metric .circle {
    fill: none;
    stroke: var(--ov-teal);
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 1s var(--ov-ease);
}

/* ============================================
   PHASE 4: EXECUTIVE NARRATIVE
   ============================================ */

.executive-narrative {
    background: var(--ov-cream);
    border-left: 3px solid var(--ov-teal);
    border-radius: var(--ov-radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--ov-shadow-sm);
}

.executive-narrative .narrative-text {
    font-family: var(--ov-serif);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ov-ink);
    margin: 0;
    font-weight: 400;
}

/* ============================================
   PHASE 5: FINANCIAL SCORECARDS
   ============================================ */

.dimension-scorecards {
    margin-bottom: 2rem;
}

.dimension-scorecards .scorecards-title {
    font-family: var(--ov-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0 0 1rem 0;
}

.scorecards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.scorecard-item {
    background: var(--ov-card);
    border-radius: var(--ov-radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--ov-shadow-sm);
    border: 1px solid var(--ov-rule);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--ov-duration) var(--ov-ease);
    cursor: pointer;
}

.scorecard-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--ov-shadow-md);
    border-color: var(--ov-teal);
}

.scorecard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.scorecard-green .scorecard-dot {
    background: var(--ov-teal);
    box-shadow: 0 0 6px rgba(74, 144, 128, 0.4);
}

.scorecard-amber .scorecard-dot {
    background: var(--ov-warning);
    box-shadow: 0 0 6px rgba(184, 134, 11, 0.4);
}

.scorecard-red .scorecard-dot {
    background: var(--ov-danger);
    box-shadow: 0 0 6px rgba(160, 65, 58, 0.4);
}

.scorecard-body {
    flex: 1;
    min-width: 0;
}

.scorecard-label {
    font-family: var(--ov-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ov-ink-muted);
    margin-bottom: 0.25rem;
}

.scorecard-value {
    font-family: var(--ov-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ov-ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums slashed-zero;
}

.scorecard-verdict {
    font-family: var(--ov-sans);
    font-size: 0.78rem;
    color: var(--ov-ink-light);
    margin-top: 0.25rem;
}

/* ============================================
   PHASE 6: REVENUE VS EXPENSES TREND
   ============================================ */

.overview-trend-section {
    background: var(--ov-card);
    border-radius: var(--ov-radius-xl);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--ov-shadow-md);
    border: 1px solid var(--ov-rule);
}

.trend-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.trend-section-title {
    font-family: var(--ov-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0;
}

.trend-section-subtitle {
    font-family: var(--ov-sans);
    font-size: 0.85rem;
    color: var(--ov-ink-light);
}

.trend-chart-container {
    height: 360px;
    position: relative;
}

.trend-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   PHASE 7: TOP EXPENSES
   Solid bars with slide-in animation
   ============================================ */

.top-expenses-section {
    background: var(--ov-card);
    border-radius: var(--ov-radius-xl);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--ov-shadow-md);
    border: 1px solid var(--ov-rule);
}

.top-expenses-title {
    font-family: var(--ov-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0 0 1.25rem 0;
}

.top-expenses-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.expense-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 200ms var(--ov-ease);
    animation: barSlideIn 400ms var(--ov-ease) both;
}

.expense-bar-item:nth-child(1) { animation-delay: 50ms; }
.expense-bar-item:nth-child(2) { animation-delay: 100ms; }
.expense-bar-item:nth-child(3) { animation-delay: 150ms; }
.expense-bar-item:nth-child(4) { animation-delay: 200ms; }
.expense-bar-item:nth-child(5) { animation-delay: 250ms; }
.expense-bar-item:nth-child(6) { animation-delay: 300ms; }
.expense-bar-item:nth-child(7) { animation-delay: 350ms; }
.expense-bar-item:nth-child(8) { animation-delay: 400ms; }

@keyframes barSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.expense-bar-rank {
    width: 28px;
    height: 28px;
    border-radius: var(--ov-radius);
    background: var(--ov-teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ov-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ov-teal-deep);
    flex-shrink: 0;
    border: 1px solid rgba(74, 144, 128, 0.2);
}

.expense-bar-body {
    flex: 1;
    min-width: 0;
}

.expense-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.expense-bar-name {
    font-family: var(--ov-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ov-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.expense-bar-amount {
    font-family: var(--ov-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ov-ink);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums slashed-zero;
}

.expense-bar-track {
    height: 10px;
    border-radius: 5px;
    background: var(--ov-ivory);
    overflow: hidden;
}

.expense-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: var(--ov-teal);
    transition: width 0.8s var(--ov-ease);
}

.expense-bar-percent {
    font-family: var(--ov-mono);
    font-size: 0.72rem;
    color: var(--ov-ink-light);
    margin-top: 0.2rem;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   PHASE 8: INSIGHTS SECTION
   ============================================ */

.insights-section-enhanced {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--ov-card);
    border-radius: var(--ov-radius-xl);
    box-shadow: var(--ov-shadow-md);
    border: 1px solid var(--ov-rule);
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ov-rule);
}

.insights-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.insights-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ov-radius-md);
    background: var(--ov-teal);
    color: white;
    box-shadow: 0 3px 10px rgba(74, 144, 128, 0.25);
}

.insights-title {
    font-family: var(--ov-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0;
}

.insights-subtitle {
    font-family: var(--ov-sans);
    font-size: 0.9rem;
    color: var(--ov-ink-muted);
    margin: 0.25rem 0 0 0;
}

/* Health Score Ring in Insights */
.insights-score .score-ring {
    position: relative;
    width: 68px;
    height: 68px;
}

.insights-score .score-circle {
    width: 100%;
    height: 100%;
}

.score-bg {
    fill: none;
    stroke: var(--ov-rule);
    stroke-width: 6;
}

.score-fill {
    fill: none;
    stroke: var(--ov-teal);
    stroke-width: 6;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s var(--ov-ease);
}

.insights-score .score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--ov-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ov-ink);
}

.insights-score .score-label {
    font-family: var(--ov-sans);
    font-size: 0.72rem;
    color: var(--ov-ink-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-chip {
    font-family: var(--ov-sans);
    padding: 0.55rem 1rem;
    border: 1px solid var(--ov-rule);
    border-radius: 100px;
    background: var(--ov-card);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ov-ink-muted);
    cursor: pointer;
    transition: all 150ms var(--ov-ease);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-chip:hover {
    border-color: var(--ov-teal);
    color: var(--ov-teal);
    background: var(--ov-teal-light);
}

.filter-chip.active {
    background: var(--ov-teal);
    border-color: var(--ov-teal);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 128, 0.3);
    font-weight: 600;
}

/* Insights Grid */
.insights-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
}

/* Insight Card */
.insight-card-enhanced {
    background: var(--ov-card);
    border-radius: var(--ov-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--ov-shadow-sm);
    border: 1px solid var(--ov-rule);
    transition: all var(--ov-duration) var(--ov-ease);
    position: relative;
    overflow: hidden;
}

.insight-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--ov-shadow-md);
    border-color: var(--ov-teal);
}

.insight-card-enhanced.category-opportunity {
    border-left: 3px solid var(--ov-teal);
}

.insight-card-enhanced.category-risk {
    border-left: 3px solid var(--ov-danger);
}

.insight-card-enhanced.category-action {
    border-left: 3px solid var(--ov-ink-muted);
}

.insight-card-enhanced.priority-critical {
    grid-column: span 2;
    background: #fdf6f5;
    border-left: 3px solid var(--ov-danger);
    animation: none;
}

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

.insight-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--ov-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 150ms var(--ov-ease);
}

.insight-card-enhanced:hover .insight-icon-circle {
    transform: scale(1.05);
}

.insight-icon-circle.category-opportunity {
    background: var(--ov-success-light);
    color: var(--ov-teal);
}

.insight-icon-circle.category-risk {
    background: var(--ov-danger-light);
    color: var(--ov-danger);
}

.insight-icon-circle.category-action {
    background: var(--ov-ivory);
    color: var(--ov-ink-muted);
}

.insight-priority-badge {
    font-family: var(--ov-sans);
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.insight-priority-badge.priority-critical {
    background: var(--ov-danger);
    color: white;
}

.insight-priority-badge.priority-high {
    background: var(--ov-warning);
    color: white;
}

.insight-priority-badge.priority-medium {
    background: var(--ov-ink-muted);
    color: white;
}

.insight-priority-badge.priority-low {
    background: var(--ov-ivory);
    color: var(--ov-ink-muted);
}

.insight-title-enhanced {
    font-family: var(--ov-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.insight-description-enhanced {
    font-family: var(--ov-sans);
    font-size: 0.88rem;
    color: var(--ov-ink-muted);
    line-height: 1.6;
    margin: 0;
}

/* Insight Data Points */
.insight-data-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--ov-cream);
    border-radius: var(--ov-radius-md);
    margin: 1rem 0;
    border: 1px solid var(--ov-rule);
}

.data-point-label {
    font-family: var(--ov-sans);
    font-size: 0.7rem;
    color: var(--ov-ink-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-point-value {
    font-family: var(--ov-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ov-ink);
    font-variant-numeric: tabular-nums slashed-zero;
}

/* Insight Score Display */
.insight-score-display {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--ov-cream);
    border-radius: var(--ov-radius-md);
    margin: 1rem 0;
    border: 1px solid var(--ov-rule);
}

.score-bar {
    height: 5px;
    background: var(--ov-rule);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--ov-teal);
    border-radius: 3px;
    transition: width 0.5s var(--ov-ease);
}

/* Impact Statement */
.insight-impact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--ov-teal-light);
    border-radius: var(--ov-radius-md);
    margin: 1rem 0;
    border: 1px solid rgba(74, 144, 128, 0.15);
}

.impact-icon {
    color: var(--ov-teal);
    flex-shrink: 0;
}

.impact-text {
    font-family: var(--ov-sans);
    font-size: 0.85rem;
    color: var(--ov-teal-deep);
    font-weight: 500;
}

/* Recommendations */
.insight-recommendations {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--ov-cream);
    border-radius: var(--ov-radius-md);
    border: 1px solid var(--ov-rule);
}

.recommendations-title {
    font-family: var(--ov-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0 0 0.75rem 0;
}

.recommendation-item {
    font-family: var(--ov-sans);
    font-size: 0.85rem;
    color: var(--ov-ink-muted);
    line-height: 1.5;
}

.recommendation-item::before {
    content: '\2192';
    color: var(--ov-teal);
    font-weight: 600;
}

/* Insight Action */
.insight-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ov-rule);
}

.insight-action-btn {
    width: 100%;
    font-family: var(--ov-sans);
    padding: 0.7rem 1rem;
    border: none;
    border-radius: var(--ov-radius-md);
    background: var(--ov-cream);
    color: var(--ov-ink);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms var(--ov-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--ov-rule);
}

.insight-action-btn:hover {
    background: var(--ov-teal);
    color: white;
    border-color: var(--ov-teal);
    transform: translateY(-1px);
}

.insight-action-btn.urgent {
    background: var(--ov-danger);
    color: white;
    border-color: var(--ov-danger);
}

.insight-action-btn.urgent:hover {
    background: #8a3530;
}

.insight-timeframe {
    font-family: var(--ov-sans);
    font-size: 0.72rem;
    color: var(--ov-ink-light);
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    background: var(--ov-cream);
    border-radius: 100px;
    border: 1px solid var(--ov-rule);
}

/* ============================================
   PHASE 9: PERFORMANCE OVERVIEW CARDS
   ============================================ */

.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.overview-chart-card {
    background: var(--ov-card);
    border-radius: var(--ov-radius-xl);
    padding: 1.5rem;
    box-shadow: var(--ov-shadow-md);
    border: 1px solid var(--ov-rule);
    transition: all var(--ov-duration) var(--ov-ease);
}

.overview-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ov-shadow-lg);
}

.overview-chart-card.featured {
    grid-column: span 2;
}

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

.chart-header h3 {
    font-family: var(--ov-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0;
}

.chart-container {
    height: 200px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Account Summary Donut visual container */
.account-summary-visual {
    height: 240px;
    position: relative;
    margin-bottom: 1rem;
}

.account-summary-visual canvas {
    width: 100% !important;
    height: 100% !important;
}

.donut-center-text {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-center-count {
    font-family: var(--ov-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ov-ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums slashed-zero;
}

.donut-center-label {
    font-family: var(--ov-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ov-ink-muted);
}

/* Data Coverage Gauge visual container */
.data-coverage-visual {
    height: 200px;
    position: relative;
    margin-bottom: 1rem;
}

.data-coverage-visual canvas {
    width: 100% !important;
    height: 100% !important;
}

.gauge-center-text {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.gauge-center-percent {
    font-family: var(--ov-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ov-ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums slashed-zero;
}

.gauge-center-label {
    font-family: var(--ov-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ov-ink-muted);
}

/* ============================================
   PHASE 10: NEXT STEPS TIMELINE
   ============================================ */

.next-steps-enhanced {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--ov-card);
    border-radius: var(--ov-radius-xl);
    box-shadow: var(--ov-shadow-md);
    border: 1px solid var(--ov-rule);
}

.next-steps-title {
    font-family: var(--ov-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0 0 0.5rem 0;
}

.next-steps-subtitle {
    font-family: var(--ov-sans);
    font-size: 0.95rem;
    color: var(--ov-ink-muted);
    margin: 0;
}

.step-number-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ov-teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ov-serif);
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(74, 144, 128, 0.3);
    position: relative;
}

.step-number-circle.locked {
    background: var(--ov-rule);
    color: var(--ov-ink-light);
    box-shadow: none;
}

.step-connector {
    width: 2px;
    flex: 1;
    background: var(--ov-rule);
    margin: 0.5rem 0;
}

.step-title {
    font-family: var(--ov-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ov-ink);
    margin: 0;
}

.step-duration {
    font-family: var(--ov-sans);
    font-size: 0.82rem;
    color: var(--ov-ink-light);
    padding: 0.2rem 0.6rem;
    background: var(--ov-cream);
    border-radius: 100px;
    border: 1px solid var(--ov-rule);
}

.step-description {
    font-family: var(--ov-sans);
    font-size: 0.92rem;
    color: var(--ov-ink-muted);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--ov-rule);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--ov-teal);
    border-radius: 3px;
    transition: width 0.5s var(--ov-ease);
}

.progress-text {
    font-family: var(--ov-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ov-ink);
}

.step-action-btn {
    font-family: var(--ov-sans);
    padding: 0.7rem 1.15rem;
    border: none;
    border-radius: var(--ov-radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms var(--ov-ease);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-action-btn.primary {
    background: var(--ov-teal);
    color: white;
}

.step-action-btn.primary:hover {
    background: var(--ov-teal-deep);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 128, 0.3);
}

.step-action-btn.secondary {
    background: var(--ov-cream);
    color: var(--ov-ink);
    border: 1px solid var(--ov-rule);
}

.step-action-btn.secondary:hover {
    background: var(--ov-teal-light);
    color: var(--ov-teal-deep);
}

.preview-badge {
    font-family: var(--ov-sans);
    padding: 0.4rem 0.65rem;
    background: var(--ov-cream);
    border: 1px solid var(--ov-rule);
    border-radius: var(--ov-radius);
    font-size: 0.78rem;
    color: var(--ov-ink-muted);
    font-weight: 500;
}

/* ============================================
   PHASE 11: ANIMATIONS
   ============================================ */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--ov-rule) 25%, var(--ov-ivory) 50%, var(--ov-rule) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--ov-radius);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Staggered Fade In */
.stagger-fade-in > * {
    opacity: 0;
    transform: translateY(8px);
    animation: staggerFadeIn 350ms var(--ov-ease) forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0ms; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 60ms; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 120ms; }

@keyframes staggerFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Value Change */
.value-changed {
    animation: valueFlash 300ms var(--ov-ease);
}

@keyframes valueFlash {
    0% { color: inherit; }
    50% { color: var(--ov-teal); }
    100% { color: inherit; }
}

/* ============================================
   GLOBAL POLISH
   ============================================ */

/* Tabular nums + slashed zero on all monetary values */
.metric-value,
.scorecard-value,
.expense-bar-amount,
.data-point-value,
.donut-center-count,
.gauge-center-percent {
    font-variant-numeric: tabular-nums slashed-zero;
}

/* Consistent transition on all interactive elements */
.summary-card,
.scorecard-item,
.expense-bar-item,
.insight-card-enhanced,
.overview-chart-card,
.filter-chip,
.hero-action-btn,
.step-action-btn,
.insight-action-btn {
    transition: all var(--ov-duration) var(--ov-ease);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PHASE 12: RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .executive-summary {
        grid-template-columns: repeat(6, 1fr);
    }
    .summary-card.primary-metric { grid-column: span 6; }
    .summary-card.secondary-metric { grid-column: span 3; }
    .summary-card.health-metric { grid-column: span 3; }

    .scorecards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insight-card-enhanced.priority-critical {
        grid-column: span 1;
    }
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        min-height: auto;
    }
    .hero-content { max-width: 100%; }
    .company-branding { flex-direction: column; align-items: center; }
    .hero-visual { flex: none; width: 100%; height: 200px; margin-top: 1.5rem; }
    .hero-actions { justify-content: center; }
    .executive-summary { grid-template-columns: 1fr; }
    .summary-card.primary-metric,
    .summary-card.secondary-metric,
    .summary-card.health-metric { grid-column: span 1; }
    .insights-grid-enhanced { grid-template-columns: 1fr; }
    .overview-chart-card.featured { grid-column: span 1; }
}

@media (max-width: 600px) {
    .hero-section { padding: 1.5rem; border-radius: var(--ov-radius-lg); }
    .company-name { font-size: 1.5rem; }
    .metric-value { font-size: 2rem; }
    .summary-card.primary-metric .metric-value { font-size: 2.2rem; }
    .hero-action-btn { padding: 0.7rem 1.15rem; font-size: 0.85rem; }
    .filter-chips { justify-content: center; }
    .scorecards-grid { grid-template-columns: 1fr; }
    .executive-narrative { padding: 1.25rem 1.5rem; }
    .trend-chart-container { height: 220px; }
}

/* ============================================
   PHASE 13: DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    .insights-section-enhanced,
    .overview-chart-card,
    .insight-card-enhanced {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
        color: #f0ece8;
    }

    .insights-title,
    .chart-header h3,
    .insight-title-enhanced,
    .trend-section-title,
    .top-expenses-title,
    .next-steps-title {
        color: #f0ece8;
    }

    .insights-subtitle,
    .insight-description-enhanced {
        color: #b0a99f;
    }

    .filter-chip {
        background: #332f2c;
        border-color: rgba(255, 255, 255, 0.12);
        color: #c5bfb8;
    }

    .filter-chip:hover {
        background: #3d3835;
        color: #e6f2ef;
    }

    .filter-chip.active {
        background: var(--ov-teal);
        border-color: var(--ov-teal);
        color: white;
    }

    .insight-action-btn {
        background: #332f2c;
        color: #e8e3de;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .insight-action-btn:hover {
        background: var(--ov-teal);
        color: white;
    }

    .insight-card-enhanced.priority-critical {
        background: #3a2624;
    }

    /* Dark mode: summary cards revert to dark backgrounds */
    .summary-card.primary-metric {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
        border-left-color: var(--ov-teal);
    }

    .summary-card.secondary-metric {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
        border-left-color: var(--ov-ink-light);
    }

    .summary-card.health-metric {
        background: #332f2c;
        color: #f0ece8;
        border-color: rgba(255, 255, 255, 0.08);
        border-left-color: var(--ov-warning);
    }

    .summary-card.primary-metric .metric-title,
    .summary-card.primary-metric .metric-value,
    .summary-card.primary-metric .metric-context,
    .summary-card.secondary-metric .metric-title,
    .summary-card.secondary-metric .metric-value,
    .summary-card.secondary-metric .metric-context {
        color: #f0ece8;
    }

    .summary-card.health-metric .metric-title,
    .summary-card.health-metric .metric-context {
        color: rgba(255, 255, 255, 0.75);
    }

    .insights-score .score-value { color: #f0ece8; }

    .executive-narrative {
        background: #252220;
        border-left-color: var(--ov-teal);
    }

    .executive-narrative .narrative-text { color: rgba(255, 255, 255, 0.85); }

    .dimension-scorecards .scorecards-title { color: #f0ece8; }

    .scorecard-item {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .scorecard-label { color: rgba(255, 255, 255, 0.6); }
    .scorecard-value { color: #f0ece8; }
    .scorecard-verdict { color: rgba(255, 255, 255, 0.5); }

    .overview-trend-section {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .trend-section-title { color: #f0ece8; }
    .trend-section-subtitle { color: rgba(255, 255, 255, 0.5); }

    .top-expenses-section {
        background: #252220;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .top-expenses-title { color: #f0ece8; }
    .expense-bar-name { color: rgba(255, 255, 255, 0.85); }
    .expense-bar-amount { color: #f0ece8; }
    .expense-bar-percent { color: rgba(255, 255, 255, 0.5); }
    .expense-bar-track { background: rgba(255, 255, 255, 0.08); }

    .insight-data-points,
    .insight-score-display,
    .insight-recommendations {
        background: #332f2c;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .data-point-value { color: #f0ece8; }
    .data-point-label { color: rgba(255, 255, 255, 0.55); }

    .donut-center-count,
    .gauge-center-percent { color: #f0ece8; }
    .donut-center-label,
    .gauge-center-label { color: rgba(255, 255, 255, 0.6); }
}
