/* Layout: inktzwarte kop, werkbalk met filters, daaronder horizontaal scrollende kanban-kolommen; een kans opent in een zijpaneel.
   Kleuren uit de huisstijl van de nieuwe iTeachers-website, met een donkere variant. */
:root {
  --page: #f4f2f0; --surface: #ffffff; --card: #f4f2f0;
  --fg: #131312; --text2: #47453f; --hint: #5d5b57; --line: #c9c5bf; --line2: #e4e0da;
  --accent: #d85626; --blue: #65c8f3; --green: #6dbd88; --on-chip: #131312;
  --btn-bg: #131312; --btn-fg: #ffffff;
  --band: #131312; --band-fg: #ffffff; --band-fg2: #d6d2cc;
  --scrim: rgba(19,19,18,.45); --shadow: rgba(19,19,18,.2);
  --head: 'Schibsted Grotesk', Arial, sans-serif;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0e0e0d; --surface: #1a1918; --card: #262422;
    --fg: #f4f2f0; --text2: #cfcac3; --hint: #a39e97; --line: #4a4743; --line2: #33312e;
    --accent: #e2683a; --blue: #65c8f3; --green: #6dbd88; --on-chip: #131312;
    --btn-bg: #f4f2f0; --btn-fg: #131312;
    --band: #1f1d1b; --band-fg: #ffffff; --band-fg2: #cfcac3;
    --scrim: rgba(0,0,0,.6); --shadow: rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0e0e0d; --surface: #1a1918; --card: #262422;
  --fg: #f4f2f0; --text2: #cfcac3; --hint: #a39e97; --line: #4a4743; --line2: #33312e;
  --accent: #e2683a; --blue: #65c8f3; --green: #6dbd88; --on-chip: #131312;
  --btn-bg: #f4f2f0; --btn-fg: #131312;
  --band: #1f1d1b; --band-fg: #ffffff; --band-fg2: #cfcac3;
  --scrim: rgba(0,0,0,.6); --shadow: rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--page); color: var(--fg); }
body { font: 16px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--head); font-weight: 800; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
a { color: var(--fg); text-underline-offset: 3px; text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 700 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 24px; height: 4px; border-radius: 2px; background: var(--accent); flex: none; }

/* Kop */
.top { background: var(--band); color: var(--band-fg); border-bottom: 1px solid var(--line2); }
.top .in { max-width: 1680px; margin: 0 auto; padding-block: 22px 26px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }
/* Het logo is even breed als de tekst eronder: de kolom krijgt de breedte van de breedste regel. */
.brand { display: grid; gap: 14px; width: max-content; max-width: 100%; min-width: 0; }
/* width:0 + min-width:100%: het logo telt niet mee voor de kolombreedte en vult precies de breedte van de tekstregel. */
.brand img { width: 0; min-width: 100%; height: auto; display: block; }
.brand .eyebrow { color: var(--band-fg2); white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Rechterkant van de kop: ingelogde gebruiker bovenaan, cijfers eronder, alles rechts uitgelijnd. */
.side { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; margin-left: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 10px 16px; min-width: 112px; }
.stat b { display: block; font: 800 26px/1 var(--head); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--band-fg2); }
.me { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--band-fg2); text-align: right; }
.me img { width: 32px; height: 32px; border-radius: 50%; }
.theme { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.theme button { border: 0; background: none; color: var(--text2); border-radius: 999px; padding: 7px 12px; font: 700 13px/1 var(--body); cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }

/* Zwevende instellingenknop rechtsonder */
.instel { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: grid; justify-items: end; gap: 10px; }
.instel-knop { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 8px 24px var(--shadow); display: grid; place-items: center; cursor: pointer; }
.instel-knop svg { transition: transform .25s ease; }
.instel-knop:hover svg, .instel-knop[aria-expanded="true"] svg { transform: rotate(60deg); }
.instel-paneel { background: var(--surface); color: var(--fg); border: 1px solid var(--line2); border-radius: 18px; padding: 16px; box-shadow: 0 16px 40px var(--shadow); display: grid; gap: 12px; min-width: 250px; }
.instel-kop { margin: 0; font: 700 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--hint); }
.instel-paneel .btn { justify-content: center; }

