:root {
  --ink: #17322d;
  --ink-2: #4b615c;
  --canvas: #edf0ec;
  --surface: #ffffff;
  --line: #cfd8d2;
  --signal: #f0b81b;
  --signal-soft: #fdf1cc;
  --good: #2f6b4f;
  --hot: #1f4fa3;
  --bad: #a3262a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --r-sm: 4px;
  --r-md: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .3em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin-top: 2.5rem; }
.muted { color: var(--ink-2); margin: 0; }
.small { font-size: .875rem; }
.hint { display: block; font-size: .8rem; color: var(--ink-2); font-weight: 400; margin-top: .25rem; }

/* kopbalk */
.top { display: flex; align-items: center; gap: 2rem; padding: .9rem clamp(1rem, 4vw, 3rem);
  background: var(--ink); color: #fff; flex-wrap: wrap; }
.top a { color: #fff; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; flex: 1; flex-wrap: wrap; }
.top nav a { text-decoration: none; opacity: .75; padding: .2rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { opacity: 1; }
.top nav a[aria-current] { opacity: 1; border-color: var(--signal); }
button.link { background: none; border: 0; color: #fff; opacity: .75; cursor: pointer; font: inherit; }

main { max-width: 1180px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.head-row form { display: flex; align-items: center; gap: .75rem; }

/* knoppen */
.btn { display: inline-block; font: 600 .95rem var(--body); padding: .6rem 1.1rem; border-radius: var(--r-sm);
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--canvas); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #0f2420; }
.btn.quiet { border-color: transparent; background: transparent; text-decoration: underline; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; }

.live { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--good); }
.live::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 rgba(47,107,79,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .5rem rgba(47,107,79,0); } 100% { box-shadow: 0 0 0 0 rgba(47,107,79,0); } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }

.flash { background: var(--surface); border-left: 4px solid var(--good); padding: .7rem 1rem; margin: 0 0 1.5rem; }
.notice { background: var(--signal-soft); border-left: 4px solid var(--signal); padding: .9rem 1rem; margin-bottom: 1.5rem; }

/* pijplijn: het ene opvallende element */
.pipeline { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid;
  grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pipeline li a { display: flex; flex-direction: column; justify-content: flex-end; min-height: 128px;
  padding: 1rem 1.6rem 1rem 1.9rem; background: var(--surface); text-decoration: none; height: 100%;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); }
.pipeline li:first-child a { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); padding-left: 1.2rem; }
.pipeline li a:hover { background: #f7f9f7; }
.pipeline .n { font: 700 2.6rem/1 var(--display); letter-spacing: -.03em; }
.pipeline .l { font-size: .85rem; color: var(--ink-2); margin-top: .35rem; }
.pipeline li.has a { background: var(--signal); }
.pipeline li.has .l { color: var(--ink); font-weight: 600; }
.pipeline li.hot .n { color: var(--hot); }
@media (max-width: 820px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li a, .pipeline li:first-child a { clip-path: none; min-height: 96px; padding: 1rem; }
}

/* logboek */
.log { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: var(--r-md); }
.log li { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 1rem; padding: .7rem 1rem;
  border-bottom: 1px solid var(--canvas); font-size: .92rem; }
.log li:last-child { border: 0; }
.log .who { color: var(--ink-2); }
.log a { text-decoration: none; }
.log a:hover { text-decoration: underline; }
.log time { color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
@media (max-width: 600px) { .log li { grid-template-columns: 1fr; gap: .1rem; } }
.empty { background: var(--surface); padding: 2rem; border-radius: var(--r-md); color: var(--ink-2); max-width: 60ch; }

/* tabel */
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters a { padding: .3rem .75rem; border-radius: 999px; text-decoration: none; font-size: .88rem; border: 1px solid var(--line); background: var(--surface); }
.filters a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--canvas); vertical-align: top; }
th { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: var(--r-sm); white-space: nowrap;
  background: var(--canvas); color: var(--ink-2); }
.chip.action { background: var(--signal); color: var(--ink); }
.chip.good { background: #dcebe3; color: var(--good); }
.chip.hot { background: #dde6f6; color: var(--hot); }
.chip.bad, .bad-text { color: var(--bad); }
.chip.bad { background: #f6dede; }

/* detail */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.facts { background: var(--surface); padding: 1.25rem; border-radius: var(--r-md); }
.facts dl { margin: 0 0 1rem; }
.facts dt { font-size: .8rem; color: var(--ink-2); margin-top: .8rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .row .btn { width: 100%; }
.work { display: grid; gap: 1.5rem; min-width: 0; }
.mail, .sent-mail { background: var(--surface); padding: 1.25rem; border-radius: var(--r-md); }
.sent-mail pre { white-space: pre-wrap; font: inherit; margin: 0; }
.preview { background: var(--surface); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.preview-bar { display: flex; gap: .8rem; padding: .55rem 1rem; font-size: .85rem; border-bottom: 1px solid var(--line); }
.preview-bar span { font-weight: 600; }
.preview-bar a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview iframe { width: 100%; height: 640px; border: 0; display: block; }

/* formulieren */
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
input, textarea { font: 400 1rem var(--body); color: var(--ink); padding: .6rem .7rem; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); width: 100%; }
input:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { line-height: 1.5; resize: vertical; }
.settings { display: grid; gap: 1.5rem; max-width: 820px; }
fieldset { border: 0; background: var(--surface); padding: 1.5rem; border-radius: var(--r-md); margin: 0; display: grid; gap: 1rem; }
legend { font: 700 1.15rem var(--display); float: left; width: 100%; }
fieldset > .hint { margin: -.5rem 0 0; }
.grid2, .grid3 { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.grid3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* inlog */
body.auth main { min-height: 100vh; display: grid; place-items: center; }
.auth-box { width: min(420px, 100%); }
.brand-big { font-size: 3.2rem; letter-spacing: -.04em; }
.lede { color: var(--ink-2); margin: 0 0 2rem; max-width: 36ch; }

@media (max-width: 700px) {
  .top { gap: .6rem 1rem; }
  .top form { margin-left: auto; }
  .top nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 1rem; white-space: nowrap; }
}

.hidden { display: none !important; }
.flash.err { border-color: var(--bad); }
.loading { color: var(--ink-2); padding: 2rem 0; }
button[disabled] { opacity: .6; cursor: wait; }
