/* ---------- Fonts ---------- */
@font-face { font-family: 'New Order'; src: url('fonts/NewOrder-Light.woff2') format('woff2'), url('fonts/NewOrder-Light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'New Order'; src: url('fonts/NewOrder-Regular.woff2') format('woff2'), url('fonts/NewOrder-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'New Order'; src: url('fonts/NewOrder-Medium.woff2') format('woff2'), url('fonts/NewOrder-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'New Order'; src: url('fonts/NewOrder-Semibold.woff2') format('woff2'), url('fonts/NewOrder-Semibold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'New Order'; src: url('fonts/NewOrder-Bold.woff2') format('woff2'), url('fonts/NewOrder-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --navy: #023047;
  --blue: #1D78BC;
  --cta: #3cb39c;
  --cta-hover: #33a08b;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --border: #e6e8eb;
  --text: #111418;
  --text-2: #4f5660;
  --muted: #8a9099;
  --accent: var(--blue);
  --series-1: #1D78BC;
  --series-fill: rgba(29, 120, 188, 0.35);
  --grid: #eceef1;
  --good: #1f8a5b;
  --bad: #c62828;
  --danger: #c62828;
  --row-hover: #f3f6f9;
  --radius: 6px;
  --sidebar-w: 320px;
  --surface-2: #f8fafc;
  --heading: var(--navy);
  --warn-bg: #ffe7c8;
  --warn-soft: #fff4e3;
  --warn-text: #7a4a00;
  --bad-bg: #fdeceb;
  --good-bg: #f2fbf8;
  --field-bg: #e8effb;
  --shadow: 0 10px 30px rgba(15, 30, 50, .14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 'New Order', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; font-weight: 700; color: var(--text); }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin-top: 22px; }
a { color: var(--blue); }
.muted { color: var(--muted); margin: 0 0 12px; }
code { font-size: 13px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; z-index: 20;
  overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; } /* scrollen kan (wiel/trackpad), zonder zichtbare balk */
.sidebar::after { /* merk-M linksonder */
  content: ''; position: fixed; left: 0; bottom: 0; width: var(--sidebar-w); height: 230px;
  background: url('img/sidebar-m.png') left bottom / 100% auto no-repeat; pointer-events: none;
}
.sidebar-brand { display: flex; flex-direction: column; gap: 6px; padding: 32px 48px 24px; }
.sidebar-brand img { width: 100%; max-width: 224px; height: auto; display: block; }
.sidebar-brand .sub { color: rgba(255,255,255,.7); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.logo-mark { width: 38px; height: 26px; fill: var(--blue); flex: none; }

.nav { display: flex; flex-direction: column; position: relative; z-index: 1; gap: 14px; flex: 0 0 auto; padding-bottom: 8px; }
.nav-group { display: flex; flex-direction: column; }
.nav-label { padding: 0 48px 6px; color: rgba(255, 255, 255, 0.55); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-group-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); margin: 0 48px; padding-top: 8px; }
.nav-group-bottom a { margin: 0 -48px; }
.nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 48px; color: #fff; text-decoration: none;
  font-weight: 800; font-size: 16px;
  position: relative;
}
.nav a + a::before { content: ''; position: absolute; top: 0; left: 48px; right: 48px; height: 1px; background: rgba(255, 255, 255, 0.14); }
.nav a svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); }
.nav a.active { background: var(--blue); }
.nav > .nav-group > a.active::before, .nav > .nav-group > a.active + a::before { display: none; }

.logout {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 20px 48px 24px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; position: relative; z-index: 1; flex: none;
}
.logout svg { width: 20px; height: 20px; }
.logout:hover { opacity: .8; }

