/* Werk: projecten en servicedesk, capaciteit, systeem. Bouwt op core.css; hier alleen wat die niet heeft.
   .project-bar en .project-issues staan ook in de tijdlijn van Vandaag (_timeline_item.html); hoe ze daar staan, staat
   in vandaag.css. De lijnen van de burn-up deelt de projectpagina met de grafiek op Cijfers (onderaan cijfers.css). */

/* Sectie met een kop erboven (projecten, servicedesk, systemen) */
.work-section { margin: 0 0 32px; }
.work-section > .bento { margin-bottom: 0; }
.work-section .section-head .muted { font-size: 15px; }

/* ---------- Projecten uit Jira ---------- */
.bento.projects { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.project-card .tile-title a { font: inherit; white-space: normal; text-decoration: none; }
.project-card .tile-title a:hover { text-decoration: underline; }
.project-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; } /* aftelling neutraal, met ervoor een gekleurde pil als het project achterloopt */
.project-pct { margin: 8px 0 0; color: var(--mute); font-size: 15px; }
.project-pct strong { margin-right: 4px; font: 500 24px/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.project-bar { display: flex; height: 12px; border-radius: var(--r-full); background: var(--surface-soft); overflow: hidden; }
.project-bar span { display: block; height: 100%; transform-origin: left center; animation: bar-grow .9s .2s var(--ease) both; }
.project-bar .done { background: var(--accent-teal); }
.project-bar .doing { background: var(--primary); animation-delay: .5s; }
.project-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--mute); }
.project-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.project-legend .key { margin: 0; border-radius: 50%; }
.project-legend .key.done { background: var(--accent-teal); }
.project-legend .key.doing { background: var(--primary); }
.project-legend .key.todo { background: var(--hairline-light); }
.project-facts li { font-size: 15px; }
.project-facts li:first-child { padding-top: 12px; border-top: 1px solid var(--hairline-light); }
.project-now { padding-top: 16px; border-top: 1px solid var(--hairline-light); }
.project-issues { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.project-issues li { min-width: 0; }
.project-issues a { color: var(--ink); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.project-issues a:hover { text-decoration: underline; }
.project-issues.done a { color: var(--charcoal); }
.epic-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 160px) 48px; align-items: center; }
.epic-bar { display: block; height: 6px; border-radius: var(--r-full); background: var(--surface-soft); overflow: hidden; }
.epic-bar i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--accent-teal); transform-origin: left center; animation: bar-grow .9s .4s var(--ease) both; }
.quiet-projects .list-rows li { justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; }
.quiet-projects .list-rows li:first-child { padding-top: 4px; }
.quiet-projects .list-rows .meta { display: inline; margin: 0; }

/* Burn-up op de projectpagina: de lijnen (.plan-line, .pl-*) en .key.actual zijn gedeeld met Cijfers; hier wat alleen
   de burn-up heeft */
.burnup-tile .pl-label.crowded { display: none; } /* label vlak voor het laatste bij 12 weken of meer */
.burnup-note .key.plan { width: 16px; height: 0; border: 0; border-top: 2px dashed var(--stone); border-radius: 0; background: none; }

/* Servicedesk */
.service-facts { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 8px 0 0; }
.service-facts dt { font-size: 14px; color: var(--mute); }
.service-facts dd { margin: 4px 0 0; font: 500 24px/1.2 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.service-facts .plan-state { font: inherit; }
.service-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--hairline-light); }
.service-grid.compact { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
.service-side { display: grid; gap: 32px; align-content: start; }
/* Geen open tickets: grafiek en klanten naast elkaar over de volle breedte */
.service-grid > .service-side:only-child { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.service-more { margin-top: 12px; }
.service-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 120px; margin-top: 12px; }
.service-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.service-bar i { display: block; width: 100%; min-height: 3px; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--faint); transform-origin: bottom; animation: bar-rise .8s var(--ease) both; }
.service-bar.current i { background: var(--primary); }
.service-bar small { margin-top: 4px; font: 500 13px/1 var(--font-mono); color: var(--mute); }
.service-clients { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.service-clients li { display: grid; grid-template-columns: minmax(90px, 1.2fr) minmax(60px, 1fr) auto; align-items: center; gap: 12px; font-size: 15px; }
.service-client-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-client-name a { color: var(--ink); text-decoration: none; }
.service-client-name a:hover { text-decoration: underline; }
@media (max-width: 900px) { .service-grid, .service-grid > .service-side:only-child { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .service-facts { gap: 12px 24px; } }

/* ---------- Capaciteit ---------- */
.capacity-ring { align-self: start; }
.capacity-commitments li.is-editing > span > a { font-weight: 600; color: var(--primary); }
.capacity-rows li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 128px; align-items: center; }
.capacity-week { display: grid; }
.capacity-week .meta { margin: 0; }
.capacity-rows li.is-current .capacity-week { font-weight: 600; }
.capacity-track { position: relative; display: flex; height: 16px; border-radius: var(--r-full); background: var(--surface-soft); overflow: hidden; }
.capacity-bar { display: block; height: 100%; }
.capacity-bar.growth, .capacity-legend .growth { background: var(--primary); }
.capacity-bar.firm, .capacity-legend .firm { background: var(--ink); }
.capacity-bar.tentative, .capacity-legend .tentative { background: var(--faint); }
.capacity-limit { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -2px; background: var(--accent-danger); } /* -2px: de streep eindigt op de grens */
.capacity-free { margin: 0; text-align: right; }
.capacity-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--mute); }
.capacity-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.capacity-legend .swatch { width: 10px; height: 10px; border-radius: 50%; }
.capacity-form-panel > .errors { margin: 0 0 4px; }
.capacity-form .actions .capacity-delete { margin-left: auto; } /* verwijderen niet naast annuleren */
@media (max-width: 1100px) {
  .capacity-top > .capacity-side { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* iPhone: deze week, dan de weken, dan de inzet vlak boven het formulier */
  .capacity-top > .capacity-side { display: contents; }
  .capacity-commitments { order: 1; }
  .capacity-rows li { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .capacity-week { display: flex; align-items: baseline; gap: 8px; }
  .capacity-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Systeem (system_list, system_detail, _system_item, _system_icon, _system_count) ----------
   Eigen beeldtaal binnen de schil, naar het voorbeeld dat Mark liet zien: ruitjespapier (.sys-canvas), een stroomschema van
   blokken met gestippelde lijnen en holle rondjes (.sys-link, .sys-stem, .sys-branch), lussen langs de buitenkant op brede
   schermen (.sys-loop), links een rail met de stappen die meelicht met de stap in beeld (.sys-rail; onder 1280px een rij
   chips bovenaan), en elk onderdeel als kaart die je aanklikt (.sys-face) met daaronder, over de volle breedte van zijn raster,
   het paneel met uitleg, stand en notitie (.sys-panel; het raster heeft grid-auto-flow: dense). Alles hangt onder .sys-page. */
.sys-page { --sys-line: var(--primary); --sys-grid: rgba(25, 28, 31, .05); --sys-pad: 24px; --sys-rest: color-mix(in srgb, var(--primary) 30%, var(--canvas-light));
  /* tekst in een accentkleur: de felle accenten halen op 13-15px geen AA (2,5-3:1); deze mengsels wel (5,1-6,2:1). De felle
     kleuren blijven voor stippen, randen, strookjes en de donut. */
  --sys-teal-ink: color-mix(in srgb, var(--accent-teal) 60%, var(--ink)); --sys-warn-ink: color-mix(in srgb, var(--accent-warn) 55%, var(--ink));
  --sys-bad-ink: color-mix(in srgb, var(--accent-danger) 75%, var(--ink)); }
.sys-page [id] { scroll-margin-top: 24px; }
.sys-page .page-head .eyebrow { color: var(--primary); }
.sys-head-links { align-items: center; }
.sys-head-links .sys-head-phase { color: var(--charcoal); }
.sys-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sys-mono { margin: 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.sys-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.sys-teal { color: var(--sys-teal-ink); font-weight: 600; }
.sys-lede { max-width: 64ch; margin: 8px 0 0; font-size: 15px; color: var(--mute); }
.sys-lede strong { color: var(--ink); font-weight: 600; }
.sys-hint { margin: 0; font-size: 14px; color: var(--mute); }
.sys-foot { margin: 12px 0 0; font-size: 14px; color: var(--mute); }

/* Nu eerst: de pil rechts in de kop, met de uitleg eronder */
.sys-next-wrap { flex-direction: column; align-items: flex-end; gap: 8px; max-width: 420px; }
.btn.sys-next { height: auto; min-height: 48px; padding: 8px 24px 8px 8px; gap: 12px; white-space: normal; text-align: left; line-height: 1.3; }
.sys-next-label { flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-full); background: var(--primary); color: var(--on-primary); font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.sys-next-title { font-size: 15px; font-weight: 600; }
.sys-next-arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sys-next.done { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 8px 24px 8px 8px; border-radius: var(--r-full); background: var(--tint-teal); color: var(--ink); }
.sys-next.done .sys-next-label { background: var(--sys-teal-ink); }
.sys-next-help { max-width: 44ch; margin: 0; font-size: 14px; color: var(--mute); }
/* uitleg en het feit uit het CRM: links uitgelijnd onder elkaar (rechts uitgelijnde regels lezen slecht) */
.sys-next-wrap > p { align-self: stretch; }
.sys-next-fact { max-width: 44ch; margin: 0; }

/* Ruitjespapier: binnen de schil, met de rail en het stroomschema */
.sys-canvas { position: relative; padding: var(--sys-pad); border: 1px solid var(--hairline-light); border-radius: var(--r-xl); background-color: var(--canvas-light);
  background-image: linear-gradient(var(--sys-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sys-grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: 11px 11px; }
@media (min-width: 1280px) { .sys-canvas:not(.sys-list-canvas) { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 24px; align-items: start; } }

/* Rail met de stappen; de stap in beeld krijgt .is-active (script in system_detail.html) */
.sys-rail { min-width: 0; }
.sys-rail-head { margin: 0 0 12px; padding: 0 8px; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.sys-rail-head span { display: block; color: var(--mute); }
.sys-rail-list { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.sys-rail-list a { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 12px; padding: 8px; border-left: 3px solid transparent; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink); text-decoration: none; transition: background .18s var(--ease), border-color .18s var(--ease); }
.sys-rail-list a:hover { background: var(--surface-soft); }
.sys-rail-list a.is-active { background: var(--tint-cobalt); border-left-color: var(--primary); }
.sys-rail-num { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--hairline-light); border-radius: var(--r-sm); background: var(--canvas-light); font: 600 13px/1 var(--font-mono); color: var(--ink); }
.sys-rail-num .sys-icon { width: 16px; height: 16px; }
.sys-rail-list a.is-active .sys-rail-num { background: var(--canvas-dark); border-color: var(--canvas-dark); color: var(--on-dark); }
.sys-rail-text { display: grid; min-width: 0; }
.sys-rail-text strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.sys-rail-line { font-size: 14px; line-height: 1.35; color: var(--mute); }
@media (min-width: 1280px) {
  .sys-rail { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 16px 8px; border: 1px solid var(--hairline-light); border-radius: var(--r-lg); background: var(--surface-card); scrollbar-width: thin; }
  .sys-rail-sub a { padding-left: 24px; }
}
@media (max-width: 1279px) {
  /* rij chips die bovenaan blijft staan; zonder regel, die staat in het blok zelf */
  .sys-page [id] { scroll-margin-top: 80px; }
  .sys-rail { position: sticky; top: 0; z-index: 25; margin: calc(-1 * var(--sys-pad)) calc(-1 * var(--sys-pad)) 16px; padding: 8px var(--sys-pad);
    border-bottom: 1px solid var(--hairline-light); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--canvas-light); }
  .sys-rail-head, .sys-rail-line { display: none; }
  .sys-rail-list { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--sys-pad)); padding: 0 var(--sys-pad); scrollbar-width: none; }
  .sys-rail-list::-webkit-scrollbar { display: none; }
  .sys-rail-list li { flex: none; }
  .sys-rail-list a, .sys-rail-sub a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 8px; border: 1px solid var(--hairline-light); border-radius: var(--r-full); background: var(--canvas-light); white-space: nowrap; }
  .sys-rail-list a.is-active { border-color: var(--primary); }
  .sys-rail-text strong { font-weight: 500; }
}
@media (max-width: 1024px) {
  .sys-page [id] { scroll-margin-top: 128px; } /* zwarte balk en de rij chips */
  .sys-rail { top: calc(56px + env(safe-area-inset-top)); }
}

/* Stroomschema: blokken onder elkaar, op brede schermen met banen voor de lussen links (2) en rechts (1) */
.sys-flow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.sys-flow > * { min-width: 0; }
@media (min-width: 1280px) {
  .sys-flow { grid-template-columns: 24px 24px minmax(0, 1fr) 24px; }
  .sys-flow > :not(.sys-loop) { grid-column: 3; }
}
.sys-block { container: sys-block / inline-size; position: relative; padding: 24px; border: 1px solid var(--hairline-light); border-radius: var(--r-xl); background: var(--surface-card); }
.sys-num { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--canvas-dark); color: var(--on-dark); font: 600 15px/1 var(--font-mono); }
.sys-num .sys-icon { width: 18px; height: 18px; }
.sys-num.small { width: 24px; height: 24px; border-radius: var(--r-sm); font-size: 13px; }
.sys-num.accent { background: var(--primary); }
.sys-head { display: flex; align-items: flex-start; gap: 16px; }
.sys-head > div { min-width: 0; }
.sys-head-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 32px; }
.sys-title { margin: 0; font: 500 20px/1.25 var(--font-display); letter-spacing: -.01em; }
.sys-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: var(--r-full); background: var(--tint-cobalt); color: var(--primary); font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

