/* Bug #213 — [x-cloak] scope: only hide elements that Alpine has NOT yet
   initialized. If Alpine never initializes (init failure), elements remain
   visible rather than being permanently hidden. The :not([data-cloak-fallback])
   guard lets page code mark an element as "safe to stay hidden" even without
   Alpine, preventing accidental permanent-hide during Alpine init failures. */
/* Bug #254 — Fix B: pointer-events:none failsafe. Even if display:none fails
   (specificity clash, CDN latency window), cloaked elements must NEVER capture
   clicks/touches. Prevents the "grey overlay blocks entire page" blocker on
   first-load after laptop login when Alpine CDN hasn't loaded yet. */
[x-cloak]:not([data-cloak-fallback]) { display: none !important; pointer-events: none !important; }

:root {
  --navy:    #1B3A6B;
  --navy-lt: #2A5298;
  --orange:  #E8612A;
  --orange-lt:#F4875A;
  --bg:      #F4F6FA;
  --white:   #FFFFFF;
  --text:    #1A1A2E;
  --muted:   #6B7280;
  --border:  #DDE1EA;
  --select:  #16A34A;
  --doubt:   #D97706;
  --no:      #DC2626;
  --watch:   #7C3AED;
  --select-bg: #DCFCE7;
  --doubt-bg:  #FEF3C7;
  --no-bg:     #FEE2E2;
  --watch-bg:  #EDE9FE;
  /* BACKLOG #124 — semantic banner/row-tint vars (consolideert inline-styles van templates) */
  --blue-bg-light:   #cfe2ff;             /* info-banner achtergrond */
  --blue-bg-pale:    #f0f6ff;             /* subtle info tint */
  --green-bg-light:  #d4edda;             /* success-banner achtergrond */
  --green-bg-pale:   #f3f9f5;             /* subtle success row-tint */
  --red-bg-light:    #f8d7da;             /* error-banner achtergrond */
  --red-bg-pale:     #fff5f5;             /* subtle error/danger row-tint */
  --yellow-bg-light: #fff3cd;             /* warning-banner achtergrond */
  --yellow-bg-pale:  #fffaec;             /* subtle warning tint */
  /* Zone-tints (matrix-cells) — alias op canonical vars */
  --zone-select:     var(--green-bg-light);
  --zone-doubt:      var(--yellow-bg-light);
  --zone-no:         var(--red-bg-light);
  /* Decision-status alias */
  --status-twijfel:   var(--yellow-bg-light);
  --status-selecteer: var(--green-bg-light);
  --status-niet:      var(--red-bg-light);
  --radius:  8px;
  --shadow:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: 220px;
  background: var(--navy);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 20;
}

.sidebar-logo {
  padding: 20px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo h1 { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--orange-lt); }
