/* hic.care — athlete data console. Warm crème thema, navy accent, lime highlights.
   Nagebouwd op de voorbeeld-dashboards in /images-example-dashboards. */
:root {
  color-scheme: light;
  --bg: #f6eedc;
  --card: #fdfaf3;
  --tile: #f7efdd;
  --tile-border: #ece2c8;
  --line: rgba(92, 76, 40, .10);
  --line-soft: rgba(92, 76, 40, .07);
  --ink: #161c2d;
  --ink-2: #3d4150;
  --muted: #8b877a;
  --muted-2: #a29d8e;
  --navy: #2f3d9c;
  --navy-deep: #1e2a6e;
  --navy-soft: #e4e8f5;
  --mist: #c6cfdf;
  --lime: #d8ee5c;
  --lime-dot: #c8e33f;
  --amber-bg: #f5e3b2;
  --amber-ink: #936812;
  --dark: #141a2c;
  --radius: 16px;
  --topbar: 60px;
  --shadow: 0 1px 2px rgba(80, 60, 20, .04), 0 4px 14px rgba(80, 60, 20, .035);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
code { background: var(--tile); border: 1px solid var(--tile-border); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right !important; }
.center { text-align: center !important; }

.eyebrow {
  font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 22px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark { width: 31px; height: 31px; flex: none; }
.logo-mark circle { stroke: var(--navy-deep); stroke-width: 1.6; }
.logo-mark path { stroke: var(--navy); stroke-width: 1.9; }
.logo-name { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.15; }
.logo-name b { color: var(--navy); font-weight: 700; }
.logo-sub { display: block; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.mainnav { display: flex; gap: 6px; height: 100%; }
.mainnav a {
  display: flex; align-items: center; padding: 0 15px; height: 100%; position: relative;
  font-size: 12.5px; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; color: #7d7a6e;
}
.mainnav a:hover { color: var(--ink); }
.mainnav a.active { color: var(--ink); }
.mainnav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--navy); border-radius: 2px; }

.topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.live {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line-soft); font-size: 11px; letter-spacing: .16em; color: var(--muted);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-dot); box-shadow: 0 0 0 3px rgba(200, 227, 63, .25); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.userpill {
  display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 4px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line-soft); font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.avatar-lime {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(60, 45, 10, .14);
}
.usermenu-pop a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.usermenu-pop a span { color: var(--muted); font-size: 12px; }
.usermenu-pop a:hover { background: var(--tile); }
.usermenu-pop a.current { background: var(--navy-soft); }
.um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; display: flex; flex-direction: column; }
.um-head span { font-size: 12px; color: var(--muted); }
.um-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; border-top: 1px solid var(--line-soft); margin-top: 4px; }
.um-logout { border-top: 1px solid var(--line-soft); margin-top: 4px; color: var(--muted); }

/* ── Layout & roster ────────────────────────────────── */
.layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.roster {
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
  border-right: 1px solid var(--line); padding: 26px 0 24px;
}
.roster > .eyebrow, .roster-title, .roster .search { margin-left: 17px; margin-right: 17px; }
.roster-title { font-size: 15.5px; font-weight: 600; margin-top: 5px; letter-spacing: -.005em; }
.search {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; margin-top: 16px; margin-bottom: 14px;
  background: #fffcf5; border: 1px solid var(--tile-border); border-radius: 8px; color: var(--muted);
}
.search svg { width: 15px; height: 15px; flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; width: 100%; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--navy); }
.search.wide { width: 270px; margin: 0; }

