:root {
  --bg: #f6f2ff;
  --bg-soft: #fbf9ff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --field: #f2f2ff;
  --border: #d9d1e5;
  --border-strong: #43177e;
  --text: #212529;
  --muted: #51545c;
  --brand: #43177e;
  --brand-strong: #280e4c;
  --brand-hover: #361265;
  --accent: #66d7d1;
  --accent-warm: #ff70a7;
  --lavender: #eee5ff;
  --success: #1f7a4e;
  --error: #9c2f34;
  --shadow: 0 1rem 3rem rgba(67, 23, 126, 0.13);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 9px;
  --shell: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(102, 215, 209, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 12rem, rgba(255, 112, 167, 0.13), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 42%, #ffffff 100%);
  font-size: 1.03rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-underline-offset: 0.22em;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
[tabindex] {
  outline-offset: 4px;
}

button:not(:disabled),
a[href],
.choice-pill span,
.activity-card,
.panel,
.stat-card {
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

:focus-visible {
  outline: 3px solid var(--brand);
}

.shell {
  width: calc(100% - 40px);
  max-width: var(--shell);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 20;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0.35rem 1.25rem rgba(67, 23, 126, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 104px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.brand__logo {
  width: clamp(220px, 26vw, 320px);
  max-width: 44vw;
  height: auto;
}

.brand__text {
  max-width: 240px;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  padding-left: 18px;
  border-left: 2px solid var(--lavender);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav--public {
  margin-left: auto;
}

.site-nav a,
.inline-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.inline-link:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}

.site-nav .header-home-button:hover {
  text-decoration: none;
}

.flash-stack {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.flash {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.flash--success {
  background: rgba(31, 122, 78, 0.12);
  color: var(--success);
  border-color: rgba(31, 122, 78, 0.2);
}

.flash--error {
  background: rgba(156, 47, 52, 0.12);
  color: var(--error);
  border-color: rgba(156, 47, 52, 0.2);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 7vw, 84px) 0;
  color: white;
  background:
    linear-gradient(115deg, var(--brand) 0 63%, var(--brand-strong) 63% 100%);
  margin-bottom: 34px;
}

.hero::before {
  position: absolute;
  top: -105px;
  right: 20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--accent-warm);
  content: "";
  opacity: 0.2;
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0.14;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  align-items: center;
  min-width: 0;
}

.summary-card,
.panel,
.success-card,
.admin-login-card,
.table-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero__copy {
  padding: 10px 0;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero__copy .eyebrow {
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

h3 {
  font-size: 1.05rem;
}

.hero__lead {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: clamp(1.12rem, 1.8vw, 1.28rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  overflow-wrap: break-word;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.hero__meta div:nth-child(3) {
  grid-column: 1 / -1;
}

.hero__meta div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  min-width: 0;
}

.hero__meta strong {
  font-size: 1rem;
}

.hero__meta span {
  color: rgba(255, 255, 255, 0.82);
  overflow-wrap: anywhere;
}

.summary-card {
  position: sticky;
  top: 128px;
  padding: 28px;
  color: var(--text);
  border: 0;
  box-shadow: 14px 14px 0 rgba(102, 215, 209, 0.78), var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.summary-card h2 {
  margin-bottom: 18px;
}

.summary-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.summary-list__total {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.summary-card__note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.form-shell,
.admin-shell,
.success-shell,
.admin-login-shell {
  padding-bottom: 56px;
}

.declaration-form,
.admin-shell {
  display: grid;
  gap: 20px;
}

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

.panel--compact {
  padding: 24px;
}

.panel__header {
  display: flex;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.panel__header p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.panel__number {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--lavender);
}

.field-grid {
  display: grid;
  gap: 18px;
}

.field-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid--activity {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.upload-field span {
  font-weight: 600;
  color: var(--brand);
}

.field input,
.field select,
.field textarea,
.upload-field input {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--field);
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.upload-field input:focus {
  outline: 3px solid var(--accent);
  border-color: var(--brand);
  background: white;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.upload-field input:hover {
  border-color: var(--brand);
}

.field--full,
.field--wide {
  grid-column: 1 / -1;
}

.upload-field {
  display: grid;
  gap: 8px;
}

.upload-field small,
.field small,
.muted {
  color: var(--muted);
}

.activity-list {
  display: grid;
  gap: 16px;
}

.activity-card {
  border: 2px solid var(--border);
  border-left: 6px solid var(--brand);
  background: linear-gradient(180deg, white, var(--bg-soft));
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.activity-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0.45rem 0 rgba(67, 23, 126, 0.08);
}

.activity-card__top,
.panel__actions,
.success-actions,
.detail-header,
.detail-header__actions,
.export-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.activity-card__title {
  display: flex;
  gap: 6px;
  align-items: center;
}

.activity-card__totals {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.activity-card__totals div {
  min-width: 190px;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--lavender);
  border: 1px solid var(--border);
}

.activity-card__totals span {
  color: var(--muted);
  font-size: 0.92rem;
}

.field--toggle {
  align-content: start;
}

.switch {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--field);
}

.switch input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 2px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  gap: 8px;
}

.primary-button {
  background: var(--brand);
  color: white;
}

.primary-button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 0.22rem 0 rgba(67, 23, 126, 0.22);
}

.secondary-button {
  background: white;
  color: var(--brand);
}

.secondary-button:hover {
  background: var(--bg-soft);
  border-color: var(--brand-hover);
  color: var(--brand-hover);
  box-shadow: 0 0.22rem 0 rgba(67, 23, 126, 0.18);
}

.inline-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.inline-button:hover {
  color: var(--brand-hover);
}

.ghost-button {
  background: white;
  color: var(--brand);
}

.ghost-button:hover {
  background: var(--bg-soft);
  border-color: var(--brand);
  box-shadow: 0 0.22rem 0 rgba(67, 23, 126, 0.14);
}

.signature-mode {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.signature-mode legend {
  margin-bottom: 12px;
  font-weight: 600;
}

.choice-pill {
  position: relative;
}

.choice-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: white;
  font-weight: 600;
  color: var(--text);
}

.choice-pill input:checked + span {
  background: var(--lavender);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0.22rem 0 rgba(67, 23, 126, 0.16);
}

.signature-panel {
  display: grid;
  gap: 14px;
}

.signature-panel[hidden] {
  display: none !important;
}

.signature-canvas-wrap {
  border-radius: var(--radius-lg);
  border: 2px dashed var(--brand);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 249, 255, 0.96)),
    repeating-linear-gradient(180deg, transparent, transparent 38px, rgba(67, 23, 126, 0.08) 38px, rgba(67, 23, 126, 0.08) 39px);
  overflow: hidden;
}

#signature-canvas {
  width: 100%;
  height: auto;
  touch-action: none;
  display: block;
}

.signature-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.check-row {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 20px;
}

.check-row input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.panel__actions--spread {
  justify-content: space-between;
}

.success-shell,
.admin-login-shell {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.success-card,
.admin-login-card {
  padding: 34px;
  width: min(620px, 100%);
}

.success-card p,
.admin-login-card p {
  color: var(--muted);
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.qr-panel {
  width: fit-content;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  margin: 18px 0;
}

.qr-panel img {
  width: 190px;
  height: 190px;
}

.secret-key {
  display: inline-block;
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.notice-box,
.note-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--lavender);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
}

.admin-shell {
  gap: 22px;
  padding-top: 34px;
}

.admin-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 34px;
  color: white;
  background: linear-gradient(115deg, var(--brand) 0 63%, var(--brand-strong) 63% 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.admin-hero::before {
  position: absolute;
  right: 18%;
  top: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--accent-warm);
  content: "";
  opacity: 0.18;
}

.admin-hero > * {
  position: relative;
  z-index: 1;
}

.admin-hero .eyebrow {
  color: var(--accent);
}

.admin-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
}

.admin-hero .primary-button,
.admin-hero .secondary-button {
  background: white;
  border-color: white;
  color: var(--brand);
}

.admin-hero .primary-button:hover,
.admin-hero .secondary-button:hover {
  background: var(--bg-soft);
  border-color: var(--bg-soft);
  color: var(--brand-hover);
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
  display: grid;
  gap: 6px;
  border-top: 5px solid var(--accent);
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--brand);
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.table-card {
  overflow: auto;
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.data-table th {
  color: var(--brand);
  font-size: 0.92rem;
  background: var(--bg-soft);
}

.data-table tr:hover td {
  background: rgba(238, 229, 255, 0.42);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  background: var(--lavender);
  color: var(--brand);
}

.status-badge--betaald {
  background: rgba(31, 122, 78, 0.12);
  color: var(--success);
}

.status-badge--goedgekeurd {
  background: rgba(102, 215, 209, 0.2);
  color: #006a67;
}

.detail-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  text-align: right;
}

.status-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.asset-block + .asset-block {
  margin-top: 22px;
}

.asset-preview {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 0.45rem 1.5rem rgba(67, 23, 126, 0.08);
}

.asset-preview--signature {
  max-width: 320px;
}

.asset-list {
  padding-left: 18px;
  margin: 0;
}

.event-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.event-list li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.event-list span {
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .hero__grid,
  .hero__meta,
  .detail-grid,
  .stats-grid,
  .filter-bar,
  .field-grid--two,
  .field-grid--activity {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .hero__meta div:nth-child(3) {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 26px);
  }

  .site-header__inner,
  .brand,
  .site-nav,
  .panel__header,
  .activity-card__top,
  .activity-card__totals,
  .panel__actions--spread,
  .admin-hero,
  .signature-tools,
  .detail-header {
    align-items: stretch;
  }

  .site-header__inner,
  .brand,
  .site-nav,
  .panel__header,
  .panel__actions,
  .success-actions,
  .activity-card__top,
  .activity-card__totals,
  .signature-tools,
  .detail-header,
  .detail-header__actions,
  .export-actions {
    flex-direction: column;
  }

  .hero {
    padding: 34px 0;
  }

  .summary-card,
  .panel,
  .success-card,
  .admin-login-card,
  .stat-card {
    padding: 22px;
    border-radius: 22px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .brand__logo {
    width: 170px;
    max-width: 100%;
  }

  .brand__text {
    max-width: none;
    padding-left: 0;
    border-left: 0;
  }
}
