/* WorkWife — modern, wit, mobile-first (ChatGPT/Claude-stijl). Zie projects/zuid-afrika-aios/ontwerp-brief-app.md. */

:root {
  --bg:#FFFFFF;
  --ink:#0B1A12;
  --cream:#F4EFE3;
  --ink-2:#3C4039;
  --muted:#777C73;
  --surf:#F4F4F2;
  --surf-2:#FAFAF8;
  --line:#E7E5E0;
  --line-2:#EDEBE6;
  --green:#1F3D2B;
  --green-2:#2A5339;
  --green-ink:#DCEADF;
  --gold:#F2B63D;
  --gold-ink:#8A5A12;
  --low:#B4462F;
  --radius:20px;
  --radius-sm:12px;
  --radius-lg:28px;
  --radius-pill:999px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --side-w:280px;
  --top-h:56px;
  --tabbar-h:calc(64px + var(--safe-b));
  --vvh:100dvh;
  --vvt:0px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  padding-top: calc(var(--top-h) + var(--safe-t));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* ============= MAIN ============= */
main {
  padding: 16px 16px calc(var(--tabbar-h) + 32px);
  max-width: 760px;
  margin: 0 auto;
}

h1 { font-size: 28px; margin: 4px 0 8px; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 22px; margin: 6px 0 12px; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 17px; margin: 20px 0 8px; letter-spacing: -.01em; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ============= CARDS ============= */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card.soft { background: var(--surf); border-color: transparent; }
.brief { background: var(--surf); border-color: transparent; }
.brief .muted { color: var(--ink-2); }

/* ============= ROWS & BUTTONS ============= */
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.btn {
  border: 0; border-radius: var(--radius-sm);
  padding: 14px 18px;
  background: var(--green); color: var(--cream);
  font-weight: 600; font-size: 15px;
  width: 100%; min-height: 48px;
  cursor: pointer; letter-spacing: -.005em;
}
.btn:hover { background: var(--green-2); }
.btn:active { transform: scale(.985); }
.btn.alt {
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); font-weight: 500;
}
.btn.alt:hover { background: var(--surf); }
.btn.ghost {
  background: transparent; color: var(--ink-2); border: 0;
  width: auto; padding: 8px 12px; min-height: 0; font-weight: 500;
}
.btn.ghost:hover { color: var(--ink); background: var(--surf); border-radius: var(--radius-sm); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.danger { background: #fff; color: var(--low); border: 1px solid var(--line); font-weight: 500; }
.btns { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.btns[hidden] { display: none; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg);
  min-height: 48px;
  color: var(--ink);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; color: var(--ink-2); }

/* ============= CHIPS ============= */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line);
  background: var(--bg); border-radius: var(--radius-pill);
  padding: 9px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; min-height: 36px;
}
.chip:hover { background: var(--surf); border-color: var(--line); }
.chip.on { border-color: var(--green); background: var(--green-ink); color: var(--green); font-weight: 600; }

/* ============= SHEETS ============= */
.sheet {
  position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow: auto;
  padding: calc(16px + var(--safe-t)) 20px calc(24px + var(--safe-b));
}
.sheet .in { max-width: 560px; margin: 0 auto; }
.sheet h2 { margin-top: 4px; }
.dots { display: flex; gap: 6px; margin: 6px 0 20px; }
.dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.dots i.on { background: var(--green); }
.big { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 6px 0 8px; letter-spacing: -.015em; }

/* field composer bij sheet (voorraad snelinvoer e.d.) */
.field { display: flex; gap: 8px; align-items: stretch; }
.field .mini {
  width: 52px; flex: none; border-radius: var(--radius-sm); border: 0;
  background: var(--green); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.field .mini.rec { background: var(--low); }
.field .mini svg { width: 22px; height: 22px; fill: currentColor; }

.lang { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang button {
  padding: 20px 12px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg); font-weight: 600; font-size: 16px; color: var(--ink);
  cursor: pointer;
}
.lang button.on { border-color: var(--green); background: var(--green-ink); color: var(--green); }

.toast {
  position: fixed; left: 20px; right: 20px;
  bottom: calc(var(--tabbar-h) + 84px);
  background: var(--ink); color: #fff;
  padding: 14px 18px; border-radius: var(--radius);
  z-index: 60; text-align: center; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.pend {
  display: inline-block; margin-top: 8px;
  color: var(--green); font-weight: 600; text-decoration: none;
  background: var(--green-ink); padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 14px;
}

.card.link {
  display: flex; justify-content: space-between; align-items: center;
  color: inherit; text-decoration: none; min-height: 56px;
}
.check {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  color: var(--muted); font-weight: 700; font-size: 18px; flex: none;
  cursor: pointer;
}
.check.on, .task.done .check { background: var(--green); color: var(--cream); border-color: var(--green); }
.task.done { opacity: .55; }
.sec { margin: 20px 4px 8px; font-weight: 700; color: var(--ink); font-size: 15px; }
.msgbody {
  white-space: pre-wrap; margin: 10px 0 14px;
  padding: 12px 14px; background: var(--surf); border-radius: var(--radius-sm);
  overflow-wrap: anywhere; font-size: 14px; line-height: 1.5;
}
.kind {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.kind.quote { color: var(--green); }
.kind.invoice { color: var(--gold-ink); }
.kind.message { color: #2D5F8B; }
.draft { align-items: flex-start; gap: 10px; }
.line { padding: 10px; }
.line .ln-h { margin: 10px 2px -4px; font-size: 12px; color: var(--muted, #6b6b6b); }
.line input { min-height: 44px; }
.btns3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin-top: 10px; }
.mini.del {
  background: var(--bg); color: var(--low);
  border: 1px solid var(--line); font-size: 22px; font-weight: 700;
}
.totals .row { padding: 4px 0; }
.big2 { font-size: 20px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px !important; }
.btn.send { margin-top: 16px; min-height: 54px; font-size: 16px; }
.linkbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.logo {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: var(--surf); display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}
.logo img { max-width: 100%; max-height: 100%; }
.check-row {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; margin: 12px 0 6px;
}
.check-row input { width: 22px; height: 22px; min-height: 0; flex: none; }
.picklist { max-height: 60dvh; overflow: auto; margin-bottom: 14px; }
.picklist .check-row {
  background: var(--surf-2); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 6px 0;
}
.pill {
  font-size: 11px; font-weight: 700; background: var(--surf);
  border-radius: var(--radius-pill); padding: 3px 9px; white-space: nowrap;
}
.neg { color: var(--low); }
.pos { color: var(--green); }
.nudge { background: #FFF9EC; border: 1px solid var(--gold); }

.voice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-top: 8px; cursor: pointer; background: var(--bg);
}
.voice.on { border-color: var(--green); background: var(--green-ink); }
.voice .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--muted); flex: none;
}
.voice.on .radio { border-color: var(--green); background: radial-gradient(var(--green) 45%, transparent 50%); }
.play {
  border: 0; background: var(--green); color: var(--cream);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; font-weight: 600; flex: none; cursor: pointer;
}

.seg { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 12px; }
.seg button {
  border: 1px solid var(--line); background: var(--bg);
  border-radius: var(--radius-sm); padding: 10px 6px;
  font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.seg button.on { border-color: var(--green); background: var(--green-ink); color: var(--green); }

.langstep { max-width: 420px; margin: 0 auto; padding-top: 10vh; text-align: center; }
.langstep .brand-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--green); color: var(--cream); display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 16px; font-weight: 700; font-size: 20px;
}
.langstep .big { font-size: 26px; }
.langstep .big .muted { font-size: 16px; font-weight: 500; display: block; margin-top: 4px; }
.langbig {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; margin: 14px 0 0; padding: 20px 16px;
  border-radius: var(--radius); border: 0;
  background: var(--green); color: var(--cream); cursor: pointer;
}
.langbig b { font-size: 22px; font-weight: 700; }
.langbig span { font-size: 14px; opacity: .9; }
.langbig + .langbig { background: var(--bg); color: var(--green); border: 1.5px solid var(--green); }
.langstep p { margin-top: 24px; color: var(--muted); font-size: 13px; }

/* wizard */
.wiz { max-width: 460px; margin: 0 auto; }
.wiz .step-title { font-size: 24px; font-weight: 700; margin: 12px 0 4px; letter-spacing: -.015em; }
.wiz .step-sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.wiz .wiz-nav { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 24px; }
.wiz .wiz-nav .btn.alt { margin: 0; }
.wiz .skip {
  margin-top: 10px; background: none; border: 0; color: var(--muted);
  font-weight: 500; text-align: center; width: 100%; padding: 8px; cursor: pointer;
}
.secpicker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.secpicker button {
  border: 1px solid var(--line); background: var(--bg);
  border-radius: var(--radius); padding: 16px 10px;
  font-weight: 600; display: flex; flex-direction: column;
  align-items: center; gap: 6px; min-height: 92px; cursor: pointer;
  color: var(--ink);
}
.secpicker button.on { border-color: var(--green); background: var(--green-ink); color: var(--green); }
.secpicker .emoji { font-size: 28px; line-height: 1; }

.toggle {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  margin: 8px 0; cursor: pointer;
}
.toggle.on { border-color: var(--green); background: var(--green-ink); }
.toggle .sw {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--line); position: relative; flex: none;
  transition: background .15s;
}
.toggle .sw::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: var(--bg); border-radius: 50%;
  transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.toggle.on .sw { background: var(--green); }
.toggle.on .sw::after { left: 18px; }
.toggle .tt { font-weight: 600; }
.toggle .ts { font-size: 13px; color: var(--muted); font-weight: 400; }
.invitelist .card { display: flex; align-items: center; gap: 10px; }
.invitelist .remove {
  border: 0; background: transparent; color: var(--low);
  font-size: 22px; font-weight: 700; padding: 4px 8px; cursor: pointer;
}
.notyet {
  background: var(--surf); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 14px;
  color: var(--muted); text-align: center;
}
.notyet b { color: var(--ink); }

/* belangrijke contacten (ster) */
.star {
  width: 40px; height: 40px; border: 0; background: transparent;
  color: var(--line); flex: none; font-size: 22px; line-height: 1; cursor: pointer;
}
.star.on { color: var(--gold); }
.card.imp { border-color: var(--gold); background: #FFF9EC; }
.contact-row { display: flex; align-items: center; gap: 10px; }

/* voorraad */
.item { display: flex; align-items: center; gap: 12px; }
.bar { height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--green); }
.low .bar i { background: var(--low); }
.badge {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--low);
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}
.qty { font-weight: 700; font-size: 20px; text-align: right; white-space: nowrap; }
.step {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 20px; font-weight: 600; flex: none; cursor: pointer; color: var(--ink);
}
.step:hover { background: var(--surf); }
.prog { font-weight: 600; }
.time { font-size: 13px; color: var(--muted); }
.act { font-size: 13px; color: var(--green); font-weight: 600; margin: -2px 0 6px 4px; }

/* ============= KOPBALK ============= */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 6px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg);
  transform: translateY(var(--vvt));
}
.top .title { display: flex; align-items: center; min-width: 0; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.top .title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-icon { width: 28px; height: 28px; border-radius: 50%; margin-right: 10px; object-fit: cover; flex: none; }
.top .right { display: flex; gap: 2px; align-items: center; }
.top .right[hidden] { display: none; }
.iconbtn {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
}
.iconbtn:active { background: var(--surf); }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn svg circle { fill: currentColor; stroke: none; }

/* ============= ONDERBALK (telefoon) ============= */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  height: var(--tabbar-h); padding: 6px 4px var(--safe-b);
  display: flex; background: var(--bg);
  box-shadow: 0 -8px 24px rgba(17,17,17,.05);
}
.tabs[hidden], body.kb .tabs { display: none; }
.tabs a {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: -.005em;
}
.tabs .ic { width: 56px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs svg circle { fill: currentColor; stroke: none; }
.tabs .lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs a.on { color: var(--green); }
.tabs a.on .ic { background: var(--green-ink); }
body.kb { --tabbar-h: 0px; }

/* ============= ZIJBALK (laptop) ============= */
.side { display: none; }
.navlist { margin: 4px 0 16px; }
.navlist a, .side a {
  display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px;
  border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px;
}
.navlist a:active, .side a:hover { background: var(--surf); }
.navlist svg, .side svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.navlist .chev { width: 18px; height: 18px; stroke: var(--muted); }
.me-head { display: flex; align-items: center; gap: 12px; padding: 8px 4px 12px; }
.me-head .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: var(--cream); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex: none; }

