:root {
  /* DHC-huisstijl: mintgroen, teal en oranje op een donker teal-navy. */
  --bg: #0a1519;
  --panel: #112126;
  --panel-2: #16292f;
  --panel-border: #20363d;
  --text: #e9f2f3;
  --text-dim: #8fa8ad;
  --accent: #19df9f;
  --accent-2: #33b3b7;
  --warm: #ee812a;
  --positive: #19df9f;
  --neutral: #8fa8ad;
  --negative: #ff6b6b;
  --negative-solid: #c92f36;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-border);
}

.topbar h1 { font-size: 18px; margin: 0; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.status-connecting { background: var(--warm); }
.status-connected { background: var(--positive); }
.status-disconnected { background: var(--negative); }

select, button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin: 0 0 12px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 16px;
}

.kpi-label { color: var(--text-dim); font-size: 13px; margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 600; }
.kpi-sentiment { font-size: 14px; display: flex; gap: 10px; }

.live-calls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-call-card {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: #0f7f5b; }
}

.live-badge {
  background: var(--negative-solid);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state { color: var(--text-dim); font-style: italic; padding: 12px 0; }

.calls-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
}

.calls-table th, .calls-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 14px;
}

.calls-table th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; }

.calls-table tbody tr:hover { background: rgba(25, 223, 159, 0.08); cursor: pointer; }
.calls-table tbody tr:last-child td { border-bottom: none; }

.sentiment-badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-block;
}
.sentiment-positive { background: rgba(25, 223, 159, 0.15); color: var(--positive); }
.sentiment-neutral { background: rgba(143, 168, 173, 0.15); color: var(--neutral); }
.sentiment-negative { background: rgba(255, 107, 107, 0.15); color: var(--negative); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }

.modal-content {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-dim);
}

.modal-audio-wrap { margin: 12px 0; }
.modal-audio-wrap audio { width: 100%; }

.transcript {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.transcript-line {
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 85%;
  font-size: 14px;
}

.transcript-line.user {
  background: rgba(25, 223, 159, 0.15);
  align-self: flex-start;
}

.transcript-line.assistant {
  background: rgba(143, 168, 173, 0.1);
  align-self: flex-end;
}

/* WhatsApp */
.status-badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-block;
}
.status-bot { background: rgba(25, 223, 159, 0.15); color: var(--accent); }
.status-human { background: rgba(238, 129, 42, 0.18); color: var(--warm); }

.wa-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--text-dim);
}

.wa-messages { max-height: 40vh; overflow-y: auto; padding-right: 4px; }
.wa-messages .transcript-line { white-space: pre-wrap; }

