:root {
  --inkt: #1b1b1f;
  --grijs: #6a6a72;
  --lijn: #e3e3e8;
  --vlak: #f7f7f9;
  --accent: #1f4e5f;
  --accent-licht: #e8f0f2;
  --wit: #ffffff;
  --rood: #a3342c;
  --rood-licht: #f6e4e2;
  --radius: 6px;
}

* { box-sizing: border-box; }

/* Het kenmerk hidden wint altijd, ook van een display die verderop gezet wordt */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--inkt);
  background: var(--wit);
}

/* ---------------------------------------------------------------- kop */

#kop {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--lijn);
  background: var(--accent);
  color: var(--wit);
  position: sticky;
  top: 0;
  z-index: 23;   /* boven het Claude-paneel (22), zodat het menu rechtsboven niet bedekt wordt, onder de dossierlijst (24, 25) */
}
#kop h1 { font-size: 17px; margin: 0; font-weight: 600; }
#kop h1 button { background: none; border: none; color: var(--wit); font: inherit; padding: 0; cursor: pointer; }
#kop h1 button:hover { background: none; text-decoration: underline; }
/* naam van het kantoor kleiner naast de naam van de app */
#kop h1 .kantoor { font-size: 12px; font-weight: 400; opacity: .8; margin-left: 4px; }
/* rondje met initialen rechtsboven, met daaronder het menu */
#gebruiker { margin-left: auto; position: relative; }
#kop #gebruikerknop {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
  background: var(--wit);
  color: var(--accent);
  border: none;
  font-weight: 700;
  font-size: 13px;
}
#gebruikersmenu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 260px;
  background: var(--wit);
  color: var(--inkt);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 6px;
  z-index: 35;
}
#gebruikersmenu #wie { padding: 6px 10px 8px; border-bottom: 1px solid var(--lijn); margin-bottom: 4px; }
#kop #gebruikersmenu button {
  display: block; width: 100%; text-align: left;
  background: none; color: var(--inkt); border: none;
  padding: 8px 10px; border-radius: var(--radius); font-size: 14px;
}
#kop #gebruikersmenu button:hover { background: var(--accent-licht); }
#kop #gebruikersmenu button.actief { font-weight: 600; color: var(--accent); }
#kop button {
  background: rgba(255,255,255,.15);
  color: var(--wit);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
#kop button:hover { background: rgba(255,255,255,.25); }

#hoofdnav { display: flex; gap: 4px; }
#hoofdnav button { border-color: transparent; background: none; opacity: .8; }
#hoofdnav button.actief { background: rgba(255,255,255,.22); opacity: 1; font-weight: 600; }

/* dossierveld en timer in de balk */
#dossierkiezer { flex: 1; min-width: 160px; max-width: 480px; }
#dossierzoek {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,.12);
  color: var(--wit);
  font-size: 14px;
}
#dossierzoek::placeholder { color: rgba(255,255,255,.7); }
#dossierzoek:focus { background: var(--wit); color: var(--inkt); outline: none; }
#timer { display: flex; align-items: center; gap: 8px; }
#timerklok { font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; }
#timernaam { font-size: 13px; opacity: .85; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#kop #timerstop { background: var(--rood); border-color: var(--rood); }

#timerafwezig, #timerafsluiten {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 14px;
  z-index: 30;
}
#timerafsluiten label { display: block; font-size: 12px; color: var(--grijs); margin: 10px 0 3px; }
#timerafsluiten input, #timerafsluiten textarea {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}
#timerafsluiten .knoppen { margin-top: 12px; }
#timerafwezig { z-index: 31; }
#afwezigtekst { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.knoppen.kolom { flex-direction: column; align-items: stretch; }

/* ---------------------------------------------------------------- opbouw */

main { display: flex; min-height: calc(100vh - 53px); }

/* De dossierlijst schuift over het scherm, ze staat niet vast in beeld */
#sluier { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 24; }
#zijbalk {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  border-right: 1px solid var(--lijn);
  display: flex;
  flex-direction: column;
  background: var(--vlak);
  z-index: 25;
  box-shadow: 4px 0 18px rgba(0,0,0,.15);
}

.zoekbalk { padding: 10px; border-bottom: 1px solid var(--lijn); display: flex; gap: 8px; }
.zoekbalk input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--wit);
}

