/* ============================================================================
   Crystal Ocean — dark grayscale design system
   ========================================================================== */

:root {
  /* The height of the top bar, kept up to date by co.watchBar — the bar wraps to two rows
     on a studio with a dozen menu items, so this cannot be a fixed number. The value here
     is only the starting point for the first paint. */
  --bar-h: 70px;

  --bg: #0D0D0E;
  --panel: #141415;
  --panel-2: #1B1B1C;
  --panel-3: #212123;
  --border: #2A2A2D;
  --border-soft: #202023;
  --text: #E8E8ED;
  --text-dim: #9A9A9E;
  --text-faint: #5A5A5E;
  --white: #FFFFFF;
  --red: #E85A5A;
  --red-dim: #3A1E1F;
  --green: #7FD98C;
  --blue: #6FA8E8;
  --gold: #F0C34D;
  --purple: #B47FE8;

  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  --r-xs: 6px;

  /* The one colour a button, a link or a focus ring is drawn in. Dark keeps the pale
     ink it always had; light takes the blue from the Oifis mark. */
  --accent: #E8E8ED;
  --accent-text: #0D0D0E;
  --accent-hover: #FFFFFF;
  --accent-soft: #23232C;

  /* Vandaag in de agenda. In het donker niet het accent: dat is bijna wit, en een wit rondje met
     een wit cijfer erin was geen aanduiding maar een vlek. */
  --today: #6FA8E8;
  --today-ink: #0B1A2B;
  --today-soft: color-mix(in srgb, #6FA8E8 13%, #141415);
  --today-glow: 0 0 0 3px rgba(111, 168, 232, .22);

  /* Status colours come in threes — surface, edge, ink — because a red that reads on a dark
     panel is unreadable on a white one. */
  --danger-edge: #4E2628;
  --danger-ink: #F2A3A3;
  --ok-bg: #16301C;
  --ok-edge: #274B2E;
  --ok-ink: #A7E5B1;
  --warn-bg: #3A2E12;

  --border-strong: #3A3A3E;   /* hover and focus edges */
  --raised: #17171C;          /* today, and anything lifted off the panel */
  --raised-edge: #3A3A45;
  --sunken: #101011;          /* days outside the month */

  --focus-ring: rgba(232, 232, 237, .12);

  --scrim: rgba(5, 5, 6, .78);        /* behind a dialog */
  --bar: #0D0D0E;                     /* the top bar, opaque on purpose */
  --shadow: 0 18px 48px rgba(0, 0, 0, .55);
  --shadow-lift: 0 22px 54px rgba(0, 0, 0, .7);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Light. Same shapes, same spacing — only the surfaces and the accent change, which is why
   everything below this point reads from variables rather than naming a colour.

   The ground is a cool grey rather than white, and panels sit on it with a soft shadow
   instead of a hard line: a page of white boxes outlined in grey reads as a spreadsheet.
   Every surface carries a trace of the accent's hue so the blue looks like it belongs. */
:root[data-theme="light"] {
  /* A breath of the accent rather than a neutral grey: with a customer's own colour in the
     bar, a cool grey underneath reads as two designs stacked. Lazy evaluation means this
     follows whatever accent the organisation set. */
  --bg: color-mix(in srgb, var(--accent) 7%, #F4F7FA);
  --panel: #FFFFFF;
  --panel-2: color-mix(in srgb, var(--accent) 5%, #F6F8FB);
  --panel-3: color-mix(in srgb, var(--accent) 11%, #EDF1F6);
  --border: #DCE4ED;
  --border-soft: #EAF0F6;
  --text: #12202C;
  --text-dim: #52657A;
  --text-faint: #8496A8;
  --white: #FFFFFF;

  --red: #C4453F;
  --red-dim: #FBE9E8;
  --green: #2F8A45;
  --blue: #457BA2;
  --gold: #A9781A;
  --purple: #7A4FB0;

  --accent: #457BA2;          /* the square behind the Oifis mark */
  --accent-text: #FFFFFF;
  --accent-hover: #37678A;
  --accent-soft: #DCEAF5;     /* the circle, washed out */

  --today: var(--accent);
  --today-ink: #fff;
  --today-soft: var(--accent-soft);
  --today-glow: none;

  --danger-edge: #F0C4C1;
  --danger-ink: #A8322C;
  --ok-bg: #E3F4E7;
  --ok-edge: #BEE2C6;
  --ok-ink: #226B33;
  --warn-bg: #FBF0D8;

  --border-strong: #B4C4D4;
  --raised: #E3EEF8;          /* today, and anything the accent is hinting at */
  --raised-edge: #B9CFE3;
  --sunken: #E4E9EF;

  --scrim: rgba(16, 30, 43, .38);
  --bar: #FFFFFF;
  --shadow: 0 18px 48px rgba(18, 32, 44, .14);
  --shadow-lift: 0 20px 44px rgba(18, 32, 44, .20);

  /* Only light lifts its panels; on dark the border already separates them. */
  --panel-shadow: 0 1px 2px rgba(18, 32, 44, .05), 0 4px 16px rgba(18, 32, 44, .05);
  --panel-shadow-hover: 0 2px 4px rgba(18, 32, 44, .07), 0 8px 24px rgba(18, 32, 44, .08);

  --focus-ring: rgba(69, 123, 162, .18);

  /* The current tab is the accent rather than another grey box. */
  --tab-active-bg: var(--accent-soft);
  --tab-active-ink: #2C5875;
  --tab-active-edge: #BBD6EA;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Een adres dat in vrije tekst is herkend (zie LinkedText) — de enige plek waar een link
   zichzelf als link moet aankondigen, want overal elders is de rij of de knop eromheen al
   de klikbare vorm. Blauw, omdat dat de enige kleur is die iedereen als link leest. */
.autolink { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.autolink:hover { text-decoration-thickness: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Layout ───────────────────────────────────────────────────────────────── */

/* ── Release notes ────────────────────────────────────────────────────────────
   Sentences rather than fragments, so they get the line height of prose and a hanging
   bullet instead of the tight rows a table would give them. */
.release-notes {
  margin: 4px 0 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 7px;
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
}
.release-notes li { padding-left: 2px; }

/* ── A public holiday, and somebody away ──────────────────────────────────────
   The holiday tints the whole cell, because it is what the day is rather than something
   booked on it. Leave is an item like any other, with a leaf so it reads apart from a
   meeting at a glance. */
.cal-cell.holiday, .week-head.holiday { background: var(--warn-bg); }
.cal-holiday {
  font-size: 10px; font-weight: 600; letter-spacing: .01em;
  color: var(--gold); margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-item.cal-away { font-style: italic; }

/* Verlof dat nog op een beslissing wacht: wel te zien, maar zichtbaar nog niet zeker. */
.cal-item.cal-pending { opacity: .6; outline: 1px dashed currentColor; outline-offset: -1px; }

/* ── Driving somebody else's account ──────────────────────────────────────────
   Loud on purpose, and in the purple the super organisation is marked in everywhere else.
   It sits above the bar rather than inside it because it must not read as a part of the
   customer's own tool, and because it is the only way back out while it shows. */
.acting-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: var(--purple); color: #FFFFFF;
  font-size: 13px; line-height: 1.3;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.acting-eye { font-size: 15px; flex-shrink: 0; }
.acting-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
/* Legible on the purple rather than the page's muted grey, which would vanish into it. */
.acting-text .acting-sub { opacity: .82; font-size: 12px; }
.acting-bar form { margin-left: auto; flex-shrink: 0; }
.acting-stop {
  background: rgba(255, 255, 255, .16); color: #FFFFFF;
  border-color: rgba(255, 255, 255, .38);
}
.acting-stop:hover { background: rgba(255, 255, 255, .28); color: #FFFFFF; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Page and panel side by side. Pinned the panel is a column of its own, so nothing on the
   page ends up underneath it; unpinned it floats and the page keeps the full width. */
.shell-body { display: flex; flex: 1; min-height: 0; align-items: flex-start; }
.shell-body > .content { flex: 1; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bar);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Light carries the accent in the bar itself. On dark the bar is already the darkest thing
   on screen and colouring it would only mute the accent everywhere else; on light a white
   bar on a near-white page has nothing to separate it but a hairline, and the accent both
   anchors the page and puts the organisation's own colour where it is seen first.

   Everything inside reads from --bar-ink, so a customer's accent decides the ink too — pale
   text on a dark blue, dark text on a pale one. */
:root[data-theme="light"] .topbar {
  background: var(--accent);
  border-bottom-color: transparent;
  --bar-ink: var(--accent-text);
}
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .topbar .brand-name,
:root[data-theme="light"] .topbar .who-name,
:root[data-theme="light"] .topbar .tab { color: var(--bar-ink); }

:root[data-theme="light"] .topbar .brand-sub { color: var(--bar-ink); opacity: .62; }
:root[data-theme="light"] .topbar .tab { opacity: .78; }
:root[data-theme="light"] .topbar .tab:hover {
  background: rgb(255 255 255 / .16); opacity: 1; color: var(--bar-ink);
}
/* The current tab is a solid panel against the accent — the same shape as on dark, inverted. */
:root[data-theme="light"] .topbar .tab.active {
  background: var(--panel); color: var(--accent);
  border-color: transparent; opacity: 1;
}

:root[data-theme="light"] .topbar .btn,
:root[data-theme="light"] .topbar .select {
  background: rgb(255 255 255 / .14); color: var(--bar-ink);
  border-color: rgb(255 255 255 / .24);
}
/* The closed select sits on the accent-coloured bar, so its text is light. The list the
   browser opens is drawn on its own pale background and inherits that light text — white
   on white. So the options say what colour they are, in both themes. */
.topbar .select option { background: var(--panel); color: var(--text); }
:root[data-theme="light"] .topbar .btn:hover { background: rgb(255 255 255 / .24); }
:root[data-theme="light"] .topbar .btn-icon.on { background: var(--panel); color: var(--accent); }

.brand { display: flex; align-items: center; gap: 9px; margin-right: 4px; }
.brand-logo { height: 40px; width: auto; max-width: 168px; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 9px; color: var(--text-faint); letter-spacing: .16em; text-transform: uppercase; }

/* De offerte zoals de klant hem ziet. Geen balk, geen menu: hij komt uit een mailtje en heeft
   hier één ding te doen. Breder dan het toestemmingsscherm, want er staat een tabel op. */

.sign-page { min-height: 100vh; padding: 32px 20px 64px; background: var(--page); }

.sign {
  max-width: 760px; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .10);
}

.sign h1 { font-size: 22px; margin: 2px 0 4px; }
.sign-h2 { font-size: 16px; margin: 26px 0 2px; }
.sign-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.sign-head > div:first-child { flex: 1; }

.sign-totals { margin: 14px 0 8px; display: grid; gap: 4px; justify-content: end; }
.sign-totals > div { display: grid; grid-template-columns: 1fr auto; gap: 28px; font-size: 14px; }
.sign-totals > div > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sign-totals .sum {
  border-top: 1px solid var(--text); margin-top: 4px; padding-top: 5px; font-weight: 700;
}

/* Het tekenvak. Een vaste verhouding zodat een krabbel op een telefoon en op een scherm even
   hoog uitvalt, en crosshair als aanwijzer omdat een tekstcursor hier niets te zoeken heeft. */
.pad-wrap { position: relative; }

.pad {
  width: 100%; aspect-ratio: 900 / 260; display: block; touch-action: none; cursor: crosshair;
  background: var(--panel-2); border: 1px dashed var(--border); border-radius: 10px;
}

.pad-clear { position: absolute; top: 8px; right: 8px; }

/* Het toestemmingsscherm. Eén kaart in het midden en verder niets: dit is een moment waarop
   iemand iets weggeeft, en dan hoort er niets anders op het scherm te staan om op te klikken. */

.consent-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; background: var(--page);
}

.consent {
  width: 100%; max-width: 480px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.consent h1 { font-size: 21px; margin: 4px 0 10px; line-height: 1.35; }

.consent-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }

.consent-list li {
  display: grid; gap: 2px; padding: 12px 14px;
  background: var(--panel-2); border-radius: 10px;
}

/* ── Live time tracking, visible to the whole team ────────────────────────── */

.tracking-strip {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none; max-width: 22vw;
}
.tracking-strip::-webkit-scrollbar { display: none; }

.tracking-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px; white-space: nowrap;
  background: color-mix(in srgb, var(--who) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--who) 38%, transparent);
  color: var(--who); font-size: 11.5px; font-weight: 600;
}
.tracking-chip.mine {
  background: var(--red-dim);
  border-color: var(--danger-edge);
  box-shadow: 0 0 0 1px rgba(232, 90, 90, .35);
  padding-right: 4px;
}
.tracking-chip .mono { color: var(--text); font-weight: 500; }
.tracking-who { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

.tracking-stop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 2px; flex-shrink: 0;
  background: var(--red); color: var(--bg);
  border: none; border-radius: 50%; cursor: pointer;
  font-size: 8px; line-height: 1; padding: 0;
}
.tracking-stop:hover { background: var(--red); filter: brightness(1.12); }

/* Static, and that is the point. A never-ending animation keeps the compositor drawing
   at the screen's refresh rate for as long as the tab is open — measured at 60 frames a
   second against 3 when nothing moves, on a panel that is pinned open all day for
   everybody. The clock beside it already counts up, so the liveness was never in the dot.
   Pulsing on hover is the cheap version if it is missed: .tracking-row:hover .tracking-dot. */
.tracking-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--who);
  flex-shrink: 0;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Wraps rather than scrolls. It used to scroll with the scrollbar hidden, which meant a
   menu item that did not fit was simply not there as far as anyone could tell — no arrow,
   no bar, nothing. A second row is honest: every item stays reachable, and the bar grows
   by exactly as much as it has to. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 2px;
  min-width: 0;
}

.tab {
  padding: 7px 13px; border-radius: var(--r-sm);
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer; border: 1px solid transparent;
  background: none; transition: background .12s, color .12s;
}
.tab:hover { background: var(--panel); color: var(--text); }
.tab.active {
  background: var(--tab-active-bg, var(--panel-2));
  color: var(--tab-active-ink, var(--text));
  border-color: var(--tab-active-edge, var(--border));
  font-weight: 600;
}

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.org-picker { max-width: 200px; }
/* Unmistakable when someone from Oifis is looking at a customer's data. */
.org-picker.away { border-color: var(--gold); color: var(--gold); }

.who-name { font-size: 12px; color: var(--muted); max-width: 120px; overflow: hidden;
            text-overflow: ellipsis; white-space: nowrap; }
.logout-icon { margin-right: 4px; }

/* Your avatar as the button that opens your own menu: nothing but the circle, so it costs
   the bar the width of a circle. */
.who-toggle { display: flex; align-items: center; padding: 3px; border-radius: 50%; }

/* Two rows under your own name. The form inside carries the antiforgery token, which must
   not become a row of its own. */
.user-menu { min-width: 190px; }
.user-menu form { margin: 0; }
.user-menu .parts-item { width: 100%; font-size: 12.5px; }
.chat-menu { max-height: 60vh; overflow-y: auto; }
.chat-menu .parts-item { display: flex; align-items: center; gap: 8px; }

/* The 📅 on somebody who is in a meeting. It used to share .tracking-dot, a 7px circle meant
   for a plain dot, which squeezed the emoji off-centre. */
.meeting-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0; font-size: 12px; line-height: 1;
}

.user-menu-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 8px; margin-bottom: 3px;
  border-bottom: 1px solid var(--border-soft);
}
.user-menu-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.content { flex: 1; padding: 20px; max-width: 1680px; width: 100%; margin: 0 auto; }

.page-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.page-title { font-size: 19px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.page-head .spacer { flex: 1; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm);
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover:not(:disabled) { background: var(--panel-3); border-color: var(--border-strong); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-danger { background: var(--red-dim); border-color: var(--danger-edge); color: var(--danger-ink); }
.btn-danger:hover:not(:disabled) { background: var(--red-dim); filter: brightness(1.15); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }

.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: var(--r-xs); }
.btn-icon { padding: 6px 8px; }

/* Een prullenbak als los teken op 12px is een vlekje: te klein om te herkennen en te klein
   om te raken. Eigen maat, en rood zodra je erboven hangt, zodat je ziet wat de knop doet
   voor je hem indrukt. */
.btn-bin { font-size: 15px; line-height: 1; padding: 3px 8px; }
.btn-bin:hover:not(:disabled) { color: var(--danger-ink); }

/* ── Form controls ────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.label {
  font-size: 10.5px; font-weight: 600; color: var(--text-faint);
  letter-spacing: .1em; text-transform: uppercase;
}

.input, .textarea, .select {
  width: 100%; padding: 9px 11px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-xs); color: var(--text);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color .12s;
}
/* A ring rather than a one-pixel colour change: on a light surface the border alone is too
   quiet to show which field has the keyboard. */
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

.textarea { resize: vertical; min-height: 76px; line-height: 1.6; overflow: hidden; }

.select {
  appearance: none; cursor: pointer; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239A9A9E' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}

/* Een vinkje is hier ook een schakelaar.

   Als CSS en niet als markup: .switch heeft een extra <span> nodig voor het bolletje, en die
   in veertien schermen bijzetten is veertien kansen om er één te vergeten — en dan staat er
   ineens een kaal vakje tussen de schakelaars. Zo krijgt elk vinkje in de app het meteen, ook
   het volgende dat iemand schrijft.

   Het bolletje is een background-image en geen ::after, want een pseudo-element op een input
   is browserafhankelijk terrein; background-position is dat niet en laat zich netjes animeren.
   De maten zijn die van .switch.tight, zodat de twee naast elkaar niet uit elkaar te houden
   zijn. */
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checkbox input {
  appearance: none; -webkit-appearance: none;
  flex-shrink: 0; margin: 0; cursor: pointer;
  width: 32px; height: 18px; border-radius: 100px;
  background-color: var(--panel-3);
  border: 1px solid var(--border);
  background-image: radial-gradient(circle 6px, var(--text-faint) 99%, transparent 0);
  background-repeat: no-repeat;
  /* Zonder dit vult het gegenereerde verloop de hele knop en heeft background-position niets
     om te verschuiven — het bolletje bleef dan op zijn plek staan terwijl alleen de kleur van
     "uit" naar "aan" omsloeg, wat van dichtbij leest als een omgedraaide schakelaar. */
  background-size: 14px 14px;
  background-position: left 2px center;
  transition: background-color .15s, border-color .15s, background-position .15s;
}
.checkbox input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: radial-gradient(circle 6px, var(--accent-text) 99%, transparent 0);
  background-position: right 2px center;
}
.checkbox input:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); outline: none; }
.checkbox input:disabled { opacity: .5; cursor: default; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ── Panels & cards ───────────────────────────────────────────────────────── */

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  /* Depth comes from a border on dark, where a shadow would be invisible, and from a soft
     shadow on light, where a grid of bordered white boxes reads as a spreadsheet. */
  box-shadow: var(--panel-shadow, none);
}
.panel-title {
  font-size: 12px; font-weight: 650; color: var(--text-dim);
  margin: 0 0 12px; letter-spacing: .02em;
  display: flex; align-items: center; gap: 8px;
}
.panel-title .spacer { flex: 1; }

.empty {
  color: var(--text-faint); font-size: 13px; text-align: center;
  padding: 26px 14px; font-style: italic;
}

/* ── Pills & chips ────────────────────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap;
  background: var(--panel-3); color: var(--text-dim);
}
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn { background: var(--warn-bg); color: var(--gold); }
.pill-done { background: var(--panel-2); color: var(--text-faint); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
/* Whatever is switched on wears the accent — the tool's colour, not the ink colour. Using
   --text here is what made every active chip black on the light theme. */
.chip.on {
  background: var(--accent); color: var(--accent-text);
  border-color: var(--accent); font-weight: 600;
}
.chip.static { cursor: default; }
.chip.static:hover { border-color: var(--border); color: var(--text-dim); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Avatars ──────────────────────────────────────────────────────────────── */

.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--bg);
  border: 1px solid var(--border);
}
.avatar-sm { width: 20px; height: 20px; font-size: 8.5px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-xl { width: 76px; height: 76px; font-size: 26px; }

.avatar-stack { display: flex; }
.avatar-stack .avatar:not(:first-child) { margin-left: -7px; }

/* ── Board ────────────────────────────────────────────────────────────────── */

.board {
  display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr));
  gap: 12px; align-items: start;
  overflow-x: auto; padding-bottom: 10px;
}

