/* ═══════════════════════════════════════════════════════════════════════════════
   VIXX Groep XRM — STROOM branding
   Fonts: Archivo Black (koppen), Inter/Helvetica (body)
   Primary: #F8611C (oranje), #46B0C9 (blauw), #022950 (donkerblauw)
   ═══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --page-w: 1320px;

    /* STROOM brand */
    --brand-primary: #F8611C;
    --brand-primary-hover: #e5550f;
    --brand-primary-light: rgba(248,97,28,.1);
    --brand-secondary: #46B0C9;
    --brand-secondary-light: rgba(70,176,201,.12);
    --brand-dark: #022950;
    --brand-burgundy: #9D0334;
    --brand-creme: #F1ECE4;
    --brand-gradient-header: linear-gradient(135deg, #F8611C 0%, #FE5442 40%, #3F43AD 100%);
    --brand-gradient-warm: linear-gradient(135deg, #FE5442 0%, #F8611C 50%, #FF8C42 100%);

    /* Surfaces (warm) */
    --bg: #f7f5f2;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8f5;
    --bg-surface: #f1ece4;
    --bg-muted: #e8e2d9;
    --border: #ddd6cc;
    --border-light: #eae5dd;
    --text: #1b1b1b;
    --text-secondary: #3e3e3e;
    --text-muted: #7a7164;
    --text-faint: #a89e93;

    /* Functioneel */
    --blue: #46B0C9;
    --blue-light: rgba(70,176,201,.14);
    --purple: #3F43AD;
    --purple-light: rgba(63,67,173,.1);
    --green: #2a9d6e;
    --green-light: rgba(42,157,110,.13);
    --pink: #9D0334;
    --pink-light: rgba(157,3,52,.1);
    --red: #dc2626;
    --red-light: #fee2e2;
    --amber-light: rgba(248,97,28,.1);

    --radius: 10px;
    --radius-sm: 7px;
    --radius-xs: 5px;
    --shadow-sm: 0 1px 2px rgba(2,41,80,.06);
    --shadow: 0 1px 3px rgba(2,41,80,.08), 0 1px 2px rgba(2,41,80,.04);
    --shadow-md: 0 4px 8px rgba(2,41,80,.07), 0 2px 4px rgba(2,41,80,.04);
    --shadow-lg: 0 12px 28px rgba(2,41,80,.12), 0 4px 10px rgba(2,41,80,.06);
    --transition: .15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', Helvetica, -apple-system, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { flex-shrink: 0; }

/* ─── Header ─────────────────────────────────────────────────────────────────── */

.header {
    background: var(--brand-gradient-header);
    padding: 0 28px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(248,97,28,.15);
}

.header-inner {
    max-width: var(--page-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.logo-mark {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
}
.logo h1 { font-family: 'Archivo Black', Arial, sans-serif; font-size: 15px; font-weight: 400; letter-spacing: .3px; white-space: nowrap; }
.header-subtitle { font-size: 11px; color: rgba(255,255,255,.72); display: block; margin-top: -1px; font-weight: 400; }

.nav { display: flex; gap: 1px; background: rgba(255,255,255,.15); border-radius: var(--radius-sm); padding: 3px; }
.nav a {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: var(--radius-xs);
    color: rgba(255,255,255,.72); font-size: 13px; font-weight: 500;
    transition: all var(--transition);
}
.nav a:hover { color: #fff; }
.nav a.active { background: rgba(255,255,255,.22); color: #fff; }
.nav a svg { width: 15px; height: 15px; }

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

.user-chip {
    display: flex; align-items: center; gap: 9px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    padding: 4px 12px 4px 5px; border-radius: 999px;
    color: #fff; cursor: pointer; transition: background var(--transition);
}
.user-chip:hover { background: rgba(255,255,255,.24); }
.user-chip .avatar { width: 26px; height: 26px; font-size: 10px; }
.user-chip-name { font-size: 12px; font-weight: 600; line-height: 1.15; }
.user-chip-role { font-size: 10px; color: rgba(255,255,255,.72); font-weight: 400; }

.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand-dark); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */

.page { max-width: var(--page-w); margin: 0 auto; padding: 26px 28px 60px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .2px; }
.page-head .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Knoppen ────────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: all var(--transition);
    background: var(--bg-card); color: var(--text-secondary); border-color: var(--border);
}
.btn:hover { background: var(--bg-surface); }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-surface); }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ─── Kaarten & stats ────────────────────────────────────────────────────────── */

.card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.card h3 svg { width: 15px; height: 15px; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.stat-label svg { width: 14px; height: 14px; }
.stat-value { font-family: 'Archivo Black', Arial, sans-serif; font-size: 28px; font-weight: 400; margin-top: 8px; line-height: 1; }
.stat-note { font-size: 11px; color: var(--text-muted); margin-top: 7px; }
.stat-note b { color: var(--green); font-weight: 600; }
.stat-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.stack { display: grid; gap: 14px; }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 999px; white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.b-hypotheek   { background: var(--purple-light); color: var(--purple); }
.b-planning    { background: var(--amber-light); color: var(--brand-primary); }
.b-verzekering { background: var(--blue-light); color: #23849b; }
.b-algemeen    { background: var(--bg-surface); color: var(--text-secondary); }
.pc-range { display: flex; gap: 6px; } .pc-range input { min-width: 0; }
.b-zakelijk    { background: var(--green-light, #e3f4ec); color: #1f7a55; }
.b-pensioen    { background: var(--pink-light); color: var(--brand-burgundy); }

.b-eigen     { background: var(--brand-primary-light); color: var(--brand-primary); }
.b-franchise { background: var(--purple-light); color: var(--purple); }
.b-label     { background: var(--blue-light); color: #23849b; }

.s-nieuw     { background: var(--blue-light); color: #23849b; }
.s-contact   { background: var(--purple-light); color: var(--purple); }
.s-afspraak  { background: var(--amber-light); color: var(--brand-primary); }
.s-voorstel  { background: rgba(2,41,80,.09); color: var(--brand-dark); }
.s-gewonnen  { background: var(--green-light); color: var(--green); }
.s-verloren  { background: var(--red-light); color: var(--red); }

/* ─── Tabellen ───────────────────────────────────────────────────────────────── */

table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th {
    text-align: left; font-size: 10.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted); padding: 10px 14px;
    border-bottom: 1px solid var(--border); background: var(--bg-card);
    position: sticky; top: 56px;
}
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr { cursor: pointer; transition: background var(--transition); }
table.list tbody tr:hover { background: var(--bg-card-hover); }
.td-name { font-weight: 600; }
.td-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-muted { color: var(--text-muted); font-size: 12px; }

/* ─── Filters ────────────────────────────────────────────────────────────────── */

.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filterbar select, .filterbar input[type=search], .form select, .form input, .form textarea {
    font-family: inherit; font-size: 12.5px; color: var(--text);
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 7px 10px; outline: none;
    transition: border-color var(--transition);
}
.filterbar select:focus, .filterbar input:focus, .form select:focus, .form input:focus, .form textarea:focus { border-color: var(--brand-primary); }
.filterbar input[type=search] { min-width: 220px; }
.filter-count { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ─── Kanban / pipeline ──────────────────────────────────────────────────────── */

.board { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; align-items: start; }
.col { background: var(--bg-surface); border-radius: var(--radius); padding: 10px; min-height: 220px; }
.col.drag-over { outline: 2px dashed var(--brand-primary); outline-offset: -2px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.col-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); display: flex; align-items: center; gap: 7px; }
.col-count { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg-muted); border-radius: 999px; padding: 1px 8px; }
.col-sum { font-size: 10.5px; color: var(--text-faint); padding: 0 6px 8px; }

.kcard {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 8px;
    box-shadow: var(--shadow-sm); cursor: grab; display: block;
    transition: box-shadow var(--transition), transform var(--transition);
}
.kcard:hover { box-shadow: var(--shadow-md); }
.kcard.dragging { opacity: .5; }
.kcard-name { font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.kcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.kcard-value { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.kcard-org { font-size: 10.5px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.kcard .avatar { width: 20px; height: 20px; font-size: 8px; }

/* ─── Funnel ─────────────────────────────────────────────────────────────────── */

.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 130px 1fr 74px; gap: 12px; align-items: center; font-size: 12px; }
.funnel-row .lbl { color: var(--text-secondary); font-weight: 500; }
.funnel-track { display: block; background: var(--bg-surface); border-radius: 999px; height: 18px; overflow: hidden; }
.funnel-bar { display: block; height: 100%; border-radius: 999px; min-width: 4px; transition: width .4s ease; }
.funnel-n { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.funnel-n b { color: var(--text); }

/* ─── Opvolglijst / taken ────────────────────────────────────────────────────── */

.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-light); }
.task-row:last-child { border-bottom: none; }
.task-when { font-size: 11px; font-weight: 600; min-width: 74px; color: var(--text-muted); }
.task-when.overdue { color: var(--red); }
.task-what { flex: 1; font-size: 12.5px; }
.task-what .who { color: var(--text-muted); font-size: 11.5px; }

/* ─── Lead detail ────────────────────────────────────────────────────────────── */

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }

.stepper { display: flex; gap: 4px; margin-bottom: 18px; }
.step { flex: 1; text-align: center; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding-top: 8px; position: relative; }
.step::before { content: ''; display: block; height: 4px; border-radius: 999px; background: var(--bg-muted); margin-bottom: 7px; }
.step.done { color: var(--text-muted); }
.step.done::before { background: var(--brand-secondary); }
.step.current { color: var(--brand-primary); }
.step.current::before { background: var(--brand-primary); }
.step.lost { color: var(--red); }
.step.lost::before { background: var(--red); }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--text-muted); }
.kv dd { font-weight: 500; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border-light); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -24px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--brand-secondary); display: flex; align-items: center; justify-content: center; }
.tl-dot svg { width: 8px; height: 8px; color: var(--brand-secondary); }
.tl-head { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.tl-head b { color: var(--text-secondary); font-weight: 600; }
.tl-body { font-size: 12.5px; line-height: 1.5; }

.note-form { display: grid; gap: 8px; margin-top: 14px; }
.note-form textarea { resize: vertical; min-height: 60px; }
.note-form-row { display: flex; gap: 8px; justify-content: space-between; }

/* ─── Vestigingen ────────────────────────────────────────────────────────────── */

.org-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.org-card { padding: 16px 18px; }
.org-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.org-name { font-size: 14px; font-weight: 700; }
.org-city { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.org-stats { display: flex; gap: 16px; border-top: 1px solid var(--border-light); padding-top: 11px; margin-top: 4px; }
.org-stat { font-size: 11px; color: var(--text-muted); }
.org-stat b { display: block; font-size: 15px; color: var(--text); font-weight: 700; margin-bottom: 1px; }
.org-users { display: flex; margin-top: 12px; }
.org-users .avatar { width: 26px; height: 26px; font-size: 9px; border: 2px solid var(--bg-card); margin-left: -6px; }
.org-users .avatar:first-child { margin-left: 0; }

/* ─── Rechten-tabel ──────────────────────────────────────────────────────────── */

.perm-note { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-primary-light); border: 1px solid rgba(248,97,28,.25); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.perm-note svg { width: 16px; height: 16px; color: var(--brand-primary); margin-top: 1px; }

/* ─── Login / rolkiezer ──────────────────────────────────────────────────────── */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--brand-gradient-header); padding: 30px; }
.login-card { background: var(--bg-card); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 700px; padding: 36px 40px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.login-brand img { height: 26px; }
.login-title { font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400; font-size: 24px; }
.login-sub { font-size: 13px; color: var(--text-muted); margin: 8px 0 26px; line-height: 1.5; }
.login-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin: 18px 0 8px; }
.login-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-user {
    display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 12px; cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.login-user:hover { border-color: var(--brand-primary); background: var(--bg-card-hover); box-shadow: var(--shadow-sm); }
.login-user-name { font-size: 13px; font-weight: 600; }
.login-user-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ─── Modal ──────────────────────────────────────────────────────────────────── */

.modal-back { position: fixed; inset: 0; background: rgba(2,41,80,.4); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 60px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-back.open { display: flex; }
.modal { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; padding: 24px 26px; }
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.form { display: grid; gap: 12px; }
.form label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); display: grid; gap: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.empty { text-align: center; color: var(--text-muted); font-size: 12.5px; padding: 30px 10px; }

.flash { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--brand-dark); color: #fff; font-size: 12.5px; font-weight: 500; padding: 9px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 300; animation: flash 2.6s forwards; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ─── Responsief ─────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .board { grid-template-columns: repeat(3, 1fr); }
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
    .org-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .page { padding: 18px 16px 50px; }
    .board { grid-template-columns: 1fr; }
    .org-grid, .login-users, .form-row { grid-template-columns: 1fr; }
    .nav a span { display: none; }
    .header { padding: 0 14px; }
    .header-subtitle { display: none; }
}

/* ═══ Aanvullende componenten ═══════════════════════════════════════════════════ */

.wordmark { font-family: 'Archivo Black', Arial, sans-serif; font-size: 19px; color: #fff; letter-spacing: .2px; line-height: 1; }
.wordmark span { color: rgba(255,255,255,.55); }
.wordmark-dark { color: var(--brand-dark); font-size: 24px; }
.wordmark-dark span { color: var(--brand-primary); }
.logo-divider { width: 1px; height: 26px; background: rgba(255,255,255,.3); }
.logo h1 { line-height: 1.1; }

.nav a { position: relative; }
.nav-count { font-style: normal; font-size: 10px; font-weight: 700; background: #fff; color: var(--brand-primary); border-radius: 999px; padding: 1px 6px; margin-left: 2px; }

.scope-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: #fff; background: rgba(2,41,80,.22); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-chip > span:last-child { display: flex; flex-direction: column; }
.user-drop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; z-index: 150; }
.user-drop a, .user-drop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; font-size: 12.5px; color: var(--text-secondary); border: none; background: none; border-radius: var(--radius-xs); cursor: pointer; text-align: left; }
.user-drop a:hover, .user-drop button:hover { background: var(--bg-surface); }

/* Login */
.login-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; background: var(--brand-primary-light); color: var(--brand-primary); padding: 3px 9px; border-radius: 999px; }
.login-title { margin-top: 18px; }
.login-user > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.login-user-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-foot { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted); margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-light); }

