:root {
  color-scheme: light;
  --bg: #f6f8ff;
  --panel: #ffffff;
  --text: #16213e;
  --muted: #5f6f93;
  --primary: #2563eb;
  --primary-dark: #183f9f;
  --secondary: #0f172a;
  --border: #dce5ff;
  --success: #157f3b;
  --warning: #b45309;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-shell {
  padding: 1.25rem 0 4rem;
}
.topbar, .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding-top: 2rem;
}
.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}
h1, h2, h3, p { margin: 0; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}
.hero-text, .section-heading p, .login-card p, .table-head p, .stat-card p {
  color: var(--muted);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}
.btn-secondary {
  background: white;
  color: var(--secondary);
  border: 1px solid var(--border);
}
.ghost-link {
  color: var(--primary-dark);
  font-weight: 600;
}
.hero-card, .login-card, .dashboard-card, .table-card, .feature-card, .stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
}
.hero-card { padding: 1rem; }
.hero-card img { border-radius: 18px; }

.features {
  padding: 2rem 0 4rem;
}
.section-heading {
  margin-bottom: 1.4rem;
}
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { padding: 1.5rem; }
.feature-card h3 { margin-bottom: 0.65rem; }

.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.2rem 0 3rem; }
.admin-main { display: grid; gap: 1.3rem; margin-top: 1.2rem; }
.login-card, .dashboard-card, .table-card { padding: 1.5rem; }
.form-stack { display: grid; gap: 0.9rem; margin-top: 1rem; }
label { display: grid; gap: 0.45rem; font-weight: 600; color: var(--secondary); }
input {
  padding: 0.82rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fbff;
}
.status-message {
  margin-top: 1rem;
  color: var(--warning);
  font-weight: 600;
}
.hidden { display: none; }
.dashboard-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.nav-tabs { display: flex; gap: 0.7rem; margin: 1rem 0 1.2rem; }
.tab-button {
  border: 1px solid var(--border);
  background: white;
  color: var(--secondary);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 700;
}
.tab-button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.hero-panel {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.stat-card { padding: 1rem 1.2rem; }
.stat-card h3 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.survey-list { display: grid; gap: 0.8rem; }
.survey-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
  text-align: left;
  width: 100%;
  background: #fcfdff;
}
.survey-item-link { cursor: pointer; transition: transform 180ms ease, border-color 180ms ease; }
.survey-item-link:hover { transform: translateY(-1px); border-color: var(--primary); }
.survey-item strong { font-size: 1rem; }
.badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #e4f7ea;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 700;
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 1rem;
  color: var(--muted);
  background: #fbfdff;
}
.detail-back { margin-bottom: 1rem; }
.survey-detail-content { display: grid; gap: 1rem; }
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
.question-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  background: #fcfdff;
  display: grid;
  gap: 0.45rem;
}
.question-type {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.option-pill {
  border-radius: 999px;
  background: #eef4ff;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  color: var(--secondary);
}

@media (max-width: 800px) {
  .hero, .cards, .stats-grid { grid-template-columns: 1fr; }
  .dashboard-top, .table-head, .admin-header, .topbar { flex-direction: column; align-items: flex-start; }
}