/* Werkbalk */
.bar { background: var(--surface); border-bottom: 1px solid var(--line2); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
.bar .in { max-width: 1680px; margin: 0 auto; padding-block: 12px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.search { flex: 1 1 220px; max-width: 360px; min-width: 0; }
.search input { width: 100%; border: 2px solid var(--line); border-radius: 999px; padding: 9px 16px; background: var(--surface); }
.search input:focus { border-color: var(--fg); outline: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg > span { font-size: 13px; color: var(--hint); margin-right: 2px; }
.chipbtn { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-weight: 700; font-size: 14px; cursor: pointer; }
.chipbtn[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text2); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.bar .new { margin-left: auto; }

/* Bord */
.board-wrap { overflow-x: auto; padding-block: 22px 100px; scroll-snap-type: x proximity; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; max-width: 1680px; margin: 0 auto; min-width: min-content; }
.col { background: var(--surface); border-radius: 22px; display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; border-top: 6px solid var(--c, var(--line)); }
.col header { padding: 16px 18px 10px; display: grid; gap: 2px; }
.col header h2 { font-size: 19px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.col header h2 span { font: 700 14px/1 var(--body); color: var(--hint); font-variant-numeric: tabular-nums; }
.col header p { margin: 0; font-size: 13px; color: var(--hint); }
.col .list { padding: 6px 12px 16px; display: grid; gap: 10px; align-content: start; min-height: 120px; flex: 1; border-radius: 0 0 22px 22px; transition: background .15s; }
.col.drop .list { background: var(--card); }
.empty { font-size: 14px; color: var(--hint); padding: 10px 6px; }

.card { background: var(--card); border-radius: 16px; padding: 14px 14px 12px; display: grid; gap: 7px; cursor: pointer; border: 2px solid transparent; min-width: 0; }
.card:hover { border-color: var(--line); }
.card[aria-busy="true"] { opacity: .6; }
.card.off { opacity: .55; }
.card h3 { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.card .org { font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { display: inline-block; font: 700 12px/1 var(--body); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); white-space: nowrap; }
.pill.urgent { background: var(--accent); border-color: var(--accent); color: var(--on-chip); }
.pill.ink { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.pill.blue { background: var(--blue); border-color: var(--blue); color: var(--on-chip); }
.pill.green { background: var(--green); border-color: var(--green); color: var(--on-chip); }
.pill.hand { border-style: dashed; }
.fit { font: 700 12px/1 var(--body); color: var(--hint); white-space: nowrap; }
.fit i { font-style: normal; letter-spacing: 1px; color: var(--accent); }
.fit i + i { color: var(--line); }
.owner { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2); min-width: 0; }
.owner img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner.none { color: var(--hint); font-style: italic; }

.state { max-width: 640px; margin: 40px auto; background: var(--surface); border-radius: 22px; padding: 28px; display: grid; gap: 10px; }

/* Zijpaneel en vensters */
#detail { border: 0; padding: 0; margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(560px, 100%); max-width: 100%; background: var(--surface); color: var(--fg); box-shadow: -12px 0 40px var(--shadow); }
#afwijs, #nieuw { border: 0; padding: 0; margin: auto; width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); border-radius: 22px; background: var(--surface); color: var(--fg); box-shadow: 0 20px 60px var(--shadow); }
#nieuw { width: min(720px, calc(100% - 32px)); }
#afwijs .panel { height: auto; padding: 26px 26px 24px; }
dialog::backdrop { background: var(--scrim); }
.redenen { display: grid; gap: 6px; }
.reden { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 2px solid var(--line2); border-radius: 14px; cursor: pointer; }
.reden:has(input:checked) { border-color: var(--fg); background: var(--card); }
.reden input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.afw { font-size: 13px; color: var(--text2); background: var(--surface); border-radius: 10px; padding: 6px 9px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.afw b { color: var(--fg); }
.les { background: var(--card); border-radius: 14px; padding: 10px 14px; font-size: 14px; display: grid; gap: 4px; }
.les b { font-family: var(--head); }
.panel { height: 100%; overflow-y: auto; display: grid; align-content: start; gap: 18px; padding-block: max(22px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-bottom, 0px)); padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.panel .close { justify-self: end; border: 2px solid var(--fg); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.panel h2 { font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.panel .org { color: var(--text2); margin-top: 6px; }
.aanpak { border-left: 4px solid var(--accent); padding: 2px 0 2px 14px; }
.panel p { margin: 0; }
.field { display: grid; gap: 6px; }
.field > label, .field > .lab { font: 700 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--hint); }
select { border: 2px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--surface); max-width: 100%; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); border-radius: 999px; padding: 10px 18px; font: 700 15px/1 var(--head); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--fg); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-chip); }
.btn:disabled { opacity: .5; cursor: default; }
.links { display: grid; gap: 10px; }
.links .url { display: block; font-size: 13px; color: var(--hint); overflow-wrap: anywhere; margin-top: 4px; }
.who { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.picker { position: relative; }
.picker input { width: 100%; border: 2px solid var(--line); border-radius: 999px; padding: 9px 16px; background: var(--surface); }
.hits { list-style: none; margin: 6px 0 0; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: grid; gap: 2px; }
.hits button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left; }
.hits button:hover, .hits button:focus-visible { background: var(--card); }
.hits img { width: 24px; height: 24px; border-radius: 50%; }
.notes { display: grid; gap: 10px; }
.note { background: var(--card); border-radius: 14px; padding: 10px 14px; display: grid; gap: 4px; }
.note .meta { font-size: 12px; color: var(--hint); display: flex; align-items: center; gap: 6px; }
.note .meta img { width: 18px; height: 18px; border-radius: 50%; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
textarea { width: 100%; min-height: 84px; border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; resize: vertical; background: var(--surface); }
.msg { font-size: 14px; color: var(--text2); }
.msg.err { color: var(--fg); background: var(--card); border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 8px; }
.sub { font-size: 13px; color: var(--hint); }
.contact { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 15px; margin: 0; }
.contact dt { color: var(--hint); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* Venster "Nieuwe kans" (zelfde opbouw als een nieuwe opdracht in de Planner: kop, blokken, voet) */
.dlg { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.dlg-h { display: flex; gap: 12px; align-items: flex-start; padding: 22px 26px 16px; border-bottom: 1px solid var(--line2); }
.dlg-h > div { flex: 1; min-width: 0; display: grid; gap: 8px; }
.dlg-h .sub { font-size: 14px; }
.x { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--hint); padding: 2px 8px; border-radius: 8px; cursor: pointer; }
.x:hover { background: var(--card); color: var(--fg); }
.dlg-c { padding: 18px 26px; overflow-y: auto; display: grid; gap: 20px; }
.dlg-f { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 26px 18px; border-top: 1px solid var(--line2); }
.dlg-f .sp { flex: 1; }
.fs { display: grid; gap: 12px; }
.fs + .fs { padding-top: 18px; border-top: 1px solid var(--line2); }
.fs h3 { font-size: 17px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }
.f { display: grid; gap: 5px; font-size: 14px; font-weight: 700; color: var(--text2); min-width: 0; }
.f input, .f select, .f textarea { font-weight: 400; color: var(--fg); font-size: 15px; width: 100%; }
.f input { border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; background: var(--surface); }
.f select { border-radius: 12px; }
.f textarea { min-height: 72px; border-radius: 12px; }
.f input[aria-invalid="true"], .f textarea[aria-invalid="true"] { border-color: var(--accent); }
.f .hint { font-weight: 400; font-size: 13px; color: var(--hint); }
.req { color: var(--accent); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; color: var(--fg); }
.choices input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Eigen server: inloggen, team, kleine knoppen ---------- */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.linkbtn { border: 0; background: none; color: var(--band-fg2); font: 700 14px/1 var(--body); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); cursor: pointer; padding: 4px 2px; }
.linkbtn:hover { color: var(--band-fg); }
.inlog { min-height: 100vh; display: grid; place-items: center; background: var(--band); padding-block: 32px; }
.inlogkaart { width: min(440px, 100%); display: grid; gap: 18px; }
/* Logo en tekstregel gecentreerd en precies even breed: de breedte komt van de tekst, het logo vult die. */
.inlogmerk { display: grid; gap: 12px; width: max-content; max-width: 100%; justify-self: center; }
.inlogmerk img { width: 0; min-width: 100%; height: auto; display: block; }
.inlogmerk .eyebrow { color: var(--band-fg2); white-space: nowrap; }
.inlogform { background: var(--surface); color: var(--fg); border-radius: 22px; padding: 26px; display: grid; gap: 14px; }
.inlogform h1 { font-size: 30px; }
.inlogform p { margin: 0; }
.inlogform .btn { justify-content: center; }
.btn.klein { padding: 7px 12px; font-size: 13px; }
.teamlijst { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.teamrij { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.teamrij img { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.teamnaam { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.teamnaam span { font-size: 13px; color: var(--hint); overflow-wrap: anywhere; }
.teamknoppen { display: flex; flex-wrap: wrap; gap: 6px; }
.teammelding { background: var(--card); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.teammelding p { margin: 0; }
.linkrij { display: flex; flex-wrap: wrap; gap: 8px; }
.linkveld { flex: 1 1 260px; min-width: 0; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); font: 13px/1.3 ui-monospace, Menlo, Consolas, monospace; }
#team { border: 0; padding: 0; margin: auto; width: min(720px, calc(100% - 32px)); max-height: calc(100% - 32px); border-radius: 22px; background: var(--surface); color: var(--fg); box-shadow: 0 20px 60px var(--shadow); }
