@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ice-50:  #f0f7ff;
  --ice-100: #daeeff;
  --ice-200: #b0d9ff;
  --ice-300: #74bbff;
  --ice-400: #3a9aee;
  --ice-500: #1a7fd4;
  --ice-600: #1162ae;
  --ice-700: #0d4d8e;
  --ice-800: #093d72;
  --ice-900: #062e57;
  --ice-950: #031a35;

  --deep-1:  #040f1e;
  --deep-2:  #061426;
  --deep-3:  #07192f;
  --deep-4:  #0a1f3a;
  --deep-5:  #0d2648;

  --surface:    #0e2240;
  --surface-2:  #122850;
  --surface-3:  #162e5c;

  --border:     rgba(58, 154, 238, 0.15);
  --border-md:  rgba(58, 154, 238, 0.3);
  --border-hi:  rgba(116, 187, 255, 0.5);

  --text-primary:   #e8f4ff;
  --text-secondary: #8ab8e0;
  --text-muted:     #4a7aaa;
  --text-faint:     #2a4f72;

  --accent:     #3a9aee;
  --accent-hi:  #74bbff;
  --accent-glow: 0 0 20px rgba(58, 154, 238, 0.35);
  --accent-glow-lg: 0 0 40px rgba(58, 154, 238, 0.25);

  --white: #ffffff;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #22d3a5;
  --success-bg: rgba(34, 211, 165, 0.08);

  --font: 'DM Sans', 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', 'DM Sans', sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow:    0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);

  --nav-h: 68px;
  --content-w: 1100px;
  --form-w: 720px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--deep-1);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26, 127, 212, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(9, 61, 114, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, var(--deep-1) 0%, #030e1a 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(58,154,238,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,154,238,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(4, 15, 30, 0.88);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(58,154,238,0.5));
  transition: filter 0.3s;
}
.nav-brand:hover .nav-logo {
  filter: drop-shadow(0 0 14px rgba(116,187,255,0.7));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}
.brand-tagline {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(58, 154, 238, 0.08);
  border-color: var(--border);
}
.nav-link.active {
  color: var(--accent-hi);
  background: rgba(58, 154, 238, 0.1);
  border-color: var(--border-md);
}

.main-content {
  flex: 1;
  position: relative;
  z-index: 2;
  max-width: var(--content-w);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.main-content.centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flash-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid;
}
.flash-error {
  background: var(--danger-bg);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.flash-success {
  background: var(--success-bg);
  border-color: rgba(34,211,165,0.3);
  color: var(--success);
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.page-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-title .hl { color: var(--accent-hi); }

.page-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.65;
}

/* Divider line under header */
.header-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border-md) 0%, transparent 70%);
  margin: 1.5rem 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--ice-400);
  border-color: var(--ice-400);
  box-shadow: var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-hi);
  border-color: var(--border-md);
}
.btn-outline:hover {
  background: rgba(58,154,238,0.08);
  border-color: var(--border-hi);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  border-color: var(--border-md);
}

.btn-danger {
  background: transparent;
  color: #fca5a5;
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: var(--danger-bg);
  border-color: rgba(239,68,68,0.5);
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 0.8rem;
}

.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-sm { padding: 1.25rem; }
.card-lg { padding: 2.25rem; }

.card:hover {
  border-color: var(--border-md);
}

/* Top accent bar on cards */
.card-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ice-500), var(--ice-300), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 70%);
  opacity: 0.5;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-hi);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-group { margin-bottom: 1.25rem; }

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.field-required { color: var(--danger); margin-left: 3px; }

.field-input,
.field-textarea,
.field-select {
  width: 100%;
  background: var(--deep-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
}

.field-input::placeholder,
.field-textarea::placeholder { color: var(--text-faint); }

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  border-color: var(--accent);
  background: var(--deep-4);
  box-shadow: 0 0 0 3px rgba(58,154,238,0.12);
}

.field-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.choice-list { display: flex; flex-direction: column; gap: 9px; }

.choice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--deep-3);
  transition: all 0.15s;
}

.choice-item:hover {
  border-color: var(--border-md);
  background: var(--deep-4);
}

.choice-item input { display: none; }

.choice-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-faint);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: transparent;
}

.choice-item input[type="radio"] ~ .choice-custom {
  border-radius: 50%;
}

.choice-item input:checked ~ .choice-custom {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(58,154,238,0.4);
}

.choice-item input:checked ~ .choice-custom::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.choice-item input[type="checkbox"]:checked ~ .choice-custom::after {
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 0;
}

.choice-item input:checked ~ .choice-text { color: var(--text-primary); }

.choice-text {
  font-size: 0.93rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.choice-item.selected,
.choice-item:has(input:checked) {
  border-color: var(--border-md);
  background: rgba(58,154,238,0.05);
}

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--deep-4);
  border-bottom: 1px solid var(--border-md);
  padding: 11px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(58,154,238,0.04); }