/* Ingeklapte kolom: een smalle strook met de naam op zijn kant. Bedoeld voor de backlog, die
   altijd de langste lijst is en zo de kolommen waar het werk echt gebeurt van het scherm af
   drukt. Blijft een sleepdoelwit — de drop-handlers zitten op de kolom zelf. */
.board-col.folded { padding: 10px 5px; }
.board-col-folded {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: 100%; padding: 2px 0;
  background: none; border: none; cursor: pointer;
  font-family: inherit; color: var(--text-dim);
}
.board-col-folded:hover { color: var(--text); }
.board-col-folded .board-col-name { writing-mode: vertical-rl; }
.board-col-fold {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 11px; line-height: 1;
  padding: 2px 3px; border-radius: var(--r-xs);
  transition: background .12s, color .12s;
}
.board-col-fold:hover { background: var(--panel-2); color: var(--text); }

.board-col {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 11px; min-height: 130px;
  box-shadow: var(--panel-shadow, none);
  transition: border-color .14s, background .14s, box-shadow .14s;
}

/* While a card is in flight the target column opens up so it is easy to hit. */
.board-col.drag-over {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.board-col.drag-over .board-col-body { padding-bottom: 78px; }
.board-col.drag-over .drop-hint { display: flex; }

.board-col-body {
  transition: padding-bottom .14s ease;
}

/* Only the production board's mini-board: ongeveer twee taken hoog, dan zelf scrollen.
   Zonder dit rekte een kolom met tien taken de hele kolom uit, en duwde dat alle kolommen
   ernaast — en het board zelf — mee omlaag: het overzicht dat een bord juist moet geven
   ging dan verloren aan de eerste volle kolom. Het gewone /board blijft ongemoeid. */
.ops-board .board-col-body {
  max-height: 420px; overflow-y: auto; overflow-x: hidden;
  padding-right: 3px; margin-right: -3px;
}

.drop-hint {
  display: none; align-items: center; justify-content: center;
  height: 66px; margin-top: 6px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  color: var(--text-faint); font-size: 12px;
  background: rgba(255, 255, 255, .015);
}

.board-col-head {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 11px; padding: 0 3px;
}
.board-col-name { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.board-col-count {
  background: var(--panel-2); color: var(--text-faint);
  padding: 1px 7px; border-radius: 100px; font-size: 10.5px; font-weight: 600;
}
.board-col-add {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 16px; line-height: 1;
  padding: 2px 6px; border-radius: var(--r-xs);
  transition: background .12s, color .12s;
}
.board-col-add:hover { background: var(--panel-2); color: var(--text); }

.task {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-md); margin-bottom: 9px;
  cursor: grab; overflow: hidden;
  box-shadow: var(--panel-shadow, none);
  transition: border-color .12s, transform .08s, box-shadow .12s;
}
.task:hover {
  border-color: var(--border-strong);
  box-shadow: var(--panel-shadow-hover, none);
}
.task:active { cursor: grabbing; }
.task.dragging { opacity: .35; }

.task-drop-line { height: 2px; background: var(--text-dim); border-radius: 2px; margin: 6px 2px; }

.task-image { width: 100%; height: 92px; object-fit: cover; display: block; }
.task-image-placeholder { width: 100%; height: 62px; display: block; }

/* Feature requests: dezelfde taakkaart als op het bord, maar los van een kolom en met opzet
   groter — Boo wilde specifiek meer overzicht per kaart, niet de compacte maat die in een
   kolom naast tien andere moet passen. */
/* Twee naast elkaar in plaats van één lange kolom: een feature request is een korte kaart, en
   op een breed scherm ging de helft van de ruimte naast de lijst verloren. Onder de 900px
   terug naar één, want dan wordt een kaart met een afbeelding erop te smal om te lezen. */
.fr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 900px) {
  .fr-grid { grid-template-columns: 1fr; }
}

.fr-card { cursor: pointer; }

/* Een kaal fieldset: geen rand en geen ruimte, alleen om een heel formulier tegelijk alleen-lezen
   te zetten — zie de kaarteditor als een ander de taak bewerkt. */
fieldset.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain-fieldset:disabled { opacity: .72; }

/* Wie de taak nu bewerkt, op de kaart. */
.task-editing {
  display: inline-block; margin: -2px 0 7px; padding: 1px 7px; border-radius: 100px;
  background: var(--warn-bg); color: var(--gold); font-size: 10.5px; font-weight: 600;
}

/* Waarom een taak vastzit, op de kaart in Geblokkeerd. */
.task-blocked {
  margin: -2px 0 8px; padding: 5px 8px;
  border-radius: var(--r-xs); border-left: 3px solid var(--red);
  background: var(--red-dim); color: var(--danger-ink);
  font-size: 11.5px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* De prullenbak rechtsonder op een bord. Zolang er gesleept wordt staat hij klaar en gaat het
   deksel op een kier; erboven gaat het wijd open; wat erin valt laat hem even schudden. */
.bin-wrap {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.bin {
  position: relative; width: 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 50%;
  box-shadow: var(--shadow); cursor: pointer; color: var(--text-dim);
  transition: transform .18s ease, border-color .15s, background .15s, color .15s;
}
.bin:hover { color: var(--text); border-color: var(--border-strong); }
.bin svg { overflow: visible; }
/* Anders geeft het deksel zelf een dragleave en knippert de bak bij elke beweging. */
.bin > * { pointer-events: none; }
.bin-lid, .bin-body { fill: currentColor; }
.bin-body { opacity: .85; }
.bin-ribs line { stroke: var(--panel); stroke-width: 2.4; stroke-linecap: round; }
.bin-lid { transform-origin: 12px 15px; transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }

.bin.armed { transform: scale(1.12); color: var(--text); border-color: var(--border-strong); }
.bin.armed .bin-lid { transform: rotate(-14deg) translateY(-2px); }
.bin.over {
  transform: scale(1.32); color: var(--red);
  border-color: var(--red); background: var(--red-dim);
}
.bin.over .bin-lid { transform: rotate(-48deg) translate(-4px, -6px); }
.bin.gulp { animation: bin-gulp .55s ease; }
@keyframes bin-gulp {
  0% { transform: scale(1.3); }
  25% { transform: scale(.9) rotate(-8deg); }
  50% { transform: scale(1.05) rotate(7deg); }
  75% { transform: scale(.98) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
.bin-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 21px; height: 21px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 100px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
}
.bin-list {
  width: min(340px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
.bin-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 0; border-top: 1px solid var(--border-soft);
}
.bin-row-title {
  flex: 1; min-width: 0; text-align: left;
  background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; font-size: 13px; color: var(--text-dim);
}
.bin-row-title:hover { color: var(--text); }
.bin-row-name {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: line-through; text-decoration-color: var(--text-faint);
}
/* Waarom hij weg is, klein onder de titel: dat is wat je wilt weten voor je hem terugzet. */
.bin-row-why {
  display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-faint);
  white-space: normal; overflow-wrap: anywhere; text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .bin, .bin-lid { transition: none; }
  .bin.gulp { animation: none; }
}
/* De Intended Learning Outcomes onderaan de doelen: ingeklapt, met een pijltje dat meedraait. */
.ilo > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; }
.ilo > summary::-webkit-details-marker { display: none; }
.ilo-caret { display: inline-block; color: var(--text-faint); transition: transform .15s; }
.ilo[open] .ilo-caret { transform: rotate(90deg); }
.ilo[open] > summary { margin-bottom: 10px; }
.ilo-person { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.ilo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
@media (max-width: 820px) { .ilo-grid { grid-template-columns: 1fr; } }
.ilo-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--text-dim); }
.ilo-feedback { padding: 7px 9px; margin-bottom: 6px; border-radius: var(--r-sm); background: var(--panel-2); }
.ilo-action { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; }
.ilo-action-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ilo-action.done .ilo-action-text { text-decoration: line-through; color: var(--text-faint); }
.link-btn { background: none; border: none; padding: 0 0 0 6px; cursor: pointer; font: inherit; color: var(--text-faint); text-decoration: underline; }
.link-btn:hover { color: var(--text); }

/* Het vastzetvenster van de btw: wat je in het portaal intikt, vet; het exacte bedrag ernaast. */
.vat-form { width: 100%; }
.vat-form th { font-size: 10.5px; }
.vat-form td { vertical-align: baseline; }
.vat-form-whole { font-variant-numeric: tabular-nums; font-size: 14px; }
.vat-form-total td { border-top: 2px solid var(--border-strong); }

/* Een tabelrij die iets opent: de hand, en een lichte tint onder de muis. */
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--panel-2); }