/* Lijnen: gestippeld in cobalt, met een hol rondje waar een lijn een blok raakt */
.sys-link, .sys-stem, .sys-branch, .sys-loop { color: var(--sys-line); }
.sys-link::before, .sys-link::after, .sys-stem::after, .sys-branch i::after, .sys-loop::before, .sys-loop::after {
  content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; background: var(--canvas-light); box-sizing: border-box; }
.sys-link { position: relative; z-index: 1; justify-self: center; width: 0; height: 48px; border-left: 2px dashed currentColor; }
.sys-link::before { top: -5px; left: -6px; } /* -6px: midden op de lijn van 2px */
.sys-link::after { bottom: -5px; left: -6px; }
.sys-link-label { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: max-content; max-width: 260px; padding: 4px 8px; border-radius: var(--r-full); background: var(--canvas-light);
  font: 500 13px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.sys-stem { position: relative; z-index: 1; display: block; width: 0; height: 40px; margin: 0 auto; border-left: 2px dashed currentColor; }
.sys-stem::after { bottom: -5px; left: -6px; }
.sys-stem.out { height: 24px; }
.sys-stem.out::after { top: -5px; bottom: auto; }

/* Lussen langs de buitenkant (alleen breed): terug naar de markt, wie nu zoekt, nog niet klaar om te kopen */
.sys-loop { display: none; }
@media (min-width: 1280px) {
  .sys-loop { display: block; position: relative; z-index: 1; border: 2px dashed currentColor; border-right: 0; border-radius: var(--r-lg) 0 0 var(--r-lg); pointer-events: none; }
  .sys-loop::before { top: -6px; right: -5px; }
  .sys-loop::after { bottom: -6px; right: -5px; }
  .sys-loop > span { position: absolute; top: 50%; left: -1px; transform: translate(-50%, -50%) rotate(180deg); writing-mode: vertical-rl; padding: 8px 4px; background: var(--canvas-light);
    font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
  .sys-loop.back { grid-column: 1 / 3; grid-row: 3 / 14; margin: 48px 0; }
  .sys-loop.now { grid-column: 2 / 3; grid-row: 3 / 9; margin: 216px 0 -72px; color: var(--accent-teal); }
  .sys-loop.now > span { color: var(--sys-teal-ink); }
  .sys-loop.later { grid-column: 4; grid-row: 5 / 12; margin: 72px 0; border-left: 0; border-right: 2px dashed currentColor; border-radius: 0 var(--r-lg) var(--r-lg) 0; }
  .sys-loop.later::before, .sys-loop.later::after { right: auto; left: -5px; }
  .sys-loop.later > span { left: auto; right: -1px; transform: translate(50%, -50%) rotate(180deg); }
}

/* Onderdeel als knop, met daarna het paneel; zonder JavaScript staat het paneel open */
.sys-item { position: relative; display: flex; min-width: 0; }
.sys-face { display: flex; flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sys-panel { position: relative; grid-column: 1 / -1; min-width: 0; padding: 16px 48px 16px 16px; border: 1px solid var(--primary); border-radius: var(--r-md); background: var(--surface-card); container-type: inline-size; }
.js .sys-panel:not(.is-open) { display: none; }
.sys-panel-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; }
@container (min-width: 600px) { .sys-panel-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; } }
.sys-panel-title { margin: 0; font-size: 16px; font-weight: 600; }
.sys-panel-help { margin: 4px 0 0; font-size: 15px; color: var(--charcoal); }
.sys-panel-close { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; }
.sys-panel-close:hover { background: var(--surface-soft); color: var(--ink); }
.sys-panel-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sys-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.sys-field { display: grid; gap: 4px; min-width: 0; }
.sys-field label { font-size: 14px; font-weight: 600; }
.sys-field-status { flex: 1 1 160px; }
.sys-field-note { flex: 2 1 200px; }
.sys-form select, .sys-form input[type="text"] { width: 100%; height: 40px; border-radius: var(--r-full); font-size: 15px; }
.sys-form input[type="text"] { padding: 0 16px; }
.sys-form .btn { flex: none; height: 40px; }
.sys-status { width: 100%; }
.sys-status[data-tone="good"] { --dot: var(--accent-teal); }
.sys-status[data-tone="warn"] { --dot: var(--accent-warn); }
.sys-status[data-tone="bad"] { --dot: var(--accent-danger); }
.sys-status[data-tone=""]::before { background: transparent; border: 1.5px solid var(--stone); box-sizing: border-box; }
/* Feit uit het CRM bij een onderdeel: de tekst loopt door naast het label */
.sys-fact { margin: 8px 0 0; font-size: 14px; color: var(--charcoal); overflow-wrap: break-word; }
.sys-fact a { color: inherit; }
.sys-fact-tag { display: inline-flex; align-items: center; height: 20px; margin-right: 8px; padding: 0 8px; border-radius: var(--r-full); background: var(--tint-cobalt); color: var(--primary); font: 600 13px/1 var(--font-body); letter-spacing: .2px; }

/* Kaart met pictogram (kanalen, quick wins, leads, sales, ritme): uit is gestippeld; loopt en gepland dragen een label op de rand */
.sys-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); grid-auto-flow: row dense; gap: 16px 12px; }
.sys-cards.two, .sys-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container sys-block (min-width: 540px) { .sys-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } } /* vier kaarten: 4 of 2 naast elkaar, nooit 3 + 1 */
.sys-stack { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: row dense; gap: 16px; margin-top: 4px; }
.sys-card > .sys-face { position: relative; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 128px; padding: 16px; border: 1px solid var(--hairline-light); border-radius: var(--r-md);
  background: var(--surface-card); transition: border-color .18s var(--ease); }
.sys-card > .sys-face:hover { border-color: var(--hairline-strong); }
.sys-card[data-tone="good"] > .sys-face::before, .sys-card[data-tone="warn"] > .sys-face::before { content: ""; position: absolute; top: -1px; left: 12px; right: 12px; height: 3px; border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--accent-teal); }
.sys-card[data-tone="warn"] > .sys-face::before { background: var(--accent-warn); }
.sys-card[data-tone=""] > .sys-face { border-style: dashed; border-color: var(--faint); background: rgba(255, 255, 255, .6); }
.sys-card-icon { display: inline-flex; color: var(--primary); }
.sys-card[data-tone=""] .sys-card-icon { color: var(--stone); }
.sys-card-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); hyphens: auto; hyphenate-limit-chars: 12 5 5; overflow-wrap: break-word; max-width: 100%; }
.sys-card[data-tone=""] .sys-card-title { font-weight: 500; color: var(--charcoal); }
.sys-card-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; color: var(--mute); }
.sys-flag { position: absolute; top: -10px; right: 12px; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-full); background: var(--tint-teal); color: var(--sys-teal-ink);
  font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.sys-card[data-tone="warn"] .sys-flag { background: var(--tint-warm); color: var(--sys-warn-ink); }
.sys-item.is-open > .sys-face, .sys-card.is-open > .sys-face:hover { border-color: var(--primary); border-style: solid; }
.sys-stack .sys-card > .sys-face { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; gap: 4px 12px; min-height: 0; padding: 12px 16px 12px 12px; }
.sys-stack .sys-card-icon { grid-row: span 2; }
/* Paneel in een smalle kolom (leads, brandstof): velden onder elkaar over de volle breedte */
:is(.sys-stack, .sys-chips) .sys-panel { padding: 12px; }
:is(.sys-stack, .sys-chips) .sys-panel-title { padding-right: 32px; }
:is(.sys-stack, .sys-chips) .sys-field { flex: 1 1 100%; }

