/*
╔══════════════════════════════════════════════════════════════╗
║  MOTOR COGNITIVO RELACIONAL — style.css  v2.0               ║
║  Design System: Dark Purple × Pink                           ║
║                                                              ║
║  PARA O ADMINISTRADOR:                                       ║
║  - Altere a paleta em: seção VARIÁVEIS GLOBAIS              ║
║  - Gradiente principal: --grad-primary                       ║
║  - Gradiente de texto:  --grad-text                         ║
╚══════════════════════════════════════════════════════════════╝
*/

/* ════════════════════════════════════════════
   VARIÁVEIS GLOBAIS — Painel de controle visual
   ════════════════════════════════════════════ */
:root {
  /* Paleta */
  --roxo:   #7c3aed;
  --roxo2:  #9d5cf6;
  --pink:   #ec4899;
  --pink2:  #f472b6;
  --verde:  #10b981;
  --amarelo:#fbbf24;
  --dark:   #0f0a1e;
  --dark2:  #1a1030;
  --white:  #ffffff;
  --gray:   #9ca3af;

  /* Gradientes */
  --grad-primary: linear-gradient(135deg, #7c3aed, #ec4899);
  --grad-text-dir: linear-gradient(90deg, #9d5cf6, #f472b6);

  /* Superfícies */
  --bg:         #0f0a1e;
  --bg-surface: rgba(124, 58, 237, 0.08);
  --bg-raised:  rgba(124, 58, 237, 0.15);
  --bg-deep:    #1a1030;

  /* Texto */
  --text:       #ffffff;
  --text-muted: #9ca3af;
  --text-faint: rgba(255,255,255,0.35);

  /* Bordas */
  --border:     rgba(124, 58, 237, 0.2);
  --border-mid: rgba(124, 58, 237, 0.4);
  --border-hi:  rgba(157, 92, 246, 0.7);

  /* Tipografia */
  --font-title: 'Nunito', sans-serif;
  --font:       'Poppins', sans-serif;
  --font-size:  16px;

  /* Espaçamento */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;

  /* Bordas arredondadas */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Sombras (sempre com cor) */
  --shadow-sm:  0 4px 16px rgba(124, 58, 237, 0.2);
  --shadow-md:  0 8px 32px rgba(124, 58, 237, 0.35);
  --shadow-lg:  0 16px 48px rgba(124, 58, 237, 0.45);
  --shadow-pink: 0 8px 32px rgba(236, 72, 153, 0.3);

  /* Transições */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --max-width: 680px;
  --header-h:  60px;
}

/* ════════════════════════════════════════════
   RESET E BASE GLOBAL
   ════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size);
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(124,58,237,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(236,72,153,0.10) 0%, transparent 50%),
    #0f0a1e;
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

/* ════════════════════════════════════════════
   RAIZ DO APP
   ════════════════════════════════════════════ */
#mcr-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
}

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
#mcr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Logo/Brand */
.brand {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

/* Seletor de Idioma */
#lang-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

#lang-selector::-webkit-scrollbar {
  display: none;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--roxo2);
  background: var(--bg-surface);
}

.lang-btn.active {
  color: var(--roxo2);
  font-weight: 700;
}

/* Toggle Dark/Light — visível APENAS no tema Classic */
#theme-toggle {
  display: none; /* oculto nos temas coloridos */
}

[data-color-theme="classic"] #theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}

[data-color-theme="classic"] #theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-mid);
  background: var(--bg-raised);
}

/* Header icon button */
.header-icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
  flex-shrink: 0;
}

.header-icon-btn:hover {
  color: var(--roxo2);
  border-color: var(--border-mid);
  background: var(--bg-raised);
}

/* ════════════════════════════════════════════
   ÁREA PRINCIPAL E TELAS
   ════════════════════════════════════════════ */
#mcr-main {
  flex: 1;
  margin-top: var(--header-h);
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
}

