/* ==========================================================================
   Onira People — Pré-Palestra Guido Bracagioli
   Light Theme Editorial & Humanizado (2026)
   ========================================================================== */

:root {
  /* Paleta Light - Acolhedora, Profissional & Humanizada */
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-subtle: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-active: #3B82F6;
  --border-focus: #2563EB;

  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #3B82F6;
  --primary-soft: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.2);

  --emerald: #059669;
  --emerald-light: #10B981;
  --emerald-soft: #ECFDF5;
  --emerald-border: #A7F3D0;
  --emerald-glow: rgba(5, 150, 105, 0.2);

  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --amber-border: #FDE68A;

  --rose: #DC2626;
  --rose-soft: #FEF2F2;
  --rose-border: #FECACA;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Barra de Progresso Superior */
.top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #E2E8F0;
  z-index: 1000;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB, #059669);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--emerald-glow);
}

/* Header Fixo */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.facilitator-tag {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background-color: var(--emerald);
  border-radius: 50%;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  70% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Container Principal */
.survey-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 18px 56px;
  flex: 1;
}

/* Banner de Rascunho Recuperado */
.draft-banner {
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: #1E40AF;
  box-shadow: var(--shadow-sm);
}

.btn-text-action {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 6px;
}

/* Stepper Indicator */
.stepper-indicator {
  margin-bottom: 24px;
}

.step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.step-counter {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.step-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.step-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Step Card Transitions */
.step-card {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.step-card.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================
   ETAPA 0: BOAS-VINDAS / ONBOARDING
   ============================================== */
.hero-welcome {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 26px;
  box-shadow: var(--shadow-card);
}

.badge-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.welcome-heading {
  font-size: 1.55rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 22px;
}

.facilitator-quote {
  display: flex;
  gap: 16px;
  background: #F8FAFC;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  margin-bottom: 26px;
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.quote-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E40AF, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.quote-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.45;
}

.quote-text strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.onboarding-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.info-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-main);
}

.card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==============================================
   QUESTION BLOCKS & GRIDS
   ============================================== */
.question-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-block:focus-within {
  border-color: var(--border-focus);
}

.question-block.has-error {
  border-color: var(--rose) !important;
  background: var(--rose-soft);
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.q-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.q-label {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
}

.q-error {
  display: none;
  font-size: 0.82rem;
  color: var(--rose);
  margin-top: 10px;
  font-weight: 600;
}

.question-block.has-error .q-error {
  display: block;
}

/* Subtítulos de Seção / Introdução de Grade */
.section-subheading {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.section-subheading h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.q-num-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Single Choice Tile Grid (Q1, Q2, Q3) */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.choice-tile {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.choice-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tile-label {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 16px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.choice-tile:hover .tile-label {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.choice-tile input[type="radio"]:checked + .tile-label {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--primary);
}

/* ==============================================
   LIKERT SCALE 1 A 5 (TERMÔMETRO VISUAL ERGONÔMICO)
   ============================================== */
.scale-legend-banner {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.legend-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-items span strong {
  color: var(--primary);
  margin-right: 2px;
}

.likert-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  min-height: 60px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.likert-btn .l-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 4px;
}

.likert-btn .l-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1;
  font-weight: 600;
}

.likert-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* Seleção Padronizada Azul Elegante (Design System Onira) */
.likert-btn.selected {
  background: var(--primary) !important;
  border-color: var(--primary-hover) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

.likert-btn.selected .l-num {
  color: #FFFFFF !important;
}

.likert-btn.selected .l-tag {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 700 !important;
}

/* Opções Especiais de Escala (Não se aplica / Prefiro não responder) */
.likert-special-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.likert-special-btn {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  user-select: none;
}

.likert-special-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.likert-special-btn.selected {
  background: var(--primary) !important;
  border-color: var(--primary-hover) !important;
  border-style: solid !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
  font-weight: 700 !important;
}

/* ==============================================
   CHIPS DE INSPIRAÇÃO RÁPIDA (PERGUNTAS ABERTAS)
   ============================================== */
.inspiration-chips-wrap {
  margin-bottom: 10px;
}

.chips-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: #F1F5F9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* Textareas & Inputs */
.text-input-wrap textarea,
.field-box input,
.other-input-wrap input {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.text-input-wrap textarea:focus,
.field-box input:focus,
.other-input-wrap input:focus {
  background: #FFFFFF;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Checkbox Multiple Grid (Q35, Q36) */
.multi-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 520px) {
  .multi-choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.check-tile {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.check-tile input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-tile span {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.check-tile:hover span {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.check-tile input[type="checkbox"]:checked + span {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--primary);
}

.other-input-wrap {
  margin-top: 12px;
}

/* Nota de Anonimato & Envio Seguro */
.submission-safety-note {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 20px 0;
  font-size: 0.86rem;
  color: #065F46;
  line-height: 1.4;
}

.submission-safety-note svg {
  flex-shrink: 0;
  color: var(--emerald);
}

/* Ações das Etapas */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.step-actions.center {
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-secondary {
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
  color: var(--text-main);
}

.btn-submit {
  background: linear-gradient(135deg, #2563EB, #059669);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.25);
}

.btn-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Spinner */
.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==============================================
   ETAPA 9: TELA DE SUCESSO
   ============================================== */
.success-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 26px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.success-icon-animated {
  width: 76px;
  height: 76px;
  background: var(--emerald-soft);
  border: 2px solid var(--emerald);
  color: var(--emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 25px var(--emerald-glow);
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.success-quote {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.success-quote p {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.success-quote strong {
  font-size: 0.85rem;
  color: var(--primary);
}

.confirmation-receipt {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  margin-bottom: 28px;
  text-align: left;
}

.receipt-item {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
}

.receipt-item .lbl {
  color: var(--text-muted);
}

.receipt-item .val {
  font-weight: 700;
  color: var(--text-main);
}

.receipt-item .text-emerald {
  color: var(--emerald);
}

.receipt-item .font-mono {
  font-family: var(--font-mono);
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
