:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.navbar .brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
}

.nav-links a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.nav-links a:hover { color: var(--primary); }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

h1 { margin-bottom: 8px; }

.hero { text-align: center; padding-top: 24px; }
.hero p { color: var(--muted); margin-bottom: 24px; }

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 28px;
  display: flex;
  flex-direction: column;
}

.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 0.9rem; }

.cta-row { display: flex; justify-content: center; gap: 16px; }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

.btn-secondary { background: #e5e7eb; color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }

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

.card label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
}

.card input[type="text"],
.card input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.camera-box {
  width: 100%;
  max-width: 420px;
  margin: 10px auto 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111827;
}

.camera-box video,
.camera-box img {
  width: 100%;
  display: block;
}

.camera-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

#submit-btn { display: block; margin: 20px auto 0; }

.hidden { display: none !important; }

.hint {
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 20px;
}

.status {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.result {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  min-height: 20px;
}

.result-success { background: #dcfce7; color: var(--success); }
.result-info { background: #dbeafe; color: var(--primary-dark); }
.result-warning { background: #fef3c7; color: var(--warning); }
.result-error { background: #fee2e2; color: var(--error); }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 500;
}

.alert-success { background: #dcfce7; color: var(--success); }
.alert-error { background: #fee2e2; color: var(--error); }

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.table th { background: #f3f4f6; font-size: 0.9rem; color: var(--muted); }
.table .empty { text-align: center; color: var(--muted); padding: 24px; }