/* Sistema de telas */
.screen {
  display: none;
  width: 100%;
  max-width: var(--max-width);
  animation: fadeIn 0.35s ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════
   LOADING
   ════════════════════════════════════════════ */
#screen-loading {
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.loader-ring {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-top-color: var(--roxo2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 16px rgba(124,58,237,0.4);
}

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

.loading-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font);
}

/* ════════════════════════════════════════════
   TIPOGRAFIA
   ════════════════════════════════════════════ */
.screen-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  background: var(--grad-text-dir);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.screen-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-md);
  opacity: 0.8;
}

/* ════════════════════════════════════════════
   FORMULÁRIOS
   ════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.form-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.form-input {
  background: var(--bg-surface);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  padding: var(--space-md);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--roxo2);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-input::placeholder {
  color: rgba(255,255,255,0.2);
}

/* ════════════════════════════════════════════
   BOTÕES
   ════════════════════════════════════════════ */

/* Botão primário — gradiente */
.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 14px var(--space-xl);
  text-align: center;
  text-transform: uppercase;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  width: 100%;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.55), 0 4px 16px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover::after {
  background: rgba(255,255,255,0.07);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Botão secundário — outline roxo */
.btn-secondary {
  background: transparent;
  color: var(--roxo2);
  border: 1.5px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 12px var(--space-xl);
  text-align: center;
  text-transform: uppercase;
  transition: all var(--transition);
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--border-hi);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: var(--shadow-sm);
}

/* Botão ghost */
.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: var(--space-sm);
  transition: color var(--transition);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.btn-ghost:hover {
  color: var(--roxo2);
  text-decoration-color: var(--roxo2);
}

/* Grupo de botões */
.btn-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ════════════════════════════════════════════
   CARDS DE SELEÇÃO (Módulos de relação, níveis)
   ════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  width: 100%;
}

@media (min-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.relation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.relation-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.relation-card:hover:not(.locked) {
  border-color: var(--border-mid);
  background: var(--bg-raised);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.relation-card.locked {
  cursor: pointer;
  opacity: 0.55;
}

.relation-card.locked:hover {
  border-color: var(--border-mid);
  opacity: 0.75;
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
  display: block;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.card-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-xs);
  position: relative;
  z-index: 1;
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.lock-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 0.6rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1.5px solid rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-full);
  padding: 2px var(--space-sm);
  color: var(--roxo2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ════════════════════════════════════════════
   NÍVEIS DE PROFUNDIDADE (Level cards)
   ════════════════════════════════════════════ */
.level-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.level-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  transition: all var(--transition);
}

.level-card:hover:not(.locked) {
  border-color: var(--border-mid);
  background: var(--bg-raised);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.level-card.locked {
  opacity: 0.45;
  cursor: pointer;
}

.level-card.locked:hover {
  transform: translateY(-2px);
  border-color: var(--border-mid);
  opacity: 0.65;
}

.level-number {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--roxo2);
  text-transform: uppercase;
  padding-top: 2px;
  flex-shrink: 0;
  opacity: 0.8;
}

.level-info {
  flex: 1;
}

.level-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.level-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ════════════════════════════════════════════
   QUESTIONÁRIO — Perguntas e opções
   ════════════════════════════════════════════ */
.question-header {
  margin-bottom: var(--space-xl);
}

.question-progress-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.progress-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--roxo2);
  font-weight: 700;
  opacity: 0.8;
}

.progress-track {
  flex: 1;
  height: 4px;
  background: rgba(124, 58, 237, 0.15);
  margin: 0 var(--space-md);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-full);
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--grad-primary);
  transition: width 0.4s ease;
  border-radius: var(--radius-full);
}

.question-text {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
}

