:root {
  --color-primary: #008aff;
  --color-primary-dark: #006fcf;
  --color-primary-ink: #07467a;
  --color-surface: #ffffff;
  --color-canvas: #f4f7fb;
  --color-text: #162033;
  --color-text-strong: #101828;
  --color-text-secondary: #344054;
  --color-muted: #667085;
  --color-border: #dfe5ee;
  --color-info-border: #8bcaff;
  --color-info-surface: #f4f9fd;
  --color-warning: #93370d;
  --color-warning-border: #fedf89;
  --color-warning-surface: #fffaeb;
  --color-danger: #b42318;
  --color-danger-dark: #8f1b13;
  --color-success: #067647;
  --color-success-border: #75e0a7;
  --color-success-surface: #ecfdf3;
  --color-neutral-border: #d0d5dd;
  --color-neutral-surface: #f2f4f7;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.07);
  --shadow-md: 0 10px 28px rgba(16, 24, 40, 0.11);
  --focus-ring: 0 0 0 3px rgba(0, 138, 255, 0.24);
  --header-height: 4.5rem;
  --mobile-nav-height: 4.25rem;
  color-scheme: light;
}

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

html {
  min-width: 0;
  font-size: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

button,
[role="button"] {
  touch-action: manipulation;
}

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

a {
  color: var(--color-primary-dark);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.button,
.btn {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.62rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.styleBlue,
.btn-primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.styleBlue:hover,
.styleBlue:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
}

.styleWhite,
.btn-link {
  border-color: var(--color-primary);
  background: #fff;
  color: var(--color-primary-ink);
}

.styleWhite:hover,
.btn-link:hover {
  background: #edf7ff;
}

.btn-danger,
.profileDeleteButton {
  border-color: var(--color-danger);
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover,
.profileDeleteButton:hover {
  background: var(--color-danger-dark);
}

.fitContent {
  width: fit-content !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid #cbd3df;
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
  outline: none;
}

input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.card-wrapper,
.introWrapper,
.profileWrapper,
.infoWrapper,
.privacyWrapper,
.verwijderWrapper,
.profileMessages {
  border: 1px solid rgba(223, 229, 238, 0.85);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.profileMessages {
  padding: 0.9rem 1rem;
}

.profileMessage {
  margin: 0.2rem 0;
}

.profileMessage--error,
.alert.error {
  color: var(--color-danger);
}

.profileMessage--success,
.alert.success {
  color: var(--color-success);
}

.profileMessages--error,
.errorWrapper {
  border-left: 4px solid var(--color-danger);
}

.profileMessages--success,
.successWrapper {
  border-left: 4px solid var(--color-success);
}

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: #fff;
}

.is-disabled,
.tbField--disabled {
  opacity: 0.55;
}

.is-disabled input,
.is-disabled select,
.is-disabled textarea,
.tbField--disabled input,
.tbField--disabled select {
  cursor: not-allowed;
  background: #eef1f5;
}

.auth-page,
.system-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
  background: linear-gradient(145deg, #eef7ff 0%, #f7f9fc 55%, #eef2f7 100%);
}

.auth-shell,
.system-shell {
  width: min(100%, 31rem);
}

.auth-brand,
.system-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-brand img,
.system-brand img {
  width: 5rem;
  height: 3.75rem;
  object-fit: contain;
}

.authCard,
.system-card,
.card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.authCard,
.system-card__body,
.card-body {
  padding: clamp(1.25rem, 4vw, 2rem);
}

.system-card__header,
.card-header {
  padding: 1rem 1.25rem;
  background: var(--color-primary-ink);
  color: #fff;
}

.system-card__header h1,
.card-header h1,
.authPanel h1,
.authPanel h2 {
  margin: 0;
  font-size: 1.55rem;
}

.authPanel {
  display: none;
}

.authPanel.active {
  display: block;
}

.authPanel label,
.system-card label {
  display: block;
  margin: 0.9rem 0 0.35rem;
  font-weight: 650;
}

.authButton {
  width: 100%;
  margin-top: 1.1rem;
}

.authSwitch,
.hint {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.hint--flush {
  margin-top: 0;
}

.field-help {
  margin: 0.35rem 0 0;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.authSwitch {
  margin: 1rem 0 0;
  text-align: center;
}

.authSwitch a {
  font-weight: 700;
}

.flash-message {
  margin-top: 1rem;
}

.flash-message__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
}

.flash-message__content.is-error {
  border-color: #fda29b;
  background: #fff1f0;
}

.flash-message__content.is-success {
  border-color: #75e0a7;
  background: #ecfdf3;
}

.flash-message__close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}

.system-actions,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.system-actions--stacked {
  display: grid;
}

.system-actions--stacked .btn {
  width: 100%;
}

.checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1rem !important;
  padding: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
}

.checkbox .label {
  display: block;
  font-weight: 700;
}

.checkbox .sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.section-title {
  margin-top: 1rem;
  font-weight: 800;
}

.siteMeta,
.system-footer {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