tbody td {
  padding: 13px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
}
.badge-active {
  background: rgba(34,211,165,0.08);
  color: var(--success);
  border-color: rgba(34,211,165,0.25);
}
.badge-active::before { content: '●'; font-size: 0.5rem; }
.badge-inactive {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.2);
}
.badge-inactive::before { content: '●'; font-size: 0.5rem; }

.form-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ice-600), var(--ice-400), var(--ice-300));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.22s;
}

.form-card:hover {
  border-color: var(--border-md);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.form-card:hover::before { opacity: 1; }

.form-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.form-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.form-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-card-meta span { display: flex; align-items: center; gap: 5px; }

.form-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
  transition: gap 0.18s;
}
.form-card:hover .form-card-cta { gap: 10px; color: var(--accent-hi); }

.question-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  transition: border-color 0.18s;
}
.question-block:focus-within { border-color: var(--border-md); }

.question-num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.question-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.hero {
  padding: 2.5rem 0 3rem;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.hero-left { flex: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  background: rgba(58,154,238,0.06);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-title .hl {
  color: transparent;
  background: linear-gradient(135deg, var(--ice-300), var(--ice-500));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(58,154,238,0.4));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.admin-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.sidebar-section {
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 0.75rem;
  margin-bottom: 4px;
  margin-top: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(58,154,238,0.07);
  border-color: var(--border);
}
.sidebar-link.active {
  color: var(--accent-hi);
  background: rgba(58,154,238,0.1);
  border-color: var(--border-md);
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.q-editor-item {
  background: var(--deep-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 0.75rem;
  position: relative;
  transition: border-color 0.15s;
}
.q-editor-item:focus-within { border-color: var(--border-md); }

.q-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.q-drag { color: var(--text-faint); cursor: grab; font-size: 1rem; padding: 2px; }
.q-drag:active { cursor: grabbing; }

.q-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(58,154,238,0.12);
  border: 1px solid var(--border-md);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.q-type-pill {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--deep-3);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
}

.q-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1rem;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.q-remove:hover { color: var(--danger); background: var(--danger-bg); }

.choices-list { margin-top: 10px; }
.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.choice-row-num {
  font-size: 0.72rem;
  color: var(--text-faint);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}
.choice-row input {
  flex: 1;
  background: var(--deep-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.choice-row input:focus { border-color: var(--accent); }

.remove-choice {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.remove-choice:hover { color: var(--danger); background: var(--danger-bg); }

.qtype-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.qtype-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--deep-4);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.qtype-btn:hover {
  border-color: var(--border-md);
  background: rgba(58,154,238,0.08);
  color: var(--text-primary);
}

.login-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ice-700), var(--ice-400), var(--ice-300));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  gap: 12px;
}
.login-logo-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(58,154,238,0.4));
}
.login-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  letter-spacing: -0.01em;
}
.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.success-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}
.success-box {
  text-align: center;
  max-width: 480px;
}
.success-icon-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(34,211,165,0.08);
  border: 2px solid rgba(34,211,165,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.75rem;
  font-size: 2rem;
  animation: pulse-border 2.5s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,165,0.2); }
  50% { box-shadow: 0 0 0 12px rgba(34,211,165,0); }
}
.success-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.success-sub {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}
.empty-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.empty-desc { font-size: 0.875rem; color: var(--text-muted); }

.response-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}
.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.response-id {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.response-time {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.answer-row {
  display: flex;
  gap: 1rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(58,154,238,0.05);
  font-size: 0.9rem;
}
.answer-row:last-child { border-bottom: none; }
.answer-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 200px;
  flex-shrink: 0;
  padding-top: 1px;
}
.answer-val { color: var(--text-primary); }

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: rgba(4,15,30,0.6);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
}

.footer-inner {
  max-width: var(--content-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.footer-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.6;
}
.footer-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-text {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.footer-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(34,211,165,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end { display: flex; align-items: center; justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.mt-1 { margin-top: 0.4rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.25rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1.25rem; }
.mb-4 { margin-bottom: 2rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.text-accent { color: var(--accent-hi); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: #fca5a5; }
.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.fade-in {
  animation: fadeIn 0.4s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero { flex-direction: column-reverse; gap: 1.5rem; }
  .hero-logo img { width: 100px; height: 100px; }
}
@media (max-width: 640px) {
  .main-content { padding: 1.5rem 1rem; }
  .nav-inner { padding: 0 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-title { font-size: 1.5rem; }
  .brand-tagline { display: none; }
  .footer-inner { flex-direction: column; gap: 8px; padding: 10px 0; }
  .footer { height: auto; padding: 10px 1rem; }
}