* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar: #111827;
  --sidebar-text: #d1d5db;
  --sidebar-active: #ffffff;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: var(--sidebar);
  color: white;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
  overflow-y: auto;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  margin: 0 8px 32px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.10);
  color: var(--sidebar-active);
}

.main {
  padding: 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.user {
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
}

.button {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

@media (max-width: 800px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 20px;
  }
}

.form-section {
  margin-bottom: 20px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

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

.form-field label {
  font-size: 14px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.15);
  border-color: var(--primary);
}

.form-field textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 800px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

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

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

.data-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table a {
  color: var(--text);
  text-decoration: none;
}

.data-table a:hover {
  color: var(--primary);
}
.dev-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #b91c1c;
  color: #fff;
  border-bottom: 2px solid #7f1d1d;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar .nav {
  flex: 1;
}

.sidebar-logout {
  margin: 24px 8px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-logout-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--sidebar-text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.sidebar-logout-button:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--sidebar-active);
}

/* Authenticatieschermen */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef3fb 0%, #f8fafc 55%, #eef2f7 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  align-items: stretch;
}

.auth-brand-panel {
  background: var(--sidebar);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.auth-brand-panel p {
  margin: 10px 0 0;
  max-width: 480px;
  color: var(--sidebar-text);
  font-size: 17px;
  line-height: 1.6;
}

.auth-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.auth-brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 17px;
  box-shadow: none;
}

.auth-brand-name {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.auth-brand-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  font-weight: 700;
}

.auth-card {
  width: min(100% - 48px, 520px);
  align-self: center;
  justify-self: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
}

.auth-card h1 {
  margin: 4px 0 10px;
  font-size: 30px;
  letter-spacing: -0.025em;
}

.auth-eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-intro {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form .form-field {
  margin-bottom: 16px;
}

.auth-primary-button {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  font-weight: 650;
}

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.auth-links-left {
  text-align: left;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 9px;
  line-height: 1.5;
  font-size: 14px;
}

.auth-alert-error {
  background: #fff1f1;
  border: 1px solid #f0b5b5;
  color: #8b1e1e;
}

.auth-alert-success {
  background: #effbf3;
  border: 1px solid #a7dfb7;
  color: #176b38;
}

.auth-alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.auth-shell-single {
  grid-template-columns: 1fr;
  padding: 40px 20px;
}

.auth-shell-wide .auth-card {
  width: min(100% - 48px, 600px);
}

.auth-code-input {
  text-align: center;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
}

.auth-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.auth-qr {
  display: block;
  width: min(260px, 100%);
  height: auto;
}

@media (max-width: 850px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 28px 18px;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-card,
  .auth-shell-wide .auth-card {
    width: min(100%, 520px);
    padding: 28px;
  }
}
