:root {
    --accent: #e84393;
    --accent-blue: #3b9edd;
    --accent-green: #20c997;
    --accent-orange: #fd7e14;
    --accent-purple: #a855f7;
    --card-bg: #1e1e2e;
    --card-border: rgba(255,255,255,0.07);
}

body {
    background-color: #12121c;
    color: #e2e8f0;
}

/* ── Cards ─────────────────────────────── */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    margin-bottom: 1.25rem;
}

.card-header {
    background-color: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--card-border);
    border-radius: 12px 12px 0 0 !important;
}

/* ── KPI / Stat cards ──────────────────── */
.stat-card {
    border-radius: 12px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-top: 4px;
}

.stat-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
    opacity: 0.85;
}

/* ── Streak cards ──────────────────────── */
.streak-card {
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transition: transform .2s;
}

.streak-card:hover { transform: translateY(-3px); }

.streak-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.streak-card.active {
    border-color: #20c997;
    background: rgba(32, 201, 151, 0.08);
}

.streak-card.active .streak-number { color: #20c997; }

/* ── Score badges ─────────────────────── */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
}

/* ── Table ────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(255,255,255,0.04);
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-top: none;
    padding-bottom: 0.75rem;
}

.table td { vertical-align: middle; }

/* ── Navbar ───────────────────────────── */
.navbar-brand { font-size: 1.15rem; letter-spacing: -0.02em; }

.nav-link {
    font-size: 0.9rem;
    border-radius: 6px;
    padding: 0.4rem 0.75rem !important;
    transition: background .15s;
}

.nav-link:hover { background: rgba(255,255,255,0.07); }

/* ── Footer ───────────────────────────── */
.footer { margin-top: 3rem; }

/* ── Forms ────────────────────────────── */
.form-control, .form-select {
    background-color: #16162a;
    border-color: rgba(255,255,255,0.12);
    color: #e2e8f0;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    background-color: #1e1e3a;
    border-color: var(--accent-blue);
    color: #e2e8f0;
    box-shadow: 0 0 0 3px rgba(59,158,221,0.2);
}

/* ── Buttons ──────────────────────────── */
.btn { border-radius: 8px; font-weight: 500; }

/* ── Period pills ─────────────────────── */
.period-pill {
    border-radius: 20px !important;
    font-size: 0.82rem;
    padding: 0.3rem 0.9rem;
}

/* ── Section title ────────────────────── */
.section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ── Habit dot ────────────────────────── */
.habit-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 768px) {
    .stat-value { font-size: 1.6rem; }
    .streak-number { font-size: 2rem; }
}

/* ══════════════════════════════════════════════
   FUSION DASHBOARD — Semantic Color System
   🟢 good      ≥95% van target
   🔵 growing   80–94%
   🟡 attention 60–79%
   🔴 problem   <60%
   ══════════════════════════════════════════════ */

:root {
    --c-good:      #10b981;
    --c-growing:   #06b6d4;
    --c-attention: #f59e0b;
    --c-problem:   #f43f5e;
    --c-none:      rgba(255,255,255,0.15);
    --c-future:    rgba(255,255,255,0.06);
    --dash-bg:     #0f0f1a;
    --dash-card:   #12121f;
}

/* ── Status text colors ─────────────────── */
.s-good      { color: var(--c-good) !important; }
.s-growing   { color: var(--c-growing) !important; }
.s-attention { color: var(--c-attention) !important; }
.s-problem   { color: var(--c-problem) !important; }
.s-none      { color: rgba(255,255,255,0.3) !important; }

/* ── Status badges ──────────────────────── */
.sbadge {
    display: inline-block;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 2px 8px; border-radius: 20px;
}
.sbadge-good      { background: rgba(16,185,129,0.18); color: var(--c-good); }
.sbadge-growing   { background: rgba(6,182,212,0.18);  color: var(--c-growing); }
.sbadge-attention { background: rgba(245,158,11,0.18); color: var(--c-attention); }
.sbadge-problem   { background: rgba(244,63,94,0.18);  color: var(--c-problem); }
.sbadge-none      { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.3); }