/* Lista de opções */
.options-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.option-btn {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  transition: all var(--transition);
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.option-btn:hover {
  border-color: var(--border-mid);
  background: var(--bg-raised);
  transform: translateX(3px);
}

.option-btn.selected {
  border-color: var(--roxo2);
  background: rgba(124, 58, 237, 0.15);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.option-letter {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding-top: 2px;
  flex-shrink: 0;
  min-width: 12px;
}

.option-btn.selected .option-letter {
  color: var(--roxo2);
}

/* Botão "Próxima pergunta" */
.nav-question {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* ════════════════════════════════════════════
   DOSSIÊ — Resultado final
   ════════════════════════════════════════════ */
.dossier-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.dossier-meta {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-md);
  font-weight: 700;
  opacity: 0.8;
}

.dossier-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
  background: var(--grad-text-dir);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dossier-section {
  margin-bottom: var(--space-xl);
}

.dossier-section-title {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.dossier-paragraph {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--text);
}

.dossier-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dossier-list li {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  padding-left: var(--space-md);
  position: relative;
  color: var(--text);
}

.dossier-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.dossier-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

/* Skeleton loader */
.skeleton-block {
  background: linear-gradient(90deg, var(--bg-surface), var(--bg-raised), var(--bg-surface));
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
  height: 1em;
  margin-bottom: var(--space-sm);
}

.skeleton-block.wide  { width: 100%; }
.skeleton-block.mid   { width: 75%; }
.skeleton-block.short { width: 50%; }
.skeleton-block.title { height: 1.8em; width: 80%; margin-bottom: var(--space-lg); }

@keyframes skeleton-pulse {
  0%   { opacity: 1; background-position: 200% 0; }
  100% { opacity: 0.6; background-position: -200% 0; }
}

/* ════════════════════════════════════════════
   GABINETE — Slots de perfis salvos
   ════════════════════════════════════════════ */
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  width: 100%;
}

.slot-card {
  aspect-ratio: 3/4;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition);
}

.slot-card:hover {
  border-color: var(--border-mid);
  background: var(--bg-raised);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.slot-card.empty {
  border-style: dashed;
}

.slot-card.empty:hover {
  border-style: solid;
  border-color: var(--border-mid);
}

.slot-icon {
  font-size: 1.4rem;
  color: var(--roxo2);
  opacity: 0.7;
}

.slot-name {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.slot-info {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
    padding: var(--space-lg);
  }
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--dark2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-width: 480px;
  width: 100%;
  padding: var(--space-xl) var(--space-lg);
  position: relative;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124,58,237,0.2);
}

@media (min-width: 480px) {
  .modal-box {
    border-radius: var(--radius-xl);
    animation: fadeIn 0.2s ease;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: var(--space-sm);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text);
  border-color: var(--border-mid);
  background: var(--bg-raised);
}

.modal-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-md);
  display: block;
  opacity: 0.9;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  background: var(--grad-text-dir);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.modal-price-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  text-align: center;
  box-shadow: inset 0 0 20px rgba(124,58,237,0.08);
}

.modal-price-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-sm);
  display: block;
  font-weight: 700;
  opacity: 0.8;
}

.modal-price {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad-text-dir);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-price-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.modal-features {
  list-style: none;
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.modal-features li::before {
  content: '✓';
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════
   TOAST DE NOTIFICAÇÃO
   ════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px var(--space-lg);
  z-index: 300;
  white-space: nowrap;
  animation: fadeIn 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast.hidden {
  display: none;
}

/* ════════════════════════════════════════════
   DIVISORES E AUXILIARES
   ════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-sm       { margin-top: var(--space-sm); }
.mt-md       { margin-top: var(--space-md); }
.mt-lg       { margin-top: var(--space-lg); }
.mt-xl       { margin-top: var(--space-xl); }

/* Status bar do usuário */
.user-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  margin-bottom: var(--space-xl);
}

.user-email-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.user-tier-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.15);
  border: 1.5px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  color: var(--roxo2);
}

.user-tier-badge.premium {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(236,72,153,0.2));
  border: 1.5px solid rgba(236,72,153,0.5);
  color: var(--pink2);
  box-shadow: 0 2px 12px rgba(236,72,153,0.2);
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE
   ════════════════════════════════════════════ */
