:root {
  --brand: #e4002b;
  --brand-dark: #b8001f;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --success: #059669;
  --warning: #d97706;
  --error: #dc2626;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

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

.container { max-width: 720px; margin: 0 auto; padding: 1rem; }

.site-header {
  background: var(--brand);
  color: white;
  padding: 1rem 0;
}

.site-header a { color: white; text-decoration: none; }
.site-header h1 { margin: 0; font-size: 1.25rem; }

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.card {
  background: var(--card);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-top: 1rem;
}

.flow-selector { display: grid; gap: 0.75rem; margin: 1.5rem 0; }
.flow-selector form { display: block; }

.flow-btn {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flow-btn::after {
  content: "›";
  color: var(--muted);
  font-size: 1.25rem;
  margin-left: 0.5rem;
}

.flow-btn:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.12);
}

.flow-btn:active {
  border-color: var(--brand-dark);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(1px);
}

.flow-btn:focus-visible {
  outline: 3px solid rgba(228, 0, 43, 0.35);
  outline-offset: 2px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s;
}

.progress-label { color: var(--muted); font-size: 0.875rem; }

.step-form label, form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

.step-form input, .step-form select, form input, form select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }

.step-nav { margin: 0.75rem 0 0; }
.back-form { display: inline; margin: 0; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.back-link {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.back-link:hover { color: var(--brand); }

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.meta { color: var(--muted); font-size: 0.875rem; }

.integration-results, .check-list, .audit-list {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.outcome-verified, .outcome-pass, .outcome-no_hit, .outcome-iban_verified, .outcome-active_company, .outcome-approved { color: var(--success); }
.outcome-manual_review, .outcome-possible_hit, .outcome-borderline, .outcome-timeout { color: var(--warning); }
.outcome-fail, .outcome-confirmed_hit, .outcome-document_mismatch, .outcome-dissolved, .outcome-rejected { color: var(--error); }

.provider { color: var(--muted); font-size: 0.875rem; }

.review-block { margin-bottom: 1rem; }
.review-block dl { display: grid; grid-template-columns: 140px 1fr; gap: 0.25rem 1rem; }
.review-block dt { color: var(--muted); }

.checkbox { font-weight: normal; display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0; }
.checkbox input { width: auto; }

.demo-hint {
  margin-top: 2rem;
  padding: 1rem;
  background: #fffbeb;
  border-radius: 6px;
  font-size: 0.875rem;
}

.demo-hint code { background: #fef3c7; padding: 0.125rem 0.375rem; border-radius: 3px; }

.result-card { text-align: center; }
.decision { margin: 1.5rem 0; padding: 1rem; border-radius: 6px; background: #f9fafb; }

.status-approved .decision { background: #ecfdf5; }
.status-rejected .decision { background: #fef2f2; }
.status-manual_review .decision { background: #fffbeb; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.875rem;
}

.admin-table pre {
  margin: 0.5rem 0 0;
  background: #f9fafb;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  overflow-x: auto;
}

.resume-link-box {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.875rem;
}

.resume-link-input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}