/* ── Status card borders ────────────────── */
.scard-good      { border-color: rgba(16,185,129,0.3) !important; }
.scard-growing   { border-color: rgba(6,182,212,0.3) !important; }
.scard-attention { border-color: rgba(245,158,11,0.3) !important; }
.scard-problem   { border-color: rgba(244,63,94,0.3) !important; }
.scard-none      { border-color: rgba(255,255,255,0.07) !important; }

/* ── SVG ring stroke colors ─────────────── */
.ring-good      { stroke: var(--c-good);      filter: drop-shadow(0 0 8px var(--c-good)); }
.ring-growing   { stroke: var(--c-growing);   filter: drop-shadow(0 0 8px var(--c-growing)); }
.ring-attention { stroke: var(--c-attention); filter: drop-shadow(0 0 8px var(--c-attention)); }
.ring-problem   { stroke: var(--c-problem);   filter: drop-shadow(0 0 8px var(--c-problem)); }
.ring-none      { stroke: rgba(255,255,255,0.15); }

/* ── Ring card ──────────────────────────── */
.ring-card {
    background: var(--dash-bg);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color .2s, transform .18s, box-shadow .18s;
}
.ring-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }

.ring-value {
    font-size: 1.4rem; font-weight: 900; line-height: 1;
    letter-spacing: -0.03em;
}
.ring-unit { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-left: 2px; }
.ring-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.7); margin-top: 6px; }
.ring-target { font-size: 0.65rem; color: rgba(255,255,255,0.35); margin-top: 2px; }

/* ── Trend badge ────────────────────────── */
.trend-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-top: 4px;
}
.trend-up   { color: var(--c-good); }
.trend-down { color: var(--c-problem); }
.trend-flat { color: rgba(255,255,255,0.3); }

/* ── Week dots ──────────────────────────── */
.week-dots { display: flex; gap: 5px; justify-content: center; margin-top: 8px; }
.week-dot-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.week-dot {
    width: 14px; height: 14px; border-radius: 50%;
    flex-shrink: 0;
}
.week-dot-label { font-size: 0.55rem; color: rgba(255,255,255,0.25); font-weight: 700; }
.dot-good      { background: var(--c-good);      box-shadow: 0 0 6px var(--c-good); }
.dot-growing   { background: var(--c-growing);   box-shadow: 0 0 6px var(--c-growing); }
.dot-attention { background: var(--c-attention); box-shadow: 0 0 6px var(--c-attention); }
.dot-problem   { background: var(--c-problem);   box-shadow: 0 0 6px var(--c-problem); }
.dot-none      { background: rgba(255,255,255,0.1); }

/* ── Streak cards (fusion style) ────────── */
.fstreak-card {
    background: var(--dash-bg);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1.1rem;
    transition: background .2s;
}
.fstreak-card:hover { background: var(--dash-card); }

.fstreak-number {
    font-size: 2.4rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1;
}
.fstreak-sub { font-size: 0.65rem; color: rgba(255,255,255,0.35); margin-top: 4px; }