/* De gantt-chart van een mijlpaal: links de features, rechts hun balk op een as van weken,
   met de mijlpaal en vandaag als lijn. Zie MilestoneGantt. */
.mgantt-grid { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; row-gap: 4px; }
.mgantt-label { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 4px 8px 4px 0; cursor: pointer; min-width: 0; }
.mgantt-label .dot { display: none; }
.mgantt-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgantt-track { position: relative; min-height: 34px; background: var(--panel-2); border-radius: var(--r-sm); cursor: pointer; }
.mgantt-head { min-height: 22px; background: none; cursor: default; }
.mgantt-week { position: absolute; top: 2px; font-size: 10px; color: var(--text-faint); white-space: nowrap; border-left: 2px solid var(--blue); padding-left: 3px; }
.mgantt-bar { position: absolute; top: 7px; bottom: 7px; border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--bar) 35%, transparent); border: 1px solid var(--bar); }
.mgantt-bar.late { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.mgantt-progress { height: 100%; background: var(--bar); opacity: .85; }
.mgantt-meter { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin-top: 2px; }
.mgantt-meter > div { height: 100%; border-radius: 3px; }
.mgantt-meter.big { height: 10px; border-radius: 5px; margin-top: 4px; }
.mgantt-line { position: absolute; top: -2px; bottom: -2px; width: 0; pointer-events: none; }
.mgantt-line.milestone { border-left: 3px solid var(--gold); box-shadow: 0 0 6px var(--gold); z-index: 1; }
.mgantt-line.today { border-left: 3px dashed var(--red); z-index: 1; }
.mgantt-detail { grid-column: 1 / -1; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); }
.mgantt-key { display: inline-block; width: 14px; height: 0; vertical-align: middle; }
.mgantt-key.milestone { border-top: 3px solid var(--gold); }
.mgantt-key.today { border-top: 3px dashed var(--red); }
/* Dagen: een raster per dag in de kop, en de weekenden als strook achter elke rij. De baan begint op een maandag, dus vijf van de zeven dagen blank en dan twee grijs herhaalt precies per week (--wk). */
.mgantt-day { position: absolute; top: 12px; bottom: 0; font-size: 9px; text-align: center; color: var(--text-faint); border-left: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); overflow: hidden; line-height: 12px; }
.mgantt-day.we { background: rgba(128,128,128,.14); }
.mgantt-day.today { color: var(--red); font-weight: 700; }
.mgantt-track.days { background-image: linear-gradient(90deg, transparent 71.4286%, rgba(128,128,128,.12) 71.4286%); background-size: var(--wk) 100%; background-repeat: repeat-x; }
.mgantt-head.days { background-image: none; }
.mgantt-head .mgantt-week { top: -4px; }
.mgantt-due { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4px 0 0 -4px; transform: rotate(45deg); border: 2px solid var(--bar, var(--text)); background: var(--panel); pointer-events: none; z-index: 2; }
.mgantt-due.done { background: var(--bar, var(--text)); }
.mgantt-results { margin-top: 4px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel); max-height: 260px; overflow-y: auto; }
.mgantt-form { border-top: 1px solid var(--border-soft); padding-top: 10px; }
@media (max-width: 760px) { .mgantt-grid { grid-template-columns: 1fr; } .mgantt-label { padding-bottom: 0; } }

/* Een schatting rechtstreeks in het weekplan. */
.est-input { width: 74px; padding: 2px 6px; }

/* ── Buddies ──────────────────────────────────────────────────────────────── */

.buddy-names { font-weight: 600; margin-bottom: 2px; }
.buddy-work { margin-top: 7px; }
/* De openstaande taak van een buddy: een regel die aanwijsbaar is, geen kaart — het is een
   verwijzing naar het bord en niet iets dat hier bewerkt wordt. */
.buddy-task {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 7px; margin-top: 3px;
  border-radius: var(--r-xs); background: var(--panel-2);
  font-size: 12.5px; color: var(--text-dim);
  transition: background .12s, color .12s;
}
.buddy-task:hover { background: var(--panel-3); color: var(--text); }
.fr-card .task-image, .fr-card .task-image-placeholder { height: 160px; }
.fr-card .fr-title { font-size: 16px; }

.task-body { padding: 10px 11px 11px; }
/* Title and timer on one line: the title takes what is left, the timer keeps its own width
   and never wraps under it. */
.task-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.task-head .task-title { flex: 1; min-width: 0; margin-bottom: 0; }
/* Three people on one card used to push the card wider than its own column: the timer bar
   refused to shrink, so the chips ran off the right edge and the title wrapped to a word a
   line. It may shrink now — the chips wrap instead — while the row with the start and stop
   buttons keeps its size, because those must stay hittable. */
.task-head .timer-bar { margin-top: -2px; min-width: 0; }
.task-head .timer-row { justify-content: flex-end; }
.task-head .timer-row:not(.wrap) { flex-shrink: 0; }

.task-title { font-size: 13px; font-weight: 550; line-height: 1.35; margin-bottom: 8px; }

/* Het taaknummer voor de titel: een eigen merkje met lucht eromheen, zodat "BGS-142" en de
   titel twee dingen blijven in plaats van één lang woord. Iets kleiner en lichter dan de titel,
   want je leest de titel en je wijst naar het nummer. */
.task-key {
  display: inline-block; margin-right: 7px; padding: 1px 6px;
  border-radius: 5px; background: var(--panel-2);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  color: var(--text-faint); vertical-align: 1px; white-space: nowrap;
}

.task-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-faint);
}
.task-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-soft);
}
.assign-me { font-size: 11px; padding: 2px 8px; white-space: nowrap; }

