/* ==========================================================================
   Octavius Demo — look & feel overgenomen van de echte app (mobiele weergave)
   ========================================================================== */
:root {
  --bg: #F5ECEC;          /* werkvlak */
  --surface: #FAF6F5;     /* topbalk, menu, dialogen */
  --card: #FFFFFF;
  --ink: #2B2222;
  --muted: #7B6B6D;
  --primary: #462E3E;     /* aubergine */
  --chip: #EFE3E2;
  --line: #E6D8D7;
  --green: #1D8A3C;
  --green-bg: #DDEFE0;
  --accent: #EE1C4E;      /* Indicia-roze: alleen voor de demo-regie */
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
h1, h2, h3, h4, p, ul { margin: 0; }
.ic { flex: none; display: block; }
.grow { flex: 1; }

/* ---------- Telefoonkader ---------- */
#phone {
  position: relative; width: 100vw; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden; overflow: clip; background: var(--bg);
}
html, body { overflow: hidden; }
@media (min-width: 520px) {
  body { background: #2B2222; display: grid; place-items: center; }
  #phone {
    width: 402px; height: min(860px, calc(100dvh - 32px));
    border-radius: 38px; box-shadow: 0 0 0 10px #171112, 0 30px 80px rgba(0,0,0,.5);
  }
}
#app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: clip; }

/* ---------- Topbalk ---------- */
.topbar {
  flex: none; display: flex; align-items: center; gap: 10px;
  height: calc(56px + var(--safe-top)); padding: var(--safe-top) 12px 0 12px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-weight: 600; font-size: 17px; display: flex; align-items: center; }
