:root {
  --primary: #003b7a;
  --primary-hover: #002d5e;
  --accent: #f58220;
  --accent-hover: #dc7116;
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --text: #1a202c;
  --text-muted: #718096;
  --border: #e2e8f0;
  --success: #38a169;
  --warning: #d69e2e;
  --danger: #e53e3e;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.badge-erfassung {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

main {
  flex: 1;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hidden {
  display: none !important;
}

/* Aufnahme State */
.camera-box {
  border: 2px dashed #cbd5e0;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafbfc;
}

.camera-box:hover {
  border-color: var(--primary);
  background: #f0f4f8;
}

.camera-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.camera-box h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.camera-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #edf2f7;
  color: #4a5568;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

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

/* Loading & Analyse */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Preview / Prüfen */
.reading-display {
  background: #f7fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reading-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.reading-val {
  font-weight: 600;
  font-size: 0.95rem;
}

.reading-highlight {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin: 10px 0 4px;
}

.reading-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}

/* Alerts */
.alert-box {
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-warning {
  background: #fffaf0;
  border: 1px solid #feebc8;
  color: #7b341e;
}

.alert-danger {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #9b2c2c;
}

.alert-success {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  color: #22543d;
}

.alert-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.alert-reasons {
  font-size: 0.85rem;
  margin-left: 18px;
}

.thumb-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}