.roster-list { list-style: none; margin: 0; padding: 0; }
.roster-item {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 13px 17px 13px 30px; border-left: 2px solid transparent;
}
.roster-item::before { content: ""; position: absolute; left: 16px; top: 21px; width: 5px; height: 5px; border-radius: 50%; background: var(--mist); }
.roster-item:hover { background: rgba(253, 250, 243, .55); }
.roster-item.selected { background: var(--card); border-left-color: var(--navy); }
.roster-item.selected::before { background: var(--navy); }
.roster-item.selected::after { content: ""; position: absolute; right: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--lime-dot); }
.ri-main { display: flex; flex-direction: column; min-width: 0; }
.ri-name { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.ri-code { font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-top: 3px; }
.ri-meta { font-size: 11px; color: var(--muted); text-align: right; line-height: 1.55; white-space: nowrap; }

.devices { border-top: 1px solid var(--line); margin-top: 14px; padding: 20px 17px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px;
  background: #fffcf5; border: 1px solid var(--line-soft); font-size: 11.5px; color: var(--ink-2);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime-dot); }

.main { padding: 26px 32px 60px; min-width: 0; }

/* ── Cards & common ─────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 22px; margin-bottom: 18px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.card-head.tight { align-items: center; margin-bottom: 16px; }
.card-title { font-size: 18.5px; font-weight: 600; letter-spacing: -.01em; margin-top: 6px; }
.card-eyebrow { margin-bottom: 16px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 12px 0 30px; }
.page-intro { max-width: 540px; }
.page-title { font-size: 38px; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; margin: 14px 0 16px; }
.page-desc { font-size: 14.5px; color: #6c695d; line-height: 1.6; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  min-width: 118px; padding: 13px 14px 12px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
}
.stat .eyebrow { font-size: 9.5px; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 3px 0 1px; line-height: 1.15; }
.stat-value.text { font-size: 16px; padding: 5px 0 2px; white-space: nowrap; }
.stat-sub { font-size: 11px; color: var(--muted); }
.stat.lime { background: var(--lime); border-color: transparent; }
.stat.lime .eyebrow, .stat.lime .stat-sub { color: #4f5a1d; }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: #f3ead4; border: 1px solid var(--tile-border); border-radius: 9px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 6px; font-size: 13.5px; color: #6f6b5e; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fffdf8; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(80, 60, 20, .1); }

.btn-dark {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 10px 17px; border-radius: 7px; background: var(--dark); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
}
.btn-dark svg { width: 14px; height: 14px; stroke-width: 2.4; }
.btn-dark:hover { background: #26304a; }
.btn-dark.full { width: 100%; justify-content: center; padding: 12px; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--navy); font-size: 12.5px; }
.link-btn:hover { text-decoration: underline; }

.delta {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 4px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.delta svg { width: 14px; height: 14px; stroke-width: 2.2; }
.delta.up { background: var(--lime); color: var(--ink); }
.delta.down { background: #efe8d8; color: var(--ink-2); }

/* ── Dossier ────────────────────────────────────────── */
.dossier { border-left: 3px solid var(--navy); padding: 28px 30px 22px; }
.dossier-top { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto; gap: 24px 22px; align-items: start; }
.dossier-avatar {
  width: 54px; height: 54px; border-radius: 12px; background: var(--tile); border: 1px solid var(--tile-border);
  display: grid; place-items: center; font-size: 17px; font-weight: 600; color: var(--ink);
}
.dossier-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code-chip {
  display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--tile); border: 1px solid var(--tile-border);
  font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--ink);
}
.state-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 5px; font-size: 12.5px; font-weight: 500; }
.state-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-blue { background: var(--navy-soft); color: var(--navy); }
.tone-amber { background: var(--amber-bg); color: var(--amber-ink); }
.dossier-name { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-top: 8px; }
.dossier-sport { font-size: 13px; color: #6c695d; margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(150px, auto)); gap: 18px 44px; margin: 0; padding-top: 2px; }
.facts dt { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 500; }
.facts dd.sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.next-appt { width: 270px; padding: 15px 18px; border-radius: 10px; background: var(--tile); border: 1px solid var(--tile-border); }
.na-title { font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.na-sub { font-size: 12.5px; color: #6c695d; margin-top: 4px; }
.dossier-medical { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; font-size: 13.5px; color: var(--ink-2); }
.locked-text { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.locked-text svg { width: 14px; height: 14px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { margin: 0; padding: 20px 18px 16px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; }
.swatch { width: 26px; height: 4px; border-radius: 2px; }
.swatch-navy { background: var(--navy); }
.swatch-mist { background: var(--mist); }
.swatch-ink { background: var(--ink); }
.swatch-lime { background: var(--lime); }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 12px; line-height: 1.1; }
.kpi-value small { font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; min-height: 22px; font-size: 11.5px; }

.legend-peak { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.legend-peak i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-dot); }
.spark-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.spark { position: relative; padding: 15px 14px 12px; border-radius: 12px; background: var(--tile); border: 1px solid var(--tile-border); }
.spark-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.spark-value { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-top: 3px; }
.spark-value small { font-size: 11px; font-weight: 400; color: var(--muted); }
.spark-plot { position: relative; height: 76px; margin-top: 12px; }
.spark-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark-svg polyline { fill: none; stroke: var(--navy); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-dots { position: absolute; inset: 0; pointer-events: none; }
.spark-hit { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: auto; cursor: default; }
.spark-hit::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--navy); opacity: 0; transition: opacity .12s; }
.spark-hit.peak::after { background: var(--lime-dot); opacity: 1; inset: 6px; box-shadow: 0 0 0 2px var(--tile); }
.spark-hit:hover::after { opacity: 1; }
.spark-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; padding: 6px 9px; border-radius: 6px;
  background: var(--dark); color: #fff; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px));
}

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 76px 44px minmax(0, 1fr) 30px; align-items: start; }
.tl-date { text-align: right; padding-top: 2px; }
.tl-date strong { display: block; font-size: 14px; font-weight: 600; }
.tl-date span { display: block; font-size: 12px; color: var(--muted); }
.tl-rail { position: relative; align-self: stretch; }
.tl-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; margin-left: -.75px; background: #e6dcc4; }
.tl-item:first-child .tl-rail::before { top: 12px; }
.tl-item:last-child .tl-rail::before { bottom: auto; height: 12px; }
.tl-dot { position: absolute; left: 50%; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #c9d6ea; box-shadow: 0 0 0 3px var(--card), inset 0 0 0 3px #e7edf6; }
.tl-dot.first { background: var(--navy); box-shadow: 0 0 0 3px var(--card), 0 0 0 4.5px #d3daf0; }
.tl-dot.event { background: #e8dfc9; box-shadow: 0 0 0 3px var(--card), inset 0 0 0 3px #f3ecdb; }
.tl-body { padding: 0 0 30px 6px; min-width: 0; }
.tl-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-chip {
  display: inline-block; padding: 2px 8px; border-radius: 4px; background: #f3ead3; border: 1px solid var(--tile-border);
  font-size: 11px; letter-spacing: .16em; color: #6f6b5e;
}
.cat-chip.event { background: transparent; border-style: dashed; }
.tl-device { font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.tl-note { font-size: 11px; letter-spacing: .16em; color: var(--navy); text-transform: uppercase; }
.tl-title { font-size: 16px; font-weight: 500; margin-top: 6px; }
.tl-values { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-top: 8px; font-size: 13px; color: #6c695d; }
.tl-values b { color: var(--ink); font-weight: 600; }
.tl-values small { font-size: 11.5px; color: var(--muted); }
.tl-detail { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--tile); border: 1px solid var(--tile-border); }
.tl-detail p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.tl-chevron { border: 0; background: none; padding: 4px; margin-top: 4px; color: var(--muted-2); cursor: pointer; border-radius: 6px; }
.tl-chevron svg { width: 16px; height: 16px; display: block; transition: transform .15s; }
.tl-chevron:disabled { cursor: default; opacity: .7; }
.tl-chevron:not(:disabled):hover { background: var(--tile); color: var(--ink); }
.tl-item.open .tl-chevron svg { transform: rotate(90deg); }

/* ── Testen ─────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 6px 8px 0; }
.toolbar-spacer { flex: 1; }
.select { position: relative; display: inline-flex; }
.select select {
  appearance: none; height: 38px; padding: 0 36px 0 14px; border-radius: 8px; border: 1px solid var(--tile-border);
  background: #fffcf5; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.select svg { position: absolute; right: 11px; top: 11px; width: 16px; height: 16px; color: var(--ink-2); pointer-events: none; }
.table-wrap { overflow-x: auto; }
.log { width: 100%; border-collapse: collapse; }
.log th {
  text-align: left; padding: 10px 8px 12px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.log td { padding: 13px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.log tbody tr:last-child td { border-bottom: 0; }
#testRows tr { cursor: pointer; }
#testRows tr:hover td { background: rgba(247, 239, 221, .6); }
.who { display: flex; align-items: center; gap: 12px; }
.avatar-round {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #f3ead3; border: 1px solid var(--tile-border); font-size: 10.5px; font-weight: 600;
}
.who-name { display: block; font-weight: 500; white-space: nowrap; }
.who-sub { display: block; font-size: 12px; color: var(--muted); }
.test-cell { display: flex; gap: 10px; align-items: flex-start; }
.test-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--navy); }
.test-dot.cat-compositie, .test-dot.cat-zweet { background: var(--ink); }
.test-dot.cat-herstel { background: var(--muted); }
.test-title { display: block; font-weight: 500; }
.test-cat { display: block; font-size: 11px; letter-spacing: .18em; color: var(--muted); margin-top: 2px; }
.kv-vals { display: flex; flex-wrap: wrap; gap: 2px 18px; color: #6c695d; }
.kv-vals.stack { flex-direction: column; }
.kv-vals b { color: var(--ink); font-weight: 600; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.annotated { background: var(--lime); color: var(--ink); }
.status-pill.validated { background: #f1eadb; color: #4d4c45; }
.status-pill.validated i { background: var(--muted-2); }
.empty-row { padding: 28px 8px; text-align: center; color: var(--muted); }

/* ── Rapporten ──────────────────────────────────────── */
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.template {
  display: flex; gap: 16px; padding: 20px 20px 18px; border-radius: 12px; background: var(--tile); border: 1px solid var(--tile-border);
  transition: background .15s, border-color .15s;
}
.template:hover, .template.active { background: #fffdf8; border-color: #cfd6ea; }
.icon-box {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 9px;
  background: #fffdf8; border: 1px solid var(--tile-border); color: var(--navy);
}
.ticon { width: 22px; height: 22px; stroke: none; }
.template h3 { font-size: 16px; font-weight: 600; margin-top: 2px; }
.template p { font-size: 13px; color: #6c695d; margin-top: 6px; line-height: 1.5; }
.template-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.used { padding: 2px 8px; border: 1px solid var(--tile-border); border-radius: 4px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #6f6b5e; }
.clear-filter { border: 0; background: var(--navy-soft); color: var(--navy); font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 5px; margin-left: 8px; cursor: pointer; vertical-align: middle; }

.report-list { list-style: none; margin: 0 -6px; padding: 0; }
.report {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto 118px; gap: 20px; align-items: center;
  padding: 16px 12px; border-bottom: 1px solid var(--line); border-radius: 4px;
}
.report-list li:last-child .report { border-bottom: 0; }
.report:hover { background: #f7f2e6; }
.report .icon-box { width: 48px; height: 48px; background: var(--tile); }
.report-main { display: flex; flex-direction: column; min-width: 0; }
.report-tags { display: flex; gap: 20px; }
.report-code { font-size: 11.5px; letter-spacing: .22em; color: var(--muted); }
.report-type { font-size: 11.5px; letter-spacing: .16em; color: var(--navy); font-weight: 600; }
.report-name { font-size: 17px; font-weight: 600; margin-top: 4px; }
.report-meta { font-size: 13px; color: #6c695d; margin-top: 3px; }
.report-date { text-align: right; }
.report-date strong { display: block; font-size: 14.5px; font-weight: 600; }
.report-date span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.final-pill { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--navy-soft); color: var(--navy); font-size: 12.5px; font-weight: 600; }
.final-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Coaching ───────────────────────────────────────── */
.coach-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.coach-grid .card { margin: 0; }
.week-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; }
.week-head:first-of-type { margin-top: 6px; }
.week-count { font-size: 12px; color: var(--muted); }
.planned { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.plan-row {
  display: grid; grid-template-columns: 150px 42px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 18px; border-radius: 10px; background: var(--tile); border: 1px solid var(--tile-border);
}
.plan-row:hover { border-color: #cfd6ea; background: #fbf5e8; }
.plan-date { display: flex; flex-direction: column; }
.plan-date strong { font-size: 16px; font-weight: 600; margin-top: 2px; }
.avatar-square {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #fffdf8;
  border: 1px solid var(--tile-border); font-size: 12px; font-weight: 600;
}
.plan-main { display: flex; flex-direction: column; min-width: 0; }
.plan-title { font-size: 15px; font-weight: 500; }
.plan-sub { font-size: 12.5px; color: #6c695d; margin-top: 2px; }
.plan-min { font-size: 13px; color: var(--muted); white-space: nowrap; }
.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.attn {
  display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px; border-radius: 12px;
  background: var(--tile); border: 1px solid var(--tile-border); box-shadow: 0 1px 2px rgba(80, 60, 20, .04);
}
.attn:hover { border-color: #cfd6ea; }
.attn-chip { padding: 3px 10px; border-radius: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; }
.attn-chip.aandacht { background: var(--amber-bg); color: var(--amber-ink); }
.attn-chip.op-koers { background: var(--navy-soft); color: var(--navy); }
.attn-name { font-size: 16px; font-weight: 600; margin-top: 12px; }
.attn-sport { font-size: 13px; color: #6c695d; margin-top: 2px; }
.attn-text { font-size: 14px; color: var(--ink); margin: 12px 0 10px; line-height: 1.5; }

/* ── Beheer ─────────────────────────────────────────── */
.src-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.src-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.src-pill.st-live { background: var(--lime); color: var(--ink); }
.src-pill.st-manual { background: var(--navy-soft); color: var(--navy); }
.src-pill.st-pending { background: var(--amber-bg); color: var(--amber-ink); }
.check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); font-size: 12px; font-weight: 700; }
.matrix td .who-sub { margin-top: 2px; }
.empty-state { max-width: 640px; }
.empty-state .btn-dark { margin-top: 22px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: 9px; background: var(--dark); color: #fff; font-size: 13px; box-shadow: 0 10px 30px rgba(20, 26, 44, .25);
}

/* ── Login ──────────────────────────────────────────── */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.login-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; max-width: 1060px; width: 100%; align-items: center; }
.login-pitch .page-title { font-size: 44px; margin: 40px 0 16px; }
.login-pitch .chips { margin-top: 24px; }
.login-card { margin: 0; padding: 30px 28px; }
.login-card form { display: grid; gap: 14px; margin-top: 20px; }
.login-card label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.login-card input {
  height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--tile-border); background: #fffcf5; font: inherit; color: var(--ink);
}
.login-card input:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.alert { margin-top: 14px; padding: 9px 12px; border-radius: 8px; background: var(--amber-bg); color: var(--amber-ink); font-size: 13px; }
.demo-logins { display: grid; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-logins a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--tile); border: 1px solid var(--tile-border); }
.demo-logins a:hover { border-color: #cfd6ea; background: #fffdf8; }
.demo-logins strong { display: block; font-size: 13.5px; font-weight: 600; }
.demo-logins small { display: block; font-size: 12px; color: var(--muted); }
.demo-logins p { margin-top: 4px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1280px) {
  .dossier-top { grid-template-columns: auto minmax(0, 1fr); }
  .facts, .next-appt { grid-column: 1 / -1; }
  .next-appt { width: auto; }
  .spark-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .topbar { grid-template-columns: auto 1fr; }
  .mainnav { justify-content: flex-end; }
  .live { display: none; }
  .layout { grid-template-columns: 1fr; }
  .roster { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0 12px; }
  .roster-list { display: flex; overflow-x: auto; padding: 0 10px; }
  .roster-item { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .roster-item.selected { border-bottom-color: var(--navy); }
  .ri-meta, .devices { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coach-grid, .login-wrap { grid-template-columns: 1fr; }
  .report { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .final-pill { display: none; }
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; padding: 10px 16px 0; row-gap: 4px; }
  .logo-sub { display: none; }
  .mainnav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; height: 42px; }
  .mainnav a { padding: 0 10px; font-size: 11.5px; letter-spacing: .12em; }
  .topbar-right { grid-column: 2; grid-row: 1; }
  .userpill { font-size: 0; gap: 0; padding: 0 4px; }
  .roster { top: 0; }
  .main { padding: 18px 16px 48px; }
  .page-title { font-size: 30px; }
  .dossier { padding: 20px 18px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .spark-grid, .template-grid, .kpis { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 58px 30px minmax(0, 1fr) 24px; }
  .plan-row { grid-template-columns: 1fr auto; }
  .plan-row .avatar-square { display: none; }
  .plan-date { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; }
  .report { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .report .icon-box { display: none; }
  .report-date { text-align: left; }
  .search.wide { width: 100%; }
  .stat { width: calc(50% - 5px); }
}

/* ── Doorklikken: test- en parameterdetail ──────────── */
a.card.is-link, a.spark { display: block; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card.is-link:hover, a.spark:hover { border-color: #cfd6ea; box-shadow: 0 6px 20px rgba(47, 61, 156, .08); }
a.spark:hover { background: #fbf5e8; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.crumbs a { color: var(--navy); font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }
.page-head.compact { margin: 14px 0 24px; }
.page-head.compact .page-title { font-size: 32px; margin: 12px 0 10px; }
.page-intro.wide { max-width: 720px; }
.plain-link { color: var(--ink); font-weight: 500; }
.plain-link:hover { color: var(--navy); text-decoration: underline; }
.mt { margin-top: 22px !important; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.value-tile { margin: 0; padding: 20px 18px 16px; }
.value-tile .kpi-foot .link-btn { font-size: 11.5px; }
.note-box { padding: 14px 16px; border-radius: 10px; background: var(--tile); border: 1px solid var(--tile-border); }
.note-box p { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; line-height: 1.55; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.log tr.is-current td { background: var(--navy-soft); }
.log tr[data-href] { cursor: pointer; }
.log tr[data-href]:hover td { background: rgba(247, 239, 221, .6); }
.log tr.is-current:hover td { background: var(--navy-soft); }
.peak-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime-dot); vertical-align: middle; }
.chip.link:hover { border-color: var(--navy); color: var(--navy); }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tl-title { display: block; color: var(--ink); }
a.tl-title:hover { color: var(--navy); text-decoration: underline; }
.tl-values a { color: #6c695d; border-radius: 4px; }
.tl-values a:hover { color: var(--navy); text-decoration: underline; }
.tl-values a:hover b { color: var(--navy); }
.tl-manual { font-size: 11px; letter-spacing: .16em; color: var(--amber-ink); text-transform: uppercase; }
a.tl-chevron { display: inline-block; }
a.tl-chevron:hover { background: var(--tile); color: var(--ink); }
.delta.sm { font-size: 12px; padding: 1px 6px; }

.param-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.param-group { min-width: 0; }
.param-group-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.param-list { list-style: none; margin: 0; padding: 0; }
.param-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 64px 70px 78px 14px; gap: 10px; align-items: center;
  padding: 9px 8px; border-bottom: 1px solid var(--line-soft); border-radius: 6px; font-size: 13.5px;
}
.param-list li:last-child .param-row { border-bottom: 0; }
.param-row:hover { background: var(--tile); }
.param-row:hover .param-name { color: var(--navy); }
.param-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.param-value { white-space: nowrap; }
.param-value small { color: var(--muted); font-size: 11.5px; }
.param-trend svg { width: 64px; height: 22px; display: block; overflow: visible; }
.param-trend polyline { fill: none; stroke: var(--navy); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.param-delta { text-align: right; }
.param-meta { font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.param-chev { width: 14px; height: 14px; color: var(--muted-2); }

.evo-chart { position: relative; width: 100%; height: 280px; }
.evo-chart svg { display: block; overflow: visible; stroke: none; fill: none; }
.evo-chart text { stroke: none; }
.evo-grid { stroke: #ebe2cc; stroke-width: 1; }
.evo-axis { stroke: #d8ccb0; stroke-width: 1; }
.evo-tick { fill: var(--muted); font-size: 11.5px; font-family: inherit; font-variant-numeric: tabular-nums; }
.evo-line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; }
.evo-dot { fill: var(--navy); stroke: var(--card); stroke-width: 2; }
.evo-peak { fill: var(--lime-dot); stroke: var(--card); stroke-width: 2; }
.evo-cross { stroke: #cdbf9f; stroke-width: 1; stroke-dasharray: 3 3; }
.evo-ring { fill: none; stroke: var(--navy); stroke-width: 1.5; }

/* ── Handmatige invoer ──────────────────────────────── */
.entry-form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 8px; }
.select.full, .select.full select { width: 100%; }
.field input[type=date], .field textarea {
  height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--tile-border); background: #fffcf5; font: inherit; font-size: 13.5px; color: var(--ink);
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .select select:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-card {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--tile); border: 1px solid var(--tile-border); transition: border-color .12s, background .12s;
}
.type-option:hover .type-card { border-color: #cfd6ea; }
.type-option input:checked + .type-card { background: #fffdf8; border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.type-option input:focus-visible + .type-card { outline: 2px solid var(--navy); outline-offset: 2px; }
.type-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.type-top .cat-chip { font-size: 9.5px; padding: 1px 6px; }
.type-auto { font-size: 10px; color: var(--muted); }
.type-title { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.type-device { font-size: 12px; color: var(--muted); }
.values-set > legend { float: left; width: 100%; margin-bottom: 14px; }
.values-set > legend + * { clear: both; }
.values-set { padding: 18px; border-radius: 12px; background: var(--tile); border: 1px solid var(--tile-border); }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.value-input { display: grid; gap: 5px; }
.vi-label { font-size: 13px; font-weight: 500; }
.vi-box { display: flex; align-items: center; height: 40px; border-radius: 8px; border: 1px solid var(--tile-border); background: #fffdf8; overflow: hidden; }
.vi-box:focus-within { outline: 2px solid var(--navy); outline-offset: 0; }
.vi-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.vi-box input::placeholder { color: #c9c1ad; font-weight: 400; }
.vi-unit { padding: 0 12px; font-size: 12px; color: var(--muted); border-left: 1px solid var(--tile-border); height: 100%; display: grid; place-items: center; background: #faf5e9; }
.vi-hint { font-size: 11px; color: var(--muted); }
.value-input.invalid .vi-box { border-color: #d49a2a; box-shadow: inset 0 0 0 1px #d49a2a; }
.value-input.invalid .vi-hint { color: var(--amber-ink); font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 18px; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert { margin: 0 0 18px; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.device-list li { display: grid; grid-template-columns: 108px 1fr; gap: 10px; align-items: start; font-size: 13px; }
.device-list .src-pill { justify-self: start; }

@media (max-width: 1280px) {
  .param-groups { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .param-row { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .param-trend, .param-delta, .param-meta { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .device-list li { grid-template-columns: 1fr; }
}
