/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --ret-red:    #A5300F;
  --ret-blue:   #00477f;
  --ret-light:  #009ddb;
  --bg:         #f2f4f7;
  --surface:    #ffffff;
  --text:       #1a1a2e;
  --text-muted: #5a6270;
  --border:     #dde1e9;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.ret-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--ret-red);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  border-radius: 10px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.ret-badge.small {
  width: 36px; height: 36px;
  font-size: 12px;
  border-radius: 7px;
  margin-bottom: 0;
}

.login-card h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--ret-blue);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  max-width: 640px;
  margin: 0 auto;
}

.topbar-title {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}

.topbar-user {
  font-size: 13px;
  color: rgba(255,255,255,.8);
}

.topbar-user a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
}

.topbar-user a:hover { color: #fff; text-decoration: underline; }

/* ── Main ────────────────────────────────────────────────────────────────── */
.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  position: relative;
}

.card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-left: 36px;
}

.card-step {
  position: absolute;
  top: 24px;
  left: 20px;
  width: 24px; height: 24px;
  background: var(--ret-red);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Type radio ──────────────────────────────────────────────────────────── */
.type-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}

.type-option:hover {
  border-color: var(--ret-light);
  background: #f0f8fd;
}

.type-option input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--ret-red);
  flex-shrink: 0;
}

.type-option input[type="radio"]:checked + .type-label {
  font-weight: 600;
  color: var(--ret-blue);
}

.type-option:has(input:checked) {
  border-color: var(--ret-blue);
  background: #edf4fb;
}

.type-label { font-size: 15px; }

/* ── Camera area ─────────────────────────────────────────────────────────── */
.camera-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.camera-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.btn-camera {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px;
  background: var(--ret-blue);
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s;
}

.btn-camera:hover { background: #003a6b; }
.btn-camera svg { width: 22px; height: 22px; }

.preview-wrap {
  width: 100%;
  position: relative;
}

.preview-wrap img {
  width: 100%;
  border-radius: 10px;
  display: block;
  max-height: 320px;
  object-fit: contain;
  background: #f0f0f0;
}

.btn-opnieuw {
  margin-top: 10px;
  width: 100%;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--ret-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}

.btn-primary:hover:not(:disabled) { background: #8a2509; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s;
}

.btn-secondary:hover { border-color: var(--ret-blue); color: var(--ret-blue); }
.btn-bestand { width: 100%; }

/* ── Submit ──────────────────────────────────────────────────────────────── */
.submit-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-verstuur { max-width: 640px; }

.submit-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.alert-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.alert-success {
  background: #e8f7ee;
  color: #1a6b35;
}

.alert-success .alert-icon {
  background: #1a6b35;
  color: #fff;
}

.alert-error {
  background: #fdecea;
  color: #9b1c1c;
}

.alert-error .alert-icon {
  background: #9b1c1c;
  color: #fff;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field {
  text-align: left;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--ret-blue);
  background: #fff;
}
