/* ==========================================================
   Agenda — design tokens
   ========================================================== */
/* Thema "Maansteen": inktblauw, ivoor en een zachte blauw-lila glans.
   Goud is gereserveerd voor YourBooth-boekingen. */
:root {
  --font-d: 'Sora', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-b: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* De bol: maansteen */
  --orb-a: #f6f4ff;
  --orb-b: #b9c6ff;
  --orb-c: #7d86c9;
  --orb-d: #e8e1ff;
  --orb-e: #a8c2e6;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090f;
  --surface: #10121b;
  --surface-2: #161927;
  --surface-3: #1e2233;
  --line: rgba(205, 212, 255, .07);
  --line-2: rgba(205, 212, 255, .13);
  --text: #f2efe8;
  --muted: #8a8ea3;
  --faint: #3b3f55;
  --inv-bg: #f2efe8;
  --inv-text: #0b0c14;
  --rail: #04050a;
  --row-a: #0b0d15;
  --row-b: #0f111b;
  --glass: rgba(18, 21, 33, .72);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .9);
  --glow-a: rgba(159, 176, 255, .11);
  --glow-b: rgba(200, 170, 255, .06);
  --orb-glow: rgba(159, 176, 255, .30);
  --accent: #a9b5ff;
  --gold: var(--accent);
  --c-werk: #f2efe8;
  --c-prive: #8db4cf;
  --c-sociaal: #c4a6d9;
  --c-yourbooth: #c9a45c;
  --c-imp: #f06a62;
  --outer: #030409;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f2ee;
  --surface: #fdfcf9;
  --surface-2: #f6f5f1;
  --surface-3: #eceaf0;
  --line: rgba(20, 24, 60, .07);
  --line-2: rgba(20, 24, 60, .12);
  --text: #0e1020;
  --muted: #777b90;
  --faint: #c3c4cf;
  --inv-bg: #0e1020;
  --inv-text: #f6f4ee;
  --rail: #0e1020;
  --row-a: #fdfcf9;
  --row-b: #f7f6f2;
  --glass: rgba(253, 252, 249, .82);
  --shadow: 0 24px 50px -24px rgba(14, 16, 40, .25);
  --glow-a: rgba(110, 125, 230, .10);
  --glow-b: rgba(190, 150, 230, .06);
  --orb-glow: rgba(110, 125, 230, .22);
  --accent: #5b67c9;
  --gold: var(--accent);
  --c-werk: #0e1020;
  --c-prive: #4f87ab;
  --c-sociaal: #9a72b5;
  --c-yourbooth: #a8823a;
  --c-imp: #d9483f;
  --outer: #dcdbe3;
}

/* ==========================================================
   Base
   ========================================================== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font-b);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }

.app {
  position: relative;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  overflow: clip;
  background: var(--bg);
}

/* Telefoon: de app vult het hele scherm, van de statusbalk tot onder de
   home-balk. Vast aan alle randen in plaats van een hoogte, omdat iOS de
   hoogte van een app op het beginscherm soms te kort berekent. */
@media (max-width: 559px) {
  .app {
    position: fixed;
    inset: 0;
    height: auto;
    max-width: none;
  }
  /* Het document zelf mag nooit scrollen of meeveren; alleen de schermen in de app. */
  html, body {
    position: fixed;
    inset: 0;
    overflow: hidden;
  }
}

/* Niet ingelogd: niets van de agenda achter het inlogscherm laten zien */
.app.locked .views,
.app.locked .tabbar,
.app.locked .fab,
.app.locked .assistant,
.app.locked .sheet,
.app.locked .backdrop { visibility: hidden; }

/* Desktop: toon de app als telefoon */
@media (min-width: 560px) {
  body {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    background: radial-gradient(60% 50% at 50% 40%, var(--glow-b), transparent 70%), var(--outer);
  }
  .app {
    --safe-t: 26px;
    --safe-b: 10px;
    width: 400px;
    height: min(860px, calc(100dvh - 48px));
    border-radius: 48px;
    border: 1px solid var(--line-2);
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .7);
  }
}

.eyebrow {
  font: 600 11px/1 var(--font-b);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }

/* ==========================================================
   Views
   ========================================================== */
.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(var(--safe-t) + 18px) 22px calc(var(--safe-b) + 132px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { opacity: 1; pointer-events: auto; transform: none; }

.view.enter > * { animation: rise .7s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; }
.view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; }
.view.enter > *:nth-child(5) { animation-delay: .16s; }
.view.enter > *:nth-child(6) { animation-delay: .2s; }
.view.enter > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--inv-bg);
  color: var(--inv-text);
  font: 600 15px var(--font-d);
  display: grid;
  place-items: center;
}
.avatar svg { width: 20px; height: 20px; }

