:root {
  /* Overgenomen uit de oude ActioMailer-huisstijl (licht thema) */
  --bg: hsl(210 40% 96%);
  --panel: #ffffff;
  --panel-2: hsl(210 40% 98%);
  --line: hsl(214 32% 91%);
  --text: hsl(215 25% 27%);
  --muted: hsl(215 16% 47%);
  --primary: hsl(28 95% 53%);        /* oranje - CTA/accent */
  --primary-hover: hsl(28 95% 47%);
  --primary-fg: #ffffff;
  --accent-soft: hsl(28 100% 96%);   /* lichte oranje achtergrond */
  --accent-strong: hsl(28 95% 40%);
  --brand: #a55d34;                  /* bruin - branding */
  --success: hsl(84 60% 40%);
  --danger: hsl(0 84% 60%);
  --danger-hover: hsl(0 74% 52%);
  --radius: 0.75rem;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Topbar ---------- */
.topbar { background: linear-gradient(100deg, #8a4e28 0%, #a5623a 55%, #b56f3f 100%); box-shadow: 0 1px 6px rgba(16,24,40,.12); position: sticky; top: 0; z-index: 40; }
.topbar-inner { max-width: 1360px; margin: 0 auto; display: flex; align-items: center; gap: 1.25rem; padding: 0 1.5rem; height: 56px; }
.logo { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.3px; white-space: nowrap; display: flex; align-items: center; gap: .5rem; }
.logo:hover { text-decoration: none; }
.logo-ic { background: rgba(255,255,255,.18); border-radius: 8px; width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 1rem; }
.topnav { display: flex; align-items: center; gap: .15rem; flex: 1; flex-wrap: wrap; }
.topnav a { color: rgba(255,255,255,.82); padding: .45rem .8rem; border-radius: 8px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.topnav a:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.topnav a.active { color: #fff; background: rgba(255,255,255,.2); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.btn-new { background: #16a34a; color: #fff; padding: .5rem .9rem; border-radius: 8px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.btn-new:hover { background: #15913f; text-decoration: none; color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; }
.avatar:hover { text-decoration: none; }
.topout { color: rgba(255,255,255,.85); font-size: 1.1rem; }
.topout:hover { color: #fff; text-decoration: none; }
.nav-ic { font-size: .95em; margin-right: .05rem; }
.topnav a { display: inline-flex; align-items: center; gap: .35rem; }
/* avatar-uitklap (instellingen + uitloggen) */
.usermenu { position: relative; }
.usermenu .avatar { border: none; padding: 0; }
.usermenu-drop { position: absolute; right: 0; top: 46px; min-width: 190px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 26px rgba(16,24,40,.16); padding: .4rem; display: none; z-index: 60; }
.usermenu.open .usermenu-drop { display: block; }
.usermenu-drop a { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 8px; color: var(--text); font-size: .92rem; font-weight: 500; }
.usermenu-drop a:hover { background: var(--bg); text-decoration: none; }
.usermenu-drop a.danger { color: var(--danger); }
.usermenu-drop a.danger:hover { background: hsl(0 90% 96%); }

.page { padding: 2rem 1.5rem 3rem; }
.page-inner { max-width: 1360px; margin: 0 auto; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; }
.page-head h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.4px; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card.no-pad { padding: 0; overflow: hidden; }
.card h2 { margin: 0 0 .8rem; font-size: 1.05rem; font-weight: 650; }
.card.empty { text-align: center; padding: 2.5rem; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.stat-num { font-size: 1.9rem; font-weight: 700; letter-spacing: -.5px; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.stat-ic { font-size: 1.05rem; opacity: .8; }
.stat-badge { font-size: .7rem; font-weight: 700; color: var(--brand); background: rgba(165,93,52,.12); padding: .15rem .5rem; border-radius: 999px; }
.stat.c-blue { background: #eff6ff; border-color: #dbeafe; }
.stat.c-green { background: #f0fdf4; border-color: #dcfce7; }
.stat.c-purple { background: #faf5ff; border-color: #f0e2ff; }
.stat.c-red { background: #fef2f2; border-color: #fee2e2; }
.stat.c-orange { background: #fff7ed; border-color: #ffedd5; }
.sec-label { font-size: 1.05rem; font-weight: 700; margin: .5rem 0 .75rem; }
.stat.c-blue .stat-num { color: #2563eb; }
.stat.c-green .stat-num { color: #16a34a; }
.stat.c-purple .stat-num { color: #9333ea; }
.stat.c-red .stat-num { color: #dc2626; }
.linkstat { display: block; text-decoration: none; color: var(--text); transition: border-color .12s; }
.linkstat:hover { border-color: var(--primary); text-decoration: none; }

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line); }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; background: var(--panel-2); }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--accent-soft); }

/* ---------- Tags ---------- */
.tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.tag-branded { background: hsl(214 95% 93%); color: hsl(214 80% 40%); }
.tag-affiliate { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Buttons ---------- */
.btn, button { background: var(--primary); color: var(--primary-fg); border: none; border-radius: 8px; padding: .55rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; font-family: inherit; transition: background .12s; }
.btn:hover, button:hover { background: var(--primary-hover); text-decoration: none; color: var(--primary-fg); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }

/* ---------- Forms ---------- */
.form-section { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: none; }
.form-section h2 { font-size: 1rem; }
label { display: block; margin-bottom: .9rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: .55rem .7rem; font-size: .95rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; }
/* inline checkbox-labels + knopvarianten */
.checks { display: flex; flex-direction: column; gap: .5rem; justify-content: center; }
label.inline { display: flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--text); font-weight: 500; margin-bottom: 0; }
label.inline input { display: inline-block; width: auto; margin: 0; }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- Alerts ---------- */
.alert { background: hsl(0 90% 96%); border: 1px solid hsl(0 84% 85%); color: hsl(0 70% 40%); padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--bg); }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 2.25rem 2.5rem; width: 360px; box-shadow: 0 10px 40px rgba(16,24,40,.12); }
.brand-lg { font-size: 1.7rem; padding: 0; text-align: center; color: var(--brand); }
.login-card .muted { text-align: center; margin: .2rem 0 1.4rem; }
.login-card button { width: 100%; margin-top: .4rem; padding: .65rem; }

/* ---------- Flash ---------- */
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .9rem; }
.flash-ok { background: hsl(84 60% 94%); border: 1px solid hsl(84 50% 78%); color: hsl(84 60% 28%); }
.flash-error { background: hsl(0 90% 96%); border: 1px solid hsl(0 84% 85%); color: hsl(0 70% 42%); }

/* ---------- Pills (status) ---------- */
.pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.pill-active, .pill-sent { background: hsl(84 60% 92%); color: hsl(84 60% 28%); }
.pill-unsubscribed, .pill-draft { background: hsl(214 32% 93%); color: var(--muted); }
.pill-bounced, .pill-sending, .pill-scheduled { background: var(--accent-soft); color: var(--accent-strong); }
.pill-complained, .pill-failed, .pill-cancelled { background: hsl(0 90% 95%); color: hsl(0 70% 45%); }
.pill-pending, .pill-inactive { background: hsl(214 32% 93%); color: var(--muted); }
.pill-suspicious { background: #fef3c7; color: #b45309; }

/* ---------- Head actions / filter / inline forms ---------- */
.head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.filterbar { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filterbar input[type=search] { flex: 1; min-width: 180px; margin: 0; }
.filterbar select { width: auto; margin: 0; }
.filterbar button { margin: 0; }
.inline-form { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.inline-form input { margin: 0; flex: 1; min-width: 120px; }
.inline-form button { margin: 0; }
.add-inline summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }

/* ---------- Danger ---------- */
.danger-zone { display: flex; gap: .8rem; align-items: center; }

/* ---------- Wizard / mapping / preview ---------- */
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; align-items: center; }
.map-grid .col-name { font-family: ui-monospace, monospace; color: var(--muted); }
.preview-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
code { background: var(--bg); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }
.codeblock { background: #1e232b; color: #e6edf3; padding: .9rem 1rem; border-radius: 8px; overflow-x: auto; font-size: .82rem; line-height: 1.5; margin: .3rem 0 .6rem; }
.checkline { display: flex; align-items: center; gap: .5rem; }
.checkline input { width: auto; margin: 0; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* ---------- Settings hub ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.hub-item { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); }
.hub-item:hover { border-color: var(--primary); background: var(--accent-soft); text-decoration: none; }

/* ---------- Sidebar sections ---------- */
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: .9rem .9rem .25rem; font-weight: 700; opacity: .8; }

/* ---------- WYSIWYG-editor ---------- */
.wz-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: .35rem; }
.wz-toolbar { display: flex; flex-wrap: wrap; gap: .2rem; padding: .4rem; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.wz-btn { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: .3rem .55rem; font-size: .85rem; cursor: pointer; line-height: 1; }
.wz-btn:hover { background: var(--accent-soft); border-color: var(--primary); }
.wz-edit { min-height: 260px; padding: .9rem 1rem; background: #fff; color: #1a2b33; overflow: auto; }
.wz-edit:focus { outline: none; }
.wz-edit img { max-width: 100%; }

/* ---------- Materiaal-/insert-chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; cursor: pointer; color: var(--text); }
.chip:hover { background: var(--accent-soft); border-color: var(--primary); }
.offer-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.offer-row:last-child { border-bottom: none; }

/* ---------- Wizard-stappen ---------- */
.wsteps { display: flex; align-items: center; margin-bottom: 1.5rem; }
.wstep { display: flex; align-items: center; gap: .55rem; }
.wcirc { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line); color: var(--muted); font-weight: 700; }
.wstep.done .wcirc, .wstep.active .wcirc { background: var(--primary); border-color: var(--primary); color: #fff; }
.wlabel { font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.wstep.active .wlabel, .wstep.done .wlabel { color: var(--text); }
.wline { flex: 1; height: 2px; background: var(--line); margin: 0 .75rem; min-width: 24px; }
.wline.done { background: var(--primary); }
.begin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.begin-card { display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 100%; font: inherit; color: var(--text); border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; background: var(--panel); }
.begin-card:hover, .begin-card.sel { border-color: var(--primary); background: var(--accent-soft); text-decoration: none; }
.begin-card .bic { font-size: 1.6rem; }
.begin-card h3 { margin: .6rem 0 .3rem; font-size: 1.05rem; }

/* wizard-acties + samenvatting */
.wiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.wiz-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: .5rem 0 1.2rem; }
.wiz-summary > div { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1rem; background: var(--panel-2); border-radius: 10px; border: 1px solid var(--line); }

/* ---------- E-mail sub-nav ---------- */
.subnav { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.subnav a { padding: .5rem .95rem; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Calendar ---------- */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: .5rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; text-align: left; }
.cal td { border: 1px solid var(--line); vertical-align: top; height: 96px; padding: .4rem; width: 14.28%; }
.cal td.other { background: var(--panel-2); }
.cal td.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal .daynum { font-size: .8rem; color: var(--muted); font-weight: 600; }
.cal .ev { display: block; font-size: .74rem; padding: .12rem .35rem; border-radius: 5px; margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-draft { background: hsl(214 32% 93%); color: #475569; }
.ev-scheduled { background: var(--accent-soft); color: var(--accent-strong); }
.ev-sending { background: #dbeafe; color: #1d4ed8; }
.ev-sent { background: #dcfce7; color: #15803d; }
.ev-cancelled, .ev-paused { background: #fee2e2; color: #b91c1c; }

/* ---------- Tabbar (per-mailbestand) ---------- */
.tabbar { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabbar a { padding: .6rem .95rem; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar a:hover { color: var(--text); text-decoration: none; }
.tabbar a.active { color: var(--accent-strong); border-bottom-color: var(--primary); }

/* ---------- Charts ---------- */
.chart-card svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

@media (max-width: 860px) {
  .topbar-inner { gap: .6rem; padding: 0 .75rem; }
  .logo span:not(.logo-ic) { display: none; }
  .topnav a { padding: .45rem .55rem; font-size: .88rem; }
  .btn-new { padding: .45rem .6rem; }
  .page { padding: 1.25rem 1rem 2rem; }
  .two-col { grid-template-columns: 1fr; }
}

/* ============================================================
   Leden-detailpagina (member detail)
   ============================================================ */
.member-back { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1rem; color: var(--muted); font-weight: 600; }
.member-back:hover { color: var(--text); text-decoration: none; }

.member-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.member-hero .who { display: flex; align-items: center; gap: 1rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex: 0 0 auto; }
.avatar-lg svg { width: 28px; height: 28px; }
.member-hero .name { font-size: 1.5rem; font-weight: 700; letter-spacing: -.4px; margin: 0 0 .15rem; }
.member-hero .mail { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .9rem; }
.member-hero .mail svg { width: 15px; height: 15px; }
.member-hero .actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pill-lg { padding: .32rem .8rem; font-size: .82rem; }
.btn-inline { display: inline-flex; align-items: center; gap: .4rem; }
.btn-inline svg { width: 16px; height: 16px; }

/* stat-icoon-kleuren + oranje-nummer + sublabel */
.stat-ic svg { width: 20px; height: 20px; }
.stat.c-blue .stat-ic { color: #2563eb; }
.stat.c-green .stat-ic { color: #16a34a; }
.stat.c-orange .stat-ic { color: #ea7317; }
.stat.c-red .stat-ic { color: #dc2626; }
.stat.c-orange .stat-num { color: #ea7317; }
.stat-sub { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.card-sub { color: var(--muted); font-size: .85rem; margin: -.4rem 0 1.1rem; }

/* tabs (client-side) */
.tabbar a { cursor: pointer; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* opt-in-sub-kaartjes */
.optin-card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: .9rem; background: var(--panel-2); }
.optin-card:last-child { margin-bottom: 0; }
.optin-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.optin-head .lbls { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pill-list { background: hsl(214 95% 93%); color: hsl(214 80% 40%); }
.optin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem 1rem; }
.optin-grid .f-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; margin-bottom: .1rem; }
.optin-grid .f-val { font-size: .9rem; word-break: break-word; }

/* mini-kaarten (modal + omzet-tab) */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: .25rem 0 1.25rem; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; background: var(--panel-2); }
.mini .m-num { font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px; }
.mini .m-lbl { color: var(--muted); font-size: .78rem; }
.mini.c-green .m-num { color: #16a34a; }
.mini.c-blue .m-num { color: #2563eb; }

/* tabelcel met icoontje + getal, klikbaar onderwerp, lege staat */
.cell-ic { display: inline-flex; align-items: center; gap: .35rem; }
.cell-ic svg { width: 15px; height: 15px; opacity: .65; }
.subject-link { background: none; border: none; padding: 0; margin: 0; font: inherit; font-weight: 600; color: var(--accent-strong); cursor: pointer; text-align: left; }
.subject-link:hover { text-decoration: underline; background: none; color: var(--accent-strong); }
.empty-row { padding: 2.25rem 1.5rem; text-align: center; color: var(--muted); }

/* modal (e-maildetail) */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.5); display: none; align-items: flex-start; justify-content: center; padding: 3rem 1rem; z-index: 60; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal-box { position: relative; background: var(--panel); border-radius: 14px; width: 100%; max-width: 660px; box-shadow: 0 20px 60px rgba(16,24,40,.28); }
.modal-close { position: absolute; top: .9rem; right: 1.1rem; background: none; border: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; }
.modal-close:hover { background: none; color: var(--text); }
.modal-inner { padding: 1.4rem 1.6rem; }
.modal-inner h3 { margin: 0 0 .35rem; font-size: 1.1rem; padding-right: 1.5rem; }
.modal-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.ev-h { font-weight: 650; font-size: .92rem; margin: 1.1rem 0 .3rem; }
.ev-line { display: grid; grid-template-columns: 150px 130px 1fr; gap: .4rem 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; align-items: baseline; }
.ev-line:last-child { border-bottom: none; }
.ev-line .ua { color: var(--muted); word-break: break-word; }
.ev-empty { color: var(--muted); font-size: .85rem; padding: .4rem 0; }

/* re:publish-import (nieuwsbrief-wizard) */
.imp-sync { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .9rem; margin-bottom: 1rem; }
.imp-sync form { margin: 0; }
.checklist { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; }
.checklist .checkline { padding: .3rem .1rem; }
.checklist .checkline:hover { background: var(--accent-soft); border-radius: 6px; }
.split-ind { display: flex; align-items: center; gap: .5rem; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--primary); border-radius: var(--radius); padding: .7rem .9rem; margin: 1rem 0; font-weight: 600; }
.sec-count { font-weight: 500; color: var(--muted); font-size: .8rem; }

/* ============================================================
   Nieuwsbrief-wizard stap 2/3 (Inhoud + Targeting)
   ============================================================ */
.vgrid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* toggle-switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.slider-sw { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .15s; cursor: pointer; }
.slider-sw::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .slider-sw { background: var(--primary); }
.switch input:checked + .slider-sw::before { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; color: var(--text); font-weight: 500; }

/* A/B-splittest-kaart */
.ab-card.on { border-color: var(--primary); background: var(--accent-soft); }
.ab-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ab-title { display: flex; align-items: center; gap: .8rem; }
.ab-ic { font-size: 1.5rem; line-height: 1; }
.ab-config { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ab-card.on .ab-config { display: block; }
.range-row { display: flex; align-items: center; gap: .6rem; }
input[type=range] { border: none; box-shadow: none; padding: 0; background: transparent; accent-color: var(--primary); }
.range-val { font-weight: 700; min-width: 46px; text-align: right; }

/* variant-tabs */
.vtabs { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1rem; }
.vtab { display: inline-flex; align-items: center; gap: .4rem; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .7rem; font-weight: 600; font-size: .85rem; cursor: pointer; }
.vtab:hover { background: var(--accent-soft); color: var(--text); }
.vtab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.vtab-letter { width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.08); display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700; }
.vtab.active .vtab-letter { background: rgba(255,255,255,.25); }
.vtab-del { margin-left: .2rem; opacity: .65; font-weight: 700; }
.vtab-del:hover { opacity: 1; }
.vtab-add { background: transparent; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: .4rem .7rem; font-weight: 600; font-size: .85rem; cursor: pointer; }
.vtab-add:hover { border-color: var(--primary); color: var(--accent-strong); background: var(--accent-soft); }
.variant-block { display: none; }
.variant-block.active { display: block; }

/* editor-toolrow + preview */
.editor-toolrow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin: .5rem 0 .3rem; }
.prev-tabs { display: flex; gap: .3rem; align-items: center; }
.prev-mode.active { background: var(--accent-soft); border-color: var(--primary); color: var(--accent-strong); }
.offers-det { margin: .2rem 0 .6rem; }
.offers-scroll { max-height: 220px; overflow: auto; margin-top: .4rem; }
.prev-wrap { margin: .7rem 0; }
.prev-wrap.mobile { max-width: 375px; margin-left: auto; margin-right: auto; }
.prev-label { margin-bottom: .3rem; }
.v-frame { height: 360px; }

/* link-analyse */
.links-box { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; margin-top: .5rem; background: var(--panel-2); }
.links-head { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.v-linklist { margin-top: .5rem; max-height: 180px; overflow: auto; }
.link-row { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.lk-ok { color: #16a34a; font-weight: 700; }
.lk-no { color: var(--muted); font-weight: 700; }
.lk-url { color: var(--muted); word-break: break-all; }

/* geschatte ontvangers */
.est-card { background: var(--accent-soft); border-color: var(--primary); }
.est-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.est-left { display: flex; align-items: center; gap: .9rem; }
.est-ic { font-size: 1.9rem; line-height: 1; }
.est-right { display: flex; align-items: center; gap: 1.1rem; }
.est-num-wrap { text-align: right; }
.est-num { font-size: 2rem; font-weight: 800; color: var(--accent-strong); letter-spacing: -.5px; }
.est-perlist { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--primary); }
.est-row { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; }
.est-row-name { font-weight: 600; }
.accent { color: var(--accent-strong); }

/* demografisch leeftijd */
.age-row { display: flex; align-items: center; gap: .6rem; }
.age-row input { max-width: 90px; margin-top: 0; }

/* provider-/tag-chips (include groen / exclude rood) */
.chip-col-label { font-weight: 700; font-size: .85rem; margin-bottom: .5rem; }
.chip-col-label.inc { color: #16a34a; }
.chip-col-label.exc { color: var(--danger); }
.chip-toggle-wrap { display: flex; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; cursor: pointer; background: var(--panel-2); color: var(--text); margin: 0 .35rem .35rem 0; user-select: none; font-weight: 500; }
.pchip input { display: none; }
.pchip.inc:has(input:checked) { background: #16a34a; border-color: #16a34a; color: #fff; }
.pchip.exc:has(input:checked) { background: var(--danger); border-color: var(--danger); color: #fff; }
.tagchip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tag, #a55d34); display: inline-block; }
.pchip:has(input:checked) .dot { background: #fff; }

@media (max-width: 860px) {
  .vgrid3 { grid-template-columns: 1fr; }
}

/* ---------- Mailbestanden-kaarten ---------- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 360px)); gap: 1.25rem; margin-bottom: 1.25rem; }
.list-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.list-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(16,24,40,.10); }
.list-card.inactive { background: var(--panel-2); }
.lc-head { display: flex; align-items: center; gap: .55rem; }
.lc-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; flex: 1; letter-spacing: -.2px; }
.lc-kebab { color: var(--muted); font-size: 1.25rem; line-height: 1; padding: 0 .25rem; }
.lc-kebab:hover { color: var(--text); text-decoration: none; }
.lc-inactief { background: var(--accent-soft); color: var(--brand); font-weight: 600; }
.lc-domain { color: var(--accent-strong); font-size: .9rem; margin-top: .2rem; }
.lc-members { display: flex; gap: 1rem; align-items: center; margin-top: .6rem; font-size: .92rem; }
.lc-div { border-top: 1px solid var(--line); margin: .85rem 0; }
.lc-icons { display: flex; gap: 1.5rem; color: var(--muted); font-size: .9rem; }
.lc-icons span { display: inline-flex; align-items: center; gap: .3rem; }
.lc-desc { color: var(--muted); font-size: .82rem; margin-top: .7rem; }
.inactive-section { margin-top: .25rem; }
.inactive-section > summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: .55rem 0; list-style: none; display: flex; align-items: center; gap: .5rem; user-select: none; }
.inactive-section > summary::-webkit-details-marker { display: none; }
.inactive-section > summary::before { content: "▸"; display: inline-block; transition: transform .15s; }
.inactive-section[open] > summary::before { transform: rotate(90deg); }

/* ---------- Affiliate: mailbestand-mapping ---------- */
.sites-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.sites-bar form { margin: 0; }
.site-select { margin: 0; max-width: 280px; }
.hint-tracking { margin-top: .8rem; }

/* ---------- Wizard: multi-mailbestand import + tabs ---------- */
.imp-warn { margin-top: .7rem; padding: .5rem .7rem; border-radius: 8px; background: hsl(38 92% 95%); color: hsl(28 80% 34%); border: 1px solid hsl(38 80% 82%); font-size: .85rem; }
.mailfile-tabs { display: flex; align-items: center; gap: .8rem; margin: -.4rem 0 1rem; flex-wrap: wrap; }
.mailfile-tabs-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mailfile-tabs .tabbar { margin-bottom: 0; border-bottom: none; }
.est-row.active { border-color: var(--primary); background: var(--accent-soft); }
.est-row.est-total { border-style: dashed; font-weight: 600; margin-top: .3rem; }
.est-copy { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; flex-wrap: wrap; }