/* Vierkantje en tekst (opleverpunten), in twee kolommen */
.sys-checks { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: row dense; gap: 0 24px; margin-top: 12px; }
@container sys-block (min-width: 540px) { .sys-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sys-check > .sys-face { align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px; border-bottom: 1px solid var(--hairline-light); }
.sys-check > .sys-face:hover { background: var(--surface-soft); }
.sys-check.is-open > .sys-face { background: var(--tint-cobalt); }
.sys-box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--stone); border-radius: var(--r-sm); background: var(--canvas-light); }
.sys-box svg { width: 14px; height: 14px; fill: none; stroke: var(--on-dark); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sys-check[data-tone="good"] .sys-box { border-color: var(--accent-teal); background: var(--accent-teal); }
.sys-check[data-tone="warn"] .sys-box { border-color: var(--accent-warn); }
.sys-check[data-tone="warn"] .sys-box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-warn); }
.sys-check-title { flex: 1; min-width: 0; font-size: 15px; line-height: 1.35; }
.sys-check-state { flex: none; font-size: 14px; font-weight: 600; color: var(--sys-warn-ink); }
.sys-check:not([data-tone="warn"]) .sys-check-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Regel met tagje (signalen) */
.sys-rows { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: row dense; }
.sys-row > .sys-face { align-items: center; gap: 12px; min-height: 48px; padding: 8px 4px; border-bottom: 1px solid var(--hairline-light); }
.sys-row > .sys-face:hover { background: var(--surface-soft); }
.sys-row.is-open > .sys-face { background: var(--tint-cobalt); }
.sys-row-icon { display: inline-flex; color: var(--primary); }
.sys-row-icon .sys-icon { width: 20px; height: 20px; }
.sys-row-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.35; }
.sys-row-note { display: block; font-size: 14px; font-weight: 400; color: var(--mute); }
.sys-tag { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-full); background: var(--surface-soft); color: var(--mute);
  font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.sys-row[data-tone="good"] .sys-tag { background: var(--tint-teal); color: var(--sys-teal-ink); }
.sys-row[data-tone="warn"] .sys-tag { background: var(--tint-warm); color: var(--sys-warn-ink); }
.sys-row[data-tone=""] .sys-row-icon { color: var(--stone); }
.sys-row[data-tone=""] .sys-row-title { color: var(--charcoal); }

/* Chip met stip (brandstof) */
.sys-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-auto-flow: row dense; gap: 8px; }
.sys-chip > .sys-face { align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--hairline-light); border-radius: var(--r-md); background: var(--surface-card); }
.sys-chip > .sys-face:hover { border-color: var(--hairline-strong); }
.sys-chip[data-tone=""] > .sys-face { border-style: dashed; border-color: var(--faint); background: transparent; }
.sys-chip-icon { display: inline-flex; color: var(--primary); }
.sys-chip-icon .sys-icon { width: 20px; height: 20px; }
.sys-chip[data-tone=""] .sys-chip-icon { color: var(--stone); }
.sys-chip-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.sys-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sys-chip[data-tone="good"] .sys-dot { background: var(--accent-teal); }
.sys-chip[data-tone="warn"] .sys-dot { background: var(--accent-warn); }

/* Tegel van de scorecard: het oordeel als kleur */
.sys-verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 8px; margin-top: 12px; }
@container sys-block (min-width: 600px) { .sys-verdicts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sys-verdict > .sys-face { position: relative; flex-direction: column; gap: 4px; min-height: 76px; padding: 16px 12px 12px; border: 1px solid transparent; border-radius: var(--r-md); background: var(--surface-soft); overflow: hidden; }
.sys-verdict > .sys-face::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--faint); }
.sys-verdict[data-tone="good"] > .sys-face { background: var(--tint-teal); }
.sys-verdict[data-tone="good"] > .sys-face::before { background: var(--accent-teal); }
.sys-verdict[data-tone="warn"] > .sys-face { background: var(--tint-warm); }
.sys-verdict[data-tone="warn"] > .sys-face::before { background: var(--accent-warn); }
.sys-verdict[data-tone="bad"] > .sys-face::before { background: var(--accent-danger); }
.sys-verdict > .sys-face:hover { border-color: var(--hairline-strong); }
.sys-verdict-title { font-size: 15px; font-weight: 600; line-height: 1.3; hyphens: auto; hyphenate-limit-chars: 12 5 5; overflow-wrap: break-word; max-width: 100%; }
.sys-verdict-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--charcoal); }
.sys-verdict-label::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--stone); box-sizing: border-box; }
.sys-verdict[data-tone="good"] .sys-verdict-label::before { border-color: var(--accent-teal); background: var(--accent-teal); }
.sys-verdict[data-tone="warn"] .sys-verdict-label::before { border-color: var(--accent-warn); background: var(--accent-warn); }
.sys-verdict[data-tone="bad"] .sys-verdict-label::before { border-color: var(--accent-danger); background: var(--accent-danger); }
.sys-verdict[data-tone="bad"] .sys-verdict-label { color: var(--sys-bad-ink); font-weight: 600; }

/* Bouwfase: gestippelde rand zolang hij loopt; kopregel met de stappenrij, vier tegels met hun stand */
.sys-build { border: 1.5px dashed var(--stone); }
.sys-build.is-ready { border: 1px solid var(--hairline-light); }
.sys-build-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; min-height: 40px; padding-right: 48px; }
.sys-stepper { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; }
.sys-stepper li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--charcoal); }
.sys-stepper li + li::before { content: ""; width: 16px; border-top: 1.5px solid var(--faint); }
.sys-stepper li.sys-stepper-qw::before { display: none; }
.sys-stepper-mark { flex: none; width: 10px; height: 10px; border: 1.5px solid var(--stone); border-radius: 50%; box-sizing: border-box; }
.sys-stepper li[data-tone="good"] .sys-stepper-mark { border-color: var(--accent-teal); background: var(--accent-teal); }
.sys-stepper li[data-tone="warn"] .sys-stepper-mark { border-color: var(--accent-warn); background: var(--accent-warn); }
.sys-stepper .sys-stepper-qw { margin-left: 8px; height: 28px; padding: 0 12px; border-radius: var(--r-full); background: var(--tint-cobalt); color: var(--primary); font-weight: 600; }
.sys-build-fold > summary { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; list-style: none; }
.sys-build-fold > summary:hover { background: var(--surface-soft); }
.sys-build-fold > summary .plan-chevron { transform: none; }
.sys-build-fold[open] > summary .plan-chevron { transform: rotate(180deg); }
.sys-build .sys-lede { margin-top: 12px; }
.sys-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@container sys-block (min-width: 540px) { .sys-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sys-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px; border-radius: var(--r-lg); background: var(--surface-soft); }
.sys-tile-eyebrow { margin: 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.sys-tile[data-tone="good"] .sys-tile-eyebrow { color: var(--sys-teal-ink); }
.sys-tile-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.sys-tile-help { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mute); }
.sys-tile .sys-form { margin-top: auto; padding-top: 12px; }
.sys-tile .sys-status select { height: 40px; }
.sys-sub { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--hairline-light); }
.sys-sub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.sys-sub-head h3 { margin: 0; font: 600 16px/1.4 var(--font-body); letter-spacing: 0; }
.sys-meter { margin-top: 8px; }
.sys-page .plan-meter:not([data-state="good"]) span { background: var(--primary); }
.sys-sub .sys-cards { margin-top: 16px; }

/* Overzicht: markt met donut, na 12 maanden, wat het oplevert, fases. Smal: één of twee kolommen. Vanaf 680px (laptop: ±720px)
   drie kolommen met de fases als tijdlijn over de volle breedte eronder; vier kolommen naast elkaar werden ±170px smal. Het
   marktformulier (order 1) staat dan direct onder de kolommen. Zonder cijfers (.is-empty) één vak met een regel en de link. */
.sys-overview { container: sys-ov / inline-size; }
.sys-ov-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@container sys-ov (min-width: 460px) {
  .sys-ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-ov-grid.is-empty > .sys-ov-fases { grid-column: 1 / -1; }
}
@container sys-ov (min-width: 680px) {
  .sys-ov-grid { grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); }
  .sys-ov-empty { grid-column: span 2; }
  .sys-ov-fases { grid-column: 1 / -1; order: 2; }
}
.sys-ov-col { display: flex; flex-direction: column; min-width: 0; }
.sys-ov-sub { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-soft); }
.sys-ov-sub .sys-eyebrow { margin-bottom: 4px; }
.sys-big { margin: 0; font: 500 32px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sys-big small { display: block; margin-top: 4px; font: 400 14px/1.35 var(--font-body); letter-spacing: 0; color: var(--mute); }
.sys-big.medium { font-size: 24px; }
.sys-donut { display: block; width: 120px; height: 120px; margin: 12px auto; }
.sys-donut circle { fill: none; stroke-width: 14; }
.sys-donut-rest { stroke: var(--sys-rest); }
.sys-donut-now { stroke: var(--accent-teal); transform: rotate(-90deg); transform-origin: 60px 60px; }
.sys-donut-value { fill: var(--ink); font: 500 24px/1 var(--font-display); text-anchor: middle; }
.sys-donut-label { fill: var(--mute); font: 500 13px/1 var(--font-body); text-anchor: middle; }
.sys-legend { list-style: none; display: grid; gap: 4px; margin: 0 0 8px; padding: 0; font-size: 14px; color: var(--charcoal); }
.sys-legend li { display: flex; align-items: center; gap: 8px; }
.sys-legend i { flex: none; width: 10px; height: 10px; border-radius: var(--r-full); background: var(--sys-rest); }
.sys-legend i.now { background: var(--accent-teal); }
.sys-market .sys-big + .sys-ov-text { margin-top: 8px; }
.sys-ov-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--charcoal); }
.sys-ov-text strong { color: var(--ink); font-weight: 600; }
.sys-ov-note { margin: 0; font-size: 14px; color: var(--mute); }
.sys-ov-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 16px; margin: 0; padding: 0; font-size: 14px; color: var(--charcoal); }
.sys-ov-list strong { display: block; font: 600 16px/1.3 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.sys-result[data-state="good"] { color: var(--sys-teal-ink); }
.sys-result[data-state="warn"] { color: var(--sys-warn-ink); }
.sys-ov-link { align-self: flex-start; margin-top: 4px; font-size: 15px; font-weight: 500; }
.sys-ov-link.accent { color: var(--primary); text-decoration-color: currentColor; }
.sys-ov-table { display: grid; margin: 4px 0 0; font-size: 14px; }
.sys-ov-table > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--hairline-light); }
.sys-ov-table dt { color: var(--mute); }
.sys-ov-table dd { margin: 0; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sys-ov-table .total { border-top-color: var(--hairline-strong); }
.sys-ov-table .total dt { color: var(--ink); font-weight: 600; }
.sys-ov-edit { align-self: flex-start; margin-top: 12px; text-align: left; font-size: 15px; font-weight: 500; color: var(--primary); text-decoration-color: currentColor; }
.sys-ov-form { grid-column: 1 / -1; }
@container sys-ov (min-width: 460px) { .sys-ov-form { order: 1; } }
.sys-ov-empty .sys-ov-text { max-width: 48ch; }
.sys-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sys-fields .field.wide, .sys-fields .actions { grid-column: 1 / -1; }
@container (max-width: 560px) { .sys-fields { grid-template-columns: minmax(0, 1fr); } }
/* Fases: verticale tijdlijn; is het vak breed genoeg (onder de kolommen), dan horizontaal met de lijn tussen de rondjes.
   --c kleurt het rondje (fel), --c-ink de maanden (tekst, AA). */
.sys-ov-fases .sys-ov-sub { container: sys-fases / inline-size; }
.sys-phases { list-style: none; display: grid; gap: 12px; margin: 4px 0 0; padding: 0; }
.sys-phases li { --c: var(--primary); --c-ink: var(--primary); position: relative; display: grid; align-content: start; padding-left: 24px; }
.sys-phases li[data-block="Pipeline"] { --c: var(--accent-warn); --c-ink: var(--sys-warn-ink); }
.sys-phases li[data-block="Oogst"] { --c: var(--accent-teal); --c-ink: var(--sys-teal-ink); }
.sys-phases li::before { content: ""; position: absolute; z-index: 1; left: 0; top: 3px; width: 12px; height: 12px; border: 2px solid var(--c); border-radius: 50%; background: var(--surface-soft); box-sizing: border-box; }
.sys-phases li::after { content: ""; position: absolute; left: 5px; top: 15px; bottom: -15px; border-left: 2px dotted var(--faint); }
.sys-phases li:last-child::after { display: none; }
.sys-phase-months { font: 500 13px/1.4 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink); }
.sys-phases strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.sys-phase-period { font-size: 14px; color: var(--mute); }
.sys-phases li[data-current]::before { background: var(--c); box-shadow: 0 0 0 4px var(--tint-cobalt); }
.sys-phases li[data-current] strong { color: var(--primary); }
.sys-phases li[data-past] :is(strong, .sys-phase-period, .sys-phase-months) { color: var(--mute); font-weight: 500; } /* gedimd: het grijze rondje */
.sys-phases li[data-past]::before { border-color: var(--faint); background: var(--faint); }
@container sys-fases (min-width: 560px) {
  .sys-phases { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 8px; }
  .sys-phases li { padding: 24px 0 0; }
  .sys-phases li::before { top: 0; }
  .sys-phases li::after { left: 16px; right: -8px; top: 5px; bottom: auto; border-left: 0; border-top: 2px dotted var(--faint); }
}