.timer-bar { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.timer-row { display: flex; align-items: center; gap: 6px; }
.timer-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 100px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  background: color-mix(in srgb, var(--who) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--who) 42%, transparent);
  --who-ink: var(--who);
  color: var(--who-ink);
}
:root[data-theme="light"] .timer-chip { --who-ink: color-mix(in srgb, var(--who) 62%, #000); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .timer-chip { --who-ink: color-mix(in srgb, var(--who) 62%, #000); }
}
.timer-chip .tracking-who { font-family: var(--font); max-width: 74px; }
.timer-mine { background: var(--red-dim); color: var(--danger-ink); border: 1px solid var(--danger-edge); }

.due-flag { font-size: 10.5px; padding: 1px 6px; border-radius: var(--r-xs); }
.due-over { background: var(--red-dim); color: var(--danger-ink); }
.due-soon { background: var(--warn-bg); color: var(--gold); }

/* ── Tables ───────────────────────────────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 8px 10px;
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
/* A heading follows its column. ".table th" sets text-align on an element-plus-class
   selector, which outweighs a bare ".right" — so every right-aligned column used to carry a
   left-aligned heading, and in a matrix of a person per column that makes it impossible to
   see whose hours are whose. */
.table th.right { text-align: right; }
.table th.center { text-align: center; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }

/* ── Urenverantwoording: een maand als raster ──────────────────────────────────
   Een echt raster en niet een tabel die eruitziet als een lijst. Elke dag dezelfde
   breedte, en lijntjes rondom, zodat je ziet dat het hokjes zijn waarin je iets typt.

   De breedte staat op de cel en niet op de tabel: met eenendertig kolommen die zich naar
   hun inhoud voegen, wordt 1 smal en 30 breed — en dan is niet meer te zien welke dag je
   invult. Vaste maten aan beide kanten dwingen ze gelijk. */
.table.timesheet { width: max-content; min-width: 100%; }

.table.timesheet th,
.table.timesheet td {
  border: 1px solid var(--border-soft);
  padding: 4px 6px;
}
.table.timesheet thead th { border-bottom-color: var(--border); }

/* De dagen. Even breed, en het getal in het midden onder het hokje eronder. */
.table.timesheet .day {
  width: 46px; min-width: 46px; max-width: 46px;
  text-align: center; padding: 4px 2px;
}
.table.timesheet th.day { text-align: center; }

/* Zaterdag en zondag liggen iets terug: je ziet de weken zonder streepjes te hoeven tellen. */
.table.timesheet .day.rest { background: rgba(127, 127, 127, .06); }

/* De dagkop: de afkorting klein erboven, het nummer eronder. Twee regels in één cel, want
   een aparte rij voor de namen zou de hokjes weer even breed als hun inhoud maken. */
.table.timesheet .dayname {
  display: block; font-size: 9px; opacity: .6; line-height: 1.2;
}
.table.timesheet .daynum {
  display: block; font-size: 12px; letter-spacing: 0; text-transform: none; line-height: 1.3;
}

/* De ISO-week boven de dagen die eronder vallen. */
.table.timesheet th.week {
  text-align: center; padding: 3px 2px; font-size: 9px;
  color: var(--text-dim); background: rgba(127, 127, 127, .04);
}

/* Een streep bij elke maandag, zodat de weken als blokken lezen. */
.table.timesheet .week-start { border-left: 2px solid var(--border); }

/* De projectkolom houdt zijn breedte, ook als er nog geen regels zijn — anders verspringt
   het hele raster zodra je de eerste toevoegt. */
.table.timesheet .who { width: 260px; min-width: 260px; }
.table.timesheet .sum { width: 70px; min-width: 70px; text-align: right; }

/* Het hokje ís het veld: geen tweede rand binnen een rand, en breed genoeg om er met de
   muis in te klikken zonder te mikken. */
.table.timesheet input.cell {
  width: 100%; padding: 3px 4px; text-align: right;
  background: transparent; border: none; border-radius: 0;
}
.table.timesheet input.cell:focus {
  background: var(--panel-2);
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.table.timesheet input.cell:disabled { background: transparent; }

/* ── Speelruimte ───────────────────────────────────────────────────────────────
   Boven alles, en niet weg te klikken. Een klant die hier zit is aan het proberen, en die
   moet niet morgen ontdekken dat zijn avondwerk weg is — dus dit hoort op te vallen zoals een
   waarschuwing opvalt, niet zoals een tip. Eigen kleuren en niet de accentkleur: bij een
   white-labelklant is de accentkleur zijn huisstijl, en dit is geen huisstijl. */
.demo-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px;
  background: #7A4A00; color: #FFE7C2;
  border-bottom: 1px solid #A66A0A;
  font-size: 13px; line-height: 1.45;
}
.demo-badge {
  flex-shrink: 0; padding: 2px 9px; border-radius: 100px;
  background: #FFC44D; color: #3A2200;
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.demo-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.demo-detail { opacity: .85; font-size: 12px; }

/* Een timer die stilstaat. Rustiger dan een lopende, met het pauzeteken erbij: een klok die
   niet beweegt zonder dat er iets bij staat, leest als een klok die stuk is. */
.tracking-chip.paused { opacity: .7; }
.tracking-paused { font-size: 9px; letter-spacing: -1px; opacity: .8; }

/* De uitleg: stappen links, tekening rechts, en onder elkaar zodra dat niet meer past. */
.how-to { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.how-steps { flex: 1 1 260px; margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.how-steps li { line-height: 1.5; }
.how-draw {
  flex: 1 1 300px; max-width: 340px; height: auto;
  color: var(--text); border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  padding: 8px; background: var(--panel-2);
}
.table-wrap { overflow-x: auto; }

.row-muted td { opacity: .5; }
.row-muted .strike { text-decoration: line-through; }

.link-cell { cursor: pointer; font-weight: 500; }
.link-cell:hover { color: var(--white); text-decoration: underline; }

/* ── Modals ───────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: var(--scrim);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
  animation: fade .14s ease;
}

.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  width: 100%; max-width: 560px;
  animation: rise .16s cubic-bezier(.2, .8, .3, 1);
}
.modal-wide { max-width: 1080px; }
.modal-narrow { max-width: 420px; }
/* Eén scherm heeft echt meer nodig: de opmaak-editor legt een A4 naast zijn instellingen,
   en op 1080px wordt dat papier zo klein dat je er niet op kunt ontwerpen. */
.modal-xl { max-width: 1400px; }

.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 620; margin: 0; flex: 1; }
.modal-body { padding: 18px; }
.modal-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--border);
}
.modal-foot .spacer { flex: 1; }

.split { display: grid; grid-template-columns: 1fr 380px; gap: 0; }
.split-main { padding: 18px; border-right: 1px solid var(--border); min-width: 0; }
.split-side {
  padding: 18px; background: var(--panel-2);
  border-radius: 0 0 var(--r-lg) 0;
  display: flex; flex-direction: column; min-width: 0;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ── Activity feed ────────────────────────────────────────────────────────── */

.activity { flex: 1; overflow-y: auto; max-height: 460px; margin: -4px -4px 12px; padding: 4px; }

.activity-item {
  display: flex; gap: 9px; padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}
.activity-item:last-child { border-bottom: none; }
.activity-main { flex: 1; min-width: 0; }
.activity-head {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font-size: 12px; margin-bottom: 3px;
}
.activity-who { font-weight: 600; }
.activity-when { color: var(--text-faint); font-size: 11px; }
.activity-note { font-size: 12.5px; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; }
.activity-img {
  margin-top: 7px; max-width: 100%; border-radius: var(--r-xs);
  border: 1px solid var(--border); cursor: zoom-in; display: block;
}

.composer { border-top: 1px solid var(--border); padding-top: 11px; }
.composer.dropping { outline: 1px dashed var(--border-strong); outline-offset: 4px; border-radius: var(--r-sm); }
.composer-row { display: flex; gap: 7px; align-items: flex-end; margin-top: 7px; }

/* ── Calendar ─────────────────────────────────────────────────────────────── */

/* The calendar takes the height it is given rather than a fixed one: a month with six
   rows and a week from 07:00 to 22:00 both fill the window instead of ending halfway. */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  grid-auto-rows: minmax(var(--cal-row, 104px), auto);
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.cal-dayname {
  background: var(--panel); padding: 7px 9px;
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  letter-spacing: .09em; text-transform: uppercase;
}
.cal-cell {
  background: var(--panel); padding: 6px 7px; overflow: hidden;
  cursor: pointer; transition: background .12s;
}
.cal-cell:hover { background: var(--panel-2); }
.cal-cell.other-month { background: var(--sunken); }
.cal-cell.selected { box-shadow: inset 0 0 0 2px var(--text-dim); }
.cal-cell.other-month .cal-daynum { color: var(--text-faint); opacity: .5; }
/* Vandaag moet je zien zonder te zoeken: een rand in de accentkleur om de dag, en het nummer als
   gevuld rondje. Eerst was het alleen een iets lichtere achtergrond, en die viel weg. */
.cal-cell.today { background: var(--today-soft); box-shadow: inset 0 0 0 2px var(--today); }
.cal-daynum { font-size: 11.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }
.cal-cell.today .cal-daynum {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 100px; background: var(--today); color: var(--today-ink); font-weight: 700;
  box-shadow: var(--today-glow);
}

.cal-item {
  font-size: 10.5px; padding: 2px 5px; border-radius: 4px;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}

.week-grid {
  display: grid; grid-template-columns: 52px repeat(7, minmax(96px, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.week-scroll { overflow-x: auto; overflow-y: hidden; }

/* The page claims the window and hands what is left to the grid, so the day fills the screen
   without anyone having to guess how tall the header is. The hours then divide that space
   between them, which is why an event is positioned as a percentage rather than in pixels. */
.calendar-page {
  display: flex; flex-direction: column;
  height: calc(100vh - 96px); min-height: 460px;
}
.calendar-page .week-scroll,
.calendar-page .cal-grid { flex: 1; min-height: 0; }
.calendar-page .cal-grid { grid-auto-rows: minmax(0, 1fr); }
.week-head {
  background: var(--panel); padding: 8px 6px; text-align: center;
  border-bottom: 1px solid var(--border); border-left: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 2;
}
.week-head-day { font-size: 10px; color: var(--text-faint); letter-spacing: .09em; text-transform: uppercase; }
.week-head-num { font-size: 15px; font-weight: 600; }
.week-head.today { background: var(--today-soft); box-shadow: inset 0 -2px 0 var(--today); }
.week-head.today .week-head-day { color: var(--today); font-weight: 700; }
.week-head.today .week-head-num {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-top: 2px;
  border-radius: 100px; background: var(--today); color: var(--today-ink); font-weight: 700;
  box-shadow: var(--today-glow);
}
/* De hele kolom van vandaag licht getint, en een lijn op het tijdstip van nu. */
.week-day.today, .week-allday.today { background: color-mix(in srgb, var(--today) 6%, var(--panel)); }
.week-now {
  position: absolute; left: 0; right: 0; height: 0; z-index: 4; pointer-events: none;
  border-top: 2px solid var(--red);
}
.week-now::before {
  content: ""; position: absolute; left: -5px; top: -6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--red);
}

.week-hours {
  display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--border);
}
.week-hour-label {
  flex: 1; min-height: 26px; font-size: 10px; color: var(--text-faint);
  text-align: right; padding: 2px 7px 0 0; border-bottom: 1px solid var(--border-soft);
}

.week-day {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--border-soft);
}
.week-slot { flex: 1; min-height: 26px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.week-slot:hover { background: var(--panel-2); }
.week-slot.sel-start { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

.week-event {
  position: absolute; left: 3px; right: 3px;
  border-radius: 5px; padding: 3px 6px; overflow: hidden;
  font-size: 10.5px; line-height: 1.3; cursor: pointer; z-index: 3;
  border-left: 3px solid;
}
.week-event-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-event-time { opacity: .8; font-size: 9.5px; }

/* Een periode kiezen op een kalender (RangeCalendar): slepen of twee keer klikken. */
.rc { border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; background: var(--panel); user-select: none; max-width: 640px; }
.rc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.rc-months { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .rc-months { grid-template-columns: 1fr; } }
.rc-title { font-size: 12px; font-weight: 600; text-transform: capitalize; margin-bottom: 4px; }
.rc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.rc-dayname { font-size: 10px; color: var(--text-faint); text-align: center; text-transform: uppercase; padding-bottom: 2px; }
.rc-day {
  text-align: center; font-size: 12px; padding: 5px 0; cursor: pointer; border-radius: 0;
  touch-action: none;
}
.rc-day:hover { background: var(--panel-2); }
.rc-day.weekend { color: var(--text-faint); }
.rc-day.today { font-weight: 700; color: var(--today); }
.rc-day.marked { background: color-mix(in srgb, var(--green) 16%, transparent); }
.rc-day.in { background: var(--accent-soft); color: var(--text); }
.rc-day.first, .rc-day.last { background: var(--accent); color: #fff; font-weight: 700; }
.rc-day.first { border-radius: 6px 0 0 6px; }
.rc-day.last { border-radius: 0 6px 6px 0; }
.rc-day.first.last { border-radius: 6px; }

/* Een vrije dag van de organisatie: als de feestdag een band bovenin de dag, maar groen voor een
   vrije periode en in de waarschuwingskleur voor een verplichte dag, die van het verlof afgaat. */
.cal-dayoff {
  font-size: 10.5px; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--text);
  border-left: 3px solid var(--green);
}
.cal-dayoff.mandatory {
  background: color-mix(in srgb, var(--gold) 20%, transparent); border-left-color: var(--gold);
}
.week-head .cal-dayoff { margin-top: 3px; text-align: left; }

/* Een fase van een project: een balk bovenin de dag, over de dagen heen doorlopend, met de naam
   alleen waar hij begint. Zie Calendar.PhasesOn. */
.cal-phase {
  font-size: 10px; font-weight: 600; line-height: 1.5; padding: 0 5px; margin: 0 -7px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  background: color-mix(in srgb, var(--phase) 24%, transparent);
  color: color-mix(in srgb, var(--phase) 70%, var(--text));
  border-top: 2px solid var(--phase);
}
.cal-phase.first { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.cal-phase.last { margin-right: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.week-head .cal-phase { margin: 3px -6px 0; text-align: left; }
.week-head .cal-phase.first { margin-left: 0; }
.week-head .cal-phase.last { margin-right: 0; }
:root[data-theme="light"] .cal-phase { color: color-mix(in srgb, var(--phase) 60%, #000); }

/* Een mijlpaal: een ruit op zijn dag. Gehaald met een vinkje en wat zachter, te laat met een rode rand. */
.cal-milestone { font-weight: 600; }
.cal-milestone.reached { opacity: .7; }
.cal-milestone.late { box-shadow: inset 2px 0 0 var(--red); }

/* Het blok van het schooljaar en de week daarvan: rechtsboven in de maandag, en in de week in het
   vak linksboven. Zie StudyBlock. */
.cal-cell { position: relative; }
.cal-blockweek {
  position: absolute; top: 6px; right: 7px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-faint);
  white-space: nowrap;
}
.cal-blockweek-corner { font-size: 10px; font-weight: 700; line-height: 1.3; color: var(--text-dim); }
.week-head-corner { display: flex; align-items: center; justify-content: center; }
.cal-blockweek-pill { background: var(--panel-2); color: var(--text-dim); font-weight: 600; }

/* Uitgenodigd en nog niet geantwoord: een stippelrand, zodat je ziet waar je nog op moet klikken. */
.cal-item.needs-reply, .week-event.needs-reply { outline: 1.5px dashed currentColor; outline-offset: -1.5px; }
.rsvp-away { opacity: .35; }

.rsvp-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.rsvp-bar .chip.on.rsvp-Attending { background: var(--green); border-color: var(--green); color: #10251a; }
.rsvp-bar .chip.on.rsvp-Declined { background: var(--red); border-color: var(--red); color: #fff; }
.rsvp-bar .chip.on.rsvp-Tentative { background: var(--gold); border-color: var(--gold); color: #1c1c1c; }
.rsvp-pill.rsvp-Attending { background: var(--green); color: #10251a; }
.rsvp-pill.rsvp-Declined { background: var(--red); color: #fff; }
.rsvp-pill.rsvp-Tentative { background: var(--gold); color: #1c1c1c; }

.week-allday { padding: 3px; border-left: 1px solid var(--border-soft); background: var(--panel); border-bottom: 1px solid var(--border); min-height: 26px; }

/* ── Notifications ────────────────────────────────────────────────────────── */

/* Where the stack sits is each person's own choice; the class says which of six corners.
   Stacking direction follows: at the top the newest goes underneath the older ones, at the
   bottom it goes above them, so the newest is always the one nearest the edge. */
.toast-stack {
  position: fixed; z-index: 300;
  display: flex; gap: 11px;
  max-width: 390px; width: calc(100% - 40px);
  pointer-events: none;
}
.toast-stack > * { pointer-events: auto; }

.toast-stack.bottom-right  { right: 20px; bottom: 20px; flex-direction: column-reverse; }
.toast-stack.bottom-left   { left: 20px;  bottom: 20px; flex-direction: column-reverse; }
.toast-stack.bottom-centre { left: 50%; transform: translateX(-50%); bottom: 20px; flex-direction: column-reverse; }
.toast-stack.top-right     { right: 20px; top: 68px; flex-direction: column; }
.toast-stack.top-left      { left: 20px;  top: 68px; flex-direction: column; }
.toast-stack.top-centre    { left: 50%; transform: translateX(-50%); top: 68px; flex-direction: column; }

/* A passing notice is lighter than one that needs answering. */
.toast.notice { background: var(--panel); opacity: .97; }

.toast {
  background: var(--panel-2); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent, var(--blue));
  border-radius: var(--r-md); padding: 15px 16px;
  box-shadow: var(--shadow-lift);
  animation: toast-in .28s cubic-bezier(.2, .9, .3, 1);
  display: flex; gap: 12px; align-items: flex-start;
}
.toast-icon {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: color-mix(in srgb, var(--accent, var(--blue)) 18%, transparent);
}
.toast-main { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 650; margin-bottom: 4px; line-height: 1.35; }
.toast-detail { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.toast-when { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.toast-close {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px;
  border-radius: var(--r-xs);
}
.toast-close:hover { color: var(--text); background: var(--panel-3); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(32px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.bell { position: relative; }
.badge {
  position: absolute; top: -3px; right: -3px;
  background: var(--red); color: var(--white);
  font-size: 9px; font-weight: 700; min-width: 15px; height: 15px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.drawer-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(5, 5, 6, .5); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 195;
  width: 340px; max-width: 92vw;
  background: var(--panel); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  animation: slide-in .18s cubic-bezier(.2, .8, .3, 1);
}
.drawer-head {
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer-section {
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  letter-spacing: .11em; text-transform: uppercase; margin: 16px 0 8px;
}
.drawer-section:first-child { margin-top: 0; }

.notif-row {
  display: flex; gap: 8px; padding: 9px 0;
  border-bottom: 1px solid var(--border-soft); font-size: 12.5px;
}
.notif-row:last-child { border-bottom: none; }

/* ── Charts ───────────────────────────────────────────────────────────────── */

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-label { width: 108px; font-size: 12.5px; flex-shrink: 0; display: flex; align-items: center; gap: 7px; }
.bar-track { flex: 1; height: 21px; background: var(--panel-2); border-radius: var(--r-xs); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--r-xs); transition: width .3s ease; }
.bar-value { width: 78px; text-align: right; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* Budget figures carry a currency and a limit — "€ 270 / € 30.000" needs room to stay on
   one line, and wrapping a number is how a reader loses track of which half is which. */
.bar-value.wide { width: 150px; white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 15px 16px;
}
.stat-value { font-size: 27px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

.progress-track { height: 6px; background: var(--panel-2); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--text-dim); border-radius: 100px; }

/* ── Login gate ───────────────────────────────────────────────────────────── */

.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background:
    radial-gradient(1000px 620px at 50% -12%, var(--raised) 0%, var(--bg) 62%);
}
/* A photo for the week, behind a scrim. The scrim is a plain gradient rather than a
   backdrop-filter: a filter over a full-screen photo is expensive on every frame, and this
   costs nothing after the first paint. */
.gate.with-photo {
  background:
    linear-gradient(rgba(8, 10, 14, .38), rgba(8, 10, 14, .62)),
    var(--gate-photo) center / cover no-repeat,
    var(--bg);
}

.gate-card {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 28px 26px;
  animation: rise .22s cubic-bezier(.2, .8, .3, 1);
}

/* Opaque over a photo, and lifted further off it, so the form never has to be read
   through a picture. */
.gate.with-photo .gate-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
}

/* Quiet, but still readable: a version you have to squint at is no use when somebody asks
   which build is live. --text-faint is too dim for that at this size. */
.gate-version {
  margin-top: 18px; text-align: center;
  font-size: 10.5px; color: var(--text-dim);
  letter-spacing: .08em;
}
/* Het nummer is een link naar de releasenotes, maar mag er niet als een knop uit gaan zien:
   het staat op een aanmeldscherm, waar maar één ding de aandacht hoort te trekken. */
.gate-version a { color: inherit; text-decoration: none; }
.gate-version a:hover { color: var(--text); text-decoration: underline; }

/* De notities zijn langer dan een aanmeldkaart hoog is. Scrollen binnen de kaart, zodat de
   kaart zelf op zijn plek blijft staan en de pagina eromheen niet gaat schuiven. */
.gate-scroll { max-height: min(60vh, 520px); overflow-y: auto; padding-right: 6px; }
.gate-card-wide { max-width: 620px; }

/* ── Afspraak boeken door wie geen account heeft (Book.razor) ─────────────── */
.book-card { max-width: 440px; }
.book-title { margin: 2px 0 4px; }
.book-about { white-space: pre-line; color: var(--text-dim); font-size: 13px; }
.book-when { font-weight: 600; margin: 4px 0 12px; }
.book-month { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; text-transform: capitalize; }
.book-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.book-head { font-size: 11px; color: var(--text-faint); text-transform: capitalize; padding-bottom: 2px; }
.book-day { display: block; padding: 7px 0; border-radius: var(--r-sm, 6px); color: var(--text-faint); font-size: 13px; }
.book-day.open { color: var(--accent); background: var(--panel-3); font-weight: 600; text-decoration: none; }
.book-day.open:hover, .book-day.chosen { background: var(--accent); color: var(--accent-text); }
.book-times { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Het dashboard ───────────────────────────────────────────────────────────
   Twee kolommen, en een onderdeel dat de volle breedte vraagt neemt ze allebei. Eén raster
   in plaats van rijen met een vaste indeling, omdat de volgorde nu door de klant wordt
   gesleept: welk onderdeel naast welk komt te staan, is hier niet te voorzien. */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dash-cell { min-width: 0; }
.dash-cell.wide { grid-column: 1 / -1; }
.dash-cell > .panel { height: 100%; margin: 0; }

/* Onder een smal scherm staat alles onder elkaar: twee kolommen naast elkaar op een telefoon
   levert twee kolommen op die geen van beide te lezen zijn. */
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* De sleeplijst waarmee het dashboard wordt ingericht. Dezelfde rijen als bij het menu, want
   het is dezelfde handeling — pak een regel, versleep hem, zet hem neer. */
.dash-rows { display: flex; flex-direction: column; gap: 6px; }
.dash-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--panel-2); border: 1px solid var(--border);
}
.dash-row.dragging { opacity: .45; }
.dash-row.off { opacity: .6; }
.dash-grip { cursor: grab; color: var(--text-faint); user-select: none; }
.dash-name { font-weight: 500; }
.gate-brand { text-align: center; margin-bottom: 22px; }
.gate-logo { height: 46px; width: auto; display: block; margin: 0 auto 10px; }
.gate-brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.gate-brand-sub {
  font-size: 9.5px; color: var(--text-faint);
  letter-spacing: .2em; text-transform: uppercase; margin-top: 3px;
}
.gate-switch {
  display: flex; gap: 3px; margin-bottom: 20px;
  background: var(--panel-2); padding: 3px; border-radius: var(--r-sm);
}
.gate-switch button {
  flex: 1; padding: 7px; border: none; background: none;
  color: var(--text-dim); font-size: 12.5px; font-weight: 550;
  border-radius: var(--r-xs); cursor: pointer;
}
.gate-switch button.on { background: var(--panel-3); color: var(--text); }

.alert {
  padding: 9px 11px; border-radius: var(--r-xs);
  font-size: 12.5px; margin-bottom: 14px; line-height: 1.5;
}
.alert-error { background: var(--red-dim); color: var(--danger-ink); border: 1px solid var(--danger-edge); }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-edge); }
.alert-info { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }
.alert-warn { background: var(--warn-bg); color: var(--gold); border: 1px solid var(--gold); }

.avatar-picker { display: flex; align-items: center; gap: 12px; }
.avatar-drop {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--panel-2); border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 19px; color: var(--text-faint); overflow: hidden;
}
.avatar-drop img { width: 100%; height: 100%; object-fit: cover; }
.avatar-drop.dropping { border-color: var(--text-dim); background: var(--panel-3); }

/* A swatch on the theme buttons: the two looks shown rather than described. */
.theme-dot {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 1px solid var(--border-strong); flex-shrink: 0;
}
.theme-dot-dark { background: #0D0D0E; }
.theme-dot-light { background: #EEF2F6; }

/* ── Colour picking ───────────────────────────────────────────────────────── */

.colour-input {
  width: 46px; height: 30px; padding: 2px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-xs);
}
.colour-input.sm { width: 38px; height: 26px; }
.colour-input::-webkit-color-swatch-wrapper { padding: 0; }
.colour-input::-webkit-color-swatch { border: none; border-radius: 3px; }

.swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border);
}
.swatch.on { border-color: var(--panel); box-shadow: 0 0 0 2px var(--text-dim); }

/* Shows the chosen accent doing the three jobs it has, before it is saved. */
.accent-preview {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.accent-btn {
  background: var(--p); color: var(--p-text);
  padding: 7px 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
}
.accent-chip {
  background: var(--p); color: var(--p-text);
  padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.accent-link { color: var(--p); font-size: 13px; font-weight: 500; }

/* ── Team sheet ───────────────────────────────────────────────────────────── */

/* Compact form controls, used by the sheet and the task picker's filter row. */
.input-sm, .select-sm { padding: 4px 8px; font-size: 12px; }

/* A spreadsheet, so the cells are tight and the inputs carry no chrome of their own. */
.sheet td { padding: 5px 6px; vertical-align: top; }
.sheet th { white-space: nowrap; }
.sheet .input, .sheet .select, .sheet .textarea {
  padding: 4px 7px; font-size: 12px; min-width: 0; width: 100%;
}
.sheet .textarea-sm { min-height: 34px; resize: vertical; line-height: 1.4; }

/* Give the free-text columns room to be typed in, and keep the rest to what it needs. */
.sheet th:nth-child(1), .sheet td:nth-child(1) { min-width: 130px; }
.sheet th:nth-child(2), .sheet td:nth-child(2) { width: 110px; }
.sheet th:nth-child(3), .sheet td:nth-child(3) { min-width: 210px; }
.sheet th:nth-child(4), .sheet td:nth-child(4) { min-width: 190px; }
.sheet th:nth-child(5), .sheet td:nth-child(5) { width: 120px; }
.sheet th:nth-child(6), .sheet td:nth-child(6) { width: 92px; }
.sheet th:nth-child(7), .sheet td:nth-child(7) { min-width: 180px; }
.sheet th:nth-child(8), .sheet td:nth-child(8) { min-width: 220px; }
/* The category table wants the sheet's tight cells but not the team overview's column
   widths, which would leave its name column at 110px and a gap across the rest. */
.cat-sheet { max-width: 820px; }
.cat-sheet th, .cat-sheet td { min-width: 0; width: auto; }
.cat-sheet th:nth-child(1), .cat-sheet td:nth-child(1) { width: 62px; min-width: 0; }
.cat-sheet th:nth-child(2), .cat-sheet td:nth-child(2) { width: auto; min-width: 0; }
.cat-sheet th:nth-child(3), .cat-sheet td:nth-child(3) { width: 140px; min-width: 0; }
.cat-sheet th:nth-child(4), .cat-sheet td:nth-child(4) { width: 90px; min-width: 0; }
.cat-sheet th:nth-child(5), .cat-sheet td:nth-child(5) { width: 62px; min-width: 0; }

.sheet .input.locked { color: var(--text-faint); background: var(--panel-3); cursor: default; }
.sheet td.right .input { text-align: right; max-width: 78px; margin-left: auto; }
.sheet tfoot td { border-top: 1px solid var(--border); padding-top: 9px; }
.sheet tr.row-closed td { opacity: .55; }
.sheet th.sortable { cursor: pointer; user-select: none; }
.sheet th.sortable:hover { color: var(--text); }

/* ── Who is on the clock ──────────────────────────────────────────────────── */

/* Hangs under the bar on the right. Fixed rather than absolute so it stays put while the
   page behind it scrolls, and capped in height because a busy studio would otherwise run
   it off the bottom of the screen. */
.timer-panel {
  width: 296px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow-y: auto;
}

/* Opened from the bar: over the page, gone as soon as you close it. */
.timer-panel.floating {
  position: fixed; top: var(--bar-h); right: 14px; z-index: 70;
  max-height: min(70vh, 560px);
  box-shadow: var(--shadow);
}

/* Pinned: part of the layout. Sticks under the bar while the page scrolls past it. */
.timer-panel.pinned {
  position: sticky; top: var(--bar-h);
  margin: 20px 20px 20px 0;
  /* Down to the bottom of the screen: pinned it is a column, and a column that stops a
     third of the way down looks like something failed to load. */
  height: calc(100vh - 78px);
}

.timer-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px 9px 13px; border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; background: var(--panel); border-radius: var(--r-md) var(--r-md) 0 0;
}

/* Each row a pill in the person's own colour, the way the old tool had it. Everything that
   carries the colour is derived from one --who set on the row, so a person's colour is
   written once and the tint, the edge, the name and the dot all follow.

   --who-ink instead of --who for text: a colour picked to stand out against a dark panel is
   not the same colour that reads on a white one, and the pills have to work in both. */
.timer-line {
  display: flex; flex-direction: column; gap: 5px;
  width: calc(100% - 16px); margin: 6px 8px;

  /* Rounded, not round. At 100px the curve ate into the row from both ends: the dot sat in
     the bend on the left and the progress bar underneath had to stop short of it. This is
     still unmistakably a pill and gives the content the full width of the row. */
  padding: 7px 11px; border-radius: 14px; cursor: pointer;
  text-align: left; font-family: inherit;
  background: color-mix(in srgb, var(--who) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--who) 40%, transparent);
  --who-ink: var(--who);
  color: var(--who-ink);
}
.timer-line:hover { background: color-mix(in srgb, var(--who) 24%, transparent); }

/* Your own, because in a strip of fifteen you look for yourself first. */
.timer-line.mine { box-shadow: 0 0 0 1px color-mix(in srgb, var(--who) 55%, transparent); }

/* The row as it always was, now one layer of the pill. */
.timer-line-top { display: flex; align-items: center; gap: 9px; width: 100%; }

/* Under the row rather than through it: a bar behind the name would fight the name.
   The number belongs beside it — the bar on its own was read as a coloured line along the
   bottom of the pill, and "68 %" leaves nothing to work out. */
.timer-bar-row { display: flex; align-items: center; gap: 7px; width: 100%; }

.timer-progress-num {
  font-size: 10px; line-height: 1;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
  min-width: 34px; text-align: right; flex: 0 0 auto;
}

/* A track, not a line: neutral rather than tinted with the person's colour, so the empty
   part reads as empty instead of as part of the pill, and sunk in so it reads as a groove
   with something in it. */
.timer-progress {
  display: block; height: 7px; flex: 1; min-width: 0;
  border-radius: 100px; overflow: hidden;
  /* Its own ground rather than the panel's: an empty bar on a background of exactly its
     own colour is not a bar, it is nothing — and "0 of 3" is precisely when it has to be
     visible. */
  background: color-mix(in srgb, var(--text) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent),
              inset 0 1px 2px rgb(0 0 0 / .22);
}

.timer-progress-fill {
  display: block; height: 100%; border-radius: 100px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .12);
}

/* Past the estimate the track darkens too, so it reads as over even at a glance, and the
   number says how far over. */
.timer-progress.over {
  background: color-mix(in srgb, #7A1F1F 30%, var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #7A1F1F 60%, transparent);
}
.timer-progress.over + .timer-progress-num { color: #E0736F; font-weight: 600; }

:root[data-theme="light"] .timer-progress { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .16),
                                                        inset 0 1px 2px rgb(0 0 0 / .12); }

.timer-line .bold { color: var(--who-ink); }
.timer-line .mono { color: var(--text); }

/* Mixed towards black so the name keeps its identity and still reads on white. Measured
   rather than guessed: the studio palette lands between 4.7 and 6.9 to 1 this way. */
:root[data-theme="light"] .timer-line { --who-ink: color-mix(in srgb, var(--who) 62%, #000); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .timer-line { --who-ink: color-mix(in srgb, var(--who) 62%, #000); }
}

/* Name over task, both clipped: a long task title must not push the stopwatch off. */
.timer-line-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.timer-line-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-icon.on { background: var(--accent-soft); color: var(--accent); }

/* ── A quick word ──────────────────────────────────────────────────────────── */

/* The balloon on somebody's running timer. Quiet until you go near it: a row of fifteen
   pills with fifteen bright icons in it is a row nobody reads. */
.chat-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 2px; flex-shrink: 0;
  border-radius: 50%; cursor: pointer;
  font-size: 11px; line-height: 1;
  opacity: .55;
}
.chat-open:hover { opacity: 1; background: color-mix(in srgb, var(--who) 22%, transparent); }

/* Bottom right, above everything, out of the way of the page. Fixed, so it stays put while
   you scroll — the point of it is that you can carry on with what you were doing. */
.chat-dock {
  position: fixed; right: 14px; bottom: 0; z-index: 120;
  display: flex; align-items: flex-end; gap: 8px;
  max-width: calc(100vw - 28px);
  pointer-events: none;
}
.chat-dock > * { pointer-events: auto; }

/* Minimised: the header is the whole window, and doubles as the way back. */
.chat-box.collapsed { width: 176px; }
.chat-box.collapsed .chat-head { border-bottom: 0; }

.chat-head { cursor: pointer; }
.chat-head-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The one thing in the header that says the window folds away, so it has to be seen. It was
   a 10px chevron in the faint grey — technically there, and nobody found it. */
.chat-chevron {
  font-size: 15px; line-height: 1; color: var(--text-dim);
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-head:hover .chat-chevron { color: var(--text); background: var(--panel-3); }

.chat-box {
  width: 312px; max-width: calc(100vw - 28px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--r-md) var(--r-md) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .28);

  /* Up from the bottom, once, when it appears. Not a loop — see the note on the tracking
     dot: an animation that never ends keeps the compositor busy all day. */
  animation: chat-rise .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes chat-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }

.chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 11px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--who) 12%, var(--panel));
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.chat-lines {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 11px;
  height: 232px; overflow-y: auto;
}

/* Theirs left, yours right, and no name on either: there are only two people in here. */
.chat-line {
  display: flex; align-items: flex-end; gap: 6px;
  max-width: 84%; align-self: flex-start;
}
.chat-line.mine { align-self: flex-end; flex-direction: row-reverse; }

.chat-body {
  padding: 6px 10px; border-radius: 14px;
  background: var(--panel-3); color: var(--text);
  font-size: 12.5px; line-height: 1.45;
  overflow-wrap: anywhere;
}
.chat-line.mine .chat-body {
  background: color-mix(in srgb, var(--who) 26%, var(--panel-2));
}

.chat-when { font-size: 9.5px; color: var(--text-faint); flex-shrink: 0; }

.chat-write {
  display: flex; gap: 6px; padding: 8px;
  border-top: 1px solid var(--border-soft);
}
.chat-write .input { flex: 1; min-width: 0; }

@media (max-width: 700px) {
  .chat-dock { right: 8px; left: 8px; justify-content: flex-end; }
  .chat-box { width: 100%; }
  .chat-box.collapsed { width: 132px; }
}

/* A little map of the screen: six cells, click the corner you want the pop-ups in. */
.position-grid {
  display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 26px);
  gap: 3px; padding: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-xs); width: max-content;
}
.position-cell {
  border: 1px dashed var(--border-strong); border-radius: 3px;
  background: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.position-cell:hover { background: var(--panel-3); }
.position-cell.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.position-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.position-cell.on .position-dot { background: var(--accent); }

/* Flags are drawn, not typed — see Flag.razor. A thin outline keeps a mostly-white one
   (Japan) from dissolving into the chip behind it. */
.flag {
  display: inline-flex; width: 18px; height: 12px; flex-shrink: 0;
  border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .18);
}
.flag svg { width: 100%; height: 100%; display: block; }

/* A switch, not a tick box. Same checkbox underneath — only the look changes, so it keeps
   its keyboard behaviour and its label. */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 8px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-track {
  position: relative; flex-shrink: 0;
  width: 38px; height: 22px; border-radius: 100px;
  background: var(--panel-3); border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-faint);
  transition: transform .15s, background .15s;
}
.switch input:checked + .switch-track {
  background: var(--accent); border-color: var(--accent);
}
.switch input:checked + .switch-track::after {
  transform: translateX(16px); background: var(--accent-text);
}
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--focus-ring); }
.switch input:disabled + .switch-track { opacity: .5; cursor: default; }

/* ── Tabs inside a page ───────────────────────────────────────────────────── */

/* Reuses .tab from the top bar, on a rail of its own so a page's sections do not read as
   another row of navigation. */
.subtabs {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border-soft); padding-bottom: 6px;
}
.subtabs::-webkit-scrollbar { display: none; }

/* A second rail directly under the first, as on Categories. Without a rule of its own the
   two read as one confusing double row, so this one drops the border and speaks quieter:
   the level above it is the one that says where you are. */
.subtabs.nested {
  border-bottom: 0; padding-bottom: 0; gap: 1px;
}
.subtabs.nested .tab { padding: 5px 10px; font-size: 12px; }
.subtabs.nested .tab.active { background: var(--panel); }

/* ── The addresses an organisation answers on ─────────────────────────────── */

.host-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.host-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 10px; border-radius: 100px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
}
/* The address you are reading this on, so it is obvious which one not to remove. */
.host-tag.on { border-color: var(--accent); background: var(--accent-soft); }

.host-x {
  border: 0; background: none; cursor: pointer; padding: 0 2px; line-height: 1;
  color: var(--text-faint); font-size: 15px;
}
.host-x:hover { color: var(--danger-ink); }

.host-add { display: inline-flex; gap: 4px; align-items: center; }

.logo-pair { display: flex; gap: 10px; flex-wrap: wrap; }
.logo-preview {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px;
  padding: 10px 12px; border-radius: var(--r-xs);
  background: var(--bg); border: 1px solid var(--border-soft);
}
.logo-preview img { height: 34px; width: auto; max-width: 160px; object-fit: contain; }

/* Each on the background it was drawn for, whatever theme the page itself is in. */
.logo-preview.on-dark { background: #0D0D0E; border-color: #2A2A2D; }
.logo-preview.on-dark .faint { color: #7A7A80; }
.logo-preview.on-light { background: #FFFFFF; border-color: #DCE4ED; }
.logo-preview.on-light .faint { color: #8496A8; }

/* ── Drop zone ────────────────────────────────────────────────────────────── */

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px 14px; text-align: center;
  border: 1px dashed var(--border); border-radius: 10px;
  background: var(--panel-2); transition: border-color .12s, background .12s;
}
.dropzone:focus-visible { outline: none; border-color: var(--text-dim); }
.dropzone.dropping { border-color: var(--text-dim); background: var(--panel-3); }
.dropzone.busy { opacity: .75; }
.dropzone-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.camera-view {
  width: 100%; max-width: 320px; border-radius: 8px; background: #000;
  transform: scaleX(-1);   /* a mirror is what people expect of themselves */
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 650; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-col { display: flex; flex-direction: column; gap: 8px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hidden { display: none !important; }

.popover {
  position: absolute; z-index: 120; min-width: 176px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 5px;
}
.popover button {
  display: block; width: 100%; text-align: left;
  padding: 7px 10px; background: none; border: none;
  color: var(--text); font-size: 12.5px; border-radius: var(--r-xs); cursor: pointer;
}
.popover button:hover { background: var(--panel-3); }
.popover-anchor { position: relative; display: inline-block; z-index: 120; }

/* The button that opens a popover has to stay above the backdrop that closes it — the
   backdrop sits inside the same anchor, so without this the button ends up underneath its
   own overlay and clicking it again does nothing. */
.popover-toggle { position: relative; z-index: 130; }

.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(5, 5, 6, .93);
  display: flex; align-items: center; justify-content: center;
  padding: 30px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-sm); }

.role-block {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 12px; margin-bottom: 9px;
}
.role-question { font-size: 12px; color: var(--text-dim); margin-bottom: 7px; }

.list-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--r-xs); margin-bottom: 6px;
}

.spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--text-dim);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .split-main { border-right: none; border-bottom: 1px solid var(--border); }
  .split-side { border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .activity { max-height: 300px; }
}

@media (max-width: 1180px) {
  .tracking-strip { max-width: 30vw; }
  .tracking-who { max-width: 62px; }
}

@media (max-width: 820px) {
  .content { padding: 14px; }
  .board { grid-template-columns: repeat(6, 268px); }

  /* Brand and controls on the first row; tabs and the tracking strip get their own. */
  .topbar-right { order: 1; }
  /* On a narrow bar the icon alone has to carry the button. */
  .logout-text { display: none; }
  .logout-icon { margin-right: 0; }
  .tabs { order: 2; flex: 0 0 100%; }
  .tracking-strip { order: 3; flex: 0 0 100%; max-width: none; }
  .tracking-strip:empty { display: none; }
  .form-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; }
  .modal { max-width: 100%; min-height: 100vh; border-radius: 0; border: none; }
  .split-side { border-radius: 0; }
  .topbar { padding: 9px 12px; gap: 10px; }
  .brand-sub { display: none; }
  .cal-cell { min-height: 74px; }
  /* Too narrow to place anything: one column, bottom of the screen, whatever was chosen. */
  .toast-stack, .toast-stack.top-left, .toast-stack.top-right, .toast-stack.top-centre,
  .toast-stack.bottom-left, .toast-stack.bottom-centre {
    right: 10px; bottom: 10px; left: 10px; top: auto;
    transform: none; max-width: none; width: auto;
    flex-direction: column-reverse;
  }
  .bar-label { width: 88px; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .table th, .table td { padding: 7px 6px; font-size: 12px; }
}


/* ── Relations ────────────────────────────────────────────────────────────── */

/* The .sheet widths were written for the rates table and its five fixed columns. These
   tables have their own counts, so the widths are handed back — with the same weight as
   the rules being overridden, or they would not take. */
.sheet.relation-sheet th, .sheet.relation-sheet td,
.sheet.detail-sheet th, .sheet.detail-sheet td,
.sheet.sale-sheet th, .sheet.sale-sheet td,
.sheet.quote-sheet th, .sheet.quote-sheet td,
.sheet.file-sheet th, .sheet.file-sheet td,
.sheet.task-sheet th, .sheet.task-sheet td,
.sheet.list-sheet th, .sheet.list-sheet td { width: auto; min-width: 0; }

/* A list an organisation keeps: the name is what it is about, so the name gets the room. */
.sheet.list-sheet { max-width: 940px; }
.sheet.list-sheet th:nth-child(1), .sheet.list-sheet td:nth-child(1) { width: 62px; }
.sheet.list-sheet th:nth-child(2), .sheet.list-sheet td:nth-child(2) { width: auto; min-width: 190px; }
.sheet.list-sheet .input { max-width: none; }

.sheet.detail-sheet td.prewrap { white-space: pre-wrap; }
.sheet.detail-sheet .textarea-sm { min-width: 190px; }
.sheet.sale-sheet .select, .sheet.list-sheet .select { max-width: none; }

/* A row you can open. The pointer says so; the tint says which one is open. */
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--panel-2); }
.table tr.row-on td { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }

