/* =====================================================================
   Fonds Welzijnswerk - Aanvragenportaal
   Huisstijl: paars #5C1A4A, goud #D4A017, wit.
   Standaard systeemlettertype (AVG-vriendelijk). Voor Poppins: zie PRIVACY.md.
   ===================================================================== */

:root {
  --paars: #5C1A4A;
  --paars-donker: #431336;
  --paars-licht: #f4eef2;
  --goud: #D4A017;
  --goud-donker: #b3850f;
  --wit: #ffffff;
  --inkt: #2a2230;
  --grijs: #6b6470;
  --grijs-licht: #f6f4f7;
  --rand: #e4dee8;
  --succes: #2e7d52;
  --succes-bg: #e8f5ee;
  --fout: #b3261e;
  --fout-bg: #fdecea;
  --waarschuwing: #8a6d00;
  --waarschuwing-bg: #fdf6e3;
  --radius: 12px;
  --radius-s: 8px;
  --schaduw: 0 2px 8px rgba(67, 19, 54, 0.08);
  --schaduw-l: 0 8px 28px rgba(67, 19, 54, 0.14);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--inkt);
  background: var(--grijs-licht);
  line-height: 1.55;
  font-size: 16px;
}

a { color: var(--paars); }
a:hover { color: var(--goud-donker); }

/* ---- Topbalk ---- */
.site-header {
  background: var(--paars);
  color: var(--wit);
  padding: 18px 20px;
}
.site-header .wrap {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header img.logo { height: 52px; width: auto; display: block; }
.site-header .brand-fallback {
  font-weight: 700; font-size: 1.25rem; letter-spacing: .3px;
}
.site-header .brand-sub { margin-left:8px; opacity:.85; font-weight:400; font-size: .85rem; opacity: .85; font-weight: 400; }

/* ---- Container ---- */
.container { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; }
.card {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 28px;
}

/* ---- Koppen ---- */
h1 { font-size: 1.7rem; margin: 0 0 6px; color: var(--paars); font-weight: 700; }
h2 { font-size: 1.25rem; margin: 26px 0 12px; color: var(--paars); font-weight: 600; }
h3 { font-size: 1.05rem; margin: 18px 0 8px; font-weight: 600; }
.lead { color: var(--grijs); margin: 0 0 18px; }

/* ---- Stappenindicator ---- */
.steps { display: flex; gap: 8px; margin: 0 0 26px; flex-wrap: wrap; }
.steps .step {
  flex: 1 1 0; min-width: 120px;
  padding: 10px 12px; border-radius: var(--radius-s);
  background: var(--grijs-licht); border: 1px solid var(--rand);
  font-size: .9rem; color: var(--grijs);
}
.steps .step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; margin-right: 8px;
  background: var(--rand); color: var(--inkt); font-weight: 600; font-size: .8rem;
}
.steps .step.active { background: var(--paars-licht); border-color: var(--paars); color: var(--paars); font-weight: 600; }
.steps .step.active .num { background: var(--paars); color: var(--wit); }
.steps .step.done .num { background: var(--goud); color: var(--wit); }

/* ---- Formulier ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem; }
.field .hint { color: var(--grijs); font-size: .85rem; margin: 2px 0 6px; }
.field .req { color: var(--goud-donker); }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=url],
.field input[type=number],
.field input[type=date],
.field input[type=password],
.field input[type=file],
.field textarea,
.field select {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--inkt);
  border: 1.5px solid var(--rand); border-radius: var(--radius-s);
  background: var(--wit); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--paars);
  box-shadow: 0 0 0 3px rgba(92, 26, 74, 0.15);
}
.field.has-error input, .field.has-error textarea, .field.has-error select {
  border-color: var(--fout); background: #fff8f7;
}
.field .error { color: var(--fout); font-size: .85rem; margin-top: 4px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .field { flex: 1 1 220px; }

fieldset { border: 1px solid var(--rand); border-radius: var(--radius-s); padding: 16px 18px; margin: 0 0 18px; }
legend { font-weight: 600; color: var(--paars); padding: 0 6px; }

/* ---- Akkoordverklaringen ---- */
.agreement {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--rand); border-radius: var(--radius-s);
  margin-bottom: 10px; background: var(--wit);
}
.agreement input[type=checkbox] { margin-top: 4px; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--paars); }
.agreement label { font-weight: 400; font-size: .95rem; }

/* ---- Knoppen ---- */
.btn {
  display: inline-block; cursor: pointer; font: inherit; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius-s); border: 1.5px solid transparent;
  text-decoration: none; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--paars); color: var(--wit); }