/* Zone (voor wie nog niet zoekt, voor wie nu zoekt): dunne getinte rand, label linksboven, de lijn loopt erin door */
.sys-zone { position: relative; padding: 0 16px; border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent); border-radius: var(--r-xl); background: color-mix(in srgb, var(--tint-cobalt) 55%, transparent); }
.sys-zone-label { position: absolute; top: 12px; left: 16px; display: flex; align-items: center; gap: 8px; margin: 0; font: 500 13px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.sys-zone-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sys-demand { container: sys-demand / inline-size; display: grid; gap: 16px; }
.sys-demand-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@container sys-demand (min-width: 620px) { .sys-demand-top { grid-template-columns: minmax(0, 1fr) minmax(0, 296px); } }
.sys-note-pill { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 8px 16px 8px 12px; border-radius: var(--r-md); background: var(--surface-soft); font-size: 14px; color: var(--charcoal); }
.sys-note-pill .sys-icon { width: 18px; height: 18px; color: var(--primary); }
.sys-fuel { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-soft); }
.sys-fuel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sys-fuel-title { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 15px/1.4 var(--font-body); letter-spacing: 0; }
.sys-fuel-head .sys-mono { margin-left: auto; }
.sys-spy-region { display: grid; gap: 16px; min-width: 0; }
.sys-fuel .sys-hint { font-size: 14px; }
.sys-cards-hint { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--hairline-light); }

/* Signalen: donkere band met radar, daaronder vast de witte kaart met de lijst */
.sys-signals { position: relative; container: sys-sig / inline-size; }
.sys-band { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 24px; padding: 24px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--canvas-dark); color: var(--on-dark-mute); }
@container sys-sig (min-width: 700px) { .sys-band { grid-template-columns: minmax(0, 1fr) 380px minmax(0, 1fr); align-items: center; } }
.sys-band .sys-title { color: var(--on-dark); }
.sys-band-head p { margin: 8px 0 0; font-size: 15px; }
.sys-band-side { display: grid; gap: 8px; }
.sys-band-side p { margin: 0; font-size: 15px; }
.sys-band-side .sys-band-big { font: 500 40px/1 var(--font-display); letter-spacing: -.02em; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.sys-band-big small { display: block; margin-top: 8px; font: 400 15px/1.3 var(--font-body); letter-spacing: 0; color: var(--on-dark-mute); }
.sys-band-key { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0; padding: 0; font-size: 14px; }
.sys-band-key li { display: inline-flex; align-items: center; gap: 8px; }
.sys-band-key li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--stone); }
.sys-band-key li[data-tone="good"]::before { background: var(--accent-teal); }
.sys-band-key li[data-tone="warn"]::before { background: var(--accent-warn); }
.sys-radar { position: relative; justify-self: center; width: 240px; max-width: 100%; aspect-ratio: 1; }
.sys-radar svg { display: block; width: 100%; height: 100%; overflow: visible; color: var(--accent-teal); } /* kleur van het verloop van de wijzer */
.sys-radar .ring { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.sys-radar .axis { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.sys-radar .hand { stroke: var(--accent-teal); stroke-width: 1.5; }
.sys-radar .core { fill: var(--accent-teal); }
.sys-sweep { transform-origin: 120px 120px; transform: rotate(-24deg); }
/* De wijzer draait twee keer bij het laden en staat dan stil (geen doorlopende beweging); bij reduced motion niet */
@media (prefers-reduced-motion: no-preference) { .sys-sweep { animation: sys-sweep 6s linear 2; } }
@keyframes sys-sweep { from { transform: rotate(-24deg); } to { transform: rotate(336deg); } }
.sys-radar-dots { list-style: none; margin: 0; padding: 0; }
/* Stippen op een boog: links (reageert op jou) van linksboven naar linksonder, rechts (reden om te kopen) idem; --i van --n
   uit het template, de straal wisselt per stip zodat het een radarbeeld blijft. Werkt voor elk aantal signalen. */
.sys-radar-dots li { --t: calc((var(--i, 0) + .5) / var(--n, 1)); --r: calc(31% + 6% * mod(var(--i, 0), 2)); position: absolute; width: 0; height: 0;
  left: calc(50% + cos(var(--a)) * var(--r)); top: calc(50% - sin(var(--a)) * var(--r)); }
.sys-radar-dots .left { --a: calc(125deg + var(--t) * 110deg); }
.sys-radar-dots .right { --a: calc(55deg - var(--t) * 110deg); }
.sys-radar-dots li::before { content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--stone); box-shadow: 0 0 0 4px rgba(141, 150, 158, .22); }
.sys-radar-dots li[data-tone="good"]::before { background: var(--accent-teal); box-shadow: 0 0 0 4px rgba(0, 168, 126, .28); }
.sys-radar-dots li[data-tone="warn"]::before { background: var(--accent-warn); box-shadow: 0 0 0 4px rgba(224, 138, 0, .28); }
.sys-radar-dots span { position: absolute; top: -9px; width: max-content; max-width: 104px; font-size: 13px; line-height: 1.35; color: var(--on-dark-mute); }
.sys-radar-dots li[data-tone="good"] span { color: var(--on-dark); }
.sys-radar-dots .left span { right: 12px; text-align: right; }
.sys-radar-dots .right span { left: 12px; }
@container sys-sig (max-width: 419px) { .sys-radar-dots span { display: none; } }
.sys-band-card { padding: 24px; border: 1px solid var(--hairline-light); border-top: 0; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--surface-card); }
.sys-band-card > .sys-lede { margin-top: 0; }
.sys-band-card-title { margin: 16px 0 12px; font: 600 16px/1.4 var(--font-body); letter-spacing: 0; }
.sys-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 32px; }
@container sys-sig (min-width: 600px) { .sys-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sys-two .sys-eyebrow { margin-bottom: 4px; }

/* Leads: de lijn splitst naar drie kolommen en komt eronder weer samen */
.sys-zone-leads { container: sys-leads / inline-size; }
.sys-zone-top { display: grid; grid-template-columns: minmax(0, 1fr); }
.sys-zone-top .sys-head { padding: 0 8px 24px; }
.sys-zone-stem, .sys-branch { display: none; }
.sys-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@container sys-leads (min-width: 640px) {
  .sys-zone-top { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); }
  .sys-zone-stem { display: block; width: 0; margin-left: -1px; border-left: 2px dashed var(--sys-line); }
  .sys-branch { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; height: 32px; }
  .sys-branch::before { content: ""; position: absolute; top: 0; left: calc((100% - 32px) / 6); right: calc((100% - 32px) / 6); border-top: 2px dashed currentColor; } /* van het midden van kolom 1 tot dat van kolom 3 */
  .sys-branch i { position: relative; z-index: 1; justify-self: center; width: 0; border-left: 2px dashed currentColor; }
  .sys-branch i::after { bottom: -5px; left: -6px; }
  .sys-branch.join::before { top: auto; bottom: 0; }
  .sys-branch.join i::after { top: -5px; bottom: auto; }
  .sys-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sys-zone-leads > .sys-stem.out::after { display: none; } /* begint op de kruising, niet op een kaart */
}
.sys-zone-leads > .sys-stem:not(.out)::after { display: none; }
.sys-lg-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border: 1px solid var(--hairline-light); border-radius: var(--r-lg); background: var(--surface-card); }
.sys-lg-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.sys-lg-head h3 { margin: 0; font: 500 18px/1.3 var(--font-display); }
.sys-lg-text { margin: 0 0 4px; font-size: 14px; color: var(--mute); }
/* Tussenkop in een kolom (Outbound: doorlopend, op een signaal, een paar keer per jaar); tussen twee groepen wat meer lucht */
.sys-stack-sub { margin-top: 16px; }
.sys-stack-sub:first-child { margin-top: 0; }

/* Sales en pipeline: grijs blok, afspraken als kaarten, rechts de trechter */
.sys-sales { container: sys-sales / inline-size; background: var(--surface-soft); }
.sys-sales-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.sys-sales-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; align-items: start; margin-top: 24px; }
@container sys-sales (min-width: 600px) { .sys-sales-grid { grid-template-columns: minmax(0, 1fr) 264px; } .sys-sales-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sys-sales .sys-card > .sys-face { min-height: 104px; }
.sys-funnel { margin: 0; padding: 16px; border: 1px solid var(--hairline-light); border-radius: var(--r-lg); background: var(--surface-card); }
.sys-funnel figcaption { margin-bottom: 8px; }
.sys-funnel svg { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto; }
.sys-funnel .lvl { fill: var(--surface-soft); stroke: var(--hairline-light); stroke-width: 1; }
.sys-funnel .lvl.last { fill: var(--tint-cobalt); stroke: var(--primary); stroke-width: 2; }
.sys-funnel text { fill: var(--ink); font: 500 13px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; text-anchor: middle; }
.sys-funnel-win { margin: 12px 0 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--charcoal); }
.sys-funnel-note { margin: 8px 0 0; font-size: 14px; color: var(--mute); text-align: center; }
.sys-funnel-empty { margin: 0; text-align: left; }
.sys-sales-facts .sys-ov-sub { border: 1px solid var(--hairline-light); background: var(--surface-card); }
.sys-late { margin: 0; font-size: 14px; color: var(--charcoal); }
.sys-late a { font-weight: 600; color: var(--ink); }