.paneeloptie {
  text-align: left;
  background: var(--accent-licht);
  border: none;
  border-bottom: 1px solid var(--lijn);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
}
.paneeloptie:hover { background: #d9e6ea; }

.lijst { flex: 1; overflow-y: auto; }

table.overzicht td.open { cursor: pointer; }
table.overzicht td.naarprestaties { cursor: pointer; white-space: nowrap; }
table.overzicht td.uitklap { cursor: pointer; white-space: nowrap; }
table.overzicht tr.detail td { background: var(--vlak); padding: 4px 8px 4px 24px; }
table.overzicht tr.detail:hover td { background: var(--vlak); }
table.overzicht tr.detail .item { border-top: none; border-bottom: 1px solid var(--lijn); cursor: default; }
.taakbewerk input, .taakbewerk select { padding: 4px 6px; border: 1px solid var(--lijn); border-radius: var(--radius); font-size: 13px; font-family: inherit; background: var(--wit); }
.taakbewerk input[type=date] { width: 140px; }
.taakbewerk input.verlopen { border-color: var(--rood); }
.taakbewerk .wat { padding: 3px 6px; border-radius: var(--radius); cursor: text; }
.taakbewerk.klaar { opacity: .45; }
.taakbewerk.klaar .wat { text-decoration: line-through; }
.taakbewerk .wat:hover { background: var(--accent-licht); }
.taakbewerk .wat:focus { outline: 2px solid var(--accent); background: var(--wit); }
table.overzicht td.bewerkbaar[contenteditable=true] { cursor: text; min-width: 160px; }
table.overzicht td.bewerkbaar[contenteditable=true]:hover { background: var(--accent-licht); }
table.overzicht td.bewerkbaar:focus { outline: 2px solid var(--accent); background: var(--wit); }
table.overzicht td.bewerkbaar[data-materie]:not([data-materie=""])::before { content: attr(data-materie) " · "; color: var(--grijs); }
#overzichtzoek { padding: 7px 10px; border: 1px solid var(--lijn); border-radius: var(--radius); font-size: 14px; width: 320px; max-width: 100%; }
.tabkop h2 { margin: 0; font-size: 20px; }

.rij {
  padding: 9px 12px;
  border-bottom: 1px solid var(--lijn);
  cursor: pointer;
}
.rij:hover { background: var(--accent-licht); }
.rij.actief { background: var(--accent-licht); box-shadow: inset 3px 0 0 var(--accent); }
.rij .titel { font-weight: 600; font-size: 14px; }
.rij .onder { font-size: 12px; color: var(--grijs); margin-top: 2px; }

.zijvoet {
  padding: 8px 10px;
  border-top: 1px solid var(--lijn);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--grijs);
}

#paneel { flex: 1; padding: 18px 22px 40px; max-width: 1400px; }

.leegstaand { color: var(--grijs); padding: 40px 0; text-align: center; }

#dossierkop h2 { margin: 0 0 2px; font-size: 20px; }
#developer h2 { margin: 0 0 12px; font-size: 20px; }
.grijs { color: var(--grijs); font-size: 13px; }
.opmerking {
  background: var(--accent-licht);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
}

