/* ============================================
   Diagnóstico do Lucro — Brand Styles
   Baseado no manual de identidade INOVARE
   ============================================ */

:root {
  /* Fundos */
  --bg-base: #04101A;
  --bg-surface: #0B1E2E;
  --bg-elevated: #152A3D;
  --bg-input: #0B1E2E;

  /* Texto */
  --text-primary: #EDEFF2;
  --text-secondary: rgba(237, 239, 242, 0.65);
  --text-muted: rgba(237, 239, 242, 0.40);

  /* Bordas */
  --border-default: rgba(255, 255, 255, 0.10);
  --border-focus: rgba(242, 188, 13, 0.5);

  /* Primário / Ação */
  --primary: #F2BC0D;
  --primary-dark: #C78307;
  --primary-gradient: linear-gradient(135deg, #F2BC0D, #C78307);
  --primary-subtle: rgba(242, 188, 13, 0.12);
  --on-primary: #04101A;

  /* Semânticas */
  --success: #3AD186;
  --warning: #FF9F43;
  --error: #E5484D;
  --info: #4F9BE5;

  /* Faixas de maturidade */
  --faixa-ilusorio: #E5484D;
  --faixa-inseguro: #FF9F43;
  --faixa-gerenciado: #4F9BE5;
  --faixa-estrategico: #3AD186;

  /* Categórica para gráficos */
  --chart-1: #F2BC0D;
  --chart-2: #1F3A3D;
  --chart-3: #4F9BE5;
  --chart-4: #3A3F2E;
  --chart-5: #9AA1A7;
  --chart-6: #8A5A3A;

  /* Tipografia */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Raio */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Sombras */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 32px rgba(242, 188, 13, 0.12);

  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 40px;
}

.progress-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-default);
  box-sizing: border-box;
}

.progress-topbar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.progress-topbar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-topbar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-topbar-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* Header */
.app-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-base);
}

.brand-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1.25rem 3rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Telas */
.screen {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--on-primary);
  box-shadow: 0 4px 16px rgba(242, 188, 13, 0.28);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 188, 13, 0.38);
}

.btn-primary.btn-glow {
  animation: btnGlowPulse 1.6s ease-in-out infinite;
}

@keyframes btnGlowPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(242, 188, 13, 0.28), 0 0 0 rgba(242, 188, 13, 0);
  }
  50% {
    box-shadow: 0 4px 24px rgba(242, 188, 13, 0.5), 0 0 24px rgba(242, 188, 13, 0.55);
  }
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: #22c55e;
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 16, 26, 0.25);
  border-top-color: var(--on-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* ============================================
   TELA 1 — INTRO
   ============================================ */
#screen-intro {
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.intro-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  max-width: 520px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.intro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 188, 13, 0.08), transparent 60%);
  pointer-events: none;
}

.intro-badge {
  position: relative;
  display: inline-block;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(242, 188, 13, 0.2);
}

.intro-title {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.intro-question {
  position: relative;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.intro-subtitle {
  position: relative;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.intro-stats {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 90px;
}

.intro-disclaimer {
  position: relative;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* ============================================
   TELA 2 — QUIZ
   ============================================ */
#screen-quiz {
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
}

.quiz-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quiz-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 999px;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
  font-family: var(--font-mono);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.block-icon {
  font-size: 1.75rem;
}

.block-info {
  display: flex;
  flex-direction: column;
}

.block-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.block-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.question-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.question-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-button {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  padding: 1rem 1.125rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.option-button:hover {
  border-color: rgba(242, 188, 13, 0.4);
  background: rgba(242, 188, 13, 0.06);
}

.option-button.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 0 2px rgba(242, 188, 13, 0.2);
}

.option-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.option-button[data-value="1"] .option-number { background: var(--error); }
.option-button[data-value="2"] .option-number { background: var(--warning); }
.option-button[data-value="3"] .option-number { background: var(--info); }
.option-button[data-value="4"] .option-number { background: var(--success); }

.option-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.option-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.level-legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ============================================
   TELA 3 — RESULTADO
   ============================================ */
#screen-result {
  flex-direction: column;
  width: 100%;
}

.result-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-header {
  text-align: center;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.score-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 188, 13, 0.06), transparent 55%);
  pointer-events: none;
}

