:root {
  --bg:        #EEEFF2;
  --card:      #FFFFFF;
  --ink:       #1B1D2A;
  --ink-soft:  #4A4E5C;
  --dim:       #8B909C;
  --line:      #ECEDF1;
  --line-soft: #F2F3F6;

  --blue:      #2E4BD8;
  --blue-deep: #1E36A8;
  --blue-mid:  #4E68F0;
  --lav:       #E9EDFC;
  --lav-ink:   #2E4BD8;

  --green:     #16A34A;
  --green-bg:  #E7F6ED;
  --amber:     #B45309;
  --amber-bg:  #FBF0DD;
  --red:       #DC2626;
  --red-bg:    #FCEBEB;
  --indigo:    #4E68F0;
  --indigo-bg: #E9EDFC;

  --r-sm:  10px;
  --r:     16px;
  --r-lg:  20px;
  --mono:  ui-monospace, 'SF Mono', 'Courier New', monospace;
  --rail:  92px;
}

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

body {
  font-family: -apple-system, system-ui, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Rail (narrow icon sidebar) ── */
.rail {
  width: var(--rail);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  gap: 0.35rem;
  overflow-y: auto;
}
.rail-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.rail a {
  width: 72px;
  padding: 0.55rem 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.14s, color 0.14s;
}
.rail a:hover { color: var(--ink); background: var(--line-soft); }
.rail a.active { color: var(--blue); background: var(--lav); }
.rail svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Content column ── */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem;
  gap: 1.1rem;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 13px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lav);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.topbar a.logout {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--line);
}
.topbar a.logout:hover { color: var(--red); border-color: var(--red-bg); }

.main {
  flex: 1;
  padding: 0.5rem 2rem 2.5rem;
  max-width: 1060px;
  width: 100%;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
}
.card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dim);
  margin-bottom: 1rem;
}

/* ── Metric cards (lavender) ── */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.metric {
  background: var(--lav);
  border-radius: var(--r);
  padding: 1.2rem 1.35rem;
}
.metric-label { font-size: 12.5px; font-weight: 700; color: var(--lav-ink); margin-bottom: 0.4rem; }
.metric-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.metric-value.mono { font-family: var(--mono); font-weight: 700; }

/* Solid hero metric (deep blue) */
.metric-hero {
  background: var(--blue-deep);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  color: #fff;
}
.metric-hero.bright { background: var(--blue-mid); }
.metric-hero .metric-label { color: rgba(255,255,255,0.82); }
.metric-hero .metric-value { color: #fff; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  padding: 0 0.85rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--line-soft); }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* ── Pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
}
.pill-gray   { background: var(--line); color: var(--ink-soft); }
.pill-green  { background: var(--green-bg);  color: var(--green); }
.pill-amber  { background: var(--amber-bg);  color: var(--amber); }
.pill-red    { background: var(--red-bg);    color: var(--red); }
.pill-indigo { background: var(--indigo-bg); color: var(--indigo); }

/* ── Status dot (signature: pulsing for running) ── */
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot-green  { background: var(--green); }
.dot-amber  { background: var(--amber); }
.dot-red    { background: var(--red); }
.dot-indigo { background: var(--indigo); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(78,104,240,0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(78,104,240,0); }
  100% { box-shadow: 0 0 0 0 rgba(78,104,240,0); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 99px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.14s;
}
.btn:hover { background: var(--blue-deep); text-decoration: none; }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--line-soft); border-color: var(--dim); }

/* ── Forms ── */
.form-row { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
input, select, textarea {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.8rem;
  font-size: 13px;
  width: 100%;
  outline: none;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--lav);
}
/* Drop the native OS chrome so selects/number fields match the white inputs. */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238B909C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form-hint { font-size: 12px; color: var(--dim); margin-top: 5px; }

/* ── Day chips ── */
.day-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.day-check {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dim);
  user-select: none;
  transition: all 0.12s;
}
.day-check:has(input:checked) { background: var(--lav); border-color: transparent; color: var(--blue); }
.day-check input[type="checkbox"] { display: none; }

