:root {
  --bg: #0f172a;
  --panel: #182235;
  --panel-soft: #111827;
  --border: #334155;
  --text: #f8fafc;
  --muted: #a8bdd7;
  --accent: #f59e0b;
  --danger: #ef4444;
  --ok: #22c55e;
}

* { box-sizing: border-box; }

body {
  --form-bg-position: center;
  --form-bg-accent: rgba(245, 158, 11, 0.16);
  --form-bg-image: url("/assets/public-form-herintrede-background.svg");
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 8%, var(--form-bg-accent), transparent 30%),
    linear-gradient(90deg, rgba(5, 12, 22, 0.88), rgba(5, 12, 22, 0.52) 52%, rgba(5, 12, 22, 0.88)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.88)),
    var(--form-bg-image) var(--form-bg-position) / cover no-repeat,
    #0f172a;
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

body[data-form-slug="klachten"] {
  --form-bg-image: url("/assets/klachten-background.svg");
  --form-bg-position: center;
  --form-bg-accent: rgba(239, 68, 68, 0.16);
}

body[data-form-slug="otc"] {
  --form-bg-image: url("/assets/otc-background.svg");
  --form-bg-position: 48% center;
  --form-bg-accent: rgba(56, 189, 248, 0.18);
}

body[data-form-slug="w-s"] {
  --form-bg-image: url("/assets/ws-background.svg");
  --form-bg-position: 42% center;
  --form-bg-accent: rgba(245, 158, 11, 0.18);
}

body[data-form-slug="hovj"] {
  --form-bg-image: url("/assets/hovj-background.svg");
  --form-bg-position: 56% center;
  --form-bg-accent: rgba(96, 165, 250, 0.18);
}

body[data-form-slug="hrb"] {
  --form-bg-image: url("/assets/hrb-background.svg");
  --form-bg-position: 40% center;
  --form-bg-accent: rgba(100, 116, 139, 0.2);
}

body[data-form-slug="herintrede"] {
  --form-bg-image: url("/assets/public-form-herintrede-background.svg");
  --form-bg-position: 52% center;
  --form-bg-accent: rgba(245, 158, 11, 0.16);
}

body[data-form-slug="overstap"] {
  --form-bg-image: url("/assets/public-form-overstap-background.svg");
  --form-bg-position: 50% center;
  --form-bg-accent: rgba(56, 189, 248, 0.15);
}

body[data-form-slug] .form-card {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(71, 85, 105, 0.78);
}

.form-shell {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.form-card {
  background: rgba(24, 34, 53, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.form-card-hero {
  padding: 28px;
  border-top: 5px solid var(--accent);
}

.eyebrow {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.form-subtitle {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.form-notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  line-height: 1.55;
  white-space: pre-line;
}

.form-fields {
  margin-top: 18px;
  padding: 22px;
}

.field {
  padding: 18px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.75);
}

.field:first-child { padding-top: 0; }
.field:last-child { border-bottom: 0; }

.field-section {
  display: grid;
  gap: 10px;
  margin: 24px 0 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.field-section h2 {
  margin: 0;
  padding: 13px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  line-height: 1.25;
}

.field-section p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--text);
  line-height: 1.55;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.required { color: var(--danger); }

.help {
  margin: -2px 0 12px;
  color: #fbbf24;
  font-size: 13px;
  line-height: 1.45;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #3f5068;
  border-radius: 10px;
  background: #0f172a;
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

textarea {
  min-height: 132px;
  overflow: hidden;
  resize: none;
}


.file-input {
  padding: 11px 14px;
  cursor: pointer;
}

.file-input::file-selector-button {
  margin-right: 14px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.16);
  color: #fed7aa;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 9px 12px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}


.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-option {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  margin: 0;
  min-width: 150px;
  padding: 12px 14px;
}

.checkbox-option input {
  accent-color: var(--accent);
  width: auto;
}

.login-button {
  align-items: center;
  background: var(--accent);
  border-radius: 12px;
  color: #111827;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  margin-top: 6px;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
}
.submit-button {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 15px 18px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.5;
}

.form-message.ok {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.13);
  color: #bbf7d0;
}

.form-message.error {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.13);
  color: #fecaca;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

@media (max-width: 640px) {
  .form-shell { padding: 24px 0; }
  .form-card-hero, .form-fields { padding: 18px; }
}

.form-admin {
  margin-top: 18px;
  padding: 22px;
}

.form-admin[hidden] {
  display: none;
}

.form-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-admin-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.form-admin-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-admin-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-admin-grid[hidden] {
  display: none;
}

.form-admin-grid label,
.form-admin-grid .full {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-weight: 900;
}

.form-admin-grid .full,
.form-admin-grid menu,
#formAdminMessage {
  grid-column: 1 / -1;
}

.form-admin-grid textarea {
  overflow: hidden;
  resize: none;
}

.form-question-editor {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.42);
}

.form-question-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-question-editor-head h3 {
  margin: 0;
  font-size: 17px;
}

.admin-question-list {
  display: grid;
  gap: 12px;
}

.admin-question-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(120px, 0.7fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
}

.admin-question-card label {
  margin: 0;
}

.admin-question-card .question-options {
  grid-column: 1 / -1;
}

.admin-question-card .question-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  color: var(--muted);
}

.admin-question-card .question-meta input {
  width: auto;
}

.form-admin-grid menu {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ghost-button {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 720px) {
  body[data-form-slug] .form-shell {
    width: min(100% - 20px, 760px);
    margin-left: auto;
    margin-right: auto;
  }

  .form-admin-head,
  .form-admin-grid menu {
    align-items: stretch;
    flex-direction: column;
  }

  .form-admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-question-card {
    grid-template-columns: 1fr;
  }
}