/* Meten en bijsturen: gestippelde rand */
.sys-tune { border: 1.5px dashed var(--stone); background: rgba(255, 255, 255, .7); }
.sys-tune .sys-cards { margin-top: 24px; }

/* Rekenmodel: groeilijn, tabel en formulieren */
.sys-model-block .sys-chart { margin: 24px 0 0; }
.sys-chart svg { display: block; width: 100%; height: auto; }
.sys-chart .grid { stroke: var(--hairline-light); stroke-width: 1; }
.sys-chart .area { fill: var(--tint-cobalt); }
.sys-chart .line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sys-chart .base { stroke: var(--stone); stroke-width: 1.5; stroke-dasharray: 5 5; }
.sys-chart .mark { stroke: var(--stone); stroke-width: 1; stroke-dasharray: 2 3; }
.sys-chart .dot { fill: var(--surface-card); stroke: var(--primary); stroke-width: 2.5; }
.sys-chart text { font: 500 13px/1 var(--font-body); fill: var(--mute); }
.sys-chart text.note { fill: var(--ink); }
.sys-table { margin-top: 16px; }
.sys-block .data th:first-child, .sys-block .data td:first-child { padding-left: 0; }
.sys-block .data th:last-child, .sys-block .data td:last-child { padding-right: 0; }
.sys-crm { margin-top: 24px; }
.sys-crm .meta { display: inline; margin: 0; }
.sys-fold { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--hairline-light); }
.sys-fold > summary { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; max-width: 100%; font-size: 15px; font-weight: 600; color: var(--charcoal); list-style: none; }
.sys-fold > summary:hover, .sys-fold[open] > summary { color: var(--ink); }
.sys-model { display: grid; gap: 24px; margin-top: 16px; }
.sys-model fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: end; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.sys-model legend { margin-bottom: 8px; padding: 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* Overzicht van systemen: kaarten op het ruitjespapier, een nieuw systeem gestippeld */
.sys-systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.sys-system { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 24px; border: 1px solid var(--hairline-light); border-radius: var(--r-xl); background: var(--surface-card); color: var(--ink); text-decoration: none; transition: border-color .18s var(--ease); }
a.sys-system:hover { border-color: var(--hairline-strong); }
.sys-system-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sys-system:not(.own) .sys-pill { background: var(--tint-teal); color: var(--sys-teal-ink); }
.sys-system-name { margin: 0; font: 500 20px/1.25 var(--font-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.sys-system-note { margin: 0; font-size: 15px; color: var(--mute); }
.sys-system-phase { font-size: 15px; color: var(--charcoal); }
.sys-system-phase strong { font-weight: 600; color: var(--ink); }
.sys-system-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }
.sys-system-foot .plan-meter { display: block; margin: 0; }
.sys-system.new { border: 1.5px dashed var(--stone); background: rgba(255, 255, 255, .7); }
.sys-num.ghost { border: 1.5px dashed var(--stone); background: transparent; color: var(--mute); font-size: 18px; }
.sys-new-form { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.sys-new-form input, .sys-new-form select { width: 100%; height: 44px; border-radius: var(--r-full); }
.sys-new-form .btn { justify-self: start; }

/* iPhone */
@media (max-width: 760px) {
  .sys-page { --sys-pad: 16px; }
  .sys-canvas { margin: 0 calc(-1 * var(--gutter)); border-width: 1px 0; border-radius: 0; }
  .sys-rail { border-radius: 0; }
  .sys-next-wrap { width: 100%; max-width: none; align-items: stretch; }
  .btn.sys-next { width: 100%; justify-content: flex-start; }
  .sys-next-arrow { margin-left: auto; }
  .sys-next-fact { display: none; } /* staat ook in het paneel van het onderdeel, één tik verder */
  .sys-stepper { gap: 8px 16px; }
  .sys-stepper li + li::before { display: none; } /* geen streepje vooraan een nieuwe regel */
  .sys-block { padding: 16px; }
  .sys-build-fold > summary { top: 12px; right: 12px; }
  .sys-zone { padding: 0 8px; }
  .sys-zone-label { left: 40px; }
  /* de lijn loopt links, zodat de labels ruimte hebben */
  .sys-link { justify-self: start; margin-left: 24px; }
  .sys-stem { margin: 0 0 0 15px; } /* 24px in de lijn met de rest: min de 8px binnenrand en de 1px rand van de zone */
  .sys-link-label { width: max-content; max-width: calc(100vw - 88px); white-space: normal; }
  .sys-band { padding: 24px 16px; }
  .sys-band-card { padding: 16px; }
  .sys-zone-top .sys-head { padding: 0 0 16px; }
  /* Kaarten als rijen: pictogram links, titel en ritme ernaast; geen woorden die over drie regels breken */
  .sys-cards, .sys-cards.two, .sys-cards.four { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sys-card > .sys-face, .sys-sales .sys-card > .sys-face { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; gap: 4px 12px; min-height: 0; padding: 12px 16px; }
  .sys-card-icon { grid-row: span 2; }
  .sys-card-title { hyphens: manual; }
  .sys-late a { display: inline-flex; align-items: center; min-height: 40px; }
  .sys-fact a { padding: 12px 0; } /* onzichtbaar groter tikvlak; de regel blijft even hoog */
  .sys-ov-edit, .sys-ov-link { display: inline-flex; align-items: center; min-height: 40px; }
  .sys-model fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-systems { gap: 16px; }
  .sys-system { padding: 16px; }
  /* Groeilijn: minder maandlabels, grotere tekst (viewBox 720 breed op ±320px) */
  .sys-chart { padding-top: 8px; }
  .sys-chart .scroll-x { overflow: visible; padding-top: 24px; } /* de labels bovenaan niet afknippen */
  .sys-chart svg { overflow: visible; }
  .sys-chart text { font-size: 24px; }
  .sys-chart text.month.minor { display: none; }
  .sys-chart text.month.first { text-anchor: start; } /* niet tegen de 0 van de as */
  .sys-chart text.month.last { text-anchor: end; }
  /* Tabel van het rekenmodel: per stand een blok met label en waarde, niets valt buiten beeld */
  .sys-table { overflow: visible; }
  .sys-table table, .sys-table tbody, .sys-table tr, .sys-table td { display: block; }
  .sys-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sys-table tr { padding: 12px 0; border-top: 1px solid var(--hairline-light); }
  .sys-table tr:first-child { padding-top: 0; border-top: 0; }
  .sys-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border: 0; }
  .sys-table td:first-child { font-weight: 600; }
  .sys-table td[data-label]::before { content: attr(data-label); color: var(--mute); text-align: left; }
  .sys-table tbody tr:hover td { background: none; }
}
.sys-chart-events { display: none; }
@media (max-width: 480px) {
  .sys-chart text { font-size: 32px; }
  .sys-chart text.month { transform: translateY(6px); }
  /* namen van campagnes botsen hier met "quick wins": het lijntje blijft, de naam staat onder de grafiek */
  .sys-chart text.event { display: none; }
  .sys-chart-events { display: inline; }
}

/* ---------- Tikvlakken op de iPhone (minstens 40px) en de burn-up ---------- */
@media (max-width: 760px) {
  .work-links a, .quiet-projects .list-rows a, .capacity-form .actions a.link { display: inline-flex; align-items: center; min-height: 40px; }
  .capacity-form .check-field label, .project-settings .check-field label { min-height: 40px; }
  .project-card .project-now { display: none; } /* staat op de projectpagina; zo komt de servicedesk eerder in beeld */
  .burnup-tile .plan-line :is(.pl-grid-label, .pl-label) { font-size: 20px; }
  .burnup-tile .pl-label:is(.minor, .near) { display: none; }
}
@media (max-width: 480px) {
  .burnup-tile .plan-line :is(.pl-grid-label, .pl-label) { font-size: 28px; }
  .burnup-tile .pl-label { transform: translateY(4px); }
}


/* ---------- Uren (time_tracker.html): timer op een Jira-ticket, boeken naar Moneybird en Jira ---------- */
.time-page .time-running { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; border-color: var(--accent-teal); }
.time-page .time-running > div { flex: 1 1 280px; min-width: 0; }
.time-page .time-running form { margin: 0; }
.time-clock { margin: 0; font: 500 32px/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.time-issue { margin: 8px 0 0; font-size: 15px; color: var(--charcoal); }
.time-key { font: 600 14px/1.4 var(--font-mono); color: var(--primary); }
.time-start-form { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.time-start-form input[name="description"] { flex: 3 1 280px; min-width: 0; height: 48px; font-size: 16px; }
.time-start-form input[name="issue_key"] { flex: 1 1 160px; min-width: 0; height: 48px; font-family: var(--font-mono); text-transform: uppercase; }
.time-start-form .btn { height: 48px; }
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.time-chip { display: inline-flex; align-items: center; border: 1px solid var(--hairline-light); border-radius: var(--r-full); background: var(--surface-card); }
.time-chip form { margin: 0; display: flex; }
.time-chip-start { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px 0 16px; border: 0; background: none; color: var(--ink); font: 500 15px/1.2 var(--font-body); cursor: pointer; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-chip-star { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--stone); cursor: pointer; }
.time-chip-star .icon-inline { margin: 0; }
.time-chip-star[aria-pressed="true"] { color: var(--accent-warn); }
.time-chip-star[aria-pressed="true"] svg { fill: currentColor; }
.time-chip:hover { border-color: var(--ink); }
.time-days { display: grid; gap: 16px; margin-top: 24px; }
.time-days > .panel-head { margin: 0; }
.time-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.time-day-head h3 { margin: 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.time-total { font-size: 16px; font-weight: 600; }
/* Tijdas: halve uren en de blokken van de dag */
.time-axis { position: relative; height: 64px; margin: 12px 0 8px; border-bottom: 1px solid var(--hairline-light); }
.time-tick { position: absolute; top: 0; height: 100%; padding-left: 4px; border-left: 1px solid var(--hairline-light); font-size: 13px; color: var(--mute); }
.time-block { position: absolute; bottom: 8px; height: 28px; padding: 0 8px; overflow: hidden; border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); background: var(--surface-soft);
  font: 500 13px/26px var(--font-body); color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.time-block.is-running { border-color: var(--accent-teal); background: var(--tint-teal); }
.time-block.is-done { border-color: var(--hairline-light); color: var(--mute); }
.time-rows { list-style: none; margin: 0; padding: 0; }
.time-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--hairline-light); }
.time-row:first-child { border-top: 0; }
.time-row.is-running { border-left: 0; }
.time-row.is-done .time-what strong { color: var(--charcoal); }
.time-pick { display: grid; place-items: center; width: 32px; min-height: 40px; }
.time-pick input { width: 18px; height: 18px; }
.time-what { min-width: 0; display: grid; gap: 4px; }
.time-what strong { font-weight: 600; overflow-wrap: break-word; }
.time-error { color: var(--accent-danger); }
.time-when { font-size: 15px; color: var(--charcoal); white-space: nowrap; }
.time-length { display: grid; justify-items: end; font-size: 16px; font-weight: 600; white-space: nowrap; }
.time-length .meta { font-weight: 400; }
.time-actions { display: flex; align-items: center; gap: 12px; }
.time-actions form { margin: 0; }
.time-actions { flex-wrap: wrap; }
.time-client-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.time-client-form select { font-size: 15px; min-height: 40px; max-width: 260px; }
.time-edit { grid-column: 2 / -1; }
.time-edit > summary { font-size: 14px; color: var(--mute); }
.time-edit-form { margin-top: 12px; }
@media (max-width: 760px) {
  .time-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .time-when, .time-status { grid-column: 2; }
  .time-length { grid-column: 3; grid-row: 1; }
  .time-actions { grid-column: 2 / -1; }
  .time-client-form, .time-client-form select { width: 100%; max-width: none; }
  .time-clock { font-size: 24px; }
  .time-page .time-running form, .time-page .time-running .btn { width: 100%; }
}

/* ---------- Uren nakijken (time_day.html): het concept van een dag, en de koppelingen ---------- */
/* inkt-mengsels voor statustekst (The Ink Mix Rule), dezelfde als in Systeem */
.time-page { --sys-teal-ink: color-mix(in srgb, var(--accent-teal) 60%, var(--ink)); --sys-warn-ink: color-mix(in srgb, var(--accent-warn) 55%, var(--ink));
  --sys-bad-ink: color-mix(in srgb, var(--accent-danger) 75%, var(--ink)); }
.rv-sum { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px 32px; align-items: start; }
.rv-sum-main .eyebrow { margin-bottom: 8px; }
.rv-sum-title { margin: 0; font: 500 24px/1.25 var(--font-display); letter-spacing: -.02em; }
.rv-meter { height: 6px; margin-top: 12px; border-radius: var(--r-full); background: var(--surface-soft); overflow: hidden; }
.rv-meter span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--primary); }
.rv-sum-note { margin: 12px 0 0; font-size: 15px; color: var(--charcoal); }
.rv-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rv-facts div { display: grid; gap: 4px; }
.rv-facts dt { font-size: 14px; color: var(--mute); }
.rv-facts dd { margin: 0; font: 500 24px/1.1 var(--font-display); letter-spacing: -.02em; }
.rv-clients { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.rv-clients li { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: var(--r-full); background: var(--surface-soft); font-size: 15px; }
.rv-clients li .num { font-weight: 600; }
.rv-overlap { align-items: flex-start; }
.rv-overlap::before { background: var(--accent-warn); margin-top: 7px; }
.rv-overlap ul { margin: 6px 0; padding-left: 20px; font-size: 15px; }
.rv-book { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 16px; border-color: var(--hairline-strong); }
.rv-book > div { flex: 1 1 320px; min-width: 0; }
.rv-book h2 { margin: 0 0 4px; }
.rv-book form { margin: 0; }
.rv-line { margin-top: 16px; }
.rv-axis { margin-top: 0; }
.rv-bar { text-decoration: none; }
.rv-bar:hover { border-color: var(--ink); }
.rv-bar[data-state="geboekt"] { border-color: var(--hairline-light); background: var(--tint-teal); color: var(--sys-teal-ink); }
.rv-bar[data-state="kies_klant"] { border-color: var(--accent-danger); background: var(--surface-card); color: var(--sys-bad-ink); }
.rv-bar[data-state="gat"] { border: 1px dashed var(--accent-warn); background: var(--tint-warm); color: var(--sys-warn-ink); }
.rv-blocks { list-style: none; margin: 0; padding: 0; }
.rv-block { padding: 16px 0; border-top: 1px solid var(--hairline-light); scroll-margin-top: 72px; }
.rv-block:first-child { border-top: 0; }
.rv-block-head { display: grid; grid-template-columns: 112px 56px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; }
.rv-when { font-size: 15px; color: var(--charcoal); white-space: nowrap; }
.rv-length { font-size: 16px; font-weight: 600; white-space: nowrap; }
.rv-what { display: grid; gap: 4px; min-width: 0; }
.rv-what strong { font-weight: 600; overflow-wrap: anywhere; }
.rv-what .meta { overflow-wrap: anywhere; }
.rv-state { white-space: nowrap; }
.state[data-state="gap"]::before { background: transparent; border: 1px dashed var(--accent-warn); }
.rv-block[data-state="gat"] .rv-what strong { color: var(--sys-warn-ink); }
.rv-block[data-state="geboekt"] .rv-what strong { color: var(--charcoal); }
.rv-quick, .rv-split { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0 184px; }
.rv-quick select { min-height: 40px; font-size: 15px; max-width: 320px; }
.rv-quick input[type="text"] { flex: 1 1 200px; min-height: 40px; max-width: 360px; font-size: 15px; }
.rv-quick .btn, .rv-split .btn { flex: none; }
.rv-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--charcoal); }
.rv-remember input { width: 18px; height: 18px; }
.rv-split { margin-left: 0; }
.rv-split label { font-size: 14px; font-weight: 600; }
.rv-split input { min-height: 40px; width: 128px; }
.rv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 12px 0 0 184px; font-size: 15px; }
.rv-actions form { margin: 0; }
.rv-more { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 0 184px; }
.rv-more > details { min-width: 0; }
.rv-more > details[open] { flex: 1 1 100%; }
.rv-more .rv-actions { margin-left: 0; }
.rv-edit > summary, .rv-events > summary { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; color: var(--mute); cursor: pointer; }
.rv-edit-form { margin-top: 8px; max-width: 880px; }
.rv-events ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.rv-events li { overflow-wrap: anywhere; }
.rv-source { font-weight: 600; }
.rv-manual { margin: 8px 0 0 184px; }
.rv-add { margin-top: 16px; }
.rv-add-sum { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; cursor: pointer; }
.map-rows { list-style: none; margin: 12px 0 0; padding: 0; }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--hairline-light); }
.map-row:first-child { border-top: 0; }
.map-what, .map-who { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.map-what strong { font-weight: 600; }
@media (max-width: 760px) {
  .rv-sum { grid-template-columns: 1fr; }
  .rv-sum-title { font-size: 20px; }
  .rv-facts dd { font-size: 20px; }
  .rv-book .btn, .rv-book form { width: 100%; }
  .rv-block-head { grid-template-columns: minmax(0, 1fr) auto; }
  .rv-when { grid-column: 1; grid-row: 1; }
  .rv-length { grid-column: 2; grid-row: 1; text-align: right; }
  .rv-what { grid-column: 1 / -1; }
  .rv-state { grid-column: 1 / -1; }
  .rv-quick, .rv-actions, .rv-more, .rv-manual { margin-left: 0; }
  .rv-quick select, .rv-quick input[type="text"] { flex: 1 1 100%; max-width: none; min-height: 44px; font-size: 16px; }
  .rv-quick .btn { flex: 1 1 40%; }
  .rv-quick .link { flex: 1 1 100%; text-align: left; min-height: 40px; }
  .rv-split input { min-height: 44px; font-size: 16px; }
  .map-row { grid-template-columns: minmax(0, 1fr) auto; }
  .map-who { grid-column: 1; }
  .map-row .btn { grid-column: 2; grid-row: 1 / span 2; }
}
/* Vaste taken (Werk · Vaste taken) en de knoppen Start / Gedaan / Overslaan, ook in Nu en Te doen */
.routine-list li { flex-wrap: wrap; }
.routine-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 320px; }
.routine-list .followup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.routine-list .followup-actions form { margin: 0; }
.routine-edit { flex: 1 1 100%; }
.routine-edit > summary { display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; }
.routine-form { margin-top: 8px; }
.routine-off > summary { cursor: pointer; }
.routine-done { display: inline-block; }
.routine-done > summary { display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; list-style: none; }
.routine-done > summary::-webkit-details-marker { display: none; }
.routine-done-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; }
.routine-done-form input[type="number"] { width: 5.5em; }