.greet {
  font: 700 46px/1 var(--font-d);
  letter-spacing: -.045em;
  margin: 26px 0 28px;
}
.greet .soft { color: var(--muted); font-weight: 300; }
.title {
  font: 700 36px/1.05 var(--font-d);
  letter-spacing: -.035em;
  margin: 10px 0 24px;
}

/* ---------- Weekstrip (Stoic) ---------- */
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  touch-action: pan-y;
}
.wd {
  appearance: none;
  border: 1px solid transparent;
  background: none;
  border-radius: 16px;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--font-d);
  color: var(--muted);
  transition: background .25s, border-color .25s;
}
.wd small { font-size: 12px; text-transform: capitalize; }
.wd b { font-size: 19px; font-weight: 600; color: var(--text); opacity: .5; }
.wd.is-today small { color: var(--gold); font-weight: 600; }
.wd.is-sel { border-color: var(--line-2); background: var(--surface); }
.wd.is-sel b { opacity: 1; }
.wd .dots { display: flex; gap: 3px; height: 4px; }
.wd .dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--c); }

/* ---------- De bol (Opal) ---------- */
.orb-wrap {
  --s: 120px;
  position: relative;
  display: inline-block;
  width: var(--s);
  height: var(--s);
  flex: none;
  transition: width .5s var(--ease), height .5s var(--ease);
}
.orb-wrap::before {
  content: "";
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-glow), transparent 66%);
  filter: blur(calc(var(--s) * .12));
  animation: breathe 5s ease-in-out infinite;
}
.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 202, 206, .55), transparent 38%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, .35) 100%),
    conic-gradient(from 0deg, var(--orb-a), var(--orb-b), var(--orb-c), var(--orb-d), var(--orb-e), var(--orb-a));
  animation: spin 16s linear infinite;
  overflow: hidden;
}
.orb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 70% 78%, rgba(6, 7, 8, .55), transparent 55%);
  animation: spin 16s linear infinite reverse;
}
.orb::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(from 180deg, transparent, rgba(255, 255, 255, .35), transparent 40%);
  filter: blur(calc(var(--s) * .06));
  animation: spin 7s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .75; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 22px 22px 22px 24px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--glow-a), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, var(--glow-b), transparent 60%),
    var(--surface);
  overflow: hidden;
  transition: transform .3s var(--ease);
}
.hero:active { transform: scale(.985); }
.hero h3 {
  font: 600 22px/1.15 var(--font-d);
  letter-spacing: -.025em;
  margin: 10px 0 8px;
}
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.hero p b { color: var(--text); font-weight: 500; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 14px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  font-size: 13px;
  font-weight: 500;
}
.cta svg { width: 16px; height: 16px; }

/* ---------- Statistiek-pillen (Opal) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 30px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stat .pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--sc, var(--line-2));
  box-shadow: none;
  font: 600 17px/1 var(--font-d);
}
.stat .pill svg { width: 15px; height: 15px; color: var(--sc, var(--muted)); }
.stat .lbl { font-size: 12px; color: var(--muted); }

/* ---------- Sectiekop ---------- */
.sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 6px;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Afspraken (Timepage) ---------- */
.evlist { list-style: none; margin: 0; padding: 0; }
.ev {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 13px 6px 13px 2px;
  border-radius: 16px;
  cursor: pointer;
  transition: background .2s, opacity .3s;
}
.ev:active { background: var(--surface); }
.ev .bar { width: 6px; height: 38px; border-radius: 99px; background: var(--c); }
.ev-body { min-width: 0; }
.ev-title {
  font: 400 19px/1.2 var(--font-d);
  letter-spacing: -.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-meta {
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-meta .sep { display: inline-block; width: 12px; }
.ev-side { display: flex; align-items: center; gap: 8px; }
.ev.is-past { opacity: .38; }
.imp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-imp);
}
.yb {
  font: 600 10px/1 var(--font-b);
  letter-spacing: .08em;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--c-yourbooth);
  background: color-mix(in srgb, var(--c-yourbooth) 14%, transparent);
}
.now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font: 600 10.5px/1 var(--font-b);
  letter-spacing: .2em;
  color: var(--c-imp);
}
.now::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-imp);
  box-shadow: 0 0 10px var(--c-imp);
}
.now::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--c-imp), transparent);
}
.empty {
  padding: 26px 0 8px;
  color: var(--muted);
  font: 300 18px/1.4 var(--font-d);
}