/* Someone who has left, or a relation switched off: still there, no longer shouting. */
.panel.dimmed { opacity: .68; }

/* A switch with no label of its own, for a table cell or a toolbar. */
.switch.tight { margin-bottom: 0; gap: 6px; }
.switch.tight .switch-track { width: 32px; height: 18px; }
.switch.tight .switch-track::after { width: 12px; height: 12px; }
.switch.tight input:checked + .switch-track::after { transform: translateX(14px); }


/* ── Meeting notes ────────────────────────────────────────────────────────── */

/* A file input stretched over the zone: a dropped file lands on it by itself, so
   drag-and-drop needs no script at all. */
.notes-drop {
  position: relative; display: block; margin-bottom: 8px;
  border: 1px dashed var(--border); border-radius: var(--r-md);
  padding: 12px; text-align: center; cursor: pointer;
  background: var(--panel-2);
  transition: border-color .15s, background .15s;
}
.notes-drop:hover { border-color: var(--accent); }
.notes-drop.busy { opacity: .6; cursor: default; }

.notes-drop-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.notes-drop-hint { font-size: 12px; color: var(--text-faint); pointer-events: none; }

/* Notes run long, so they get room without pushing the rest of the form away. */
/* Het veld groeit mee met wat erin staat (co.autoGrow) en is met de hand groter te slepen. Pas
   boven driekwart van het scherm komt er een schuifbalk: eerst stond hier een vaste grens van
   420px met overflow:hidden, en dan viel de rest van lange notulen onzichtbaar weg. */