/* ---------- Werk · Live (time_live.html): de dag op één tijdlijn, rijen per bron, kleur per klant ---------- */
/* Klanttinten: vulling voor balken en blokken, rand en stip in de sterkere kleur (data, The Small Mark Rule) */
.lv { --lw: 212px; display: grid; gap: 16px; }
.lv > * { min-width: 0; }
.lv-c0 { --fill: var(--tint-cobalt); --edge: var(--primary); }
.lv-c1 { --fill: var(--tint-teal); --edge: var(--accent-teal); }
.lv-c2 { --fill: var(--tint-warm); --edge: var(--accent-warn); }
.lv-c3 { --fill: var(--surface-sunk); --edge: var(--charcoal); }
.lv-c4 { --fill: color-mix(in srgb, var(--primary) 22%, #fff); --edge: #212a72; }
.lv-c5 { --fill: color-mix(in srgb, var(--accent-teal) 24%, #fff); --edge: color-mix(in srgb, var(--accent-teal) 60%, var(--ink)); }
.lv-none { --fill: var(--surface-card); --edge: var(--stone); }
.lv-gat { --fill: var(--tint-warm); --edge: var(--accent-warn); }
.lv-pick { display: flex; align-items: center; gap: 8px; margin: 0; }
.lv-pick input { min-height: 36px; font-size: 15px; }

/* Nu-regel */
.lv-now { display: flex; align-items: baseline; gap: 12px; margin: 0; font-size: 18px; line-height: 1.4; }
.lv-now-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--stone); transform: translateY(-1px); }
.lv-now-dot.is-active { background: var(--accent-teal); animation: lv-alive 2.4s var(--ease) infinite; }
.lv-now-text { min-width: 0; overflow-wrap: anywhere; }
.lv-now-text strong { font-weight: 600; }
.lv-now-client { color: var(--charcoal); }
@keyframes lv-alive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-teal) 40%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* Dekking en per klant */
.lv-sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 32px; align-items: start; }
.lv-sum .eyebrow { margin: 0 0 8px; }
.lv-cover-title { margin: 0; font: 500 20px/1.3 var(--font-display); letter-spacing: -.01em; }
.lv-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lv-chips li { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: var(--r-full); background: var(--surface-soft); font-size: 15px; }
.lv-chips .num { font-weight: 600; }
.lv-swatch { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: var(--r-xs); background: var(--fill); border: 1.5px solid var(--edge); }
.lv-swatch.lv-none { border-style: dashed; }

