@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --border: #e5e7eb;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-dentread { color: #4f46e5; }
.logo-slash { color: #9ca3af; }
.logo-research { color: #111827; }

main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 450px;
  margin: 0 auto;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stakeholder-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stakeholder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.stakeholder-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.stakeholder-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.stakeholder-card .arrow {
  color: var(--accent);
  font-size: 1.1rem;
}

/* Form */
.form-view { max-width: 550px; margin: 0 auto; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.back-btn:hover { color: var(--accent); }

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.25rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.step-dot.active { background: var(--accent); }
.step-dot.completed { background: var(--accent); }

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
}

.step-line.active { background: var(--accent); }

.form-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.form-intro h1 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.form-intro p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.question {
  margin-bottom: 1rem;
}

.question label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.question label .required { color: #dc2626; margin-left: 2px; }
.question label .hypothesis {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.625rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 0.375rem;
  font-weight: 500;
}

.question input,
.question textarea,
.question select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.question input:focus,
.question textarea:focus,
.question select:focus {
  outline: none;
  border-color: var(--accent);
}

.question textarea { min-height: 70px; resize: vertical; }

.radio-group, .checkbox-group { display: flex; flex-direction: column; gap: 0.375rem; }

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.radio-option:hover, .checkbox-option:hover { border-color: var(--accent); }

.radio-option.selected, .checkbox-option.selected {
  border-color: var(--accent);
  background: #eef2ff;
}

.radio-option input, .checkbox-option input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}

.scale-group { display: flex; gap: 3px; }

.scale-option {
  flex: 1;
  padding: 0.5rem 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  text-align: center;
  font-size: 0.75rem;
  cursor: pointer;
}

.scale-option:hover { border-color: var(--accent); }

.scale-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 0.5rem;
}

.submit-btn:hover:not(:disabled) { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.nav-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.nav-buttons .submit-btn { flex: 1; }

.btn-secondary {
  padding: 0.75rem;
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover { border-color: var(--text-secondary); }

.thank-you {
  text-align: center;
  padding: 2rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.thank-you h2 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #059669; }
.thank-you p { color: var(--text-secondary); font-size: 0.875rem; }

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

/* Admin */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.admin-header h1 { font-size: 1.1rem; font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.stat-card .number { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: 0.7rem; color: var(--text-secondary); }

.admin-filters { margin-bottom: 0.75rem; }
.admin-filters select {
  padding: 0.375rem 0.625rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.8rem;
}

.response-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.375rem;
}

.response-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

.answer { font-size: 0.8rem; margin-bottom: 0.125rem; }
.answer .q { color: var(--text-secondary); }
.answer .a { color: var(--text-primary); }

.help-text { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }

footer {
  text-align: center;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--text-secondary);
}

.admin-link {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  main { padding: 1rem; }
  .hero h1 { font-size: 1.25rem; }
}
