/* ==========================================================================
   EDUX DIGITAL - DESIGN SYSTEM & ESTILOS PRINCIPAIS (MOBILE-FIRST NATIVO)
   Biblioteca Inteligente de Pareceres BNCC
   Skills: mobile-first-responsive-design, impeccable, modern-ui-ux-design, build-awwwards-quality-sites
   ========================================================================== */

/* 1. TOKENS DE DESIGN (LIGHT MODE DEFAULT) */
:root {
  /* Identidade Visual Oficial EDUX Digital */
  --edux-petrol: #051136;
  --edux-cyan: #3FB7F8;
  --edux-cyan-hover: #2ba6eb;
  --edux-cyan-light: rgba(63, 183, 248, 0.12);
  --edux-cyan-glow: rgba(63, 183, 248, 0.25);
  --edux-blue: #2563eb;
  --edux-blue-hover: #1d4ed8;
  --edux-blue-glow: rgba(37, 99, 235, 0.35);
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Superfícies & Fundos (Light Mode) */
  --bg-app: #f4f7fb;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #eaf1f8;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-card: #ffffff;
  --bg-card-hover: #f9fbfe;

  /* Tipografia & Contraste (Light Mode) */
  --text-primary: #051136;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #ffffff;

  /* Bordas & Sombras */
  --border-subtle: rgba(5, 17, 54, 0.08);
  --border-focus: #3FB7F8;
  --shadow-sm: 0 1px 3px rgba(5, 17, 54, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(5, 17, 54, 0.06), 0 2px 6px -1px rgba(5, 17, 54, 0.03);
  --shadow-lg: 0 16px 36px -4px rgba(5, 17, 54, 0.1);
  --shadow-card: 0 3px 12px rgba(5, 17, 54, 0.04), 0 1px 3px rgba(5, 17, 54, 0.02);

  /* Destaques Especiais */
  --delicadas-color: #e11d48;
  --delicadas-bg: #fff1f2;
  --delicadas-border: rgba(225, 29, 72, 0.2);

  --ei-color: #0284c7;
  --ei-bg: #f0f9ff;
  --ei-border: rgba(2, 132, 199, 0.2);

  --ef-color: #4f46e5;
  --ef-bg: #eef2ff;
  --ef-border: rgba(79, 70, 229, 0.2);

  --success-color: #10b981;
  --success-bg: #ecfdf5;

  /* Marcadores [ ] dentro do texto */
  --bracket-bg: #e0f2fe;
  --bracket-color: #0369a1;
  --bracket-border: #bae6fd;

  /* Layout & Espaçamento */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 64px;
}

/* 2. TOKENS DE DESIGN (DARK MODE) */
[data-theme="dark"] {
  --bg-app: #030a1e;
  --bg-surface: #07153f;
  --bg-surface-elevated: #0e2258;
  --bg-glass: rgba(7, 21, 63, 0.94);
  --bg-card: #091a4b;
  --bg-card-hover: #0e2566;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --edux-blue: #3b82f6;
  --edux-blue-hover: #60a5fa;
  --edux-blue-glow: rgba(59, 130, 246, 0.45);

  --border-subtle: rgba(63, 183, 248, 0.12);
  --border-focus: #3FB7F8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 40px -4px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.35);

  --delicadas-color: #fb7185;
  --delicadas-bg: rgba(225, 29, 72, 0.18);
  --delicadas-border: rgba(251, 113, 133, 0.35);

  --ei-color: #38bdf8;
  --ei-bg: rgba(56, 189, 248, 0.15);
  --ei-border: rgba(56, 189, 248, 0.3);

  --ef-color: #818cf8;
  --ef-bg: rgba(129, 140, 248, 0.15);
  --ef-border: rgba(129, 140, 248, 0.3);

  --bracket-bg: rgba(63, 183, 248, 0.18);
  --bracket-color: #7dd3fc;
  --bracket-border: rgba(63, 183, 248, 0.4);
}

/* 3. RESET & ESTILOS BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Alvos de Toque Acessíveis */
button, input, select {
  font-family: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.97);
}

/* 4. CABEÇALHO NATIVO (HEADER) COM ALINHAMENTO VERTICAL PERFEITO */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(5, 17, 54, 0.12);
  display: block;
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.brand-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.badge-ocider-pill {
  background: var(--edux-cyan-light);
  color: var(--edux-cyan);
  border: 1px solid rgba(63, 183, 248, 0.3);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="light"] .badge-ocider-pill {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botão de Alternância de Tema */
.btn-icon-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.btn-icon-toggle:hover {
  border-color: var(--edux-cyan);
  background: var(--bg-surface-elevated);
}

.btn-icon-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.25s ease;
}