/* ---------- Ochtend / avond-kaarten (Stoic) ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 30px;
}
.card {
  aspect-ratio: .8;
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 24px 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-family: var(--font-d);
  transition: transform .3s var(--ease);
}
.card:active { transform: scale(.97); }
.card h4 { margin: 18px 0 6px; font-size: 19px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.card p { margin: 0; font-size: 13px; opacity: .55; font-family: var(--font-b); }
.card-inv { background: var(--inv-bg); color: var(--inv-text); }
.card-plain { background: var(--surface); color: var(--text); }
.sun { width: 54px; height: 54px; border-radius: 50%; background: currentColor; }
.moon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 13px 0 0 0 currentColor;
  transform: translateX(-7px);
}

/* ==========================================================
   Agenda (Timepage)
   ========================================================== */
.view-agenda { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ag-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 18px) 22px 16px;
}
.ag-head h2 {
  margin: 10px 0 0;
  font: 700 36px/1 var(--font-d);
  letter-spacing: -.035em;
}
.chip-btn {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 500;
}
.tp-wrap { position: relative; flex: 1; min-height: 0; }
.tp-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding-bottom: calc(var(--safe-b) + 130px);
  background: linear-gradient(90deg, var(--rail) 0 92px, transparent 92px);
  scrollbar-width: none;
}
.tp-scroll::-webkit-scrollbar { display: none; }
.tp-month {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 90px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.tp-month span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font: 600 13px/1 var(--font-d);
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--gold);
}
.tp-row, .tp-week { display: grid; grid-template-columns: 92px 1fr; }
.tp-row { min-height: 124px; }
.tp-day {
  background: var(--rail);
  color: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 22px 12px 0 30px;
}
.tp-date {
  width: 54px;
  padding: 10px 0 9px;
  border-radius: 16px;
  text-align: center;
  font-family: var(--font-d);
}
.tp-date small { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.tp-date b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; }
.tp-date.is-today { background: #fff; color: #000; }
.tp-events {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px 14px 18px;
  background: var(--row-a);
  cursor: pointer;
}
.tp-row.alt .tp-events { background: var(--row-b); }
.tp-events .ev { padding: 9px 4px 9px 0; }
.tp-events .ev-title { font-size: 18px; }
.tp-free { font: 300 16px var(--font-d); color: var(--faint); padding-left: 2px; }
.tp-week .tp-rail { background: var(--rail); }
.tp-wk { padding: 22px 20px 8px; background: var(--bg); }

/* ==========================================================
   Inzicht
   ========================================================== */
.gauge-box { position: relative; width: 280px; margin: 4px auto 0; }
.gauge { width: 100%; overflow: visible; }
.g-track { fill: none; stroke: var(--line-2); stroke-width: 12; stroke-linecap: round; }
.g-val { fill: none; stroke-width: 12; stroke-linecap: round; }
.g-glow { fill: none; stroke-width: 14; stroke-linecap: round; opacity: .18; }
.g-knob { fill: var(--text); }
.g-center {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  text-align: center;
}
.g-center b { display: block; font: 600 64px/1 var(--font-d); letter-spacing: -.04em; }
.g-center span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.g-label {
  text-align: center;
  margin: 2px 0 26px;
  font: 600 13px/1 var(--font-b);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.days-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 150px;
  padding: 18px 18px 14px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.dc { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.dc i {
  width: 100%;
  max-width: 22px;
  min-height: 4px;
  border-radius: 8px;
  background: var(--surface-3);
}
.dc.is-today i { background: linear-gradient(180deg, var(--orb-a), var(--accent)); }
.dc small { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.dc.is-today small { color: var(--text); font-weight: 600; }

.panel {
  padding: 18px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.cbar { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 8px 0; }
.cbar span { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cbar span i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cbar b { font: 600 14px var(--font-d); }
.cbar .track { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cbar .track i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  padding: 18px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.tile b { display: block; font: 600 34px/1 var(--font-d); letter-spacing: -.03em; margin: 14px 0 6px; }
.tile p { margin: 0; font-size: 13px; color: var(--muted); }

/* ==========================================================
   Profiel / instellingen
   ========================================================== */
.profile { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; }
.name-input {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  outline: none;
  font: 600 26px/1.1 var(--font-d);
  letter-spacing: -.02em;
}
.name-input::placeholder { color: var(--faint); }
.profile p { margin: 4px 0 0; font-size: 13px; }
.group-label { margin: 0 0 10px 6px; }
.group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 24px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-size: 15px;
}
.row:last-child { border-bottom: 0; }
.row .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row svg { width: 18px; height: 18px; color: var(--muted); }
.row.danger { color: var(--c-imp); }
.row-l { display: flex; align-items: center; gap: 12px; }
.dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.soon {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--gold);
}
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 9px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--inv-bg); color: var(--inv-text); }
.foot { text-align: center; font-size: 12px; color: var(--faint); margin: 8px 0 0; }

/* Schakelaar */
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--surface-3);
  transition: background .25s;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: transform .3s var(--ease);
}
.switch input:checked + span { background: var(--gold); }
.switch.imp input:checked + span { background: var(--c-imp); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ==========================================================
   Tabbalk + FAB
   ========================================================== */
.tabbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-b) + 12px);
  height: 68px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  border-radius: 28px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--shadow);
  z-index: 30;
}
.tab {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--muted);
  font: 500 10.5px/1 var(--font-b);
  transition: color .2s;
}
.tab svg { width: 23px; height: 23px; }
.tab.is-active { color: var(--text); }
.tab-orb {
  justify-self: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 5px var(--bg);
  display: grid;
  place-items: center;
  transform: translateY(-18px);
  transition: transform .3s var(--ease);
}
.tab-orb:active { transform: translateY(-18px) scale(.92); }
.tab-orb .orb-wrap::before { inset: -18%; }