/* ── Cost bars ── */
.cost-row { margin-bottom: 1.05rem; }
.cost-meta { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.cost-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.cost-fill  { height: 100%; background: var(--blue-mid); border-radius: 99px; }

/* ── Prose (blog body) ── */
.prose { line-height: 1.8; color: var(--ink-soft); font-size: 14px; }
.prose h1, .prose h2, .prose h3 { margin: 1.4rem 0 0.5rem; font-weight: 700; color: var(--ink); }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose a { color: var(--blue); }
.prose img { max-width: 100%; border-radius: var(--r-sm); }
.prose code { font-family: var(--mono); font-size: 12px; background: var(--line-soft); padding: 1px 6px; border-radius: 5px; }

/* ── Misc ── */
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--dim); font-size: 12.5px; }
.error-msg { color: var(--red); font-size: 13px; padding: 0.7rem 0.9rem; background: var(--red-bg); border-radius: var(--r-sm); margin-bottom: 1rem; }

/* ── Login ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; }
.login-box { background: #fff; border-radius: var(--r); padding: 2.5rem; width: 380px; }
.login-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; margin-bottom: 1.3rem;
}
.login-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.login-sub { font-size: 13px; color: var(--dim); margin-bottom: 1.8rem; }

/* ── Detail meta bar ── */
.meta-bar { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); margin-bottom: 1.2rem; }
.meta-sep { color: var(--line); }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.tabs a {
  padding: 0 0 0.8rem;
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Notice ── */
.notice-ok {
  background: var(--green-bg);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 0.8rem 1.1rem;
  border-radius: var(--r-sm);
  margin-bottom: 1.1rem;
}

/* Blog images — downloadable assets shown next to the AFBEELDING n slots */
.blog-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.blog-image-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--line-soft);
}
.blog-image-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: var(--lav);
  padding: 6px 10px;
}
.blog-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff;
}
.blog-image-card figcaption {
  padding: 8px 10px 12px;
  background: var(--card);
}

/* Upload-slot placeholder inside the rendered blog body */
.prose .blog-image-slot { font-size: 14px; }

/* Blog editor */
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.edit-pane { display: flex; flex-direction: column; }
.edit-label { display: block; font-size: 13px; font-weight: 600; margin: 0.75rem 0 0.25rem; }
.edit-textarea { width: 100%; min-height: 72vh; font-family: ui-monospace, monospace;
  font-size: 14px; line-height: 1.6; padding: 14px; border: 1px solid #d5d8e0;
  border-radius: 8px; resize: vertical; box-sizing: border-box; }