/* 5. ÁREA DE ATALHOS RÁPIDOS (QUICK BAR) */
.quick-access-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  transition: background 0.25s ease;
}

.quick-access-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.quick-access-container::-webkit-scrollbar {
  display: none;
}

.quick-btn {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.quick-btn:hover {
  border-color: var(--edux-cyan);
  background: var(--edux-cyan-light);
  color: var(--edux-cyan-hover);
}

[data-theme="light"] .quick-btn:hover {
  color: #0369a1;
}

.quick-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

/* 6. CONTEÚDO PRINCIPAL & BUSCADOR */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 16px 40px;
  flex: 1;
}

.search-section {
  margin-bottom: 20px;
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-svg {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2;
  pointer-events: none;
}

/* Reset Estrito de Navegador (Elimina o segundo "x" nativo do WebKit/Blink) */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  border-color: var(--edux-cyan);
  box-shadow: 0 0 0 3px var(--edux-cyan-light);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.search-clear-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.search-clear-btn.visible {
  display: flex;
}

.search-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.results-count-badge {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   FILTROS RESPONSIVOS: MOBILE SELECTS (< 768px) vs. DESKTOP TABS (>= 768px)
   ========================================================================== */

/* Padrão Mobile (< 768px) */
@media (max-width: 767px) {
  /* 1. Ocultar badge do Método OCIDER no Header (somente mobile) */
  .badge-ocider-pill {
    display: none !important;
  }

  /* 2. Botões da barra de atalhos rápidos empilhados verticalmente em largura total (100%) */
  .quick-access-section {
    padding: 10px 16px;
  }

  .quick-access-container {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .quick-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.84375rem;
    white-space: normal;
  }

  /* 3 & 4. Metadados de Busca: Contagem e Dica cada um em sua própria linha */
  .search-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 8px;
  }

  .results-count-badge {
    display: block;
    width: 100%;
  }

  .search-tip-text,
  .search-meta-bar span:last-child {
    display: block;
    width: 100%;
    line-height: 1.4;
  }

  .tabs-navigation-wrapper,
  .category-chips-wrapper {
    display: none !important;
  }
}

/* ==========================================================================
   7. BARRA DE FILTROS INTELIGENTES (SELEÇÃO PADRÃO WEB APP - DESKTOP & MOBILE)
   Caixas de seleção de Etapa e Categoria unificadas
   ========================================================================== */
.mobile-filters-section,
.app-filters-section {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
}

.mobile-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mobile-filter-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}

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