#tabs {
  display: flex;
  gap: 2px;
  margin: 16px 0 14px;
  border-bottom: 1px solid var(--lijn);
  overflow-x: auto;
}
#tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--grijs);
  white-space: nowrap;
}
#tabs button.actief { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.tabkop { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tabellen */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--grijs);
  padding: 6px 8px;
  border-bottom: 1px solid var(--lijn);
}
td { padding: 7px 8px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
tr:hover td { background: var(--vlak); }
td.rechts, th.rechts { text-align: right; }
td.midden, th.midden { text-align: center; }
table.prestaties tr.gefactureerd td { color: var(--grijs); }
table.prestaties .factuurvink { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.klaar td { color: var(--grijs); text-decoration: line-through; }

/* documentenlijst: icoon per soort, namen in gewone tekst in plaats van blauwe links */
table.documenten td { vertical-align: middle; }
table.documenten tr[data-url] { cursor: pointer; }
table.documenten .docnaam { display: flex; align-items: center; gap: 8px; }
table.documenten .icoon { flex: none; width: 22px; height: 22px; }
table.documenten .docnaam a { color: var(--inkt); text-decoration: none; }
table.documenten tr:hover .docnaam a { color: var(--accent); }
table.documenten .docnaam a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
table.documenten td.doctype, table.documenten td.docdatum, table.documenten td.docmaat { color: var(--grijs); white-space: nowrap; }
table.documenten .docnaamtekst { display: flex; flex-direction: column; min-width: 0; }
table.documenten .docpad { font-size: 12px; color: var(--grijs); }
.docfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.docfilterzoek { flex: 1 1 240px; max-width: 380px; padding: 6px 10px; border: 1px solid var(--lijn); border-radius: var(--radius); font: inherit; }
.docfilterzoek:focus { outline: none; border-color: var(--accent); }
.docgroepen { display: flex; flex-wrap: wrap; gap: 4px; }
.docgroepen button.actief { background: var(--accent); color: var(--wit); border-color: var(--accent); }
.verlopen { color: var(--rood); font-weight: 600; }

/* cellen die je ter plaatse bewerkt, ze zien eruit als tekst tot je erop klikt */
input.cel {
  width: 100%;
  min-width: 90px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  color: inherit;
}
input.cel:hover { border-color: var(--lijn); background: var(--wit); }
input.cel:focus { border-color: var(--accent); background: var(--wit); outline: none; }
input.cel[type=date] { min-width: 130px; }
input.cel[type=datetime-local] { min-width: 180px; }
td.telaat input.cel { color: var(--rood); font-weight: 600; }
.klaar input.cel { text-decoration: line-through; color: var(--grijs); }
td .bol + input.cel { width: calc(100% - 20px); }

/* ---------------------------------------------------------------- formulier */

.formulier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}
.formulier label { display: block; font-size: 12px; color: var(--grijs); margin-bottom: 3px; }
.formulier input, .formulier select, .formulier textarea {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--wit);
}
.formulier .breed { grid-column: 1 / -1; }
.knoppen { display: flex; gap: 8px; align-items: center; }

button.hoofd {
  background: var(--accent);
  color: var(--wit);
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}
button.klein {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 13px;
}
button.klein:hover { background: var(--accent-licht); }

h3 { font-size: 15px; margin: 18px 0 8px; }

pre.fiche {
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  padding: 12px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  max-height: 460px;
  overflow: auto;
}

/* ---------------------------------------------------------------- partijen */

.mindmap {
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 16px;
  overflow: auto;
  background: var(--wit);
}
.mindmap svg { display: block; width: 100%; height: auto; font-family: inherit; }
.mindmap .lijn { fill: none; stroke: var(--grijs); stroke-width: 1.4; }
.mindmap .knoop rect { fill: var(--vlak); stroke: var(--grijs); stroke-width: 1.2; }
.mindmap .knoop.client rect { fill: var(--accent-licht); stroke: var(--accent); }
.mindmap .knoop.tegen rect { fill: var(--rood-licht); stroke: var(--rood); }
.mindmap .knoop.wortel rect { fill: var(--accent); stroke: var(--accent); }
.mindmap .knoop .naam { font-size: 13px; font-weight: 600; fill: var(--inkt); }
.mindmap .knoop .rol { font-size: 11px; fill: var(--grijs); }
.mindmap .knoop.wortel text { fill: var(--wit); }

.blokjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.blokje {
  border: 1px solid var(--lijn);
  border-left: 4px solid var(--grijs);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--wit);
}
.blokje.rol-client { border-left-color: var(--accent); }
.blokje.rol-tegen { border-left-color: var(--rood); }
.blokje.onder { margin: 8px 0 0 14px; background: var(--vlak); border-left-width: 3px; }
.blokkop { font-weight: 600; font-size: 14px; }
.blokkop .rol {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grijs);
  margin-right: 6px;
}

/* ---------------------------------------------------------------- kleuren en startscherm */