.score-circle-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 12;
}

.score-circle-progress {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 502.65;
  stroke-dashoffset: 502.65;
  transition: stroke-dashoffset 2s ease-out, stroke 0.5s ease;
}

.score-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}

.score-value {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.score-max {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.score-info {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.score-badge {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bg-base);
}

.score-copy {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 420px;
  line-height: 1.5;
}

/* Radares */
.radars-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.radar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.radar-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.radar-score {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.radar-score strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.score-hundred {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.25rem;
}

.radar-feedback {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-input);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.radar-chart-wrapper {
  position: relative;
  height: 260px;
  width: 100%;
}

/* Insights */
.insights-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.insights-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.insights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.insights-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.insights-list li::before {
  content: '▸';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Result CTA */
.result-cta {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 188, 13, 0.06), transparent 55%);
  pointer-events: none;
}

.cta-headline {
  position: relative;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.cta-description {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   TELA 4 — CADASTRO
   ============================================ */
#screen-cadastro {
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.cadastro-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card);
}

.cadastro-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cadastro-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cadastro-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"] {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(242, 188, 13, 0.12);
}

.form-group input.error {
  border-color: var(--error);
}

.error-message {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 1rem;
}

.required {
  color: var(--error);
}

/* Checkbox */
.form-checkbox {
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin-top: 1px;
}

.checkbox-label input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  color: var(--on-primary);
  font-size: 0.7rem;
  font-weight: 700;
}

.checkbox-text a {
  color: var(--primary);
  text-decoration: underline;
}

.form-error {
  text-align: center;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 1rem;
  min-height: 1.25rem;
}

/* ============================================
   TELA 5 — PÓS-ENVIO
   ============================================ */
