/* WorkDesk: de werkomgeving van de editors.
   Zelfde huisstijl als Mijn NWW (Satoshi, blauwzwart #011920, oranje #FF6B2B),
   maar dichter op elkaar: dit is gereedschap, geen etalage. Alles staat in dit
   bestand, zodat de tool niets van het klantportaal nodig heeft. */

@font-face { font-family: 'Satoshi'; src: url('/werkdesk-assets/fonts/Satoshi-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/werkdesk-assets/fonts/Satoshi-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/werkdesk-assets/fonts/Satoshi-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/werkdesk-assets/fonts/Satoshi-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light;
  --page: #FBFBF9;
  --ink: #011920;
  --surface: #FFFFFF;
  --surface-2: #F4F6F4;
  --line: #E2E6E5;
  --line-strong: #CFD6D5;
  --muted: #526167;
  --dim: #7C8D92;
  --accent: #FF6B2B;
  --accent-ink: #C2410C;
  --good: #1C6B45;
  --warn: #B4560A;
  --crit: #8A211F;
  --pad: clamp(16px, 3vw, 36px);
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }

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

/* ---- balk ---- */

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.merk { display: flex; align-items: center; gap: 10px; }
.merk img { height: 22px; width: auto; }
.merk span { border-left: 1px solid var(--line); padding-left: 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
.merk strong { color: var(--ink); font-weight: 900; }

.tabs { display: flex; gap: 4px; margin-left: auto; }

.tabs a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current='page'] { background: var(--ink); color: #fff; }

.wie { display: flex; align-items: center; gap: 10px; }
.wie .naam { font-size: 13px; color: var(--muted); }
.rol-chip { padding: 3px 8px; border-radius: 999px; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); }
.taal-knop { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 8px; font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; }
.taal-knop[aria-pressed='true'] { border-color: var(--accent); background: rgb(255 107 43 / 10%); color: var(--accent-ink); }

main { flex: 1; width: min(1180px, 100%); margin: 0 auto; padding: clamp(20px, 3vw, 34px) var(--pad) 60px; }

.kop { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.kop .eyebrow { color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---- knoppen ---- */

.knop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.knop:hover { border-color: var(--ink); }
.knop.primair { border-color: var(--accent); background: var(--accent); color: #fff; }
.knop.primair:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.knop.stil { border-color: transparent; background: var(--surface-2); }
.knop:disabled { opacity: .5; cursor: not-allowed; }
.knop.klein { padding: 6px 12px; font-size: 13px; }

.filters { display: flex; gap: 6px; }

/* ---- jobkaarten ---- */

.jobs { display: grid; gap: 12px; }

.job {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.job:hover { border-color: var(--line-strong); }
.job.laat { border-color: rgb(138 33 31 / 35%); }
.job.geblokkeerd { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, #FCFAF7 10px, #FCFAF7 20px); }

.job-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.job-titel { display: grid; gap: 3px; }
.job-titel strong { font-size: 16px; }
.job-titel small { color: var(--dim); font-size: 12px; }
.job-punten { text-align: right; font-weight: 900; font-size: 18px; white-space: nowrap; }
.job-punten span { font-size: 11px; font-weight: 700; color: var(--dim); }

.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.chip.fase-ingepland { background: #EEF1F1; }
.chip.fase-in-productie { background: #E8F1EC; color: var(--good); border-color: rgb(28 107 69 / 20%); }
.chip.fase-review-klaar { background: rgb(255 107 43 / 12%); color: var(--accent-ink); border-color: rgb(255 107 43 / 30%); }
.chip.fase-revisie { background: #FBF0E4; color: var(--warn); border-color: rgb(180 86 10 / 25%); }
.chip.fase-af { background: #EDF3F0; color: var(--good); }
.chip.spoed { background: rgb(138 33 31 / 8%); color: var(--crit); border-color: rgb(138 33 31 / 25%); }
.chip.laat { background: rgb(138 33 31 / 12%); color: var(--crit); border-color: rgb(138 33 31 / 35%); }

/* ---- detail ---- */

.detail { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); align-items: start; }
.kaart { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: grid; gap: 12px; }
.kaart h2 { font-size: 16px; }
.briefing { white-space: pre-wrap; color: var(--muted); font-size: 14px; line-height: 1.65; }

.regels { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.regels li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.regels li:last-child { border-bottom: 0; }

.gegevens { display: grid; gap: 8px; margin: 0; }
.gegevens div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.gegevens dt { color: var(--dim); font-size: 12px; font-weight: 700; }
.gegevens dd { margin: 0; font-size: 14px; }

.acties { display: flex; flex-wrap: wrap; gap: 8px; }

.checklist { display: grid; gap: 8px; }
.checklist label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.veld { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 14px; background: var(--surface); }
.veld:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.historie { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.historie li { display: flex; gap: 8px; }
.historie time { color: var(--dim); white-space: nowrap; }

/* ---- toewijzen ---- */

.bezetting { display: grid; gap: 10px; }
.bez-rij { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bez-balk { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bez-balk i { display: block; height: 100%; background: var(--good); }
.bez-balk.vol i { background: var(--crit); }

.leeg { padding: 28px; border: 1px dashed var(--line-strong); border-radius: 16px; text-align: center; color: var(--muted); background: var(--surface); }

.melding { padding: 12px 16px; border-radius: 12px; background: rgb(255 107 43 / 10%); color: var(--accent-ink); font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.melding.fout { background: rgb(138 33 31 / 10%); color: var(--crit); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; opacity: 0; transition: opacity 180ms ease, transform 180ms ease; z-index: 50; }
.toast.op { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.fout { background: var(--crit); }

.inlog { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.inlog-kaart { width: min(420px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: grid; gap: 14px; text-align: center; }

@media (max-width: 860px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .bez-rij { grid-template-columns: minmax(0, 1fr) auto; }
  .bez-balk { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px var(--pad); gap: 10px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
  .wie { margin-left: auto; }
  .job-kop { flex-direction: column; }
  .job-punten { text-align: left; }
  .gegevens div { grid-template-columns: minmax(0, 1fr); }
}