/* ============= CHAT ============= */
body[data-view="talk"] main { padding: 0; max-width: none; }
body[data-view="talk"] { overflow: hidden; }
.chat {
  position: fixed; left: 0; right: 0; z-index: 5;
  top: calc(var(--vvt) + var(--top-h) + var(--safe-t));
  height: calc(var(--vvh) - var(--top-h) - var(--safe-t) - var(--tabbar-h));
  display: flex; flex-direction: column; background: var(--bg);
}
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-list {
  max-width: 760px; min-height: 100%; margin: 0 auto; padding: 4px 16px 12px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.chat-search {
  display: flex; align-items: center; gap: 8px; margin: 4px 12px 6px; padding: 0 4px 0 14px;
  background: var(--surf); border-radius: 999px; max-width: 736px; align-self: center; width: calc(100% - 24px);
}
.chat-search[hidden] { display: none; }
.chat-search > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.chat-search input { border: 0; background: transparent; min-height: 44px; padding: 0; font-size: 16px; }
.chat-search .ib { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.chat-search .ib svg, .chat-jump svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-day { text-align: center; margin: 18px 0 6px; }
.chat-day span { font-size: 12px; font-weight: 600; color: var(--muted); }
.m {
  max-width: 82%; margin-top: 10px; padding: 9px 14px;
  border-radius: 20px; font-size: 16px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.m.me { align-self: flex-end; background: var(--green); color: var(--cream); border-bottom-right-radius: 6px; }
.m.ai { align-self: flex-start; background: var(--surf); color: var(--ink); border-bottom-left-radius: 6px; }
.m.cont { margin-top: 3px; }
.m.me.sending { opacity: .75; }
.m.me.failed { opacity: .6; }
.m-err { align-self: flex-end; display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; color: var(--low); font-weight: 600; }
.m-err button { border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 8px; cursor: pointer; }
.m-err button.quiet { color: var(--muted); font-weight: 600; }
.m-tools { align-self: flex-start; margin-top: 0; }
.m-tools button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; min-height: 40px; padding: 0 6px; cursor: pointer; }
.m-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.m.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.m.typing span, .chat-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bob 1.2s infinite; }
.m.typing span:nth-child(2), .chat-loading span:nth-child(2) { animation-delay: .15s; }
.m.typing span:nth-child(3), .chat-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-loading { display: flex; gap: 6px; justify-content: center; margin: auto; }
.chat-none { text-align: center; color: var(--muted); margin: 24px 0; }

/* lege chat */
.chat-list.is-empty { justify-content: space-between; }
.chat-hero { margin: auto 0; padding: 24px 8px; text-align: center; }
.chat-hero img { width: 48px; height: 48px; border-radius: 50%; }
.chat-hero h1 { font-size: 24px; line-height: 1.25; margin: 14px 0 4px; }
.chat-hero p { margin: 0; color: var(--muted); }
.today { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.today:empty { display: none; }
.today a { text-decoration: none; color: var(--green); background: var(--green-ink); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.sugg { display: grid; gap: 8px; }
.sugg button {
  text-align: left; border: 0; background: var(--surf); color: var(--ink); cursor: pointer;
  border-radius: 16px; padding: 12px 16px; min-height: 48px; font-size: 15px; font-weight: 500; line-height: 1.35;
}
.sugg button:active { background: var(--line-2); }

/* kaarten in de chat */
.cc {
  align-self: flex-start; width: 100%; max-width: 440px; margin-top: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px;
}
.cc-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cc-h svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-h em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--green); background: var(--green-ink); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.cc-t { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.cc-t > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cc-t .amt { white-space: nowrap; font-size: 16px; }
.cc-t .muted { font-weight: 600; }
.cc-l { font-size: 14px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-l.need { color: var(--low); font-weight: 600; }
.cc-b { font-size: 14px; color: var(--ink-2); margin-top: 6px; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cc-a { display: flex; gap: 8px; margin-top: 12px; }
.cc-a > * {
  flex: 1; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--surf); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.cc-a > .pri { background: var(--green); color: var(--cream); }
.cc-a > .quiet { flex: 0 0 auto; background: transparent; color: var(--muted); }
.cc-a > .busy { opacity: .55; }
.cc-a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cc-a.icons > * { flex-direction: column; gap: 2px; min-height: 56px; font-size: 12px; padding: 6px 4px; }
.cc-a.icons svg { width: 20px; height: 20px; stroke: var(--green); }
.cc-bar { height: 6px; background: var(--surf); border-radius: 6px; overflow: hidden; margin: 8px 0 6px; }
.cc-bar i { display: block; height: 100%; background: var(--green); transition: width .4s; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--green-ink); border-top-color: var(--green); animation: spin 1s linear infinite; flex: none; }
.ev { align-self: center; display: flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: var(--surf-2); color: var(--ink-2); font-size: 13px; }
.ev svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linejoin: round; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev time { color: var(--muted); flex: none; }

.chat-jump {
  position: absolute; right: 16px; bottom: 76px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--bg); color: var(--ink); box-shadow: 0 4px 16px rgba(17,17,17,.14);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chat-jump[hidden] { display: none; }

/* invoerbalk */
.composer {
  flex: none; width: 100%; max-width: 760px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 10px;
}
.composer textarea {
  flex: 1; min-width: 0; min-height: 48px; max-height: 140px; resize: none;
  border: 0; border-radius: 24px; background: var(--surf); padding: 12px 18px;
  font-size: 16px; line-height: 1.4; color: var(--ink);
}
.composer textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--green); }
.composer textarea::placeholder { color: var(--muted); }
.cbtn {
  width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--cream);
}
.cbtn[hidden] { display: none; }
.cbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.cbtn:active { transform: scale(.94); }
.cbtn.rec { background: var(--low); animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(180,70,47,.45); } 100% { box-shadow: 0 0 0 18px rgba(180,70,47,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* vraagblad (bevestigen, keuzemenu) */
.dlg { position: fixed; inset: 0; z-index: 70; background: rgba(17,17,17,0); display: flex; align-items: flex-end; justify-content: center; transition: background .16s; }
.dlg.on { background: rgba(17,17,17,.32); }
.dlg-in {
  width: 100%; max-width: 480px; background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 10px 12px calc(12px + var(--safe-b)); transform: translateY(100%); transition: transform .18s ease-out;
}
.dlg.on .dlg-in { transform: none; }
.dlg-t { font-weight: 700; font-size: 17px; padding: 10px 12px 2px; }
.dlg-p { margin: 8px 12px 12px; color: var(--ink-2); }
.dlg-b {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  border: 0; background: transparent; border-radius: 14px; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left;
}
.dlg-b:active { background: var(--surf); }
.dlg-b svg { width: 22px; height: 22px; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dlg-b.pri { justify-content: center; background: var(--green); color: var(--cream); margin-top: 4px; }
.dlg-b.quiet { justify-content: center; color: var(--muted); margin-top: 4px; }

/* ============= LAPTOP ============= */
@media (min-width: 900px) {
  :root { --top-h: 60px; --tabbar-h: 0px; }
  .tabs { display: none !important; }
  body.authed .side {
    display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; left: 0; bottom: 0; z-index: 12;
    width: var(--side-w); padding: 16px 12px; background: var(--surf-2); overflow-y: auto;
  }
  .side .sidetop { padding: 6px 12px 18px; }
  .side .brand { display: flex; align-items: center; font-weight: 700; font-size: 17px; }
  .side .spacer { flex: 1; }
  .side a { min-height: 44px; font-size: 15px; }
  .side a.on { background: var(--green-ink); color: var(--green); }
  body.authed main { margin-left: var(--side-w); max-width: 760px; padding: 24px 32px 48px; }
  body.authed .top { left: var(--side-w); padding-left: 32px; }
  body.authed .top .brand-icon { display: none; }
  body.authed .chat { left: var(--side-w); }
  body[data-view="talk"].authed main { margin-left: var(--side-w); }
  .chat-list { padding: 8px 32px 16px; }
  .composer { padding: 8px 32px 20px; }
  .m { max-width: 70%; }
  .dlg { align-items: center; }
  .dlg-in { border-radius: 22px; }
  .toast { left: auto; right: 32px; max-width: 420px; bottom: 100px; }
}

/* ============= Spraakagent-scherm (fullscreen overlay) ============= */
.stem-scherm {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(24px + var(--safe-t)) 20px calc(32px + var(--safe-b));
  animation: stemIn .18s ease-out;
}
@keyframes stemIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stem-scherm .stem-close {
  position: absolute; top: calc(16px + var(--safe-t)); right: 16px;
  width: 44px; height: 44px; border: 0; background: var(--surf); color: var(--ink);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.stem-scherm .stem-close:hover { background: var(--line); }
.stem-scherm .stem-top { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 20px; }
.stem-scherm .stem-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.stem-scherm .stem-knop {
  width: 180px; height: 180px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--green); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 60px rgba(31,61,43,.25);
  transition: transform .15s ease, background .2s;
}
.stem-scherm .stem-knop:hover { transform: scale(1.03); }
.stem-scherm .stem-knop:active { transform: scale(.97); }
.stem-scherm .stem-knop.bezig {
  background: var(--green-2); color: var(--cream);
  animation: stemPuls 1.2s ease-in-out infinite;
}
.stem-scherm .stem-knop.live {
  background: var(--green); color: var(--cream);
  animation: stemLive 1.6s ease-in-out infinite;
}
@keyframes stemPuls { 0%,100% { transform: scale(1); box-shadow: 0 20px 60px rgba(31,61,43,.2); } 50% { transform: scale(1.06); box-shadow: 0 24px 70px rgba(31,61,43,.35); } }
@keyframes stemLive { 0%,100% { box-shadow: 0 20px 60px rgba(31,61,43,.25), 0 0 0 0 rgba(31,61,43,.3); } 50% { box-shadow: 0 20px 60px rgba(31,61,43,.25), 0 0 0 24px rgba(31,61,43,0); } }
.stem-scherm .stem-knop svg { fill: currentColor; }
.stem-scherm .stem-status { font-size: 18px; font-weight: 600; color: var(--ink-2); min-height: 24px; }
.stem-scherm .stem-onder { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.stem-scherm .stem-sec, .stem-scherm .stem-end {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 500;
}
.stem-scherm .stem-sec:hover { background: var(--surf); }
.stem-scherm .stem-sec.on { background: var(--green-ink); color: var(--green); border-color: var(--green); }
.stem-scherm .stem-end { background: var(--low); color: #fff; border-color: var(--low); }
.stem-scherm .stem-end:hover { background: #923a28; }
.stem-scherm .stem-knop svg, .stem-scherm .stem-sec svg, .stem-scherm .stem-end svg, .stem-scherm .stem-close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stem-scherm .stem-knop svg { width: 64px; height: 64px; }
.stem-scherm .stem-sec svg, .stem-scherm .stem-end svg, .stem-scherm .stem-close svg { width: 22px; height: 22px; }
.stem-scherm .stem-sec, .stem-scherm .stem-end { min-height: 52px; }
.stem-scherm .stem-end[hidden] { display: none; }
.stem-scherm .stem-status.fout { color: var(--low); }
.stem-scherm .stem-tekst { max-width: 520px; min-height: 48px; text-align: center; font-size: 17px; line-height: 1.45; color: var(--ink-2); padding: 0 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.stem-scherm .stem-tekst.me { color: var(--green); font-weight: 600; }
/* spraakgesprek als één blok in de chat */
.call { align-self: stretch; margin-top: 10px; padding: 10px 12px; border-radius: 18px; background: var(--surf-2); display: flex; flex-direction: column; }
.call-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.call-h svg { width: 16px; height: 16px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.call-h time { margin-left: auto; font-weight: 500; }
.cl { max-width: 88%; margin-top: 6px; padding: 7px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl.me { align-self: flex-end; background: var(--green-ink); color: var(--green); }
.cl.ai { align-self: flex-start; background: var(--bg); color: var(--ink); }
.call-more { align-self: center; border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 12px; cursor: pointer; }
.sheet .row > .btn.ghost:first-child { min-width: 44px; min-height: 44px; font-size: 22px; padding: 0 10px; }

.stem-scherm [hidden] { display: none !important; }
a.btn { text-decoration: none; }

/* ============= Spraakbalk tijdens het gesprek (agent I, 17-10) ============= */
/* Het spraakscherm heeft twee lagen: .stem-vol (volledig scherm: verbinden, fout) en .stem-balk (compact tijdens het gesprek). */
.stem-scherm .stem-vol { display: contents; }
.stem-scherm .stem-balk { display: none; }
.stem-scherm.compact {
  position: static; inset: auto; z-index: auto; flex: none; width: 100%;
  background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none;
  display: block; padding: 0; animation: none;
}
.stem-scherm.compact .stem-vol { display: none; }
.stem-scherm.compact .stem-balk {
  display: flex; align-items: center; gap: 10px;
  max-width: 760px; margin: 0 auto; padding: 6px 12px 0;
}
.stem-scherm.compact.zwevend {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 40;
  border-top: 1px solid var(--line); padding-bottom: calc(8px + var(--safe-b));
}
.stem-balk .brand-icon { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.stem-bi { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; line-height: 1.2; }
.stem-bi b { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stem-bi span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stem-golf { display: flex; align-items: center; gap: 3px; height: 24px; flex: none; }
.stem-golf i { display: block; width: 3px; height: 6px; border-radius: 2px; background: var(--green); opacity: .55; animation: stemGolf 1.4s ease-in-out infinite; }
.stem-golf i:nth-child(2) { animation-delay: .15s; }
.stem-golf i:nth-child(3) { animation-delay: .3s; }
.stem-golf i:nth-child(4) { animation-delay: .45s; }
.stem-golf i:nth-child(5) { animation-delay: .6s; }
.stem-scherm.praat .stem-golf i { opacity: 1; animation-duration: .7s; }
@keyframes stemGolf { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.stem-bk {
  flex: none; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px;
}
.stem-bk svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stem-bk.on { background: var(--green-ink); color: var(--green); border-color: var(--green); }
.stem-bk.end { background: var(--low); color: #fff; border-color: var(--low); }
.stem-bk.end svg { transform: rotate(135deg); }
.stem-bk:active { transform: scale(.95); }
body.stem-actief .chat-jump { bottom: 140px; }
body.stem-actief .toast { bottom: calc(var(--tabbar-h) + 150px); }
@media (min-width: 900px) {
  .stem-scherm.compact .stem-balk { padding: 6px 32px 0; }
  body.authed .stem-scherm.compact.zwevend { left: var(--side-w); }
}
@media (prefers-reduced-motion: reduce) {
  .stem-golf i { animation: none; height: 12px; }
}
/* taakkaart (knoppen Klaar / Begonnen / Later) */
.cc-task.done .cc-t, .cc-task.cancelled .cc-t { color: var(--muted); text-decoration: line-through; }
.cc-task .cc-l.muted { color: var(--muted); }

/* ============= Ronde J (18-10): toast met actie ============= */
.toast.has-act { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 8px 8px 18px; }
.toast.has-act[hidden] { display: none; }
.toast.has-act span { flex: 1; min-width: 0; }
.toast-b { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; }

/* ============= Ronde J: avatar, accountblok, accountscherm ============= */
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.tabs .tab-me .av { width: 26px; height: 26px; font-size: 12px; }
.tabs .tab-me.on .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--green); }
.tabs .tab-me.on .ic { background: transparent; }
.navlist button {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 12px; border: 0; background: transparent;
  border-radius: 14px; color: var(--ink); font-weight: 600; font-size: 16px; text-align: left; cursor: pointer;
}
.navlist button:active, .navlist a:hover, .navlist button:hover { background: var(--surf); }
.navlist button.out { color: var(--low); margin-top: 8px; }
.navlist button.out svg { stroke: var(--low); }
.navlist a { cursor: pointer; }
.acct-mock { display: block; text-align: center; margin: 18px 0 4px; }
.me-head .av.lg { margin-right: 2px; }

/* accountblok linksonder in de zijbalk (laptop) */
#sideFoot { position: relative; }
.acct { position: relative; }
.acct-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 10px; border: 0; border-radius: 14px;
  background: transparent; cursor: pointer; text-align: left; color: var(--ink);
}
.acct-btn:hover, .acct.open .acct-btn, .acct-btn.on { background: var(--surf); }
.acct-btn .av { width: 36px; height: 36px; font-size: 15px; }
.acct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.acct-t b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-t small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: none; }
.acct-btn > svg circle { fill: var(--muted); }
.acct-btn > svg.chev { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acct-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; padding: 6px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(17,17,17,.14);
}
.acct-menu[hidden] { display: none; }
.acct-menu a, .acct-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; text-align: left;
}
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: var(--surf); outline: none; }
.acct-menu svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ============= Ronde J: Home ============= */
.home-hero { padding: 6px 0 4px; }
.home-date { margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.home-hero h1 { margin: 2px 0 16px; }
.home-talk {
  width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; cursor: pointer;
  background: var(--green); color: var(--cream); border-radius: 999px; font-size: 18px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 10px 28px rgba(31,61,43,.22);
}
.home-talk:active { transform: scale(.985); }
.home-talk svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-ask { display: flex; gap: 8px; margin: 12px 0 8px; }
.home-ask input { border: 0; background: var(--surf); border-radius: 24px; padding: 12px 18px; }
.home-ask input:focus { box-shadow: inset 0 0 0 1.5px var(--green); }
.hb { margin-top: 22px; }
.hb-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.hb-h h2 { flex: 1; font-size: 18px; margin: 0; }
.hb-h a { color: var(--green); font-weight: 600; font-size: 14px; text-decoration: none; padding: 8px 0; }
.hb-empty { margin: 6px 0; color: var(--muted); }
.hl { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 2px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.hl:last-child { border-bottom: 0; }
.hl.sub { min-height: 36px; padding-left: 34px; font-size: 14px; color: var(--ink-2); border-bottom: 0; }
.hl.more { color: var(--green); font-weight: 600; font-size: 14px; }
.hl-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-m { flex: none; font-size: 13px; color: var(--muted); font-weight: 600; }
.hl-m.late { color: var(--low); }
.hl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--green); flex: none; margin: 0 6px; }
.hl-dot.started { background: var(--gold); border-color: var(--gold); }
.hl.act { font-size: 14px; color: var(--ink-2); min-height: 40px; }
.hl.act svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; margin: 0 3px; }
.hl.act time { color: var(--muted); font-size: 13px; flex: none; }
.hb-review { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; margin: 6px 0 2px; border-radius: 14px; background: #FFF6E2; color: var(--gold-ink); font-weight: 700; text-decoration: none; }
.hb-review span { flex: 1; }
.hb-review svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hb-review .chev { width: 18px; height: 18px; }

/* ============= Ronde J: Taken ============= */
.chip .n:empty { display: none; }
.chip .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 2px; border-radius: 999px; background: var(--surf); font-size: 12px; text-align: center; }
.chip.on .n { background: #fff; }
.taken .cc { max-width: none; }
.taken .cc-t > span:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk.done .cc-t, .tk.cancelled .cc-t { color: var(--muted); text-decoration: line-through; }
.tk .cc-h em.late { color: var(--gold-ink); background: #FCEFCF; }
.tk.started .cc-h em { color: var(--gold-ink); background: #FFF0CC; }
.tk-r { margin-top: 14px; }
.tk-r .cc { margin-top: 6px; }
.tk-k { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-k span { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.kb label:first-child { margin-top: 0; }
.kb textarea { min-height: 84px; }
body.stem-actief:not([data-view="talk"]) main { padding-bottom: calc(var(--tabbar-h) + 110px); }

/* ============= Ronde J: registreren en wachtwoord ============= */
.acc .brand.big { display: flex; align-items: center; font-weight: 700; font-size: 18px; margin: 4px 0 18px; }
.acc-h { font-size: 26px; margin: 0 0 6px; }
.acc-err { color: var(--low); font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.acc-err[hidden] { display: none; }
.acc-rule { margin: 6px 0 0; }
.acc form .btn { margin-top: 16px; }
.acc-link { display: block; margin: 10px auto 0; color: var(--green); font-weight: 600; }
.acc-new { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.acc-mail { font-size: 44px; line-height: 1; margin: 18px 0 8px; color: var(--green); }
.pw { position: relative; }
.pw input { padding-right: 74px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--green); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 8px; }
.btn.busy { opacity: .6; }

/* ---------- Factuurprofiel: uploaden, voortgang, controleblad (factuur.js, agent N 19-10) ---------- */
.fx-up { margin-bottom: 10px; }
.fx-form { margin-top: 4px; }
.fx-sec { margin-top: 18px; }
.fx-sec:first-child { margin-top: 6px; }
.fx-sech { font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-items: end; }
.fx-f { grid-column: 1 / -1; min-width: 0; }
.fx-f.fx-half { grid-column: auto; }
.fx-f label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-f input, .fx-f textarea, .fx-f select { width: 100%; }
.fx-f input[type=checkbox] { width: 22px; }
.check-row.fx-f { display: flex; align-items: center; gap: 10px; }
.fx-f select { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
.fx-f input[type=color] { height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.fx-star { color: var(--low); }
.fx-tag { display: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); }
.fx-tag-rev { background: #FCEFCF; color: var(--gold-ink); }
.fx-tag-req { background: var(--surf); color: var(--low); }
.fx-rev > .fx-tag-rev, .fx-rev label > .fx-tag-rev, .fx-rev.check-row > .fx-tag-rev { display: inline-block; }
.fx-rev input:not([type=checkbox]), .fx-rev textarea, .fx-rev select { border-color: var(--gold); background: #FFFBEF; box-shadow: 0 0 0 3px rgba(242,182,61,.18); }
.fx-miss label > .fx-tag-req { display: inline-block; }
.fx-miss input, .fx-miss textarea { border-color: var(--low); box-shadow: 0 0 0 3px rgba(180,70,47,.12); }
.check-row.fx-f { margin-top: 14px; }
.fx-warn { margin: 6px 0 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surf); color: var(--low); font-size: 14px; line-height: 1.4; }
.fx-warn q { display: block; margin-top: 6px; font-style: italic; color: var(--ink-2); overflow-wrap: anywhere; }
.fx-cardh b { font-size: 16px; }
.fx-cardh p { margin: 4px 0 10px; }
.fx-cardh .btns { gap: 8px; }
.fx-cardh .btns .btn { font-size: 14px; min-height: 44px; height: auto; padding: 10px; line-height: 1.25; }
.fx-prog { text-align: center; padding: 28px 8px 8px; }
.fx-doc { position: relative; width: 72px; height: 92px; margin: 0 auto 18px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surf-2); overflow: hidden; }
.fx-doc i { display: block; height: 6px; margin: 12px 12px 0; border-radius: 3px; background: var(--line); }
.fx-doc i:nth-child(2) { width: 60%; } .fx-doc i:nth-child(4) { width: 40%; }
.fx-doc b { position: absolute; left: 0; right: 0; height: 18px; top: -18px; background: linear-gradient(180deg, transparent, rgba(31,61,43,.22)); animation: fxscan 1.4s ease-in-out infinite; }
@keyframes fxscan { 0% { top: -18px; } 100% { top: 92px; } }
.fx-ptitle { font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.fx-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; max-width: 280px; margin: 0 auto 16px; }
.fx-bar span { display: block; height: 100%; width: 35%; border-radius: 6px; background: var(--green); animation: fxbar 1.2s ease-in-out infinite; }
@keyframes fxbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.fx-steps { list-style: none; padding: 0; margin: 0 auto; max-width: 260px; text-align: left; }
.fx-steps li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); font-size: 15px; }
.fx-steps li::before { content: ''; position: absolute; left: 4px; top: 10px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); }
.fx-steps li.now { color: var(--ink); font-weight: 600; }
.fx-steps li.now::before { border-color: var(--green); border-top-color: transparent; animation: fxspin .8s linear infinite; }
.fx-steps li.done { color: var(--ink-2); }
.fx-steps li.done::before { background: var(--green); border-color: var(--green); }
@keyframes fxspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fx-doc b, .fx-bar span, .fx-steps li.now::before { animation: none; } }

/* 19-10: startblok op Home voor een nieuw bedrijf (voorbeelden vullen de invoer) */
.hb-start .hb-idea { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.hb-start .hb-idea .hl-t { flex: 1; white-space: normal; }
.hb-start .hb-idea:last-child { border-bottom: 0; }
.hb-start .hb-idea:hover { color: var(--green); }
.hb-start .hb-idea svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============= Ronde 20-10 (app-schil): menu, lade, taakblad, Home, bijlagen ============= */
/* hamburger en lade (telefoon) */
.burger { display: none; }
body.authed .burger { display: flex; flex: none; margin-left: -6px; }
body.authed .top { padding-left: 6px; }
body.authed .top .title { flex: 1; }
.side-dim { position: fixed; inset: 0; z-index: 59; background: rgba(17,17,17,.45); }
.side-dim[hidden] { display: none; }
.side .side-x { display: none; }
.side-g { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.side-gh { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.side button {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent;
  border-radius: 14px; color: var(--ink); font-weight: 600; font-size: 15px; text-align: left; cursor: pointer;
}
.side button:hover { background: var(--surf); }
.side button.out { color: var(--low); }
.side button.out svg { stroke: var(--low); }
.side a.on { background: var(--green-ink); color: var(--green); }
.side a:focus-visible, .side button:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
#sideFoot a.acct-btn { text-decoration: none; }
@media (max-width: 899.98px) {
  body.authed .side {
    display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: min(86vw, 320px); padding: calc(10px + var(--safe-t)) 12px calc(12px + var(--safe-b)); background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-104%); visibility: hidden; transition: transform .22s ease-out, visibility 0s linear .22s;
    box-shadow: 8px 0 32px rgba(17,17,17,.18);
  }
  body.side-open .side { transform: none; visibility: visible; transition: transform .22s ease-out; }
  body.side-open { overflow: hidden; }
  .side .sidetop { display: flex; align-items: center; padding: 6px 12px 4px; font-weight: 700; font-size: 17px; }
  .side .brand { display: flex; align-items: center; }
  .side .spacer { flex: 1; min-height: 12px; }
  .side a { min-height: 48px; font-size: 16px; }
  .side button { min-height: 48px; font-size: 16px; }
  .side .side-x { display: flex; position: absolute; top: calc(10px + var(--safe-t)); right: 8px; width: 44px !important; min-height: 44px !important; padding: 0 !important; justify-content: center; }
  .side-x svg { stroke: var(--ink) !important; }
}
@media (min-width: 900px) {
  body.authed .burger { display: none; }
  body.authed .top { padding-left: 32px; }
}
@media (prefers-reduced-motion: reduce) { body.authed .side { transition: none !important; } }
/* onderbalk: Praat, Chat, Taken, Menu */
.tabs .tab-menu { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.tabs .tab-menu.on { color: var(--green); }
.tabs .tab-menu.on .ic { background: var(--green-ink); }

/* taakkaart: uitklapicoon en details op 3 regels */
.tk-x { flex: none; width: 36px; height: 36px; margin: -8px -8px -8px 2px; border: 0; background: transparent; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.tk-x:hover, .tk-x:focus-visible { background: var(--surf); color: var(--green); }
.tk-x svg { width: 20px; height: 20px; stroke: currentColor !important; }
.cc-h em + .tk-x, .cc-h em ~ .tk-x { margin-left: 2px; }
.cc-task .cc-h em + .tk-x { margin-left: 2px; }
.tk[data-task] { cursor: pointer; }
.tk-d { font-size: 14px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tk-more { border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 14px; padding: 2px 0; min-height: 32px; cursor: pointer; }

/* taakblad */
.tblad { max-width: 680px; }
.tb-top { display: flex; align-items: center; gap: 8px; margin: -6px 0 6px -10px; }
.tb-k { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tb-k svg { width: 18px; height: 18px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-st { margin-left: auto; font-style: normal; font-size: 13px; color: var(--green); background: var(--green-ink); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.tb-st.started { color: var(--gold-ink); background: #FFF0CC; }
.tb-st.done { color: var(--muted); background: var(--surf); }
.tblad .tb-title { min-height: 0; height: auto; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; border: 0; padding: 4px 0; background: transparent; resize: none; overflow: hidden; border-radius: 0; border-bottom: 1px solid transparent; }
.tblad .tb-title:focus { border-bottom-color: var(--green); }
.tblad .tb-title:disabled { color: var(--ink); opacity: 1; }
.tb-ro { padding: 10px 0; color: var(--ink-2); white-space: pre-wrap; }
.tb-chips { padding-bottom: 2px; }
.tb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tb-grid input, .tb-grid select { width: 100%; min-width: 0; }
.tb-reach { margin-top: 14px; }
.tb-meta { margin: 14px 0 4px; }
.tblad #tbSave { margin-top: 10px; }
.tb-acts { flex-wrap: wrap; margin-top: 16px; }
.tb-acts > .danger { color: var(--low); margin-left: auto; }
.cc-a > [disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 420px) { .tb-grid { grid-template-columns: 1fr; } }
.dlg-b.danger { justify-content: center; background: var(--low); color: #fff; margin-top: 4px; }

/* Home: voorbeelden en laatste gesprek */
.home-ideas { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.home-ideas[hidden] { display: none; }
.home-ideas button { text-align: left; border: 0; background: var(--surf); color: var(--ink); cursor: pointer; border-radius: 16px; padding: 12px 16px; min-height: 48px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.home-ideas button:hover { background: var(--line-2); }
.home .taken .cc { margin-top: 8px; }
.home-chat { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 2px; text-decoration: none; color: var(--ink); }
.home-chat .hc { max-width: 86%; padding: 9px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.home-chat .hc.me { align-self: flex-end; background: var(--green); color: var(--cream); border-bottom-right-radius: 6px; }
.home-chat .hc.ai { align-self: flex-start; background: var(--surf); border-bottom-left-radius: 6px; }
.act-day { font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 0 2px; }

/* één microfoon */
.field .mini[hidden] { display: none; }
@keyframes wizflash { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 0 rgba(242,182,61,0); } }
.wiz-flash { animation: wizflash 1.4s ease-out; }
.wiz-voice:empty { display: none; }

/* chat: bijlage en scanner-knoppen */
.cbtn.ghost { width: 40px; height: 48px; background: transparent; color: var(--ink-2); }
.cbtn.ghost:hover { color: var(--green); }
.composer .cbtn.ghost + .cbtn.ghost { margin-left: -6px; }
.att-prev { flex: none; width: 100%; max-width: 760px; margin: 0 auto; padding: 6px 12px 0; }
.att-prev[hidden] { display: none; }
.att-chip { display: flex; align-items: center; gap: 10px; padding: 6px; background: var(--surf); border-radius: 16px; max-width: 360px; }
.att-chip img, .att-ic { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.att-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.att-n { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.att-n b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-n small { font-size: 12px; color: var(--muted); }
.att-x { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.att-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.m-att { align-self: flex-end; margin-top: 10px; display: block; max-width: 220px; border-radius: 16px; overflow: hidden; background: var(--surf); text-decoration: none; }
.m-att img { display: block; width: 100%; max-height: 280px; min-height: 60px; object-fit: cover; }
.m-att.file { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 14px; }
.m-att.file svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.m-att.sending { opacity: .7; }
.m-att.broken img { visibility: hidden; }
.m-att + .m.me { margin-top: 4px; }
@media (min-width: 900px) { .att-prev { padding: 6px 32px 0; } }

/* scanner (scan.js) */
body.scan-open { overflow: hidden; }
.scan { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; }
.scan [hidden] { display: none !important; }
.scan-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: calc(76px + var(--safe-t)); bottom: calc(130px + var(--safe-b)); pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; border-radius: 4px; }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.scan-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.scan-frame i:nth-child(3) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.scan-frame i:nth-child(4) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.scan-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 10px 10px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
.scan-hint { font-weight: 600; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scan-ib { width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.scan-ib.ghost { background: transparent; }
.scan-ib svg, .scan-b svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scan-bot { position: relative; z-index: 2; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 24px calc(22px + var(--safe-b)); background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6)); }
.scan-shoot { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.scan-shoot span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.scan-shoot:active span { transform: scale(.92); }
.scan-shoot:disabled { opacity: .5; }
.scan-msg { position: absolute; z-index: 3; left: 16px; right: 16px; top: 40%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.scan-msg p { margin: 0; font-weight: 600; font-size: 16px; background: rgba(0,0,0,.6); padding: 10px 14px; border-radius: 14px; }
.scan-rev { position: absolute; inset: 0; display: flex; flex-direction: column; background: #111; }
.scan-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--safe-t)) 16px 8px; }
.scan-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.scan-rev .scan-bot { background: #111; justify-content: center; padding-top: 12px; }
.scan-b { min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.scan-b.pri { background: var(--gold); color: var(--ink); }
.scan-b:disabled { opacity: .5; }

/* QA-ui 20-10: een melding mag geen knoppen bedekken. Niet klikblokkerend (behalve met een eigen knop),
   en buiten de chat op de telefoon net boven de onderbalk in plaats van midden over de lijst. */
.toast:not(.has-act) { pointer-events: none; }
@media (max-width: 899px) {
  body:not([data-view="talk"]):not(.stem-actief):not(:has(#sheet:not([hidden]))) .toast { bottom: calc(var(--tabbar-h) + 12px); }
  body:has(.fi-bar):not(.stem-actief):not(:has(#sheet:not([hidden]))) .toast { bottom: calc(var(--tabbar-h) + 84px); } /* selectiebalk Strokies vrij houden */
  /* in Gesels staat de nieuwste kaart (met knoppen) onderaan: melding bovenin, onder de kop */
  body[data-view="talk"]:not(.stem-actief):not(:has(#sheet:not([hidden]))) .toast { bottom: auto; top: calc(var(--top-h) + var(--safe-t) + 8px); }
}
/* Aktiwiteit: elke regel opent wat het is (20-10) */
button.hl.act.go { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; text-align: left; cursor: pointer; }
button.hl.act.go:hover, button.hl.act.go:focus-visible { background: var(--line-2); }
button.hl.act.go .hl-t { flex: 1; min-width: 0; }

/* 20-10: keuze pratend/typend en één vraag per scherm in de onboarding */
.onbmode .big { font-size: 22px; margin-bottom: 6px; }
.onbmode .langbig b { font-size: 17px; line-height: 1.3; }
.wiz-qof { margin: 0 0 4px; }
.wiz label.q1 { font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 6px; }

/* ============= Huisstijl WorkWife (20-10): groene kopbalk, logo als bestand, goud alleen als accent ============= */
.top { background: var(--green); color: var(--cream); }
.top .iconbtn { color: var(--cream); }
.top .iconbtn:active { background: rgba(244,239,227,.14); }
.top .top-logo { display: block; height: 22px; width: auto; }
body.has-farm .top .top-logo { display: none; }
body:not(.has-farm) .top .brand-icon { display: none; }
.brand .ww-logo { display: block; height: 26px; width: auto; }
.brand.big { display: flex; align-items: center; margin: 4px 0 18px; }
.brand.big .ww-logo { height: 34px; }
.langstep .brand.big { justify-content: center; margin-bottom: 24px; }
.side .sidetop .brand .ww-logo { height: 24px; }
.cbtn.mic:not(.rec) { background: var(--gold); color: var(--ink); }
.home-talk svg, .stem-scherm .stem-knop svg { color: var(--gold); }
@media (min-width: 900px) {
  body.authed .top .top-logo { display: none; }
}