@media (min-width: 480px) {
  #mcr-main {
    padding: var(--space-xl) var(--space-xl);
  }

  .btn-group.horizontal {
    flex-direction: row;
  }

  .btn-group.horizontal .btn-primary,
  .btn-group.horizontal .btn-secondary {
    width: auto;
    flex: 1;
  }
}

@media (min-width: 768px) {
  :root {
    --header-h: 68px;
  }

  #mcr-main {
    padding: var(--space-2xl) var(--space-xl);
  }

  .level-list {
    gap: var(--space-sm);
  }
}

@media (min-width: 1024px) {
  .dossier-section {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: var(--space-xl);
    align-items: start;
  }

  .dossier-section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    padding-top: 2px;
  }
}

/* Acessibilidade: foco */
:focus-visible {
  outline: 2px solid var(--roxo2);
  outline-offset: 3px;
}

/* ════════════════════════════════════════════
   DOSSIÊ DUPLO — [A CIÊNCIA DIZ] / [TRADUZINDO]
   ════════════════════════════════════════════ */
.dossier-dual-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.dossier-science-label,
.dossier-translation-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: block;
}

.dossier-science-label {
  color: var(--roxo2);
  opacity: 0.8;
}

.dossier-translation-label {
  color: var(--pink2);
  opacity: 0.9;
}

.dossier-translation-block {
  background: rgba(236, 72, 153, 0.06);
  border-left: 3px solid;
  border-image: var(--grad-primary) 1;
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.dossier-translation-block .dossier-paragraph {
  color: var(--text);
}

/* ════════════════════════════════════════════
   DOSSIÊ PESSOAL — Badge
   ════════════════════════════════════════════ */
.self-dossier-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.15);
  border: 1.5px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  color: var(--roxo2);
  margin-bottom: var(--space-lg);
}

/* ════════════════════════════════════════════
   TELA ONBOARDING
   ════════════════════════════════════════════ */
.onboarding-iframe-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.onboarding-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.onboarding-authority {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
}

.authority-stat {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad-text-dir);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.authority-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-lg);
}

/* ════════════════════════════════════════════
   TELA CONFIGURAÇÕES
   ════════════════════════════════════════════ */
.settings-section {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-section-title {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-lg);
  opacity: 0.85;
}

/* ════════════════════════════════════════════
   MODAL DE REFERÊNCIAS
   ════════════════════════════════════════════ */
.references-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 60vh;
  overflow-y: auto;
  padding-right: var(--space-sm);
}

.references-list li {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: var(--space-md);
  position: relative;
}

.references-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--roxo2);
  opacity: 0.7;
}

.references-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ════════════════════════════════════════════
   TEXTAREA RELATO LIVRE (Premium)
   ════════════════════════════════════════════ */
.free-text-wrap {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.free-text-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--roxo2);
  margin-bottom: var(--space-sm);
  display: block;
  opacity: 0.85;
}

.free-text-area {
  background: var(--bg-surface);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  padding: var(--space-md);
  resize: vertical;
  width: 100%;
  min-height: 120px;
  transition: all var(--transition);
  outline: none;
}

.free-text-area:focus {
  border-color: var(--roxo2);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.free-text-area::placeholder {
  color: rgba(255,255,255,0.2);
}

/* ════════════════════════════════════════════
   MINHAS ANÁLISES
   ════════════════════════════════════════════ */
.analyses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  width: 100%;
}

.slot-profiles {
  font-size: 0.62rem;
  color: var(--text-faint);
  line-height: 1.4;
  letter-spacing: 0.03em;
  word-break: break-word;
}

/* Dossiê: perfis no topo */
.dossier-profiles {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.profile-chip {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.15);
  border: 1.5px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  color: var(--roxo2);
  white-space: nowrap;
}

/* Hub blocks */
.hub-block {
  width: 100%;
}