/* ---------- Content ---------- */
.content { margin-left: var(--sidebar-w); min-height: 100vh; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 44px 48px 24px; max-width: 1480px;
}
.page-titles h1 { font-size: 52px; letter-spacing: -0.02em; margin: 0 0 6px; }
.page-titles p { margin: 0; color: var(--text); font-size: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nav-toggle { display: none; }

main { padding: 0 48px 60px; max-width: 1480px; }
.notice { margin: 0 48px 16px; max-width: 1384px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.notice.notice-error { border-color: var(--bad); color: var(--bad); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; margin: 0 0 24px;
}
.card h2, figcaption { color: var(--heading); font-weight: 600; font-size: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

/* ---------- Controls ---------- */
input, select, button { font: inherit; color: inherit; }
input, select {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; min-height: 42px;
}
select { padding-right: 32px; }
input[type="file"] { padding: 7px; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 16px; cursor: pointer; min-height: 42px; font-weight: 600; text-decoration: none; color: var(--text);
}
.btn:hover { background: var(--row-hover); }
.btn.cta { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px; }
.kpi .label { color: var(--muted); font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value { font-size: 36px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 13px; color: var(--muted); }
.kpi .delta.good { color: var(--good); }
.kpi .delta.bad { color: var(--bad); }
.kpi.highlight { background: var(--blue); border-color: var(--blue); color: #fff; }
.kpi.highlight .label, .kpi.highlight .delta { color: rgba(255, 255, 255, 0.85); }

/* ---------- Charts ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
figure.card { margin: 0 0 24px; }
figcaption { margin-bottom: 14px; }
.chart-wrap { position: relative; height: 240px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--surface); }
th.num, td.num { text-align: right; }
th.sorted { color: var(--text); }
th.sorted::after { content: " ▾"; }
th.sorted.asc::after { content: " ▴"; }
tbody tr:hover { background: var(--row-hover); }
td.wrap { white-space: normal; min-width: 220px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--text-2); }
.pill.good { color: var(--good); border-color: currentColor; }
.pill.bad { color: var(--bad); border-color: currentColor; }
.empty { color: var(--muted); padding: 20px 0; }
.log { background: var(--bg); padding: 12px; border-radius: var(--radius); white-space: pre-wrap; font-size: 12px; }
.error { color: var(--bad); margin: 0; }

/* ---------- Login ---------- */
.login-body {
  min-height: 100vh; margin: 0; padding: 40px 16px; display: grid; place-items: center; position: relative; overflow-x: hidden;
  background: radial-gradient(ellipse 80% 90% at 35% 45%, #12395a 0%, #0b2c47 45%, #021d31 100%);
}
.login-body::after { /* grote M rechtsonder */
  content: ''; position: fixed; right: -4vw; bottom: -6vh; width: min(62vw, 900px); aspect-ratio: 364 / 230;
  background: url('img/sidebar-m.png') right bottom / contain no-repeat; pointer-events: none;
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 672px; display: grid; justify-items: center; }
.login-logo { width: min(100%, 572px); height: auto; margin-bottom: 72px; }
.login-card {
  position: relative; width: 100%; background: #fff; border-radius: 8px;
  padding: 50px 56px 76px; display: grid; gap: 30px; margin-bottom: 40px;
}
.login-card label { display: grid; gap: 12px; color: #1b2733; font-weight: 700; font-size: 17px; }
.login-card input:not([type="checkbox"]) {
  background: #e8effb; border: 1px solid #d3dcea; border-radius: 4px; min-height: 62px; padding: 0 20px; font-size: 18px; font-weight: 400;
}
.login-card .remember { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--text-2); font-size: 17px; margin-top: -6px; }
.login-card .remember input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--blue); }
.login-btn {
  position: absolute; left: 56px; right: 56px; bottom: -40px; height: 80px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--blue); color: #fff; border: 0; border-radius: 4px; cursor: pointer;
  font: 700 20px 'New Order', sans-serif;
}
.login-btn svg { width: 22px; height: 22px; }
.login-btn:hover { background: #1a6aa6; }
.login-foot { margin: 24px 0 0; font-size: 13px; max-width: 420px; text-align: center; line-height: 1.6; color: rgba(255,255,255,.55); }
.login-foot a { color: rgba(255,255,255,.55); }
@media (max-width: 640px) {
  .login-logo { margin-bottom: 40px; }
  .login-card { padding: 32px 22px 64px; gap: 22px; }
  .login-btn { left: 22px; right: 22px; height: 64px; bottom: -32px; font-size: 18px; }
  .login-card input:not([type="checkbox"]) { min-height: 54px; }
}
.privacy-bar { background: var(--navy); padding: 22px 16px; }
.privacy-bar a { display: block; max-width: 760px; margin: 0 auto; }
.privacy-bar img { width: 200px; height: auto; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
  .content { margin-left: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface); font-size: 20px; cursor: pointer; margin-right: auto; order: -1;
  }
  .page-head { padding: 20px 16px 16px; }
  .page-titles { flex-basis: 100%; }
  .page-titles h1 { font-size: 36px; }
  main { padding: 0 16px 40px; }
  .notice { margin: 0 16px 16px; }
  .card { padding: 20px; }
  .kpis { gap: 12px; }
  .kpi { padding: 18px; }
  .kpi .value { font-size: 26px; }
  .charts { grid-template-columns: 1fr; }
}

/* ---------- Rollen ---------- */
body:not(.role-client) .client-only { display: none !important; }
body.role-client .admin-only { display: none !important; }
.client-badge { font-weight: 700; font-size: 17px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card.narrow { max-width: 520px; }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 6px; color: var(--text-2); font-weight: 500; }
.credential { margin-top: 16px; padding: 16px 18px; border: 2px dashed var(--cta); border-radius: var(--radius); background: var(--good-bg); }
.credential code { font-size: 15px; background: var(--surface); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); }
.credential p { margin: 4px 0; }

/* ---------- Modal ---------- */
.modal { border: 0; border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.modal::backdrop { background: rgba(2, 48, 71, 0.55); }
.modal form { padding: 28px 32px; display: grid; gap: 16px; }
.modal h2 { color: var(--text); font-size: 24px; margin: 0; }
.modal .muted { margin: -8px 0 0; }
.field { display: grid; gap: 6px; font-weight: 600; color: var(--text-2); }
.match { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 8px; margin: 0; }
.match legend { font-weight: 600; color: var(--text-2); padding: 0 6px; }
.match .check { align-items: baseline; flex-wrap: wrap; color: var(--text); }
.muted-inline { color: var(--muted); font-size: 13px; }
.term-list { margin: 0; padding: 10px 14px 10px 30px; max-height: 160px; overflow: auto; background: var(--bg); border-radius: var(--radius); font-size: 14px; }
.row.end { justify-content: flex-end; }

/* Checkboxes en radio's niet laten meeschalen met tekstvelden */
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--blue); flex: none; }
.match .check { display: grid; grid-template-columns: 16px 1fr; column-gap: 10px; row-gap: 2px; align-items: center; }
.match .check .muted-inline { grid-column: 2; }
.modal .check { gap: 10px; }
.stack label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--text); }

