/* ioev.inbox in het luchtpost-merk (Figma ioev.inbox, pagina 30 brandguide, goedgekeurd 30-11).
   Alle kleuren staan in deze tokens; regels gebruiken alleen tokens. */
:root {
  --bg: #f5f3e4; --panel: #fffdf4; --ink: #1f2833; --muted: #566578; --line: #dcd8c2;
  --accent: #27497a; --accent-ink: #f5f3e4; --soft: #e3e9f2; --cta: #c8452c; --cta-ink: #f5f3e4;
  --air-red: #c8452c; --air-blue: #27497a; --sky: #a9c3e6;
  --ok: #3f7d4e; --ok-bg: #e2eedc; --busy: #b8620a; --busy-bg: #fbe7cf; --wait: #7a5a9a; --wait-bg: #ece3f3;
  --plan: #27497a; --plan-bg: #dfe7f1; --new: #566578; --new-bg: #e8e6d8; --no: #9a3b3b; --no-bg: #f3dede;
  --late: #9a3b3b;
  --body: "Barlow", "Avenir Next", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #141b26; --panel: #1d2635; --ink: #f5f3e4; --muted: #a9b4c2; --line: #33405a;
  --accent: #a9c3e6; --accent-ink: #141b26; --soft: #243149; --cta: #d9583c; --cta-ink: #f5f3e4;
  --air-red: #d9583c; --air-blue: #a9c3e6; --sky: #5d7fae;
  --ok: #8fcf9c; --ok-bg: #22392a; --busy: #f2b16a; --busy-bg: #3d2c18; --wait: #c9acea; --wait-bg: #31263d;
  --plan: #a9c3e6; --plan-bg: #233246; --new: #c3ccd6; --new-bg: #2b3440; --no: #ef9c9c; --no-bg: #3d2424;
  --late: #ef9c9c;
  color-scheme: dark } }
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45 }
[hidden] { display: none !important }
.wrap { max-width: 760px; margin: 0 auto; padding-block: max(20px, env(safe-area-inset-top)) 64px;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)) }
header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px }
.airmail { height: 10px; background: repeating-linear-gradient(-50deg, var(--air-red) 0 14px, var(--bg) 14px 20px, var(--air-blue) 20px 34px, var(--bg) 34px 40px); }
.logo { margin: 0; line-height: 0 }
.logo img { height: 40px; width: auto }
.tag { color: var(--muted); margin: 2px 0 0; font-size: 15px }
nav { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 10px }
nav a { padding: 7px 14px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600 }
nav a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08) }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px }
h2 { font-weight: 600; font-size: 21px; margin: 0 0 4px }
.sub { color: var(--muted); margin: 0 0 16px }
form { display: grid; gap: 16px }
label, .lbl { display: block; font-weight: 600; margin-bottom: 6px }
.hint { font-weight: 400; color: var(--muted); font-size: 14px }
input[type=text], input[type=search], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px }
textarea { min-height: 120px; resize: vertical }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { position: relative; margin: 0 }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer }
.chip span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 500 }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
@media (max-width: 560px) { .two { grid-template-columns: 1fr } }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; background: var(--soft); color: var(--ink) }
.btn.cta { background: var(--cta); color: var(--cta-ink); font-size: 17px; padding: 12px 22px; display: inline-flex; align-items: center; gap: 10px; border-radius: 10px }
.btn.cta svg { width: 20px; height: 20px }
.btn.primary { background: var(--accent); color: var(--accent-ink) }
.btn:disabled { opacity: .55; cursor: default }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 500; margin: 0 }
.msg.err { background: var(--no-bg); color: var(--no) }
#banner { margin-bottom: 14px }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px }
.stat { background: var(--panel); padding: 10px 12px }
.stat b { display: block; font-family: var(--mono); font-weight: 500; color: var(--accent); font-size: 22px; font-variant-numeric: tabular-nums }
.stat small { color: var(--muted); font-size: 13px }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr) } }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px }
@media (max-width: 640px) { .filters { grid-template-columns: 1fr 1fr } .filters .q { grid-column: 1 / -1 } }
.toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; font-weight: 400; margin: 0 }
.toggle select { width: auto }
.list { display: grid; gap: 10px; margin-top: 12px }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.card > button.head { all: unset; display: grid; gap: 6px; width: 100%; padding: 14px 16px; cursor: pointer; box-sizing: border-box }
.card > button.head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px }
.top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start }
.title { font-weight: 600; font-size: 17px; min-width: 0; overflow-wrap: anywhere }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px }
.pill { flex: none; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap }
.s-Ontvangen { background: var(--new-bg); color: var(--new) } .s-Ingepland { background: var(--plan-bg); color: var(--plan) }
.s-Bezig { background: var(--busy-bg); color: var(--busy) } .s-Wacht { background: var(--wait-bg); color: var(--wait) }
.s-Klaar { background: var(--ok-bg); color: var(--ok) } .s-Afgewezen { background: var(--no-bg); color: var(--no) }
.kind { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent) }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px }
.steps i { height: 5px; border-radius: 3px; background: var(--line) }
.steps i.on { background: var(--accent) } .steps.done i.on { background: var(--ok) }
.steplbl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 12px; color: var(--muted) }
.timing { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-variant-numeric: tabular-nums }
.timing b { font-weight: 600 }
.body { border-top: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 12px }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 }
.answer { background: var(--soft); border-radius: 8px; padding: 10px 12px }
.answer .lbl { font-size: 13px; color: var(--muted); margin: 0 0 2px; font-weight: 400 }
.admin { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; display: grid; gap: 10px }
.admin h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent) }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr } }
.empty { text-align: center; color: var(--muted); padding: 36px 12px }
.small { font-size: 14px; color: var(--muted) }
footer { margin-top: 28px; text-align: center }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* Verstuurd-moment: het enige dat beweegt. */
.sent { display: grid; gap: 10px; justify-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px }
.sent h2 { color: var(--accent) }
.sent .plane { width: 56px; height: 48px; color: var(--accent) }
.flyer { position: fixed; z-index: 20; width: 64px; height: 54px; color: var(--accent); pointer-events: none }
.flyer path.trail { stroke-dasharray: 1 16 }
@keyframes fly { 0% { transform: translate(0,0) rotate(0) scale(1); opacity: 1 } 80% { opacity: 1 } 100% { transform: translate(60vw,-70vh) rotate(-8deg) scale(.7); opacity: 0 } }
.flyer.go { animation: fly .9s cubic-bezier(.4,.1,.6,1) forwards }
#form.fading { opacity: .25; transition: opacity .3s }
@media (prefers-reduced-motion: reduce) { .flyer { display: none } #form.fading { opacity: 1 } }
.num { font-family: var(--mono); font-weight: 500 }
/* Beheer */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px }
.kpis .stat small b { display: inline; font: inherit; color: var(--ink) }
.kpis .stat .lbl2 { font-weight: 600; font-size: 14px; display: block }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, 1fr) } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr) } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr } }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0 }
.box h3 { margin: 0; font-size: 17px; font-weight: 600 } .box .sub { font-size: 13px; margin: 2px 0 12px }
.bars { display: grid; grid-template-columns: minmax(90px, max-content) 1fr 34px; gap: 6px 10px; align-items: center; font-size: 14px }
.bars i { display: block; height: 12px; border-radius: 3px; background: var(--accent); min-width: 2px }
.bars b { font-weight: 600; font-variant-numeric: tabular-nums }
.weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 190px }
.weeks div { display: grid; gap: 4px; justify-items: center; align-content: end; height: 100%; font-size: 12px; color: var(--muted) }
.weeks b { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums }
.weeks i { display: block; width: 100%; border-radius: 3px; background: var(--accent); min-height: 2px }
.weeks .cur i { background: var(--sky) }
.tablewrap { overflow-x: auto }
table.wait { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px }
table.wait th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 6px 8px }
table.wait td { border-top: 1px solid var(--line); padding: 9px 8px }
table.wait tr.row { cursor: pointer } table.wait tr.row:hover td { background: var(--soft) }
table.wait .late { color: var(--late); font-weight: 600 }
#view-beheer .filters { grid-template-columns: repeat(4, 1fr) }
@media (max-width: 640px) { #view-beheer .filters { grid-template-columns: 1fr 1fr } }
a { color: var(--accent) }
a.btn { text-decoration: none; display: inline-block }
