/* Taken — gedeelde stijl. Mobile-first, licht/donker via prefers-color-scheme. */
:root {
  --bg: #f4f5f2;
  --card: #ffffff;
  --ink: #1c2420;
  --muted: #64716a;
  --line: #e2e6e1;
  --accent: #3b7a57;
  --accent-ink: #ffffff;
  --danger: #b4432e;
  --warn: #a8721c;
  --chip: #e9efe9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a17;
    --card: #1f2622;
    --ink: #e8ece9;
    --muted: #93a09a;
    --line: #2e3833;
    --accent: #5da57e;
    --accent-ink: #10241a;
    --chip: #273129;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
header.app {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 12px;
}
header.app h1 { font-size: 22px; margin: 0; }
header.app h1 a { color: inherit; text-decoration: none; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:active { opacity: .8; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--chip); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.chip.status-inbox { background: #dbe7f5; color: #2b5482; }
.chip.status-prework_bezig { background: #f3ead2; color: #7c5a14; }
.chip.status-ter_review { background: var(--accent); color: var(--accent-ink); }
.chip.status-verstuurd, .chip.status-klaar { background: var(--chip); }
.chip.status-fout { background: #f3d9d2; color: #8c3421; }
@media (prefers-color-scheme: dark) {
  .chip.status-inbox { background: #24344a; color: #a9c6e8; }
  .chip.status-prework_bezig { background: #3d3420; color: #dcc07a; }
  .chip.status-fout { background: #46261e; color: #e8a793; }
}
.muted { color: var(--muted); font-size: 14px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
button, .btn {
  font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; min-height: 44px;
}
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select {
  font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
pre.mailbody {
  white-space: pre-wrap; word-break: break-word; font: 14px/1.5 inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; max-height: 320px; overflow: auto;
}
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.filters button { white-space: nowrap; min-height: 36px; padding: 6px 12px; border-radius: 999px; }
.filters button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.comment { border-left: 3px solid var(--line); padding: 6px 12px; margin: 8px 0; }
.comment.agent { border-color: var(--accent); }
.comment .who { font-size: 13px; color: var(--muted); }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.audit { font-size: 13px; color: var(--muted); }
.audit li { margin: 2px 0; }
dialog {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); width: min(480px, 92vw); padding: 18px;
}
dialog::backdrop { background: rgba(0,0,0,.4); }
.fab {
  position: fixed; right: 18px; bottom: 24px; width: 56px; height: 56px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: 30px; line-height: 1; border: none; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.markdown { overflow-wrap: break-word; }
.markdown pre { overflow-x: auto; background: var(--bg); padding: 10px; border-radius: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