/* Kaarten extra */
.h3-sub { font-weight: 400; color: var(--text-faint); font-size: 11.5px; margin-left: auto; }
.card-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--brand-primary); margin-top: 12px; }
.card-link:hover { color: var(--brand-primary-hover); }
.card-link svg { transition: transform var(--transition); }
.card-link:hover svg { transform: translateX(2px); }
.scope-text { font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
a.funnel-row { border-radius: var(--radius-xs); }
a.funnel-row:hover .lbl { color: var(--brand-primary); }
.task-row { border-radius: var(--radius-xs); transition: background var(--transition); }
a.task-row:hover { background: var(--bg-card-hover); }
.task-when { display: inline-flex; align-items: center; gap: 3px; }
.task-row .avatar { width: 24px; height: 24px; font-size: 9px; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.product-tile { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); transition: all var(--transition); }
.product-tile:hover { border-color: var(--border); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.product-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.product-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.product-num { font-family: 'Archivo Black', Arial, sans-serif; font-size: 22px; line-height: 1.1; }
.product-num small { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.product-meta { font-size: 11px; color: var(--text-muted); }

.mini-bar { display: inline-block; width: 44px; height: 5px; background: var(--bg-muted); border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: 7px; }
.mini-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 110px; padding-top: 6px; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.spark-bar { width: 100%; background: var(--brand-gradient-warm); border-radius: 4px 4px 2px 2px; opacity: .85; transition: opacity var(--transition); }
.spark-col:last-child .spark-bar { background: var(--brand-dark); }
.spark-col:hover .spark-bar { opacity: 1; }
.spark-lbl { font-size: 9.5px; color: var(--text-faint); }

/* Tabellen extra */
.table-card { overflow: hidden; }
.table-card table.list th { top: 0; position: static; background: var(--bg-card-hover); }
.sort { color: inherit; }
.sort:hover, .sort.on { color: var(--brand-primary); }
.owner-cell { display: flex; align-items: center; gap: 8px; }
.owner-cell .avatar { width: 24px; height: 24px; font-size: 9px; }
.lock-ic { display: inline-flex; color: var(--text-faint); margin-right: 5px; vertical-align: -1px; }
.search-field { display: flex; align-items: center; gap: 7px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; color: var(--text-faint); }
.search-field:focus-within { border-color: var(--brand-primary); }
.search-field input[type=search] { border: none !important; padding: 7px 0 !important; min-width: 250px; }

/* Kanban extra */
.col-dot { width: 8px; height: 8px; border-radius: 50%; }
.col-empty { font-size: 11.5px; color: var(--text-faint); text-align: center; padding: 20px 0; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.kcard[draggable=false] { cursor: pointer; }
.kcard-next { font-size: 11px; color: var(--text-muted); margin-top: 7px; display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.kcard-next.overdue { color: var(--red); font-weight: 600; }
.kcard-right { display: flex; align-items: center; gap: 6px; }
.kcard-org { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }

/* Lead detail extra */
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.back-link:hover { color: var(--brand-primary); }
.lead-title { display: flex; align-items: center; }
.lead-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px !important; }
form.inline { display: inline; }
.btn-win { color: var(--green); border-color: rgba(42,157,110,.35); }
.btn-win:hover { background: var(--green-light); }
.stepper-card { margin-bottom: 14px; padding-bottom: 6px; }
.stepper { margin-bottom: 10px; }
.step.won { color: var(--green); }
.step.won::before { background: var(--green); }
.lost-reason { font-size: 12px; color: var(--red); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; transition: all var(--transition); }
.seg span:hover { background: var(--bg-surface); }
.seg input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.next-row label { font-weight: 600; }
.tl-call .tl-dot, .tl-meeting .tl-dot { border-color: var(--brand-primary); }
.tl-call .tl-dot svg, .tl-meeting .tl-dot svg { color: var(--brand-primary); }
.tl-stage .tl-dot { border-color: var(--green); }
.tl-stage .tl-dot svg { color: var(--green); }
.tl-assign .tl-dot, .tl-created .tl-dot { border-color: var(--border); }
.tl-assign .tl-dot svg, .tl-created .tl-dot svg { color: var(--text-muted); }
.tl-hidden { color: var(--text-faint); font-style: italic; }
.next-card { background: var(--brand-dark); color: #fff; border: none; }
.next-card .stat-label { color: rgba(255,255,255,.65); }
.next-card.is-overdue { background: var(--red); }
.next-what { font-size: 16px; font-weight: 700; margin-top: 8px; }
.next-when { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 3px; }
.link { color: var(--brand-primary); }
.link:hover { text-decoration: underline; }
.kv dd .badge { margin-left: 4px; }
.assign-form { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.assign-form select { flex: 1; font-family: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; background: var(--bg-card); }

/* Inbox */
.inbox-list { display: grid; gap: 10px; }
.inbox-item { display: flex; gap: 20px; align-items: center; padding: 16px 20px; border-left: 3px solid var(--brand-secondary); }
.inbox-main { flex: 1; min-width: 0; }
.inbox-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inbox-need { font-size: 13px; color: var(--text-secondary); margin: 5px 0 8px; }
.inbox-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); }
.inbox-meta span { display: inline-flex; align-items: center; gap: 5px; }
.inbox-route { display: grid; gap: 6px; min-width: 330px; }
.route-hint { font-size: 11px; font-weight: 600; color: var(--green); display: flex; align-items: center; gap: 5px; }
.route-row { display: flex; gap: 8px; }
.route-row select { flex: 1; font-family: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 8px; background: var(--bg-card); }

/* Organisatie */
.org-tree { margin-bottom: 24px; padding: 22px 24px; }
.tree-root { text-align: center; position: relative; padding-bottom: 22px; }
.tree-root::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 2px; height: 22px; background: var(--border); }
.tree-node { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); }
.tree-node small { font-weight: 500; color: var(--text-muted); font-size: 10.5px; }
.tree-node.root { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.tree-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tree-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 2px solid var(--border); padding-top: 18px; position: relative; }
.tree-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tree-leaves { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tree-leaf { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.tree-leaf.eigen { background: var(--brand-primary-light); color: var(--brand-primary); }
.tree-leaf.franchise { background: var(--purple-light); color: var(--purple); }
.tree-legend { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.label-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.label-head h3 { font-size: 15px; font-weight: 700; }
.label-swatch { width: 12px; height: 12px; border-radius: 4px; }
a.org-card { display: block; transition: all var(--transition); }
a.org-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.org-city { display: flex; align-items: center; gap: 5px; }
.org-users { align-items: center; }
.org-team { font-size: 11px; color: var(--text-muted); margin-left: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Rechten */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.principle h4 { font-size: 14px; margin: 12px 0 6px; }
.principle p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; }
.principle-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--brand-primary-light); color: var(--brand-primary); }
.principle:nth-child(2) .principle-ic { background: var(--purple-light); color: var(--purple); }
.principle:nth-child(3) .principle-ic { background: var(--blue-light); color: #23849b; }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; }
.matrix tbody tr { cursor: default; }
.matrix .me { background: rgba(248,97,28,.05); }
.matrix th.me { color: var(--brand-primary); }
.me-tag { display: inline-block; margin-left: 5px; font-size: 9px; background: var(--brand-primary); color: #fff; padding: 1px 6px; border-radius: 999px; letter-spacing: .04em; vertical-align: 1px; }
.scope-row td { background: var(--bg-card-hover); }
.scope-tag { font-size: 11px; color: var(--text-secondary); line-height: 1.35; display: inline-block; max-width: 150px; }
.perm { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; }
.perm.yes { background: var(--green-light); color: var(--green); }
.perm.no { color: var(--text-faint); opacity: .6; }
.foot-note { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }
.foot-note svg { margin-top: 2px; }

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: 1fr 1fr; }
    .principles { grid-template-columns: 1fr; }
    .scope-pill { display: none; }
    .inbox-item { flex-direction: column; align-items: stretch; }
    .inbox-route { min-width: 0; }
    .table-card { overflow-x: auto; }
}
@media (max-width: 680px) {
    .user-chip > span:last-child { display: none; }
    .user-chip { padding: 4px; }
    .logo-divider, .logo > span:last-child { display: none; }
    .tree-labels { grid-template-columns: 1fr; }
    .search-field input[type=search] { min-width: 0; }
}

/* Kanban-kaart voet */
.kcard-foot { gap: 8px; }
.kcard-org { flex: 1; }
.kcard-value { white-space: nowrap; }
.board-wide { max-width: 1560px; }

.header-subtitle, .user-chip-name, .user-chip-role { white-space: nowrap; }
@media (max-width: 1000px) {
    .user-chip > span:last-child { display: none; }
    .user-chip { padding: 4px; }
    .nav a { padding: 6px 10px; }
}

/* ═══ v0.2: fases per organisatie + leadkaart ═══════════════════════════════════ */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
[hidden] { display: none !important; }

.sbadge { background: color-mix(in srgb, var(--c) 13%, transparent); color: color-mix(in srgb, var(--c) 82%, #000); }

/* Organisatie-tabs */
.org-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.org-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 999px; transition: all var(--transition); }
.org-tab:hover { border-color: var(--border); }
.org-tab.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.org-tab .label-swatch { width: 9px; height: 9px; border-radius: 3px; }

/* Kanban met variabel aantal kolommen */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.board .col { flex: 0 0 256px; scroll-snap-align: start; }
.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-thumb { background: var(--bg-muted); border-radius: 999px; }
.col-kind { font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); padding: 0 6px 6px; }
.col-inbound { background: color-mix(in srgb, var(--brand-secondary) 7%, var(--bg-surface)); }
.col-won { background: color-mix(in srgb, var(--green) 7%, var(--bg-surface)); }
.col-lost { background: color-mix(in srgb, var(--red) 5%, var(--bg-surface)); }
.kcard-none { color: var(--brand-primary); font-weight: 500; }
.kcard-meta .badge + .badge { margin-left: 2px; }

/* Omzetten naar klant */
.modal-sub { font-size: 12.5px; color: var(--text-muted); margin: -8px 0 14px; line-height: 1.5; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-tile { position: relative; cursor: pointer; }
.check-tile input { position: absolute; opacity: 0; }
.check-tile > span { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: all var(--transition); }
.check-tile .product-icon { width: 30px; height: 30px; margin: 0; border-radius: 8px; }
.check-tile:hover > span { border-color: var(--text-faint); }
.check-mark { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: transparent; }
.check-tile input:checked + span { border-color: var(--green); background: var(--green-light); }
.check-tile input:checked + span .check-mark { background: var(--green); border-color: var(--green); color: #fff; }
.check-tile input:focus-visible + span { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.form-error { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--red); margin-top: 10px; }
.btn-win-solid { background: var(--green); border-color: var(--green); color: #fff; }
.btn-win-solid:hover { background: #238a60; border-color: #238a60; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-ghost { color: var(--red); border-color: transparent; background: transparent; margin-right: auto; }
.btn-danger-ghost:hover { background: var(--red-light); }
.modal .form-foot { margin-top: 16px; }

/* Leadkop */
.lead-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.lead-head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.lead-title { font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400; font-size: 24px; letter-spacing: .2px; }
.lead-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.lead-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }

/* Klikbare stepper */
.stepper-card { padding: 14px 16px 10px; margin-bottom: 16px; }
.stepper-click { display: flex; gap: 4px; margin: 0; }
.stepper-click .step::before { display: none; }
.stepper-click .step { flex: 1; background: none; border: none; padding: 4px 2px 6px; cursor: pointer; border-radius: var(--radius-xs); font-family: inherit; text-align: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); transition: background var(--transition); }
.stepper-click .step:not([disabled]):hover { background: var(--bg-surface); color: var(--text-secondary); }
.stepper-click .step[disabled] { cursor: default; }
.step-bar { display: block; height: 5px; border-radius: 999px; background: var(--bg-muted); margin-bottom: 7px; }
.stepper-click .step.done { color: var(--text-muted); }
.stepper-click .step.done .step-bar { background: var(--brand-secondary); }
.stepper-click .step.current { color: var(--brand-primary); }
.stepper-click .step.current .step-bar { background: var(--brand-primary); }
.stepper-click .step.won { color: var(--green); }
.stepper-click .step.won .step-bar { background: var(--green); }
.stepper-click .step.lost { color: var(--red); }
.stepper-click .step.lost .step-bar { background: var(--red); }
.step-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lost-reason { margin: 6px 4px 2px; }

/* Twee kolommen: dossier + activiteit */
.lead-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.lead-layout > aside { position: sticky; top: 72px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 26px; }
.card-head h3 { margin: 0; }
.count-pill { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg-surface); border-radius: 999px; padding: 1px 8px; }
.warn-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--brand-primary); background: var(--brand-primary-light); border-radius: 999px; padding: 3px 9px; }

.editable .edit-only { display: none; }
.editable.is-editing .edit-only { display: grid; }
.editable.is-editing .view-only { display: none; }
.editable.is-editing { box-shadow: 0 0 0 2px var(--brand-primary-light), var(--shadow); border-color: rgba(248,97,28,.4); }
.kv { grid-template-columns: 92px 1fr; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.editable dd[data-field] { cursor: text; border-radius: 4px; margin: -2px -5px; padding: 2px 5px; transition: background var(--transition); }
.editable dd[data-field]:hover { background: var(--bg-surface); }
.empty-val { color: var(--text-faint); font-weight: 400; font-style: italic; }
.badge-list { display: flex; flex-wrap: wrap; gap: 4px; }
.form label { font-weight: 600; }
.form input, .form select, .form textarea { width: 100%; }
.lbl-hint { font-weight: 400; color: var(--text-faint); margin-left: 4px; }

.inline-select { display: flex; align-items: center; gap: 7px; }
.inline-select .avatar { width: 24px; height: 24px; font-size: 9px; }
.inline-select select { flex: 1; min-width: 0; font-family: inherit; font-size: 12.5px; font-weight: 500; border: 1px solid transparent; background: transparent; border-radius: var(--radius-xs); padding: 3px 4px; cursor: pointer; margin-left: -4px; }
.inline-select select:hover, .inline-select select:focus { border-color: var(--border); background: var(--bg-card); outline: none; }

.transfer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.transfer summary { list-style: none; width: 100%; justify-content: center; }
.transfer summary::-webkit-details-marker { display: none; }
.transfer[open] summary { background: var(--bg-surface); }
.transfer-form { margin-top: 12px; }
.hint { display: flex; gap: 6px; font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.hint svg { margin-top: 2px; }

/* Composer */
.composer { overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--border-light); background: var(--bg-card-hover); }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 12px 18px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand-primary); border-bottom-color: var(--brand-primary); background: var(--bg-card); }
.tab-pane { padding: 16px 18px; gap: 10px; }
.composer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.when-field { display: inline-flex !important; align-items: center; gap: 6px; color: var(--text-muted); grid-template-columns: none; }
.when-field input { width: auto !important; font-size: 12px !important; padding: 5px 8px !important; }
.followup { display: grid; grid-template-columns: auto 1fr 140px 96px; gap: 8px; align-items: center; background: var(--bg-card-hover); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.followup-lbl { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.followup-lbl small { font-weight: 400; color: var(--text-faint); }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-row { display: grid; grid-template-columns: 150px 110px 1fr; gap: 10px; }
.quick-dates { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.chip { font-family: inherit; font-size: 11.5px; font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; cursor: pointer; transition: all var(--transition); }
.chip:hover { background: var(--bg-surface); }
.chip.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* Acties */
.task-list { display: grid; gap: 6px; }
.task { display: flex; align-items: flex-start; gap: 11px; padding: 10px 10px 10px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-card); position: relative; transition: border-color var(--transition); }
.task:hover { border-color: var(--border); }
.task.is-overdue { border-left: 3px solid var(--red); }
.task.is-today { border-left: 3px solid var(--brand-primary); }
.task-check { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-card); color: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: all var(--transition); }
.task-check:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.task-check.is-static { cursor: default; }
.task-type { color: var(--text-muted); margin-top: 3px; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 600; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.task-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.task-meta .avatar { width: 16px; height: 16px; font-size: 7px; }
.task.is-overdue .task-due { color: var(--red); font-weight: 600; }
.task.is-today .task-due { color: var(--brand-primary); font-weight: 600; }
.task-note { font-style: italic; }
.empty.small { padding: 14px 10px; font-size: 12px; }

.icon-btn { width: 28px; height: 28px; border-radius: var(--radius-xs); display: inline-flex; align-items: center; justify-content: center; color: var(--text-faint); background: none; border: none; cursor: pointer; list-style: none; flex-shrink: 0; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover:not([disabled]) { background: var(--bg-surface); color: var(--text-secondary); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.is-locked { cursor: help; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; }
.row-pop, .stage-del-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; width: 380px; max-width: calc(100vw - 40px); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; }

/* Tijdlijn */
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chips .chip { padding: 3px 9px; font-size: 11px; }
.timeline { padding-left: 26px; }
.timeline::before { left: 8px; top: 30px; }
.tl-day { position: relative; margin: 4px 0 10px -26px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); background: var(--bg-card); padding: 2px 0; }
.tl-day:not(:first-child) { margin-top: 14px; }
.tl-item { display: flex; gap: 8px; align-items: flex-start; padding-bottom: 12px; border-radius: var(--radius-xs); }
.tl-dot { left: -26px; width: 18px; height: 18px; }
.tl-dot svg { width: 10px; height: 10px; }
.tl-content { flex: 1; min-width: 0; }
.tl-head { font-size: 12px; color: var(--text-secondary); margin-bottom: 3px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.tl-head b { color: var(--text); }
.tl-time { font-size: 11px; color: var(--text-faint); }
.tl-body { font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); background: var(--bg-card-hover); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 8px 11px; }
.tl-item.is-system .tl-head { color: var(--text-muted); }
.tl-item.is-system .tl-head b { color: var(--text-secondary); font-weight: 600; }
.tl-item.is-system .tl-body { background: none; border: none; padding: 0; font-size: 12px; color: var(--text-muted); }
.tl-done .tl-dot { border-color: var(--green); background: var(--green); }
.tl-done .tl-dot svg { color: #fff; }
.tl-note .tl-dot { border-color: var(--purple); }
.tl-note .tl-dot svg { color: var(--purple); }
.tl-mail .tl-dot { border-color: var(--brand-secondary); }
.tl-transfer .tl-dot { border-color: var(--purple); }
.tl-transfer .tl-dot svg { color: var(--purple); }
.tl-update .tl-dot, .tl-stage .tl-dot { border-color: var(--border); }
.tl-update .tl-dot svg, .tl-stage .tl-dot svg { color: var(--text-muted); }
.tl-item .row-menu { opacity: 0; transition: opacity var(--transition); }
.tl-item:hover .row-menu, .tl-item .row-menu[open] { opacity: 1; }
.flash-target { animation: flashTarget 1.6s ease; }
@keyframes flashTarget { 0%, 40% { background: var(--brand-primary-light); } 100% { background: transparent; } }

/* Fases instellen */
.stage-preview { margin-bottom: 14px; }
.preview-row { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.preview-col { flex: 0 0 150px; background: var(--bg-surface); border-radius: var(--radius-sm); padding: 9px 11px; border-top: 3px solid var(--c); display: grid; gap: 3px; }
.preview-kind { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.preview-name { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-n { font-size: 11px; color: var(--text-muted); }
.stage-list { overflow: visible; }
.stage-row { display: grid; grid-template-columns: 96px minmax(180px, 1.3fr) 150px minmax(200px, 1.4fr) 60px 150px; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--border-light); }
.stage-row:last-child { border-bottom: none; }
.stage-row-head { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); background: var(--bg-card-hover); border-radius: var(--radius) var(--radius) 0 0; }
.stage-row input:not([type=color]):not([type=checkbox]), .stage-row select { font-family: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 9px; background: var(--bg-card); width: 100%; min-width: 0; }
.stage-row input:focus, .stage-row select:focus { border-color: var(--brand-primary); outline: none; }
.stage-row input[disabled], .stage-row select[disabled] { background: var(--bg-card-hover); color: var(--text-secondary); border-color: var(--border-light); }
.stage-order { display: flex; align-items: center; gap: 0; }
.stage-order .icon-btn { width: 24px; height: 24px; }
.stage-pos { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-left: 6px; display: inline-flex; }
.stage-name-cell { display: flex; gap: 8px; align-items: center; }
.stage-name-cell input[type=color] { width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--border); border-radius: 7px; padding: 2px; background: var(--bg-card); cursor: pointer; }
.stage-opts label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.opt-check:not([hidden]) { display: flex !important; align-items: center; gap: 7px; font-weight: 500 !important; cursor: pointer; }
.opt-check input { width: auto !important; accent-color: var(--green); }
.stage-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.stage-del { position: relative; }
.stage-del-pop { width: 260px; display: grid; gap: 10px; font-size: 12px; }
.stage-del-pop label { display: grid; gap: 5px; font-weight: 600; }
.stage-add { background: var(--bg-card-hover); border-radius: 0 0 var(--radius) var(--radius); }
.kind-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: var(--text-muted); margin: 14px 2px; }
.kind-legend > div { display: flex; align-items: center; gap: 6px; }
.kind-legend b { color: var(--text-secondary); }
.reset-form { display: flex; align-items: center; gap: 10px; font-size: 11.5px; flex-wrap: wrap; }
.stage-strip { display: flex; gap: 5px; flex-wrap: wrap; margin: -4px 0 12px; }
.stage-chip { font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, transparent); color: color-mix(in srgb, var(--c) 82%, #000); }
.label-head-btn { margin-left: auto; }

@media (max-width: 1100px) {
    .lead-layout { grid-template-columns: 1fr; }
    .lead-layout > aside { position: static; }
    .stage-row { grid-template-columns: 70px 1fr 140px; }
    .stage-row > :nth-child(n+5) { grid-column: auto; }
    .stage-row-head { display: none; }
}
@media (max-width: 680px) {
    .followup { grid-template-columns: 1fr 1fr; }
    .followup-lbl { grid-column: 1 / -1; }
    .followup input[name=next_title] { grid-column: 1 / -1; }
    .plan-row { grid-template-columns: 1fr 1fr; }
    .plan-row label:last-child { grid-column: 1 / -1; }
    .check-grid { grid-template-columns: 1fr; }
    .stepper-click { overflow-x: auto; }
    .stepper-click .step { min-width: 90px; }
    .stage-row { grid-template-columns: 1fr; }
    .tabs .tab { flex: 1; justify-content: center; padding: 11px 8px; }
}

@media (max-width: 680px) {
    .header { height: auto; padding: 8px 14px 6px; }
    .header-inner { flex-wrap: wrap; gap: 6px 10px; }
    .nav { order: 3; width: 100%; justify-content: space-between; overflow-x: auto; }
    .nav a { flex: 1; justify-content: center; }
    .table-card table.list th { position: static; }
}
.followup > *, .plan-row > *, .form-row > *, .composer-top > * { min-width: 0; }
.followup input, .plan-row input, .plan-row select { width: 100%; min-width: 0; }
.seg input, .check-tile input { width: 1px !important; height: 1px; }
.grid-2 > *, .stack > *, .lead-layout > * { min-width: 0; }
.card:has(> table.list) { overflow-x: auto; }
@media (max-width: 680px) {
    .stat-value { font-size: 22px; }
    .stat { padding: 14px; }
}
.inbox-meta span { overflow-wrap: anywhere; min-width: 0; } .route-row select { min-width: 0; } .inbox-route, .inbox-main { min-width: 0; }
.inbox-list > * { min-width: 0; }
.inbox-route > * { min-width: 0; }

/* ═══ v0.3: login, profiel, gebruikers, mailbox ═════════════════════════════════ */

.login-narrow { max-width: 440px; }
.login-form { gap: 14px; margin-top: 4px; }
.login-form input[type=email] { font-size: 15px; padding: 11px 13px; }
.btn-lg { padding: 11px 18px; font-size: 14px; justify-content: center; }
.login-alert { display: flex; align-items: center; gap: 8px; background: var(--red-light); color: #991b1b; font-size: 12.5px; font-weight: 500; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.code-boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.form .code-boxes input { text-align: center; font-size: 26px; font-weight: 700; padding: 12px 0; font-variant-numeric: tabular-nums; border-width: 1.5px; color: var(--brand-dark); }
.form .code-boxes input:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-light); }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.link-btn { background: none; border: none; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand-primary); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.demo-login { margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.demo-login summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }

.imp-bar { background: var(--brand-dark); color: #fff; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; flex-wrap: wrap; text-align: center; }
.imp-bar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.imp-bar .btn:hover { background: rgba(255,255,255,.22); }
.user-drop-head { font-size: 11px; color: var(--text-faint); padding: 6px 10px 8px; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.user-drop { min-width: 230px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; }
.profile-id { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-name { font-size: 17px; font-weight: 700; }
.ok-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-light); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.private-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--purple); background: var(--purple-light); border-radius: 999px; padding: 3px 9px; }
.mailbox-conn { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-card-hover); border: 1px solid var(--border-light); border-radius: var(--radius-sm); margin-bottom: 14px; }
.g-logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-list { list-style: none; display: grid; gap: 7px; margin: 0 0 16px; font-size: 12.5px; color: var(--text-secondary); }
.check-list li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.check-list svg { color: var(--green); margin-top: 2px; }
.mailbox-intro { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 14px; }
.mailbox-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.btn-google { background: #fff; border-color: var(--border); color: #1f1f1f; padding: 9px 16px; font-size: 13px; gap: 9px; }
.btn-google:hover { background: #f8f9fa; border-color: #c4c7c5; }
.setup-note { font-size: 12px; line-height: 1.55; color: var(--text-secondary); background: var(--amber-light); border: 1px solid rgba(248,97,28,.25); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; }
.setup-note code { font-size: 11px; background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

.users-table .row-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.users-table tbody tr { cursor: default; }
.users-table tr.is-inactive td { opacity: .55; }
.users-table .owner-cell .avatar { width: 30px; height: 30px; font-size: 10px; }
.user-pop { width: 520px; }
.s-off { background: var(--bg-muted); color: var(--text-muted); }
.scope-hint { align-self: end; padding-bottom: 8px; font-size: 12px; }
.modal-wide { max-width: 600px; }

/* Mailbox op leadkaart */
.mailbox-empty { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; background: var(--bg-card-hover); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 12px; }
.mailbox-empty .btn { flex-shrink: 0; }
.mail-list { display: grid; gap: 6px; }
.mail-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.mail-row.is-linked { background: var(--bg-card-hover); }
.mail-dir { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.mail-in { background: var(--blue-light); color: #23849b; }
.mail-out { background: var(--brand-primary-light); color: var(--brand-primary); }
.mail-main { flex: 1; min-width: 0; }
.mail-top { display: flex; justify-content: space-between; gap: 10px; }
.mail-subject { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.mail-snippet { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.src-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--purple); background: var(--purple-light); border-radius: 999px; padding: 1px 7px; }

@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .mailbox-empty { flex-wrap: wrap; }
}

/* Organisatiebeheer */
.org-head-right { display: inline-flex; align-items: center; gap: 4px; }
a.org-name:hover { color: var(--brand-primary); }
.label-head-btn { display: inline-flex; align-items: center; gap: 4px; }
.pc-range { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text-muted); }
.pc-range input { width: 90px !important; }
.color-field input[type=color] { width: 60px !important; height: 34px; padding: 2px; }

/* ─── Flows: overzicht ───────────────────────────────────────────────────────── */

.flow-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.flow-card { display: block; transition: all var(--transition); border-left: 3px solid var(--border); }
.flow-card:hover { box-shadow: var(--shadow-md); }
.flow-card.is-on { border-left-color: var(--brand-primary); }
.flow-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-card-head h3 { margin-bottom: 0; }
.flow-goal { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 8px 0 10px; }
.flow-trigger { font-size: 11.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; background: var(--bg-surface); border-radius: var(--radius-xs); padding: 6px 9px; }
.flow-mini { display: flex; align-items: center; gap: 4px; margin: 12px 0; min-height: 26px; }
.fmini { width: 26px; height: 26px; border-radius: var(--radius-xs); display: inline-flex; align-items: center; justify-content: center; background: var(--bg-surface); color: var(--text-secondary); }
.fmini-mail { background: var(--blue-light); color: #23849b; }
.fmini-task { background: var(--amber-light); color: var(--brand-primary); }
.fmini-stage { background: rgba(2,41,80,.09); color: var(--brand-dark); }
.fmini-notify { background: var(--pink-light); color: var(--brand-burgundy); }
.fmini-check { background: var(--purple-light); color: var(--purple); }
.fmini-line { width: 10px; height: 2px; background: var(--border); border-radius: 2px; }
.fmini-more { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.flow-nums { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--text-muted); border-top: 1px solid var(--border-light); padding-top: 10px; }
.flow-nums b { color: var(--text); font-weight: 600; }
.flow-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.b-on  { background: var(--green-light); color: var(--green); }
.b-off { background: var(--bg-muted); color: var(--text-muted); }
.test-pill { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-primary); font-weight: 600; }

/* ─── Flows: stroomdiagram ───────────────────────────────────────────────────── */

.flow-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.flowmap { padding: 6px 0 2px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: end; }
.fmain { min-width: 0; }
.fside { position: relative; }

.fconn { height: 34px; position: relative; background: linear-gradient(var(--border), var(--border)) center/2px 100% no-repeat; display: flex; align-items: center; justify-content: center; }
.fconn::after { content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--border); }
.fdelay { background: var(--bg); border: 1px solid var(--border-light); border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--text-muted); padding: 2px 9px; }

.fnode { display: flex; align-items: center; gap: 11px; background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); padding: 11px 12px; position: relative; }
.fnode:hover { border-color: var(--border); }
.fnode.on { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-light); }
.fnode-ic { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); color: var(--text-secondary); flex-shrink: 0; }
.fnode-body { min-width: 0; flex: 1; display: grid; gap: 2px; }
.fnode-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
a.fnode-title:hover { color: var(--brand-primary); }
.fnode-sub { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fnode-n { font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--bg-surface); border-radius: 999px; min-width: 30px; text-align: center; padding: 3px 9px; font-variant-numeric: tabular-nums; }
.fnode.has-leads .fnode-n { background: var(--brand-primary); color: #fff; }
.fnode-n.is-total { background: transparent; color: var(--text-faint); }
.fnode-tools { display: flex; align-items: center; gap: 1px; margin-left: 2px; }
.fnode-tools .icon-btn { width: 24px; height: 24px; }

.fnode-trigger { border-style: dashed; background: var(--bg-surface); }
.fnode-trigger .fnode-ic { background: var(--brand-primary); color: #fff; }
.fnode-mail .fnode-ic   { background: var(--blue-light); color: #23849b; }
.fnode-task .fnode-ic   { background: var(--amber-light); color: var(--brand-primary); }
.fnode-stage .fnode-ic  { background: rgba(2,41,80,.09); color: var(--brand-dark); }
.fnode-notify .fnode-ic { background: var(--pink-light); color: var(--brand-burgundy); }
.fnode-check { border-color: var(--purple-light); background: rgba(63,67,173,.03); }
.fnode-check .fnode-ic  { background: var(--purple-light); color: var(--purple); }
.fnode-end .fnode-ic    { background: var(--green-light); color: var(--green); }

.fbranch { position: relative; font-size: 11px; color: var(--text-secondary); background: var(--green-light); border-radius: var(--radius-sm); padding: 8px 10px; line-height: 1.35; display: block; }
.fbranch small { color: var(--text-muted); }
.fbranch::before { content: ''; position: absolute; right: 100%; top: 50%; width: 12px; border-top: 2px dashed var(--border); }
.fbranch-lbl { display: inline-block; font-weight: 700; text-transform: uppercase; font-size: 9px; letter-spacing: .08em; color: var(--green); margin-right: 4px; }
.fbranch-out { background: var(--bg-surface); }
.fbranch-out .fbranch-lbl { color: var(--text-muted); }
.fbranch-out.on { outline: 2px solid var(--brand-primary); }
.flow-add { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }

/* ─── Flows: wie staat waar ──────────────────────────────────────────────────── */

.flow-people-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin: 4px 0 12px; }
.flow-runs { list-style: none; display: grid; gap: 2px; max-height: 460px; overflow-y: auto; }
.flow-runs li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border-light); }
.flow-runs li:last-child { border-bottom: none; }
.run-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.run-name { font-size: 12.5px; font-weight: 600; }
.run-name:hover { color: var(--brand-primary); }
.run-meta { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-right { text-align: right; display: grid; gap: 1px; }
.run-when { font-size: 11px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.run-when.due { color: var(--brand-primary); font-weight: 600; }
.run-step { font-size: 10.5px; color: var(--text-faint); }
.flow-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; border-top: 1px solid var(--border-light); padding-top: 12px; }
.flow-legend .chip b { margin-left: 4px; }

/* ─── Flows: instellingen ────────────────────────────────────────────────────── */

.flow-settings { margin-top: 14px; }
.flow-settings > summary { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.flow-settings > summary::-webkit-details-marker { display: none; }
.flow-settings > summary svg { color: var(--text-muted); }
.flow-settings[open] > summary { margin-bottom: 16px; }
.flow-set { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 12px 12px; display: grid; gap: 7px; }
.flow-set legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 0 5px; }
.row-pop-wide { width: 440px; }
.step-del { display: flex; align-items: center; gap: 10px; margin-top: 12px; border-top: 1px solid var(--border-light); padding-top: 12px; flex-wrap: wrap; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-light); }
.form code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: var(--bg-surface); border-radius: 3px; padding: 1px 4px; }