/* Tijdlijn: scrolt opzij binnen zijn eigen kader, de rijnamen blijven links staan */
.lv-line { padding-bottom: 16px; }
.lv-frame { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 calc(var(--card-pad) * -1); padding: 0 var(--card-pad); scrollbar-width: thin; }
.lv-frame:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lv-grid { position: relative; min-width: calc(var(--lw) + var(--hours) * 60px); }
.lv-row { display: grid; grid-template-columns: var(--lw) minmax(0, 1fr); align-items: stretch; border-top: 1px solid var(--hairline-light); }
.lv-axis-row { border-top: 0; }
.lv-label { position: sticky; left: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 12px 0 0;
  background: var(--surface-card); font-size: 14px; font-weight: 600; color: var(--ink); }
.lv-label-note { font-size: 14px; font-weight: 400; color: var(--mute); }
/* de rijnaam plakt tegen de binnenrand; dit vlak dekt af wat eronder doorscrolt tot de rand van het paneel */
.lv-label { box-shadow: calc(var(--card-pad) * -1) 0 0 var(--surface-card); }
.lv-group-label { padding-top: 6px; padding-bottom: 6px; }
.lv-track { position: relative; height: 44px; }
.lv-axis { height: 28px; }
.lv-tick { position: absolute; bottom: 6px; padding-left: 4px; font: 500 13px/1 var(--font-mono); color: var(--mute); white-space: nowrap; }
.lv-hour { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--hairline-light); }
.lv-concept-row { border-top-color: var(--hairline-strong); }
.lv-grid[hidden] { display: none; }

/* Kop van de tijdlijn met de schakelaar Per klant · Per systeem */
.lv-line-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 8px; }
.lv-line-head .tile-title { margin: 0; }
.lv-views { margin: 0; flex-wrap: nowrap; }

/* Blokken die tegelijk lopen: elk een eigen baan in de rij (parallel werk telt voor beide klanten) */
.lv-stack { --bh: 36px; height: max(52px, calc(var(--lanes, 1) * (var(--bh) + 4px) + 12px)); }
.lv-stack.is-multi { --bh: 26px; }
.lv-stack .lv-item.is-block { top: 0; margin-top: 0; height: var(--bh); }
.lv-stack:not(.is-multi) .lv-item.is-block { top: 50%; margin-top: calc(var(--bh) / -2); }
.lv-stack.is-multi .lv-item.is-block { top: calc(8px + var(--lane, 0) * (var(--bh) + 4px)); }
.lv-stack.is-multi .lv-block-name { line-height: calc(var(--bh) - 2px); }
/* Kort taaklabel in het blok (Per klant): klein, mag over twee regels lopen; bij overlap één regel */
.lv-block-task { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: manual; font-size: 12px; line-height: 15px;
  color: color-mix(in srgb, var(--ink) 80%, transparent); }
.lv-item.is-block:has(.lv-block-task) { display: flex; align-items: center; padding: 0 6px; }
.lv-stack.is-multi .lv-block-task { -webkit-line-clamp: 1; }

/* Per klant: een groep per klant (inklapbaar), de groepsrij met de conceptblokken, daaronder dunne rijen per systeem */
.lv-group { border-top: 1px solid var(--hairline-strong); }
.lv-group > summary { list-style: none; cursor: pointer; border-top: 0; }
.lv-group > summary::-webkit-details-marker { display: none; }
.lv-group > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.lv-group-label { gap: 4px; padding-right: 12px; }
.lv-group-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; }
.lv-group-text { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; overflow-wrap: anywhere; }
.lv-group-meta { padding-left: 22px; font-size: 14px; font-weight: 400; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-group-meta .num { color: var(--ink); font-weight: 600; }
.lv-chev { flex: none; width: 8px; height: 8px; margin: 0 2px 0 1px; border-right: 1.5px solid var(--charcoal); border-bottom: 1.5px solid var(--charcoal);
  transform: rotate(-45deg); transition: transform .18s var(--ease); }
.lv-group[open] .lv-chev { transform: rotate(45deg) translate(-2px, -1px); }
.lv-group > summary:hover .lv-group-text { text-decoration: underline; text-underline-offset: 3px; }
.lv-sub .lv-track { height: 32px; }
.lv-sub .lv-label { padding-left: 22px; font-size: 14px; font-weight: 400; color: var(--charcoal); flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px;
  white-space: nowrap; overflow: hidden; }
.lv-sub .lv-label-note { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.lv-sub .lv-item.is-bar { height: 16px; margin-top: -8px; }
.lv-gap-row .lv-label { padding-left: 0; font-weight: 600; color: var(--ink); }
.lv-item.is-bar.lv-gat { border-style: dashed; background: repeating-linear-gradient(135deg, var(--tint-warm) 0 6px, var(--surface-card) 6px 12px); }
.lv-sub + .lv-sub, .lv-group > summary + .lv-sub { border-top-color: var(--hairline-light); }
.lv-cover-note { margin: 4px 0 0; font-size: 15px; color: var(--charcoal); }

/* Stippen, balken en blokken: een knop met een tikvlak van 40px, de vorm erin */
.lv-item { position: absolute; top: 50%; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); font: inherit; }
.lv-item.is-dot { width: 24px; height: 40px; margin: -20px 0 0 -12px; z-index: 1; }
.lv-item.is-dot::before { content: ""; position: absolute; left: 7px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--edge); }
.lv-item.is-dot.lv-none::before { background: var(--surface-card); border: 2px solid var(--stone); width: 6px; height: 6px; }
.lv-item.is-bar { height: 20px; margin-top: -10px; min-width: 6px; border: 1px solid var(--edge); border-radius: var(--r-xs); background: var(--fill); }
.lv-item.is-bar.lv-none { border-style: dashed; }
.lv-item.is-bar::after { content: ""; position: absolute; inset: -10px 0; }
.lv-item.is-block { height: 36px; margin-top: -18px; min-width: 6px; padding: 0 8px; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--fill);
  overflow: hidden; text-align: left; white-space: nowrap; }
.lv-item.is-block.lv-none { border-style: dashed; }
.lv-item.is-block.lv-gat { border-style: dashed; color: color-mix(in srgb, var(--accent-warn) 55%, var(--ink));
  background: repeating-linear-gradient(135deg, var(--tint-warm) 0 6px, var(--surface-card) 6px 12px); }
.lv-block-name { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500; line-height: 34px; }
.lv-item.is-running { border-right-style: dashed; }
.lv-item:hover, .lv-item.is-picked { z-index: 2; }
.lv-item.is-bar:hover, .lv-item.is-block:hover, .lv-item.is-picked.is-bar, .lv-item.is-picked.is-block { border-color: var(--ink); }
.lv-item.is-dot:hover::before, .lv-item.is-dot.is-picked::before { box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--ink); }
.lv-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Nu: een cobalt lijn over alle rijen */
.lv-nowline { position: absolute; top: 0; bottom: 0; left: calc(var(--lw) + (100% - var(--lw)) * var(--x) / 100); width: 0; border-left: 2px solid var(--primary); z-index: 2; pointer-events: none; }
.lv-nowline span { position: absolute; top: 4px; left: 4px; padding: 0 4px; border-radius: var(--r-xs); background: var(--surface-card); font: 600 13px/20px var(--font-mono); color: var(--primary); }

.lv-info { min-height: 24px; margin: 12px 0 0; font-size: 15px; color: var(--charcoal); overflow-wrap: anywhere; }

/* Zojuist binnen */
.lv-feed .tile-title { margin: 0 0 8px; }
.lv-feed-list { list-style: none; margin: 0; padding: 0; }
.lv-feed-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 220px); align-items: baseline; gap: 4px 16px; padding: 10px 8px; margin: 0 -8px;
  border-top: 1px solid var(--hairline-light); border-radius: var(--r-sm); font-size: 15px; }
.lv-feed-list li:first-child { border-top: 0; }
.lv-feed-time { color: var(--mute); }
.lv-feed-what { min-width: 0; overflow-wrap: anywhere; }
.lv-feed-source { font-weight: 600; }
.lv-feed-where { color: var(--mute); }
.lv-feed-client { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--charcoal); }
.lv-updated { margin: 0; font-size: 14px; }

/* Nieuw binnen: één keer zacht oplichten */
.lv-feed-list li.is-new { animation: lv-new 1.6s var(--ease) 1; }
.lv-item.is-dot.is-new::before { animation: lv-new-ring 1.6s var(--ease) 1; }
.lv-item.is-bar.is-new { animation: lv-new-ring 1.6s var(--ease) 1; }
@keyframes lv-new { 0% { background-color: var(--tint-cobalt); } 100% { background-color: transparent; } }
@keyframes lv-new-ring { 0% { box-shadow: 0 0 0 6px var(--tint-cobalt); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
  .lv-now-dot.is-active, .lv-feed-list li.is-new, .lv-item.is-new, .lv-item.is-dot.is-new::before { animation: none; }
}
@media (max-width: 760px) {
  .lv { --lw: 128px; }
  .lv-sub .lv-label { padding-left: 12px; }
  .lv-group-meta { padding-left: 22px; }
  .lv-views .tab { height: 40px; }
  .lv-now { font-size: 16px; }
  .lv-sum { grid-template-columns: 1fr; }
  .lv-cover-title { font-size: 18px; }
  .lv-frame { margin: 0 -16px; padding: 0 16px; }
  .lv-label { box-shadow: -16px 0 0 var(--surface-card); }
  .lv-feed-list li { grid-template-columns: 48px minmax(0, 1fr); }
  .lv-feed-client { grid-column: 2; }
  .lv-pick input { min-height: 44px; font-size: 16px; }
}

/* Compacte tijdlijn (Per klant): naam en uren op één regel, lage rijen */
.lv-track { height: 30px; }
.lv-group-label { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding-top: 0; padding-bottom: 0; }
.lv-group-name { flex: 0 1 auto; font-size: 14px; }
.lv-group-text { display: block; white-space: nowrap; text-overflow: ellipsis; }
.lv-group-meta { flex: none; padding-left: 0; font-size: 13px; }
.lv-group-row .lv-stack { --bh: 30px; height: max(36px, calc(var(--lanes, 1) * (var(--bh) + 3px) + 6px)); }
.lv-group-row .lv-stack.is-multi { --bh: 22px; }
.lv-group-row .lv-stack.is-multi .lv-item.is-block { top: calc(4px + var(--lane, 0) * (var(--bh) + 3px)); }
.lv-group-row .lv-block-task { line-height: 13px; }
.lv-sub .lv-track { height: 24px; }
.lv-sub .lv-label { font-size: 13px; }
.lv-sub .lv-label-note { font-size: 13px; }
.lv-sub .lv-item.is-bar { height: 12px; margin-top: -6px; }
.lv-item.is-dot { height: 24px; margin-top: -12px; }
.lv-item.is-dot::before { top: 7px; }
@media (max-width: 760px) {
  /* smalle kolom: uren onder de naam */
  .lv-group-label { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
  .lv-group-name { max-width: 100%; }
  .lv-group-meta { padding-left: 22px; }
}

/* Geldteller (Werk · Live) */
.lv-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 32px; align-items: start; }
.lv-money .eyebrow { margin: 0 0 4px; }
.lv-money-total { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-money-note { margin: 6px 0 0; font-size: 14px; color: var(--mute); }
.lv-money-side .lv-chips { margin: 0; }
@media (max-width: 760px) {
  .lv-money { grid-template-columns: 1fr; }
  .lv-money-total { font-size: 30px; }
}

/* Uurtarieven */
.rt-list { list-style: none; margin: 0 0 16px; padding: 0; }
.rt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--hairline-light); font-size: 15px; }
.rt-row:first-child { border-top: 0; }
.rt-input { display: inline-flex; align-items: center; gap: 8px; }
.rt-input input { width: 110px; font-size: 16px; text-align: right; }