/* Dossiê: card High-Ticket */
.dossier-highticket {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.dossier-highticket p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto var(--space-xl);
}

/* Tela Relato Guiado */
.relato-instructions {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Perfil setup */
.profile-form-wrap {
  max-width: 420px;
}

/* Botão saída do questionário */
.btn-exit-screen {
  font-size: 0.68rem;
  padding: 5px 12px;
  background: transparent;
  border: 1.5px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all var(--transition);
}

.btn-exit-screen:hover {
  color: var(--roxo2);
  border-color: var(--border-mid);
  background: var(--bg-surface);
}

/* ════════════════════════════════════════════
   SCROLLBAR CUSTOMIZADA
   ════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* ════════════════════════════════════════════
   SELETOR DE PALETA — Header
   ════════════════════════════════════════════ */
#color-theme-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.color-theme-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  padding: 3px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), transform var(--transition);
}

.color-theme-btn:hover {
  transform: scale(1.15);
  border-color: var(--border-mid);
}

.color-theme-btn.active {
  border-color: var(--border-hi);
}

.color-swatch {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* ════════════════════════════════════════════
   TEMA EMERALD — Verde Esmeralda & Laranja
   Ativo via [data-color-theme="emerald"] no <html>
   ════════════════════════════════════════════ */
[data-color-theme="emerald"] {
  --roxo:   #00c896;
  --roxo2:  #34d9a8;          /* verde2 — accent labels */
  --pink:   #ff6b2b;
  --pink2:  #ff8f5e;
  --dark:   #08120e;
  --dark2:  #0d1f18;
  --grad-primary:  linear-gradient(135deg, #00c896, #ff6b2b);
  --grad-text-dir: linear-gradient(90deg, #34d9a8, #f5c842);
  --bg:         #08120e;
  --bg-surface: rgba(0, 200, 150, 0.08);
  --bg-raised:  rgba(0, 200, 150, 0.15);
  --bg-deep:    #0d1f18;
  --text:       #ffffff;
  --text-muted: #8aaa9a;
  --text-faint: rgba(255, 255, 255, 0.28);
  --border:     rgba(0, 200, 150, 0.15);
  --border-mid: rgba(0, 200, 150, 0.38);
  --border-hi:  rgba(0, 200, 150, 0.65);
  --shadow-sm:  0 4px 16px rgba(0, 200, 150, 0.2);
  --shadow-md:  0 8px 32px rgba(0, 200, 150, 0.35);
  --shadow-lg:  0 16px 48px rgba(0, 200, 150, 0.4);
  --shadow-pink: 0 8px 32px rgba(255, 107, 43, 0.3);
}

/* Emerald: fundo esverdeado com radial gradients */
[data-color-theme="emerald"] body {
  background:
    radial-gradient(ellipse at 25% 35%, rgba(0, 200, 150, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 65%, rgba(255, 107, 43, 0.10) 0%, transparent 50%),
    #08120e;
}

/* Emerald: header */
[data-color-theme="emerald"] #mcr-header {
  background: rgba(8, 18, 14, 0.88);
  border-bottom-color: rgba(0, 200, 150, 0.15);
}

/* Emerald: loading ring verde */
[data-color-theme="emerald"] .loader-ring {
  border-top-color: #34d9a8;
  box-shadow: 0 0 16px rgba(0, 200, 150, 0.4);
}

/* Emerald: progress fill verde→laranja */
[data-color-theme="emerald"] .progress-fill {
  background: linear-gradient(90deg, #00c896, #ff6b2b);
}

/* Emerald: badges/pills — laranja (spec específica) */
[data-color-theme="emerald"] .lock-badge,
[data-color-theme="emerald"] .self-dossier-badge,
[data-color-theme="emerald"] .profile-chip,
[data-color-theme="emerald"] .user-tier-badge {
  background: rgba(255, 107, 43, 0.1);
  border-color: rgba(255, 107, 43, 0.35);
  color: #ff8f5e;
}

/* Emerald: opção selecionada */
[data-color-theme="emerald"] .option-btn.selected {
  border-color: #34d9a8;
  background: rgba(0, 200, 150, 0.12);
  box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.18);
}

[data-color-theme="emerald"] .option-btn.selected .option-letter {
  color: #34d9a8;
}

/* Emerald: modal */
[data-color-theme="emerald"] .modal-box {
  background: #0d1f18;
  border-color: rgba(0, 200, 150, 0.3);
  box-shadow: 0 16px 48px rgba(0, 200, 150, 0.25);
}

/* Emerald: modal price — dourado */
[data-color-theme="emerald"] .modal-price {
  background: linear-gradient(90deg, #34d9a8, #f5c842);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Emerald: modal features checkmark */
[data-color-theme="emerald"] .modal-features li::before {
  background: linear-gradient(135deg, #00c896, #ff6b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Emerald: dossier list bullet */
[data-color-theme="emerald"] .dossier-list li::before {
  background: linear-gradient(135deg, #00c896, #ff6b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Emerald: tier badge premium — dourado */
[data-color-theme="emerald"] .user-tier-badge.premium {
  background: linear-gradient(135deg, rgba(0,200,150,0.2), rgba(245,200,66,0.15));
  border-color: rgba(245, 200, 66, 0.5);
  color: #f5c842;
  box-shadow: 0 2px 12px rgba(245, 200, 66, 0.2);
}

/* Emerald: translation block */
[data-color-theme="emerald"] .dossier-translation-block {
  background: rgba(0, 200, 150, 0.05);
}

/* Emerald: toast */
[data-color-theme="emerald"] .toast {
  background: linear-gradient(135deg, #00c896, #ff6b2b);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Emerald: scrollbar verde */
[data-color-theme="emerald"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 150, 0.3);
}

[data-color-theme="emerald"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 200, 150, 0.55);
}

/* Emerald: selection */
[data-color-theme="emerald"] ::selection {
  background: rgba(0, 200, 150, 0.35);
  color: #08120e;
}

/* ════════════════════════════════════════════
   TEMA WINE & GOLD — Vinho e Dourado
   Ativo via [data-color-theme="wine"] no <html>
   ════════════════════════════════════════════ */
[data-color-theme="wine"] {
  --roxo:   #7b1c3e;
  --roxo2:  #c9a84c;          /* dourado — usado em labels e accents */
  --pink:   #c9a84c;
  --pink2:  #e8c97a;
  --dark:   #0e0508;
  --dark2:  #170b0f;
  --grad-primary:  linear-gradient(135deg, #7b1c3e, #c9a84c);
  --grad-text-dir: linear-gradient(90deg, #c9a84c, #e8c97a);
  --bg:         #0e0508;
  --bg-surface: rgba(123, 28, 62, 0.09);
  --bg-raised:  rgba(123, 28, 62, 0.18);
  --bg-deep:    #170b0f;
  --text:       #f5e8d0;      /* branco morno, levemente dourado */
  --text-muted: #9a8575;
  --text-faint: rgba(245, 232, 208, 0.28);
  --border:     rgba(201, 168, 76, 0.18);
  --border-mid: rgba(201, 168, 76, 0.38);
  --border-hi:  rgba(201, 168, 76, 0.65);
  --shadow-sm:  0 4px 16px rgba(201, 168, 76, 0.15);
  --shadow-md:  0 8px 32px rgba(201, 168, 76, 0.25);
  --shadow-lg:  0 16px 48px rgba(123, 28, 62, 0.55);
  --shadow-pink: 0 8px 32px rgba(201, 168, 76, 0.2);
}

/* Wine: fundo com radial gradients vinho + dourado */
[data-color-theme="wine"] body {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(123, 28, 62, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(201, 168, 76, 0.10) 0%, transparent 50%),
    #0e0508;
}

/* Wine: header */
[data-color-theme="wine"] #mcr-header {
  background: rgba(14, 5, 8, 0.88);
  border-bottom-color: rgba(201, 168, 76, 0.2);
}

/* Wine: loading ring dourado */
[data-color-theme="wine"] .loader-ring {
  border-top-color: #c9a84c;
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.4);
}

/* Wine: progress fill */
[data-color-theme="wine"] .progress-fill {
  background: linear-gradient(90deg, #7b1c3e, #c9a84c);
}

/* Wine: opção selecionada */
[data-color-theme="wine"] .option-btn.selected {
  border-color: #c9a84c;
  background: rgba(201, 168, 76, 0.1);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.18);
}

[data-color-theme="wine"] .option-btn.selected .option-letter {
  color: #c9a84c;
}

/* Wine: modal */
[data-color-theme="wine"] .modal-box {
  background: #170b0f;
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 16px 48px rgba(123, 28, 62, 0.7);
}

/* Wine: modal features checkmark */
[data-color-theme="wine"] .modal-features li::before {
  background: linear-gradient(90deg, #c9a84c, #e8c97a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wine: dossier list bullet */
[data-color-theme="wine"] .dossier-list li::before {
  background: linear-gradient(135deg, #7b1c3e, #c9a84c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wine: tier badge premium */
[data-color-theme="wine"] .user-tier-badge.premium {
  background: linear-gradient(135deg, rgba(123,28,62,0.3), rgba(201,168,76,0.2));
  border-color: rgba(201, 168, 76, 0.5);
  color: #e8c97a;
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.18);
}

/* Wine: translation block */
[data-color-theme="wine"] .dossier-translation-block {
  background: rgba(201, 168, 76, 0.05);
}

/* Wine: toast */
[data-color-theme="wine"] .toast {
  background: linear-gradient(135deg, #7b1c3e, #c9a84c);
  color: #ffffff;
}

/* Wine: scrollbar */
[data-color-theme="wine"] ::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
}

[data-color-theme="wine"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.55);
}

/* Wine: selection */
[data-color-theme="wine"] ::selection {
  background: rgba(201, 168, 76, 0.35);
  color: #0e0508;
}

/* ════════════════════════════════════════════
   TEMA CLÁSSICO — P&B (Quiet Luxury)
   Ativo via [data-color-theme="classic"] no <html>
   ════════════════════════════════════════════ */
[data-color-theme="classic"] {
  --roxo:   #ffffff;
  --roxo2:  #ffffff;
  --pink:   #888888;
  --pink2:  #aaaaaa;
  --dark:   #000000;
  --dark2:  #0d0d0d;
  --grad-primary:  linear-gradient(135deg, #ffffff, #cccccc);
  --grad-text-dir: linear-gradient(90deg, #ffffff, #ffffff);
  --bg:         #000000;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-raised:  rgba(255, 255, 255, 0.09);
  --bg-deep:    #0d0d0d;
  --text:       #ffffff;
  --text-muted: #888888;
  --text-faint: rgba(255, 255, 255, 0.25);
  --border:     rgba(255, 255, 255, 0.1);
  --border-mid: rgba(255, 255, 255, 0.22);
  --border-hi:  rgba(255, 255, 255, 0.45);
  --shadow-sm:  0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-md:  0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-pink: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Classic: fundo sólido sem gradientes radiais */
[data-color-theme="classic"] body {
  background: #000000;
}

/* Classic: header */
[data-color-theme="classic"] #mcr-header {
  background: rgba(0, 0, 0, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Classic: brand sem gradiente de cor */
[data-color-theme="classic"] .brand {
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}

/* Classic: loading ring branco */
[data-color-theme="classic"] .loader-ring {
  border-top-color: #ffffff;
  box-shadow: none;
}

/* Classic: botão primário — branco sobre preto */
[data-color-theme="classic"] .btn-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

[data-color-theme="classic"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
}

/* Classic: progress fill */
[data-color-theme="classic"] .progress-fill {
  background: #ffffff;
}

/* Classic: opção selecionada */
[data-color-theme="classic"] .option-btn.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

[data-color-theme="classic"] .option-btn.selected .option-letter {
  color: #ffffff;
}

/* Classic: modal */
[data-color-theme="classic"] .modal-box {
  background: #0d0d0d;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9);
}

/* Classic: modal features checkmark */
[data-color-theme="classic"] .modal-features li::before {
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}

/* Classic: dossier list bullet */
[data-color-theme="classic"] .dossier-list li::before {
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.4);
}

/* Classic: tier badge premium */
[data-color-theme="classic"] .user-tier-badge.premium {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: none;
}

/* Classic: translation block */
[data-color-theme="classic"] .dossier-translation-block {
  background: rgba(255, 255, 255, 0.04);
  border-image: none;
  border-left-color: rgba(255, 255, 255, 0.25);
}

/* Classic: toast */
[data-color-theme="classic"] .toast {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* Classic: scrollbar */
[data-color-theme="classic"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}

[data-color-theme="classic"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* ── CLASSIC LIGHT MODE ──────────────────────
   Ativo quando Classic + data-theme="light"
   ─────────────────────────────────────────── */
[data-color-theme="classic"][data-theme="light"] {
  --bg:         #ffffff;
  --bg-surface: #f5f5f5;
  --bg-raised:  #eeeeee;
  --bg-deep:    #f0f0f0;
  --dark2:      #f0f0f0;
  --text:       #000000;
  --text-muted: #666666;
  --text-faint: rgba(0, 0, 0, 0.3);
  --border:     rgba(0, 0, 0, 0.1);
  --border-mid: rgba(0, 0, 0, 0.22);
  --border-hi:  rgba(0, 0, 0, 0.45);
  --shadow-sm:  0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.18);
}

[data-color-theme="classic"][data-theme="light"] body {
  background: #ffffff;
}

[data-color-theme="classic"][data-theme="light"] #mcr-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-color-theme="classic"][data-theme="light"] .brand {
  -webkit-text-fill-color: #000000;
  color: #000000;
}

[data-color-theme="classic"][data-theme="light"] .loader-ring {
  border-top-color: #000000;
  box-shadow: none;
}

[data-color-theme="classic"][data-theme="light"] .btn-primary {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

[data-color-theme="classic"][data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

[data-color-theme="classic"][data-theme="light"] .progress-fill {
  background: #000000;
}

[data-color-theme="classic"][data-theme="light"] .option-btn.selected {
  border-color: #000000;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

[data-color-theme="classic"][data-theme="light"] .option-btn.selected .option-letter {
  color: #000000;
}

[data-color-theme="classic"][data-theme="light"] .modal-box {
  background: #f5f5f5;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

[data-color-theme="classic"][data-theme="light"] .modal-features li::before {
  -webkit-text-fill-color: #000000;
  color: #000000;
}

[data-color-theme="classic"][data-theme="light"] .dossier-list li::before {
  -webkit-text-fill-color: rgba(0, 0, 0, 0.4);
  color: rgba(0, 0, 0, 0.4);
}

[data-color-theme="classic"][data-theme="light"] .user-tier-badge.premium {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.3);
  color: #000000;
}

[data-color-theme="classic"][data-theme="light"] .dossier-translation-block {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: rgba(0, 0, 0, 0.25);
}

[data-color-theme="classic"][data-theme="light"] .toast {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-color-theme="classic"][data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}

[data-color-theme="classic"][data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.32);
}

[data-color-theme="classic"][data-theme="light"] ::selection {
  background: rgba(0, 0, 0, 0.15);
  color: #000000;
}

/* ════════════════════════════════════════════
   SELEÇÃO DE TEXTO
   ════════════════════════════════════════════ */
::selection {
  background: rgba(124, 58, 237, 0.4);
  color: #ffffff;
}
