/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #FCFFF6;
  color: #202262;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ────────────────────────────────────────────────────── */
.app-header {
  background: #202262;
  color: #fff;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header-inner { display: flex; align-items: baseline; gap: 12px; }
.header-logo {
  font-size: 20px;
  font-weight: 800;
  color: #93C320;
  letter-spacing: 0.5px;
}
.header-title {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
}

/* ── Stepper ───────────────────────────────────────────────────── */
.stepper-wrap {
  background: #fff;
  border-bottom: 1px solid #e8eede;
  padding: 20px 32px;
  flex-shrink: 0;
}
.stepper {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #c8d4a0;
  background: #fff;
  color: #a0a8c0;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.step-label {
  font-size: 11px;
  color: #a0a8c0;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}
.step-line {
  flex: 1;
  height: 2px;
  background: #e0e8c8;
  margin: 0 8px;
  margin-bottom: 18px;
  transition: background 0.3s;
}

.step-item.active .step-circle,
.step-item.done .step-circle {
  background: #93C320;
  border-color: #93C320;
  color: #fff;
}
.step-item.active .step-label,
.step-item.done .step-label { color: #202262; }
.step-item.done .step-circle::before { content: "✓"; font-size: 13px; }
.step-item.done .step-circle { font-size: 0; }
.step-line.done { background: #93C320; }

/* ── Wizard main ───────────────────────────────────────────────── */
.wizard-main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 100px;
}

.step-panel { display: none; }
.step-panel.active { display: block; }

h2 {
  font-size: 22px;
  font-weight: 700;
  color: #202262;
  margin-bottom: 6px;
}
.step-intro {
  font-size: 14px;
  color: #5a6080;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Drop zone ─────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed #b8d060;
  border-radius: 12px;
  background: #fff;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #93C320;
  background: #f4fce0;
}
.drop-zone.success {
  border-color: #93C320;
  border-style: solid;
  background: #f4fce0;
}
.drop-icon { font-size: 40px; margin-bottom: 12px; }
.drop-text { font-size: 16px; font-weight: 600; color: #202262; margin-bottom: 4px; }
.drop-sub { font-size: 13px; color: #8a92b0; margin-bottom: 14px; }

/* ── Feedback / info card ──────────────────────────────────────── */
.feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.feedback.success { background: #edfada; color: #2a6610; border: 1px solid #b8e080; }
.feedback.error   { background: #fdecea; color: #c0001a; border: 1px solid #f4b0b0; }

.info-card {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #dde8b8;
  border-radius: 10px;
  padding: 16px 20px;
}
.info-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f4e4;
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: #6a74a0; min-width: 100px; }
.info-value { font-weight: 600; color: #202262; }

/* ── Form ──────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }

label { font-size: 13px; font-weight: 600; color: #202262; }
.req { color: #93C320; }

input[type="text"],
select {
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #d0d8b0;
  border-radius: 8px;
  font-size: 14px;
  color: #202262;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus,
select:focus { border-color: #93C320; }
input[type="text"]::placeholder { color: #b0b8d0; }

.radio-group { display: flex; gap: 24px; margin-top: 4px; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.radio-label input[type="radio"] { display: none; }
.radio-custom {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c0c8d8;
  display: inline-block;
  position: relative;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #93C320;
}
.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #93C320;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.radio-label small { color: #8a92b0; font-weight: 400; }

/* ── Global toggle bar ─────────────────────────────────────────── */
.global-toggle-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #dde8b8;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.toggle-hint { font-size: 12px; color: #8a92b0; }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-switch {
  width: 40px;
  height: 22px;
  background: #d0d8b8;
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: "";
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-label input:checked + .toggle-switch { background: #93C320; }
.toggle-label input:checked + .toggle-switch::after { left: 21px; }

/* ── Grafiek kaarten ───────────────────────────────────────────── */
.grafiek-lijst { display: flex; flex-direction: column; gap: 12px; }

.grafiek-card {
  background: #fff;
  border: 1.5px solid #dde8b8;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, opacity 0.2s;
}
.grafiek-card.disabled {
  opacity: 0.55;
  border-color: #e0e4ee;
}
.grafiek-card.dev-mode { border-color: #f0d88a; }

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  flex-wrap: wrap;
  user-select: none;
}
.card-toggle { flex-shrink: 0; }
.card-id {
  font-size: 11px;
  font-weight: 700;
  color: #93C320;
  background: #f0fad0;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
  text-transform: uppercase;
}
.grafiek-card.disabled .card-id { background: #f0f0f0; color: #a0a8b8; }
.card-naam { font-size: 14px; font-weight: 600; color: #202262; flex: 1; min-width: 80px; }
.card-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.status-ready  { background: #edfada; color: #2a6610; }
.status-dev    { background: #fff3cc; color: #7a5a00; }
.card-actions {
  flex-basis: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #eef4e0;
  margin-top: 2px;
}
.card-expand-btn,
.card-preview-btn {
  font-size: 11px;
  color: #6a72a0;
  background: #f0f4fc;
  border: 1px solid #d4d8ec;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 10px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.card-expand-btn:hover,
.card-preview-btn:hover {
  background: #e4eaf8;
  color: #202262;
}

/* ── Preview sectie ────────────────────────────────────────────── */
.card-preview-section {
  border-top: 1px solid #f0f4e4;
  background: #f8faf0;
  padding: 16px 18px;
}
.preview-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6a74a0;
  padding: 20px 0;
}
.preview-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d0d8b8;
  border-top-color: #93C320;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.preview-img {
  width: 100%;
  max-width: 560px;
  border-radius: 8px;
  border: 1px solid #dde8b8;
  display: block;
  margin: 0 auto;
}
.preview-error {
  font-size: 13px;
  color: #7a6020;
  background: #fff8e0;
  border: 1px solid #f0d880;
  border-radius: 6px;
  padding: 10px 14px;
}

.card-body {
  border-top: 1px solid #f0f4e4;
  padding: 14px 18px 18px;
  display: none;
}
.card-body.open { display: block; }

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #202262;
  padding: 6px 0;
}
.option-row label { font-weight: 500; cursor: pointer; }
.option-row input[type="checkbox"] { accent-color: #93C320; width: 15px; height: 15px; }

.loading-placeholder {
  text-align: center;
  color: #a0a8b8;
  padding: 40px;
  font-size: 14px;
}

/* ── Stap 4 ────────────────────────────────────────────────────── */
.status-area {
  margin-bottom: 28px;
}
.progress-bar-wrap {
  height: 8px;
  background: #e0e8c8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar {
  height: 100%;
  background: #93C320;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.status-text { font-size: 13px; color: #6a74a0; }

.download-area {
  background: #fff;
  border: 1.5px solid #b8e080;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.download-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #2a6610;
  margin-bottom: 20px;
}
.success-icon {
  width: 32px;
  height: 32px;
  background: #93C320;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.download-buttons { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.btn-download { min-width: 200px; }

.error-area {
  background: #fdecea;
  border: 1px solid #f4b0b0;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.error-title { font-weight: 700; color: #c0001a; margin-bottom: 6px; }
.error-detail { font-size: 13px; color: #8a2030; margin-bottom: 14px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary  { background: #93C320; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #7aaa10; }
.btn-secondary { background: #e8eef8; color: #202262; border: 1.5px solid #c8d0e8; }
.btn-secondary:hover:not(:disabled) { background: #d8e4f4; }
.btn-outline {
  background: transparent;
  color: #202262;
  border: 1.5px solid #c0c8d8;
}
.btn-outline:hover:not(:disabled) { background: #f0f4fc; }
.btn-lg { padding: 13px 32px; font-size: 15px; width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── Wizard nav (sticky footer) ────────────────────────────────── */
.wizard-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e8c8;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

/* ── Optionele secties ─────────────────────────────────────────── */
.optionele-secties {
  margin-top: 32px;
  border-top: 1px solid #e0e8c8;
  padding-top: 24px;
}
.secties-titel {
  font-size: 14px;
  font-weight: 700;
  color: #202262;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.sectie-blok {
  border: 1.5px solid #dde8b8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
}
.sectie-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sectie-naam {
  font-size: 14px;
  font-weight: 700;
  color: #202262;
}
.sectie-omschrijving {
  font-size: 13px;
  color: #8a92b0;
}
.sectie-velden {
  border-top: 1px solid #eef3e0;
  padding-top: 16px;
}

/* ── Foto dropzones ────────────────────────────────────────────── */
.foto-rij {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.incidenten-grid {
  grid-template-columns: repeat(3, 1fr);
}
.foto-vak { display: flex; flex-direction: column; gap: 6px; }
.foto-label { font-size: 12px; font-weight: 600; color: #5a6080; }
.foto-dropzone {
  border: 2px dashed #c8d4a0;
  border-radius: 8px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 12px;
  color: #8a92b0;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.foto-dropzone:hover,
.foto-dropzone.drag-over { border-color: #93C320; background: #f4fce0; }
.foto-dropzone.uploaded  { border-color: #93C320; border-style: solid; background: #f4fce0; color: #2a6610; font-weight: 600; }
.foto-dropzone.uploading { border-color: #b0b8d0; color: #b0b8d0; }
.incidenten-teller {
  margin-top: 10px;
  font-size: 13px;
  color: #6a74a0;
}

/* ── Utilities ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .stepper-wrap { padding: 16px; }
  .wizard-main { padding: 20px 16px 90px; }
  .wizard-nav { padding: 12px 16px; }
  .step-label { display: none; }
}

/* ── CSV-profiel card (stap 1) ─────────────────────────────────── */
.profiel-card {
  margin-top: 18px;
  padding: 20px 22px;
  background: #f4fce0;
  border: 1px solid #97be1f;
  border-radius: 10px;
}
.profiel-titel {
  margin: 0 0 14px;
  font-size: 16px;
  color: #19233C;
  font-weight: 600;
}
.profiel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.profiel-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(151, 190, 31, 0.25);
}
.stat-getal {
  font-size: 22px;
  font-weight: 700;
  color: #19233C;
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: #6a74a0;
  margin-top: 4px;
  text-align: center;
}
.profiel-aanbeveling {
  padding: 10px 14px;
  background: #ffffff;
  border-left: 4px solid #97be1f;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #19233C;
}
.aanbeveling-label {
  color: #6a74a0;
  margin-right: 6px;
}
.aanbeveling-waarde {
  color: #5b8a0c;
  font-weight: 600;
}
.profiel-warnings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.warning-item {
  padding: 8px 12px;
  background: #fff4e8;
  border-left: 3px solid #e8820f;
  border-radius: 4px;
  font-size: 13px;
  color: #8a4a0c;
}

/* ── Output-type info (stap 2) ─────────────────────────────────── */
.output-info {
  margin-top: 12px;
  padding: 12px 16px;
  background: #f6f8fc;
  border-left: 3px solid #97be1f;
  border-radius: 4px;
  font-size: 13px;
  color: #19233C;
  line-height: 1.5;
}
.info-aanbeveling {
  margin-top: 6px;
  font-size: 13px;
  color: #5b8a0c;
}

/* ── Filter-blokken in grafiekkaarten (stap 3) ─────────────────── */
.filter-block {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f6f8fc;
  border: 1px solid #e0e4ee;
  border-radius: 6px;
}
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}
.filter-label { font-weight: 600; color: #19233C; }
.filter-count { color: #6a74a0; font-weight: normal; }
.filter-hint  { font-size: 12px; color: #6a74a0; font-style: italic; }
.filter-alle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6a74a0;
  cursor: pointer;
}
.filter-opties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 0;
}
.filter-optie {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #d8dde8;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
}
.filter-optie:hover { border-color: #97be1f; }
.filter-optie input[type=checkbox] { margin: 0; }
.filter-leeg {
  font-size: 12px;
  color: #6a74a0;
  font-style: italic;
  padding: 6px 0;
}
.filter-periodes .filter-opties {
  background: #fffceb;
  padding: 8px;
  border-radius: 4px;
}

/* ── Auto-disabled grafiekkaarten ──────────────────────────────── */
.grafiek-card.not-applicable {
  opacity: 0.6;
  background: #f6f8fc;
}
.grafiek-card.not-applicable .card-naam,
.grafiek-card.not-applicable .card-id {
  color: #b0b8d0;
}
.card-blocked-reden {
  margin: 8px 14px 4px;
  padding: 6px 10px;
  background: #fff0f0;
  border-left: 3px solid #d9001e;
  border-radius: 3px;
  font-size: 12px;
  color: #802030;
}
.card-waarschuwing {
  margin: 8px 14px 4px;
  padding: 6px 10px;
  background: #fff4e8;
  border-left: 3px solid #e8820f;
  border-radius: 3px;
  font-size: 12px;
  color: #8a4a0c;
}
.status-blocked {
  background: #fff0f0;
  color: #802030;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
}