/* Weekbalk voor een weekfactuur met vaste uren (MD) */
.lv-week { margin-top: 12px; }
.lv-week .lv-money-note { margin: 0 0 6px; color: var(--ink); }
.lv-week-over { color: var(--accent-warn); font-weight: 600; }
.rv-meter.is-over span { background: var(--accent-warn); }
.lv-week .rv-meter { margin-top: 0; }

/* Smal blok (korter dan drie kwartier): label op één regel met puntjes, woorden worden niet afgebroken */
.lv-item.is-block.is-narrow:has(.lv-block-task) { padding: 0 4px; }
.lv-item.is-block.is-narrow .lv-block-task { -webkit-line-clamp: 1; display: block; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
/* De tijd van nu tegen de rechterrand: label links van de lijn, zodat het niet wegvalt */
.lv-nowline.is-end span { left: auto; right: 4px; }

/* Groot scherm: de tijdlijn vult het browservenster, met bovenaan het bedrag tot nu en de weekuren */
.lv-wide-toggle { margin-left: auto; }
.lv-line-head .lv-views { margin-left: auto; }
.lv-line-head .lv-views + .lv-wide-toggle { margin-left: 0; }
.lv-wide-stats { display: none; }
.lv.is-wide .lv-line { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; overflow: auto; overscroll-behavior: contain;
  padding: 20px 24px 24px; background: var(--surface-card); }
.lv.is-wide .lv-wide-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 40px; margin: 4px 0 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--hairline-strong); }
.lv-wide-stat .eyebrow { margin: 0 0 4px; }
.lv-wide-stat .lv-money-note { margin: 6px 0 0; }
.lv-wide-stat .rv-meter { margin-top: 8px; max-width: 420px; }
.lv-wide-num { margin: 0; font-size: 44px; font-weight: 600; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-wide-of { font-size: 20px; font-weight: 400; color: var(--mute); }
.lv.is-wide .lv-frame { margin: 0 -24px; padding: 0 24px; }
.lv.is-wide .lv-label { box-shadow: -24px 0 0 var(--surface-card); }
html.lv-wide-open { overflow: hidden; }
@media (max-width: 760px) {
  .lv.is-wide .lv-line { padding: 16px; }
  .lv.is-wide .lv-frame { margin: 0 -16px; padding: 0 16px; }
  .lv.is-wide .lv-label { box-shadow: -16px 0 0 var(--surface-card); }
  .lv-wide-num { font-size: 34px; }
  .lv-wide-toggle { min-height: 44px; }
}

/* Per klant als planning (zoals Jira-epics): links klant en taken met tijd en duur, rechts per taak één balk */
.lv-plan { --lw: 420px; }
.lv-plan .lv-row { min-height: 34px; }
.lv-plan .lv-track { height: 34px; }
.lv-plan .lv-axis { height: 30px; }
.lv-plan-cols { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding-right: 16px;
  border-right: 1px solid var(--hairline-strong); }
.lv-plan-name { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-ticket { color: var(--mute); font-weight: 600; }
.lv-plan-time { flex: none; width: 92px; font-size: 13px; font-weight: 400; color: var(--charcoal); }
.lv-plan-dur { flex: none; width: 44px; text-align: right; font-size: 13px; }
.lv-plan-head .lv-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.lv-plan-head .lv-plan-time, .lv-plan-head .lv-plan-dur { font-size: 12px; font-weight: 600; color: var(--mute); }
.lv-epic { border-top: 1px solid var(--hairline-strong); }
.lv-epic > summary { list-style: none; cursor: pointer; }
.lv-epic > summary::-webkit-details-marker { display: none; }
.lv-epic-row { background: var(--surface-soft); }
.lv-epic-row .lv-label { background: var(--surface-soft); }
.lv-epic-row .lv-group-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lv-epic-row .lv-group-text { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-epic-row .lv-plan-dur { font-weight: 600; }
.lv-link { flex: none; display: flex; }
.lv-link-btn { height: 28px; padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: var(--r-full); background: var(--surface-card);
  font: 500 14px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.lv-link-btn:hover { border-color: var(--ink); }
.lv-picker-title { margin: 0; padding: 16px 20px 0; font-size: 15px; color: var(--mute); }
.lv-picker-title strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.lv-picker .spotlight-item { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.lv-picker .spotlight-results { display: block; }
.lv-plan-now { flex: none; padding: 0 6px; border-radius: var(--r-xs); background: var(--tint-teal); font-size: 12px; font-weight: 600; line-height: 18px; }
.lv-epic-bar { position: absolute; top: 50%; height: 12px; margin-top: -6px; border-radius: var(--r-xs); border: 1px solid var(--edge);
  background: repeating-linear-gradient(135deg, var(--edge) 0 6px, color-mix(in srgb, var(--edge) 55%, #fff) 6px 12px); opacity: .9; }
.lv-task-row { border-top: 1px solid var(--hairline-light); }
.lv-task-row .lv-label { font-size: 14px; font-weight: 400; }
.lv-task-name { padding-left: 34px; }
.lv-item.is-task { height: 16px; margin-top: -8px; min-width: 6px; border: 0; border-radius: var(--r-xs); background: var(--edge); }
.lv-item.is-task.is-meeting { background: var(--fill); border: 1.5px solid var(--edge); }
.lv-item.is-task.lv-none { background: var(--surface-card); border: 1.5px dashed var(--stone); }
.lv-item.is-task.is-running { background: repeating-linear-gradient(135deg, var(--edge) 0 6px, color-mix(in srgb, var(--edge) 60%, #fff) 6px 12px); }
.lv-item.is-task::after { content: ""; position: absolute; inset: -9px 0; }
.lv-item.is-task:hover, .lv-item.is-task.is-picked { box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--ink); }
.lv-task-row:hover .lv-label, .lv-task-row:hover { background: var(--surface-soft); }
.lv-plan .lv-gap-row .lv-label { padding-left: 0; }
@media (max-width: 760px) {
  .lv-plan { --lw: 200px; }
  .lv-plan-time { display: none; }
  .lv-task-name { padding-left: 16px; }
}
@media (max-width: 760px) {
  .lv-line-head .lv-views { order: 3; margin-left: 0; }
  .lv-epic-row .lv-label-note { display: none; }
  /* smal scherm: de keuzelijst op een eigen regel onder de naam */
  .lv-epic-row:has(.lv-link) .lv-plan-cols { flex-wrap: wrap; row-gap: 6px; padding-top: 6px; padding-bottom: 8px; }
  .lv-epic-row:has(.lv-link) .lv-track { height: auto; }
  .lv-epic-row .lv-plan-name { flex: 1 1 0; }
  .lv-link { order: 3; flex: 1 0 100%; padding-left: 26px; }
  .lv-link-btn { height: 36px; }
}

/* Werk · Live: Dag · Week · Maand en het overzicht per week of maand (time_live_period.html) */
.lv-period-switch { margin: 0; }
.lv-period-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.lv-period-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 32px; align-items: start; }
.lv-period .tile-title { margin: 0 0 12px; }
.lv-period-rows { list-style: none; margin: 0; padding: 0; }
.lv-period-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) 64px 96px; gap: 12px; align-items: center;
  min-height: 44px; border-top: 1px solid var(--hairline-light); font-size: 15px; }
.lv-period-row:first-child { border-top: 0; }
.lv-period-row.is-weekend, .lv-period-row.is-future { color: var(--charcoal); }
.lv-period-row.is-future .lv-period-bar { opacity: .4; }
.lv-period-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.lv-period-label a { color: var(--ink); }
.lv-period-sub { width: 100%; font-size: 14px; color: var(--charcoal); }
.lv-period-bar { display: flex; height: 16px; border-radius: var(--r-xs); background: var(--surface-sunk); overflow: hidden; }
.lv-period-bar > span { height: 100%; background: var(--edge); }
.lv-period-bar > span + span { border-left: 2px solid var(--canvas-light); }
.lv-period-hm, .lv-period-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-period-open { margin: 12px 0 0; }
@media (max-width: 760px) {
  .lv-period-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; padding: 8px 0; }
  .lv-period-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Factureren op week, maand en jaar (live_period._invoicing) */
.lv-invoicing-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.lv-invoicing-head .tile-title { margin: 0; }
.lv-invoicing-total { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; margin: 16px 0; }
.lv-invoicing-total > div { min-width: 0; }
.lv-invoicing-total dt { font-size: 13px; color: var(--charcoal); }
.lv-invoicing-total dd { margin: 0; font: 500 24px/1.2 var(--font-display); }
.lv-invoicing-total dd.lv-invoicing-amount { font: 400 14px/1.4 var(--font-ui); color: var(--charcoal); }
.lv-invoicing-total .is-open dd:not(.lv-invoicing-amount) { color: var(--ink); font-weight: 600; }
.lv-invoicing-table td .meta { display: block; }
@media (max-width: 760px) { .lv-invoicing-total { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Maandbudget (budget.py): op Vandaag in de teller, op Live in het maandoverzicht */
.budget { flex: 1 1 100%; margin-top: 12px; max-width: 560px; }
.budget p { margin: 0; font-size: 14px; color: var(--charcoal); }
.budget .budget-line { color: var(--ink); font-size: 15px; }
.budget-meter { position: relative; height: 8px; margin: 8px 0; border-radius: var(--r-full); background: var(--surface-soft); }
.budget-meter span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--primary); }
.budget[data-state="warn"] .budget-meter span { background: var(--accent-warn); }
.budget[data-state="bad"] .budget-meter span { background: var(--accent-danger); }
.budget-meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.budget-behind { color: var(--accent-danger); }
.budget[data-state="warn"] .budget-behind { color: var(--accent-warn); }
.budget-lines { margin: 16px 0 8px; display: grid; gap: 6px; }
.budget-lines div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.budget-lines dt { color: var(--charcoal); }
.budget-lines dd { margin: 0; color: var(--ink); }
.budget-lines .budget-total { padding-top: 6px; border-top: 1px solid var(--surface-soft); font-weight: 600; }
.budget-sub { color: var(--charcoal); font-size: 14px; font-weight: 400; }
.lv-budget .budget { margin-top: 0; }
.budget-costs { margin: 8px 0 12px; }
.budget-costs summary { cursor: pointer; font-size: 14px; color: var(--ink); padding: 6px 0; }
.budget-costs .budget-lines { margin-top: 8px; }