.fab {
  position: absolute;
  right: 20px;
  bottom: calc(var(--safe-b) + 98px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: var(--inv-bg);
  color: var(--inv-text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  z-index: 25;
  transition: opacity .3s, transform .35s var(--ease);
}
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.92); }
.app[data-view="insights"] .fab,
.app[data-view="settings"] .fab { opacity: 0; transform: scale(.7); pointer-events: none; }

/* ==========================================================
   Sheet
   ========================================================== */
.backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  max-height: 92%;
  overflow-y: auto;
  padding: 10px 22px calc(var(--safe-b) + 24px);
  border-radius: 32px 32px 0 0;
  border-top: 1px solid var(--line-2);
  background: var(--surface);
  transform: translateY(105%);
  transition: transform .5s var(--ease);
}
.sheet.show { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--glass);
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 18px; height: 18px; }
.f-title {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  padding: 8px 0 14px;
  font: 600 28px/1.15 var(--font-d);
  letter-spacing: -.03em;
}
.f-title::placeholder { color: var(--faint); }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cat input { display: none; }
.cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cat:has(input:checked) { background: var(--inv-bg); color: var(--inv-text); border-color: transparent; }
.fields {
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  overflow: hidden;
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}
.field:last-child { border-bottom: 0; }
.field > span:first-child svg { width: 19px; height: 19px; color: var(--muted); }
.field input, .field textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  padding: 8px 0;
}
.field textarea { resize: none; }
.field b { flex: 1; font-weight: 400; font-size: 16px; }
.field b small { display: block; font-size: 12px; color: var(--muted); }
.field i { color: var(--muted); font-style: normal; }
.form.is-allday .times { display: none; }
.form:not(.is-repeat) .until { display: none; }
.field select {
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--muted);
  text-align: right;
}
.rep { display: grid; place-items: center; color: var(--muted); }
.rep svg { width: 14px; height: 14px; }
.btn-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: none;
  font: 600 15px var(--font-d);
}
.btn-primary {
  width: 100%;
  padding: 17px;
  border: 0;
  border-radius: 20px;
  background: var(--inv-bg);
  color: var(--inv-text);
  font: 600 16px var(--font-d);
}
.btn-danger {
  width: 100%;
  margin-top: 10px;
  padding: 15px;
  border: 0;
  border-radius: 20px;
  background: none;
  color: var(--c-imp);
  font-weight: 500;
}
.d-title { font: 600 28px/1.15 var(--font-d); letter-spacing: -.03em; margin: 6px 0 18px; }
.d-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.d-row { display: flex; align-items: center; gap: 12px; font-size: 15px; text-transform: none; }
.d-row svg { width: 19px; height: 19px; color: var(--muted); }
.d-note {
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  color: var(--muted);
  background: color-mix(in srgb, var(--c-yourbooth) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-yourbooth) 22%, transparent);
  margin: 0 0 18px;
}
.steps { margin: 6px 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--inv-bg);
  color: var(--inv-text);
  font: 600 13px var(--font-d);
}

/* ==========================================================
   Assistent
   ========================================================== */