/* ---------- Uitsluitingen ---------- */
textarea { font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; resize: vertical; width: 100%; }
textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.neg-group { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 18px; }
.neg-group > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.neg-group h3 { margin: 0; font-size: 17px; }
.neg-group .type { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.neg-group .links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-2); }
.neg-group table td, .neg-group table th { padding-left: 18px; }
.neg-group .btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.pill.warn { color: #9a6700; border-color: currentColor; }
.section-label { font-weight: 700; margin: 26px 0 12px; color: var(--text); font-size: 16px; }

/* Kanaal-labels */
.pill.ch-search { color: #fff; background: var(--blue); border-color: var(--blue); }
.pill.ch-shopping { color: #fff; background: var(--cta); border-color: var(--cta); }
.pill.ch-pmax { color: #fff; background: var(--navy); border-color: var(--heading); }
.sub-muted { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Advertenties ---------- */
.nav-badge { margin-left: auto; background: var(--cta); color: #fff; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 1px 8px; min-width: 22px; text-align: center; }
.cr-group-title { font-weight: 700; margin: 26px 0 10px; color: var(--heading); font-size: 16px; }
.cr-group-title:first-child { margin-top: 0; }
.cr-group-title span { color: var(--muted); font-weight: 400; }
.cr-card { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 16px; }
.cr-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cr-preview { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 14px 16px; font-family: Arial, sans-serif; }
.cr-preview .sp { font-size: 12px; font-weight: 700; color: #202124; }
.cr-preview .url { font-size: 13px; color: #202124; margin: 2px 0 4px; }
.cr-preview .hl { font-size: 18px; color: #1a0dab; line-height: 1.3; }
.cr-preview .ds { font-size: 14px; color: #4d5156; margin-top: 4px; line-height: 1.45; }
.cr-meta { display: grid; gap: 10px; align-content: start; }
.cr-meta .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cr-stats div { background: var(--bg); border-radius: var(--radius); padding: 8px 10px; }
.cr-stats b { display: block; font-size: 17px; }
.cr-stats small { color: var(--muted); font-size: 12px; }
.cr-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.cr-assets > div { padding: 14px 20px; }
.cr-assets > div + div { border-left: 1px solid var(--border); }
.cr-assets h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.asset { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.asset:last-child { border-bottom: 0; }
.asset .t { flex: 1; min-width: 0; }
.asset .len { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.asset .pin { font-size: 11px; color: var(--muted); }
.pill.best { color: #fff; background: var(--good); border-color: var(--good); }
.pill.goed { color: var(--good); border-color: currentColor; }
.pill.laag { color: var(--bad); border-color: currentColor; }
.pill.leren { color: var(--muted); }
.cr-actions { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.sugg { border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 10px; display: grid; gap: 6px; }
.sugg.applied { border-left-color: var(--good); }
.sugg.rejected { border-left-color: var(--bad); opacity: .85; }
.sugg .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.sugg .diff { font-size: 15px; }
.sugg .diff del { color: var(--bad); }
.sugg .diff ins { color: var(--good); text-decoration: none; font-weight: 600; }
.sugg .admin-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sugg .admin-edit input { flex: 1; min-width: 220px; }
.counter { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.counter.over { color: var(--bad); font-weight: 700; }
@media (max-width: 900px) {
  .cr-top, .cr-assets { grid-template-columns: 1fr; }
  .cr-assets > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .cr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Inrichting ---------- */
.intake-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.intake-grid .wide { grid-column: 1 / -1; }
.intake-grid .span2 { grid-column: span 2; }
.intake-grid .field { align-content: start; }
.checklist { display: grid; gap: 18px; }
.check-group h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.check-group h3 span { background: var(--bg); color: var(--heading); border-radius: 999px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }
.check-list { column-count: 2; column-gap: 32px; }
.check-list label { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); break-inside: avoid; }
.check-list .n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); color: var(--heading); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.check-list .done span.t { color: var(--text); }
.check-list .done .n { background: var(--good); color: #fff; }
.check-list label { position: relative; }
.check-list input { position: absolute; opacity: 0; pointer-events: none; }
.check-list .n { width: 24px; height: 24px; border: 2px solid var(--border); background: var(--surface); transition: background .15s, border-color .15s; }
.check-list .done .n { border-color: var(--good); background: var(--good); color: #fff; }
.check-list label:not(.auto) { cursor: pointer; }
.check-list label:not(.auto):hover .n { border-color: var(--good); }
.check-list input:focus-visible + .n { outline: 2px solid var(--blue); outline-offset: 2px; }
.check-list label.auto .n { background: none; }
.check-list label.auto.done .n { background: var(--good); }
#checklist-total { color: var(--muted); font-size: 14px; }
.howto { margin-top: 16px; background: var(--bg); border-radius: var(--radius); padding: 12px 16px; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--heading); }
.howto li { margin: 6px 0; color: var(--text-2); }
.plan-campaign { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 16px; }
.plan-campaign > header { padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.plan-campaign > header h3 { margin: 0; font-size: 17px; color: var(--heading); }
.plan-group { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.plan-group:last-child { border-bottom: 0; }
.plan-group h4 { margin: 0 0 8px; font-size: 15px; }
.plan-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kw { font-size: 13px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); }
.kw.exact::before { content: "["; } .kw.exact::after { content: "]"; }
.kw.phrase::before { content: '"'; } .kw.phrase::after { content: '"'; }
.txt { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.txt .len { color: var(--muted); font-size: 12px; white-space: nowrap; }
.txt.bad .len { color: var(--bad); font-weight: 700; }
.plan-errors { border: 1px solid var(--bad); color: var(--bad); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.plan-errors li { margin: 3px 0; }
.plan-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 20px; overflow-x: auto; scrollbar-width: none; }
.plan-tabs::-webkit-scrollbar { display: none; }
.plan-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--text-2); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.plan-tabs a:hover { color: var(--heading); }
.plan-tabs a.on { color: var(--heading); border-bottom-color: var(--blue); }
.plan-tabs em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 1px 8px; }
.plan-tabs a.on em { color: var(--blue); }
.plan-tabs em.bad { color: #fff; background: var(--bad); }
.plan-tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cta); display: inline-block; }
.plan-view-body .plan-stats { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.plan-last { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; padding: 10px 14px; border-radius: var(--radius); background: var(--good-bg); font-size: 14px; color: var(--text); }
.plan-last span:first-child { color: var(--text); }
.plan-last.bad { background: var(--bad-bg); color: var(--bad); }
.plan-last a { color: var(--blue); font-weight: 600; white-space: nowrap; }
.plan-h { margin: 0 0 10px; font-size: 15px; color: var(--heading); }
.plan-groups { width: 100%; }
.plan-groups tbody tr { cursor: pointer; }
.plan-groups tbody tr:hover td { background: var(--surface-2); }
.plan-groups .code, .plan-kwcard .code { font-size: 11px; font-weight: 700; color: var(--blue); margin-right: 4px; }
.plan-groups td.muted { color: var(--muted); font-size: 14px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-view-body.teksten .plan-body { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.plan-intro { margin: 0 0 16px; }
.plan-kwgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.plan-kwcard { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.plan-kwcard h4 { margin: 0 0 8px; font-size: 15px; color: var(--heading); }
.plan-kwcard h4 .count { font-weight: 400; color: var(--muted); font-size: 13px; }
.plan-cols.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .plan-cols.three { grid-template-columns: 1fr; } }
.plan-note .btn.small { margin-left: 8px; }
.log-run { border-top: 1px solid var(--border); padding: 12px 0; font-size: 15px; }
.log-run summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.log-run summary small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.log-run ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.log-run .log-note { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.log-run p.log-fails { margin: 8px 0 0; color: var(--bad); }
.log-run ul.log-fails { color: var(--bad); }
@media (max-width: 900px) { .intake-grid .span2 { grid-column: auto; } .intake-grid, .plan-cols { grid-template-columns: 1fr; } .check-list { column-count: 1; } }

/* ---------- zoekwoordselectie & contentplan ---------- */
.rs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 14px; padding: 12px; background: var(--bg); border-radius: var(--radius); }
.rs-actions { margin-left: auto; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--navy); color: #fff; }
.job-line { margin: 8px 0 14px; padding: 10px 14px; border-radius: var(--radius); background: var(--bg); font-size: 14px; }
.job-line ul { margin: 6px 0 0 18px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.warn-card { border-left: 4px solid #d99a00; }
.field small.muted { display: block; font-weight: 400; margin: 2px 0 4px; }
.counter { float: right; font-size: 12px; color: var(--muted); font-weight: 600; }
.counter.near { color: #9a6700; }
.counter.over { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--border); border-radius: 99px; font-size: 13px; background: var(--surface); }
.chip small { color: var(--muted); }
.chip.on { border-color: var(--cta); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.chip button:hover { color: var(--bad); }
.preview-wrap { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.preview-wrap iframe { display: block; width: 100%; height: 780px; border: 0; }
.preview-wrap.mobile { max-width: 400px; margin-left: auto; margin-right: auto; }
textarea.code { width: 100%; margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; }
.img-row { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.img-row:last-child { border-bottom: 0; }
.img-row .row input { flex: 1; }
#tbl-research td:first-child, #tbl-research th:first-child { width: 34px; }
.ref-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.ref-grid figure { position: relative; margin: 0; width: 120px; height: 120px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ref-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-grid button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.variants { display: flex; flex-wrap: wrap; gap: 12px; }
.variants figure { margin: 0; width: 260px; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.variants figure.on { border-color: var(--cta); }
.variants img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.variants figcaption { padding: 8px; }
.img-row details summary { cursor: pointer; font-weight: 600; color: var(--heading); }

/* Invoervelden: gewone tekstdikte, alleen labels vet */
input, select, textarea { font-weight: 400; }
.field input, .field select, .field textarea { font-weight: 400; }

/* Waarschuwing in contentplan */
.warn-box { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--warn-bg); color: var(--text); text-align: left; font-size: 14px; line-height: 1.5; }

/* Afbeeldingen naast elkaar */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; align-items: stretch; }
.img-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.img-frame { position: relative; background: var(--bg); overflow: hidden; height: 220px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.img-inner { position: relative; max-width: 100%; max-height: 100%; height: 100%; overflow: hidden; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.img-inner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.img-inner > a { display: block; height: 100%; }
.img-dummy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #9aa4ae; font-size: 13px; font-weight: 600;
  background: repeating-linear-gradient(135deg, #eef1f4 0 14px, #f6f7f8 14px 28px); }
.img-dummy svg { width: 42px; height: 42px; }
.img-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.55); }
.img-busy .spinner { width: 28px; height: 28px; border-width: 3px; margin: 0; }
.img-place { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); }
.img-thumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--border); padding-top: 10px; }
.img-thumbs .muted { font-size: 12px; width: 100%; }
.img-thumbs button { padding: 0; border: 2px solid var(--border); border-radius: 4px; overflow: hidden; width: 56px; height: 40px; cursor: pointer; background: none; }
.img-thumbs button.on { border-color: var(--cta); }
.img-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-body { padding: 12px; display: grid; gap: 10px; align-content: start; }
.img-file { font-size: 12px; color: var(--muted); word-break: break-all; }
.img-body .row { gap: 8px; }
.img-body .row { flex-wrap: nowrap; }
.img-body .row select { flex: 1 1 auto; min-width: 0; }
.img-body .row .btn { white-space: nowrap; }
.img-body .row input { flex: 1; min-width: 0; }
.img-dl { justify-self: start; }
.img-error { margin: 0; font-size: 13px; color: var(--bad); }
.img-body details summary { cursor: pointer; font-weight: 600; color: var(--heading); font-size: 14px; }
.img-body details textarea { margin: 8px 0; font-size: 12px; }
.img-card, .img-body, .img-body .field { min-width: 0; }
.img-body .row > * { min-width: 0; }
.img-body .row .btn { flex: none; padding-left: 12px; padding-right: 12px; }
.img-body .row select { flex: 1 1 0; }
.img-body .row input { flex: 1 1 0; }
.img-body { grid-template-columns: minmax(0, 1fr); }

.kwsel-toggle { border: 1px dashed var(--border); background: none; color: var(--muted); border-radius: 99px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.kwsel-toggle:hover { border-color: var(--cta); color: var(--cta); }
.kwsel-toggle.on { border: 1px solid var(--good); color: var(--good); }
.kwsel-toggle.on:hover { border-color: var(--bad); color: var(--bad); }

/* Campagneplan: tabbladen en advertentievoorbeeld */
.plan-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.plan-stats > div { padding: 14px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.plan-stats > div:last-child { border-right: 0; }
.plan-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.plan-stats strong { font-size: 17px; color: var(--heading); }
.plan-stats small { font-size: 13px; color: var(--text-2); }
.plan-panel { padding: 18px; }
.plan-land { margin: 0 0 16px; font-size: 14px; color: var(--text-2); }
.plan-land a { color: var(--blue); }
.plan-sec { margin: 0 0 18px; }
.plan-sec h4 { margin: 0 0 10px; font-size: 15px; color: var(--heading); }
.plan-sec h4 .count { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.plan-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-sec-head h4 { margin: 0 0 10px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
p.small, .muted.small { font-size: 13px; margin: 8px 0 0; }
.gad { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; max-width: 640px; background: #fff; font-family: Arial, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.gad-top { font-size: 12px; color: #202124; margin-bottom: 2px; }
.gad-url { font-size: 13px; color: #202124; margin-bottom: 4px; }
.gad-title { font-size: 19px; line-height: 1.3; color: #1a0dab; margin-bottom: 4px; }
.gad-desc { font-size: 14px; line-height: 1.5; color: #4d5156; }
.txt-list, .kw-rows, .sl-list { list-style: none; margin: 0; padding: 0; }
.txt-list li, .kw-rows li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.txt-list li .len { color: var(--muted); font-size: 12px; white-space: nowrap; }
.txt-list li.bad .len { color: var(--bad); font-weight: 700; }
.kw-rows li .pill { font-size: 11px; }
.sl-list li { padding: 8px 0; border-bottom: 1px solid var(--grid); display: flex; flex-direction: column; font-size: 14px; }
.sl-list li a { color: #1a0dab; font-weight: 600; }
.sl-list li span { color: var(--text-2); font-size: 13px; }
@media (max-width: 900px) { .plan-stats { grid-template-columns: 1fr 1fr; } .plan-stats > div:nth-child(2) { border-right: 0; } }

/* Bijwerken naar Google Ads */
.sync-box { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.sync-box h3 { margin: 0 0 12px; font-size: 16px; color: var(--heading); }
.sync-group { margin: 0 0 16px; }
.sync-group h4 { margin: 0 0 6px; font-size: 14px; color: var(--heading); }
.sync-group h4 .count { font-weight: 400; color: var(--muted); }
.sync-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--grid); cursor: pointer; }
.sync-item input { margin-top: 4px; }
.sync-item span { display: flex; flex-direction: column; font-size: 14px; }
.sync-item strong { font-weight: 600; }
.sync-item small { color: var(--text-2); font-size: 13px; }
.sync-item small.sync-texts { color: var(--muted); margin-top: 2px; }

/* Intake: uitleg en USP-labels */
.field-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.usp-add { display: flex; gap: 8px; margin-top: 8px; }
.usp-add input { flex: 1; }
#usp-chips { margin-top: 6px; min-height: 30px; align-items: center; }
#usp-chips .chip { font-weight: 400; color: var(--text); }

/* Dagelijkse melding */
#alert-preview-box { margin-top: 14px; }
.alert-client h3 { font-size: 15px; color: var(--heading); margin: 14px 0 6px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.alert-item div { display: flex; flex-direction: column; font-size: 14px; }
.alert-item small { color: var(--text-2); font-size: 13px; }
.field-hint.bad { color: var(--bad); font-weight: 600; }
.ideas-form { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; align-items: end; }
.ideas-form textarea { width: 100%; }
.ideas-form .row { grid-column: 1 / -1; }
@media (max-width: 700px) { .ideas-form { grid-template-columns: 1fr; } }
.wp-form { margin-top: 0; }
.wp-line { margin: 8px 0 12px; }
.adopt-box { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adopt-box p { margin: 0 0 10px; }
.adopt-box select { min-width: 320px; max-width: 100%; }
.auto-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 8px; }
.auto-form .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .auto-form { grid-template-columns: 1fr; } }
#auto-job details { margin-top: 6px; }
.usage-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 8px; }
.usage-tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.usage-tile span { font-size: 13px; color: var(--text-2); }
.usage-tile strong { font-size: 22px; }
.usage-tile small { color: var(--text-2); }
@media (max-width: 900px) { .usage-tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- Menu met submenu's ---------- */
.nav-parent { position: relative; }
.nav-parent + a::before, a + .nav-parent::before, .nav-parent + .nav-parent::before { content: ''; position: absolute; top: 0; left: 48px; right: 48px; height: 1px; background: rgba(255, 255, 255, 0.14); z-index: 1; }
.nav-group-toggle {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 11px 48px; color: #fff; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 16px; text-align: left;
}
.nav-group-toggle:hover { background: rgba(255, 255, 255, 0.05); }
.nav-group-toggle svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.nav-group-toggle .chev { width: 18px; height: 18px; margin-left: auto; opacity: .7; transition: transform .15s ease; fill: none; }
.nav-parent.open .chev { transform: rotate(180deg); }
.nav-parent.has-active > .nav-group-toggle { color: #fff; }
.nav-sub { display: none; flex-direction: column; margin: -4px 48px 8px 58px; border-left: 1px solid rgba(255, 255, 255, 0.22); }
.nav-parent.open .nav-sub { display: flex; }
.nav .nav-sub a { padding: 7px 14px 7px 18px; font-weight: 600; font-size: 15px; color: rgba(255, 255, 255, 0.78); border-radius: 0 6px 6px 0; }
.nav .nav-sub a::before { content: ''; position: absolute; left: 0; right: auto; top: 50%; width: 10px; height: 1px; background: rgba(255, 255, 255, 0.22); }
.nav .nav-sub a + a::before { top: 50%; left: 0; right: auto; }
.nav .nav-sub a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav .nav-sub a.active { color: #fff; background: var(--blue); }
.nav .nav-sub a.active::before { display: block; }
.sub-hidden { display: none !important; }
body.view-global #refresh, body.view-global .client-pick { display: none; }

/* Campagneplan: rustiger opzet */
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.plan-bar-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1 1 280px; }
.plan-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-bar-title h2 { margin: 0; font-size: 22px; }
.plan-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.menu-wrap { position: relative; }
.menu-btn { font-size: 20px; line-height: 1; padding-left: 14px; padding-right: 14px; letter-spacing: 1px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu button, .menu label { display: block; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.menu button:hover, .menu label:hover { background: var(--bg); }
.menu .danger { color: var(--bad); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 4px; }
.menu [hidden] { display: none; }
.plan-note { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); font-size: 14px; }
.plan-note.warn { background: var(--warn-soft); color: var(--warn-text); }
.plan-note.bad { background: var(--bad-bg); color: var(--bad); }
.plan-note summary { cursor: pointer; font-weight: 600; }
.plan-note ul { margin: 8px 0 2px; padding-left: 20px; }
.plan-body { display: grid; grid-template-columns: 260px 1fr; min-height: 360px; }
.plan-side { border-right: 1px solid var(--border); padding: 10px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.plan-side hr { border: 0; border-top: 1px solid var(--border); margin: 8px 4px; }
.plan-side button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.plan-side button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-side button small { font-size: 11px; font-weight: 700; color: var(--muted); }
.plan-side button em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-side button:hover { color: var(--heading); background: rgba(0, 0, 0, .03); }
.plan-side button.on { background: var(--surface); color: var(--heading); box-shadow: 0 0 0 1px var(--border); }
.plan-side button.on small, .plan-side button.on em { color: var(--blue); }
.plan-start { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-choice { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.plan-choice strong { color: var(--heading); font-size: 16px; }
.plan-choice span { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.plan-choice:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(30, 120, 200, .1); }
.plan-howto { margin-top: 18px; }
@media (max-width: 900px) {
  .plan-body { grid-template-columns: 1fr; }
  .plan-side { border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; }
  .plan-side hr { display: none; }
  .plan-start { grid-template-columns: 1fr; }
  .plan-stats { grid-template-columns: 1fr 1fr; }
}
.plan-campaign { overflow: hidden; }

/* ---------- Donkere modus ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1620;
  --surface: #15202b;
  --surface-2: #1a2632;
  --border: #283746;
  --text: #e6ebf0;
  --text-2: #b4c0cc;
  --muted: #8593a1;
  --grid: #223040;
  --row-hover: #1c2936;
  --heading: #eef3f7;
  --good: #3fbf87;
  --bad: #ef6b6b;
  --danger: #ef6b6b;
  --series-fill: rgba(80, 160, 230, 0.35);
  --series-1: #4aa3e8;
  --warn-bg: #3a2c12;
  --warn-soft: #33280f;
  --warn-text: #f3c77a;
  --bad-bg: #3a1c1f;
  --good-bg: #13302a;
  --field-bg: #1c2a38;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] .sidebar { background: #0a1a26; }
:root[data-theme="dark"] .seg button.on { background: var(--blue); }
:root[data-theme="dark"] .pill.warn, :root[data-theme="dark"] .counter.near { color: #f3c77a; }
:root[data-theme="dark"] .preview-wrap { border-color: var(--border); }

/* ---------- Bovenbalk: thema, profiel, instellingen ---------- */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; height: 76px; padding: 0 48px; max-width: 1480px; position: relative; z-index: 15; }
.topbar-sep { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }
.client-pick { position: relative; display: flex; align-items: center; height: 44px; margin: 0; color: var(--muted); }
.client-pick > svg { position: absolute; left: 16px; width: 18px; height: 18px; pointer-events: none; }
.client-pick > svg.chev { left: auto; right: 16px; width: 16px; height: 16px; color: var(--heading); }
.client-pick select { -webkit-appearance: none; appearance: none; height: 44px; min-width: 210px; max-width: 280px; padding: 0 44px 0 44px; border-radius: 99px; border: 1px solid var(--border); background-color: var(--surface); color: var(--heading); font-weight: 600; font-size: 15px; cursor: pointer; }
.client-pick select:hover, .client-pick select:focus { border-color: var(--blue); }
.theme-switch { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--muted); }
.theme-switch > svg { width: 18px; height: 18px; display: block; }
#theme-toggle { flex: none; width: 40px; height: 22px; border-radius: 99px; border: 0; background: var(--border); position: relative; cursor: pointer; padding: 0; transition: background .2s; }
#theme-toggle span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
#theme-toggle[aria-checked="true"] { background: var(--blue); }
#theme-toggle[aria-checked="true"] span { transform: translateX(18px); }
.me-wrap { position: relative; }
.me { display: flex; align-items: center; gap: 12px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 99px; text-align: right; font: inherit; }
.me:hover .avatar { box-shadow: 0 0 0 3px var(--border); }
.me-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; line-height: 1.2; }
.me-text strong { font-size: 15px; color: var(--heading); font-weight: 700; }
.me-text small { font-size: 12.5px; color: var(--muted); }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; flex: none; transition: box-shadow .15s; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 72px; height: 72px; font-size: 24px; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.me-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 14px; }
.me-pop-photo { display: flex; gap: 14px; align-items: center; }
.me-pop-photo > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.me-pop-photo small { flex-basis: 100%; font-size: 12px; margin: 0; }
.me-pop form { display: grid; gap: 10px; }
.me-pop .field input { width: 100%; }
.page-head { padding-top: 16px; }
@media (max-width: 900px) {
  .topbar { height: 64px; padding: 0 16px; gap: 10px; }
  .me-text, .topbar-sep { display: none; }
  .client-pick { margin-right: auto; }
  .client-pick select { min-width: 0; max-width: 46vw; }
  .theme-switch { height: 40px; padding: 0 8px; }
  .theme-switch > svg { display: none; }
  .me { height: 40px; }
  .avatar, .icon-btn { width: 40px; height: 40px; }
}

/* Werkbalk boven een tabel: zoeken en filters links, acties rechts, alles op één regel */
.toolbar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="search"] { flex: 1 1 180px; max-width: 280px; min-width: 150px; }
.toolbar .btn, .toolbar .check { white-space: nowrap; }
.toolbar .muted { margin: 0; }
.toolbar-spacer { flex: 1 1 0; min-width: 0; }
.chart-card { margin: 0 0 24px; }
.chart-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-card .chart-wrap { height: 300px; }

/* Genummerde stappen (Meting) */
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.step { padding: 20px 0; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.step:first-child { border-top: 0; padding-top: 4px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-head h3 { margin: 2px 0 4px; font-size: 16px; color: var(--heading); }
.step-head p { margin: 0; }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.step > :not(.step-head) { margin-left: 44px; }
.step .howto { margin-top: 0; }
.step-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
@media (max-width: 640px) { .step > :not(.step-head) { margin-left: 0; } }

/* Instellingen in losse blokken met een eigen opslaan-knop */
.set-block > p.muted { margin: -4px 0 16px; }
.set-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.set-foot small { flex-basis: 100%; }
.cp-settings .wp-form .set-foot { margin-top: 4px; }

/* Klant toevoegen */
.add-client { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 14px; }
.add-client-head { display: flex; justify-content: space-between; align-items: center; }
.add-client-head h3 { margin: 0; }
.add-client .seg { justify-self: start; flex-wrap: wrap; }
.add-client .add-mode > p { margin: 0 0 12px; }
.log-close { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.log-close:hover { color: var(--heading); background: var(--surface); }
.app-version { margin: 0 0 8px; line-height: 1.6; }
.pill.blue { color: var(--blue); border-color: currentColor; }
#cp-origin { margin: 4px 0 14px; }
.url-cell { display: inline-block; max-width: 170px; overflow-wrap: anywhere; }
td.wrap:has(.url-cell) { min-width: 0; }

/* ---------- SEO: linkbuilding en backlinks ---------- */
.lb-filters .lb-sheet-select { min-width: 250px; font-weight: 600; color: var(--heading); }
#lb-sheet-notes { margin: 0 0 12px; }
.lb-filters .mini { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.lb-filters .mini input { width: 76px; min-height: 38px; padding: 6px 8px; }
.lb-filters select { min-height: 38px; }
table.lb-sites td { vertical-align: top; }
table.lb-sites td.wrap { min-width: 160px; }
.lb-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 14px 0 6px; }
.lb-pager span { margin-right: auto; }
#lb-d-anchors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#lb-d-anchors .chip { cursor: pointer; padding: 4px 12px; font-weight: 600; color: var(--text-2); }
#lb-d-anchors .chip:hover { border-color: var(--blue); color: var(--blue); }
.lb-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 4px 0 14px; flex-wrap: wrap; }
.lb-steps li { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--muted); }
.lb-steps li.done { color: var(--good); border-color: var(--good); }
.lb-steps li.done::before { content: '✓ '; }
.lb-steps li.on { color: #fff; background: var(--blue); border-color: var(--blue); }
.lb-work { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 24px; margin: 18px 0 8px; }
.lb-work h3, .lb-mail h3, .lb-live h3 { margin: 0 0 10px; font-size: 16px; color: var(--heading); }
.lb-work h3 .count { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.lb-article { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; max-height: 560px; overflow: auto; font-size: 15px; line-height: 1.6; background: var(--surface); }
.lb-article h2 { font-size: 20px; margin: 0 0 12px; color: var(--heading); }
.lb-article h3 { font-size: 16px; margin: 16px 0 6px; }
.lb-article a { color: var(--blue); font-weight: 600; }
.lb-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.lb-mail, .lb-live { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.lb-mail .row.wrap { margin-bottom: 14px; }
.lb-mail-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); display: grid; gap: 10px; }
.lb-mail-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.lb-mail-row span { color: var(--muted); }
.lb-mail-row code { white-space: normal; word-break: break-word; }
.lb-mail-box pre { white-space: pre-wrap; margin: 0; font-family: inherit; font-size: 14px; line-height: 1.55; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
a.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) { .lb-work { grid-template-columns: 1fr; } .lb-mail-row { grid-template-columns: 1fr auto; } .lb-mail-row span { grid-column: 1 / -1; } }
#lb-sheet-notes summary { cursor: pointer; font-weight: 600; color: var(--warn-text, #9a6700); }
#lb-sheet-notes ul { margin: 6px 0 0; padding-left: 18px; }
.bl-act { display: flex; gap: 4px; }
.icon-mini { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 14px; line-height: 1; }
.icon-mini:hover { border-color: var(--blue); color: var(--blue); }
.icon-mini.danger:hover { border-color: var(--bad); color: var(--bad); }
#bl-table td.wrap { min-width: 180px; max-width: 320px; }
/* Inkopen-venster: breder, velden nooit breder dan het venster */
#lb-dialog { width: min(760px, calc(100vw - 32px)); }
#lb-dialog form { overflow-x: hidden; }
#lb-dialog form > *, #lb-dialog .field > * { min-width: 0; }
#lb-dialog input, #lb-dialog select { width: 100%; max-width: 100%; }
#lb-dialog .warn-box { margin: 0; }
.bl-import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bl-import-grid h4 { margin: 0 0 8px; font-size: 15px; color: var(--heading); }
.bl-import-grid ol { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.bl-import-grid textarea { width: 100%; margin: 6px 0 10px; }
#bl-paste { display: grid; align-content: start; }
#bl-paste .btn { justify-self: start; }
@media (max-width: 900px) { .bl-import-grid { grid-template-columns: 1fr; } }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ov-head #last-sync { margin: 0; }
.check-inline{display:inline-flex;align-items:center;gap:6px;font-size:14px;white-space:nowrap;cursor:pointer}
.kwsugg-actions{margin-top:12px;gap:8px;align-items:center}
.cr-preview .hl a, .gad-title a { color: inherit; text-decoration: none; }
.cr-preview .hl a:hover, .gad-title a:hover { text-decoration: underline; }
.cr-preview .cr-visit { display: inline-block; margin-top: 8px; font-size: 13px; color: #1a0dab; text-decoration: none; }
.cr-preview .cr-visit:hover { text-decoration: underline; }
