:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --primary: #216fed;
  --secondary: #0f172a;
  --muted: #6b7280;
  --border: #e2e8f0;
  --accent: #f59e0b;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #e0edff, #f5f7fb 45%, #edf2ff 100%);
  color: var(--secondary);
  font-family: var(--root-font, "Inter", sans-serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.site-header.compact {
  padding: 2.75rem 0 2.25rem;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(14, 116, 144, 0.4), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.site-header > .container {
  position: relative;
  z-index: 1;
}

.site-header .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.lede {
  max-width: 520px;
  opacity: 0.95;
}

.cta-row {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn.primary {
  background: var(--accent);
  color: #0f172a;
  box-shadow: 0 12px 25px -18px rgba(15, 23, 42, 0.95);
}

.btn.secondary {
  background: #e0e7ff;
  color: var(--secondary);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.95);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px -14px rgba(15, 23, 42, 0.95);
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: rgba(15, 23, 42, 0.35);
  padding: 1.25rem;
  border-radius: 1rem;
}

.stat-card strong {
  font-size: 1.8rem;
  display: block;
  margin: 0.35rem 0;
}

main {
  margin-top: -2rem;
  padding-bottom: 3rem;
}

.panel {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 25px 40px -35px rgba(15, 23, 42, 0.45);
  animation: fade-in-up 0.45s ease forwards;
  opacity: 0;
}

.auth-layout {
  margin-top: -2rem;
}

.auth-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.auth-info ul {
  padding-left: 1.1rem;
  color: var(--muted);
}

.auth-card {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
   animation: fade-in-up 0.45s ease 0.05s forwards;
   opacity: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
}

.input-group span {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--secondary);
}

.btn.full-width {
  width: 100%;
  justify-content: center;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.grid.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card h3 {
  margin-top: 0;
}

.card .note {
  font-size: 0.85rem;
  color: var(--muted);
}

.card.span-2 {
  grid-column: span 2;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #cbd5f5;
  box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.4);
}

@media (max-width: 900px) {
  .card.span-2 {
    grid-column: span 1;
  }
}

.survey-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 15px 30px -25px rgba(15, 23, 42, 0.35);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.form-section h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--secondary);
}

.form-section .hint {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

input[type="text"],
select {
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(33, 111, 237, 0.15);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -22px rgba(15, 23, 42, 0.25);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

table th,
table td {
  border: 1px solid var(--border);
  padding: 0.65rem;
  text-align: center;
  background: #fff;
}

table th:first-child,
table td:first-child {
  text-align: left;
}

input[type="radio"] {
  width: 16px;
  height: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.checkbox-grid label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

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

.privacy a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.privacy a:hover {
  text-decoration: underline;
}

.site-footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.9;
}

.flash {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(8px);
}

.flash.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.hint {
  color: var(--muted);
  margin-top: -0.5rem;
}

fieldset {
  border: 1px dashed var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

legend {
  font-weight: 600;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media print {
  .site-header .cta-row,
  .filter-form,
  .panel-actions,
  .btn,
  .site-footer {
    display: none !important;
  }

  #privacy-report .table-wrapper {
    overflow: visible;
  }

  #privacy-report table {
    font-size: 0.75rem;
  }
}