.edit-textarea-short { min-height: 160px; }
.edit-input { width: 100%; padding: 8px 12px; border: 1px solid #d5d8e0;
  border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.edit-preview-frame { width: 100%; min-height: 72vh; border: 1px solid #d5d8e0;
  border-radius: 8px; background: #fff; box-sizing: border-box; }
.edit-hint { font-size: 12px; color: var(--dim); margin: 0.25rem 0 0.5rem; }
.faq-row { margin-bottom: 1rem; padding: 1rem; }
.faq-row-head { display: flex; justify-content: space-between; align-items: center; }
.meta-ok { color: #2f855a; font-weight: 600; }
.meta-over { color: #c53030; font-weight: 600; }
.btn-ghost { background: transparent; border: 1px solid #d5d8e0; }
@media (max-width: 800px) { .edit-grid { grid-template-columns: 1fr; } }

/* ── Onboarding questionnaire ── */
.onb-intro { max-width: 62ch; color: var(--ink-soft); font-size: 13.5px;
  line-height: 1.6; margin: 0 0 1.2rem; }
.onb-note { color: var(--dim); font-size: 12.5px; line-height: 1.55;
  margin: -0.3rem 0 1.1rem; }
.onb-error { background: var(--red-bg); color: var(--red); font-weight: 600;
  font-size: 13px; padding: 0.7rem 1rem; border-radius: var(--r-sm);
  margin-bottom: 1.1rem; }
.onb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.onb-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1.2rem; }
.req { color: var(--red); }
.onb-opt { font-weight: 600; font-size: 11px; color: var(--dim);
  background: var(--line-soft); border-radius: 99px; padding: 2px 8px;
  margin-left: 6px; letter-spacing: 0; text-transform: none; }
.onb-intro code, .onb-note code { background: var(--line-soft);
  padding: 1px 5px; border-radius: 5px; font-family: var(--mono); font-size: 12px; }
@media (max-width: 800px) {
  .onb-grid-2, .onb-grid-3 { grid-template-columns: 1fr; }
}

/* ── File upload on large fields ── */
.onb-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem;
  margin-top: 0.5rem; }
.onb-upload input[type="file"] { width: auto; flex: 0 0 auto; padding: 4px;
  font-size: 11.5px; color: var(--dim); border: 1px dashed var(--line);
  background: var(--line-soft); cursor: pointer; }
.onb-upload input[type="file"]::file-selector-button {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 3px 10px; margin-right: 9px; font-size: 11.5px; font-weight: 700;
  color: var(--blue); cursor: pointer; transition: background 0.12s; }
.onb-upload input[type="file"]::file-selector-button:hover { background: var(--lav); }

/* ── Site health / completeness ── */
.card-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; gap: 1rem; }
.card-head-right { display: flex; align-items: center; gap: 0.8rem; }
.hc-badge { font-size: 11px; font-weight: 700; border-radius: 99px;
  padding: 3px 10px; letter-spacing: 0; }
.hc-badge-ok { background: var(--green-bg); color: var(--green); }
.hc-badge-warn { background: var(--amber-bg); color: var(--amber); }
.hc-fix-link { font-size: 12.5px; font-weight: 600; }
.hc-row { display: grid; grid-template-columns: 22px 200px 1fr; align-items: baseline;
  gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; }
.hc-row:last-child { border-bottom: none; }
.hc-mark { font-weight: 800; text-align: center; }
.hc-ok { color: var(--green); }
.hc-bad { color: var(--red); }
.hc-label { font-weight: 600; color: var(--ink); }
.hc-detail { color: var(--dim); }
.hc-list { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--ink-soft);
  font-size: 13px; line-height: 1.7; }
@media (max-width: 800px) {
  .hc-row { grid-template-columns: 22px 1fr; }
  .hc-detail { grid-column: 2; }
}

/* ── Setup-checklist ── */
.chk-list { list-style: none; margin: 0; padding: 0; }
.chk-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--line-soft);
}
.chk-item:first-child { border-top: none; }
.chk-check { margin: 0; flex-shrink: 0; }
.chk-box {
  width: 22px; height: 22px;
  border: 1.5px solid var(--dim);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-size: 14px; font-weight: 800;
  line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chk-box:hover { border-color: var(--green); }
.chk-body { flex: 1; min-width: 0; }
.chk-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk-title { font-weight: 600; color: var(--ink); }
.chk-detail { font-size: 13px; line-height: 1.6; margin-top: 3px; }
.chk-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.chk-prio { margin: 0; }
/* Prioriteit als één schone, kleur-gecodeerde pill (geen native select-look,
   geen strikethrough). */
.chk-prio-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  border: none; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 600;
  line-height: 1.2; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.chk-prio-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.prio-high   { background: var(--red-bg);   color: var(--red); }
.prio-medium { background: var(--amber-bg); color: var(--amber); }
.prio-low    { background: var(--line);     color: var(--ink-soft); }
.chk-del { padding: 4px 9px; line-height: 1; text-decoration: none; }
.chk-done .chk-title { text-decoration: line-through; color: var(--dim); }
.chk-done .chk-box { background: var(--green-bg); border-color: var(--green); }
.chk-done { opacity: 0.7; }

/* ── Google-login op de inlogpagina ── */
.btn-google {
  width: 100%;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1f2328;
  border: 1px solid var(--line);
  font-weight: 600;
}
.btn-google:hover { background: var(--line-soft); border-color: var(--dim); text-decoration: none; }
.login-note { font-size: 12px; color: var(--dim); text-align: center; margin-top: 8px; }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 1.1rem 0 0.9rem; color: var(--dim); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