.bol {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  flex: none;
}
.kleur-paars { background: #6b3fa0; }
.kleur-rood { background: #c0392b; }
.kleur-oranje { background: #e67e22; }
.kleur-geel { background: #d4ac0d; }
.kleur-blauw { background: #2e75b6; }

.startkop { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.startkop h2 { margin: 0; font-size: 20px; }
.startkop h2::first-letter { text-transform: uppercase; }
.startkop input { width: 60px; padding: 3px 6px; border: 1px solid var(--lijn); border-radius: var(--radius); font-size: 13px; }

.blok { border: 1px solid var(--lijn); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; background: var(--wit); }
.blok h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--grijs); }
.blok .aantal { font-weight: 500; color: var(--grijs); }
.blok.achterstallig { border-color: var(--rood); background: var(--rood-licht); }
.blok.achterstallig h3 { color: var(--rood); }
.leegblok { margin: 2px 0 4px; }

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-top: 1px solid var(--lijn);
  cursor: pointer;
  font-size: 14px;
}
.item:hover { background: var(--accent-licht); }
.item .wanneer { flex: none; width: 200px; color: var(--grijs); font-size: 13px; }
.item .wat { flex: 1; min-width: 0; }
.item .dos { flex: none; max-width: 32%; color: var(--grijs); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item button { flex: none; }

/* ---------------------------------------------------------------- agenda */

.agendabalk { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.agendabalk h2 { margin: 0; font-size: 18px; }

/* zeven even brede vakjes, de inhoud mag ze niet breder duwen */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.week.eendag { grid-template-columns: minmax(0, 1fr); }
.week.compact .dag { min-height: 96px; padding: 4px; }
.week.compact .chip { padding: 2px 5px; margin-bottom: 2px; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.week.compact .dagkop { margin-bottom: 3px; }
.dag { border: 1px solid var(--lijn); border-radius: var(--radius); padding: 6px; min-height: 160px; background: var(--wit); min-width: 0; overflow: hidden; }
.dag.weekend { background: var(--vlak); }
.dag.andermaand { opacity: .55; }
/* om de maand een andere tint, en de eerste dag van een maand duidelijk gemarkeerd */
.dag.onevenmaand { background: #f1f4f6; }
.dag.onevenmaand.weekend { background: #e9edf0; }
.maandkop { margin: 14px 0 6px; font-size: 16px; text-transform: capitalize; }
.maandkop.uitfocus, .week.uitfocus { opacity: .45; }
.week.uitfocus:hover { opacity: 1; }
.dag.maandbegin { border-left: 4px solid var(--accent); }
.dag.maandbegin .dagkop { color: var(--accent); font-weight: 700; }
.dag.maandbegin .dagkop .maandnaam { display: block; font-size: 13px; text-transform: none; letter-spacing: 0; }
.schakelaar { display: inline-flex; gap: 2px; margin-right: 6px; }
.schakelaar .klein.actief { background: var(--accent); color: var(--wit); border-color: var(--accent); }
.dag.vandaag { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.dagkop { font-size: 12px; color: var(--grijs); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.dagkop b { font-size: 15px; color: var(--inkt); margin-left: 2px; }

.chip {
  border-left: 4px solid var(--grijs);
  background: var(--vlak);
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  overflow: hidden;
}
.chip:hover { background: var(--accent-licht); }
.chip .uur { font-weight: 600; margin-right: 4px; }
.chip .chiptitel { font-weight: 600; }
.chip .chipdos { display: block; color: var(--grijs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.kleur-paars { border-left-color: #6b3fa0; background: #efe8f7; }
.chip.kleur-rood { border-left-color: #c0392b; background: #f9e5e2; }
.chip.kleur-oranje { border-left-color: #e67e22; background: #fdeedd; }
.chip.kleur-geel { border-left-color: #d4ac0d; background: #faf3d4; }
.chip.kleur-blauw { border-left-color: #2e75b6; background: #e3eef8; }

@media (max-width: 760px) {
  .week { grid-template-columns: 1fr; }
  .dag { min-height: 0; }
}

/* ---------------------------------------------------------------- klok */

.tijdveld { display: inline-flex; gap: 4px; align-items: center; max-width: 100%; }
.tijdveld .datumdeel { padding: 6px 8px; border: 1px solid var(--lijn); border-radius: var(--radius); font: inherit; font-size: 14px; background: var(--wit); }
.tijdveld .uurdeel {
  padding: 6px 10px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  background: var(--wit);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.tijdveld .uurdeel:hover { border-color: var(--accent); background: var(--accent-licht); }
td .tijdveld .datumdeel, td .tijdveld .uurdeel { padding: 3px 5px; border-color: transparent; background: transparent; font-size: 14px; }
td .tijdveld:hover .datumdeel, td .tijdveld:hover .uurdeel { border-color: var(--lijn); background: var(--wit); }
td.telaat .tijdveld .datumdeel, td.telaat .tijdveld .uurdeel { color: var(--rood); font-weight: 600; }

.klok {
  position: fixed;
  z-index: 50;
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  padding: 10px;
  width: 282px;
}
.klokkop { text-align: center; font-size: 30px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.klokkop button { background: none; border: none; font: inherit; color: var(--grijs); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.klokkop button.actief { color: var(--accent); background: var(--accent-licht); }
.klok svg { display: block; margin: 0 auto; }
.klok .plaat { fill: var(--vlak); }
.klok .wijzer { stroke: var(--accent); stroke-width: 2; }
.klok .as { fill: var(--accent); }
.klok .cijfer { cursor: pointer; }
.klok .cijfer circle { fill: transparent; }
.klok .cijfer text { font-size: 14px; text-anchor: middle; fill: var(--inkt); pointer-events: none; }
.klok .cijfer.binnen text { font-size: 12px; fill: var(--grijs); }
.klok .cijfer:hover circle { fill: var(--accent-licht); }
.klok .cijfer.gekozen circle { fill: var(--accent); }
.klok .cijfer.gekozen text { fill: var(--wit); }
.klok .knoppen { justify-content: flex-end; margin-top: 6px; }

/* ---------------------------------------------------------------- claude */

#kop #claudeknop { position: relative; margin-left: auto; }
#kop #claudeknop.actief { background: var(--wit); color: var(--accent); }
#kop #claudeknop.bezig::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #e67e22;
}
#claudebadge {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--rood); color: var(--wit); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px;
}
#claudeknop:not([hidden]) ~ #gebruiker { margin-left: 0; }

#claudepaneel {
  position: fixed;
  top: var(--kop-hoogte, 53px);
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  background: var(--wit);
  border-left: 1px solid var(--lijn);
  box-shadow: -4px 0 18px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  z-index: 22;
}
#claudepaneel[hidden] { display: none !important; }
body.claude-open main { margin-right: 420px; }

.claudekop { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--lijn); }
.claudekop b { font-size: 16px; }
#claudecontext { margin-top: 2px; }
.status { font-size: 12px; padding: 1px 7px; border-radius: 9px; margin-left: 4px; }
.status::before { content: "\25CF  "; }
.status.luistert { color: #1e7b34; background: #e3f4e7; }
.status.bezig { color: #a35a12; background: #fdeedd; }
.status.weg, .status.geen { color: var(--grijs); background: var(--vlak); }
#claudegeen { margin: 10px 12px 0; }

#claudeberichten { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.claudeuitleg { margin: auto 0; text-align: center; }
.claudebericht { max-width: 92%; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.claudebericht .meta { font-size: 11px; color: var(--grijs); margin-bottom: 2px; }
.claudebericht.gebruiker { align-self: flex-end; background: var(--accent-licht); }
.claudebericht.claude { align-self: flex-start; background: var(--vlak); border: 1px solid var(--lijn); }
.claudebericht.tussen { font-style: italic; color: var(--grijs); background: none; border: 1px dashed var(--lijn); }
.claudebestand { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--lijn); font-style: normal; }
.claudebestand .bestandsnaam { flex: 1 1 100%; font-weight: 600; word-break: break-word; }
.claudebestand button.hoofd.klein { padding: 5px 10px; font-size: 13px; }
.claudebestand .geplaatst { color: #1e7b34; font-size: 13px; }

.claudevoet { border-top: 1px solid var(--lijn); padding: 8px 12px 10px; }
#claudevoortgang:empty { display: none; }
#claudevoortgang { margin-bottom: 4px; }
#claudetekst {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
#claudetekst:focus { outline: none; border-color: var(--accent); }
.klein-tekst { font-size: 11px; margin-top: 4px; }

#claudenieuw { margin: 8px 12px 0; padding: 6px 10px; border-radius: var(--radius); background: #fdeedd; font-size: 13px; }
button.link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.claudebestand .dossierkeuze { flex: 1 1 140px; padding: 4px 6px; border: 1px solid var(--lijn); border-radius: var(--radius); font: inherit; font-size: 13px; }

@media (max-width: 1000px) {
  body.claude-open main { margin-right: 0; }
  #claudepaneel { left: 0; width: auto; }
}

/* ---------------------------------------------------------------- melding */

#melding {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--inkt);
  color: var(--wit);
  padding: 9px 16px;
  border-radius: var(--radius);
  z-index: 40;
  font-size: 14px;
}

/* ---------------------------------------------------------------- smal scherm */


@media (max-width: 760px) {
  #kop { padding: 8px 12px; }
  #kop h1 { display: none; }
  #dossierkiezer { order: 5; width: 100%; max-width: none; }
  #gebruiker { margin-left: 0; }
  #paneel { padding: 14px; }
  #tabs { gap: 0; }
  .blokjes { grid-template-columns: 1fr; }
  .item { flex-wrap: wrap; }
  .item .wanneer { width: auto; }
  .item .dos { max-width: none; width: 100%; padding-left: 28px; }
  table.documenten .doctype { display: none; }
}