.wa-sender {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.wa-reply {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.wa-reply textarea,
.settings-form textarea {
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.wa-error { color: var(--negative); font-size: 13px; min-height: 18px; margin: 8px 0 0; }

/* Inloggen, rollen en beheer */
.hidden { display: none !important; }

button.primary {
  background: var(--warm);
  border-color: var(--warm);
  color: #1d1004;
  font-weight: 600;
  cursor: pointer;
}
button.ghost { background: transparent; cursor: pointer; }
button { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: default; }

input[type="text"], input[type="password"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  width: 100%;
}

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-card.plain { background: none; border: none; padding: 0; max-width: none; }
.login-card h1 { font-size: 18px; margin: 0 0 12px; }
.login-card label { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.login-card button { margin-top: 14px; }

.modal-content.small { max-width: 400px; }

.user-label { font-size: 13px; color: var(--text-dim); }

.users-section h3 { font-size: 14px; margin: 18px 0 8px; color: var(--text-dim); font-weight: 500; }
.admin-block { margin-bottom: 8px; }
.dim { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

.inline-form { display: flex; gap: 8px; max-width: 520px; }
.group-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.group-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}
.group-list li span { flex: 1; }
.group-list button, .users-table button { padding: 4px 10px; font-size: 12px; }

.users-table select { padding: 5px 8px; font-size: 13px; }
.users-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.calls-table tbody tr.static-row:hover { background: none; cursor: default; }

.check-list { display: flex; flex-direction: column; gap: 4px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.check input { width: auto; margin: 0; }
.tenant-fieldset { border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.tenant-fieldset legend { font-size: 12px; color: var(--text-dim); padding: 0 6px; }
.users-table.single .col-tenants { display: none; }
.users-table button:disabled { opacity: 0.4; cursor: not-allowed; }
.status-off { background: rgba(255, 107, 107, 0.15); color: var(--negative); }

.user-form { margin-top: 20px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; padding: 16px; }
.user-form h3 { margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.form-grid select { width: 100%; }

/* ---------- Indeling met zijmenu ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.content { min-width: 0; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; padding: 4px 10px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); padding: 14px 10px 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover { background: rgba(25, 223, 159, 0.08); color: var(--text); }
.nav-item.active { background: rgba(25, 223, 159, 0.16); color: var(--text); }
.nav-item.active svg { color: var(--accent); }
.nav-item:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-badge {
  margin-left: auto;
  background: var(--negative-solid);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 999px;
}

main { max-width: 1180px; }
.view { display: flex; flex-direction: column; gap: 22px; }
.view.hidden { display: none !important; }
.topbar h1 { font-size: 20px; }

/* ---------- Gereedschapsbalk, knoppen in groepjes ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.toolbar-spacer { flex: 1; }
.pills { display: inline-flex; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pills button { background: transparent; border: none; border-radius: 6px; padding: 6px 12px; font-size: 13px; color: var(--text-dim); }
.pills button:hover { color: var(--text); }
.pills button.active { background: var(--accent); color: #052e21; font-weight: 600; }
.pills .count { opacity: 0.75; font-size: 12px; margin-left: 2px; }
input[type="search"] {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  min-width: 220px;
}
input[type="time"], input[type="number"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  width: 100%;
}

.notice { background: rgba(238, 129, 42, 0.12); border: 1px solid rgba(238, 129, 42, 0.4); color: var(--warm); border-radius: 8px; padding: 10px 14px; font-size: 13px; }

/* ---------- Cijferkaarten ---------- */
.group-title { margin: 22px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600; }
.group-title:first-child { margin-top: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi-card.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font: inherit;
  color: inherit;
  min-height: 118px;
}
.kpi-card.stat .kpi-value { font-size: 28px; line-height: 1.15; margin-top: 2px; }
.kpi-sub { color: var(--text-dim); font-size: 12px; min-height: 16px; }
.kpi-delta { margin-top: auto; padding-top: 6px; min-height: 26px; }
.kpi-card.clickable { cursor: pointer; }
.kpi-card.clickable:hover { border-color: var(--accent); }
.kpi-card.good .kpi-value { color: var(--positive); }
.kpi-card.warn { border-color: rgba(238, 129, 42, 0.55); }
.kpi-card.warn .kpi-value { color: var(--warm); }
.kpi-card.highlight { border-color: rgba(25, 223, 159, 0.45); background: linear-gradient(180deg, rgba(25, 223, 159, 0.08), var(--panel)); }
.kpi-card.highlight .kpi-value { color: var(--positive); }

.delta { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(143, 168, 173, 0.14); color: var(--text-dim); }
.delta.good { background: rgba(25, 223, 159, 0.15); color: var(--positive); }
.delta.bad { background: rgba(255, 107, 107, 0.15); color: var(--negative); }

/* ---------- Kaarten, grafiek en lijsten ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-head h3 { margin: 0; }
.small { font-size: 12px; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-dim); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.dot-ai { background: var(--positive); }
.dot-fw { background: var(--warm); }
.dot-other { background: var(--text-dim); }

.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--text-dim); font-size: 11px; }
.chart .grid-line { stroke: var(--panel-border); stroke-width: 1; }
.chart .bar-ai { fill: var(--positive); }
.chart .bar-fw { fill: var(--warm); }
.chart .bar-other { fill: var(--text-dim); }
.chart .bar-hit { fill: transparent; }
.chart g:hover .bar-hit { fill: rgba(25, 223, 159, 0.1); }

.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 8px; }
.state-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.state-chip strong { font-size: 24px; }
.state-chip span { font-size: 12px; color: var(--text-dim); }
.state-chip:hover { border-color: var(--accent); }
.state-chip.state-human_needed strong { color: var(--negative); }
.state-chip.state-ai strong { color: var(--accent); }
.state-chip.state-new strong { color: var(--accent-2); }
.state-chip.state-with_human strong { color: var(--warm); }

.state-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.state-pill.state-new { background: rgba(51, 179, 183, 0.15); color: var(--accent-2); }
.state-pill.state-ai { background: rgba(25, 223, 159, 0.15); color: var(--accent); }
.state-pill.state-human_needed { background: rgba(255, 107, 107, 0.18); color: var(--negative); font-weight: 600; }
.state-pill.state-with_human { background: rgba(238, 129, 42, 0.18); color: var(--warm); }
.state-pill.state-done { background: rgba(143, 168, 173, 0.15); color: var(--text-dim); }

.bar-row { margin-bottom: 12px; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bar-row .dim { margin-top: 3px; }

.question-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.question-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.question-list li .dim { white-space: nowrap; margin: 0; }

.settings-card summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.settings-form { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.check-list.days { flex-direction: row; flex-wrap: wrap; gap: 14px; }

/* ---------- Leads ---------- */
.summary-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.lead-select { padding: 5px 8px; font-size: 13px; border-radius: 999px; }
.lead-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.lead-new { background: rgba(143, 168, 173, 0.15); color: var(--text-dim); }
.lead-contacted { background: rgba(25, 223, 159, 0.18); color: var(--accent); }
.lead-appointment { background: rgba(238, 129, 42, 0.18); color: var(--warm); }
.lead-won { background: rgba(25, 223, 159, 0.18); color: var(--positive); }
.lead-lost { background: rgba(255, 107, 107, 0.15); color: var(--negative); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--panel-border); }
  .brand { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .nav-label { display: none; }
  .nav-item { white-space: nowrap; padding: 8px 10px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar-right { flex-wrap: wrap; }
  main { padding: 16px; }
  .users-table th:nth-child(4), .users-table td:nth-child(4) { display: table-cell; }
  .calls-table th:nth-child(4), .calls-table td:nth-child(4) { display: none; }
  .leads-table th:nth-child(4), .leads-table td:nth-child(4), .leads-table th:nth-child(5), .leads-table td:nth-child(5) { display: none; }
  input[type="search"] { min-width: 0; width: 100%; }
}

/* ======================================================================
   DHC-huisstijl: kleur en wat extra afwerking, zakelijk gehouden
   ====================================================================== */
body {
  background:
    radial-gradient(1100px 480px at 88% -8%, rgba(51, 179, 183, 0.13), transparent 60%),
    radial-gradient(800px 380px at -8% 0%, rgba(25, 223, 159, 0.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* Dunne kleurlijn bovenaan: de drie huiskleuren */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 55%, var(--warm) 100%);
  z-index: 50;
}

/* Merk: beeldmerk op een lichte ronde drager, zodat het tegen elke achtergrond afsteekt */
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 4px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  flex: none;
}
.brand-mark img { display: block; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: 0.02em; max-width: 170px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Een klant ziet zijn eigen bedrijfsnaam; in plaats van het logo van de beheerder staat de beginletter. */
.brand-initial { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; text-transform: uppercase; }
.brand-text small { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

.sidebar {
  background: linear-gradient(180deg, #0f2a30 0%, #0b1b20 100%);
  border-right: 1px solid var(--panel-border);
}
.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 2px;
  border-top: 1px solid var(--panel-border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm);
}

/* Menu: actieve pagina met kleurbalkje */
.nav-item { transition: background 0.15s, color 0.15s; }
.nav-item.active { background: linear-gradient(90deg, rgba(25, 223, 159, 0.2), rgba(25, 223, 159, 0.05)); font-weight: 600; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.nav-label { color: var(--accent-2); font-weight: 600; }

/* Bovenbalk */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 21, 25, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 24px;
}
.topbar h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.user-label { white-space: nowrap; padding: 3px 10px; border-radius: 999px; background: rgba(51, 179, 183, 0.14); color: var(--accent-2); font-weight: 600; }
select, button { transition: border-color 0.15s, background 0.15s, transform 0.1s; }
select:hover, button:hover { border-color: var(--accent-2); }
button.primary:hover { background: #f59043; border-color: #f59043; }
button.primary:active { transform: translateY(1px); }
button.ghost:hover { background: rgba(51, 179, 183, 0.1); }

/* Titels */
h2 { color: var(--accent-2); letter-spacing: 0.1em; font-size: 13px; font-weight: 700; }
.group-title { color: var(--accent-2); display: flex; align-items: center; gap: 10px; }
.group-title::before { content: ""; width: 16px; height: 3px; border-radius: 3px; background: var(--accent); }

/* Cijferkaarten: kleur bovenaan, zachte schaduw, lichte hover */
.kpi-card, .card, .user-form {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 22px rgba(0, 0, 0, 0.22);
}
.card, .user-form { border-radius: 14px; }
.kpi-card { position: relative; overflow: hidden; border-radius: 12px; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.kpi-row .kpi-card:nth-child(3n + 2)::before, .kpi-grid .kpi-card:nth-child(3n + 2)::before { background: var(--accent-2); }
.kpi-row .kpi-card:nth-child(3n)::before, .kpi-grid .kpi-card:nth-child(3n)::before { background: var(--warm); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 28px rgba(0, 0, 0, 0.32); }
.kpi-value { font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-label { font-weight: 500; }
.kpi-card.clickable:hover { border-color: var(--accent-2); }
.kpi-card.highlight { background: linear-gradient(180deg, rgba(25, 223, 159, 0.14), var(--panel)); }
.kpi-card.warn::before { background: var(--warm); }

/* Tabellen */
.calls-table { border-radius: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); }
.calls-table thead th { background: var(--panel-2); color: var(--accent-2); letter-spacing: 0.06em; font-weight: 600; }
.calls-table tbody tr { transition: background 0.12s; }
.calls-table tbody tr:hover { background: rgba(51, 179, 183, 0.1); }

/* Statussen en tags */
.status-bot { background: rgba(25, 223, 159, 0.15); color: var(--accent); }
.lead-contacted { background: rgba(51, 179, 183, 0.2); color: var(--accent-2); }
.lead-won { background: rgba(25, 223, 159, 0.18); color: var(--accent); }
.lead-appointment { background: rgba(238, 129, 42, 0.2); color: var(--warm); }
.pills { border-radius: 10px; }
.pills button.active { box-shadow: 0 2px 8px rgba(25, 223, 159, 0.3); }
.bar-fill { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.chart .bar-fw { fill: var(--warm); }
.dot-fw { background: var(--warm); }
.state-chip { background: var(--panel); transition: transform 0.12s, border-color 0.12s; }
.state-chip:hover { border-color: var(--accent-2); transform: translateY(-1px); }

/* Inloggen */
.login-view {
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(25, 223, 159, 0.14), transparent 60%),
    radial-gradient(900px 500px at 90% 90%, rgba(51, 179, 183, 0.16), transparent 60%);
}
.login-card {
  max-width: 380px;
  padding: 34px 30px 30px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, var(--warm));
}
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 14px; }
.login-brand .brand-mark { padding: 6px; border-radius: 16px; margin-bottom: 8px; }
.login-initial { width: 44px; height: 44px; font-size: 22px; }
.login-brand h1 { margin: 0; font-size: 21px; }
.login-tagline { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--warm); font-weight: 700; }
.login-card label { font-weight: 500; }
.login-card button.primary { padding: 11px; }

/* Vensters */
.modal { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-content { box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5); border-top: 3px solid var(--accent-2); }

/* Dunne scrollbalken in de huiskleur */
* { scrollbar-width: thin; scrollbar-color: #2b4a52 transparent; }

@media (max-width: 900px) {
  .brand-text { display: none; }
  .sidebar-foot { display: none; }
  .nav-item.active::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kpi-card, .state-chip, select, button, .nav-item { transition: none; }
  .kpi-card:hover, .state-chip:hover { transform: none; }
  .live-call-card { animation: none; }
}

@media (max-width: 700px) {
  /* Op een telefoon neemt de bovenbalk anders te veel van het scherm in beslag */
  .topbar { position: static; }
}

/* ---------- Bedrijven beheren ---------- */
.modal-content.wide { max-width: 780px; }
.settings-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; }

/* ---------- Verbruik ---------- */
.inline-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.usage-main { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.usage-numbers { display: flex; align-items: baseline; gap: 6px; }
.usage-big { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.usage-of { font-size: 16px; color: var(--text-dim); }
.meter { height: 12px; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 999px; overflow: hidden; }
.meter.small { height: 8px; margin-top: 6px; min-width: 120px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; transition: width 0.3s; }
.meter-fill.warn { background: linear-gradient(90deg, var(--accent-2), var(--warm)); }
.meter-fill.full { background: var(--negative); }
.quota-edit { white-space: nowrap; }
.quota-edit input { width: 96px; padding: 5px 8px; font-size: 13px; }
.quota-edit select { padding: 5px 8px; font-size: 13px; }
.quota-edit button { padding: 4px 10px; font-size: 12px; }
#usageTable tfoot td { background: var(--panel-2); border-top: 1px solid var(--panel-border); }
.notice.hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* ---------- Tarief en marge ---------- */
.quota-edit-inner { display: flex; flex-wrap: wrap; gap: 6px; min-width: 250px; }
.quota-edit-inner input[type="text"] { width: 96px; padding: 5px 8px; font-size: 13px; }
.margin.pos { color: var(--accent); font-weight: 600; }
.margin.neg { color: var(--negative); font-weight: 600; }
#usageRate { width: 70px; padding: 5px 8px; font-size: 13px; }

/* ---------- Opvolging van leads ---------- */
.lead-row { cursor: pointer; }
.lead-row:hover { background: rgba(51, 179, 183, 0.1); }
.leads-table .summary-cell { max-width: 360px; }
.leads-table .summary-cell .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignee-select { padding: 5px 8px; font-size: 13px; max-width: 160px; }
.fu { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; display: inline-block; }
.fu-overdue { background: rgba(255, 107, 107, 0.16); color: var(--negative); }
.fu-today { background: rgba(238, 129, 42, 0.18); color: var(--warm); }
.fu-later { color: var(--text); font-weight: 500; padding-left: 0; }
.lead-summary { margin: 4px 0 14px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 14px; white-space: pre-wrap; }
.lead-summary:empty { display: none; }
.lead-controls { margin-bottom: 8px; }
.quick-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.quick-dates button { padding: 4px 10px; font-size: 12px; }
.lead-history-title { margin: 18px 0 8px; font-size: 14px; color: var(--accent-2); }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.tl-item { padding: 8px 12px; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--accent-2); }
.tl-item.tl-status, .tl-item.tl-assign, .tl-item.tl-follow_up { border-left-color: var(--panel-border); background: transparent; padding: 4px 12px; font-size: 13px; color: var(--text-dim); }
.tl-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.tl-body { margin-top: 2px; font-size: 14px; white-space: pre-wrap; }
.tl-item.tl-status .tl-body, .tl-item.tl-assign .tl-body, .tl-item.tl-follow_up .tl-body { font-size: 13px; }

/* ---------- Contacten ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--panel-border); margin-bottom: 14px; }
.tab { background: transparent; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; padding: 8px 14px; color: var(--text-dim); font-size: 14px; cursor: pointer; }
.tab:hover { color: var(--text); background: rgba(51, 179, 183, 0.08); }
.tab.active { color: var(--accent); border-color: var(--panel-border); background: var(--bg); font-weight: 600; }
.tab-panel.hidden { display: none; }
.int-title { margin: 16px 0 6px; font-size: 13px; color: var(--text-dim); }
.int-lookup { display: flex; gap: 8px; }
.int-lookup input { flex: 1; }
.int-calls { width: 100%; border-collapse: collapse; font-size: 12px; }
.int-calls td { padding: 4px 8px; border-bottom: 1px solid var(--panel-border); vertical-align: top; }
.int-calls tr.bad td { color: var(--negative); }
.svc-card { border: 1px solid var(--panel-border); border-radius: 10px; margin: 10px 0; background: var(--bg); }
.svc-card.on { border-color: var(--accent-2); }
.svc-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.svc-head input { margin-top: 4px; }
.svc-desc { display: block; margin-top: 2px; }
.svc-body { padding: 0 12px 12px; border-top: 1px solid var(--panel-border); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin: 10px 0; }
.svc-grid label, .svc-body > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.svc-grid label.check { flex-direction: row; align-items: flex-start; gap: 8px; grid-column: 1 / -1; font-size: 13px; color: var(--text); }
.svc-grid label.check input { margin-top: 2px; flex: none; }
.svc-body textarea { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; }
.checklist-title { margin: 18px 0 6px; font-size: 14px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; gap: 8px; font-size: 14px; }
.checklist .check-mark { width: 16px; text-align: center; }
.checklist li.done .check-mark { color: var(--accent); }
.checklist li.todo .check-mark { color: var(--warm); }
.chip-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.upcoming-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.service-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.service-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 10px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.price-section { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--panel-border); }
.price-section h3 { margin: 8px 0 4px; font-size: 14px; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.price-row select { min-width: 220px; }
.price-row input { width: 150px; }
.market-detail { margin-top: 4px; font-size: 12px; }
.market-detail summary { cursor: pointer; color: var(--accent-2); }
.market-detail ul { margin: 4px 0 0; padding-left: 16px; }
.prompt-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.tc-log { height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 8px; padding: 12px; margin-top: 12px; }
.tc-msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-user { align-self: flex-end; background: rgba(25, 223, 159, 0.16); border: 1px solid rgba(25, 223, 159, 0.35); }
.tc-bot { align-self: flex-start; background: var(--panel, #12343a); border: 1px solid var(--panel-border); }
.tc-typing { opacity: 0.6; }
.tc-note { align-self: center; max-width: 90%; text-align: center; font-size: 12px; color: var(--warm); background: rgba(238, 129, 42, 0.1); border-radius: 8px; padding: 6px 10px; }
.history-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 800px) { .history-layout { grid-template-columns: 1fr; } }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; }
.history-item { padding: 8px 10px; border: 1px solid var(--panel-border); border-radius: 8px; cursor: pointer; background: var(--bg); }
.history-item:hover { background: rgba(51, 179, 183, 0.1); }
.history-item.active { border-color: var(--accent-2); background: rgba(51, 179, 183, 0.14); }
.diff { margin: 8px 0; max-height: 320px; overflow: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; border: 1px solid var(--panel-border); border-radius: 6px; background: var(--bg); }
.diff:empty { display: none; }
.diff > p { font-family: inherit; padding: 6px 10px; margin: 0; }
.diff-line { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1px 10px; }
.diff-mark { display: inline-block; width: 14px; opacity: 0.7; }
.diff-add { background: rgba(25, 223, 159, 0.14); }
.diff-del { background: rgba(255, 107, 107, 0.16); }
.diff-skip { color: var(--text-dim); padding: 2px 10px; font-style: italic; }
.diff-add-key { color: var(--accent); }
.diff-del-key { color: var(--negative); }
.check-col { width: 36px; text-align: center; }
.check-col input { cursor: pointer; }
.k-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.k-pending { background: rgba(238, 129, 42, 0.18); color: var(--warm); font-weight: 600; }
.k-changes { background: rgba(51, 179, 183, 0.18); color: var(--accent-2); }
.k-active { background: rgba(25, 223, 159, 0.15); color: var(--accent); }
.k-rejected { background: rgba(255, 107, 107, 0.18); color: var(--negative); }
.knowledge-live { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; margin: 8px 0 0; max-height: 220px; overflow: auto; }
.pending-tenants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pending-tenants button.current { border-color: var(--warm); color: var(--warm); }
.question-list li .q-actions { display: flex; align-items: center; gap: 10px; }
.question-list li .q-actions button { padding: 2px 10px; font-size: 12px; white-space: nowrap; }
.chan { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.02em; }
.chan-wa { background: rgba(25, 223, 159, 0.16); color: var(--accent); }
.chan-call { background: rgba(51, 179, 183, 0.18); color: var(--accent-2); }
.chan-lead { background: rgba(238, 129, 42, 0.18); color: var(--warm); }
.contact-item { cursor: pointer; }
.contact-item:hover, .contact-item:focus-visible { border-left-color: var(--accent); background: rgba(51, 179, 183, 0.08); }
.contact-timeline { max-height: 40vh; }
.wa-actions { display: inline-flex; gap: 8px; }
.contacts-table td { vertical-align: middle; }


/* Menu in groepen per dienst; een dienst die niet actief is voor het bedrijf staat gedimd, onderaan. */
.nav-group.inactive { opacity: 0.55; }
.nav-group.inactive .nav-item:hover, .nav-group.inactive .nav-item.active { opacity: 1; }
.svc-flag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--text-dim); border: 1px solid var(--panel-border); }
.nav-group.inactive .nav-label { opacity: 1; }
#serviceBanner { margin-bottom: 14px; }

/* Verbruik: de tabel toont alleen de kolommen van de gekozen dienst. */
#usageTable[data-show="whatsapp"] [data-svc="web"], #usageTable[data-show="whatsapp"] [data-svc="voice"],
#usageTable[data-show="web"] [data-svc="whatsapp"], #usageTable[data-show="web"] [data-svc="voice"],
#usageTable[data-show="voice"] [data-svc="whatsapp"], #usageTable[data-show="voice"] [data-svc="web"] { display: none; }


/* ======================================================================
   App op de telefoon: het menu wordt een lade die je opent met de menuknop
   ====================================================================== */
.menu-btn { display: none; }
.nav-overlay { display: none; }
body { padding-bottom: env(safe-area-inset-bottom); }
.install-btn { white-space: nowrap; }
#loginInstallBtn { margin-top: 10px; width: 100%; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; padding: 0; }
  .menu-btn svg { width: 22px; height: 22px; }
  .topbar { display: flex; flex-wrap: wrap; flex-direction: row; align-items: center; gap: 10px; }
  .topbar h1 { flex: 1; min-width: 0; margin: 0; }
  .topbar-right { width: 100%; flex-wrap: wrap; }

  .shell .sidebar {
    position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(84vw, 320px); height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
    overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--panel-border); border-bottom: none;
    background: var(--panel); transform: translateX(-102%); visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .shell.nav-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
  .shell .brand, .shell .brand-text { display: flex; }
  .shell .nav { flex-direction: column; gap: 2px; }
  .shell .nav-label { display: block; }
  .shell .nav-item { padding: 12px; }
  .shell .nav-item.active::before { display: block; }
  .shell .sidebar-foot { display: block; }
  .nav-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(2, 8, 10, 0.62); }
  .shell.nav-open .nav-overlay { display: block; }
  body.nav-lock { overflow: hidden; }
}

@media (max-width: 700px) {
  /* Tikdoelen en invoer groot genoeg; 16px voorkomt dat iPhone bij het typen inzoomt */
  input, select, textarea { font-size: 16px; }
  button, .ghost { min-height: 40px; }
  main { padding: 12px; }
  .view table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .modal-content { width: calc(100vw - 16px); max-width: none; max-height: calc(100dvh - 16px); overflow-y: auto; }
}

/* Meldingen op dit apparaat */
.push-categories { display: grid; gap: 8px; margin: 14px 0; }
.push-categories label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); }
.push-categories input { margin-top: 3px; flex: none; }
#pushControls .primary, #pushControls .ghost { margin-right: 8px; margin-top: 6px; }

.wa-presence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--panel-border); border-radius: 8px; font-size: 13px; color: var(--text); }
.wa-presence.is-online { border-color: #2f9e6a; }
.wa-presence.is-away { border-color: #d9822b; }
.wa-presence .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--text-dim); vertical-align: baseline; }
.is-online .dot { background: #2f9e6a; }
.is-away .dot { background: transparent; border: 2px solid #d9822b; box-sizing: border-box; }
.wa-presence .mail-link { margin-left: auto; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--panel-border); color: var(--text); text-decoration: none; font-size: 13px; }
.wa-presence.is-away .mail-link { background: #d9822b; border-color: #d9822b; color: #1a1206; font-weight: 600; }
.presence-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #2f9e6a; }

.wa-presence .mail-link { cursor: pointer; background: transparent; font: inherit; font-size: 13px; }
.wa-mail { display: grid; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--panel-border); border-radius: 8px; }
.wa-mail-head { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-dim); }
.wa-mail-head strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.wa-mail input, .wa-mail textarea { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 14px; }
.wa-mail textarea { resize: vertical; min-height: 140px; }
.wa-mail-actions { display: flex; gap: 8px; }
.wa-mail .is-ok { color: #2f9e6a; }

.int-pick { margin: 18px 0 10px; max-width: 420px; }
.int-pick label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.int-pick select { background: var(--bg); color: var(--text); border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 14px; }

.wa-messages .wa-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; color: var(--text-dim); font-size: 12px; }
.wa-messages .wa-divider::before, .wa-messages .wa-divider::after { content: ''; flex: 1; height: 1px; background: var(--panel-border); }
.wa-messages .wa-divider.new-conversation { color: var(--accent, #2fbfa5); font-weight: 600; }
.wa-customer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: 13px; color: var(--text); }
.wa-customer .label { color: var(--text-dim); }
.chip { display: inline-block; padding: 2px 9px; border: 1px solid var(--panel-border); border-radius: 999px; font-size: 12px; background: var(--bg); color: var(--text); }
.contact-purchases { margin: 10px 0; display: grid; gap: 6px; }
.contact-purchases-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.purchase-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 6px; }
.purchase-row input { background: var(--bg); color: var(--text); border: 1px solid var(--panel-border); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; min-width: 0; }
@media (max-width: 520px) { .purchase-row { grid-template-columns: 1fr auto; } .purchase-row .p-date { grid-column: 1 / 2; } }
.contact-interests-line { margin-top: 3px; font-size: 12px; color: var(--text-dim); }

/* Onboarding-vragenlijst */
#view-onboarding .toolbar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; }
.onb-intro { max-width: 760px; margin: 4px 0 14px; }
.onb-intro p { margin: 0 0 10px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.onb-progress { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-bottom: 6px; }
.onb-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s ease; }
#onbForm { max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.onb-section { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; }
.onb-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; }
.onb-section > summary::-webkit-details-marker { display: none; }
.onb-section > summary::before { content: "›"; display: inline-block; margin-right: 10px; color: var(--text-dim); transition: transform .15s ease; }
.onb-section[open] > summary::before { transform: rotate(90deg); }
.onb-section > summary .onb-title { flex: 1; }
.onb-badge { font-size: 12px; font-weight: 500; color: var(--text-dim); background: var(--panel-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.onb-badge.done { color: var(--bg); background: var(--accent); }
.onb-body { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.onb-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--warm); background: var(--panel-2); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--text-dim); }
.onb-field { display: flex; flex-direction: column; gap: 6px; }
.onb-field label { font-size: 14px; font-weight: 600; color: var(--text); }
.onb-hint { margin: 0; font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.onb-field textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.5; resize: none; overflow: hidden; }
.onb-field textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(51, 179, 183, .2); }