.notes-area { min-height: 180px; max-height: 75vh; overflow-y: auto; font-size: 13px; line-height: 1.55; }
.summary-area { min-height: 90px; }


/* ── Rights grid ──────────────────────────────────────────────────────────── */

/* The part is what you read; the four answers are what you click. So the name takes the
   room and the switches sit at the right of their own narrow column, close together
   instead of spread across the width of the screen. */
.sheet.rights-sheet th, .sheet.rights-sheet td { width: auto; min-width: 0; }
.sheet.rights-sheet th:first-child, .sheet.rights-sheet td:first-child { width: auto; }
.sheet.rights-sheet th:not(:first-child),
.sheet.rights-sheet td:not(:first-child) {
  width: 96px; text-align: right; white-space: nowrap;
}
.sheet.rights-sheet td:not(:first-child) .switch { justify-content: flex-end; }
.sheet.rights-sheet td:not(:first-child) .switch.tight { display: inline-flex; }


/* ── All parts, and dragging the menu ─────────────────────────────────────── */

/* The complete list, as a plain dropdown under its own button. The menu is a shortcut rail
   an organisation curates; this is the part that is always complete, so nothing can be
   switched off the bar and become unreachable. */
.popover-backdrop { position: fixed; inset: 0; z-index: 110; }

.parts-menu { min-width: 240px; max-height: 70vh; overflow-y: auto; }
.parts-menu-head {
  padding: 5px 10px 7px; font-size: 11px; font-weight: 600;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em;
}

.parts-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-xs);
  color: var(--text); text-decoration: none; font-size: 12.5px; white-space: nowrap;
}
.parts-item:hover { background: var(--panel-3); }

/* One row per menu item: a grip to drag it, a switch to keep it out of the bar. */
.menu-rows { display: flex; flex-direction: column; gap: 2px; }

.menu-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--panel-2);
}
.menu-row:hover { border-color: var(--border); }
.menu-row.dragging { opacity: .5; border-style: dashed; border-color: var(--accent); }
.menu-grip { cursor: grab; color: var(--text-faint); user-select: none; letter-spacing: -1px; }
.menu-row.dragging .menu-grip { cursor: grabbing; }
.menu-name { font-size: 13px; }

/* The chat's own bits: what you attach before you send it, the emoji grid, and how an
   image or a file looks once it has been said. */
.chat-tool { padding: 3px 6px; position: relative; overflow: hidden; }
.chat-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  font-size: 0;   /* Safari draws the button at its own size otherwise */
}

.chat-pending {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-top: 1px solid var(--border-soft);
  background: var(--panel-2);
}
.chat-pending-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; }
.chat-pending-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

.chat-error { margin: 0; border-radius: 0; font-size: 11.5px; padding: 6px 8px; }

.chat-emoji {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px;
  padding: 6px; border-top: 1px solid var(--border-soft);
  background: var(--panel-2);
  max-height: 132px; overflow-y: auto;
}
.chat-emoji-key {
  border: 0; background: none; cursor: pointer;
  font-size: 17px; line-height: 1; padding: 4px 0;
  border-radius: var(--r-xs);
}
.chat-emoji-key:hover { background: var(--panel-3); }