.sidebar-logo p  { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

.sidebar-user {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-user .logout-link {
  color: rgba(255,255,255,.4);
  text-decoration: none;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 3px;
}
.sidebar-user .logout-link:hover { color: #fff; border-color: rgba(255,255,255,.5); }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  transition: background .15s, color .15s;
  border-radius: 0;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-nav .nav-section {
  padding: 16px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
}

/* Epic-24 mockup sidebar — 3-zones */
.sidebar-zone { border-top: 1px solid rgba(255,255,255,.08); padding: 6px 0; }
.sidebar-zone:first-child { border-top: none; }
.sidebar-zone .sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.sidebar-zone .sidebar-link:hover,
.sidebar-zone .sidebar-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-zone-toggle {
  width: 100%; text-align: left; background: none; border: none;
  color: #fff; padding: 8px 16px; cursor: pointer; font-size: 13px;
  font-weight: 600; opacity: 0.7;
}
.sidebar-zone-toggle:hover { opacity: 1; background: rgba(255,255,255,.08); }
.sidebar-zone-toggle-row {
  display: flex; align-items: center;
}
.sidebar-zone-label {
  flex: 1; color: #fff; text-decoration: none; font-size: 13px;
  font-weight: 600; opacity: 0.7; padding: 8px 0 8px 16px;
}
.sidebar-zone-label:hover { opacity: 1; }
.sidebar-zone-arrow {
  background: none; border: none; color: #fff; opacity: 0.7;
  padding: 8px 16px; cursor: pointer; font-size: 10px;
}
.sidebar-zone-arrow:hover { opacity: 1; background: rgba(255,255,255,.08); }
.sidebar-zone-toggle-row:hover .sidebar-zone-label,
.sidebar-zone-toggle-row:hover .sidebar-zone-arrow { opacity: 1; }
.sidebar-section-label {
  padding: 6px 16px 2px; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,.45); margin-top: 4px;
}
.sidebar-link.ext { opacity: 0.8; font-size: 12px; }

/* Phase-aware Zone 3 blocks */
.sidebar-phase-block { border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-phase-block:first-child { border-top: none; }
.sidebar-phase-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; color: rgba(255,255,255,.6);
  padding: 8px 16px; cursor: pointer; font-size: 12px; font-weight: 600;
  text-align: left; letter-spacing: 0.03em;
  transition: color .15s, background .15s;
}
.sidebar-phase-toggle:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-phase-toggle.phase-active { color: #fff; }
.sidebar-phase-links { display: flex; flex-direction: column; padding-bottom: 4px; }

/* Tijdvak-header in Zone 3 */
.sidebar-tijdvak-header { padding: 8px 16px 4px; }
.sidebar-tijdvak-title { font-size: 13px; font-weight: 700; color: #fff; }
.sidebar-ronde-meta { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* Tijdvak-switcher pills */
.sidebar-switcher { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 16px 8px; }
.sidebar-switcher-item {
  font-size: 11px; padding: 3px 9px; border-radius: 10px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.65);
  text-decoration: none; transition: background .15s, color .15s;
}
.sidebar-switcher-item:hover { background: rgba(255,255,255,.2); color: #fff; }
.sidebar-switcher-item.active { background: rgba(255,255,255,.22); color: #fff; font-weight: 600; }

/* Fase-indicator: verticale stappen */
.sidebar-fase-indicator {
  padding: 8px 16px; border-top: 1px solid rgba(255,255,255,.06);
}
.fase-step {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; font-size: 11px; color: rgba(255,255,255,.35);
  transition: color .15s;
}
.fase-step-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.2);
  transition: background .15s, box-shadow .15s;
}
.fase-step.fase-step-active { color: rgba(255,255,255,.95); font-weight: 600; }
.fase-step.fase-step-active .fase-step-dot {
  background: #4caf8f;
  box-shadow: 0 0 7px rgba(76,175,143,.65);
}

/* Fase-wissel admin knoppen */
.sidebar-fase-wissel { padding: 4px 16px 8px; border-top: 1px solid rgba(255,255,255,.06); }
.fase-wissel-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.fase-wissel-btn {
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.fase-wissel-btn:hover { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.25); }
.fase-wissel-btn.fase-wissel-btn-active {
  background: rgba(76,175,143,.25); border-color: rgba(76,175,143,.5); color: #fff;
}

/* ── Uniforme page-header (Epic 24) ───────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.page-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-header .actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }

/* Fase-badge */
.fase-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.fase-badge.fase-prep       { background: #e8edf5; color: #4a5568; }
.fase-badge.fase-checkin    { background: #dbeafe; color: #1d4ed8; }
.fase-badge.fase-scoring    { background: #fef3c7; color: #92400e; }
.fase-badge.fase-evaluating { background: #d1fae5; color: #065f46; }
.fase-badge.fase-finalized  { background: #ede9fe; color: #4c1d95; }

/* Responsive */
@media (max-width: 767px) {
  .page-header h1 { font-size: 18px; }
  .breadcrumb { display: none; }
  .fase-badge { font-size: 10px; padding: 2px 8px; }
}

.main { margin-left: 220px; flex: 1; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 17px; font-weight: 700; }
.topbar .actions { display: flex; gap: 8px; }

.content { padding: 24px; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.card-header h3 { font-size: 14px; font-weight: 700; }
.card-body { padding: 18px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn:hover { opacity: .85; }
.btn-primary   { background: var(--navy);    color: #fff; }
.btn-orange    { background: var(--orange);  color: #fff; }
.btn-secondary { background: var(--border);  color: var(--text); }
.btn-danger    { background: #FEE2E2;        color: var(--no); }
.btn-sm        { padding: 8px 12px; min-height: 36px; font-size: 13px; }

/* BACKLOG #120 — touch-target voor tablet/touchscreen ≥44px */
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
}
.btn-success   { background: var(--select-bg); color: var(--select); }
.btn-doubt     { background: var(--doubt-bg);  color: var(--doubt); }
.btn-watchlist { background: var(--watch-bg);  color: var(--watch); }

/* BACKLOG #93 — terug-knop op detail-pagina's */
.back-button { margin-right: 8px; }
.topbar .back-button { font-size: 12px; padding: 4px 10px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy-lt);
  box-shadow: 0 0 0 3px rgba(42,82,152,.1);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F9FAFB; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-select { background: var(--select-bg); color: var(--select); }
.badge-doubt  { background: var(--doubt-bg);  color: var(--doubt); }
.badge-no     { background: var(--no-bg);     color: var(--no); }
.badge-watch  { background: var(--watch-bg);  color: var(--watch); }
.badge-muted  { background: var(--bg);        color: var(--muted); }
.badge-navy   { background: var(--navy);      color: #fff; }
.badge-warn   { background: var(--doubt-bg);  color: var(--doubt); }
.badge-mixed  { background: #7c3aed18; color: #7c3aed; border: 1px solid #7c3aed40; border-radius: 4px; padding: 2px 8px; font-size: .75rem; font-weight: 600; }

/* ── Stats grid ────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.1; margin-top: 4px; }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; }
.alert-success { background: var(--select-bg); color: var(--select); border: 1px solid #86EFAC; }
.alert-warning { background: var(--doubt-bg);  color: var(--doubt);  border: 1px solid #FCD34D; }
.alert-error   { background: var(--no-bg);     color: var(--no);     border: 1px solid #FCA5A5; }
.alert-info    { background: #EFF6FF;           color: #1D4ED8;       border: 1px solid #93C5FD; }

/* ── Score inputs ────────────────────────────────────────────────────────── */
.score-btn-group { display: flex; gap: 4px; }
.score-btn {
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  transition: all .1s;
  display: flex; align-items: center; justify-content: center;
}
.score-btn:hover  { border-color: var(--navy-lt); background: #EFF6FF; }
.score-btn.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.score-btn[data-val="1"].active { background: #DC2626; border-color: #DC2626; }
.score-btn[data-val="2"].active { background: #D97706; border-color: #D97706; }
.score-btn[data-val="3"].active { background: #16A34A; border-color: #16A34A; }

/* ── Matrix ────────────────────────────────────────────────────────────── */
.matrix-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr;
  grid-template-rows: 40px 1fr 1fr 1fr;
  gap: 4px;
  max-width: 900px;
}
.matrix-axis-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.matrix-cell {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 100px;
}
.matrix-cell.zone-select { background: #F0FDF4; border-color: #86EFAC; }
.matrix-cell.zone-doubt  { background: #FFFBEB; border-color: #FCD34D; }
.matrix-cell.zone-no     { background: #FFF1F2; border-color: #FCA5A5; }

.player-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin: 2px;
  border: 1px solid transparent;
  transition: all .1s;
}
.player-chip:hover { transform: scale(1.05); }
.player-chip.chip-select { background: var(--select-bg); color: var(--select); border-color: #86EFAC; }
.player-chip.chip-doubt  { background: var(--doubt-bg);  color: var(--doubt);  border-color: #FCD34D; }
.player-chip.chip-no     { background: var(--no-bg);     color: var(--no);     border-color: #FCA5A5; }
/* Bolt #172-followup: blauw voor watchlist (PlayerJourney.status='watchlist').
   Betekenis: niet door, maar uitgenodigd voor extra trainingsdag. */
.player-chip.chip-watch  { background: #DBEAFE;          color: #1E40AF;       border-color: #93C5FD; }
.player-chip.chip-none   { background: var(--bg);        color: var(--muted);  border-color: var(--border); }

/* ── Modal overlay ────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }

/* Mobile menu (Sprint 10 V2) */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 22px;
  padding: 6px 10px;
  cursor: pointer;
  margin-right: 8px;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 49;
  /* Bug #213 — even if display:none fails (e.g. specificity clash), backdrop
     must never block clicks/interactions when not open. */
  pointer-events: none;
}
.mobile-topbar {
  display: none;
  background: var(--navy);
  color: #fff;
  align-items: center;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}
@media (max-width: 767px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .mobile-topbar { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh; height: 100dvh;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; pointer-events: auto; }
  .main { margin-left: 0 !important; }
  .content { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 8px; }
}

/* ── Print ────────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .scorecard-page { page-break-after: always; }
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-sm    { font-size: 12px; }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.font-bold  { font-weight: 700; }
.w-full     { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Epic-24 mockup sidebar — breadcrumb + tree styles ─────────────────── */
.sidebar-breadcrumb {
  padding: .5rem .75rem;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .5rem;
}
.sidebar-bc-link { color: rgba(255,255,255,.85); text-decoration: none; }
.sidebar-bc-link:hover { color: #fff; text-decoration: underline; }
.sidebar-bc-sep { color: rgba(255,255,255,.4); }
.sidebar-bc-current { color: #fff; font-weight: 600; }
.sidebar-tree-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(255,255,255,.4);
  padding: .4rem .75rem .2rem;
}
.sidebar-tree-item {
  display: flex;
  align-items: center;
  padding: .25rem .75rem;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  text-decoration: none;
  gap: .4rem;
}
.sidebar-tree-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar-tree-item.indent-1 { padding-left: 1.25rem; }
.sidebar-tree-item.indent-2 { padding-left: 2rem; }
.sidebar-tree-item.active { color: #fff; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   TalentLoop brand overrides — Fase 2
   Sidebar, font en interactive states gemigreerd naar --tl-* tokens.
   Bestaande layout-structuur en klassen ongewijzigd.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Token bridge — veilige aliassen (minimale visuele impact) ── */
:root {
  --bg:    var(--tl-bg);         /* #F4F6FA → #F8FAFC */
  --border:var(--tl-border);     /* #DDE1EA → #E2E8F0 */
  --text:  var(--tl-text-body);  /* #1A1A2E → #1E293B */
  --muted: var(--tl-text-muted); /* #6B7280 → #64748B */
}

/* ── Body font → Inter ── */
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── Sidebar → TalentLoop deep navy + groene border ── */
.sidebar {
  background: var(--tl-sidebar-bg);
  border-right: 1px solid rgba(34,197,94,0.18);
}

/* ── Sidebar logo — geen oranje ── */
.sidebar-logo { border-bottom-color: rgba(255,255,255,0.08); }

/* ── Sidebar links: hover en active → groen accent ── */
.sidebar-zone .sidebar-link { color: var(--tl-sidebar-link); }
.sidebar-zone .sidebar-link:hover { background: var(--tl-sidebar-link-hover-bg); color: var(--tl-sidebar-link-hover); }
.sidebar-zone .sidebar-link.active {
  background: var(--tl-sidebar-link-active-bg);
  color: var(--tl-sidebar-link-active);
  border-left: 2px solid var(--tl-sidebar-link-active-border);
  padding-left: 14px;
}
.sidebar-nav a { color: var(--tl-sidebar-link); }
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--tl-sidebar-link-hover-bg);
  color: var(--tl-sidebar-link-hover);
}
.sidebar-nav a.active {
  background: var(--tl-sidebar-link-active-bg);
  border-left: 2px solid var(--tl-sidebar-link-active-border);
}
.sidebar-zone-toggle:hover, .sidebar-zone-arrow:hover { background: var(--tl-sidebar-link-hover-bg); }

/* ── Phase toggle active → groen ── */
.sidebar-phase-toggle { color: var(--tl-sidebar-text-muted); }
.sidebar-phase-toggle:hover { color: var(--tl-sidebar-link-hover); background: var(--tl-sidebar-link-hover-bg); }
.sidebar-phase-toggle.phase-active { color: var(--tl-green); }

/* ── Fase-stap indicator → TalentLoop groen ── */
.fase-step.fase-step-active .fase-step-dot {
  background: var(--tl-green);
  box-shadow: 0 0 7px rgba(34,197,94,0.55);
}

/* ── Fase-wissel actief → TalentLoop groen ── */
.fase-wissel-btn.fase-wissel-btn-active {
  background: rgba(34,197,94,0.20);
  border-color: rgba(34,197,94,0.45);
  color: #fff;
}

/* ── Breadcrumb hover → TalentLoop groen ── */
.breadcrumb a:hover { color: var(--tl-green); text-decoration: none; }

/* ── Topbar border → tl-border ── */
.topbar { border-bottom-color: var(--tl-border); }

/* ── Knoppen → TalentLoop groen (oranje vervalt) ── */
.btn-primary {
  background: var(--tl-primary, #16A34A);
  color: #fff;
}
.btn-primary:hover { background: var(--tl-primary-hover, #15803D); opacity: 1; }
.btn-orange { background: var(--tl-primary, #16A34A); color: #fff; }
.btn-orange:hover { background: var(--tl-primary-hover, #15803D); opacity: 1; }

/* ── Auto-save field-status (BACKLOG #126 — measurements/entry.html) ───── */
.field-cell { display: inline-flex; align-items: center; gap: 6px; }
.field-save-status {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; min-width: 16px;
}
.field-save-status.field-saving { color: var(--muted); animation: field-pulse 1s ease-in-out infinite; }
.field-save-status.field-saved  { color: #2c8a4d; transition: opacity .4s ease; }
.field-save-status.field-error  { color: #c0392b; }
@keyframes field-pulse {
  0%, 100% { opacity: .4; }
  50%      { opacity: 1;  }
}