/* ── Year Grid ──────────────────────────── */
.year-grid-table {
    background: var(--dash-bg);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.year-grid-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.year-grid-row:last-child { border-bottom: none; }
.year-grid-label {
    width: 80px; flex-shrink: 0;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: rgba(255,255,255,0.6);
}
.year-grid-blocks { display: flex; gap: 4px; flex: 1; }
.year-block {
    flex: 1; height: 28px; border-radius: 5px;
    transition: opacity .2s;
    cursor: default;
    position: relative;
}
.year-block:hover { opacity: 0.85; }
.year-block-label {
    position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
    font-size: 0.5rem; font-weight: 700; color: rgba(255,255,255,0.25);
    white-space: nowrap;
}
.yb-good      { background: var(--c-good);      box-shadow: 0 0 5px rgba(16,185,129,0.4); }
.yb-growing   { background: var(--c-growing);   box-shadow: 0 0 5px rgba(6,182,212,0.4); }
.yb-attention { background: var(--c-attention); box-shadow: 0 0 5px rgba(245,158,11,0.4); }
.yb-problem   { background: var(--c-problem);   box-shadow: 0 0 5px rgba(244,63,94,0.4); }
.yb-nodata    { background: rgba(255,255,255,0.08); }
.yb-future    { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.yb-current   { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 1px; }

.year-grid-note {
    width: 120px; flex-shrink: 0; text-align: right;
    font-size: 0.65rem; color: rgba(255,255,255,0.3);
}

/* ── Scorecard table cell badges ────────── */
.cell-badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 6px;
    font-size: 0.78rem; font-weight: 700;
}
.cell-good      { background: rgba(16,185,129,0.15); color: var(--c-good); }
.cell-growing   { background: rgba(6,182,212,0.15);  color: var(--c-growing); }
.cell-attention { background: rgba(245,158,11,0.15); color: var(--c-attention); }
.cell-problem   { background: rgba(244,63,94,0.15);  color: var(--c-problem); }
.cell-none      { color: rgba(255,255,255,0.2); }

/* ── Insight cards ──────────────────────── */
.insight-card {
    background: var(--dash-bg);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1rem;
    display: flex; gap: 12px; align-items: flex-start;
    border-left: 3px solid transparent;
    margin-bottom: 0.75rem;
}
.insight-good      { border-left-color: var(--c-good); }
.insight-growing   { border-left-color: var(--c-growing); }
.insight-attention { border-left-color: var(--c-attention); }
.insight-problem   { border-left-color: var(--c-problem); }
.insight-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.9rem;
}
.insight-icon-good      { background: rgba(16,185,129,0.12); color: var(--c-good); }
.insight-icon-growing   { background: rgba(6,182,212,0.12);  color: var(--c-growing); }
.insight-icon-attention { background: rgba(245,158,11,0.12); color: var(--c-attention); }
.insight-icon-problem   { background: rgba(244,63,94,0.12);  color: var(--c-problem); }
.insight-title { font-size: 0.82rem; font-weight: 800; color: #e2e8f0; margin-bottom: 2px; }
.insight-body  { font-size: 0.76rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ── Workout cards ──────────────────────── */
.workout-card {
    background: var(--dash-bg);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden; display: flex;
    transition: border-color .2s, transform .18s, box-shadow .18s;
}
.workout-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.workout-accent { width: 4px; flex-shrink: 0; }
.wa-good      { background: var(--c-good);      box-shadow: 0 0 12px rgba(16,185,129,0.5); }
.wa-growing   { background: var(--c-growing);   box-shadow: 0 0 12px rgba(6,182,212,0.5); }
.wa-attention { background: var(--c-attention); }

/* ── Section title (fusion style) ──────── */
.fsection-title {
    font-size: 0.7rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 8px;
}
.fsection-title i { opacity: 0.5; }

/* ── Legend bar ─────────────────────────── */
.color-legend {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; margin-bottom: 1.5rem;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
}
.legend-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; margin-right: 5px;
}

/* ── Responsive Fusion ──────────────────── */
@media (max-width: 768px) {
    .ring-card { padding: 1rem 0.75rem; }
    .fstreak-number { font-size: 1.8rem; }
    .year-grid-label { width: 55px; font-size: 0.65rem; }
    .year-grid-note { display: none; }
    .year-block { height: 22px; }
}

/* ── Biomarker Cards (Laag 2: HRV/Rusthartslag/VO2max) ─────── */
.bio-card {
    background: var(--dash-bg);
    border: 1.5px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    transition: border-color .2s, transform .18s, box-shadow .18s;
}
.bio-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.bio-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.bio-value {
    font-size: 2.2rem; font-weight: 900; letter-spacing: -.03em; line-height: 1;
}
.bio-unit {
    font-size: .75rem; font-weight: 600; margin-left: 3px;
    opacity: .7; vertical-align: middle;
}