/* An image says itself, so it gets no bubble around it. */
.chat-line .chat-body:has(.chat-image) { padding: 3px; }
.chat-image {
  display: block; max-width: 220px; max-height: 180px;
  border-radius: 10px; cursor: zoom-in;
}
.chat-text { display: block; }
.chat-image + .chat-text, .chat-file + .chat-text { margin-top: 4px; padding: 0 4px 2px; }

.chat-file { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.chat-file:hover { text-decoration: underline; }

/* Dropping a file anywhere on the box. */
.chat-box.dropping { outline: 2px dashed color-mix(in srgb, var(--who) 60%, transparent); }

/* The GIF picker: a search line and a grid of small ones. Two columns wider than the
   emoji grid because a GIF needs to be seen to be picked. */
.chat-gifs {
  border-top: 1px solid var(--border-soft);
  background: var(--panel-2);
  padding: 7px;
}
.chat-gif-search { display: flex; gap: 6px; margin-bottom: 6px; }
.chat-gif-search .input { flex: 1; min-width: 0; }

.chat-gif-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  max-height: 190px; overflow-y: auto;
}
.chat-gif {
  border: 1px solid transparent; border-radius: 6px; padding: 0;
  background: var(--panel-3); cursor: pointer; overflow: hidden;
  aspect-ratio: 1; display: block;
}
.chat-gif:hover { border-color: color-mix(in srgb, var(--who) 60%, transparent); }
.chat-gif img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chat-gif-credit { text-align: right; margin-top: 5px; }

/* Dezelfde kiezer onder een reactie op een taak: daar is geen chatkleur, dus de accentkleur. */
.activity-gifs { --who: var(--accent); border: 1px solid var(--border-soft); border-radius: 8px; margin-bottom: 6px; }
.activity-gifs .chat-gif-grid { grid-template-columns: repeat(4, 1fr); }

/* Correcting a time entry, inline in the activity list: the row itself opens up rather
   than a dialog over the page, because you are reading the entry while you fix it. */
.activity-edit {
  margin: 6px 0 2px; padding: 8px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: var(--r-xs);
}

/* Who is on the clock for this task, at the top of its activity column. */
.activity-running {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 0 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px;
}

/* ── Whether somebody is there ─────────────────────────────────────────────── */

/* The dot in the corner of a face, the way every other tool does it. The ring is the
   surface behind it, so the dot reads as sitting on top of the photo rather than in it. */
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }

.presence-dot {
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--panel);
  flex-shrink: 0;
}
.avatar-wrap .presence-dot { position: absolute; right: -1px; bottom: -1px; }
.avatar-wrap.avatar-sm .presence-dot { width: 7px; height: 7px; box-shadow: 0 0 0 1.5px var(--panel); }
.avatar-wrap.avatar-lg .presence-dot,
.avatar-wrap.avatar-xl .presence-dot { width: 13px; height: 13px; }

/* On the bar the ring has to be the bar, not a panel that is not there. */
.topbar .presence-dot { box-shadow: 0 0 0 2px var(--bar); }
:root[data-theme="light"] .topbar .presence-dot { box-shadow: 0 0 0 2px var(--accent); }

.timer-line .presence-dot { width: 7px; height: 7px; box-shadow: none; }

.presence-available { background: #4FBF6A; }
.presence-away { background: #F0B429; }

/* A bar across it, like the tool everybody knows: red alone reads as an error. */
.presence-dnd {
  background: #E05252;
  position: relative;
}
.presence-dnd::after {
  content: ""; position: absolute; left: 1.5px; right: 1.5px; top: 50%;
  height: 1.5px; margin-top: -.75px; border-radius: 1px;
  background: var(--panel);
}
.topbar .presence-dnd::after { background: var(--bar); }
:root[data-theme="light"] .topbar .presence-dnd::after { background: var(--accent); }

/* What you are, on one line in your own menu — the choosing happens in its own dialog. */
.status-line {
  display: flex; align-items: center; gap: 8px;
  padding-top: 3px; margin-top: 3px;
  border-top: 1px solid var(--border-soft);
}

/* The dialog behind it: three rows with room for a line of explanation each. */
.status-pick { display: flex; flex-direction: column; gap: 6px; }
.status-choice {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 10px 12px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 8px;
  color: inherit; font: inherit;
}
.status-choice:hover { background: var(--panel-3); }
.status-choice.on { border-color: var(--accent); background: var(--panel-3); }
.status-choice .presence-dot { margin-top: 4px; flex: 0 0 auto; }
.status-choice-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

/* ── A column of records, and the one you opened ───────────────────────────── */

/* Two panes rather than a table you scroll past. A studio with nine hundred relations reads
   its list on the left and works on the right, which is how every tool that keeps records
   ends up laid out — because it is the only shape that stays usable at nine hundred. */
.split-cols { display: flex; align-items: flex-start; gap: 14px; }
.split-detail { flex: 1; min-width: 0; }

.record-col {
  flex: 0 0 288px; width: 288px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: 8px;

  /* Its own scroll, pinned under the bar: the list stays in place while the detail on the
     right is scrolled, and the search box stays reachable. */
  position: sticky; top: calc(var(--bar-h, 44px) + 12px);
  max-height: calc(100vh - var(--bar-h, 44px) - 40px);
}

.record-search { position: relative; display: flex; }
.record-search .input { width: 100%; padding-right: 26px; }
.record-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; padding: 2px 4px;
  color: var(--text-faint); font-size: 11px;
}
.record-clear:hover { color: var(--text); }
.record-note { padding: 0 2px; }

/* De filters onder het zoekvak: één regel per groep, die openklapt. Dit staat in een smalle
   kolom naast het scherm waar het echte werk gebeurt, dus het hoort één regel hoog te zijn
   zolang je er niets mee doet. */
.record-filters { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }

.filter-drop { position: relative; display: flex; align-items: center; gap: 2px; }

.filter-head {
  display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
  padding: 3px 6px; border: 0; border-radius: 6px;
  background: none; cursor: pointer; font: inherit; font-size: 12px;
  color: var(--text-dim); text-align: left;
}
.filter-head:hover { background: var(--panel-2); color: var(--text); }
.filter-head.on { color: var(--accent); }

.filter-name { color: var(--text-faint); flex: none; }
.filter-head.on .filter-name { color: inherit; }

/* Wat er gekozen is, afgekapt in plaats van de regel breder te maken: de kolom is de kolom. */
.filter-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Het pijltje mag klein zijn maar moet wel te zien zijn: het is het enige dat verraadt dat je
   hier kunt klikken. Op negen pixels en in de flauwste kleur was het een stofje op het scherm. */
.filter-caret { flex: none; font-size: 11px; line-height: 1; color: var(--text-dim); }

.filter-off {
  flex: none; border: 0; background: none; cursor: pointer;
  color: var(--text-faint); font-size: 10px; padding: 3px 5px; border-radius: 6px;
}
.filter-off:hover { background: var(--panel-2); color: var(--text); }

/* Het uitgeklapte lijstje. Boven de lijst en niet ertussen: het hoort de records niet weg te
   duwen om vervolgens weer terug te springen zodra je gekozen hebt. */
.filter-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  margin-top: 2px; padding: 4px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  max-height: 280px; overflow-y: auto;
}
.filter-item {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 5px 7px; border: 0; border-radius: 6px;
  background: none; cursor: pointer; font: inherit; font-size: 12px;
  color: var(--text); text-align: left;
}
.filter-item:hover { background: var(--panel-2); }
.filter-item.on { color: var(--accent); font-weight: 600; }
.filter-tick { flex: none; width: 12px; font-size: 10px; }

/* ── De tijdlijn van de mijlpalen ──────────────────────────────────────────────
   Eén rij per project: links de naam, rechts een baan waarop de fasen als balken liggen en de
   mijlpalen als ruitjes staan. Alles in procenten van de baan, zodat het meeschaalt met het
   venster zonder dat er iets wordt uitgerekend dat twee keer moet kloppen. */
/* ── De projecttijdlijn ───────────────────────────────────────────────────────
   Een vaste schaal in pixels per dag (--day) op een baan van --days dagen, in een vlak dat
   horizontaal scrollt. De vorige opzet rekende naar procenten van de schermbreedte, waardoor
   drie maanden en twaalf maanden even breed waren — zie de kop van Pages/Milestones.razor.

   De namenkolom blijft links staan met position:sticky, zodat je bij maand acht nog steeds ziet
   over welk project je kijkt. */

.gantt-panel { padding: 0; overflow: hidden; }

.gantt { overflow-x: auto; overflow-y: hidden; }
.gantt-canvas { min-width: max-content; }

.gantt-head, .gantt-row { display: flex; align-items: stretch; }

.gantt-head {
  position: sticky; top: 0; z-index: 3;
  background: var(--panel); border-bottom: 1px solid var(--border-strong);
  height: 48px;
}

.gantt-row { border-top: 1px solid var(--border); }
.gantt-row:hover { background: var(--panel-2); }

.gantt-name {
  position: sticky; left: 0; z-index: 2;
  flex: none; width: 190px; padding: 8px 10px;
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; background: inherit;
  border-right: 1px solid var(--border-strong);
}

/* De hoek boven de namen hoort dezelfde achtergrond te houden als de kop, anders schuiven de
   balken er zichtbaar onderdoor. */
.gantt-head .gantt-name { background: var(--panel); z-index: 4; align-items: flex-end; padding-bottom: 6px; }
.gantt-row .gantt-name { background: var(--panel); }
.gantt-row:hover .gantt-name { background: var(--panel-2); }

.gantt-name-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-name-link {
  flex: none; color: var(--text-faint); text-decoration: none;
  font-size: 13px; padding: 0 2px; border-radius: 4px;
}
.gantt-name-link:hover { color: var(--accent); background: var(--accent-soft); }

.gantt-track {
  position: relative; flex: none;
  width: calc(var(--day) * var(--days));
  height: 78px;
}
.gantt-head .gantt-track { height: 48px; }

/* De maanden als banden, met een lijn op elke maandgrens. */
.gantt-month {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid var(--border-strong);
  display: flex; align-items: flex-end; padding: 0 0 6px 6px;
  font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden;
}
.gantt-month.now { color: var(--accent); font-weight: 600; }
.gantt-month-name { position: sticky; left: 6px; }

.gantt-week {
  position: absolute; top: 28px; bottom: 0;
  border-left: 1px solid var(--border);
  font-size: 9px; color: var(--text-faint); padding-left: 2px;
}
.gantt-week-name { position: relative; top: 2px; }

/* Vandaag: een doorlopende lijn met een vlaggetje in de kop. Zonder dat is een tijdlijn een
   plaatje van data zonder nu. */
.gantt-today {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 2px solid var(--red); opacity: .55; pointer-events: none;
}
.gantt-today-flag {
  position: absolute; bottom: 2px; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 100px; white-space: nowrap; z-index: 1;
}

.gantt-bar {
  position: absolute; top: 40px; height: 26px; border-radius: 6px;
  opacity: .85; overflow: hidden; display: flex; align-items: center;
}
.gantt-bar-name {
  padding: 0 8px; font-size: 11.5px; line-height: 26px; color: #fff;
  white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.3);
  position: sticky; left: 4px;
}

/* Een mijlpaal: een ruitje op de dag zelf, met zijn naam ernaast. De kleur zegt hoe hij ervoor
   staat — zie MilestoneHealth. */