#screen-posenvio {
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.posenvio-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.posenvio-header {
  margin-bottom: 1.5rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(58, 209, 134, 0.12);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.posenvio-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.posenvio-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.score-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.summary-card {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.posenvio-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ============================================
   MODAL BENCHMARK
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card);
  z-index: 101;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.benchmark-main {
  text-align: center;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.benchmark-comparison {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.benchmark-detail {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.benchmark-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.benchmark-bar-item {
  display: grid;
  grid-template-columns: 110px 1fr 55px;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 999px;
  transition: width 1s ease;
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.benchmark-total {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.benchmark-error {
  text-align: center;
  color: var(--error);
  padding: 1rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 200;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (min-width: 768px) {
  .app-main {
    padding: 2rem 2rem 4rem;
  }

  .brand-logo {
    height: 32px;
  }

  .intro-card {
    padding: 3rem 2.5rem;
  }

  .intro-title {
    font-size: 2.4rem;
  }

  .intro-question {
    font-size: 1.5rem;
  }

  .intro-stats {
    gap: 2.5rem;
  }

  .question-card {
    padding: 2rem;
  }

  .question-title {
    font-size: 1.25rem;
  }

  .score-section {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
    padding: 2.5rem;
  }

  .score-circle-wrapper {
    width: 220px;
    height: 220px;
  }

  .score-value {
    font-size: 4rem;
  }

  .radars-section {
    grid-template-columns: 1fr 1fr;
  }

  .radar-chart-wrapper {
    height: 300px;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .score-summary {
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .app-main {
    max-width: 1280px;
  }

  .quiz-container {
    max-width: 780px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 1rem;
  }

  .brand-logo {
    height: 24px;
  }

  .intro-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .quiz-footer {
    flex-direction: column;
    gap: 1rem;
  }

  .quiz-footer .btn {
    width: 100%;
  }

  .level-legend {
    order: -1;
  }

  .score-summary {
    grid-template-columns: 1fr;
  }

  .score-circle-wrapper {
    width: 160px;
    height: 160px;
  }

  .score-value {
    font-size: 3rem;
  }

  .benchmark-bar-item {
    grid-template-columns: 90px 1fr 50px;
    gap: 0.5rem;
  }
}

/* Utilitários de impressão para PDF alternativo */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .app-header,
  .quiz-footer,
  .result-cta,
  .posenvio-actions,
  .btn {
    display: none !important;
  }

  .screen {
    display: none !important;
  }

  #screen-result.printable,
  #screen-result.printable.active {
    display: flex !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .result-container {
    gap: 1rem;
  }

  .score-circle-progress {
    stroke-dashoffset: 0 !important;
  }
}

/* ============================================
   NOVO LAYOUT DASHBOARD SINGLE PAGE
   ============================================ */

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-wrapper {
  position: relative;
  width: 100%;
}

.dashboard-content {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.dashboard-wrapper.locked .dashboard-content {
  opacity: 0.2;
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.unlock-overlay {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  z-index: 10;
  justify-content: center;
  align-items: flex-start;
}

.dashboard-wrapper.locked .unlock-overlay {
  display: flex;
}

.unlock-card {
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.unlock-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.unlock-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

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

.unlock-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
}

.unlock-form input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 901px) {
  .right-column {
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 1rem;
}

.card-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.level-legend-inline {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.block-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.block-section h4 {
  color: var(--primary);
  font-size: 1.05rem;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
}

.q-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255,255,255,0.02);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
}

.q-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.q-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.q-text {
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.q-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.q-option:hover {
  background: rgba(255,255,255,0.06);
}

.q-option-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--border-default);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.q-option-label {
  flex: 1;
}

.q-option.selected {
  color: #fff;
  border: none;
}
.q-option.selected .q-option-check {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.9);
}
.q-option.selected[data-val="1"] { background: var(--error); }
.q-option.selected[data-val="2"] { background: var(--warning); }
.q-option.selected[data-val="3"] { background: var(--info); }
.q-option.selected[data-val="4"] { background: var(--success); }

.score-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.divergent-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.divergent-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.divergent-value {
  font-family: var(--font-mono);
  font-weight: bold;
  color: var(--text-primary);
}

.divergent-bar-track {
  display: flex;
  align-items: stretch;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.divergent-bar-half {
  flex: 1;
  display: flex;
  height: 100%;
}

.divergent-bar-left {
  justify-content: flex-start;
}

.divergent-bar-right {
  justify-content: flex-end;
}

.divergent-bar-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.divergent-bar-left .divergent-bar-fill {
  background: #3b82f6;
}

.divergent-bar-right .divergent-bar-fill {
  background: #f59e0b;
}

.divergent-bar-center {
  width: 2px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.radars-card {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.score-card,
.radars-card {
  padding: 1.75rem;
}

.score-card .score-circle-wrapper {
  width: 210px;
  height: 210px;
}

.radar-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-align: center;
}

.radar-item .radar-chart-container {
  height: 260px;
  width: 100%;
  position: relative;
}

.export-section {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 1.5rem;
}

.export-section .form-card {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.export-section .insights-card {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.export-section .actions-card {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

@media (max-width: 900px) {
  .export-section {
    grid-template-columns: 1fr;
  }
  .export-section .form-card,
  .export-section .insights-card,
  .export-section .actions-card {
    grid-column: 1 / 2;
    grid-row: auto;
  }
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.privacy-check {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.privacy-check label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.privacy-check a {
  color: var(--primary);
}

.insights-placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.export-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary-light {
  background: rgba(242, 188, 13, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-primary-light:hover {
  background: rgba(242, 188, 13, 0.25);
}

.txt-output-wrapper {
  margin-top: 1rem;
}

.txt-output {
  width: 100%;
  height: 150px;
  background: #000;
  color: #3AD186;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  resize: none;
}

.app-footer-inline {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-footer-inline a {
  color: var(--text-secondary);
  text-decoration: none;
}
.app-footer-inline a:hover {
  text-decoration: underline;
}