.custom-mobile-select {
  width: 100%;
  height: 50px;
  padding: 0 38px 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.custom-mobile-select:hover {
  border-color: var(--edux-cyan);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.custom-mobile-select:focus {
  border-color: var(--edux-cyan);
  box-shadow: 0 0 0 3px var(--edux-cyan-light);
}

.select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.custom-select-wrapper:hover .select-chevron {
  color: var(--edux-cyan);
}

/* Ocultar abas e chips antigos em todas as resoluções */
.tabs-navigation-wrapper,
.category-chips-wrapper {
  display: none !important;
}

@media (min-width: 768px) {
  .mobile-filters-section,
  .app-filters-section {
    gap: 16px;
    margin-bottom: 24px;
  }

  .mobile-filter-label {
    font-size: 0.84375rem;
  }

  .custom-mobile-select {
    height: 52px;
    font-size: 0.90625rem;
    padding: 0 40px 0 16px;
  }
}

/* 7. NAVEGAÇÃO POR ABAS (TABS - DESKTOP) */
.tabs-navigation-wrapper {
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs-navigation-wrapper::-webkit-scrollbar {
  display: none;
}

.tabs-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

.tab-pill-btn {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  transition: all 0.2s ease;
}

.tab-pill-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.tab-pill-btn.active {
  background: var(--edux-petrol);
  color: #ffffff;
  border-color: var(--edux-petrol);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tab-pill-btn.active {
  background: var(--edux-cyan);
  color: var(--edux-petrol);
  border-color: var(--edux-cyan);
}

.tab-count-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-pill-btn:not(.active) .tab-count-badge {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

/* Aba Delicadas em Carmim */
.tab-pill-btn[data-stage="delicadas"] {
  border-color: var(--delicadas-border);
}

.tab-pill-btn[data-stage="delicadas"]:not(.active) {
  color: var(--delicadas-color);
  background: var(--delicadas-bg);
}

.tab-pill-btn[data-stage="delicadas"].active {
  background: var(--delicadas-color);
  border-color: var(--delicadas-color);
  color: #ffffff;
}

/* 8. PÍLULAS DE SUBCATEGORIAS (ZERO TEXT CUTOFF - FLEX WRAP NATIVO) */
.category-chips-wrapper {
  margin-bottom: 24px;
  width: 100%;
  overflow: visible;
}

.category-chips-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: normal;
  word-break: keep-all;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.chip-btn.active {
  background: var(--edux-cyan-light);
  color: var(--edux-cyan);
  border-color: var(--edux-cyan);
  font-weight: 700;
}

[data-theme="light"] .chip-btn.active {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

/* 9. GRID DE CARDS DE PARECERES */
.phrases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .phrases-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
  }
}

.phrase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
  position: relative;
}

.phrase-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-badges-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-stage {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-stage.ei {
  background: var(--ei-bg);
  color: var(--ei-color);
  border: 1px solid var(--ei-border);
}

.badge-stage.ef {
  background: var(--ef-bg);
  color: var(--ef-color);
  border: 1px solid var(--ef-border);
}

.badge-stage.delicadas {
  background: var(--delicadas-bg);
  color: var(--delicadas-color);
  border: 1px solid var(--delicadas-border);
}

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

.card-body {
  margin-bottom: 16px;
}

.phrase-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  text-wrap: pretty;
}

/* Destaque para marcadores entre colchetes [ ] (Interativo com Tooltip Didático) */
.bracket-marker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bracket-bg);
  color: var(--bracket-color);
  border: 1px solid var(--bracket-border);
  padding: 2px 7px;
  margin: 1px 2px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  cursor: help;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  text-decoration: underline dotted rgba(63, 183, 248, 0.6);
  text-underline-offset: 3px;
}

.bracket-marker:hover,
.bracket-marker:focus-visible,
.bracket-marker.active {
  border-color: var(--edux-cyan);
  box-shadow: 0 0 10px var(--edux-cyan-glow);
  transform: translateY(-1px);
  background: var(--edux-cyan-light);
  color: var(--edux-cyan);
  outline: none;
}

[data-theme="light"] .bracket-marker:hover,
[data-theme="light"] .bracket-marker:focus-visible,
[data-theme="light"] .bracket-marker.active {
  color: #0284c7;
  border-color: #38bdf8;
  background: #e0f2fe;
}

.marker-info-icon {
  font-size: 0.6875rem;
  opacity: 0.75;
  margin-left: 2px;
  pointer-events: none;
}

/* ==========================================================================
   BALÃO DIDÁTICO GLOBAL (TOOLTIP / POPOVER FLUTUANTE)
   ========================================================================== */
.global-tooltip-balloon {
  position: fixed;
  z-index: 9999;
  max-width: 320px;
  width: calc(100vw - 32px);
  background: rgba(5, 17, 54, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(63, 183, 248, 0.45);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(63, 183, 248, 0.2);
  padding: 14px 16px;
  color: #f8fafc;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.45;
}

.global-tooltip-balloon.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(63, 183, 248, 0.2);
  padding-bottom: 6px;
}

.tooltip-title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #3FB7F8;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-title-icon {
  width: 14px;
  height: 14px;
  stroke: #3FB7F8;
  stroke-width: 2.5;
}