.logo { height: 30px; width: auto; display: block; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; }
.roundbtn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.roundbtn.soft { background: var(--chip); color: var(--muted); }
.roundbtn.dark { background: var(--primary); color: #fff; }
.roundbtn[aria-disabled="true"] { opacity: .45; }

/* ---------- Views ---------- */
#view { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.page-scroll { flex: 1; overflow-y: auto; padding: 20px 20px 28px; }
.page-sub { color: var(--muted); margin: 14px 0 18px; }

/* ---------- Chat ---------- */
.thread { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.welcome { margin: auto 0; padding: 12px 8px 32px; text-align: center; }
.welcome h1 { font-size: 40px; line-height: 1.16; font-weight: 300; letter-spacing: -0.02em; }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.starter {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500;
}

.chat-tabs {
  align-self: center; display: flex; align-items: center; gap: 4px; padding: 4px;
  background: var(--card); border-radius: 999px; box-shadow: 0 1px 3px rgba(70,46,62,.08);
  font-size: 13px; color: var(--muted); margin-bottom: 4px;
}
.chat-tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; }
.chat-tabs .on { background: #9C8791; color: #fff; }

.msg.user { display: flex; justify-content: flex-end; }
.bubble {
  max-width: 88%; padding: 12px 14px; background: var(--card); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(70,46,62,.06); font-size: 15.5px;
}
.bubble time { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.bubble .attachment {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px;
  background: var(--bg); border-radius: 10px; font-size: 13.5px; font-weight: 500;
}

.msg.ai { font-size: 15.5px; line-height: 1.55; }
.msg.ai > * + * { margin-top: 10px; }
.msg.ai ul, .msg.ai ol { padding-left: 20px; }
.msg.ai li + li { margin-top: 4px; }
.msg.ai h3 { font-size: 16px; }
.msg.ai .pending { display: none; }

.msg-foot { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); padding-bottom: 6px; }
.anon-ok { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.msg-foot code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.anon-link { font-size: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 4px 0; }
.msg-foot span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.thinking { display: flex; gap: 5px; padding: 6px 2px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Stappenbalk ("Vraag aan de gebruiker · 3 stappen") en uitklapbaar paneel */
.panel { background: var(--chip); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13.5px; }
.panel-head b { font-weight: 600; }
.panel-head .count { font-size: 12px; background: rgba(70,46,62,.1); border-radius: 6px; padding: 1px 6px; }
.panel-body { padding: 0 12px 12px; font-size: 14.5px; line-height: 1.6; }
.panel-body small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
/* Markeringen zoals in het Anonimisatie-overzicht van de echte app */
mark { color: inherit; border-radius: 4px; padding: 1px 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.pii, mark.tok { background: #F6DDB4; }
mark.tok { font-weight: 500; white-space: nowrap; }
mark.exposed { background: #FBD5DD; }
mark.restored { background: #DDEFE0; }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Invoervak ---------- */
.composer-wrap { flex: none; padding: 4px 16px calc(14px + var(--safe-bottom)); }
.agentbar {
  display: flex; align-items: center; gap: 8px; margin: 0 8px; padding: 8px 12px 14px; margin-bottom: -8px;
  background: var(--chip); border-radius: 14px 14px 0 0; font-size: 13.5px; font-weight: 500;
}
.composer { position: relative; background: var(--card); border-radius: 24px; padding: 14px 14px 12px; box-shadow: 0 1px 3px rgba(70,46,62,.06); }
.composer-input { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); padding: 2px 2px 12px; }
.composer-input .ic { margin-top: 2px; }
#prompt {
  flex: 1; border: 0; outline: 0; resize: none; background: transparent; padding: 0; margin: 0;
  font: inherit; color: var(--ink); line-height: 1.45; max-height: 132px; -webkit-user-select: text; user-select: text;
}
#prompt::placeholder { color: var(--muted); opacity: 1; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  background: var(--chip); border-radius: 999px; font-size: 14.5px; font-weight: 500;
}
.chip.anon { border: 1.5px solid var(--primary); }
.shield-high { fill: var(--green); stroke: var(--green); }
.shield-mid { fill: #C9A227; stroke: #C9A227; }
.shield-low { fill: #D9837D; stroke: #D9837D; }
.shield-off { stroke: var(--muted); }
.modelsel {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; margin-top: 10px; padding: 0 14px;
  background: var(--chip); border-radius: 999px; font-size: 14.5px; font-weight: 600;
}

/* ---------- Knoppen, tags, kaarten ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.btn.block { width: 100%; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.outline { border: 1.5px solid var(--primary); background: var(--card); }
.btn.small { height: 38px; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--chip); }
.tag.green { background: var(--green-bg); color: #1B6B33; }

.seg { display: flex; padding: 4px; background: var(--chip); border-radius: 999px; }
.seg button { flex: 1; height: 38px; border-radius: 999px; font-size: 14px; font-weight: 600; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg .on { background: var(--primary); color: #fff; }
.searchbox {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin: 16px 0 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}

.agent-head { display: flex; align-items: center; gap: 12px; }
.agent-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--chip); border-radius: 10px; }
.agent h3 { font-size: 16.5px; font-weight: 600; }
.agent p { color: var(--muted); font-size: 14.5px; margin: 10px 0; }
.agent hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 12px; }

.skill b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.skill p { color: var(--muted); font-size: 13.5px; }
.card.skill + .card.skill { margin-top: 10px; }

.kb-empty { display: grid; place-items: center; min-height: 180px; color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }
.kb-box { flex: none; margin: 0 16px calc(16px + var(--safe-bottom)); background: var(--card); border-radius: 22px; padding: 16px; min-height: 112px; display: flex; flex-direction: column; gap: 12px; }
.kb-box .row { display: flex; gap: 8px; margin-top: auto; justify-content: flex-end; }
.kb-q { display: flex; gap: 8px; color: var(--muted); }
#kbPrompt { color: var(--ink); } #kbPrompt.ph { color: var(--muted); }
.kb-question { font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 12px; }
.kb-h { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.source {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; animation: rise .25s ease;
}
.source b, .filecard b, .tool-row b, .action-card b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.source small, .filecard small, .tool-row small, .action-card small { display: block; font-size: 12.5px; color: var(--muted); }
.source .quote { flex-basis: 100%; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 13.5px; line-height: 1.5; font-style: italic; }
.kb-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; background: var(--green-bg); color: #1B6B33; border-radius: 10px; font-size: 13px; font-weight: 500; }
.kb-note .ic { margin-top: 2px; }

/* Kaartjes in de chat: bestand, gekoppelde systemen, klaargezette actie */
.agent-ic.small { width: 30px; height: 30px; border-radius: 8px; }
.filecard { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; animation: rise .25s ease; }
a.filecard { color: inherit; text-decoration: none; }
.toolrun { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.tool-row { display: flex; align-items: center; gap: 10px; animation: rise .25s ease; }
.tool-row .agent-ic { background: var(--card); }
.tool-row .state { color: var(--green); width: 18px; display: grid; place-items: center; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(70,46,62,.2); border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.action-card { animation: rise .25s ease; }
.action-card .btn { margin-top: 14px; }
.action-card .btn.done { background: var(--green-bg); color: #1B6B33; }
.msg.ai table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border-radius: 10px; overflow: hidden; }
.msg.ai th, .msg.ai td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.msg.ai th { font-size: 12px; color: var(--muted); font-weight: 600; }
.msg.ai tr:last-child td { border-bottom: 0; }
.msg.ai td.r, .msg.ai th.r { text-align: right; font-variant-numeric: tabular-nums; }
.model-tag { font-weight: 600; color: var(--ink); }

/* ---------- Beheeroverzicht ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.kpis .card { margin: 0; padding: 14px; }
.kpi small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi b { display: block; font-size: 28px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--chip); margin: 6px 0; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.sec { font-size: 15px; font-weight: 600; margin: 24px 2px 10px; }
.bars { padding: 6px 14px; }
.bar-row { display: block; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; font-weight: 500; margin-bottom: 6px; }
.bar-label b { font-weight: 400; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { display: block; height: 8px; }
.bar i { display: block; height: 100%; min-width: 4px; background: var(--primary); border-radius: 0 4px 4px 0; }
.fineprint { font-size: 12.5px; color: var(--muted); margin: 14px 2px 0; }
.team-budget { padding: 4px 6px 10px; }
.team-budget small { font-size: 12.5px; color: var(--muted); }
.team-budget b { display: block; font-size: 30px; font-weight: 300; letter-spacing: -0.02em; }
.team-budget b span { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.team-budget > span { font-size: 12.5px; color: var(--muted); }
.facts { margin: 4px 6px 6px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; }
.d-item .tag { margin-left: auto; font-weight: 600; }

/* ---------- Menu (zijbalk, op mobiel schermvullend) ---------- */
#drawer { position: absolute; inset: 0; z-index: 20; background: var(--surface); display: flex; flex-direction: column; animation: slidein .22s ease; }
@keyframes slidein { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { flex: none; display: flex; align-items: center; height: calc(64px + var(--safe-top)); padding: var(--safe-top) 12px 0 20px; }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.d-section { display: flex; align-items: center; gap: 8px; padding: 14px 8px 8px; color: #5F5053; font-weight: 600; font-size: 14.5px; }
.d-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px 0 22px; border-radius: 8px; font-size: 16px; }
.d-item.on { background: var(--chip); font-weight: 600; }
.d-row { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 22px; color: #4A3D40; font-size: 15px; }
.d-row small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.d-row span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-foot { flex: none; padding: 12px 12px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.d-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 8px 4px; font-weight: 600; font-size: 15px; }
.d-version { padding: 0 8px 0 38px; font-size: 12.5px; color: var(--muted); }
.demo-link { font-size: 12.5px; font-weight: 600; color: var(--accent); border: 1.5px solid currentColor; border-radius: 999px; padding: 3px 10px; }

/* ---------- Dialogen ---------- */
#sheetwrap { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: calc(20px + var(--safe-top)) 14px 20px; }
.backdrop { position: absolute; inset: 0; background: rgba(43,34,34,.38); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
#sheet {
  position: relative; width: 100%; max-height: 100%; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 18px; box-shadow: 0 20px 50px rgba(43,34,34,.25); animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.sheet-head { flex: none; display: flex; align-items: center; padding: 14px 10px 8px 18px; font-weight: 600; font-size: 16px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 16px; }
#sheet { overflow: hidden; }
/* De niveaus-dialoog blijft bovenaan staan, zodat de tabjes niet verspringen per niveau. */
#sheetwrap[data-sheet="anon"] { place-items: start center; }

/* Anonimisatieniveaus, anonimisatie-overzicht en "Onder water" */
#sheet.tall { height: 100%; }
.seg.levels { margin-bottom: 14px; }
.seg.levels button { font-size: 13.5px; padding: 0 4px; }
.anon-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 16px; padding: 0 4px; }
.anon-head small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.level-desc { font-size: 14px; color: var(--muted); margin: 4px 4px 0; min-height: 40px; }
.anon-box { padding: 12px; background: var(--chip); border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; line-height: 1.75; }
.shield-count { display: flex; align-items: center; gap: 10px; margin: 10px 4px 0; font-size: 13px; font-weight: 600; }
.shield-count .meter { flex: 1; margin: 0; background: var(--card); }
.shield-count .meter i { background: var(--green); transition: width .35s; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 4px 0; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 4px; }
.chips span { font-size: 12px; font-weight: 500; padding: 3px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; }
.chips span.more { background: transparent; border-style: dashed; color: var(--muted); }

.under { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.zone { border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; animation: rise .3s ease; }
.zone.own { background: var(--green-bg); }
.zone.ext { background: var(--card); border: 1.5px dashed #B9A5AC; }
.zone-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.zone.own .zone-label { color: #1B6B33; }
.zone.ext .zone-label { color: var(--muted); }
.ucard { background: var(--surface); border-radius: 10px; padding: 12px; font-size: 13.5px; line-height: 1.7; animation: rise .3s ease; }
.zone.ext .ucard { background: var(--bg); }
.ucard > b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; line-height: 1.3; margin-bottom: 8px; }
.ucard > b i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-style: normal; font-size: 12px; }
.ucard p + p { margin-top: 6px; }
.ucard small { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #1B6B33; font-weight: 500; }
.keys { margin: 0; }
.keys div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.keys dt { font-size: 12.5px; } .keys dd { margin: 0; font-weight: 600; text-align: right; font-size: 13px; }
.flow { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); animation: rise .3s ease; }

.sheet-body h4 { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 6px 6px; }
.model-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; }
.model-row.on { background: var(--chip); }
.model-row b { display: block; font-size: 14.5px; font-weight: 600; }
.model-row small { color: var(--muted); font-size: 12px; }
.model-row .ic { margin-top: 2px; }
.mtags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.mtags span { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.model-row .check { margin-left: auto; visibility: hidden; }
.model-row.on .check { visibility: visible; }

.toggle-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row b { display: block; font-size: 14.5px; } .toggle-row p { font-size: 12.5px; color: var(--muted); }
.switch { flex: none; width: 34px; height: 20px; border-radius: 999px; background: #9B8A8C; position: relative; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--primary); } .switch.on::after { transform: translateX(14px); }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool { display: flex; gap: 8px; align-items: center; padding: 10px; background: var(--chip); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; }

/* ==========================================================================
   Demo-regie: startscherm, ondertitel met Volgende-knop, aanwijscirkel
   ========================================================================== */
#launcher {
  position: absolute; inset: 0; z-index: 60; overflow-y: auto; background: var(--surface);
  padding: calc(22px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
}
.l-head { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.l-badge { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 6px; padding: 3px 8px; }
#launcher h1 { font-size: 30px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
.l-intro { color: var(--muted); margin: 10px 0 20px; font-size: 15px; }
.l-name { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 22px; }
.l-name input {
  display: block; width: 100%; height: 46px; margin-top: 6px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; outline: 0; -webkit-user-select: text; user-select: text;
}
.l-name input:focus { border-color: var(--primary); }
.l-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin-bottom: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.l-card .num { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; }
.l-card small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.l-card b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.l-card span.d { display: block; font-size: 13px; color: var(--muted); }
.l-card.concept { background: transparent; border-style: dashed; }
.l-card.concept .num { background: var(--chip); color: var(--muted); }
.l-card.concept small { color: var(--muted); }
.l-sep { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; }
.l-free { margin-top: 12px; }

#coach { flex: none; position: relative; z-index: 50; background: var(--ink); color: #fff; padding: 0 14px calc(12px + var(--safe-bottom)); }
.coach-progress { height: 3px; margin: 0 -14px 10px; background: rgba(255,255,255,.14); }
.coach-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.coach-body { display: flex; align-items: center; gap: 12px; }
.coach-text { flex: 1; min-width: 0; }
.coach-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.coach-meta button { color: inherit; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; text-decoration: underline; padding: 4px 0; }
.coach-text p { font-size: 14.5px; line-height: 1.38; }
.coach-text { min-height: 102px; } /* ruimte voor vier regels, zodat het scherm niet verspringt */
.coach-next {
  flex: none; display: grid; place-items: center; width: 58px; height: 58px;
  background: var(--accent); color: #fff; border-radius: 50%;
}
.coach-next.nudge { animation: nudge .45s; }
.coach-next.pulse { animation: nextpulse 1.4s infinite; }
.coach-next[aria-disabled="true"] { background: rgba(255,255,255,.16); animation: none; }
@keyframes nextpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(238,28,78,.55); } 60% { box-shadow: 0 0 0 10px rgba(238,28,78,0); } }

#hotspot {
  position: absolute; z-index: 55; pointer-events: none; border: 3px solid var(--accent);
  animation: ring 1.4s infinite; transition: top .2s, left .2s, width .2s, height .2s;
}
#hotspot.nudge { animation: nudge .45s; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(238,28,78,.5); } 60% { box-shadow: 0 0 0 12px rgba(238,28,78,0); } }
@keyframes nudge { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(.96); } }

#endcard { position: absolute; inset: 0; z-index: 58; display: flex; align-items: flex-end; background: rgba(43,34,34,.45); animation: fade .25s; }
.end-inner { width: 100%; background: var(--surface); border-radius: 24px 24px 0 0; padding: 24px 20px calc(20px + var(--safe-bottom)); animation: rise .28s ease; }
.end-inner small { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.end-inner h2 { font-size: 24px; font-weight: 300; letter-spacing: -0.01em; margin: 4px 0 14px; }
.end-inner ul { list-style: none; padding: 0; margin-bottom: 20px; }
.end-inner li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; }
.end-inner li .ic { color: var(--green); margin-top: 2px; }
.end-inner .btn + .btn { margin-top: 10px; }

/* Beheeroverzicht: aandachtspunten, weekgrafiek en logboek */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.alert .ic { margin-top: 1px; }
.alert.warn { background: #FBF0D9; border-color: #EBD49C; } .alert.warn .ic { color: #8A5A00; }
.alert.info .ic { color: var(--muted); }
.alert b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.alert small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.week-bars { display: flex; align-items: flex-end; gap: 8px; height: 132px; border-bottom: 1px solid var(--line); }
.wk { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.wk i { display: block; width: 100%; max-width: 24px; background: var(--primary); border-radius: 4px 4px 0 0; }
.wk.now i { background: #A9949D; }
.wk span { font-size: 11.5px; font-weight: 600; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.wk small { position: absolute; bottom: -20px; font-size: 11.5px; color: var(--muted); }
.weeks { padding-bottom: 12px; } .weeks .fineprint { margin-top: 28px !important; }
.log-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log-row time { flex: none; width: 40px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.log-row b { display: block; font-size: 14.5px; font-weight: 600; }
.log-row small { display: block; font-size: 12.5px; color: var(--muted); }
.log .btn { margin-top: 14px; }
