/* Productie – borduurplanning */
:root {
  --hoofd: #1f5f5b;
  --hoofd-donker: #164744;
  --knop: #1f5f5b;
  --knop-hover: #164744;
  --zacht: #eef4f3;
  --kolom: #e3ecea;
  --tekst: #1f2a2a;
  --grijs: #5b6b6a;
  --wit: #ffffff;
  --rand: #d3e0de;
  --rood: #b3261e;
  --rood-zacht: #fbe9e7;
  --oranje: #9a5800;
  --oranje-zacht: #fdf0dc;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tekst);
  background: var(--zacht);
}
a { color: var(--hoofd); }
h1, h2 { line-height: 1.2; margin: 0 0 .6em; color: var(--hoofd-donker); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
code { background: var(--zacht); padding: 1px 5px; border-radius: 4px; }

.binnen { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.binnen.breed { max-width: 1200px; }
.binnen.heel-breed { max-width: 1800px; }
main.binnen { padding-top: 20px; padding-bottom: 48px; }

.balk { background: var(--hoofd-donker); color: var(--wit); }
.balk .binnen { max-width: 1800px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 56px; }
.balk a, .balk .link { color: var(--wit); text-decoration: none; }
.logo { font-weight: 700; font-size: 1.15rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; }
nav a.actief { border-bottom: 2px solid var(--wit); }
nav form { margin: 0; }
.teller { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 99px; background: #f3b33d; color: #2a1d00; font-size: .8rem; font-weight: 700; text-align: center; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; opacity: .85; color: var(--hoofd); }
.rood-tekst { color: var(--rood); }

.kaart { background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.kaart > p:first-child, .kaart > input + p { margin-top: 0; }
.kaart.smal { max-width: 380px; margin: 40px auto; }
.kaart.geen-rand { padding: 0; overflow-x: auto; }
.kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kop h1 { margin: 0; }
.kop form { margin: 0; }
.kop-rechts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.knop {
  display: inline-block; background: var(--knop); color: var(--wit); border: 0;
  border-radius: 8px; padding: 9px 16px; font: inherit; cursor: pointer; text-decoration: none;
}
.knop:hover { background: var(--knop-hover); }
.knop.licht { background: var(--kolom); color: var(--hoofd-donker); }
.knop.licht:hover { background: var(--rand); }
.knop.rood { background: var(--rood); }
.knop:disabled { opacity: .5; cursor: not-allowed; }

.melding { background: #fff4e5; border: 1px solid #f0c98a; border-radius: 8px; padding: 10px 14px; }
.grijs { color: var(--grijs); font-size: .93rem; }
.fout { color: var(--rood); }
.leeg { color: var(--grijs); font-style: italic; }
.hint { margin-top: 0; }
.nowrap { white-space: nowrap; }

.filter a { text-decoration: none; }
.filter a.actief { font-weight: 600; text-decoration: underline; }
.filter { margin: 0 0 12px; }
.kop .filter { margin: 0; }

.formulier label { display: block; margin-bottom: 14px; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
label.inline select { width: auto; margin: 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit;
  border: 1px solid var(--rand); border-radius: 8px; background: var(--wit); color: var(--tekst);
  font-weight: 400;
}
textarea { resize: vertical; }
.twee { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.drie { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 600px) { .twee, .drie { grid-template-columns: 1fr; } }

.status { font-size: .85rem; padding: 3px 12px; border-radius: 99px; background: var(--kolom); color: var(--hoofd-donker); white-space: nowrap; }
.status.te-laat { background: var(--rood-zacht); color: var(--rood); }
.status.bijna { background: var(--oranje-zacht); color: var(--oranje); }

/* Twee kolommen naast elkaar (mail + formulier) */
.naast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .naast { grid-template-columns: minmax(0, 1fr); } }
.mail-kop { font-size: 1.3rem; }
.mailtekst { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .95rem; background: var(--zacht); border-radius: 8px; padding: 12px; margin: 12px 0 0; max-height: 70vh; overflow: auto; }
details summary { cursor: pointer; color: var(--hoofd); margin-top: 8px; }

.bijlagen { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.bijlagen li { word-break: break-all; }
.bijlagen img { display: block; max-width: 100%; max-height: 220px; border: 1px solid var(--rand); border-radius: 8px; margin-bottom: 4px; background: repeating-conic-gradient(#f1f1f1 0 25%, #fff 0 50%) 0 0 / 16px 16px; }

.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabel th { font-size: .85rem; color: var(--grijs); font-weight: 600; }
.tabel tr:last-child td { border-bottom: 0; }

.rij-machine { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.rij-machine .formulier { flex: 1; min-width: 260px; }
.rij-machine .formulier label { margin-bottom: 10px; }
.rij-machine form { margin: 0; }

/* ---------- planboard ---------- */
.bord { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
@media (max-width: 1100px) {
  .bord { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; }
  .kolom { scroll-snap-align: start; }
}
@media (min-width: 600px) and (max-width: 1100px) { .bord { grid-template-columns: repeat(5, 300px); } }
.kolom { background: var(--kolom); border-radius: var(--radius); padding: 10px; min-height: 200px; border: 2px solid transparent; }
.kolom.erboven { border-color: var(--hoofd); }
.kolom h2 { font-size: 1rem; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.aantal { font-size: .8rem; background: var(--wit); border-radius: 99px; padding: 0 8px; color: var(--grijs); font-weight: 600; }
.kolom-lijst { display: grid; gap: 8px; min-height: 60px; }
.kolom-lijst:not(:has(.kaartje))::after { content: "Leeg"; color: var(--grijs); font-style: italic; font-size: .9rem; padding: 8px 4px; }

.kaartje { background: var(--wit); border: 1px solid var(--rand); border-left: 4px solid var(--rand); border-radius: 8px; padding: 10px 12px; cursor: grab; }
.kaartje.te-laat { border-left-color: var(--rood); }
.kaartje.bijna { border-left-color: #e0a030; }
.kaartje.te-laat .deadline { color: var(--rood); font-weight: 600; }
.kaartje.bijna .deadline { color: var(--oranje); font-weight: 600; }
.kaartje.sleept { opacity: .45; }
.kaartje:target { outline: 2px solid var(--hoofd); }
.kaartje-titel { font-weight: 600; text-decoration: none; color: var(--tekst); display: block; }
.kaartje-titel:hover { color: var(--hoofd); text-decoration: underline; }
.nr { color: var(--grijs); font-weight: 400; }
.omschrijving { margin: 4px 0 0; font-size: .9rem; color: var(--grijs); }
.kaartje dl { margin: 6px 0 0; font-size: .85rem; display: grid; gap: 1px; }
.kaartje dl div { display: flex; gap: 6px; }
.kaartje dt { color: var(--grijs); min-width: 62px; }
.kaartje dd { margin: 0; }
.kaartje-voet { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .85rem; }
.wie { color: var(--grijs); }
.pijlen { display: flex; gap: 4px; }
.pijlen form { margin: 0; }
.pijlen button { border: 1px solid var(--rand); background: var(--zacht); color: var(--hoofd-donker); border-radius: 6px; width: 34px; height: 30px; cursor: pointer; font-size: .8rem; }
.pijlen button:hover { background: var(--kolom); }