.assistant {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 14px);
  background:
    radial-gradient(80% 45% at 50% 30%, var(--glow-a), transparent 70%),
    radial-gradient(60% 40% at 85% 85%, var(--glow-b), transparent 70%),
    var(--bg);
  transform: translateY(102%);
  transition: transform .55s var(--ease);
}
.assistant.show { transform: none; }
.as-head { display: flex; align-items: center; justify-content: space-between; }
.as-head .eyebrow { display: flex; align-items: center; gap: 8px; }
.badge {
  font: 600 10px/1 var(--font-b);
  letter-spacing: .08em;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.as-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  transition: gap .5s var(--ease);
}
.as-stage .orb-wrap { --s: 168px; }
.as-status {
  margin: 0;
  max-width: 290px;
  text-align: center;
  font: 600 25px/1.2 var(--font-d);
  letter-spacing: -.025em;
  transition: font-size .4s var(--ease);
}
.as-status small { display: block; margin-top: 10px; font: 400 14px/1.4 var(--font-b); color: var(--muted); letter-spacing: 0; }
.assistant.has-log .as-stage { flex: 0 0 auto; flex-direction: row; gap: 12px; padding: 14px 0 6px; }
.assistant.has-log .as-stage .orb-wrap { --s: 38px; }
.assistant.has-log .as-status { font-size: 15px; text-align: left; }
.assistant.has-log .as-status small { display: none; }
.assistant.listening .as-stage .orb-wrap { animation: listen 1.1s ease-in-out infinite; }
@keyframes listen { 50% { transform: scale(1.09); } }

.as-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px 2px 6px;
  scrollbar-width: none;
}
.assistant.has-log .as-log { display: flex; }
.msg {
  max-width: 86%;
  padding: 12px 15px;
  border-radius: 22px;
  font-size: 15px;
  line-height: 1.45;
  animation: rise .45s var(--ease) both;
}
.msg.me { align-self: flex-end; background: var(--inv-bg); color: var(--inv-text); border-bottom-right-radius: 7px; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 7px; }
.msg p { margin: 10px 0 0; font-size: 13.5px; }
.msg .warn { color: var(--c-imp); }
.msg .hint { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.msg .hint svg { width: 15px; height: 15px; flex: none; }
.msg .link { margin-top: 10px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.mini { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-ev {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
}
.mini .mini-ev { margin-top: 0; }
.mini-ev .bar { width: 4px; height: 30px; border-radius: 99px; background: var(--c); }
.mini-ev b { display: block; font-weight: 500; font-size: 14px; }
.mini-ev small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .25; transform: translateY(-3px); } }

.as-suggest {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.as-suggest::-webkit-scrollbar { display: none; }
.sug {
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  font-size: 13px;
}
.as-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.as-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  padding: 10px 4px 10px 12px;
}
.as-input input::placeholder { color: var(--muted); }
.mic, .send {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
}
.mic { background: var(--inv-bg); color: var(--inv-text); transition: background .25s; }
.send { background: var(--surface-3); color: var(--text); }
.mic svg, .send svg { width: 20px; height: 20px; }
.assistant.listening .mic { background: var(--c-imp); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 100, 87, .5); } 100% { box-shadow: 0 0 0 16px rgba(255, 100, 87, 0); } }

/* ==========================================================
   Toast
   ========================================================== */
.toast {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-t) + 10px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 11px 12px 11px 18px;
  border-radius: 999px;
  background: var(--inv-bg);
  color: var(--inv-text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  /* Verborgen = onzichtbaar, zodat hij nooit over de klok/statusbalk schuift */
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(.97);
  transition: opacity .25s ease, transform .45s var(--ease);
}
.toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--inv-text) 12%, transparent);
  font-weight: 600;
  font-size: 13px;
}
.toast:not(:has(button)) { padding-right: 18px; }

/* ==========================================================
   Inloggen
   ========================================================== */
.login {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 24px) 28px calc(var(--safe-b) + 24px);
  background:
    radial-gradient(80% 45% at 50% 30%, var(--glow-a), transparent 70%),
    radial-gradient(60% 40% at 85% 85%, var(--glow-b), transparent 70%),
    var(--bg);
}
.login.show { display: flex; }
.login-box { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-box .orb-wrap { margin-bottom: 34px; }
.login-box h1 { font: 700 38px/1 var(--font-d); letter-spacing: -.04em; margin: 0 0 10px; }
.login-box p { margin: 0 0 26px; font-size: 14px; }
.login-box input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 16px;
  outline: none;
  text-align: center;
}
.login-box input:focus { border-color: var(--accent); }
.login-err { min-height: 20px; margin: 10px 0 14px !important; color: var(--c-imp); font-size: 13px !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