/* ─── Automatisering op de leadkaart ─────────────────────────────────────────── */

.lead-flow { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--border-light); }
.lead-flow:last-of-type { border-bottom: none; }
.lead-flow-name { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.lead-flow-name:hover { color: var(--brand-primary); }
.lead-flow-step { font-size: 11.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lead-flow.is-done .lead-flow-name, .lead-flow.is-done .lead-flow-step { color: var(--text-muted); }
.lead-flow .btn { justify-self: start; margin-top: 4px; }
.lead-flow-add { grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin-top: 12px; border-top: 1px solid var(--border-light); padding-top: 12px; }

@media (max-width: 1080px) {
    .flow-layout { grid-template-columns: 1fr; }
    .frow { grid-template-columns: minmax(0, 1fr) 132px; }
}
@media (max-width: 720px) {
    .frow { grid-template-columns: 1fr; }
    .fside:empty { display: none; }
    .fbranch { margin-top: 8px; }
    .fbranch::before { display: none; }
}

/* ─── Doelgroepen (eigen kanban per doelgroep) ──────────────────────────────── */
.b-aud-klant    { background: var(--brand-primary-light); color: var(--brand-primary); }
.b-aud-makelaar { background: var(--purple-light); color: var(--purple); }
.b-aud-indirect { background: var(--blue-light); color: #23849b; }
.b-aud-kandidaat { background: #fff4d6; color: #8a5a00; }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }

/* Doelgroep-schakelaar: één bedieningselement, actieve doelgroep donker */
.aud-switch {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
    padding: 4px; margin-bottom: 16px;
    background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 12px;
}
.aud-seg {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 10px 14px; border-radius: 9px; color: var(--text-secondary);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.aud-seg:hover { background: var(--bg-card); }
.aud-seg-ic {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 9px; background: var(--bg-card); color: var(--text-muted);
    border: 1px solid var(--border-light);
}
.aud-seg-body { display: flex; flex-direction: column; min-width: 0; }
.aud-seg-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aud-seg-meta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.aud-seg.on { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-md); }
.aud-seg.on .aud-seg-ic { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.aud-seg.on .aud-seg-meta { color: rgba(255,255,255,.7); }
.aud-seg:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 2px; }
.aud-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }

.aud-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.aud-opt { position: relative; cursor: pointer; }
.aud-opt input { position: absolute; opacity: 0; }
.aud-opt > span {
    display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 10px 11px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 12.5px; font-weight: 600; line-height: 1.25; transition: all var(--transition);
}
.aud-opt .aud-ic { width: 26px; height: 26px; }
.aud-opt:hover > span { border-color: var(--text-faint); }
.aud-opt input:checked + span { border-color: var(--brand-dark); background: var(--bg-surface); }
.aud-opt input:focus-visible + span { outline: 2px solid var(--brand-secondary); outline-offset: 2px; }

.kcard-contact { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-muted); margin: -2px 0 6px; }

.partner-tiles { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.partner-tile {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 11px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); transition: all var(--transition);
}
.partner-tile:hover { border-color: var(--border); background: var(--bg-card-hover); }
.partner-tile .aud-ic { grid-row: 1 / 3; }
.partner-tile-name { font-size: 13px; font-weight: 600; }
.partner-tile-num { font-size: 12px; color: var(--text-muted); grid-column: 2; }
.partner-tile > svg { grid-row: 1 / 3; grid-column: 3; color: var(--text-faint); }

@media (max-width: 720px) {
    .aud-switch { grid-auto-flow: row; grid-template-columns: 1fr; }
    .aud-seg { padding: 8px 10px; }
    .aud-seg-ic { width: 30px; height: 30px; }
    .aud-pick { grid-template-columns: 1fr; }
    .aud-opt > span { flex-direction: row; align-items: center; }
}

/* ─── Rapportage: funnel per doelgroep ──────────────────────────────────────── */
.report-funnel { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.report-funnel h3 { margin-bottom: 8px; }

.report-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.pyramid { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 14px; }
.pyr-layer {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    height: 76px; width: 100%; border: 0; cursor: pointer; font: inherit; color: #fff;
    background: var(--c); transition: filter var(--transition), transform var(--transition);
}
.pyr-layer:hover { filter: brightness(1.08); }
.pyr-layer:focus-visible { outline: none; filter: brightness(1.15); }
.pyr-num { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pyr-name { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.pyr-meta { font-size: 11px; opacity: .82; }
.pyr-step { align-self: center; font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 3px 0; }
.drop-num { font-size: 28px; font-weight: 800; margin: 8px 0 10px; font-variant-numeric: tabular-nums; }
.drop-num small { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.drop-row {
    display: flex; justify-content: space-between; width: 100%; padding: 8px 10px; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); background: var(--bg-card); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 6px;
}
.drop-row:hover { border-color: var(--border); }
.drop-reason { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); padding: 4px 10px 0 18px; }
.rf-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin: 12px 0 4px; }
.rf-kind:first-child { margin-top: 0; }
.rf-row { border-radius: var(--radius-sm); }
.rf-row[open] { background: var(--bg-card-hover); }
.rf-row summary {
    display: grid; grid-template-columns: 1fr 90px 100px; align-items: center; gap: 14px;
    padding: 9px 10px; cursor: pointer; list-style: none; border-radius: var(--radius-sm);
}
.rf-row summary::-webkit-details-marker { display: none; }
.rf-row summary:hover { background: var(--bg-card-hover); }
.rf-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.rf-n { font-size: 12.5px; color: var(--text-muted); text-align: right; }
.rf-n b { color: var(--text); font-size: 14px; }
.rf-v { font-size: 12.5px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.rf-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; padding: 4px 10px 12px 26px; }
.rf-person {
    display: flex; align-items: center; gap: 9px; padding: 7px 10px; background: var(--bg-card);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm); transition: border-color var(--transition);
}
.rf-person:hover { border-color: var(--border); }
.rf-person-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rf-person-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-person-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-person-v { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
    .report-grid { grid-template-columns: 1fr; }
    .rf-row summary { grid-template-columns: 1fr auto; gap: 6px 10px; }
    .pyr-layer { height: 64px; }
    .pyr-meta { display: none; }
    .rf-v { display: none; }
    .rf-people { padding-left: 10px; }
}

/* ─── Aangebrachte leads (partner of klant als aanbrenger) ──────────────────── */
.ref-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.ref-stats div { display: flex; flex-direction: column; padding: 8px 10px; background: var(--bg-surface); border-radius: var(--radius-sm); min-width: 0; }
.ref-stats b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-stats span { font-size: 11px; color: var(--text-muted); }
.ref-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 2px; border-top: 1px solid var(--border-light); font-size: 12.5px; font-weight: 600; }
.ref-row:hover .ref-name { color: var(--brand-primary); }
.ref-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard-via { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.report-origin { margin-top: 16px; }

/* ─── Adres (gestructureerd) ────────────────────────────────────────────────── */
.addr { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.addr legend { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
.addr-row { display: grid; gap: 10px; }
.addr-row-1 { grid-template-columns: 1.3fr 1fr 0.8fr; }
.addr-row-2 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 520px) { .addr-row-1, .addr-row-2 { grid-template-columns: 1fr 1fr; } .addr-row-2 label:first-child { grid-column: 1 / -1; } }

/* ─── Gezinsleden / contactpersonen ─────────────────────────────────────────── */
.person-empty { font-size: 12.5px; margin-bottom: 10px; }
.person { border-top: 1px solid var(--border-light); }
.person > summary { display: flex; align-items: center; gap: 10px; padding: 9px 2px; cursor: pointer; list-style: none; }
.person > summary::-webkit-details-marker { display: none; }
.person-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.person-name { font-size: 13px; font-weight: 600; }
.person-rel { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg-surface); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.person-sub { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 11.5px; color: var(--text-muted); }
.person-sub span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.person-edit-ic { color: var(--text-faint); }
.person > summary:hover .person-edit-ic { color: var(--text); }
.person[open] > summary .person-edit-ic { color: var(--brand-primary); }
.person-form { padding: 4px 0 14px; }
.person-add { border-top: 0; margin-top: 8px; }
.person-add > summary { display: inline-flex; padding: 5px 12px; }
.person-add[open] > summary { margin-bottom: 10px; }

/* ─── Spreektaal ────────────────────────────────────────────────────────────── */
.lang-badge {
    display: inline-flex; align-items: center; justify-content: center; height: 16px; padding: 0 5px; margin-left: 5px;
    font-size: 9.5px; font-weight: 800; letter-spacing: .04em; line-height: 1; vertical-align: 1px;
    color: var(--brand-dark); background: var(--brand-secondary-light); border: 1px solid rgba(70,176,201,.35); border-radius: 4px;
}
.lang-badge.is-empty { color: var(--text-faint); background: transparent; border-style: dashed; border-color: var(--border); }
.fnode-langs { display: inline-flex; gap: 0; margin-left: 2px; }
.fnode-langs .lang-badge { margin-left: 3px; }
.lead-sub .lang-badge { height: 20px; padding: 0 7px; font-size: 10.5px; margin-left: 0; }
.form-row-name { grid-template-columns: 2fr 1fr; }
.translations { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 8px 12px; }
.translations > summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.translations[open] > summary { margin-bottom: 10px; }
.tr-lang { border: 0; border-top: 1px solid var(--border-light); padding: 10px 0 4px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-lang legend { font-size: 12px; font-weight: 700; padding: 0 6px 0 0; }
.tr-lang legend .lang-badge { margin-left: 0; }

/* ─── Mailinstellingen (?p=mail) ─────────────────────────────────────────── */
.mail-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mail-step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: inherit; font-weight: 600; font-size: 13px; }
.mail-step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-surface); font-size: 12px; flex-shrink: 0; }
.mail-step span { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--text-muted); }
.mail-step.done b { background: var(--green); color: #fff; }
.mail-section { margin-bottom: 14px; }
.mail-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mail-app { display: grid; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; align-content: start; }
.mail-app-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mail-app-head .ok-pill { margin-left: auto; }
.redirect-uri { font-size: 11.5px; color: var(--text-muted); display: grid; gap: 4px; }
.redirect-uri code { font-size: 11px; background: var(--bg-surface); padding: 4px 6px; border-radius: 4px; word-break: break-all; user-select: all; }
.mail-guide { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mail-guide.card { margin-top: 0; }
.mail-guide > summary { cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 13px; list-style: none; display: flex; align-items: center; gap: 8px; }
.mail-guide.card > summary { padding: 0; }
.mail-guide > summary::-webkit-details-marker { display: none; }
.mail-guide > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.mail-guide[open] > summary::before { transform: rotate(45deg); }
.mail-guide-body { padding: 0 18px 16px; font-size: 13px; line-height: 1.6; }
.mail-guide.card .mail-guide-body { padding: 8px 0 0; }
.mail-guide-body h4 { margin: 14px 0 4px; font-size: 13px; }
.mail-guide-body ol, .mail-guide-body ul { margin: 0; padding-left: 20px; }
.mail-guide-body code { font-size: 11.5px; background: var(--bg-surface); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.mail-guide-body .setup-note { margin-top: 8px; }
.guide-table td { font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.guide-table td:first-child { font-weight: 600; white-space: nowrap; }
.sender { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; display: grid; gap: 12px; scroll-margin-top: 80px; }
.sender-head { display: flex; align-items: center; gap: 10px; }
.sender-title { display: grid; gap: 1px; } .sender-title b { font-size: 14px; }
.sender-head .ok-pill, .sender-head .warn-pill { margin-left: auto; }
.warn-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: #9a3412; background: var(--amber-light); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sender-used { font-size: 12.5px; color: var(--text-secondary); }
.sender-connect { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sender-connect .btn { gap: 8px; }
.viewers { border: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.viewers legend { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); padding: 0; margin-bottom: 4px; }
.viewer-tools { font-size: 12px; }
.viewer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.viewer { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.viewer span { display: grid; gap: 1px; } .viewer b { font-size: 12.5px; } .viewer small { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.viewer:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.sender-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sender-test { display: flex; gap: 6px; } .sender-test input { width: 220px; }
.sender-foot form:last-child { margin-left: auto; }
.sender-log { display: grid; gap: 2px; font-size: 11.5px; } .sender-log .ok { color: var(--green); } .sender-log .err { color: var(--red); }
.sender-new > summary { list-style: none; display: inline-flex; } .sender-new > summary::-webkit-details-marker { display: none; }
.sender-new[open] > summary { margin-bottom: 12px; }
.type-rows { display: grid; gap: 8px; }
.type-row { display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.type-row b { display: block; font-size: 13px; } .type-row small { font-size: 11.5px; color: var(--text-muted); }
.mail-box-tag { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
@media (max-width: 760px) {
  .mail-steps, .mail-apps { grid-template-columns: 1fr; }
  .type-row { grid-template-columns: 1fr; }
  .sender-test input { width: 100%; } .sender-foot form:last-child { margin-left: 0; }
}
.admin-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--brand-dark, #022950); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sender-head .admin-pill { margin-left: auto; } .sender-head .admin-pill + .ok-pill, .sender-head .admin-pill + .warn-pill { margin-left: 0; }
.admin-note { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; background: var(--bg-surface); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--text-secondary); }
.admin-note svg { flex-shrink: 0; margin-top: 2px; }
.admin-check { align-items: flex-start !important; font-size: 12.5px; line-height: 1.45; } .admin-check input { margin-top: 3px; }
.type-locked { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); background: var(--bg-surface); border-radius: var(--radius-sm); padding: 9px 12px; }

/* ─── Organisatiekiezer (header) ─────────────────────────────────────────── */
.org-switch { padding: 0 4px 0 11px; }
.org-switch select { appearance: none; -webkit-appearance: none; background: transparent; border: none; color: #fff; font: inherit; font-weight: 600; padding: 5px 22px 5px 0; cursor: pointer; max-width: 220px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.org-switch select:focus { outline: none; } .org-switch:focus-within { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.org-switch option { color: #1b1b1b; }
.org-banner { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.org-banner a { margin-left: auto; }

/* ─── Header past altijd: ruim (tekst) / compact (iconen) / mini (menuknop) — klasse gezet door app.js op basis van echte ruimte ─── */
.header-inner > .logo, .header-right { flex-shrink: 0; }
.header-inner > .nav { min-width: 0; flex: 0 1 auto; }
.nav a { white-space: nowrap; }
.nav-toggle { display: none; align-items: center; gap: 7px; background: rgba(255,255,255,.15); border: none; color: #fff; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.header.compact .nav a span { display: none; }
.header.compact .nav a { padding: 6px 10px; }
.header.compact .org-switch select { max-width: 150px; }
.header.compact .user-chip > span:last-child { display: none; }
.header.compact .user-chip { padding: 4px; }
.header.mini .nav-toggle { display: inline-flex; }
.header.mini .header-inner > .nav { display: none; }
.header.mini.nav-open .header-inner > .nav {
    display: grid; position: absolute; top: 56px; left: 12px; right: 12px; z-index: 120; gap: 2px; padding: 8px;
    background: var(--brand-dark, #022950); border-radius: var(--radius-sm); box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
.header.mini.nav-open .nav a span { display: inline; }
.header.mini.nav-open .nav a { padding: 10px 12px; color: #fff; }
.header.mini .org-switch select { max-width: 110px; }
@media (max-width: 520px) { .header.mini .logo-divider, .header.mini .logo h1, .header.mini .header-subtitle { display: none; } }

/* ─── Verdelen vanuit centraal punt (inbox) ─────────────────────────────── */
.distribute { margin-bottom: 22px; }
.dist-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; } .dist-head h3 { font-size: 15px; display: flex; gap: 7px; align-items: center; }
.dist-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 14px; }
.dist-bulk select { min-width: 240px; flex: 1 1 240px; max-width: 360px; }
.inbox-item { position: relative; }
.dist-check { display: flex; align-items: flex-start; padding-top: 2px; } .dist-check input { width: 16px; height: 16px; accent-color: var(--brand-primary); }
.btn-icon { padding-left: 9px; padding-right: 9px; flex-shrink: 0; }
.inbox-item.is-archived { border-left-color: var(--border); }
.route-hint.is-muted { color: var(--text-muted); }
.route-row-end { justify-content: flex-end; }
.inbox-sub { font-size: 15px; display: flex; gap: 7px; align-items: center; margin: 6px 0 10px; }
.empty.small { padding: 14px; font-size: 13px; }
.notify-to { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 6px; }
.notify-to legend { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); padding: 0 4px; }
.notify-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; padding-left: 22px; max-height: 200px; overflow-y: auto; }
/* Header mag breder dan de pagina-inhoud, zodat het menu op brede schermen met tekst past */
.header-inner { max-width: 1760px; }
/* Organisatiekiezer blijft op elk scherm bruikbaar (alleen de statische scope-pill mag verdwijnen) */
.scope-pill.org-switch { display: inline-flex !important; }
@media (max-width: 680px) { .org-switch select { max-width: 120px; } .org-switch > svg { display: none; } }

/* ─── Pipeline: kolommen in-/uitklappen (per gebruiker) en alles dicht tijdens slepen ─────────────── */
.col-head { gap: 6px; }
.col-toggle { flex-shrink: 0; display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: none; border-radius: 6px; background: transparent; color: var(--text-faint); cursor: pointer; }
.col-toggle:hover { background: var(--bg-muted); color: var(--text-secondary); }
.col-title { min-width: 0; flex: 1; } .col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .col { transition: flex-basis .18s ease; }
.board .col.is-collapsed, .board.drag-all-collapsed .col { flex: 0 0 46px; min-height: 260px; padding: 8px 4px; cursor: pointer; overflow: hidden; }
.board .col.is-collapsed .kcard, .board .col.is-collapsed .col-sum, .board .col.is-collapsed .col-empty, .board .col.is-collapsed .col-kind,
.board.drag-all-collapsed .col .kcard, .board.drag-all-collapsed .col .col-sum, .board.drag-all-collapsed .col .col-empty, .board.drag-all-collapsed .col .col-kind { display: none; }
.board .col.is-collapsed .col-head, .board.drag-all-collapsed .col .col-head { flex-direction: column; align-items: center; padding: 2px 0; gap: 10px; height: 100%; }
.board .col.is-collapsed .col-title, .board.drag-all-collapsed .col .col-title { writing-mode: vertical-rl; transform: rotate(180deg); flex: 0 0 auto; gap: 8px; white-space: nowrap; }
.board .col.is-collapsed .col-name, .board.drag-all-collapsed .col .col-name { overflow: visible; }
.board .col.is-collapsed .col-count, .board.drag-all-collapsed .col .col-count { order: -1; }
.board .col.is-collapsed .col-toggle { order: -2; }
.board.drag-all-collapsed .col-toggle { display: none; }
/* Tijdens slepen: hoge, duidelijke dropzones die allemaal in beeld passen */
.board.drag-all-collapsed { overflow-x: visible; }
.board.drag-all-collapsed .col { flex: 1 1 46px; min-width: 40px; min-height: 62vh; }
.board.drag-all-collapsed .col.drag-over { background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface)); }
.board.drag-all-collapsed .col .kcard.dragging { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.board.drag-all-collapsed .col { position: relative; }
.aud-rights { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.aud-rights legend { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); padding: 0 4px; }
.aud-rights .aud-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; }
.route-handler { font-size: 11.5px; color: var(--text-secondary); margin-top: 6px; min-height: 1em; }
.kcard-fee { color: var(--text-muted); }
.board.drag-all-collapsed .col, .board.drag-all-collapsed .col.is-collapsed { flex: 1 1 0; min-width: 40px; }

/* ─── Ingeklapte kolom: zo smal mogelijk, met openklap-icoon bovenaan (v0.15.1) ─── */
.col-toggle .ic-expand { display: none; }
.col.is-collapsed .col-toggle .ic-collapse { display: none; }
.col.is-collapsed .col-toggle .ic-expand { display: block; }
.board .col.is-collapsed { flex: 0 0 30px; min-width: 30px; padding: 6px 0; border-radius: 10px; }
.board .col.is-collapsed .col-head { padding: 0; gap: 8px; }
.board .col.is-collapsed .col-toggle { width: 24px; height: 24px; color: var(--brand-primary); background: var(--bg-card, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.board .col.is-collapsed .col-count { padding: 1px 5px; font-size: 10px; }
.board .col.is-collapsed .col-title { font-size: 10.5px; letter-spacing: .05em; }
.board .col.is-collapsed .col-dot { width: 7px; height: 7px; }
.board .col.is-collapsed:hover { background: var(--bg-muted); }
.board .col:not(.is-collapsed) .col-toggle { opacity: .55; }
.board .col:not(.is-collapsed):hover .col-toggle, .board .col .col-toggle:focus-visible { opacity: 1; }

/* ═══ Campagnes en nieuwsbrieven (v0.16) ════════════════════════════════════ */
.page-wide { max-width: 1560px; }
.cstatus { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.cstatus .badge-dot { background: var(--c); }
h2 .cstatus { font-family: Inter, Helvetica, sans-serif; margin-left: 6px; }
.campaign-table { width: 100%; border-collapse: collapse; }
.campaign-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.campaign-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); vertical-align: top; font-size: 13px; }
.campaign-table tr:last-child td { border-bottom: 0; }
.campaign-table tbody tr { cursor: pointer; transition: background var(--transition); }
.campaign-table tbody tr:hover { background: var(--bg-card-hover); }
.campaign-table .td-name a { font-weight: 600; color: var(--text); text-decoration: none; }
.campaign-table .td-sub .label-swatch { width: 8px; height: 8px; display: inline-block; border-radius: 2px; margin-right: 4px; }
.campaign-table .td-num, .rcpt-table .td-num, .link-table .td-num { text-align: right; white-space: nowrap; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tpl-tile { display: flex !important; flex-direction: column; gap: 4px; padding: 10px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all var(--transition); }
.tpl-tile:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.tpl-tile input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-tile b { font-size: 13px; }
.tpl-tile small { font-size: 11.5px; color: var(--text-muted); font-weight: 400; line-height: 1.4; }
.tpl-thumb { display: flex; flex-direction: column; gap: 4px; height: 70px; background: var(--bg-surface); border-radius: 6px; padding: 8px; margin-bottom: 4px; }
.tpl-thumb i { display: block; height: 6px; border-radius: 3px; background: var(--border); }
.tpl-thumb i:first-child { height: 10px; width: 70%; background: var(--brand-primary); opacity: .7; }
.tpl-nieuwsbrief i:nth-child(3) { height: 14px; } .tpl-nieuwsbrief i:nth-child(4) { width: 40%; height: 9px; background: var(--brand-dark); opacity: .6; }
.tpl-actie i:nth-child(3) { width: 45%; height: 12px; background: var(--brand-dark); opacity: .6; } .tpl-actie i:nth-child(4) { display: none; }
.tpl-persoonlijk i:first-child { background: var(--border); width: 40%; height: 6px; } .tpl-persoonlijk i { width: 90%; }
.tpl-leeg i { display: none; }
.brand-tabs { margin-bottom: 14px; }
.brand-tabs .org-tab { font-family: inherit; cursor: pointer; }
.img-field { display: flex; gap: 6px; align-items: flex-end; }
.img-field > label, .img-field > input { flex: 1; }

.camp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); gap: 20px; align-items: start; }
.camp-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.camp-side { position: sticky; top: 76px; }
.camp-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.camp-step-head h3 { font-size: 15px; margin: 0; flex: 1; }
.camp-num { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.seg-count { font-size: 13px; background: var(--brand-primary-light); color: var(--brand-primary); padding: 4px 10px; border-radius: 999px; }
.seg-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; margin-bottom: 10px; }
.seg-lbl { font-size: 12px; font-weight: 600; color: var(--text-secondary); padding-top: 5px; }
.seg-lbl small { display: block; font-weight: 400; color: var(--text-faint); font-size: 10.5px; }
.seg label[hidden] { display: none; }
.seg input:checked + .chip { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.seg input:focus-visible + .chip { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.seg .chip { display: inline-flex; align-items: center; gap: 5px; }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.seg-more { margin: 4px 0 12px; }
.seg-more summary { font-size: 12px; color: var(--text-muted); cursor: pointer; margin-bottom: 10px; display: inline-flex; gap: 5px; align-items: center; }
.consent-pick { border: 0; margin: 6px 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.consent-pick legend { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.consent-opt { display: flex; gap: 8px; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px; }
.consent-opt:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.consent-opt span { display: flex; flex-direction: column; gap: 2px; }
.consent-opt small { color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.seg-sum { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; padding: 10px 12px; background: var(--bg-surface); border-radius: var(--radius-sm); }
.seg-sum .muted { color: var(--text-muted); }
.seg-sum-total { margin-left: auto; color: var(--brand-dark); }

.block-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.block { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.block:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-light); }
.block-head { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px 5px 12px; background: var(--bg-surface); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.block:not(:has(.block-body)) .block-head { border-radius: var(--radius-sm); }
.block-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.block-tools { display: flex; gap: 2px; }
.block-tools .icon-btn { width: 26px; height: 26px; font-size: 14px; line-height: 1; }
.block-body { padding: 10px 12px; }
.block-body textarea { font-family: inherit; line-height: 1.5; }
.block-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.small-link { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.send-test { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.send-test .hint { margin: 0; }
.confirm-check { margin-bottom: 10px; }
.send-when { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 8px; }
.when-at { display: inline-flex; gap: 6px; }
.when-at[hidden] { display: none; }
.when-at input { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-xs); }
.camp-foot { justify-content: flex-end; }

.preview-card { overflow: hidden; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border-light); font-size: 12.5px; font-weight: 600; }
.preview-bar > span { display: inline-flex; gap: 6px; align-items: center; }
.preview-size .chip { padding: 4px 8px; }
.inbox-mock { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); font-size: 12.5px; background: var(--bg-card-hover); }
.inbox-mock .avatar { color: #fff; flex-shrink: 0; }
.inbox-mock-line { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.inbox-mock-line em { font-style: normal; color: var(--text-muted); }
.preview-frame { background: #eee; display: flex; justify-content: center; max-height: calc(100vh - 260px); overflow: auto; }
/* pointer-events uit: het scrollwiel gaat altijd naar het voorbeeldvak en daarna naar de pagina, nooit naar het iframe zelf. */
.preview-frame iframe { width: 100%; min-height: 520px; border: 0; background: #fff; transition: width .2s ease; display: block; pointer-events: none; }
.preview-frame.is-mobile iframe { width: 375px; }
.sent-content .preview-frame { max-height: 720px; margin-top: 12px; border-radius: var(--radius-sm); }
.sent-content .preview-frame iframe { min-height: 400px; }
.sent-content summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.preview-note { padding: 8px 14px; margin: 0; }

.send-progress { margin-bottom: 16px; font-size: 13px; }
.progress { height: 8px; background: var(--bg-surface); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand-gradient-warm); border-radius: 999px; transition: width .4s ease; }
.camp-results { margin: 16px 0; }
.link-table, .rcpt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.link-table td, .rcpt-table td, .rcpt-table th { padding: 8px 6px; border-bottom: 1px solid var(--border-light); }
.rcpt-table th { text-align: left; font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.link-url { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcpt-table .td-name a { font-weight: 600; color: var(--text); text-decoration: none; }
.followup-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: var(--green-light); border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 12px; }
.sent-content { margin-top: 16px; }

.fnode-stats { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 10.5px; color: var(--green); margin-top: 3px; }
.include-existing { margin: -2px 0 8px; }
.match-count b { color: var(--brand-dark); }
.opt-check-field { align-self: end; padding-bottom: 8px; }
.consent-yes { color: var(--green); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.consent-no { color: var(--pink); display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.lead-mailings .lm-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-light); font-size: 12.5px; }
.lead-mailings .lm-row:last-child { border-bottom: 0; }
.lm-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-surface); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lm-ic.is-open { background: var(--blue-light); color: var(--blue); }
.lm-ic.is-click { background: var(--green-light); color: var(--green); }
.tl-campaign .tl-dot { border-color: var(--purple); }
.tl-campaign .tl-dot svg { color: var(--purple); }

@media (max-width: 1100px) {
    .camp-layout { grid-template-columns: 1fr; }
    .camp-side { position: static; }
    .camp-side .preview-frame { max-height: none; }
    .consent-pick { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .seg-row { grid-template-columns: 1fr; gap: 4px; }
    .campaign-table th:nth-child(n+4), .campaign-table td:nth-child(n+4) { display: none; }
}

/* Klanten (v0.18) */
.client-switch { background: rgba(255,255,255,.18); }
.client-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.client-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.client-row input[name=name] { flex: 1; min-width: 140px; font: inherit; padding: 6px 9px; border: 1px solid var(--border); border-radius: var(--radius-xs); }
.client-row input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.client-new { border-top: 1px solid var(--border-light); padding-top: 14px; }
.client-new h4 { margin: 0 0 10px; font-size: 14px; }

/* Mailbox doorzoeken + WhatsApp (v0.19) */
.mailbox-search { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.mailbox-search .search-field { flex: 1; min-width: 200px; }
.wa-panel .hint { margin: 0; }
.wa-modal { max-width: 760px; }
.wa-modal.is-busy { opacity: .6; pointer-events: none; }
.wa-drop { display: block; border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; cursor: pointer; transition: all var(--transition); margin-bottom: 14px; }
.wa-drop:hover { border-color: #25D366; background: rgba(37,211,102,.06); }
.wa-drop input { position: absolute; opacity: 0; pointer-events: none; }
.wa-drop span { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-secondary); }
.wa-drop small { color: var(--text-muted); }
.wa-howto { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-secondary); background: var(--bg-surface); border-radius: var(--radius-sm); padding: 10px 12px; }
.wa-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.wa-tools .search-field { flex: 1; min-width: 180px; }
.wa-list { max-height: 52vh; overflow: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: #efeae2; padding: 6px 8px; margin-bottom: 12px; }
.wa-day { position: sticky; top: -6px; z-index: 1; text-align: center; margin: 8px 0 4px; }
.wa-day label { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 600; background: #fff; border-radius: 999px; padding: 3px 10px; box-shadow: var(--shadow-sm); cursor: pointer; color: var(--text-secondary); }
.wa-msg { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; margin: 3px 0; background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.45; border: 1.5px solid transparent; user-select: none; }
.wa-msg.on { border-color: #25D366; background: #e7fbe9; }
.wa-msg.is-system { background: transparent; color: var(--text-muted); font-size: 12px; }
.wa-msg input { margin-top: 3px; pointer-events: none; }
.wa-time { font-size: 11px; color: var(--text-muted); padding-top: 2px; min-width: 34px; }
.wa-body b { display: block; font-size: 12px; color: #128C7E; }
.wa-count { margin-right: auto; font-size: 12.5px; color: var(--text-muted); }
.tl-whatsapp .tl-dot { border-color: #25D366; }
.tl-whatsapp .tl-dot svg { color: #25D366; }

/* Mailbox laten koppelen (v0.20) */
.invite-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; border: 1.5px solid var(--brand-primary); background: var(--brand-primary-light); }
.invite-banner > div { flex: 1; font-size: 13px; }
.invite-banner b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.inline-menu { display: inline-block; margin-left: 6px; }
.inline-menu > summary { list-style: none; cursor: pointer; font-size: 12px; }
.inline-menu > summary::-webkit-details-marker { display: none; }
@media (max-width: 640px) { .invite-banner { flex-direction: column; align-items: flex-start; } }
.pop-title { display: block; font-size: 13.5px; margin-bottom: 2px; }

/* Pop-ups in de gebruikerstabel niet afsnijden (v0.21.1) */
.table-card:has(.users-table) { overflow: visible; }
.users-table .inline-menu .row-pop { left: 0; right: auto; text-align: left; }
.users-table td { position: relative; }
.users-table .row-menu[open] { z-index: 70; }
@media (max-width: 760px) {
    .table-card:has(.users-table) { overflow-x: auto; }
    /* Op een smal scherm als vast paneel, zodat niets wegvalt */
    .row-pop { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; max-height: calc(100vh - 90px); overflow: auto; }
}
.mbx-modal { max-width: 520px; }
.mbx-modal .form-foot { justify-content: flex-end; }
.mbx-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.mbx-or::before, .mbx-or::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.mbx-open { font-size: 12px; margin-left: 6px; }

/* ─── E-mailhandtekening ─────────────────────────────────────────────────────── */
.sig-preview-label { font-size: 11.5px; color: var(--text-muted); margin: 6px 0 4px; }
.sig-preview { border: 1px solid var(--border-light); border-radius: 8px; padding: 12px 14px; background: #fff; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.55; color: #4a443c; }

/* ─── Flows: status, scope, triggers en uitsluitingen (v0.31) ────────────────── */
.b-test { background: var(--amber-light); color: #a15c07; }
.b-concept { background: var(--purple-light); color: var(--purple); }
.b-arch { background: var(--bg-muted); color: var(--text-faint); }
.state-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.state-bar .chip b { margin-left: 3px; }
.state-bar .chip-arch { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.state-legend { margin-bottom: 14px; font-size: 12.5px; color: var(--text-secondary); }
.state-legend > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; }
.state-legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 10px 0; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); align-items: center; }
.state-legend dd { margin: 0; line-height: 1.45; }
.flow-scope-line { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-muted); margin: 2px 0 6px; }
.flow-not { background: var(--red-light, #fdecec); color: #9b2c2c; margin-top: 4px; }
.fnode-not { color: #9b2c2c; }
.flow-card.is-arch { opacity: .75; }
.state-menu > summary { list-style: none; cursor: pointer; }
.state-menu > summary::-webkit-details-marker { display: none; }
.state-now { font-size: 12px; color: var(--text-secondary); line-height: 1.45; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.state-now span:last-child { display: block; margin-top: 4px; }
.state-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; font-family: inherit; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 9px; cursor: pointer; color: var(--text); }
.state-opt:hover { background: var(--bg-surface); border-color: var(--border-light); }
.state-opt b { display: block; font-size: 13px; }
.state-opt small { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; margin-top: 1px; }
.state-opt-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-surface); color: var(--text-secondary); flex: none; }
.flow-set > legend { display: inline-flex; align-items: center; gap: 6px; }
.flow-subhead { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin: 14px 0 6px; }
.form-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pick { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); margin-top: 4px; }
.pick-search { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-bottom: 1px solid var(--border-light); color: var(--text-faint); }
.pick-search input { border: 0 !important; padding: 2px 0 !important; background: transparent !important; box-shadow: none !important; font-size: 12.5px; width: 100%; outline: none; }
.pick-list { max-height: 148px; overflow: auto; padding: 5px 4px; }
.pick-item { display: flex !important; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; font-weight: 500 !important; font-size: 12.5px; cursor: pointer; }
.pick-item[hidden], .pick-item.off-aud { display: none !important; }
.pick-item:hover { background: var(--bg-surface); }
.pick-item input { width: auto !important; accent-color: var(--brand-primary); }
.pick-empty { display: block; padding: 6px 8px; font-size: 12px; color: var(--text-faint); }
.pick-empty[hidden] { display: none; }
.trig-search { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.trig-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.trig { display: flex !important; align-items: flex-start; gap: 9px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-card); }
.trig[hidden] { display: none !important; }
.trig input { position: absolute; opacity: 0; width: 0 !important; }
.trig.on { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.trig:focus-within { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.trig-ic { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; background: var(--bg-surface); color: var(--text-secondary); flex: none; }
.trig.on .trig-ic { background: var(--brand-primary); color: #fff; }
.trig-body b { display: block; font-size: 12.5px; }
.trig-body small { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-muted); line-height: 1.35; }
.trig-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.trig-when[hidden] { display: none; }
.trig-when > div { border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; line-height: 1.45; }
.trig-when b { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.trig-when ul { margin: 0; padding-left: 16px; }
.trig-when li { margin: 2px 0; }
.trig-yes { background: var(--green-light); color: #1d5c42; }
.trig-no { background: var(--red-light, #fdecec); color: #8a2a2a; }
.flow-exclude { border-color: rgba(190, 60, 60, .25); }
.match-box { margin: 4px 0 12px; }
.match-list > summary { cursor: pointer; font-size: 12px; color: var(--text-secondary); }
.match-list ul { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; }
.match-list li { padding: 3px 0; border-bottom: 1px solid var(--border-light); }
@media (max-width: 720px) { .trig-list, .trig-when { grid-template-columns: 1fr; } .state-bar .chip-arch { margin-left: 0; } }
.flow-set .form-row { align-items: end; }
.flow-set .form-row.row-top { align-items: start; }

/* ─── Visuele editor handtekening ────────────────────────────────────────────── */
.wys { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; margin-top: 4px; overflow: hidden; }
.wys:focus-within { border-color: var(--brand-primary); }
.wys-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; background: var(--bg-surface); border-bottom: 1px solid var(--border-light); }
.wys-bar button { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 6px; padding: 4px 9px; min-width: 28px; cursor: pointer; line-height: 1.3; }
.wys-bar button:hover { border-color: var(--border); color: var(--text); }
.wys-bar button b, .wys-bar button i { font-size: 13px; font-family: Georgia, serif; }
.wys-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.wys-msg { font-size: 11.5px; color: var(--text-muted); margin-left: auto; }
.wys-area { min-height: 130px; padding: 12px 14px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.55; color: #4a443c; font-weight: 400; outline: none; overflow-wrap: anywhere; cursor: text; }
.wys-area.is-empty::before { content: attr(data-placeholder); color: var(--text-faint); white-space: pre-wrap; pointer-events: none; }
.wys-area a { color: var(--brand-primary); text-decoration: underline; }
.wys-area font[color] a { color: inherit; }
.wys-area a.wys-btn, .bp-mail-sig a.wys-btn, .sig-preview a[data-btn] { display: inline-block; padding: 9px 18px; margin: 3px 0; border-radius: 8px; background: var(--wys-main, #022950); color: #fff !important; font-weight: 700; text-decoration: none; cursor: default; }
.wys-btn-ic { display: inline-block; width: 14px; height: 9px; border-radius: 3px; background: var(--wys-main, #022950); margin-right: 5px; vertical-align: middle; }
.wys-area font[size="2"], .wys-area small, .sig-preview small { font-size: 12px; line-height: 1.5; }
.wys-area font[size="3"] { font-size: 14px; }
.wys-bar button .wys-small { font-size: 10.5px; }
.wys-colors { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px; }
.wys-colors[hidden] { display: none; }
.wys-bar button.wys-color { width: 22px; min-width: 22px; height: 22px; padding: 0; border-radius: 6px; background: var(--c); border: 1px solid rgba(0, 0, 0, .18); }
.wys-bar button.wys-color:hover { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.wys-bar button.wys-color-none { background: linear-gradient(to top right, #fff 46%, #c0392b 46%, #c0392b 54%, #fff 54%); }

/* ─── Huisstijlpagina (?p=huisstijl): niveaus | formulier in secties | voorbeeldmail ─── */
.bp { display: grid; grid-template-columns: 210px minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.bp.bp-single { grid-template-columns: minmax(0, 1fr) 380px; }

.bp-nav { position: sticky; top: 84px; display: grid; gap: 4px; }
.bp-nav-title { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin: 2px 0 6px 10px; }
.bp-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid transparent; color: var(--text-secondary); }
.bp-nav-item.is-label { margin-left: 14px; }
.bp-nav-item:hover { background: var(--bg-card); border-color: var(--border-light); }
.bp-nav-item.on { background: var(--bg-card); border-color: var(--border); box-shadow: var(--shadow-sm); color: var(--text); }
.bp-nav-swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; border: 1px solid rgba(0, 0, 0, .12); }
.bp-nav-text { display: grid; min-width: 0; }
.bp-nav-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-nav-text small { font-size: 11px; color: var(--text-muted); }
.bp-nav-note { font-size: 11.5px; line-height: 1.45; color: var(--text-muted); margin: 10px 10px 0; }

.bp-form { gap: 14px; min-width: 0; }
.bp-title { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.bp-title-swatch { width: 38px; height: 38px; border-radius: 10px; flex: none; border: 1px solid rgba(0, 0, 0, .12); }
.bp-title h3 { font-size: 17px; font-weight: 700; line-height: 1.2; }
.bp-title span { font-size: 12.5px; color: var(--text-muted); }

.bp-sec { display: grid; gap: 12px; }
.bp-sec > header h3 { margin-bottom: 3px; font-size: 14px; }
.bp-sec > header p { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); max-width: 62ch; }
.bp-sec .form-row { align-items: start; }
.bp-sec label .lbl-hint { margin-left: 0; display: block; font-size: 11px; }
.bp-plain { display: block !important; }
.bp-inherit { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.bp-inherit > span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bp-inherit[hidden] { display: none; }
.bp-inherit svg { flex: none; }

.bp-colors { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.bp-tiles { display: contents; }
.bp-tile { position: relative; display: grid !important; gap: 2px !important; width: 104px; padding: 8px; border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--bg-card); text-align: left; font-family: inherit; cursor: pointer; }
.bp-tile:hover { border-color: var(--border); }
.bp-tile:focus-within { border-color: var(--brand-primary); }
.bp-tile input[type=color] { width: 100% !important; height: 54px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; margin-bottom: 5px; }
.bp-tile input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.bp-tile input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; }
.bp-tile input[type=color]::-moz-color-swatch { border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; }
.bp-tile-name { font-size: 12px; font-weight: 600; color: var(--text); }
.bp-tile code { font-size: 11px !important; background: none !important; padding: 0 !important; color: var(--text-muted); font-weight: 400; }
.bp-tile-main { border-color: var(--border); }
.bp-tile-add { border-style: dashed; border-color: var(--border); background: transparent; color: var(--text-secondary); }
.bp-tile-add[hidden] { display: none !important; }
.bp-tile-add:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.bp-tile-plus { display: flex; align-items: center; justify-content: center; height: 54px; margin-bottom: 5px; border-radius: 6px; background: var(--bg-surface); }
.bp-tile .brand-color-x { top: -7px; right: -7px; width: 20px; height: 20px; }

.bp-logo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.bp-logo-box { height: 96px; display: flex; align-items: center; justify-content: center; padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius); background: #fff; }
.bp-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bp-logo-box img[hidden], .bp-logo-none[hidden] { display: none; }
.bp-logo-none { font-size: 12px; color: var(--text-faint); }
.bp-logo-fields { display: grid; gap: 8px; }
.bp-logo-state { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.bp-logo-state:empty { display: none; }
.bp-sec .img-field { align-items: stretch; }

.bp-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 16px; margin-top: 2px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.bp-save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand-primary); font-weight: 600; margin-right: auto; }
.bp-save-state[hidden] { display: none; }

.bp-preview { position: sticky; top: 84px; }
.bp-preview-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.bp-preview-head small { font-weight: 400; color: var(--text-muted); font-size: 11.5px; }
.bp-mail { border-radius: var(--radius); border: 1px solid var(--border-light); padding: 18px 14px 14px; font-family: Helvetica, Arial, sans-serif; }
.bp-mail-card { background: #fff; border-radius: 12px; overflow: hidden; }
.bp-mail-top { display: flex; align-items: center; min-height: 62px; padding: 14px 22px; border-bottom: 4px solid transparent; font-size: 18px; font-weight: 800; color: #fff; }
.bp-mail-top img { height: 32px; width: auto; max-width: 100%; display: block; }
.bp-mail-top img[hidden], .bp-mail-top span[hidden] { display: none; }
.bp-mail-body { padding: 18px 22px 20px; font-size: 13.5px; line-height: 1.6; color: #2b2b2b; }
.bp-mail-body p { margin: 0 0 11px; }
.bp-mail-body a { text-decoration: underline; cursor: default; }
.bp-mail-btn { display: inline-block; padding: 10px 18px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; }
.bp-mail-sig { margin-top: 6px; font-size: 13px; line-height: 1.55; color: #4a443c; overflow-wrap: anywhere; }
.bp-mail-sig font[size="2"], .bp-mail-sig small { font-size: 11.5px; }
.bp-mail-sig img { max-width: 100%; height: auto; vertical-align: middle; }
.bp-mail-foot { display: grid; gap: 8px; padding: 14px 10px 2px; font-size: 11px; line-height: 1.5; color: #8a8076; text-align: center; }
.bp-mail-foot [hidden] { display: none; }

@media (max-width: 1180px) {
  .bp, .bp.bp-single { grid-template-columns: minmax(0, 1fr) 340px; }
  .bp-nav { grid-column: 1 / -1; position: static; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .bp-nav-title, .bp-nav-note { display: none; }
  .bp-nav-item, .bp-nav-item.is-label { margin: 0; background: var(--bg-card); border-color: var(--border-light); }
  .bp-nav-item.on { border-color: var(--brand-dark); }
}
@media (max-width: 860px) {
  .bp, .bp.bp-single { grid-template-columns: minmax(0, 1fr); }
  .bp-preview { position: static; order: 3; }
  .bp-logo { grid-template-columns: 1fr; }
  .bp-tile { width: calc(50% - 6px); }
  .bp-save { flex-wrap: wrap; }
}

.brand-color-x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.brand-color-x:hover { color: var(--text); border-color: var(--text-secondary); }
.brand-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); }
.wys-area img { max-width: 100%; height: auto; vertical-align: middle; cursor: pointer; border-radius: 2px; }
.wys-area img:hover { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.test-send { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.test-send[hidden] { display: none; }
.test-send select { width: auto; padding: 4px 8px; font-size: 12px; }
/* De testknop staat in de HTML na de hoofdknop, zodat Enter gewoon opslaat; op het scherm staat hij ervoor */
.form-foot .test-send, .form-foot button[name=then] { order: -1; }

/* ─── Formulieren: afspraakformulieren, vragenlijsten, inzendingen ───────────── */
.org-tab svg { flex: none; }
.b-live { background: var(--green-light); color: var(--green); }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fm-card { display: flex; flex-direction: column; gap: 8px; }
.fm-card.is-arch { opacity: .7; }
.fm-card-top { display: flex; align-items: center; gap: 7px; font-size: 12px; min-height: 22px; }
.fm-card-top .badge { margin-left: auto; }
.fm-card-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text); }
.fm-card-title:hover { color: var(--brand-primary); }
.fm-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.fm-meta { list-style: none; display: grid; gap: 4px; font-size: 12.5px; color: var(--text-secondary); }
.fm-meta li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.fm-meta svg { color: var(--text-faint); flex: none; }
.fm-req { font-size: 10.5px; color: var(--text-faint); margin-left: 4px; }
.fm-warn { color: #a15c07; font-weight: 600; }
.fm-stats { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); padding-top: 8px; margin-top: auto; border-top: 1px solid var(--border-light); }
.fm-stats b { color: var(--text); font-size: 13px; }
.fm-card-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-arch { margin-top: 16px; font-size: 12.5px; }
.fm-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fm-filter select { width: auto; min-width: 240px; padding: 8px 30px 8px 11px; font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background-color: var(--bg-card); color: var(--text); }
table.fm-table tbody tr { cursor: default; }
.fm-table td { vertical-align: top; }
.fm-answers { font-size: 12.5px; max-width: 360px; }
.fm-answers div { margin-bottom: 3px; overflow-wrap: anywhere; }
.fm-answers span { color: var(--text-muted); margin-right: 4px; }
.fm-row-actions { white-space: nowrap; text-align: right; }
.fm-edit { grid-template-columns: minmax(0, 1fr) 340px; }
.fm-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
.fm-hosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.fm-host { display: flex !important; align-items: center; gap: 10px !important; padding: 9px 11px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-card); }
.fm-host.on { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.fm-host input { width: auto !important; accent-color: var(--brand-primary); flex: none; }
.fm-host-text { display: grid; min-width: 0; flex: 1; }
.fm-host-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-host-text small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.fm-nocal { font-size: 11px; font-weight: 600; color: #a15c07; white-space: nowrap; }
.fm-days { display: grid; gap: 6px; }
.fm-day { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--bg-surface); min-height: 44px; }
.fm-day .opt-check { font-weight: 600; }
.fm-day-times { display: none; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; color: var(--text-muted); }
.fm-range { display: inline-flex; align-items: center; gap: 8px; }
.fm-range-x { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--border-light); border-radius: 50%; background: var(--bg-card); color: var(--text-muted); cursor: pointer; }
.fm-range-x:hover { color: var(--text); border-color: var(--border); }
.fm-range-x[hidden], .fm-range-add[hidden] { display: none; }
.fm-day { align-items: start !important; }
.fm-day > .opt-check { padding-top: 7px; }
.fm-day-off { padding-top: 7px; }
.fm-day-times input { width: 118px !important; }
.fm-day-off { font-size: 12.5px; color: var(--text-faint); }
.fm-day.on { background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--border-light); }
.fm-day.on .fm-day-times { display: flex; }
.fm-day.on .fm-day-off { display: none; }
.fm-row-4 { grid-template-columns: repeat(4, 1fr); }
.fm-phone { align-self: end; padding-bottom: 9px; }
.fm-questions { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 4px 12px 8px; }
.fm-questions-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.fm-question { display: flex !important; align-items: center; gap: 9px !important; padding: 6px 0; font-weight: 500 !important; font-size: 13px !important; cursor: pointer; }
.fm-question input { width: auto !important; accent-color: var(--brand-primary); flex: none; }
.fm-question span { flex: 1; min-width: 0; }
.fm-question small { font-size: 11px; font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.fm-side { display: grid; gap: 14px; }
.fm-side .card h3 { margin-bottom: 8px; }
.fm-side-text { font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 10px; }
.fm-side-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-delete { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.fm-link { display: flex; gap: 6px; margin-bottom: 8px; }
.fm-link input { flex: 1; min-width: 0; font-size: 12px; }
.fm-preview-btn { margin-bottom: 10px; }
.fm-flow-group { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin: 10px 0 6px; }
.fm-flows { list-style: none; display: grid; gap: 8px; margin-bottom: 10px; }
.fm-flows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.fm-flow-name { font-size: 13px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.fm-flow-name:hover { color: var(--brand-primary); }
.fm-flows small { grid-column: 1 / -1; font-size: 11.5px; line-height: 1.4; color: var(--text-muted); }
.fm-flow-how { display: flex; gap: 6px; }
.fm-flow-how svg { flex: none; margin-top: 3px; }
.fm-used { list-style: none; display: grid; gap: 4px; font-size: 13px; margin-bottom: 8px; }

.q-list { display: grid; gap: 10px; }
.q-card { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--bg-card-hover); }
.q-head { display: flex; align-items: center; gap: 10px; }
.q-nr { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.q-head select { width: auto !important; min-width: 190px; font-weight: 600; }
.q-tools { margin-left: auto; display: inline-flex; gap: 4px; }
.q-tools button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--border-light); border-radius: 7px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.q-tools button:hover:not(:disabled) { border-color: var(--border); color: var(--text); }
.q-tools button:disabled { opacity: .35; cursor: default; }
.q-opts { display: flex; flex-wrap: wrap; gap: 18px; }
.q-cond { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg-surface); }
.q-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--text-muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.q-add { position: relative; justify-self: start; }
.q-add > summary { list-style: none; cursor: pointer; }
.q-add > summary::-webkit-details-marker { display: none; }
.q-add-menu { position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 380px; max-width: 86vw; padding: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.q-add-menu button { text-align: left; font-family: inherit; font-size: 12.5px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; }
.q-add-menu button:hover { background: var(--bg-surface); }
.q-preview { display: grid; gap: 10px; font-size: 12.5px; }
.q-pv { display: grid; gap: 4px; }
.q-pv > span { font-weight: 600; }
.q-pv i { color: #b3261e; font-style: normal; }
.q-pv input:not([type=radio]):not([type=checkbox]), .q-pv select, .q-pv textarea { width: 100%; font: inherit; font-size: 12px; padding: 7px 9px; background: var(--bg-card-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); appearance: none; resize: none; }
.q-pv small { font-size: 11px; color: var(--text-muted); }
.q-pv.is-cond { padding-left: 10px; border-left: 2px solid var(--border); }
.q-pv-opt { display: flex; align-items: center; gap: 6px; }
.q-pv-scale { display: flex; flex-wrap: wrap; gap: 3px; }
.q-pv-scale b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--border-light); border-radius: 5px; font-size: 11px; font-weight: 500; }
.q-preview h4 { font-size: 13px; margin-top: 4px; }
@media (max-width: 1180px) { .fm-edit { grid-template-columns: minmax(0, 1fr); } .fm-side { position: static; } .fm-row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .fm-day { grid-template-columns: 1fr; gap: 4px; } .q-cond { grid-template-columns: 1fr; } .q-head { flex-wrap: wrap; } }

/* Formulieren: soort kiezen bij toevoegen */
.fm-types { display: grid; gap: 10px; }
.fm-type-pick { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-card); transition: border-color var(--transition), background var(--transition); }
.fm-type-pick:hover { border-color: var(--brand-primary); background: var(--bg-card-hover); }
.fm-type-ic { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-primary-light); color: var(--brand-primary); flex: none; }
.fm-type-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.fm-type-text b { font-size: 14px; }
.fm-type-text small { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.fm-type-go { color: var(--text-faint); }
.fm-meta .fm-type { font-weight: 600; color: var(--text); }

/* Profiel: meerdere agenda's */
.cal-row { margin-top: 10px; align-items: center; }
.cal-row-text { flex: 1; min-width: 0; }
.cal-row .g-logo svg { color: var(--text-muted); }
.cal-add { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-light); display: grid; gap: 12px; }
.cal-add h4 { font-size: 13px; }
.cal-add .mailbox-actions { align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-ical { display: grid; gap: 10px; }
.cal-ical .btn { justify-self: start; }
.cal-help > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--brand-primary); }
.cal-help ul { margin: 10px 0 10px 18px; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.cal-or { font-size: 12px; color: var(--text-faint); margin: -2px 0; }

/* Editor: venster voor link en knop */
.wys-link-modal { z-index: 300; }
.wys-link-modal .modal { max-width: 520px; }
.wl-kind { display: grid; gap: 6px; }
.wl-kind-lbl { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.wl-err { font-size: 12.5px; color: var(--red); font-weight: 600; }
.wys-area a { cursor: pointer; }

/* Vragenlijst: taal die je bewerkt */
.q-langbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.q-langbar-lbl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.q-langbar button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 0 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.q-langbar button.on { color: var(--brand-dark); border-bottom-color: var(--brand-primary); }
.q-langbar .msg-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--border); }
.q-langbar .msg-dot.is-on { background: var(--green); border-color: var(--green); }
.q-card-tr .q-head { gap: 10px; }
.q-tr-type { font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.q-tr-src { font-size: 12.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
