:root {
  --teal: #034a4e;
  --teal-deep: #053537;
  --teal-hover: #0a5d61;
  --pink: #e12c5a;
  --pink-hover: #bc254b;
  --cream: #faf6ec;
  --cream-light: #f9efd5;
  --green-soft: #eef4ea;
  --green: #abd58e;
  --green-dot: #7fb45f;
  --green-ink: #4f7c48;
  --yellow: #f2cd5c;
  --ink: #243b33;
  --muted: #6c7669;
  --muted-2: #9a927f;
  --muted-3: #a79e89;
  --line: #ece5d5;
  --line-2: #e6dfd0;
  --line-3: #f0ebdf;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Work Sans', Arial, sans-serif;
  background: #e9e5db;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
#app { height: 100vh; }
h1, h2, h3, .head { font-family: 'Anek Malayalam', 'Work Sans', sans-serif; }
button, input, textarea { font-family: inherit; }
a { color: var(--pink); text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #ded7c7; border-radius: 8px; }

/* ---- keyframes ---- */
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
@keyframes glow { 0%,100%{opacity:.55;transform:scale(1)} 50%{opacity:1;transform:scale(1.06)} }
@keyframes sweep { 0%{background-position:-260px 0} 100%{background-position:260px 0} }
@keyframes track { 0%{transform:translateX(-100%)} 100%{transform:translateX(340%)} }
@keyframes blink { 0%,100%{opacity:.3} 50%{opacity:1} }
@keyframes hop { 0%,100%{transform:translateY(0) scale(1,1)} 18%{transform:translateY(0) scale(1.12,.88)} 48%{transform:translateY(-11px) scale(.93,1.09) rotate(-6deg)} 72%{transform:translateY(0) scale(1.07,.94)} }
@keyframes dotwave { 0%,75%,100%{transform:translateY(0);opacity:.35} 35%{transform:translateY(-5px);opacity:1} }
@keyframes typeline { 0%{transform:scaleX(0);opacity:.5} 22%{transform:scaleX(1);opacity:1} 82%{transform:scaleX(1);opacity:1} 92%,100%{transform:scaleX(1);opacity:0} }
@keyframes caret { 0%,45%{opacity:1} 50%,100%{opacity:.05} }
@keyframes screenglow { 0%,100%{opacity:.5} 50%{opacity:.95} }
@keyframes pop { from{transform:translateY(8px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes aur1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(60px,-30px) scale(1.15)} }
@keyframes aur2 { 0%,100%{transform:translate(0,0) scale(1.1)} 50%{transform:translate(-50px,40px) scale(.95)} }
@keyframes aur3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(30px,50px) scale(1.2)} }

/* ---- shell ---- */
.bap-app { display: flex; height: 100vh; background: #fff; }

/* ---- sidebar ---- */
.bap-sidebar {
  flex: none; width: 272px; background: var(--cream);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 18px;
}
.bap-brand { display: flex; align-items: center; gap: 11px; padding: 0 4px 20px; }
.bap-hex {
  width: 30px; height: 34px; background: var(--pink); color: #fff;
  clip-path: polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anek Malayalam'; font-weight: 700; font-size: 15px;
}
.bap-brand-logo { height: 26px; width: auto; display: block; }
.bap-brand-ver { margin-left: auto; font-size: 12px; color: var(--muted-2); letter-spacing: .4px; }

.bap-new {
  cursor: pointer; border: none; background: var(--pink); color: #fff;
  font-size: 15px; font-weight: 600; padding: 13px 16px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
}
.bap-new:hover { background: var(--pink-hover); }
.bap-new span:first-child { font-size: 17px; line-height: 1; }

.bap-search {
  margin-top: 14px; display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px;
}
.bap-search .dot { width: 13px; height: 13px; border: 2px solid #bdb5a1; border-radius: 50%; flex: none; }
.bap-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: var(--teal); }

.bap-nav { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.bap-nav button {
  cursor: pointer; text-align: left; border: none; background: transparent;
  color: #5f6b61; font-size: 15px; padding: 11px 13px; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
}
.bap-nav button:hover { background: #f2ede0; }
.bap-nav button.active { background: var(--green-soft); color: var(--teal); font-weight: 600; }
.bap-nav .lead { display: flex; align-items: center; gap: 9px; }
.bap-nav .active .bullet { width: 5px; height: 5px; border-radius: 50%; background: var(--pink); }
.bap-nav .count { color: var(--muted-2); }

.bap-recent-label {
  margin-top: 22px; font-size: 11px; font-weight: 600; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--muted-3); padding: 0 4px 8px;
}
.bap-recent { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.bap-recent-item { cursor: pointer; padding: 10px 13px; border-radius: 10px; display: flex; flex-direction: column; gap: 3px; }
.bap-recent-item:hover { background: #f2ede0; }
.bap-recent-item.active { background: #eef4ea; }
.bap-recent-titlerow { display: flex; align-items: center; gap: 8px; }
.bap-recent-title { flex: 1; min-width: 0; font-size: 14px; color: var(--teal); line-height: 1.35; }
.bap-recent-badge { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px rgba(225, 44, 90, .18); }
.bap-recent-meta { font-size: 12px; color: var(--muted-3); display: flex; align-items: center; gap: 6px; }
.bap-recent-empty { font-size: 13px; color: var(--muted-3); padding: 6px 13px; line-height: 1.5; }

/* quota bundle */
.bap-bundle { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bap-bundle-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-2); }
.bap-bundle-row b { color: var(--teal); font-weight: 600; }
.bap-bar { height: 7px; border-radius: 5px; background: #ece5d5; overflow: hidden; }
.bap-bar > i { display: block; height: 100%; border-radius: 5px; background: var(--green-dot); transition: width .4s ease; }
.bap-bar.warn > i { background: var(--yellow); }
.bap-bar.empty > i { background: var(--pink); }
.bap-bundle-note { font-size: 11.5px; line-height: 1.45; padding: 8px 10px; border-radius: 9px; }
.bap-bundle-note.warn { background: #fdf3d7; border: 1px solid #f2e2ac; color: #5c5228; }
.bap-bundle-note.empty { background: #fbe3ea; border: 1px solid #f4c6d3; color: var(--pink-hover); }

.bap-user { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 11px; }
.bap-user .av { width: 34px; height: 34px; border-radius: 10px; background: var(--yellow); display: flex; align-items: center; justify-content: center; font-family: 'Anek Malayalam'; font-weight: 700; font-size: 15px; color: var(--teal); }
.bap-user .name { font-size: 14px; font-weight: 500; color: var(--teal); }
.bap-user .mail { font-size: 12px; color: var(--muted-3); }

/* ---- main ---- */
.bap-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.bap-topbar { flex: none; height: 66px; border-bottom: 1px solid var(--line-3); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.bap-agent-chip { display: flex; align-items: center; gap: 9px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; }
.bap-agent-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }
.bap-agent-chip .nm { font-size: 14px; font-weight: 600; color: var(--teal); }
.bap-agent-chip .on { width: 7px; height: 7px; border-radius: 50%; background: var(--green-dot); }
.bap-tag {
  flex: none; white-space: nowrap; display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: #5f6b61; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; background: linear-gradient(90deg,#fff 0%,#faf3ea 50%,#fff 100%);
  background-size: 260px 100%; animation: sweep 5s linear infinite;
}
.bap-tag .d { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.bap-topbar .right { display: flex; align-items: center; gap: 14px; }
.bap-topbar .status { font-size: 14px; color: #5f6b61; }
.bap-topbar .me { width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--teal); }

.bap-view { flex: 1; min-height: 0; overflow: auto; position: relative; }

/* ---- start / route picker ---- */
.bap-start-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background-image: radial-gradient(#ece5d5 1px, transparent 1px); background-size: 24px 24px; opacity: .9; }
.bap-start-bg > i { position: absolute; border-radius: 50%; filter: blur(72px); }
.bap-start-bg .b1 { left: 14%; top: 8%; width: 340px; height: 340px; background: #f9d5de; opacity: .5; animation: aur1 16s ease-in-out infinite; }
.bap-start-bg .b2 { right: 10%; top: 22%; width: 300px; height: 300px; background: #d5eac7; opacity: .45; animation: aur2 19s ease-in-out infinite; }
.bap-start-bg .b3 { left: 38%; bottom: 2%; width: 380px; height: 300px; background: #f9e6ae; opacity: .4; animation: aur3 22s ease-in-out infinite; }
.bap-start { position: relative; min-height: 100%; display: flex; flex-direction: column; }
.bap-start-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 26px; padding: 44px 40px 40px; }
.bap-mascot { position: relative; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.bap-mascot .halo { position: absolute; inset: 0; border-radius: 50%; background: #f9d5de; animation: glow 5s ease-in-out infinite; }
.bap-mascot img { position: relative; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; animation: bob 5s ease-in-out infinite; }
.bap-greet { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.bap-greet h1 { margin: 0; font-weight: 600; font-size: 42px; line-height: 1.08; letter-spacing: -1px; color: var(--teal); }
.bap-greet h1 span { color: var(--pink); }
.bap-greet p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 540px; }

.bap-routes { display: grid; grid-template-columns: repeat(3, 264px); gap: 16px; justify-content: center; }
.bap-route {
  text-align: left; cursor: pointer; border: 2px solid transparent; background: #fff;
  border-radius: 20px; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 2px 4px rgba(3,74,78,.05), 0 14px 30px rgba(3,74,78,.06);
}
.bap-route:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(3,74,78,.06), 0 22px 46px rgba(3,74,78,.12); }
.bap-route.sel { border-color: var(--pink); }
.bap-route .ic {
  width: 44px; height: 50px; clip-path: polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anek Malayalam'; font-weight: 700; font-size: 19px;
}
.bap-route .rt { font-family: 'Anek Malayalam'; font-weight: 600; font-size: 19px; letter-spacing: -.3px; color: var(--teal); line-height: 1.15; }
.bap-route .rd { font-size: 13.5px; line-height: 1.5; color: #7c8479; }
.bap-route .rf { margin-top: auto; padding-top: 12px; border-top: 1px solid #f2ede2; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }

/* composer (shared start + chat) */
.bap-composer-wrap { position: relative; flex: none; padding: 18px 40px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bap-composer { width: 100%; max-width: 760px; border: 1px solid var(--line-2); border-radius: 20px; background: #fff; box-shadow: 0 14px 40px rgba(3,74,78,.09), 0 1px 0 rgba(255,255,255,.8) inset; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bap-composer.locked { opacity: .55; }
.bap-route-pill { align-self: flex-start; display: flex; align-items: center; gap: 8px; background: var(--green-soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--teal); font-weight: 600; }
.bap-route-pill button { border: none; background: transparent; color: var(--teal); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.bap-composer textarea { border: none; outline: none; resize: none; min-height: 54px; font-size: 16px; line-height: 1.55; color: var(--teal); background: transparent; }
.bap-composer textarea:disabled { color: var(--muted-3); }
.bap-composer-row { display: flex; align-items: center; gap: 10px; }
.bap-hint { font-size: 13px; color: var(--muted-3); }
.bap-send { margin-left: auto; cursor: pointer; border: none; background: var(--teal); color: var(--cream-light); width: 42px; height: 42px; border-radius: 12px; font-size: 17px; box-shadow: 0 6px 16px rgba(3,74,78,.22); }
.bap-send:hover:not(:disabled) { background: var(--teal-hover); }
.bap-send:disabled { opacity: .4; cursor: not-allowed; }
.bap-footnote { font-size: 13px; color: var(--muted-3); }

/* ---- chat ---- */
.bap-chat { height: 100%; display: flex; flex-direction: column; }
.bap-chat-head { flex: none; padding: 20px 40px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.bap-chat-head h2 { margin: 0; font-weight: 600; font-size: 25px; color: var(--teal); line-height: 1.2; }
.bap-chat-head .sub { font-size: 14px; color: var(--muted-2); margin-top: 5px; }
.bap-ghost { cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--teal); font-size: 14px; padding: 10px 14px; border-radius: 10px; white-space: nowrap; }
.bap-ghost:hover { border-color: var(--teal); }
.bap-chat-scroll { flex: 1; min-height: 0; overflow: auto; padding: 10px 40px 22px; }
.bap-thread { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.bap-msg-user { align-self: flex-end; max-width: 74%; }
.bap-bubble-user { background: var(--teal); color: var(--cream-light); padding: 14px 18px; border-radius: 18px 18px 6px 18px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; box-shadow: 0 6px 18px rgba(3,74,78,.18); }
.bap-msg-agent { align-self: flex-start; max-width: 88%; display: flex; gap: 14px; }
.bap-msg-agent .av { flex: none; width: 34px; height: 34px; border-radius: 11px; overflow: hidden; }
.bap-msg-agent .av img { width: 34px; height: 34px; object-fit: cover; display: block; }
.bap-agent-body { display: flex; flex-direction: column; gap: 8px; }
.bap-agent-text { font-size: 16px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }

/* ---- markdown-rendering van agent-antwoorden ---- */
.bap-md { white-space: normal; }
.bap-md > :first-child { margin-top: 0; }
.bap-md > :last-child { margin-bottom: 0; }
.bap-md p { margin: 0 0 10px; }
.bap-md h1, .bap-md h2, .bap-md h3, .bap-md h4 {
  margin: 16px 0 8px; line-height: 1.3; color: var(--teal); font-weight: 600;
}
.bap-md h1 { font-size: 22px; }
.bap-md h2 { font-size: 19px; }
.bap-md h3 { font-size: 17px; }
.bap-md h4 { font-size: 16px; }
.bap-md ul, .bap-md ol { margin: 0 0 10px; padding-left: 22px; }
.bap-md li { margin: 3px 0; }
.bap-md li > ul, .bap-md li > ol { margin: 3px 0; }
.bap-md strong { font-weight: 600; color: var(--teal); }
.bap-md em { font-style: italic; }
.bap-md a { color: var(--teal-hover); text-decoration: underline; }
.bap-md a:hover { color: var(--pink); }
.bap-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px;
  background: #eef4ea; color: var(--teal-deep); padding: 2px 5px; border-radius: 5px;
}
.bap-md pre {
  margin: 0 0 10px; background: var(--teal-deep); border-radius: 12px; padding: 14px 16px;
  overflow-x: auto;
}
.bap-md pre code {
  background: transparent; color: #e7efe7; padding: 0; font-size: 13px; line-height: 1.55;
}
.bap-md blockquote {
  margin: 0 0 10px; padding: 4px 14px; border-left: 3px solid var(--green);
  color: var(--muted); background: var(--cream);
}
.bap-md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.bap-md table { border-collapse: collapse; margin: 0 0 10px; font-size: 14px; display: block; overflow-x: auto; }
.bap-md th, .bap-md td { border: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
.bap-md th { background: var(--green-soft); color: var(--teal); font-weight: 600; }
.bap-agent-time { font-size: 12px; color: var(--muted-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* working indicator */
.bap-working { align-self: flex-start; width: 100%; display: flex; gap: 14px; animation: pop .35s ease; }
.bap-working .av { flex: none; position: relative; width: 34px; height: 34px; }
.bap-working .av .halo { position: absolute; inset: -5px; border-radius: 14px; background: #fbe3ea; animation: glow 3s ease-in-out infinite; }
.bap-working .av img { position: relative; width: 34px; height: 34px; border-radius: 11px; object-fit: cover; display: block; animation: hop 1.7s cubic-bezier(.32,.72,.4,1) infinite; }
.bap-working .card { flex: 1; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.bap-working .top { display: flex; align-items: center; gap: 10px; }
.bap-working .quip { font-family: 'Anek Malayalam'; font-weight: 600; font-size: 20px; color: var(--teal); }
.bap-working .dots { display: flex; gap: 4px; align-items: center; padding-bottom: 3px; }
.bap-working .dots i { width: 6px; height: 6px; border-radius: 50%; }
.bap-working .dots i:nth-child(1) { background: var(--green-dot); animation: dotwave 1.3s ease-in-out infinite; }
.bap-working .dots i:nth-child(2) { background: var(--yellow); animation: dotwave 1.3s ease-in-out .16s infinite; }
.bap-working .dots i:nth-child(3) { background: var(--pink); animation: dotwave 1.3s ease-in-out .32s infinite; }
.bap-clock { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted-2); }
.bap-screen-wrap { display: flex; justify-content: center; padding: 8px 0 2px; }
.bap-screen { position: relative; width: 210px; height: 120px; background: #0c2a2b; border-radius: 14px; padding: 13px; box-shadow: 0 10px 0 -4px #dcd3bf; }
.bap-screen .gl { position: absolute; inset: 0; border-radius: 14px; background: radial-gradient(120px 80px at 50% 40%, rgba(143,208,166,.18), transparent 70%); animation: screenglow 3.4s ease-in-out infinite; }
.bap-screen .lines { position: relative; display: flex; flex-direction: column; gap: 9px; }
.bap-screen .lines > i { height: 7px; border-radius: 4px; transform-origin: left center; }
.bap-screen .lines .l1 { width: 72%; background: #8fd0a6; animation: typeline 4.4s ease-in-out infinite; }
.bap-screen .lines .l2 { width: 48%; background: var(--yellow); animation: typeline 4.4s ease-in-out .45s infinite; }
.bap-screen .lines .l3 { width: 86%; background: #8fd0a6; animation: typeline 4.4s ease-in-out .9s infinite; }
.bap-screen .lines .l4 { width: 60%; background: var(--pink); animation: typeline 4.4s ease-in-out 1.35s infinite; }
.bap-working .note { font-size: 13px; color: var(--muted-2); line-height: 1.45; }

/* error */
.bap-error { align-self: flex-start; max-width: 88%; display: flex; gap: 14px; }
.bap-error .av { flex: none; width: 34px; height: 34px; border-radius: 11px; overflow: hidden; }
.bap-error .av img { width: 34px; height: 34px; object-fit: cover; display: block; }
.bap-error .card { background: #fbe3ea; border: 1px solid #f4c6d3; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bap-error .msg { font-size: 15px; line-height: 1.55; color: var(--pink-hover); }
.bap-error button { align-self: flex-start; cursor: pointer; border: none; background: var(--pink); color: #fff; font-size: 14px; font-weight: 600; padding: 10px 15px; border-radius: 10px; }
.bap-error button:hover { background: var(--pink-hover); }

/* ---- werk-acties (annuleren na lang wachten) ---- */
.bap-work-actions { display: flex; align-items: center; gap: 12px; }
.bap-work-hint { font-size: 13px; color: var(--muted-3); line-height: 1.45; }
.bap-cancel {
  cursor: pointer; border: 1px solid #f4c6d3; background: #fbe3ea; color: var(--pink-hover);
  font-size: 14px; font-weight: 600; padding: 9px 15px; border-radius: 10px;
}
.bap-cancel:hover:not(:disabled) { background: #f7d4de; border-color: var(--pink); }
.bap-cancel:disabled { opacity: .6; cursor: default; }

/* ---- single-flight / bezet-melding ---- */
.bap-notice {
  margin: 14px 40px 0; display: flex; align-items: center; gap: 11px;
  background: #fdf3e0; border: 1px solid #f2dfae; border-radius: 12px; padding: 12px 16px;
}
.bap-notice .d { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.bap-notice-msg { flex: 1; font-size: 14px; line-height: 1.45; color: #8d6a1c; }
.bap-notice-x { flex: none; cursor: pointer; border: none; background: transparent; color: #8d6a1c; font-size: 18px; line-height: 1; padding: 0 2px; }
.bap-notice-x:hover { color: var(--pink-hover); }

.bap-chat-foot { flex: none; padding: 0 40px 26px; }
.bap-chat-foot .inner { max-width: 820px; margin: 0 auto; }
.bap-locked-note { border: 1px dashed #ded7c7; border-radius: 18px; padding: 20px 18px; display: flex; align-items: center; gap: 11px; color: var(--muted-2); font-size: 15px; }
.bap-locked-note .d { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); animation: blink 1.1s infinite; }

/* ---- tasks ---- */
.bap-tasks { padding: 30px 40px 44px; }
.bap-tasks-inner { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.bap-tasks-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.bap-tasks-head h2 { margin: 0; font-weight: 600; font-size: 30px; color: var(--teal); line-height: 1.1; }
.bap-tasks-head p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.bap-tasks-group-label { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted-3); margin-bottom: 11px; }
.bap-task {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px;
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease; margin-bottom: 11px;
}
.bap-task:hover { border-color: var(--teal); box-shadow: 0 6px 16px rgba(3,74,78,.07); }
.bap-task.done { background: var(--cream); border-color: transparent; }
.bap-task .code { flex: none; font-family: 'Anek Malayalam'; font-weight: 700; font-size: 13px; color: #5f6b61; letter-spacing: .6px; background: #f4f0e5; padding: 5px 9px; border-radius: 8px; }
.bap-task .ttl { flex: 1; font-size: 16px; line-height: 1.4; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.bap-task .dur { flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted-2); }
.bap-status { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; }
.bap-status.running { background: #eef4ea; color: var(--green-ink); }
.bap-status.done { background: #e6f0dd; color: var(--green-ink); }
.bap-status.error { background: #fbe3ea; color: var(--pink-hover); }

/* takenlijst per levenscyclus-stap */
.bap-taken-groups { display: flex; flex-direction: column; gap: 26px; }
.bap-taken-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.bap-taken-group-title { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted-3); }
.bap-taken-group-count { font-size: 11px; font-weight: 600; color: var(--muted-2); background: #f4f0e5; padding: 2px 8px; border-radius: 999px; }
.bap-taken-group-empty { font-size: 14px; color: var(--muted-2); padding: 4px 2px 8px; }

.bap-stage-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.bap-stage-dot.ready { background: #d9a441; }
.bap-stage-dot.done { background: var(--green-ink); }

.bap-stage-badge { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.bap-stage-badge.ready { background: #fbeecd; color: #8d6a1c; }
.bap-stage-badge.testing { background: #e3eeec; color: #0a5d61; }
.bap-stage-badge.done { background: #e6f0dd; color: var(--green-ink); }

.bap-task-check { flex: none; display: flex; align-items: center; cursor: pointer; }
.bap-task-check input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--teal); }
.bap-task.picked { border-color: var(--teal); box-shadow: 0 6px 16px rgba(3,74,78,.07); }
.bap-task.picked .ttl { font-weight: 600; }

.bap-golive-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; padding: 12px 16px; background: var(--cream); border: 1px dashed var(--line-2); border-radius: 12px; }
.bap-golive-info { font-size: 14px; color: var(--muted); }
.bap-golive-bar .bap-cta:disabled { opacity: .45; cursor: default; }
.bap-golive-bar .bap-cta:disabled:hover { background: var(--pink); }

/* een taak is een record, geen chat: geen klik-cursor/openen */
.bap-taak { cursor: default; align-items: flex-start; }
.bap-taak:hover { border-color: var(--line); box-shadow: none; }
.bap-taak.selectable { cursor: pointer; }
.bap-taak.selectable:hover { border-color: var(--teal); box-shadow: 0 6px 16px rgba(3,74,78,.07); }
.bap-taak .bap-stage-dot { margin-top: 6px; }
.bap-taak .bap-task-check { margin-top: 1px; }
.bap-taak-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bap-taak-main .ttl { flex: none; font-size: 16px; line-height: 1.35; color: var(--ink); }
.bap-taak-brief {
  font-size: 13px; line-height: 1.45; color: var(--muted-2); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bap-taak .bap-stage-badge { margin-top: 3px; }
.bap-taak-action {
  flex: none; cursor: pointer; border: 1px solid var(--teal); background: #fff; color: var(--teal);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
}
.bap-taak-action:hover:not(:disabled) { background: var(--teal); color: #fff; }
.bap-taak-action:disabled { opacity: .45; cursor: default; }

.bap-empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.bap-empty img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.bap-empty h3 { margin: 0; font-weight: 600; font-size: 24px; color: var(--teal); }
.bap-empty p { margin: 0; font-size: 15px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.bap-cta { cursor: pointer; border: none; background: var(--pink); color: #fff; font-size: 15px; font-weight: 600; padding: 13px 20px; border-radius: 12px; }
.bap-cta:hover { background: var(--pink-hover); }

/* chips */
.bap-prompts { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.bap-prompt { cursor: pointer; border: 1px solid var(--line-2); background: rgba(255,255,255,.75); color: #3f4b42; font-size: 13px; padding: 9px 14px; border-radius: 999px; }
.bap-prompt:hover:not(:disabled) { border-color: var(--pink); color: var(--pink); }
.bap-prompt:disabled { cursor: default; opacity: .45; }

@media (max-width: 1080px) {
  .bap-routes { grid-template-columns: repeat(2, 264px); }
}
@media (max-width: 820px) {
  .bap-sidebar { display: none; }
  .bap-routes { grid-template-columns: 1fr; }
  .bap-route { width: auto; }
  .bap-chat-scroll, .bap-tasks, .bap-composer-wrap, .bap-chat-foot { padding-left: 18px; padding-right: 18px; }
}

/* ============================ AUTH (tweeluik: login / vergeten / verstuurd / reset) ==== */
.bap-auth {
  position: relative; min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-deep); overflow: hidden; padding: 44px 24px;
}
@keyframes bapdot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ambient aurora */
.bap-auth-aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.bap-auth-aurora span { position: absolute; border-radius: 50%; filter: blur(120px); }
.bap-auth-aurora .a1 { left: -8%; top: -14%; width: 520px; height: 520px; background: var(--pink); opacity: .34; animation: aur1 18s ease-in-out infinite; }
.bap-auth-aurora .a2 { right: -6%; bottom: -18%; width: 520px; height: 520px; background: #abd58e; opacity: .26; animation: aur2 21s ease-in-out infinite; }

/* two-panel shell */
.bap-auth-shell {
  position: relative; z-index: 1; width: min(1320px, 100%); min-height: 720px;
  background: #fff; border-radius: 22px; overflow: hidden; display: flex;
  box-shadow: 0 40px 90px rgba(0,0,0,.34); animation: pop .4s ease both;
}

/* brand panel */
.bap-auth-brand {
  flex: none; width: clamp(340px, 40%, 520px); background: var(--teal); color: #f9efd5;
  padding: 48px 46px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.bap-auth-brand::after {
  content: ""; position: absolute; right: -120px; top: -80px; width: 380px; height: 380px;
  border-radius: 50%; background: var(--pink); filter: blur(90px); opacity: .35;
}
.bap-auth-brand > * { position: relative; z-index: 1; }
.bap-auth-logo { display: flex; align-items: center; gap: 11px; }
.bap-auth-logo-img { height: 30px; width: auto; display: block; }
.bap-auth-logo-mark {
  width: 30px; height: 34px; background: var(--pink); color: #fff;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anek Malayalam', sans-serif; font-weight: 700; font-size: 15px;
}
.bap-auth-logo-word { font-family: 'Anek Malayalam', sans-serif; font-weight: 600; font-size: 21px; color: #f9efd5; }
.bap-auth-pitch { display: flex; flex-direction: column; gap: 26px; }
.bap-auth-pitch-title { margin: 0; font-family: 'Anek Malayalam', sans-serif; font-weight: 600; font-size: 42px; line-height: 1.15; }
.bap-auth-pitch-body { margin: 0; font-size: 17px; line-height: 1.6; color: #a9c6c4; max-width: 340px; text-wrap: pretty; }
.bap-auth-brand-status { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #8fb0ae; }
.bap-auth-brand-status i { width: 6px; height: 6px; border-radius: 50%; background: #abd58e; }

/* form panel */
.bap-auth-panel {
  flex: 1; min-width: 0; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: 48px clamp(28px, 5vw, 64px);
}
.bap-auth-pane { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; animation: pop .3s ease; }
.bap-auth-pane-head { display: flex; flex-direction: column; gap: 8px; }
.bap-auth-pane-title { margin: 0; font-family: 'Anek Malayalam', sans-serif; font-weight: 600; font-size: 32px; color: var(--teal); }
.bap-auth-pane-sub { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.6; text-wrap: pretty; }

.bap-auth-field { display: flex; flex-direction: column; gap: 7px; }
.bap-auth-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bap-auth-label { font-size: 14px; font-weight: 600; color: var(--teal); }
.bap-auth-input {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 14px 15px; font-size: 16px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.bap-auth-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(3,74,78,.12); }
.bap-auth-input:disabled { opacity: .6; }

.bap-auth-check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #5f6b61; cursor: pointer; user-select: none; }
.bap-auth-check input { position: absolute; opacity: 0; pointer-events: none; }
.bap-auth-check-box {
  width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; font-weight: 700;
}
.bap-auth-check input:checked + .bap-auth-check-box { background: var(--teal); border-color: var(--teal); color: #f9efd5; }

.bap-auth-btn {
  cursor: pointer; border: none; border-radius: 12px; font-size: 16px; font-weight: 600;
  padding: 15px 18px; white-space: nowrap; transition: background .15s, border-color .15s;
}
.bap-auth-btn:disabled { opacity: .6; cursor: default; }
.bap-auth-btn--primary { background: var(--pink); color: #fff; }
.bap-auth-btn--primary:hover:not(:disabled) { background: var(--pink-hover); }
.bap-auth-btn--ghost { background: #fff; border: 1px solid var(--line); color: var(--teal); font-size: 15px; padding: 14px 18px; }
.bap-auth-btn--ghost:hover:not(:disabled) { border-color: #cfc5ae; }
.bap-auth-btn--link {
  background: none; border: none; padding: 0; color: var(--pink); font-size: 15px; font-weight: 600;
  cursor: pointer; align-self: flex-start; white-space: nowrap;
}
.bap-auth-btn--link:hover { color: var(--pink-hover); }
.bap-auth-btn-row { display: flex; gap: 10px; align-items: center; }
.bap-auth-btn-row .bap-auth-btn { flex: none; }

.bap-auth-note { margin: 0; font-size: 14px; color: var(--muted-3); line-height: 1.6; }
.bap-auth-note--center { text-align: center; }

.bap-auth-msg { font-size: 14px; line-height: 1.5; border-radius: 12px; padding: 12px 14px; }
.bap-auth-msg .rem { display: block; margin-top: 5px; opacity: .85; }
.bap-auth-msg.error { background: rgba(225,44,90,.09); color: var(--pink-hover); }
.bap-auth-msg.locked { background: var(--cream-light); color: #8d6a1c; }
.bap-auth-msg.ok { background: var(--green-soft); color: var(--green-ink); }

.bap-auth-badge {
  width: 64px; height: 64px; border-radius: 20px; background: var(--green-soft); color: var(--green-ink);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.bap-auth-tip { background: #fff; border: 1px solid var(--line-3); border-radius: 14px; padding: 16px 18px; display: flex; gap: 13px; align-items: flex-start; }
.bap-auth-tip-mark { flex: none; width: 32px; height: 32px; border-radius: 10px; background: #f3ecdc; color: var(--muted-3); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.bap-auth-tip-body { margin: 0; font-size: 14px; color: #5f6b61; line-height: 1.6; }

.bap-auth-meter { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.bap-auth-meter-track { flex: 1; height: 6px; border-radius: 4px; background: var(--line-3); overflow: hidden; }
.bap-auth-meter-fill { height: 100%; background: var(--green-dot); border-radius: 4px; transition: width .25s ease; }
.bap-auth-meter-label { font-size: 13px; font-weight: 600; color: var(--green-ink); }

/* loading state */
.bap-auth-loading { position: relative; z-index: 1; display: flex; }
.bap-auth-loader { display: flex; gap: 9px; }
.bap-auth-loader i { width: 12px; height: 12px; border-radius: 50%; background: #abd58e; animation: bapdot 1.2s ease-in-out infinite; }
.bap-auth-loader i:nth-child(2) { animation-delay: .18s; }
.bap-auth-loader i:nth-child(3) { animation-delay: .36s; }

/* mobile: brand panel bovenop, formulier eronder */
@media (max-width: 1100px) {
  .bap-auth { padding: 0; background: var(--cream); }
  .bap-auth-shell { min-height: 100vh; border-radius: 0; flex-direction: column; box-shadow: none; }
  .bap-auth-brand { width: 100%; padding: 48px 26px 30px; gap: 16px; justify-content: flex-start; }
  .bap-auth-pitch { gap: 6px; }
  .bap-auth-pitch-title { font-size: 26px; }
  .bap-auth-pitch-body { font-size: 15px; }
  .bap-auth-brand-status { display: none; }
  .bap-auth-panel { padding: 26px 24px 40px; align-items: flex-start; }
  .bap-auth-pane { max-width: none; }
  .bap-auth-pane-title { font-size: 26px; }
}

/* profiel-uitklap in de gebruikersrij */
.bap-user { position: relative; }
.bap-user-id { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 1px; }
.bap-user-id .name, .bap-user-id .mail { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.bap-user-trigger {
  cursor: pointer; width: 100%; display: flex; align-items: center; gap: 11px;
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 4px 6px; margin: -4px -6px; color: inherit;
}
.bap-user-trigger:hover { background: #fff; border-color: var(--line-2); }
.bap-user.open .bap-user-trigger { background: #fff; border-color: var(--line-2); }
.bap-user-caret { margin-left: auto; flex: none; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.bap-user-caret.up { transform: rotate(180deg); }
.bap-user-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(3, 74, 78, .16); padding: 6px; z-index: 20;
}
.bap-user-menu-item {
  cursor: pointer; display: block; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 8px;
  padding: 9px 11px; font-size: 13.5px; font-weight: 500; color: var(--teal);
}
.bap-user-menu-item:hover { background: var(--cream); }
.bap-user-menu-item.danger { color: var(--pink); }
.bap-user-menu-item.danger:hover { background: rgba(225, 44, 90, .08); }

/* ============================ ADMIN (super-account) ============================ */
.bap-admin { display: flex; flex-direction: column; height: 100vh; background: #f3efe4; }

.bap-admin-top {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; background: var(--teal); color: #f9efd5;
}
.bap-admin-brand { display: flex; align-items: center; gap: 11px; }
.bap-admin-hex {
  width: 28px; height: 32px; background: var(--pink); color: #fff;
  clip-path: polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anek Malayalam'; font-weight: 700; font-size: 14px;
}
.bap-admin-word { font-family: 'Anek Malayalam'; font-weight: 600; font-size: 20px; color: #f9efd5; }
.bap-admin-logo { height: 24px; width: auto; display: block; }
.bap-admin-role-badge {
  margin-left: 6px; font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  background: rgba(249,239,213,.16); color: #f9efd5; padding: 4px 10px; border-radius: 999px;
}
.bap-admin-me { display: flex; align-items: center; gap: 16px; }
.bap-admin-me-info { text-align: right; line-height: 1.25; }
.bap-admin-me-info .nm { font-size: 14px; font-weight: 500; }
.bap-admin-me-info .ml { font-size: 12px; color: #a9c6c4; }
.bap-admin-logout {
  cursor: pointer; border: 1px solid rgba(249,239,213,.35); background: transparent; color: #f9efd5;
  font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 10px;
}
.bap-admin-logout:hover { background: rgba(249,239,213,.12); }

.bap-admin-tabs { flex: none; display: flex; gap: 4px; padding: 0 26px; background: var(--teal-deep); }
.bap-admin-tabs button {
  cursor: pointer; border: none; background: transparent; color: #a9c6c4;
  font-size: 15px; font-weight: 600; padding: 13px 18px; border-bottom: 3px solid transparent;
  display: flex; align-items: center; gap: 8px;
}
.bap-admin-tabs button.active { color: #fff; border-bottom-color: var(--pink); }
.bap-admin-tabs .cnt { font-size: 12px; background: rgba(249,239,213,.16); padding: 1px 8px; border-radius: 999px; }

.bap-admin-body { flex: 1; overflow: auto; padding: 26px; }
.bap-admin-body > section, .bap-admin-note { width: 100%; max-width: 1100px; margin-left: auto; margin-right: auto; }

.bap-admin-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; line-height: 1.45; border-radius: 12px; padding: 12px 15px; margin-bottom: 18px;
}
.bap-admin-note button { cursor: pointer; border: none; background: none; font-size: 18px; color: inherit; line-height: 1; }
.bap-admin-note.ok { background: var(--green-soft); color: var(--green-ink); }
.bap-admin-note.err { background: rgba(225,44,90,.1); color: var(--pink-hover); }

.bap-admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bap-admin-head h2 { margin: 0; font-family: 'Anek Malayalam'; font-weight: 600; font-size: 26px; color: var(--teal); }
.bap-admin-cta {
  cursor: pointer; border: none; background: var(--pink); color: #fff;
  font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: 11px;
}
.bap-admin-cta:hover { background: var(--pink-hover); }

.bap-admin-table { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.bap-admin-tr {
  display: grid; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line-3);
}
.bap-admin-table.users .bap-admin-tr { grid-template-columns: 1.8fr 1.3fr .9fr 1.7fr .8fr 1.6fr; }
.bap-admin-table.projects .bap-admin-tr { grid-template-columns: 1.5fr 1fr 1.1fr .9fr .8fr .8fr 1.4fr; }
.bap-admin-table.plans .bap-admin-tr { grid-template-columns: 1.4fr 1fr 1fr .8fr 1.2fr; }
.bap-admin-tr:first-child { border-top: none; }
.bap-admin-tr.head { background: var(--cream); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--muted-2); }
.bap-admin-tr > span { min-width: 0; font-size: 14px; color: var(--ink); }
.bap-admin-tr .mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.bap-admin-tr .muted { color: var(--muted-2); }
.bap-admin-tr .ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bap-admin-role { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.bap-admin-role.admin { background: var(--cream-light); color: #8d6a1c; }
.bap-admin-role.customer { background: var(--green-soft); color: var(--green-ink); }

.bap-admin-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.bap-admin-chip { font-size: 12px; background: #eef2f1; color: var(--teal); padding: 3px 9px; border-radius: 8px; }
.bap-admin-lock { font-size: 12px; font-weight: 600; color: var(--pink-hover); background: rgba(225,44,90,.1); padding: 3px 9px; border-radius: 999px; }

.bap-admin-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.bap-admin-actions button {
  cursor: pointer; border: 1px solid var(--line-2); background: #fff; color: var(--teal);
  font-size: 13px; font-weight: 500; padding: 6px 11px; border-radius: 9px;
}
.bap-admin-actions button:hover { border-color: var(--teal); }
.bap-admin-actions button.danger { color: var(--pink-hover); }
.bap-admin-actions button.danger:hover { border-color: var(--pink); }

.bap-admin-empty { padding: 26px 18px; text-align: center; color: var(--muted-2); font-size: 14px; }

/* dialog */
.bap-admin-modal {
  position: fixed; inset: 0; z-index: 20; background: rgba(5,53,55,.42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.bap-admin-dialog {
  width: 100%; max-width: 460px; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 18px; padding: 24px 24px 20px;
  box-shadow: 0 30px 70px rgba(5,53,55,.3); animation: pop .25s ease;
  display: flex; flex-direction: column; gap: 15px;
}
.bap-admin-dialog h3 { margin: 0; font-family: 'Anek Malayalam'; font-weight: 600; font-size: 22px; color: var(--teal); }
.bap-admin-field { display: flex; flex-direction: column; gap: 6px; }
.bap-admin-field > label { font-size: 13px; font-weight: 600; color: var(--teal); }
.bap-admin-field input, .bap-admin-field select, .bap-admin-field textarea {
  border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 13px;
  font-size: 15px; color: var(--ink); background: var(--cream); outline: none; width: 100%;
}
.bap-admin-field input:focus, .bap-admin-field select:focus, .bap-admin-field textarea:focus { border-color: var(--pink); background: #fff; }
.bap-admin-field input:disabled { opacity: .6; }
.bap-admin-field textarea { resize: vertical; }

.bap-admin-checks { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line-2); border-radius: 11px; padding: 12px 13px; max-height: 190px; overflow: auto; }
.bap-admin-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); cursor: pointer; }
.bap-admin-check.standalone { font-weight: 500; }
.bap-admin-check input { width: 16px; height: 16px; accent-color: var(--teal); }

.bap-admin-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.bap-admin-dialog-actions button { cursor: pointer; border-radius: 11px; font-size: 14px; font-weight: 600; padding: 11px 18px; border: none; }
.bap-admin-dialog-actions .ghost { background: #fff; border: 1px solid var(--line-2); color: var(--teal); }
.bap-admin-dialog-actions .ghost:hover { border-color: #cfc5ae; }
.bap-admin-dialog-actions .primary { background: var(--pink); color: #fff; }
.bap-admin-dialog-actions .primary:hover:not(:disabled) { background: var(--pink-hover); }
.bap-admin-dialog-actions .primary:disabled { opacity: .6; cursor: default; }

@media (max-width: 900px) {
  .bap-admin-table { overflow-x: auto; }
  .bap-admin-table.users .bap-admin-tr { grid-template-columns: 1.8fr 1.3fr .9fr 1.7fr .8fr 1.6fr; min-width: 820px; }
  .bap-admin-table.projects .bap-admin-tr { grid-template-columns: 1.5fr 1fr 1.1fr .9fr .8fr .8fr 1.4fr; min-width: 900px; }
  .bap-admin-table.plans .bap-admin-tr { grid-template-columns: 1.4fr 1fr 1fr .8fr 1.2fr; min-width: 640px; }
  .bap-admin-me-info { display: none; }
}

/* project-naam met mascotte-thumbnail */
.bap-admin-project-name { display: inline-flex; align-items: center; gap: 9px; }
.bap-admin-mascot-thumb { flex: none; width: 26px; height: 26px; border-radius: 7px; overflow: hidden; background: var(--cream); border: 1px solid var(--line); }
.bap-admin-mascot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bap-admin-head-note { font-size: 13px; color: var(--muted); }

/* twee velden naast elkaar in een dialoog */
.bap-admin-field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* mascotte-upload in de projectdialoog */
.bap-admin-mascot { display: flex; align-items: center; gap: 14px; }
.bap-admin-mascot-preview { flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.bap-admin-mascot-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bap-admin-mascot-empty { font-size: 12px; color: var(--muted-2); }
.bap-admin-mascot-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.bap-admin-mascot-pick input[type="file"] { font-size: 13px; color: var(--muted); max-width: 100%; }
.bap-admin-mascot-pick input[type="file"]::file-selector-button {
  cursor: pointer; margin-right: 10px; padding: 7px 12px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff; color: var(--teal); font-size: 13px; font-weight: 500;
}
.bap-admin-mascot-pick input[type="file"]::file-selector-button:hover { border-color: var(--pink); color: var(--pink); }
.bap-admin-mascot-hint { font-size: 12px; color: var(--muted); }
.bap-admin-subhead {
  margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--green-soft);
  font-size: 13px; font-weight: 600; color: var(--teal);
}
.bap-admin-secret-set {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-ink); font-size: 11px; font-weight: 600;
}

/* ---- taak aanhalen in een chat (composer) ---- */
.bap-taak-num { color: var(--muted-3); font-weight: 600; margin-right: 6px; }

.bap-taakref-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bap-taakref-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 6px 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--teal); border: 1px solid var(--line-2);
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bap-taakref-chip button {
  border: none; cursor: pointer; width: 18px; height: 18px; border-radius: 999px;
  background: rgba(3,74,78,.1); color: var(--teal); font-size: 13px; line-height: 1; flex: none;
}
.bap-taakref-chip button:hover { background: var(--pink); color: #fff; }

.bap-taakref-picker { position: relative; }
.bap-taakref-btn {
  cursor: pointer; border: 1px solid var(--line-2); background: #fff; color: var(--teal);
  padding: 7px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
}
.bap-taakref-btn:hover:not(:disabled) { border-color: var(--teal); }
.bap-taakref-btn.active { background: var(--green-soft); border-color: var(--teal); }
.bap-taakref-btn:disabled { opacity: .4; cursor: not-allowed; }

.bap-taakref-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: 340px; max-width: 78vw; max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(3,74,78,.16); padding: 6px;
}
.bap-taakref-menu.up { top: auto; bottom: calc(100% + 6px); }
.bap-taakref-empty { padding: 12px; font-size: 13px; color: var(--muted-3); text-align: center; }
.bap-taakref-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: transparent; cursor: pointer; padding: 8px 10px; border-radius: 10px;
}
.bap-taakref-opt:hover { background: var(--green-soft); }
.bap-taakref-opt.picked { background: var(--green-soft); }
.bap-taakref-opt .num { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.bap-taakref-opt .ttl {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bap-taakref-opt.picked .ttl { font-weight: 600; color: var(--teal); }
.bap-taakref-opt .stg {
  flex: none; font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 7px; background: var(--line-3); color: var(--muted);
}
.bap-taakref-opt .stg.ready { background: #fbeecd; color: #8d6a1c; }
.bap-taakref-opt .stg.testing { background: #e3eeec; color: #0a5d61; }
.bap-taakref-opt .stg.done { background: #e6f0dd; color: var(--green-ink); }

/* ---- gatekeeper: database-write-voorstellen ---- */
.bap-admin-tabs .cnt.attention { background: var(--pink); color: #fff; }

.bap-sqlp {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px;
}
.bap-sqlp.failed { border-color: #f4c6d3; background: #fef7f8; }

.bap-sqlp-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.bap-sqlp-status {
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 8px; background: #fbeecd; color: #8d6a1c;
}
.bap-sqlp-status.failed { background: #fbe3ea; color: var(--pink-hover); }
.bap-sqlp-status.approved { background: #e3eeec; color: #0a5d61; }
.bap-sqlp-status.executed { background: #e6f0dd; color: var(--green-ink); }
.bap-sqlp-project { font-weight: 600; color: var(--teal); }
.bap-sqlp-conv { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bap-sqlp-time { margin-left: auto; color: var(--muted-3); font-size: 12px; }

.bap-sqlp-field { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.bap-sqlp-field .lbl { flex: none; width: 58px; font-weight: 600; color: var(--muted); }
.bap-sqlp-field .val { flex: 1; color: var(--ink); }

.bap-sqlp-failnote {
  font-size: 13px; line-height: 1.45; color: var(--pink-hover);
  background: rgba(225,44,90,.08); border-radius: 10px; padding: 9px 12px;
}

.bap-sqlp-sqlwrap { border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.bap-sqlp-sqlhead {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted-2); background: var(--cream); padding: 8px 12px; border-bottom: 1px solid var(--line-2);
}
.bap-sqlp-code { background: var(--teal-deep); padding: 12px 14px; max-height: 320px; overflow: auto; }
.bap-sqlp-stmt {
  display: block; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6; color: #dfeceb;
}
.bap-sqlp-stmt + .bap-sqlp-stmt { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }

.bap-sqlp-note {
  width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-family: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.bap-sqlp-note:focus { border-color: var(--teal-hover); }

.bap-sqlp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bap-sqlp-btn {
  cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--teal);
  font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 10px;
}
.bap-sqlp-btn:disabled { opacity: .55; cursor: default; }
.bap-sqlp-btn.approve { background: var(--green-dot); border-color: var(--green-dot); color: #14320f; }
.bap-sqlp-btn.approve:hover:not(:disabled) { background: #74a855; }
.bap-sqlp-btn.reject { color: var(--pink-hover); border-color: #f4c6d3; }
.bap-sqlp-btn.reject:hover:not(:disabled) { background: #fbe3ea; }
.bap-sqlp-btn.changes:hover:not(:disabled) { background: var(--cream); }