.tooltip-close-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tooltip-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tooltip-desc {
  font-size: 0.8125rem;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.tooltip-example-box {
  background: rgba(63, 183, 248, 0.1);
  border: 1px solid rgba(63, 183, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.75rem;
  color: #bae6fd;
}

.tooltip-example-box strong {
  color: #3FB7F8;
  display: block;
  margin-bottom: 2px;
}

/* Seta direcional do balão (Caret) */
.tooltip-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #051136;
  pointer-events: none;
}

.tooltip-arrow.arrow-bottom {
  bottom: -6px;
  transform: rotate(45deg);
  border-right: 1px solid rgba(63, 183, 248, 0.45);
  border-bottom: 1px solid rgba(63, 183, 248, 0.45);
}

.tooltip-arrow.arrow-top {
  top: -6px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(63, 183, 248, 0.45);
  border-top: 1px solid rgba(63, 183, 248, 0.45);
}

.card-context {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-context svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-copy-phrase {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-copy-phrase:hover {
  border-color: var(--edux-cyan);
  background: var(--edux-cyan-light);
  color: var(--edux-cyan);
}

[data-theme="light"] .btn-copy-phrase:hover {
  color: #0369a1;
}

.btn-copy-phrase svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Estado de Sucesso ao Copiar */
.btn-copy-phrase.copied {
  background: var(--success-bg) !important;
  color: var(--success-color) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* 10. ESTADO VAZIO (EMPTY STATE) */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
  margin-top: 20px;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 20px;
}

.btn-reset-filters {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--edux-cyan);
  color: var(--edux-petrol);
  font-weight: 700;
  font-size: 0.875rem;
}

/* 11. NOVO RODAPÉ INSTITUCIONAL NATIVO (CENTRALIZADO, 20PX PADDING) */
.app-footer {
  margin-top: auto;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 20px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.footer-legal-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 12. MODAIS ACESSÍVEIS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 17, 54, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  width: 24px;
  height: 24px;
  color: var(--edux-cyan);
  stroke: currentColor;
  stroke-width: 2;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Itens de Checklist no Modal */
.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.checklist-item:hover {
  border-color: var(--edux-cyan);
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--edux-cyan);
  margin-top: 2px;
  cursor: pointer;
}

.checklist-label {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 500;
  user-select: none;
}

.checklist-item.checked .checklist-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-warning-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--delicadas-bg);
  border: 1px solid var(--delicadas-border);
  color: var(--delicadas-color);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Método OCIDER Steps */
.ocider-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ocider-step {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.ocider-letter {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--edux-petrol);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.125rem;
}

[data-theme="dark"] .ocider-letter {
  background: var(--edux-cyan);
  color: var(--edux-petrol);
}

.ocider-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ocider-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* 13. TOAST NOTIFICATION */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 110;
  padding: 12px 20px;
  background: var(--edux-petrol);
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
}

