/* Bewust simpel: dit zijn werkings-prototypes, geen visueel ontwerp. */
:root {
  --bg: #fff; --fg: #111; --muted: #777; --line: #e3e3e3; --soft: #f4f4f4; --accent: #0a66ff; --ok: #1a8f3c; --warn: #c2410c;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.4 -apple-system, system-ui, sans-serif; color: var(--fg); background: var(--bg); display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; font-size: 16px; }

.top { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 12px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.top a { color: var(--accent); text-decoration: none; }
.top .title { font-weight: 600; flex: 1; }
.top select { font-size: 14px; padding: 4px; }

.main { flex: 1; overflow-y: auto; padding: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
h2 { font-size: 18px; margin: 16px 0 8px; }
h3 { font-size: 15px; margin: 12px 0 6px; }

.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.btn { display: inline-block; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--soft); border-radius: 8px; padding: 8px 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.big { padding: 14px; font-size: 18px; width: 100%; }
.link { background: none; border: 0; color: var(--accent); padding: 0; }

/* Invoerbalk */
.composer { display: flex; gap: 8px; padding: 8px 12px calc(var(--safe-b) + 8px); border-top: 1px solid var(--line); background: var(--bg); }
.composer input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 20px; }
.composer button { border-radius: 20px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px 0; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 16px; padding: 5px 10px; font-size: 14px; }

/* Chat */
.msg { margin: 8px 0; max-width: 88%; white-space: pre-wrap; }
.msg.me { margin-left: auto; background: var(--soft); padding: 8px 12px; border-radius: 14px; width: fit-content; }
.msg.bot { padding: 2px 0; }
.msg .undo { margin-left: 6px; font-size: 13px; }

/* Balken */
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--fg); }
.bar.over i { background: var(--warn); }

.tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--soft); }
.tag.ok { background: #e3f4e8; color: var(--ok); }
.tag.rec { background: #fff0e6; color: var(--warn); }

.toast { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 52px); z-index: 10; background: #111; color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.toast button { background: none; border: 0; color: #9cc0ff; }

.note { background: #fffbe6; border: 1px solid #f1e3a1; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