.gantt-pin {
  position: absolute; top: 6px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  border: 0; background: none; cursor: pointer; padding: 0; z-index: 1;
}
.gantt-pin-dot {
  width: 14px; height: 14px; background: var(--accent);
  transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 0 2px var(--panel);
}
.gantt-pin-name {
  margin-top: 3px; font-size: 11px; color: var(--text-dim);
  white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.gantt-pin:hover .gantt-pin-dot { transform: rotate(45deg) scale(1.25); }
.gantt-pin:hover .gantt-pin-name { color: var(--accent); }

.gantt-pin.ok .gantt-pin-dot { background: var(--green); }
.gantt-pin.soon .gantt-pin-dot { background: var(--gold); }
.gantt-pin.late .gantt-pin-dot { background: var(--red); }
.gantt-pin.missed .gantt-pin-dot { background: var(--red); opacity: .55; }
.gantt-pin.dropped .gantt-pin-dot { background: var(--border-strong); }
.gantt-pin.track .gantt-pin-dot { background: var(--accent); }

/* De telling bovenaan: hoeveel er te laat zijn, hoeveel eraan komen. Aanklikbaar, want het is
   ook het filter. */
.health-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.health-card {
  display: flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  transition: border-color .12s, background .12s;
}
.health-card:hover:not(:disabled) { border-color: var(--border-strong); }
.health-card:disabled { opacity: .45; cursor: default; }
.health-card.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.health-count { font-size: 17px; font-weight: 700; color: var(--text); }
.health-name { font-size: 11px; }

.health-card.late .health-count, .health-card.missed .health-count { color: var(--red); }
.health-card.soon .health-count { color: var(--gold); }
.health-card.ok .health-count { color: var(--green); }

.pill-health.late, .pill-health.missed { background: var(--red); color: #fff; }
.pill-health.soon { background: var(--gold); color: #1c1c1c; }
.pill-health.ok { background: var(--green); color: #1c1c1c; }

.timeline { display: flex; flex-direction: column; gap: 2px; }

.timeline-head { display: flex; align-items: flex-end; gap: 10px; padding-bottom: 4px; }
.timeline-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; border-top: 1px solid var(--border);
}

.timeline-name {
  flex: none; width: 170px; display: flex; align-items: center; gap: 6px;
  font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.timeline-name a { color: inherit; text-decoration: none; }
.timeline-name a:hover { color: var(--accent); }

/* Twee lagen in één baan: de mijlpalen bovenin, de fasebalken eronder. Door elkaar heen las
   het als één rommelige rij — een naam als "Alfa" viel dan over het einde van een balk. */
.timeline-track { position: relative; flex: 1; min-width: 0; height: 42px; }

.timeline-month {
  position: absolute; top: 0; font-size: 10px; color: var(--text-faint);
  border-left: 1px solid var(--border); padding-left: 4px; white-space: nowrap;
}

/* Vandaag. Zonder deze lijn is een tijdlijn een plaatje. */
.timeline-now {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed var(--accent); opacity: .7;
}

.timeline-bar {
  position: absolute; top: 24px; height: 16px; border-radius: 4px;
  opacity: .75; overflow: hidden;
}
.timeline-bar-name {
  display: block; padding: 0 6px; font-size: 10px; line-height: 16px;
  color: #fff; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.25);
}

/* Een mijlpaal: een ruitje op de as met zijn naam ernaast. De naam mag over de baan heen
   lopen — hij staat boven de balken, en afkappen op een tijdlijn maakt van elke mijlpaal
   "Opleve…". */
.timeline-pin {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  border: 0; background: none; cursor: pointer; padding: 0;
}
.timeline-pin-dot {
  width: 9px; height: 9px; background: var(--accent);
  transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 0 2px var(--panel);
}
.timeline-pin-name {
  margin-top: 2px; font-size: 9px; color: var(--text-dim);
  white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis;
}
.timeline-pin:hover .timeline-pin-name { color: var(--accent); }
.timeline-pin.done .timeline-pin-dot { background: var(--green); }
.timeline-pin.late .timeline-pin-dot { background: var(--red); }
.timeline-pin.dropped .timeline-pin-dot { background: var(--border-strong); }

/* De weekdoelen onder een mijlpaal: een rijtje waarin het lopende sprint opvalt. */
.goal-row {
  display: flex; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2);
}
.goal-row.now { border-color: var(--accent); background: var(--accent-soft); }
.goal-row.past { opacity: .7; }
.goal-when { flex: none; width: 150px; font-size: 11px; color: var(--text-dim); }
.goal-what { flex: 1; min-width: 0; }
.goal-title { font-size: 13px; font-weight: 550; white-space: pre-wrap; }

/* Een opsomming zonder bolletjes, voor een venster dat opnoemt wat er ontbreekt. De ⚠ ervoor
   is het bolletje. */
.plain-list { list-style: none; margin: 8px 0; padding: 0; display: flex;
              flex-direction: column; gap: 4px; }

/* De knoppenrij onder de trap: wat je met het stuk kunt doen. Mag afbreken naar een tweede
   regel — er staat een e-mailadres tussen, en dat is nooit voorspelbaar kort. */
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* De trap boven een factuur: waar hij staat en wat er nog komt. Geen knoppen — hier valt niets
   te kiezen, de knop staat onderin — dus platte woorden met een pijl ertussen. De trede waar
   hij nu op staat draagt de accentkleur, wat erachter ligt is grijs. */
.stage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stage { font-size: 12px; color: var(--text-faint); }
.stage + .stage::before { content: "→"; margin-right: 6px; color: var(--border-strong); }
.stage.done { color: var(--text-dim); }
.stage.now {
  color: var(--accent); font-weight: 600;
  background: var(--accent-soft); border-radius: 100px; padding: 2px 10px;
}

.record-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; }

.record-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 8px; border-radius: 7px;
  background: none; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit;
}
.record-item:hover { background: var(--panel-2); }
.record-item.on { background: var(--accent-soft); color: var(--accent); }

.record-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.record-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.record-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-name { font-size: 12.5px; font-weight: 600; }

/* Where the next thirty are asked for. Empty most of the time — it is a place, not a thing. */
.record-tail { min-height: 18px; display: flex; align-items: center; justify-content: center; }

/* Narrow: the column goes back to being a list above the detail rather than beside it. */
@media (max-width: 860px) {
  .split-cols { flex-direction: column; }
  .record-col { flex: none; width: 100%; position: static; max-height: 320px; }
}

/* A heading in the bar that opens into its own parts. Looks like the tabs beside it, because
   it is one — the caret is the only thing that says there is more behind it. */
.tab-group {
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; font: inherit; border: 0;
}
.tab-caret { font-size: 9px; opacity: .7; }
.tab-group.on { background: var(--panel-3); }
.tabs .popover-anchor { display: inline-flex; }
.parts-item.on { color: var(--accent); background: var(--accent-soft); }

/* ── Papier ─────────────────────────────────────────────────────────────
   Een factuur op het scherm, in dezelfde verhoudingen als de PDF.

   Het papier is vloeiend: het neemt de breedte die het krijgt en houdt de A4-verhouding.
   Vast op 210mm was het 794px breed en dat past in geen enkele modal — dan valt de
   rechterkolom met de bedragen er precies af. Alles erin schaalt mee via cqw, één procent
   van de containerbreedte, zodat een blok op 20mm op elk formaat op dezelfde plek staat.

   De posities komen als percentage binnen, omgerekend uit de millimeters waarin ze zijn
   opgeslagen — zie InvoiceView. Millimeter blijft de eenheid waarin je ontwerpt, want dat is
   wat de drukker aanhoudt; procent is alleen hoe het scherm het tekent. */
.paper-wrap {
  overflow: auto;
  padding: 12px;
  background: var(--sunken, #101011);
  border-radius: 8px;
  container-type: inline-size;
}

.paper {
  position: relative;
  width: 100%;
  /* 210 bij 297: de hoogte volgt uit de breedte, dus het blijft een A4 wat er ook gebeurt. */
  aspect-ratio: 210 / 297;
  margin: 0 auto;
  background-color: #fff;
  background-image: var(--bg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: #1b1b1c;
  font-family: Calibri, "Segoe UI", system-ui, sans-serif;
  /* 3,2mm van 210mm breed. Alle maten hieronder op dezelfde manier omgerekend. */
  font-size: 1.52cqw;
  line-height: 1.35;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

/* De onderdelenlijst naast het papier. Hoog genoeg om erin te scrollen in plaats van de hele
   ontwerpkolom mee te laten groeien — er staan een twintig blokken in. */
.block-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.block-row { display: flex; align-items: center; gap: 6px; padding: 1px 2px; border-radius: 4px; }
.block-row.picked { background: rgba(69, 123, 162, .16); }
.block-name {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0;
  color: inherit; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.block-name:hover { text-decoration: underline; }
.block-drop {
  background: none; border: 0; color: var(--muted, #8a8a8f); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 3px;
}
.block-drop:hover { color: var(--red, #c0392b); }

/* De proefafdruk: de pagina's als plaatje, meer niet. Geen zwarte lijst, geen knoppenbalk —
   dat is precies wat de pdf-lezer van de browser erbij levert en wat hier in de weg zit. */
.proof {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-height: 78vh;
  overflow-y: auto;
  padding: 4px;
}
.proof-page {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  /* Een dun randje: zonder dat loopt een wit vel over in een witte achtergrond en zie je niet
     meer waar het papier ophoudt. */
  border: 1px solid var(--border, #2A2A2D);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
}

.paper-block { position: absolute; }

/* Tijdens ontwerpen niets selecteerbaar: shift ingedrukt houden en slepen is hier "trek een
   kader", en dat is precies het gebaar waarmee een browser anders tekst begint te markeren. */
.paper.designing { user-select: none; -webkit-user-select: none; }

/* Tijdens ontwerpen krijgt elk blok een rand, zodat je ziet waar het begint en ophoudt.
   Lichter dan voorheen: er staan er twintig op een vel, en twintig harde stippellijnen maken
   van een factuur een bouwtekening. Wie er met de muis overheen gaat krijgt de stevige rand. */
.paper.designing .paper-block {
  outline: 1px dashed rgba(69, 123, 162, .28);
  cursor: grab;
  min-width: 3.8cqw; min-height: 1.9cqw;
}
.paper.designing .paper-block:hover {
  outline: 1px dashed #457BA2;
  background: rgba(69, 123, 162, .06);
}
.paper.designing .paper-block.picked { outline: 2px solid #457BA2; background: rgba(69, 123, 162, .1); }
.paper.designing .paper-block.off { outline-style: dotted; opacity: .35; cursor: not-allowed; }
.paper.designing .paper-block.dragging { opacity: .5; cursor: grabbing; }

/* Geselecteerd met een kader eromheen: doorlopende lijn en een tint, zodat in één oogopslag
   te zien is wat er straks meegaat. Dikker dan "aangeklikt", want dit gaat over meerdere. */
.paper.designing .paper-block.selected {
  outline: 2px solid var(--gold, #c9a227);
  background: rgba(201, 162, 39, .12);
}

/* Het sleepkader zelf. Geen muisgebeurtenissen: hij ligt over de blokken heen en mag het
   aanwijzen eronder niet in de weg zitten. */
.paper-band {
  position: absolute;
  border: 1px dashed #457BA2;
  background: rgba(69, 123, 162, .1);
  pointer-events: none;
  z-index: 5;
}

/* Het naamplaatje van een blok tijdens het ontwerpen.

   Standaard weg. Het stond boven elk blok tegelijk, en zodra twee blokken dicht op elkaar
   staan — de vier regels onder de kop staan vijf millimeter uit elkaar — landt het plaatje van
   de een op de inhoud van de ander. Dan kijk je naar een vel vol blauwe woorden in plaats van
   naar je factuur.

   Nu alleen bij het blok waar je overheen gaat of dat je hebt aangeklikt. Dan is er er hoogstens
   één in beeld, en die hoort er op dat moment ook te zijn. */
.paper-tag {
  position: absolute; top: -2cqw; left: 0;
  font-size: 1.1cqw; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: #457BA2; border-radius: 3px;
  padding: .1cqw .4cqw; white-space: nowrap;
  font-family: system-ui, sans-serif;
  /* Nooit in de weg bij het pakken: het plaatje ligt over het blok eronder heen. */
  pointer-events: none;
  display: none;
  z-index: 6;
}

.paper.designing .paper-block:hover > .paper-tag,
.paper.designing .paper-block.picked > .paper-tag,
.paper.designing .paper-block.selected > .paper-tag { display: block; }

.paper-heading { font-size: 2.86cqw; font-weight: 650; }
.paper-customer { font-size: 1.67cqw; }
.paper-text { white-space: pre-wrap; }
.paper-small { font-size: 1.24cqw; color: #4a4a4e; white-space: pre-wrap; }

.paper-meta { width: 100%; border-collapse: collapse; }
.paper-meta-label { font-size: 1.24cqw; color: #6e6e72; padding: .14cqw 0; }
.paper-meta-value { text-align: right; padding: .14cqw 0; }

.paper-lines { width: 100%; border-collapse: collapse; table-layout: fixed; }
.paper-lines th {
  text-align: left; font-size: 1.24cqw; font-weight: 650; text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 1px solid #6e6e72; padding: .48cqw .38cqw;
}
.paper-lines th.right, .paper-lines td.right { text-align: right; }
.paper-lines td {
  padding: .43cqw .38cqw; border-bottom: 1px solid #d3d3d6; vertical-align: top;
  overflow-wrap: anywhere;
}

/* De drie tabelstijlen uit het sjabloon. Zonder klasse blijft het de lijn onder elke regel
   die Oifis altijd al tekende; dit zijn de twee andere standen. */
.paper-lines.plain th, .paper-lines.plain td { border: 0; }
.paper-lines.grid th, .paper-lines.grid td { border: 1px solid #6e6e72; }

/* Een kader om een blok, met dezelfde lucht ertussen als de pdf aanhoudt. */
.paper-block.bordered {
  border: 1px solid #6e6e72;
  padding: .72cqw;
  box-sizing: border-box;
}

.paper-text.bold, .paper-lines td.bold { font-weight: 650; }

/* Een bedrag in een kolom: teken tegen links, getal tegen rechts. Zo staan de tekens onder
   elkaar en de komma's ook — zie MoneyCell.razor. */
.money {
  display: flex;
  justify-content: space-between;
  gap: .6cqw;
  white-space: nowrap;
}

.paper-totals { border-collapse: collapse; width: 100%; }
.paper-totals td { padding: .19cqw 0; }
.paper-totals td.right { text-align: right; }
.paper-total-row td { border-top: 1px solid #6e6e72; font-weight: 650; padding-top: .48cqw; }

/* De ontwerpkant: op een smal scherm onder elkaar in plaats van naast elkaar, want een
   papier van een derde schermbreedte is niet te ontwerpen. */
@media (max-width: 900px) {
  .paper-wrap { padding: 6px; }
}
/* Productieplanning: de gantt van een showcase (ProductionGantt.razor). De baan begint na de
   namenkolom; de lijnen voor vandaag, build lock en showcase liggen over alle rijen heen. */
.pgantt { position: relative; --pg-name: 230px; }
.pgantt-axis { position: relative; height: 22px; margin-left: var(--pg-name); font-size: 11px; color: var(--text-dim); }
.pgantt-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.pgantt-row { display: flex; align-items: center; min-height: 26px; border-top: 1px solid var(--border); }
.pgantt-row.feature { font-weight: 600; background: var(--panel-2); }
.pgantt-name { width: var(--pg-name); flex: none; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pgantt-row:not(.feature) .pgantt-name { padding-left: 14px; font-weight: 400; color: var(--text-dim); }
.pgantt-lane { position: relative; flex: 1; height: 16px; }
.pgantt-bar { position: absolute; top: 3px; height: 10px; border-radius: 5px; background: var(--accent, #4C8DFF); opacity: .85; }
.pgantt-bar.done { opacity: .35; }
.pgantt-marks { position: absolute; top: 0; bottom: 0; left: var(--pg-name); right: 0; pointer-events: none; }
.pgantt-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.pgantt-mark.today, .pgantt-key.today { background: #4C8DFF; }
.pgantt-mark.lock, .pgantt-key.lock { background: #D9534F; }
.pgantt-mark.show, .pgantt-key.show { background: #E8A33D; }
.pgantt-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 12px; }