[data-theme="dark"] .toast-notification {
  background: var(--edux-surface-elevated);
  border: 1px solid var(--edux-cyan);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* 14. FLOATING BACK TO TOP BUTTON */
.btn-back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.btn-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.btn-back-to-top:hover {
  background: var(--edux-cyan);
  color: var(--edux-petrol);
  border-color: var(--edux-cyan);
}

/* ==========================================================================
   15. SELETOR DE MODO PRINCIPAL (DUAL SWITCHER MOBILE-FIRST)
   Formulações (302) vs. Relatórios Completos (22 OCIDER)
   ========================================================================== */
.mode-navigation-section {
  margin-bottom: 20px;
  width: 100%;
}

.mode-segmented-control {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  gap: 6px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.mode-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  text-align: left;
}

.mode-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .mode-pill-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mode-pill-btn.active {
  background: var(--edux-petrol);
  color: #ffffff;
  border-color: var(--edux-petrol);
  box-shadow: 0 3px 12px rgba(5, 17, 54, 0.18);
}

[data-theme="dark"] .mode-pill-btn.active {
  background: var(--edux-cyan);
  color: var(--edux-petrol);
  border-color: var(--edux-cyan);
  box-shadow: 0 4px 14px rgba(63, 183, 248, 0.28);
}

.mode-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

.mode-btn-content {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.mode-btn-title {
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.mode-btn-badge {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
}

.mode-pill-btn.active .mode-btn-badge {
  opacity: 0.95;
}

.badge-ocider-highlight {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 640px) {
  .mode-segmented-control {
    flex-direction: row;
    padding: 4px;
    gap: 4px;
  }

  .mode-pill-btn {
    min-height: 50px;
    padding: 6px 10px;
    gap: 8px;
  }

  .mode-icon {
    width: 20px;
    height: 20px;
  }

  .mode-btn-title {
    font-size: 0.8125rem;
  }

  .mode-btn-badge {
    font-size: 0.6875rem;
  }
}

/* ==========================================================================
   15.1. AVISO INFORMATIVO: EXEMPLOS PARA REFERÊNCIA (DIDÁTICO OCIDER)
   ========================================================================== */
.examples-notice-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(63, 183, 248, 0.08);
  border: 1px solid rgba(63, 183, 248, 0.22);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(5, 17, 54, 0.03);
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

[data-theme="dark"] .examples-notice-card {
  background: rgba(63, 183, 248, 0.07);
  border-color: rgba(63, 183, 248, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.notice-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(63, 183, 248, 0.14);
  color: var(--ei-color);
  flex-shrink: 0;
  margin-top: 2px;
}

[data-theme="dark"] .notice-icon-container {
  background: rgba(63, 183, 248, 0.16);
  color: var(--edux-cyan);
}

.notice-info-svg {
  width: 20px;
  height: 20px;
}

.notice-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.notice-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.notice-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.notice-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.notice-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(63, 183, 248, 0.1);
  border: 1px solid rgba(63, 183, 248, 0.28);
  color: #0284c7;
  font-family: var(--font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

[data-theme="dark"] .notice-cta-btn {
  background: rgba(63, 183, 248, 0.12);
  border-color: rgba(63, 183, 248, 0.25);
  color: var(--edux-cyan);
}

.notice-cta-btn:hover {
  background: rgba(63, 183, 248, 0.2);
  border-color: rgba(63, 183, 248, 0.45);
  color: #0369a1;
  transform: translateY(-1px);
}

[data-theme="dark"] .notice-cta-btn:hover {
  background: rgba(63, 183, 248, 0.22);
  border-color: var(--edux-cyan);
  color: #ffffff;
}

.notice-cta-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.notice-cta-arrow {
  transition: transform 0.2s ease;
}

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

@media (max-width: 640px) {
  .examples-notice-card {
    padding: 14px 16px;
    gap: 12px;
    margin-bottom: 18px;
  }

  .notice-icon-container {
    width: 32px;
    height: 32px;
  }

  .notice-info-svg {
    width: 18px;
    height: 18px;
  }

  .notice-title {
    font-size: 0.875rem;
  }

  .notice-text {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .notice-cta-btn {
    min-height: 40px;
    padding: 6px 12px;
    font-size: 0.78125rem;
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   16. GRID E CARDS DOS 22 RELATÓRIOS COMPLETOS (MÉTODO OCIDER)
   ========================================================================== */
.reports-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--edux-cyan) 0%, #6366f1 100%);
  opacity: 0.85;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

/* Cabeçalho do Card de Relatório */
.report-card-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.report-badges-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-ocider-flow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(63, 183, 248, 0.12);
  color: #0284c7;
  border: 1px solid rgba(63, 183, 248, 0.28);
}

[data-theme="dark"] .badge-ocider-flow {
  background: rgba(63, 183, 248, 0.18);
  color: var(--edux-cyan);
}

.report-student-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.78125rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.report-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-card-title {
  font-size: clamp(1.0625rem, 1.2vw + 0.8rem, 1.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.report-situation-desc {
  font-size: 0.84375rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Blocos de Parágrafos OCIDER */
.report-paragraphs-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ocider-paragraph-block {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, background-color 0.15s;
  border-left-width: 4px;
}

/* Variações de cor para cada etapa OCIDER */
.ocider-paragraph-block.oc-step {
  border-left-color: #0284c7;
  background: rgba(2, 132, 199, 0.025);
}

[data-theme="dark"] .ocider-paragraph-block.oc-step {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.04);
}

.ocider-paragraph-block.id-step {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.025);
}

[data-theme="dark"] .ocider-paragraph-block.id-step {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.04);
}

.ocider-paragraph-block.er-step {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.025);
}

[data-theme="dark"] .ocider-paragraph-block.er-step {
  border-left-color: #34d399;
  background: rgba(52, 211, 153, 0.04);
}

.ocider-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ocider-step-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ocider-step-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.oc-step .ocider-step-tag {
  background: #e0f2fe;
  color: #0369a1;
}

[data-theme="dark"] .oc-step .ocider-step-tag {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.id-step .ocider-step-tag {
  background: #fef3c7;
  color: #b45309;
}

[data-theme="dark"] .id-step .ocider-step-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.er-step .ocider-step-tag {
  background: #d1fae5;
  color: #047857;
}

[data-theme="dark"] .er-step .ocider-step-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.ocider-step-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ocider-step-subtitle {
  font-size: 0.71875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Botão de cópia individual de cada parágrafo */
.btn-copy-step-mini {
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.71875rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  transition: all 0.15s ease;
}

.btn-copy-step-mini:hover {
  background: var(--edux-cyan-light);
  color: #0284c7;
  border-color: var(--edux-cyan);
}

[data-theme="dark"] .btn-copy-step-mini:hover {
  color: var(--edux-cyan);
}

.btn-copy-step-mini.copied {
  background: var(--success-bg);
  color: var(--success-color);
  border-color: var(--success-color);
}

.ocider-paragraph-text {
  font-size: clamp(0.875rem, 0.95vw + 0.5rem, 0.96875rem);
  line-height: 1.68;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Rodapé do Card de Relatório: Ações Rápidas */
.report-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.btn-copy-full-report {
  flex: 1 1 240px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  background: var(--edux-petrol);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.90625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--edux-petrol);
  box-shadow: 0 2px 8px rgba(5, 17, 54, 0.12);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .btn-copy-full-report {
  background: var(--edux-cyan);
  color: var(--edux-petrol);
  border-color: var(--edux-cyan);
  box-shadow: 0 3px 12px rgba(63, 183, 248, 0.22);
}

.btn-copy-full-report:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.06);
}

.btn-copy-full-report.copied {
  background: var(--success-color) !important;
  color: #ffffff !important;
  border-color: var(--success-color) !important;
}

.report-tags-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.report-tag-chip {
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
  cursor: pointer;
}

.report-tag-chip:hover {
  border-color: var(--edux-cyan);
  color: var(--text-primary);
}

@media (max-width: 767px) {
  .report-card {
    padding: 16px;
    gap: 14px;
    border-radius: var(--radius-md);
  }

  .btn-copy-full-report {
    width: 100%;
    min-height: 48px;
    flex: 1 1 100%;
  }

  .ocider-paragraph-block {
    padding: 12px 14px;
  }

  .ocider-step-subtitle {
    display: none;
  }
}

/* 25. COMPONENTES DE AUTENTICAÇÃO E PERFIL DO USUÁRIO */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.user-greeting {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  min-height: 32px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-logout svg {
  stroke-width: 2.2;
}

@media (max-width: 600px) {
  .user-greeting {
    display: none;
  }
  .user-profile-badge {
    padding: 2px;
    border: none;
    background: transparent;
    box-shadow: none;
  }
  .btn-logout span {
    display: none;
  }
  .btn-logout {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-md);
  }
}

/* Modal de Acesso Revogado / Reembolsado */
.revoked-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 10, 28, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.revoked-card {
  max-width: 460px;
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.revoked-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.revoked-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.revoked-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-revoked-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-revoked-action:hover {
  background: #1d4ed8;
}

/* 26. ESTADO NEUTRO INICIAL (ZERO-FOPC AUTH GATE) */
.auth-gate-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-gate-boot-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
}

.auth-gate-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-gate-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-gate-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--edux-blue);
  border-radius: 50%;
  animation: authGateSpin 0.75s linear infinite;
}

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

/* Auth Gate Login Card In-Place */
.auth-gate-login-card {
  max-width: 440px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: authGateFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.auth-gate-login-card .brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-gate-login-card .brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.auth-gate-login-card .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--badge-bg, rgba(37, 99, 235, 0.08));
  color: var(--edux-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.auth-gate-login-card .brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-gate-login-card .brand-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Banners do Auth Gate */
.auth-gate-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 20px;
}

.auth-gate-banner.banner-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
}

[data-theme="dark"] .auth-gate-banner.banner-success {
  color: #34d399;
}

.auth-gate-banner.banner-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

[data-theme="dark"] .auth-gate-banner.banner-error {
  color: #f87171;
}

/* Campos do Formulário Auth Gate */
.auth-gate-login-card .form-group {
  margin-bottom: 18px;
}

.auth-gate-login-card .form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-gate-login-card .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-gate-login-card .input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.auth-gate-login-card .form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.auth-gate-login-card .form-input:focus {
  border-color: var(--edux-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.auth-gate-login-card .btn-submit {
  width: 100%;
  height: 50px;
  background: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.auth-gate-login-card .btn-submit:hover:not(:disabled) {
  background: #1d4ed8;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.auth-gate-login-card .btn-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.auth-gate-login-card .btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .auth-gate-login-card .btn-submit {
  background: #3b82f6;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .auth-gate-login-card .btn-submit:hover:not(:disabled) {
  background: #2563eb;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
}

.auth-gate-login-card .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: authGateSpin 0.7s linear infinite;
}

.auth-gate-login-card .security-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-gate-login-card .security-footer strong {
  color: var(--text-primary);
}

.auth-gate-login-card .cakto-hint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-gate-login-card .cakto-hint a {
  color: var(--edux-blue);
  text-decoration: none;
  font-weight: 600;
}

.auth-gate-login-card .cakto-hint a:hover {
  text-decoration: underline;
}