.btn-primary:hover { background: #4a1540; color: var(--wit); }
.btn-gold { background: var(--goud); color: #3a2a00; }
.btn-gold:hover { background: var(--goud-donker); color: var(--wit); }
.btn-ghost { background: var(--wit); color: var(--paars); border-color: var(--paars); }
.btn-ghost:hover { background: var(--paars-licht); }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-danger { background: var(--wit); color: var(--fout); border-color: var(--fout); }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ---- Meldingen ---- */
.alert { padding: 13px 16px; border-radius: var(--radius-s); margin-bottom: 16px; font-size: .95rem; border: 1px solid transparent; }
.alert-success { background: var(--succes-bg); color: var(--succes); border-color: #bfe3cd; }
.alert-error { background: #fdecea; color: var(--fout); border-color: #f3c7c3; }
.alert-info { background: var(--paars-licht); color: var(--paars); border-color: #e3d3df; }
.alert-warn { background: var(--waarschuwing-bg); color: var(--waarschuwing); border-color: #f0e2b0; }

/* ---- Privacy/links voettekst ---- */
.policy-links { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rand); font-size: .85rem; color: var(--grijs); }
.policy-links a { margin-right: 14px; white-space: nowrap; }
.privacy-note { background: var(--paars-licht); border-radius: var(--radius-s); padding: 12px 14px; font-size: .88rem; color: var(--paars); margin-bottom: 18px; }

/* ---- Site-voettekst ---- */
.site-footer { background: var(--paars); color: rgba(255,255,255,.85); text-align: center; padding: 22px; font-size: .85rem; }
.site-footer a { color: var(--goud); }

/* =====================  BEHEERPANEEL  ===================== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 230px; background: var(--paars); color: var(--wit);
  padding: 20px 0; flex-shrink: 0;
}
.admin-nav .brand { padding: 0 20px 18px; font-weight: 700; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 12px; }
.admin-nav .brand span { display: block; font-size: .75rem; font-weight: 400; opacity: .8; }
.admin-nav a {
  display: block; padding: 11px 20px; color: rgba(255,255,255,.85);
  text-decoration: none; font-size: .95rem; border-left: 3px solid transparent;
}
.admin-nav a:hover { background: rgba(255,255,255,.08); color: var(--wit); }
.admin-nav a.active { background: rgba(255,255,255,.12); color: var(--wit); border-left-color: var(--goud); font-weight: 600; }
.admin-nav .nav-foot { padding: 16px 20px; font-size: .8rem; opacity: .75; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.admin-main { flex: 1; padding: 28px 32px 60px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-topbar .user { font-size: .9rem; color: var(--grijs); }

/* ---- Dashboard tegels ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tile { background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px; box-shadow: var(--schaduw); }
.tile .n { font-size: 1.9rem; font-weight: 700; color: var(--paars); line-height: 1.1; }
.tile .l { font-size: .85rem; color: var(--grijs); margin-top: 4px; }

/* ---- Tabel ---- */
table.data { width: 100%; border-collapse: collapse; background: var(--wit); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schaduw); }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rand); font-size: .92rem; }
table.data th { background: var(--paars-licht); color: var(--paars); font-weight: 600; }
table.data tr:hover td { background: #faf8fb; }
table.data a { font-weight: 600; }

/* ---- Statuslabels ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.badge-grijs { background: var(--grijs-licht); color: var(--grijs); border: 1px solid var(--rand); }
.badge-blauw { background: #e8eefc; color: #2a4ba0; }
.badge-goud  { background: var(--waarschuwing-bg); color: var(--waarschuwing); }
.badge-groen { background: var(--succes-bg); color: var(--succes); }
.badge-rood  { background: #fdecea; color: var(--fout); }

/* ---- Filters ---- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: flex-end; }
.filters .field { margin: 0; }
.filters input, .filters select { padding: 8px 10px; }

/* ---- Detail definitielijst ---- */
dl.detail { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 0; }
dl.detail dt { font-weight: 600; color: var(--grijs); font-size: .9rem; }
dl.detail dd { margin: 0; }
.section { background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--schaduw); }

/* ---- Login ---- */
.login-wrap { max-width: 420px; margin: 8vh auto; }

/* ---- Responsief ---- */
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; display: flex; flex-wrap: wrap; padding: 10px; }
  .admin-nav .brand { width: 100%; border: none; padding-bottom: 8px; }
  .admin-nav a { border-left: none; border-radius: var(--radius-s); }
  .admin-main { padding: 20px; }
  dl.detail { grid-template-columns: 1fr; }
  dl.detail dt { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- ACCP-banner (acceptatieomgeving) ---- */
.accp-banner {
  background: #8a1f1f; color: #fff; text-align: center;
  padding: 8px 14px; font-size: .9rem; font-weight: 600;
  letter-spacing: .3px; position: sticky; top: 0; z-index: 1000;
}
@media (max-width: 480px) { .accp-banner { font-size: .78rem; padding: 6px 10px; } }

/* ---- Responsieve tabellen (horizontaal scrollen op smal scherm) ---- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table.data { min-width: 640px; }

/* ---- Tweekoloms grid (informatiecentrum e.d.), stapelt op mobiel ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- Menusecties in het beheerpaneel ---- */
.admin-nav .nav-section {
  margin: 16px 16px 4px;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  font-weight: 600;
}
.admin-nav .nav-section:first-of-type { margin-top: 8px; }

/* ---- F2: begroting/cofinanciers-tabellen + tellers ---- */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th, .mini-table td { padding: 6px; text-align: left; vertical-align: top; }
.mini-table input, .mini-table select { width: 100%; }
.char-counter { text-align: right; font-size: .78rem; }
@media (max-width: 768px) {
  .mini-table thead { display: none; }
  .mini-table tr { display: block; border: 1px solid #e6e0e6; border-radius: 8px; padding: 8px; margin-bottom: 10px; }
  .mini-table td { display: block; }
}
