/* De Goudzeef — één stylesheet voor publiek + admin */
:root {
  --gold: #d97706;
  --gold-dark: #b45309;
  --gold-soft: #fef3c7;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--gold-dark); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: .3em 0 .4em; }
h3 { margin: 0 0 .5em; font-size: 1.02rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; margin: .2em 0 .8em; }
.empty {
  text-align: center; color: var(--muted); padding: 48px 16px;
  border: 2px dashed var(--line); border-radius: 14px; margin-top: 16px;
}
.btn-gold {
  display: inline-block; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #f59e0b, var(--gold));
  color: #fff; font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 2px 6px rgba(180, 83, 9, .35);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold.wide { width: 100%; text-align: center; }
.btn-small {
  display: inline-block; cursor: pointer; text-decoration: none;
  background: #fff; color: var(--ink); font-size: .85rem;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
}
.btn-small:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-small.ghost { background: transparent; }
.btn-small.red { color: #b91c1c; }
.btn-small.red:hover { border-color: #b91c1c; }

/* ---------- publiek ---------- */
body.public { background: #faf7f0; }
.pub-wrap { max-width: 620px; margin: 0 auto; padding: 40px 18px 24px; }
.pub-wrap.center { text-align: center; padding-top: 80px; }
.pub-logo {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 70%);
  border: 3px solid var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 10px;
}
.pub-wrap.center .pub-logo { margin: 0 auto 10px; }
.pub-logo.big { width: 88px; height: 88px; font-size: 44px; }
.intro { color: #374151; font-size: .97rem; }
.pub-form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; padding: 22px; }
.pub-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .93rem; }
.pub-form .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.req { color: var(--gold-dark); }
.opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.pub-form input[type="text"], .pub-form textarea, .filterbar input, .filterbar select,
.detail-side select, .detail-side input, .note-add textarea, .research-link input {
  font: inherit; color: inherit;
  border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 11px; background: #fff;
}
.pub-form input:focus, .pub-form textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.pub-form textarea { resize: vertical; }
fieldset.freq { border: 0; padding: 0; margin: 0; }
fieldset.freq legend { font-weight: 600; font-size: .93rem; padding: 0; margin-bottom: 7px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pills label {
  border: 1px solid #d1d5db; border-radius: 999px; padding: 6px 14px;
  font-size: .88rem; cursor: pointer; background: #fff; color: #374151;
}
.pills input:checked + label {
  background: var(--gold-soft); border-color: var(--gold); color: var(--gold-dark); font-weight: 700;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.errbox {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
  border-radius: 10px; padding: 10px 14px; margin: 10px 0;
}
.privacy { color: var(--muted); font-size: .78rem; margin: 0; text-align: center; }
.pub-footer { text-align: center; color: #9ca3af; font-size: .8rem; padding: 26px 0 18px; }

/* ---------- admin: raamwerk ---------- */
body.admin { background: #f6f7f9; }
.topbar {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 18px; position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.brand { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem;
  padding: 6px 12px; border-radius: 8px;
}
.topbar nav a:hover { color: var(--ink); background: #f3f4f6; }
.topbar nav a.active { color: var(--gold-dark); background: var(--gold-soft); }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
#gz-author { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .85rem; width: 130px; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 18px; }
.admin-main.wide { max-width: none; }

/* statuskleuren */
.st-intake { --st: #64748b; }
.st-onderzoek { --st: #2563eb; }
.st-opvolging { --st: #7c3aed; }
.st-uitvoering { --st: #d97706; }
.st-geparkeerd { --st: #94a3b8; }
.st-afgevoerd { --st: #dc2626; }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; white-space: nowrap;
  color: var(--st); background: color-mix(in srgb, var(--st) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--st) 30%, #fff);
  padding: 2px 9px; border-radius: 999px;
}
.src {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 5px; vertical-align: 1px;
}
.src-intern { background: var(--gold-soft); color: var(--gold-dark); }
.src-extern { background: #e0f2fe; color: #0369a1; }
.quad { font-size: .8rem; white-space: nowrap; }
.tchip {
  font-size: .72rem; background: #f3f4f6; border-radius: 5px; padding: 1px 6px; color: #4b5563;
}

/* chips + filterbalk */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}
.chip b { font-weight: 800; color: var(--st, var(--ink)); }
.chip.active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filterbar input[type="text"] { flex: 1; min-width: 180px; }
.filterbar select { font-size: .88rem; }

/* tabel */
.tablewrap { overflow-x: auto; padding: 0; }
table.ideas { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.ideas th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line);
}
table.ideas td { padding: 9px 12px; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
table.ideas tr:hover td { background: #fafaf5; }
.t-title a { font-weight: 600; text-decoration: none; color: var(--ink); }
.t-title a:hover { color: var(--gold-dark); }
th.num, td.num { text-align: center; width: 34px; }
.type-inline { font-size: .82rem; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px; max-width: 150px; }
.type-inline:hover { border-color: var(--line); background: #fff; }
.type-inline.saved { outline: 2px solid #86efac; }

/* lanes */
.lanes-hint { margin: 0 0 10px; font-size: .85rem; }
.lanes { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.lane { flex: 1 1 0; min-width: 172px; }
.lane-head {
  font-weight: 700; font-size: .88rem; color: var(--st);
  background: color-mix(in srgb, var(--st) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--st) 25%, #fff);
  border-radius: 10px; padding: 7px 12px; margin-bottom: 8px;
}
.lane-head b { float: right; }
.lane-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 10px; }
.lane.dragover .lane-body { outline: 2px dashed var(--gold); outline-offset: 4px; }
.lcard {
  display: block; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); cursor: grab;
}
.lcard:hover { border-color: var(--gold); }
.lcard.dragging { opacity: .4; }
.lcard-title { font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.lcard-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--muted); align-items: center; }
.lcard-scores { margin-top: 5px; font-size: .76rem; color: var(--gold-dark); font-weight: 600; }

/* matrix */
.matrix-wrap { padding: 10px; }
.matrix { width: 100%; max-width: 720px; display: block; margin: 0 auto; }
.qz { stroke: none; }
.qz-quick { fill: rgba(22, 163, 74, .06); }
.qz-bigbet { fill: rgba(217, 119, 6, .07); }
.qz-fillin { fill: rgba(107, 114, 128, .05); }
.qz-pit { fill: rgba(220, 38, 38, .05); }
.qlabel { font-size: 14px; font-weight: 700; fill: #6b7280; }
.qlabel.end { text-anchor: end; }
.matrix .axis { font-size: 12px; fill: #9ca3af; text-anchor: middle; }
.matrix .axis.end { text-anchor: end; }
.axis-label { font-size: 13px; font-weight: 600; fill: #6b7280; text-anchor: middle; }
.dot { fill: var(--st, #64748b); fill-opacity: .85; stroke: #fff; stroke-width: 2; cursor: pointer; }
.dot:hover { fill-opacity: 1; stroke: var(--gold-dark); }
#matrix-tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 280px;
  background: #1f2937; color: #fff; border-radius: 8px; padding: 8px 11px;
  font-size: .82rem; line-height: 1.35; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
#matrix-tip div { color: #d1d5db; margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; }
.legend-item { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.dotchip { width: 11px; height: 11px; border-radius: 50%; background: var(--st, #64748b); display: inline-block; }

/* detail */
.crumb { margin: 0 0 6px; font-size: .88rem; }
.crumb a { text-decoration: none; }
.detail { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.detail-main h1 { margin-top: 0; }
.meta { color: var(--muted); font-size: .9rem; margin-top: -4px; }
.block { margin-bottom: 16px; }
.detail-side label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; margin-bottom: 12px; }
.detail-side select, .detail-side input { font-size: .9rem; }
.score-row { display: flex; gap: 8px; }
.score-row label { flex: 1; }
.quadline { font-size: .88rem; margin: 2px 0 14px; color: var(--muted); }
.quadline span { font-weight: 700; color: var(--ink); }
.danger { text-align: right; margin-top: 4px; }
.prompt-box summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--gold-dark); }
.prompt-box textarea {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0 8px;
  background: #fafafa; resize: vertical;
}
.research-link { display: flex; gap: 8px; margin: 12px 0; }
.research-link input { flex: 1; font-size: .85rem; }
.upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li { padding: 6px 0; border-top: 1px solid #f1f2f4; font-size: .88rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.files a { text-decoration: none; font-weight: 600; }
.note-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-add textarea { resize: vertical; font-size: .9rem; }
.note-add .btn-small { align-self: flex-end; }
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { border-top: 1px solid #f1f2f4; padding: 9px 0; font-size: .9rem; }
.notes li .prewrap { margin: 2px 0 0; }
.notes li.sys { color: var(--muted); font-size: .82rem; }
.notes li.sys .prewrap { font-style: italic; }
.note-head { font-size: .78rem; color: var(--muted); }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail-side { order: -1; }
  .topbar { gap: 10px; }
  .topbar-right { margin-left: 0; }
}
