:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8eef5;
  --muted: #8b9cb3;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --warning: #f59e0b;
  --border: #2d3a4d;
}

* { box-sizing: border-box; }

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

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

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  background: #fff;
  border-radius: 8px;
}

.subtitle {
  color: var(--muted);
  margin: 0.25rem 0 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="tel"],
input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn.primary {
  background: var(--primary);
  color: white;
  width: 100%;
}

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

.btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  width: 100%;
}

.btn.link {
  background: none;
  color: var(--primary);
  border: none;
  padding-left: 0;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.messages li {
  padding: 0.75rem;
  border-radius: 8px;
  background: #1e293b;
  margin-bottom: 0.5rem;
}

.warning { color: var(--warning); }
.muted { color: var(--muted); font-size: 0.9rem; }

.radio-option {
  display: block;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.summary {
  padding-left: 1.25rem;
}

.qr-box {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
}

.qr-fallback {
  font-size: 0.75rem;
  overflow-x: auto;
  color: var(--muted);
}

.qr-details {
  margin: 0.75rem 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.qr-details summary {
  cursor: pointer;
  user-select: none;
}

.actions {
  display: grid;
  gap: 0.75rem;
}

.inline-form { margin-top: 0.5rem; }

.camera-preview-wrap {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 3 / 4;
}

.camera-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-preview-wrap.has-capture .camera-preview {
  transform: none;
}

.camera-status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.camera-status.error {
  color: #f87171;
}
