:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --neutral: #9ca3af;
  --danger: #dc2626;
  --success: #047857;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.page { max-width: 1200px; margin: 0 auto; padding: 24px; }
.page-center {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card, .hero-card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.login-card {
  width: min(100%, 420px); padding: 32px;
}
.hero-card {
  min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 32px;
}
.panel { padding: 24px; }
.brand-pill {
  display: inline-flex; align-items: center; padding: 8px 14px; background: var(--surface-soft); border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.muted { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field input, .field select {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-size: 16px;
}
.btn {
  border: 0; border-radius: 16px; padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #eef2ff; color: var(--primary-dark); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.tabs {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.tab-button {
  background: var(--surface-soft); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer;
}
.tab-button.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.gate-button {
  width: min(280px, 70vw); aspect-ratio: 1/1; border-radius: 50%; border: 0; background: linear-gradient(135deg, #6d28d9, #4f46e5); color: white; font-size: clamp(22px, 3vw, 30px); font-weight: 800; box-shadow: 0 24px 50px rgba(79, 70, 229, 0.35); cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .2s ease;
}
.gate-button:hover { transform: translateY(-2px); }
.gate-button:disabled {
  cursor: not-allowed; background: linear-gradient(135deg, #d1d5db, #9ca3af); box-shadow: none; color: #1f2937;
}
.status-text { min-height: 24px; font-weight: 600; }
.admin-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.delete-form { margin-top: 8px; }
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 1000; display: grid; gap: 10px;
}
.toast {
  padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); background: #fff; border: 1px solid var(--line); font-weight: 600;
}
.toast.success { border-color: #a7f3d0; color: var(--success); }
.toast.error { border-color: #fecaca; color: var(--danger); }
.stack-lg { display: grid; gap: 8px; }
@media (max-width: 768px) {
  .page { padding: 16px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .admin-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 50vh; }
  .panel { padding: 18px; }
}
