/* ==========================================================================
   1. RESET SEMÂNTICO E ESTRUTURA GLOBAL (PADRÃO EDITORIAL PHM TECH)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body.app-body,
body.standard-profile,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.phm-shell-main,
.edu-main-shell {
  flex: 1 0 auto;
  width: 100%;
}

/* Banner Global de Apoio PHM Tech — Fixação e alinhamento colado ao topo sem lacunas */
.phm-support-banner {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   2. CABEÇALHO CANÔNICO & GAVETA RESPONSIVA (<= 900px)
   ========================================================================== */
.phm-ecosystem-header {
  position: relative !important;
}

.phm-ecosystem-header .btn-header-action,
.phm-ecosystem-header .nav-pref-trigger {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
  border: 1px solid var(--line) !important;
}

.phm-ecosystem-header .nav-pref-trigger.nav-pref-icon-only {
  width: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.phm-ecosystem-header .header-editorial-nav a,
.phm-ecosystem-header .main-nav a {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-soft, #475569);
  padding: 0.42rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.16s ease;
}

.phm-ecosystem-header .header-editorial-nav a:hover,
.phm-ecosystem-header .header-editorial-nav a:focus-visible,
.phm-ecosystem-header .main-nav a:hover,
.phm-ecosystem-header .main-nav a:focus-visible {
  color: var(--navy, #0b1e3d);
  background: var(--surface-soft, rgba(0, 0, 0, 0.04));
}

.phm-ecosystem-header .header-editorial-nav a.active,
.phm-ecosystem-header .main-nav a.active {
  color: var(--teal, #0d9488);
  background: rgba(13, 148, 136, 0.08);
  font-weight: 600;
  border-bottom: 2px solid var(--teal, #0d9488);
}

[data-theme="dark"] .phm-ecosystem-header .header-editorial-nav a,
[data-theme="dark"] .phm-ecosystem-header .main-nav a {
  color: #94a3b8;
}

[data-theme="dark"] .phm-ecosystem-header .header-editorial-nav a:hover,
[data-theme="dark"] .phm-ecosystem-header .main-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .phm-ecosystem-header .header-editorial-nav a.active,
[data-theme="dark"] .phm-ecosystem-header .main-nav a.active {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.12);
  border-bottom: 2px solid #2dd4bf;
}

@media (max-width: 900px) {
  .phm-ecosystem-header .header-editorial-nav,
  .phm-ecosystem-header .main-nav {
    display: none !important;
  }

  .phm-ecosystem-header .header-editorial-nav.open,
  .phm-ecosystem-header .main-nav.open {
    display: flex !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: var(--surface, #ffffff) !important;
    border-bottom: 1px solid var(--line, #e2e8f0) !important;
    padding: 0.85rem 1.25rem !important;
    gap: 0.4rem !important;
    z-index: 1050 !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16) !important;
  }

  [data-theme="dark"] .phm-ecosystem-header .header-editorial-nav.open,
  [data-theme="dark"] .phm-ecosystem-header .main-nav.open {
    background: #0b1120 !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45) !important;
  }

  .phm-ecosystem-header .header-editorial-nav.open a,
  .phm-ecosystem-header .main-nav.open a {
    width: 100% !important;
    min-height: 40px !important;
    padding: 0.55rem 0.85rem !important;
    font-size: 0.88rem !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-bottom: none !important;
  }

  .phm-ecosystem-header .header-editorial-nav.open a.active,
  .phm-ecosystem-header .main-nav.open a.active {
    background: rgba(13, 148, 136, 0.12) !important;
    color: var(--teal, #0d9488) !important;
  }

  [data-theme="dark"] .phm-ecosystem-header .header-editorial-nav.open a.active,
  [data-theme="dark"] .phm-ecosystem-header .main-nav.open a.active {
    background: rgba(45, 212, 191, 0.16) !important;
    color: #2dd4bf !important;
  }

  .phm-ecosystem-header .menu-toggle {
    display: inline-flex !important;
  }
}

/* ==========================================================================
   SUÍTE DE FERRAMENTAS PEDAGÓGICAS (TEMAS PASTÉIS SUAVES)
   ========================================================================== */

.theme-sapphire {
  --theme-bg-soft: #f0f4ff;
  --theme-badge-bg: #e0e7ff;
  --theme-badge-color: #3730a3;
  --theme-border-hover: #a5b4fc;
  --theme-icon-bg: #e0e7ff;
  --theme-icon-color: #4338ca;
}

.theme-lime {
  --theme-bg-soft: #f7fee7;
  --theme-badge-bg: #ecfccb;
  --theme-badge-color: #3f6212;
  --theme-border-hover: #bef264;
  --theme-icon-bg: #ecfccb;
  --theme-icon-color: #4d7c0f;
}

.theme-gold {
  --theme-bg-soft: #fefce8;
  --theme-badge-bg: #fef08a;
  --theme-badge-color: #854d0e;
  --theme-border-hover: #facc15;
  --theme-icon-bg: #fef08a;
  --theme-icon-color: #a16207;
}

.theme-indigo {
  --theme-bg-soft: #f5f3ff;
  --theme-badge-bg: #ede9fe;
  --theme-badge-color: #4c1d95;
  --theme-border-hover: #c4b5fd;
  --theme-icon-bg: #ede9fe;
  --theme-icon-color: #5b21b6;
}

.theme-sky {
  --theme-bg-soft: #f0f9ff;
  --theme-badge-bg: #e0f2fe;
  --theme-badge-color: #0369a1;
  --theme-border-hover: #7dd3fc;
  --theme-icon-bg: #e0f2fe;
  --theme-icon-color: #0284c7;
}

.theme-mint {
  --theme-bg-soft: #f0fdf4;
  --theme-badge-bg: #dcfce7;
  --theme-badge-color: #15803d;
  --theme-border-hover: #86efac;
  --theme-icon-bg: #dcfce7;
  --theme-icon-color: #16a34a;
}

.theme-peach {
  --theme-bg-soft: #fff7ed;
  --theme-badge-bg: #ffedd5;
  --theme-badge-color: #c2410c;
  --theme-border-hover: #fdba74;
  --theme-icon-bg: #ffedd5;
  --theme-icon-color: #ea580c;
}

.theme-lavender {
  --theme-bg-soft: #fbfbfe;
  --theme-badge-bg: #ede9fe;
  --theme-badge-color: #6d28d9;
  --theme-border-hover: #c4b5fd;
  --theme-icon-bg: #ede9fe;
  --theme-icon-color: #7c3aed;
}

.theme-rose {
  --theme-bg-soft: #fff1f2;
  --theme-badge-bg: #ffe4e6;
  --theme-badge-color: #be123c;
  --theme-border-hover: #fda4af;
  --theme-icon-bg: #ffe4e6;
  --theme-icon-color: #e11d48;
}

.theme-butter {
  --theme-bg-soft: #fefce8;
  --theme-badge-bg: #fef3c7;
  --theme-badge-color: #b45309;
  --theme-border-hover: #fde047;
  --theme-icon-bg: #fef3c7;
  --theme-icon-color: #d97706;
}

/* Adaptação Temática no Modo Sépia */
[data-theme="sepia"] .theme-sapphire {
  --theme-bg-soft: #f0f4ff;
  --theme-badge-bg: #e0e7ff;
  --theme-badge-color: #3730a3;
  --theme-border-hover: #a5b4fc;
  --theme-icon-bg: #e0e7ff;
  --theme-icon-color: #4338ca;
}

.theme-lime {
  --theme-bg-soft: #f7fee7;
  --theme-badge-bg: #ecfccb;
  --theme-badge-color: #3f6212;
  --theme-border-hover: #bef264;
  --theme-icon-bg: #ecfccb;
  --theme-icon-color: #4d7c0f;
}

.theme-gold {
  --theme-bg-soft: #fefce8;
  --theme-badge-bg: #fef08a;
  --theme-badge-color: #854d0e;
  --theme-border-hover: #facc15;
  --theme-icon-bg: #fef08a;
  --theme-icon-color: #a16207;
}

.theme-indigo {
  --theme-bg-soft: #f5f3ff;
  --theme-badge-bg: #ede9fe;
  --theme-badge-color: #4c1d95;
  --theme-border-hover: #c4b5fd;
  --theme-icon-bg: #ede9fe;
  --theme-icon-color: #5b21b6;
}

.theme-sky {
  --theme-bg-soft: #edf5fa;
  --theme-badge-bg: #dceaf2;
  --theme-badge-color: #1e5270;
  --theme-border-hover: #96c4dc;
  --theme-icon-bg: #dceaf2;
  --theme-icon-color: #1e5270;
}

[data-theme="sepia"] .theme-mint {
  --theme-bg-soft: #edf6f0;
  --theme-badge-bg: #dbeede;
  --theme-badge-color: #235e32;
  --theme-border-hover: #9bcba5;
  --theme-icon-bg: #dbeede;
  --theme-icon-color: #235e32;
}

[data-theme="sepia"] .theme-peach {
  --theme-bg-soft: #faf0e6;
  --theme-badge-bg: #f3dfcd;
  --theme-badge-color: #8c3e12;
  --theme-border-hover: #dfb295;
  --theme-icon-bg: #f3dfcd;
  --theme-icon-color: #8c3e12;
}

[data-theme="sepia"] .theme-lavender {
  --theme-bg-soft: #f4f0fa;
  --theme-badge-bg: #e6def2;
  --theme-badge-color: #55347d;
  --theme-border-hover: #beb0d8;
  --theme-icon-bg: #e6def2;
  --theme-icon-color: #55347d;
}

[data-theme="sepia"] .theme-rose {
  --theme-bg-soft: #fbf0f2;
  --theme-badge-bg: #f3dbe0;
  --theme-badge-color: #8a243b;
  --theme-border-hover: #dfa8b5;
  --theme-icon-bg: #f3dbe0;
  --theme-icon-color: #8a243b;
}

[data-theme="sepia"] .theme-butter {
  --theme-bg-soft: #f9f5e6;
  --theme-badge-bg: #efe7cc;
  --theme-badge-color: #7a540b;
  --theme-border-hover: #d5c391;
  --theme-icon-bg: #efe7cc;
  --theme-icon-color: #7a540b;
}

/* Adaptação Sóbria, com Relevo e Elegância no Modo Escuro (Dark Mode) */
[data-theme="dark"] .edu-suite-card,
[data-theme="dark"] .level-row-card {
  background: var(--surface, #0f172a) !important;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12)) !important;
  border-top: 3px solid var(--teal, #2dd4bf) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .edu-suite-card:hover,
[data-theme="dark"] .level-row-card:hover {
  background: var(--surface-soft, #1e293b) !important;
  border-color: var(--teal, #2dd4bf) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(-3px) !important;
}

[data-theme="dark"] .edu-suite-icon-box {
  background: rgba(45, 212, 191, 0.12) !important;
  color: #2dd4bf !important;
  border: 1px solid rgba(45, 212, 191, 0.25) !important;
}

[data-theme="dark"] .edu-suite-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-weight: 600;
}

[data-theme="dark"] .edu-suite-card h3 {
  color: #ffffff !important;
}

[data-theme="dark"] .edu-suite-card p {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .hero-pill-btn {
  background: var(--surface, #0f172a) !important;
  border-color: var(--line, rgba(255, 255, 255, 0.14)) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .hero-pill-btn:hover {
  background: var(--surface-soft, #1e293b) !important;
  border-color: #2dd4bf !important;
  color: #ffffff !important;
}

[data-theme="dark"] .hero-pill-icon {
  color: #2dd4bf !important;
}

.edu-suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions > *,
  .btn-header-action,
  .nav-pref-trigger,
  .edu-suite-card {
    min-width: 0;
    max-width: 100%;
  }

  .btn-header-action,
  .nav-pref-trigger {
    width: 100%;
  }
}

.edu-suite-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3.5px solid var(--theme-border-hover, var(--teal));
  border-radius: var(--radius-md);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
}

.edu-suite-card:hover {
  border-color: var(--theme-border-hover, var(--teal));
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  transform: translateY(-3px);
}

.edu-suite-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.edu-suite-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm, 4px);
  background: var(--theme-icon-bg, var(--surface-soft));
  color: var(--theme-icon-color, var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.edu-suite-card:hover .edu-suite-icon-box {
  transform: scale(1.08);
}

.edu-suite-badge {
  background: var(--theme-badge-bg, var(--surface-soft));
  color: var(--theme-badge-color, var(--text-soft));
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm, 4px);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  border: 1px solid var(--theme-border-hover, transparent);
}

.edu-suite-card .status,
.edu-suite-card .status.pronto,
.edu-suite-card .status.desenvolvimento,
.edu-suite-card .status.planejamento {
  background: var(--theme-badge-bg, var(--surface-soft)) !important;
  color: var(--theme-badge-color, var(--text-soft)) !important;
  border: 1px solid var(--theme-border-hover, var(--line)) !important;
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm, 4px);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.edu-suite-card .eyebrow {
  color: var(--theme-badge-color, var(--teal)) !important;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.edu-suite-card h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.edu-suite-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  flex-grow: 1;
  line-height: 1.55;
}

.edu-suite-card .card-link {
  margin-top: 1.35rem;
  padding: 0.58rem 0.85rem;
  border-radius: 4px;
  background: var(--theme-badge-bg, rgba(13, 148, 136, 0.08));
  border: 1px solid var(--theme-border-hover, rgba(13, 148, 136, 0.22));
  color: var(--theme-badge-color, var(--teal));
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.edu-suite-card .card-link svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.edu-suite-card:hover .card-link {
  background: var(--theme-icon-color, var(--teal));
  border-color: var(--theme-icon-color, var(--teal));
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.edu-suite-card:hover .card-link svg {
  transform: translateX(4px);
  color: #ffffff !important;
}

/* Hero do EduProject e Botões Rápidos */
.eduproject-hero h1 {
  max-width: 960px;
}

.eduproject-hero p {
  max-width: 960px;
  font-size: 1.12rem;
  line-height: 1.65;
}

.eduproject-hero .hero-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  max-width: 960px;
  margin-top: 1.8rem;
}

@media (min-width: 900px) {
  .eduproject-hero .hero-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Botões do Hero em Tons Pastéis Suaves */
.hero-pill-btn {
  background: var(--surface);
  border: 1px solid var(--theme-border-hover, var(--line));
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}

.hero-pill-btn:hover {
  background: var(--theme-bg-soft, var(--surface));
  border-color: var(--theme-icon-color, var(--teal));
  color: var(--theme-badge-color, var(--navy));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hero-pill-btn .hero-pill-icon {
  display: flex;
  align-items: center;
  color: var(--theme-icon-color, var(--teal));
}

/* Barra de Busca Inteligente e Filtros de Cursos */
.search-filter-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 2rem;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 1.2rem;
}

.search-input-wrap input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}

.search-input-wrap input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.level-filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.level-chip {
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.05rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  gap: 0.35rem;
  user-select: none;
}

.level-chip:hover {
  background: var(--surface);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.level-chip.active {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.28) !important;
  transform: translateY(-1px);
}

.theme-butter .level-chip:hover {
  border-color: #d97706;
  color: #d97706;
}

.theme-butter .level-chip.active {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.32) !important;
}

.theme-rose .level-chip.active {
  background: #e11d48 !important;
  color: #ffffff !important;
  border-color: #e11d48 !important;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.32) !important;
}

.theme-lavender .level-chip.active {
  background: #7c3aed !important;
  color: #ffffff !important;
  border-color: #7c3aed !important;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.32) !important;
}

.theme-sky .level-chip.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.32) !important;
}

.search-feedback {
  margin-bottom: 1.2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

.level-row-card.highlight-search {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25), var(--shadow-md);
  transform: translateY(-2px);
}

/* Níveis de Ensino Horizontais (Cards Empilhados) */
.level-rows-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.level-row-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.level-row-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}

.level-row-card.active-level {
  border-left: 5px solid var(--teal);
}

.level-row-card.future-level {
  background: var(--surface-soft);
  opacity: 0.82;
  border-left: 5px solid var(--line-strong);
}

.level-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.level-row-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.level-row-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-row-title {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0;
  font-weight: 700;
}

.level-row-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}

.level-row-action {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.level-row-action label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}

.level-course-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.level-course-select:focus {
  outline: 2px solid var(--teal);
  border-color: var(--teal);
}

.level-course-select:disabled {
  background: var(--surface-soft);
  color: var(--text-muted);
  cursor: not-allowed;
}

.start-plan-btn {
  width: 100%;
  padding: 0.72rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm, 4px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-plan-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.start-plan-btn svg {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-plan-btn:not(:disabled):hover svg {
  transform: translateX(4px);
}

.start-plan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--text-muted) !important;
  border-color: var(--text-muted) !important;
  box-shadow: none;
}

@media (max-width: 860px) {
  .level-row-card {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* ==========================================================================
   DESKTOP-CLASS WEB APP WORKSPACE (SOFTWARE DESKTOP UI)
   ========================================================================== */

.app-workspace-toolbar-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 54px;
  z-index: 950;
  backdrop-filter: blur(8px);
  display: block;
  margin: 0 !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.app-workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  gap: 1rem;
}

.app-toolbar-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-back-link {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  text-decoration: none;
  transition: all var(--transition);
}

.app-back-link:hover {
  background: var(--surface);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateX(-2px);
  box-shadow: var(--shadow-xs);
}

.app-tag-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}

.app-main-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
}

.app-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-toolbar-actions .view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
  height: 34px;
  box-sizing: border-box;
}

.app-toolbar-actions .btn-toggle-view {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 28px;
  transition: var(--transition);
  white-space: nowrap;
}

.app-toolbar-actions .btn-toggle-view.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.app-btn-action {
  padding: 0.38rem 0.85rem !important;
  font-size: 0.82rem !important;
  border-radius: 6px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  box-sizing: border-box !important;
}

.app-toolbar-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.app-badge-suite {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

a.app-badge-suite:hover {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-badge-level {
  background: rgba(18, 59, 114, 0.08);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.app-badge-course {
  background: rgba(212, 168, 83, 0.15);
  color: #926615;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.app-toolbar-switch-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 0.3rem;
  transition: var(--transition);
}

.app-toolbar-switch-btn:hover {
  color: var(--teal);
}

.app-toolbar-title {
  font-size: 1.35rem;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.app-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.app-btn-action {
  padding: 0.55rem 1rem !important;
  font-size: 0.86rem !important;
  border-radius: var(--radius-sm) !important;
}

/* Painel Lateral & Cards de Diretrizes (Atracamento Imediato Zero Delta com GPU Acceleration) */
.teaching-sidebar {
  position: sticky;
  top: 122px !important; /* 54px header + 54px toolbar + 14px padding */
  align-self: start;
  z-index: 20;
  margin-top: 0 !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.sidebar-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}

.status-dot-live {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.badge-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.sidebar-guidelines-box {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.sidebar-box-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin: 0 0 0.75rem;
}

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

.guideline-pill-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.guideline-pill-item:hover {
  border-color: var(--blue);
  transform: translateX(2px);
}

.guideline-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.guideline-info strong {
  display: block;
  font-size: 0.82rem;
  color: var(--navy);
  line-height: 1.2;
}

.guideline-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-soft);
  line-height: 1.2;
  margin-top: 2px;
}

.sidebar-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.sidebar-tip-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.sidebar-tip-content {
  flex: 1;
  min-width: 0;
}

.sidebar-tip-text {
  font-size: 0.84rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.5;
  text-align: left;
}

.sidebar-tip-text strong {
  color: #15803d;
  font-weight: 700;
}

[data-theme="dark"] .sidebar-tip-card {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}

[data-theme="dark"] .sidebar-tip-text {
  color: #f1f5f9;
}

[data-theme="dark"] .sidebar-tip-text strong {
  color: #38bdf8;
}

[data-theme="sepia"] .sidebar-tip-card {
  background: rgba(140, 62, 18, 0.08);
  border-color: rgba(140, 62, 18, 0.2);
}

[data-theme="sepia"] .sidebar-tip-text {
  color: #432818;
}

[data-theme="sepia"] .sidebar-tip-text strong {
  color: #8c3e12;
}

[data-theme="dark"] .guideline-pill-item {
  background: #0f1c34;
  border-color: #1e335a;
}

[data-theme="dark"] .guideline-info strong {
  color: #f1f5f9;
}

[data-theme="dark"] .app-main-title,
[data-theme="dark"] .sidebar-status-indicator {
  color: #f8fafc;
}

.eduproject-workspace,
section.section.eduproject-workspace {
  background: var(--surface-soft);
  padding: 0.85rem 0 3.5rem !important;
  margin: 0 !important;
}

.teaching-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

/* Folha de Trabalho Central (Canvas / Sheet) */
.document-canvas-sheet {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
  display: grid;
  gap: 2.2rem;
}

.app-card-section {
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
}

.app-card-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-badge-num {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.app-canvas-footer {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* Painel Lateral do Assistente (Inspector) */
.app-inspector-sidebar {
  position: sticky;
  top: 152px;
  display: grid;
  gap: 1.2rem;
}

.app-inspector-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.app-inspector-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.form-field.wide {
  grid-column: 1 / -1;
}

.form-field input,
.form-field select,
.form-field textarea,
.unit-editor input,
.unit-editor textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  transition: var(--transition);
}

.form-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.unit-editor input:focus,
.unit-editor textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.field-hint, .step-help {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Unidades */
.unit-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.unit-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  background: var(--surface-soft);
}

.unit-editor-heading {
  display: grid;
  grid-template-columns: 36px 1fr 32px;
  gap: 0.8rem;
  align-items: center;
}

.unit-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--blue);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-button:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.unit-editor-fields {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  margin-top: 0.9rem;
}

.unit-editor-fields label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.empty-state {
  padding: 2rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.95rem;
}

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

/* Painel Lateral de Coerência */
.coherence-box {
  display: grid;
  gap: 0.6rem;
}

.coherence-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.notice {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 0.6rem;
  line-height: 1.45;
}

.notice.danger,
.notice.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-weight: 600;
}

.notice.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.notice.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.notice.neutral {
  background: var(--surface-soft);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.teaching-tip {
  background: #f0fdfa;
  border-color: #ccfbf1;
}

.teaching-tip strong {
  color: var(--teal);
  font-size: 0.9rem;
}

.teaching-tip p {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.4rem;
}

/* ==========================================================================
   DOCUMENTO GERADO (PLANO DE ENSINO)
   ========================================================================== */

.generated-document-section {
  background: var(--surface-soft);
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--line);
}

.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.output-toolbar h2 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.output-toolbar-actions {
  display: flex;
  gap: 0.8rem;
}

.lesson-document {
  background: #ffffff;
  max-width: 860px;
  margin-inline: auto;
  padding: 3.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
}

.lesson-document header {
  border-bottom: 2px solid var(--blue);
  padding-bottom: 1.2rem;
  margin-bottom: 1.6rem;
}

.lesson-document h1 {
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.lesson-document h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.lesson-document p, .lesson-document li {
  color: #1e293b;
  font-size: 0.98rem;
  line-height: 1.65;
}

.lesson-units-list {
  padding-left: 1.4rem;
  margin: 0.8rem 0;
}

.lesson-unit-item {
  margin-bottom: 0.85rem;
  break-inside: avoid;
}

.lesson-unit-header {
  font-weight: 600;
  color: var(--navy);
}

.lesson-unit-hours {
  color: var(--teal);
  font-weight: 700;
}

.lesson-themes-list {
  list-style-type: disc;
  padding-left: 1.4rem;
  margin-top: 0.3rem;
}

.lesson-themes-list li {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin-bottom: 0.15rem;
}

/* ==========================================================================
   FOLHA DE DOCUMENTO FORMATADA (A4 CANVAS & PREVIEW NA TELA)
   ========================================================================== */

.doc-sheet {
  background: #ffffff;
  color: #1e293b;
  max-width: 860px;
  margin: 0 auto;
  padding: 3.2rem 3.6rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  font-family: var(--font-body);
}

.doc-sheet-header {
  border-bottom: 2px solid var(--navy, #123b72);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.doc-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem 1.2rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 0.6rem 0 1rem;
}

.doc-info-grid p {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
}

.doc-section {
  margin-bottom: 1.5rem;
}

.doc-section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #123b72;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
  margin: 1.4rem 0 0.8rem;
}

.doc-subsection {
  margin-bottom: 0.8rem;
}

.doc-subsection strong {
  font-size: 0.92rem;
}

/* ==========================================================================
   IMPRESSÃO ACADÊMICA A4 (PDF LIMPO COM MARGENS OFICIAIS)
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 18mm 16mm 18mm 16mm;
}

@media print {
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  }

  .site-header,
  .site-sub-bar,
  .site-footer,
  .no-print,
  .app-workspace-toolbar-wrap,
  .output-toolbar,
  .page-hero,
  .teaching-hero,
  .eduproject-workspace,
  .doc-canvas-actions-bar,
  .skip-link {
    display: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10pt !important;
    line-height: 1.45 !important;
  }

  #conteudo,
  .generated-document-section,
  .generated-document-section .container,
  .doc-canvas-container,
  .doc-sheet,
  .lesson-document {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: none !important;
  }

  .doc-sheet-header,
  .lesson-document header {
    border-bottom: 2pt solid #123b72 !important;
    padding-bottom: 8pt !important;
    margin-bottom: 12pt !important;
  }

  .doc-sheet-header h1,
  .lesson-document h1 {
    font-size: 16pt !important;
    color: #123b72 !important;
    margin: 2pt 0 4pt !important;
    line-height: 1.2 !important;
  }

  .doc-meta-lead {
    font-size: 9pt !important;
    color: #64748b !important;
    margin-bottom: 8pt !important;
  }

  .doc-section,
  .doc-subsection,
  .doc-info-grid,
  .lesson-unit-item {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .doc-info-grid {
    background: #f8fafc !important;
    border: 1pt solid #cbd5e1 !important;
    padding: 6pt 8pt !important;
    margin: 6pt 0 10pt !important;
  }

  .doc-section h2,
  .lesson-document h2 {
    font-size: 11pt !important;
    color: #123b72 !important;
    border-bottom: 1pt solid #cbd5e1 !important;
    padding-bottom: 3pt !important;
    margin-top: 10pt !important;
    margin-bottom: 5pt !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  .doc-list-item {
    margin: 2pt 0 !important;
    font-size: 9.5pt !important;
  }

  .doc-sheet-footer {
    margin-top: 14pt !important;
    padding-top: 6pt !important;
    border-top: 0.5pt solid #cbd5e1 !important;
    font-size: 8pt !important;
    color: #64748b !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

@media (max-width: 860px) {
  .teaching-layout {
    grid-template-columns: 1fr;
  }

  .teaching-sidebar {
    position: static;
  }

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

  .lesson-document {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   ALTO CONTRASTE E AJUSTES FINOS PARA DARK MODE NA SUÍTE EDUPROJECT
   ========================================================================== */

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field select,
[data-theme="dark"] .form-field textarea,
[data-theme="dark"] .unit-editor input,
[data-theme="dark"] .unit-editor textarea,
[data-theme="dark"] .level-course-select,
[data-theme="dark"] .search-input-wrap input {
  background: #0b1528 !important;
  color: #f8fafc !important;
  border-color: #273e6b !important;
}

[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field select:focus,
[data-theme="dark"] .form-field textarea:focus,
[data-theme="dark"] .unit-editor input:focus,
[data-theme="dark"] .unit-editor textarea:focus,
[data-theme="dark"] .level-course-select:focus,
[data-theme="dark"] .search-input-wrap input:focus {
  border-color: #38bdf8 !important;
  outline-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
}

[data-theme="dark"] .notice.danger,
[data-theme="dark"] .notice.error {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border-color: #991b1b !important;
}

[data-theme="dark"] .notice.warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fcd34d !important;
  border-color: #92400e !important;
}

[data-theme="dark"] .notice.success {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
  border-color: #166534 !important;
}

[data-theme="dark"] .teaching-tip {
  background: rgba(13, 148, 136, 0.15) !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
}

[data-theme="dark"] .teaching-tip p {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .unit-editor {
  background: #0b1528 !important;
  border-color: #1e293b !important;
}

[data-theme="dark"] .icon-button {
  background: #111d38 !important;
  border-color: #1e3a6d !important;
  color: #94a3b8 !important;
}

/* ==========================================================================
   CARDS DE FERRAMENTAS & GUIA DIDÁTICO (SUGESTÕES PEDAGÓGICAS)
   ========================================================================== */

.suite-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
}

@media (max-width: 1080px) {
  .suite-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .suite-tools-grid {
    grid-template-columns: 1fr;
  }
}

.suite-tool-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  background: var(--surface) !important;
  border: 2px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  padding: 1.35rem 1.2rem !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  font-family: var(--font-body) !important;
  white-space: normal !important;
  overflow: visible !important;
  box-shadow: var(--shadow-xs);
}

.suite-tool-card:hover {
  border-color: #d97706 !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.suite-tool-card.active {
  border-color: #d97706 !important;
  background: var(--surface) !important;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.18) !important;
  position: relative;
}

.suite-tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.suite-tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.suite-tool-card.active .suite-tool-card-icon {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.3);
}

.suite-tool-card-title {
  font-family: var(--font-heading) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  margin: 0 0 0.35rem 0 !important;
  line-height: 1.3 !important;
  display: block !important;
}

.suite-tool-card-desc {
  font-size: 0.84rem !important;
  color: var(--text-soft) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  word-break: normal !important;
  display: block !important;
}

/* Guia Didático da Engenharia Pedagógica */
.pedagogical-engine-guide {
  background: rgba(217, 119, 6, 0.05);
  border: 1.5px solid rgba(217, 119, 6, 0.25);
  border-left: 5px solid #d97706;
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.8rem;
}

.guide-badge-pill {
  background: #d97706;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.guide-step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.guide-step-card:hover {
  border-color: #d97706;
  box-shadow: var(--shadow-sm);
}

.guide-step-card-num {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.guide-step-card h4 {
  font-size: 0.95rem;
  color: var(--navy);
  margin: 0 0 0.4rem 0;
  font-weight: 700;
}

.guide-step-card p {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.guide-step-card ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.guide-step-card li {
  margin-bottom: 0.35rem;
}

.guide-step-card li strong {
  color: var(--navy);
}

/* ==========================================================================
   ÍNDICE RÁPIDO DE ESTRATÉGIAS & FOCO PEDAGÓGICO
   ========================================================================== */

.strategy-index-box {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}

.strategy-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.strategy-index-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  background: var(--surface-soft) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  padding: 1.1rem 1.2rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  font-family: var(--font-body) !important;
}

.strategy-index-btn:hover {
  background: #ffffff !important;
  border-color: #d97706 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.14) !important;
}

.strategy-index-btn.active-target {
  background: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 0 0 2.5px rgba(217, 119, 6, 0.3) !important;
}

.strategy-category-tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.25 !important;
  font-family: var(--font-heading) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: var(--radius-pill) !important;
  background: rgba(217, 119, 6, 0.1) !important;
  color: #b45309 !important;
  border: 1px solid rgba(217, 119, 6, 0.22) !important;
  margin-bottom: 0.55rem !important;
}

.strategy-index-title {
  font-family: var(--font-heading) !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  line-height: 1.35 !important;
  margin: 0 0 0.45rem 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.45rem !important;
}

.strategy-index-title .strategy-icon {
  font-size: 1.2rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.strategy-index-foco {
  font-size: 0.84rem !important;
  color: var(--text-soft) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.strategy-index-foco strong {
  color: #b45309;
  font-weight: 700;
}

/* Efeito de destaque ao rolar até a metodologia */
.method-card.target-highlight {
  border-left-color: #d97706 !important;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.3), var(--shadow-md) !important;
  transition: all 0.3s ease;
  animation: pulseCard 2s ease 1;
}

@keyframes pulseCard {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   MATRIZ DE RUBRICAS FORMATIVAS (CARDS EXPANDIDOS DE ALTO CONFORTO)
   ========================================================================== */

.rubricas-container-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.rubrica-criterio-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.rubrica-criterio-card:hover {
  border-color: #d97706;
  box-shadow: var(--shadow-sm);
}

.rubrica-criterio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--line);
  flex-wrap: wrap;
}

.rubrica-criterio-input-wrap {
  flex: 1;
  min-width: 260px;
}

.rubrica-criterio-input {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  transition: var(--transition);
}

.rubrica-criterio-input:focus {
  outline: 2px solid #d97706;
  border-color: #d97706;
  background: #ffffff;
}

.rubrica-niveis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1080px) {
  .rubrica-niveis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rubrica-niveis-grid {
    grid-template-columns: 1fr;
  }
}

.rubrica-nivel-box {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--line);
}

.rubrica-nivel-box.nivel-4 {
  background: #f0fdf4;
  border-color: #86efac;
}

.rubrica-nivel-box.nivel-3 {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.rubrica-nivel-box.nivel-2 {
  background: #fffbeb;
  border-color: #fde68a;
}

.rubrica-nivel-box.nivel-1 {
  background: #fef2f2;
  border-color: #fca5a5;
}

.rubrica-nivel-header {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nivel-4 .rubrica-nivel-header { color: #166534; }
.nivel-3 .rubrica-nivel-header { color: #0369a1; }
.nivel-2 .rubrica-nivel-header { color: #854d0e; }
.nivel-1 .rubrica-nivel-header { color: #991b1b; }

.rubrica-textarea {
  width: 100%;
  min-height: 110px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  resize: vertical;
  transition: var(--transition);
  box-sizing: border-box;
}

.rubrica-textarea:focus {
  outline: 2px solid #d97706;
  border-color: #d97706;
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   INTEGRAÇÃO PHM IA — ASSISTENTE DE PLANO DE AULA & MODAIS
   ========================================================================== */

.btn-ia-inline-suggest {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--theme-badge-bg, #e0f2fe);
  border: 1px solid var(--theme-border-hover, #7dd3fc);
  color: var(--theme-badge-color, #0369a1);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-ia-inline-suggest:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Modal Backdrop & Card */
.ia-planner-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 20, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: iaModalFadeIn 0.2s ease;
}

.ia-planner-modal-backdrop[hidden] {
  display: none !important;
}

@keyframes iaModalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.ia-planner-modal-card {
  background: #090e1a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  max-width: 650px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  color: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ia-planner-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.ia-planner-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ia-planner-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #38bdf8;
  flex-shrink: 0;
}

.ia-planner-title-group h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.ia-planner-title-group p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.ia-planner-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.ia-planner-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ia-planner-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.ia-modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ia-modal-form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
}

.ia-modal-control {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: var(--font-body);
  box-sizing: border-box;
  width: 100%;
}

.ia-modal-control:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.ia-modal-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .ia-modal-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.ia-planner-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
}

.ia-planner-status[hidden],
.ia-planner-modal[hidden],
[hidden] {
  display: none !important;
}

.ia-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: iaSpin 0.7s linear infinite;
}

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

.ia-planner-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Efeito Glow nos Campos Preenchidos pela IA */
.field-ai-highlighted {
  animation: aiFieldFlash 2.5s ease-out;
}

@keyframes aiFieldFlash {
  0% {
    background-color: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  }
  100% {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: none;
  }
}

/* =========================================================================
   CENTRAL DE CRIAÇÃO UNIFICADA (HERO CREATOR DO PLANO DE AULA - AZUL PHM IA)
   ========================================================================= */
.plan-creation-hub {
  background: var(--surface);
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  border-radius: var(--radius-lg, 14px);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.07);
  color: var(--text);
  transition: all var(--transition);
}

.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.hub-header-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hub-icon-sparkle {
  font-size: 1.5rem;
  background: rgba(2, 132, 199, 0.12);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

.hub-header-title h3 {
  color: var(--navy);
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
  font-weight: 800;
}

.hub-header-title p {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 0;
}

.hub-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--surface-soft);
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.hub-tab-btn {
  background: transparent;
  color: var(--text-soft);
  border: none;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}

.hub-tab-btn:hover {
  color: var(--navy);
  background: rgba(0, 0, 0, 0.04);
}

.hub-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.hub-tab-panel {
  display: none;
}

.hub-tab-panel.active {
  display: block;
  animation: hubFadeIn 0.3s ease;
}

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

.hub-form-grid, .hub-catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.hub-field-full {
  grid-column: span 2;
}

.hub-field-half {
  grid-column: span 1;
}

.hub-form-grid label, .hub-catalog-grid label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.hub-form-grid input,
.hub-form-grid select,
.hub-catalog-grid select {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all var(--transition);
}

.hub-form-grid input:focus,
.hub-form-grid select:focus,
.hub-catalog-grid select:focus {
  border-color: #0284c7;
  outline: 2px solid #0284c7;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.hub-input-lg {
  padding: 0.85rem 1.1rem !important;
  font-size: 1rem !important;
  font-weight: 500;
}

.hub-form-footer, .hub-catalog-actions {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hub-status-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #0284c7;
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: auto;
}

.ia-spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(2, 132, 199, 0.25);
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: iaSpin 0.7s linear infinite;
}

.hub-btn-submit {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 0.75rem 1.6rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}

.hub-manual-box {
  background: var(--surface-soft);
  padding: 1.35rem 1.6rem;
  border-radius: 8px;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hub-manual-box p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0;
  max-width: 620px;
  line-height: 1.55;
}

/* Modo Escuro */
[data-theme="dark"] .plan-creation-hub {
  background: linear-gradient(135deg, #0b1e36 0%, #0f2744 100%);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hub-header-title h3 {
  color: #ffffff;
}

[data-theme="dark"] .hub-header-title p {
  color: #94a3b8;
}

[data-theme="dark"] .hub-tabs {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hub-tab-btn {
  color: #94a3b8;
}

[data-theme="dark"] .hub-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .hub-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

[data-theme="dark"] .hub-form-grid label,
[data-theme="dark"] .hub-catalog-grid label {
  color: #cbd5e1;
}

[data-theme="dark"] .hub-form-grid input,
[data-theme="dark"] .hub-form-grid select,
[data-theme="dark"] .hub-catalog-grid select {
  background: #061528;
  border-color: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

[data-theme="dark"] .hub-form-grid input:focus,
[data-theme="dark"] .hub-form-grid select:focus,
[data-theme="dark"] .hub-catalog-grid select:focus {
  border-color: #38bdf8;
  outline-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

[data-theme="dark"] .hub-btn-submit {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

/* Modo Sépia */
[data-theme="sepia"] .plan-creation-hub {
  background: #f4eee0;
  border-color: rgba(154, 52, 18, 0.25);
}

[data-theme="sepia"] .hub-header-title h3 {
  color: #432818;
}

[data-theme="sepia"] .hub-header-title p {
  color: #705446;
}

[data-theme="sepia"] .hub-tabs {
  background: #ebe3d3;
  border-color: rgba(112, 66, 20, 0.15);
}

[data-theme="sepia"] .hub-tab-btn.active {
  background: #8c3e12;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(140, 62, 18, 0.3);
}

[data-theme="sepia"] .hub-form-grid input,
[data-theme="sepia"] .hub-form-grid select,
[data-theme="sepia"] .hub-catalog-grid select {
  background: #fbf7ee;
  border-color: #d1c4b2;
  color: #432818;
}

[data-theme="sepia"] .hub-btn-submit {
  background: #8c3e12 !important;
  border-color: #704214 !important;
  color: #ffffff !important;
}

/* =========================================================================
   ALTERNADOR DE VISÃO (EDITOR vs FOLHA A4)
   ========================================================================= */
.view-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.btn-toggle-view {
  background: transparent;
  border: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-toggle-view.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.editor-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.document-preview-container {
  animation: hubFadeIn 0.3s ease;
}

.section-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .hub-form-grid, .hub-catalog-grid {
    grid-template-columns: 1fr;
  }
  .hub-field-half {
    grid-column: span 2;
  }
  .hub-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .hub-tabs {
    width: 100%;
    justify-content: stretch;
  }
  .hub-tab-btn {
    flex: 1;
    text-align: center;
  }
}







/* ==========================================================================
   ESTILOS PREMIUM DA PÁGINA PRINCIPAL DO EDUPROJECT (EDUPROJECT.PHP)
   ========================================================================== */

.edu-hero-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 3.5rem 0;
  text-align: center;
  position: relative;
}

.edu-suite-section {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0;
}

.edu-roadmap-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0;
}

.edu-guide-section {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0;
}

.edu-compliance-section {
  background: var(--bg);
  padding: 4rem 0;
}

.edu-section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
}

.edu-section-header .section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.edu-section-header .section-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.edu-suite-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.edu-suite-card-top .project-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  margin-left: auto;
}

/* ==========================================================================
   HERO EDITORIAL V4 (PADRÃO PHM TECH)
   ========================================================================== */
.home-hero-v4,
.edu-hero-v4 {
  position: relative;
  overflow: hidden;
  padding: clamp(2.4rem, 4.5vw, 4rem) 0 clamp(2rem, 3.5vw, 3.25rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 28rem),
    var(--bg);
}

.home-hero-v4::before,
.edu-hero-v4::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, #000 70%, transparent);
}

.home-hero-v4__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.home-hero-v4__copy { max-width: 760px; }

.home-hero-v4__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: 1.15rem;
  color: var(--teal);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.home-hero-v4__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.home-hero-v4__meta span + span { padding-left: 1rem; border-left: 1px solid var(--line-strong); color: var(--text-muted); }

.home-hero-v4 h1 {
  max-width: 16ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(2.35rem, 4.5vw, 3.95rem);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.055em;
}

.home-hero-v4 h1 em {
  display: block;
  color: var(--teal);
  font-style: normal;
}

.home-hero-v4__copy > p {
  max-width: 62ch;
  margin: 1.35rem 0 1.5rem;
  color: var(--text-soft);
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.68;
}

.home-hero-v4__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.home-hero-v4__actions .button,
.home-hero-v4__primary-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 1.35rem !important;
  min-height: 44px !important;
  border-radius: 4px !important;
  font-family: var(--font-body) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
  background: var(--navy, #0b1e3d) !important;
  color: #ffffff !important;
  border: 1px solid var(--navy, #0b1e3d) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

.home-hero-v4__actions .button:hover,
.home-hero-v4__primary-btn:hover {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
}

.home-hero-v4__primary-btn svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.2s ease;
}

.home-hero-v4__primary-btn:hover svg {
  transform: translateY(3px);
}

.home-hero-v4__text-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  padding: 0.65rem 1.15rem !important;
  min-height: 44px !important;
  border-radius: 4px !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  background: var(--surface, #ffffff) !important;
  color: var(--navy, #0b1e3d) !important;
  font-family: var(--font-body) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.home-hero-v4__text-link:hover {
  background: var(--surface-soft, #f1f5f9) !important;
  border-color: var(--navy, #0b1e3d) !important;
  color: var(--navy, #0b1e3d) !important;
}

.home-hero-v4__text-link svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488);
  transition: transform 0.2s ease;
}

.home-hero-v4__text-link:hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   CARD DE DESTAQUE / SUPORTE EDITORIAL
   ========================================================================== */
.home-hero-v4__support-card {
  position: relative;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line-strong, #cbd5e1);
  border-radius: 6px;
  padding: clamp(1.35rem, 2vw, 1.65rem);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-hero-v4__support-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.support-card__eyebrow {
  display: flex;
  align-items: center;
}

.support-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line-strong, #cbd5e1);
  border-radius: 4px;
  color: var(--teal, #0f766e);
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.support-card__title {
  margin: 0;
  color: var(--navy, #0f172a);
  font-family: var(--font-heading);
  font-size: clamp(1.18rem, 1.6vw, 1.38rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.support-card__text {
  margin: 0;
  color: var(--text-soft, #475569);
  font-size: 0.9rem;
  line-height: 1.62;
}

.support-card__text strong {
  color: var(--navy, #0f172a);
  font-weight: 700;
}

.support-card__pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.support-card__pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
}

.support-card__pill--free .pill-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.support-card__pill--support .pill-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  flex-shrink: 0;
}

.pill-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.pill-info strong {
  color: var(--navy, #0f172a);
  font-size: 0.76rem;
  font-weight: 700;
}

.pill-info small {
  color: var(--text-muted, #64748b);
  font-size: 0.69rem;
  font-weight: 600;
}

.support-card__action {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 0.35rem !important;
  padding: 0.62rem 0.95rem !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: var(--navy, #0b1e3d) !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  border-radius: 4px !important;
  font-family: var(--font-body);
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.support-card__action:hover {
  background: var(--navy, #0b1e3d) !important;
  color: #ffffff !important;
  border-color: var(--navy, #0b1e3d) !important;
  box-shadow: 0 4px 14px rgba(11, 30, 61, 0.2) !important;
}

.support-card__action svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}

.support-card__action:hover svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

/* ==========================================================================
   SEÇÕES, CABEÇALHOS ASSIMÉTRICOS E FILTROS EM PÍLULAS
   ========================================================================== */
.home-projects-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0 5rem;
  background: var(--surface-soft);
}

.home-section-heading {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.home-section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -.045em;
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.1;
  font-weight: 800;
}

.home-section-lead {
  max-width: 720px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.home-search-wrapper {
  max-width: none;
  margin: 0 0 1.75rem;
}

.project-filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-pill-btn:hover {
  border-color: var(--teal);
  color: var(--navy);
  background: var(--surface-soft);
}

.filter-pill-btn.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.filter-tab-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.filter-pill-btn.active .filter-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ==========================================================================
   GRADE E CARDS CANÔNICOS (PADRÃO PHM TECH)
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
  transition: background 0.2s ease;
}

.project-card.theme-peach::before { background: #f97316; }
.project-card.theme-sky::before { background: #0284c7; }
.project-card.theme-mint::before { background: #10b981; }
.project-card.theme-lavender::before { background: #8b5cf6; }
.project-card.theme-rose::before { background: #f43f5e; }
.project-card.theme-butter::before { background: #eab308; }

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card-header,
.project-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--editorial-rule, rgba(15, 23, 42, 0.06));
}

.project-card-kicker {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project-card-num {
  color: var(--teal);
  font-weight: 750;
}

.project-card-slash {
  color: var(--editorial-rule-strong, #cbd5e1);
  margin: 0 0.3rem;
  user-select: none;
}

.project-card-cat {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.5rem;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.project-card h3,
.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--navy);
  margin: 0.25rem 0 0.45rem 0;
  line-height: 1.3;
  letter-spacing: -0.015em;
  transition: color 0.18s ease;
}

.project-card:hover h3,
.project-card:hover .project-card-title {
  color: var(--teal);
}

.project-card p,
.project-card-desc {
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--text-soft);
  margin: 0 0 1.25rem 0;
}

.project-card .card-link,
.card-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.58rem 0.85rem !important;
  margin-top: auto !important;
  border-radius: 4px !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: var(--navy, #0b1e3d) !important;
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
}

.project-card .card-link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}

.project-card .card-link-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.2;
  display: inline-block;
  vertical-align: middle;
}

.project-card .card-link svg,
.card-link svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}

.project-card-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--surface, #ffffff);
  color: var(--text-muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.project-card:hover .card-link,
.card-link:hover {
  background: var(--navy, #0b1e3d) !important;
  border-color: var(--navy, #0b1e3d) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(11, 30, 61, 0.2) !important;
}

.project-card:hover .card-link svg,
.card-link:hover svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

.project-card:hover .project-card-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: transparent;
}

/* ==========================================================================
   SEÇÃO DE INTRODUÇÃO & ROADMAP DIDÁTICO (PADRÃO PHM TECH)
   ========================================================================== */
.home-intro-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0 4rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.25fr);
  gap: 3rem;
  align-items: start;
}

.home-intro-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.home-intro-kicker-sep {
  color: var(--line-strong);
}

.home-intro-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--navy);
  margin: 0;
}

.home-intro-title em {
  color: var(--teal);
  font-style: normal;
}

.home-intro-text {
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--text-soft);
  margin: 0 0 1.5rem;
}

.home-intro-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.home-intro-cta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: 4px !important;
  background: var(--navy) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  text-decoration: none !important;
  border: 1px solid var(--navy) !important;
  transition: all 0.2s ease !important;
}

.home-intro-cta:hover {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
}

.home-intro-cta svg {
  transition: transform 0.2s ease;
}

.home-intro-cta:hover svg {
  transform: translateX(3px);
}

.home-intro-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Roadmap Grid com suporte expresso a 320 px */
.edu-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.edu-roadmap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.edu-roadmap-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.edu-roadmap-step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal);
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.2);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.edu-roadmap-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.45rem 0;
}

.edu-roadmap-desc {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0;
}

/* ==========================================================================
   GUIA ORIENTADOR (TABELA) & CONFORMIDADE
   ========================================================================== */
.edu-guide-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0 4rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.edu-guide-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.25rem;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  margin-top: 1.5rem;
}

.edu-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.edu-guide-table th,
.edu-guide-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.edu-guide-table th {
  background: var(--surface-soft);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}

.edu-guide-table tr:hover td {
  background: var(--surface-soft);
}

.edu-guide-table .module-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.edu-table-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 4px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--navy) !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
}

.edu-table-action-btn:hover {
  background: var(--navy) !important;
  color: #ffffff !important;
  border-color: var(--navy) !important;
}

.edu-compliance-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0 4.5rem;
  background: var(--bg);
}

.edu-compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.edu-compliance-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.edu-compliance-item:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}

.edu-compliance-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-compliance-text h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.2rem 0;
}

.edu-compliance-text p {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   RESPONSIVIDADE (PADRÃO PHM TECH)
   ========================================================================== */
@media (max-width: 980px) {
  .home-hero-v4__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-intro-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .home-hero-v4,
  .edu-hero-v4 { padding-top: 2rem; padding-bottom: 2rem; background: var(--bg); }
  .home-hero-v4__layout { gap: 1.75rem; }
  .home-hero-v4 h1 { font-size: clamp(2.1rem, 9.5vw, 3rem); }
  .home-hero-v4__meta span + span { padding-left: 0; border-left: 0; }
  .home-hero-v4__actions { align-items: stretch; flex-direction: column; }
  .home-hero-v4__actions .button { justify-content: center; }
  .home-hero-v4__text-link { justify-content: center; }
  .home-section-heading { grid-template-columns: 1fr; gap: .75rem; }
  .project-filters-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
  .filter-pill-btn { flex: 0 0 auto; }
  .project-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MODO ESCURO (DARK MODE — PADRÃO PHM TECH)
   ========================================================================== */
[data-theme="dark"] .home-hero-v4,
[data-theme="dark"] .edu-hero-v4 {
  background:
    radial-gradient(circle at 78% 22%, rgba(45, 212, 191, 0.08), transparent 28rem),
    var(--bg);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .home-hero-v4 h1 {
  color: #f8fafc;
}

[data-theme="dark"] .home-hero-v4 h1 em {
  color: #2dd4bf;
}

[data-theme="dark"] .home-hero-v4__actions .button,
[data-theme="dark"] .home-hero-v4__primary-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .home-hero-v4__actions .button:hover,
[data-theme="dark"] .home-hero-v4__primary-btn:hover {
  background: #0369a1 !important;
  border-color: #7dd3fc !important;
}

[data-theme="dark"] .home-hero-v4__text-link {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

[data-theme="dark"] .home-hero-v4__text-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .home-hero-v4__text-link svg {
  color: #38bdf8;
}

[data-theme="dark"] .home-hero-v4__support-card {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .home-hero-v4__support-card:hover {
  border-color: #2dd4bf;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .support-card__badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #2dd4bf;
}

[data-theme="dark"] .support-card__title {
  color: #f8fafc;
}

[data-theme="dark"] .support-card__text {
  color: #cbd5e1;
}

[data-theme="dark"] .support-card__text strong {
  color: #f8fafc;
}

[data-theme="dark"] .support-card__pill {
  background: #152037;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .support-card__pill .pill-info strong {
  color: #f1f5f9;
}

[data-theme="dark"] .support-card__pill .pill-info small {
  color: #94a3b8;
}

[data-theme="dark"] .support-card__action {
  background: #0f1a30 !important;
  color: #f1f5f9 !important;
  border: 1px solid #334e7a !important;
  box-shadow: none !important;
}

[data-theme="dark"] .support-card__action:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .support-card__action svg {
  color: #38bdf8 !important;
}

[data-theme="dark"] .home-section-title {
  color: #f8fafc;
}

[data-theme="dark"] .home-section-lead {
  color: #cbd5e1;
}

[data-theme="dark"] .filter-pill-btn {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

[data-theme="dark"] .filter-pill-btn:hover {
  border-color: #2dd4bf;
  color: #ffffff;
  background: #152037;
}

[data-theme="dark"] .filter-pill-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

[data-theme="dark"] .project-card {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .project-card:hover {
  border-color: #2dd4bf;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .project-card-header,
[data-theme="dark"] .project-card .card-top {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .project-card h3,
[data-theme="dark"] .project-card-title {
  color: #f8fafc;
}

[data-theme="dark"] .project-card:hover h3,
[data-theme="dark"] .project-card:hover .project-card-title {
  color: #2dd4bf;
}

[data-theme="dark"] .project-card p,
[data-theme="dark"] .project-card-desc {
  color: #94a3b8;
}

[data-theme="dark"] .project-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

[data-theme="dark"] .project-card .card-link,
[data-theme="dark"] .card-link {
  background: #111c34 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .project-card .card-link svg,
[data-theme="dark"] .card-link svg {
  color: #2dd4bf !important;
}

[data-theme="dark"] .project-card-tag {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

[data-theme="dark"] .project-card:hover .card-link,
[data-theme="dark"] .card-link:hover {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .project-card:hover .card-link svg,
[data-theme="dark"] .card-link:hover svg {
  color: #ffffff !important;
}

[data-theme="dark"] .project-card:hover .project-card-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: transparent;
}

[data-theme="dark"] .home-intro-section {
  background: #090e1a;
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .home-intro-title {
  color: #f8fafc;
}

[data-theme="dark"] .home-intro-title em {
  color: #2dd4bf;
}

[data-theme="dark"] .home-intro-text {
  color: #94a3b8;
}

[data-theme="dark"] .home-intro-cta {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
}

[data-theme="dark"] .home-intro-cta:hover {
  background: #0369a1 !important;
  border-color: #7dd3fc !important;
}

[data-theme="dark"] .edu-roadmap-card {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edu-roadmap-title {
  color: #f8fafc;
}

[data-theme="dark"] .edu-roadmap-desc {
  color: #94a3b8;
}

[data-theme="dark"] .edu-guide-section {
  background: #0b1120;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .edu-guide-table-wrap {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edu-guide-table th {
  background: #111c34;
  color: #f8fafc;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edu-guide-table td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

[data-theme="dark"] .edu-guide-table tr:hover td {
  background: #152037;
}

[data-theme="dark"] .edu-table-action-btn {
  background: #111c34 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .edu-table-action-btn:hover {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
}

[data-theme="dark"] .edu-compliance-section {
  background: #090e1a;
}

[data-theme="dark"] .edu-compliance-item {
  background: #0d1527;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edu-compliance-text h4 {
  color: #f8fafc;
}

[data-theme="dark"] .edu-compliance-text p {
  color: #94a3b8;
}

/* ==========================================================================
   MODO SÉPIA (SEPIA MODE)
   ========================================================================== */
[data-theme="sepia"] .home-hero-v4,
[data-theme="sepia"] .edu-hero-v4 {
  background: #f4ede2;
  border-bottom-color: #e2d7c5;
}

[data-theme="sepia"] .home-hero-v4__actions .button,
[data-theme="sepia"] .home-hero-v4__primary-btn {
  background: #78401a !important;
  color: #ffffff !important;
  border: 1px solid #78401a !important;
}

[data-theme="sepia"] .home-hero-v4__actions .button:hover,
[data-theme="sepia"] .home-hero-v4__primary-btn:hover {
  background: #5c3014 !important;
}

[data-theme="sepia"] .home-hero-v4__text-link {
  background: #eae1cf !important;
  color: #3d2c1d !important;
  border-color: #d5c7b0 !important;
}

[data-theme="sepia"] .home-hero-v4__support-card {
  background: #fbf7f0;
  border-color: #dfd2be;
}

[data-theme="sepia"] .project-card {
  background: #fbf7f0;
  border-color: #dfd2be;
}

[data-theme="sepia"] .filter-pill-btn {
  background: #fbf7f0;
  border-color: #dfd2be;
  color: #5c442d;
}

[data-theme="sepia"] .filter-pill-btn.active {
  background: #78401a;
  border-color: #78401a;
  color: #ffffff;
}

/* ==========================================================================
   GRID DE ATALHOS RÁPIDOS 3x2 (2 LINHAS DE 3 NO DESKTOP)
   ========================================================================== */

.edu-hero-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: 880px;
  margin: 0.75rem auto 0 auto;
}

@media (max-width: 860px) {
  .edu-hero-pills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .edu-hero-pills-grid {
    grid-template-columns: 1fr;
  }
}

.edu-hero-pills-grid .hero-pill-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--theme-border-hover, var(--line));
  color: var(--navy);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.edu-hero-pills-grid .hero-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--theme-icon-color, var(--teal));
}

[data-theme="dark"] .edu-hero-pills-grid .hero-pill-btn {
  background: #14213d !important;
  border-color: #233760 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .edu-hero-pills-grid .hero-pill-btn:hover {
  background: #182849 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="sepia"] .edu-hero-pills-grid .hero-pill-btn {
  background: #fbf7ee !important;
  border-color: #dfd4bf !important;
  color: #2e2116 !important;
}

/* ==========================================================================
   PHM CUSTOM SELECTS (100% NATIVOS & SVG)
   ========================================================================== */
.phm-custom-select {
    position: relative;
    width: 100%;
}
.phm-select-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--surface, #ffffff);
    border: 1.5px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--navy, #123b72);
    transition: all 0.15s ease;
    text-align: left;
}
.phm-select-trigger:hover,
.phm-custom-select.open .phm-select-trigger {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.phm-select-val {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.phm-val-icon {
    display: inline-flex;
    align-items: center;
    color: #7c3aed;
    flex-shrink: 0;
}
.phm-select-chevron {
    display: inline-flex;
    color: var(--text-soft, #64748b);
    transition: transform 0.2s ease;
}
.phm-custom-select.open .phm-select-chevron {
    transform: rotate(180deg);
}
.phm-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface, #ffffff);
    border: 1.5px solid var(--line, #e2e8f0);
    border-radius: var(--radius-sm, 6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.35rem;
}
.phm-custom-select.open .phm-select-dropdown {
    display: block;
}
.phm-select-opt {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-xs, 4px);
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text, #1e293b);
    transition: background 0.12s ease;
}
.phm-select-opt:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
}
.phm-select-opt.active {
    background: rgba(124, 58, 237, 0.15);
    color: #6d28d9;
    font-weight: 700;
}
.phm-opt-svg {
    display: inline-flex;
    align-items: center;
    color: #7c3aed;
    flex-shrink: 0;
}

/* ==========================================================================
   MODAL DE ORIENTAÇÕES DOCENTES (MICROSOFT FLUENT DESIGN)
   ========================================================================== */
.modal-guidelines-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-guidelines-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-guidelines-dialog {
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-guidelines-backdrop.active .modal-guidelines-dialog {
    transform: scale(1) translateY(0);
}

.modal-guidelines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: var(--surface-soft, #f8fafc);
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.modal-guidelines-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modal-guidelines-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm, 8px);
    background: #e0f2fe;
    color: #0284c7;
}

.modal-guidelines-title-wrap h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy, #123b72);
}

.modal-guidelines-title-wrap p {
    margin: 0.15rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.modal-guidelines-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-xs, 6px);
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-guidelines-close:hover {
    background: var(--line, #e2e8f0);
    color: var(--text, #1e293b);
}

.modal-guidelines-body {
    padding: 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guide-step-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    display: flex;
    gap: 1.1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-step-card:hover {
    border-color: var(--teal, #0284c7);
    box-shadow: var(--shadow-xs, 0 4px 6px -1px rgba(0,0,0,0.05));
}

.guide-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-icon-bg, #e0f2fe);
    color: var(--theme-icon-color, #0284c7);
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.guide-step-content h4 {
    margin: 0 0 0.35rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy, #123b72);
}

.guide-step-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text, #334155);
}

.guide-step-content ul {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
    font-size: 0.88rem;
    color: var(--text-soft, #475569);
    line-height: 1.5;
}

.guide-step-content ul li {
    margin-bottom: 0.35rem;
}

.modal-guidelines-footer {
    padding: 1rem 1.75rem;
    background: var(--surface-soft, #f8fafc);
    border-top: 1px solid var(--line, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==========================================================================
   SEQUÊNCIA DIDÁTICA BIMESTRAL (CRONOGRAMA DE AULAS)
   ========================================================================== */
.sequence-config-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .sequence-config-grid {
        grid-template-columns: 1fr;
    }
}

.sequence-results-wrap {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--line, #e2e8f0);
}

.sequence-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    background: var(--surface-soft, #f8fafc);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--line, #e2e8f0);
}

.sequence-meta-pills {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sequence-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.82rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.sequence-pill.hours {
    background: #ecfccb;
    color: #3f6212;
}

.sequence-pill.method {
    background: #ffedd5;
    color: #c2410c;
}

.sequence-actions-bar {
    display: flex;
    gap: 0.6rem;
}

.sequence-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--line, #e2e8f0);
    box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,0.05));
    background: var(--surface, #ffffff);
}

.sequence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.sequence-table th {
    background: var(--surface-soft, #f8fafc);
    color: var(--navy, #123b72);
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--line, #e2e8f0);
    white-space: nowrap;
}

.sequence-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line, #e2e8f0);
    color: var(--text, #334155);
    vertical-align: top;
}

.sequence-table tr:last-child td {
    border-bottom: none;
}

.sequence-table tr:hover td {
    background: rgba(2, 132, 199, 0.03);
}

.sequence-lesson-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-xs, 4px);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.sequence-lesson-badge.intro {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

.sequence-lesson-badge.review {
    background: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
}

.sequence-lesson-badge.eval {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.btn-load-sequence-lesson {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-xs, 4px);
    background: var(--surface-soft, #f1f5f9);
    border: 1px solid var(--line, #cbd5e1);
    color: var(--navy, #123b72);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-load-sequence-lesson:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

/* Modo Escuro */
[data-theme="dark"] .modal-guidelines-dialog,
[data-theme="dark"] .guide-step-card,
[data-theme="dark"] .sequence-table-wrap {
    background: #14213d !important;
    border-color: #233760 !important;
}

[data-theme="dark"] .modal-guidelines-header,
[data-theme="dark"] .modal-guidelines-footer,
[data-theme="dark"] .sequence-summary-header,
[data-theme="dark"] .sequence-table th {
    background: #0f1a30 !important;
    border-color: #233760 !important;
}

[data-theme="dark"] .modal-guidelines-title-wrap h3,
[data-theme="dark"] .guide-step-content h4,
[data-theme="dark"] .sequence-table th {
    color: #ffffff !important;
}

[data-theme="dark"] .guide-step-content p,
[data-theme="dark"] .guide-step-content ul,
[data-theme="dark"] .sequence-table td {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-load-sequence-lesson {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .btn-load-sequence-lesson:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

/* Modo Sépia */
[data-theme="sepia"] .modal-guidelines-dialog,
[data-theme="sepia"] .guide-step-card,
[data-theme="sepia"] .sequence-table-wrap {
    background: #fbf7ee !important;
    border-color: #dfd4bf !important;
}

[data-theme="sepia"] .modal-guidelines-header,
[data-theme="sepia"] .modal-guidelines-footer,
[data-theme="sepia"] .sequence-summary-header,
[data-theme="sepia"] .sequence-table th {
    background: #f5eee1 !important;
    border-color: #dfd4bf !important;
}

/* P1-10 — contraste WCAG AA em superfícies claras */
:root:not([data-theme="dark"]) .edu-master-badge,
:root:not([data-theme="dark"]) .eyebrow { color: #0f766e !important; }
:root:not([data-theme="dark"]) .brand-accent-gold { color: #7a5a0a !important; }
:root:not([data-theme="dark"]) .footer-brand-sep { color: #64748b !important; }
:root[data-theme="sepia"] .eyebrow { color: #0b5f59 !important; }
[data-theme="dark"] .edu-roadmap-step-num { background: #075985 !important; }

/* ==========================================================================
   PADRÃO EDITORIAL PHM ACADEMY / PHM TECH — CONTROLES GHOST COMPACTOS (34x34px)
   ========================================================================== */
.phm-ecosystem-header .phm-projects-menu > summary,
.phm-ecosystem-header .phm-hub-back {
  display: inline-flex !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-soft, #475569) !important;
  cursor: pointer;
  transition: all var(--transition, 0.15s ease);
}

.phm-ecosystem-header .phm-projects-menu > summary span,
.phm-ecosystem-header .phm-projects-menu > summary svg:last-child,
.phm-ecosystem-header .phm-hub-back span {
  display: none !important;
}

.phm-ecosystem-header .phm-projects-menu > summary:hover,
.phm-ecosystem-header .phm-projects-menu[open] > summary,
.phm-ecosystem-header .phm-hub-back:hover {
  border-color: var(--line, #e2e8f0) !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: var(--teal, #0d9488) !important;
}

[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu > summary,
[data-theme="dark"] .phm-ecosystem-header .phm-hub-back {
  color: #94a3b8 !important;
}

[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu > summary:hover,
[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu[open] > summary,
[data-theme="dark"] .phm-ecosystem-header .phm-hub-back:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #2dd4bf !important;
}

[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu > summary,
[data-theme="sepia"] .phm-ecosystem-header .phm-hub-back {
  color: #715842 !important;
}

[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu > summary:hover,
[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu[open] > summary,
[data-theme="sepia"] .phm-ecosystem-header .phm-hub-back:hover {
  background: rgba(67, 52, 34, 0.08) !important;
  border-color: rgba(67, 52, 34, 0.15) !important;
  color: #78350f !important;
}

/* Oculta botão mobile toggle no desktop */
.phm-ecosystem-header .menu-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  .phm-ecosystem-header .menu-toggle {
    display: inline-flex !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-soft, #475569) !important;
    cursor: pointer;
    transition: all var(--transition, 0.15s ease);
  }
  .phm-ecosystem-header .menu-toggle:hover {
    border-color: var(--line, #e2e8f0) !important;
    background: var(--surface-soft, #f1f5f9) !important;
    color: var(--teal, #0d9488) !important;
  }
  [data-theme="dark"] .phm-ecosystem-header .menu-toggle {
    color: #94a3b8 !important;
  }
  [data-theme="dark"] .phm-ecosystem-header .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #2dd4bf !important;
  }
  [data-theme="sepia"] .phm-ecosystem-header .menu-toggle {
    color: #715842 !important;
  }
  [data-theme="sepia"] .phm-ecosystem-header .menu-toggle:hover {
    background: rgba(67, 52, 34, 0.08) !important;
    border-color: rgba(67, 52, 34, 0.15) !important;
    color: #78350f !important;
  }
}

@media (max-width: 480px) {
  .phm-ecosystem-header .phm-ecosystem-header__inner {
    padding-inline: 0.5rem !important;
    gap: 0.25rem !important;
  }
  .phm-ecosystem-header .phm-ecosystem-header__actions {
    gap: 0.2rem !important;
  }
}


