/* Conexões Terra Firme — sistema novo. Aditivo: reaproveita os componentes
   de styles.css (botões, painéis, tags, formulários) — mas redefine as
   variáveis de cor/raio/sombra do :root pra dar uma cara mais colorida e
   lúdica ao sistema novo. Como só as páginas que carregam este arquivo
   usam essas variáveis (o sistema antigo em /old nunca inclui
   conexoes.css), isso não muda nada visualmente lá — é seguro. */

:root {
  --brand: #2f9e64;
  --brand-deep: #1d6b41;
  --brand-soft: #dcf5e6;
  --bg: #e7f5ec;
  --bg-soft: #d9f0e2;
  --danger: #e2555c;
  --shadow: 0 10px 30px rgba(31, 107, 65, 0.12);
  --radius: 18px;
  --cft-yellow: #ffc94d;
  --cft-yellow-deep: #a86c05;
  --cft-yellow-soft: #fff3d6;
  --cft-red: #ff5b61;
  --cft-red-soft: #fde3e4;
  --cft-blue: #3f8fd1;
  --cft-blue-soft: #dcedfa;
  --cft-purple: #684aa9;
  --cft-purple-soft: #f0ecff;
  --cft-teal: #0f8a7a;
  --cft-teal-soft: #d9f3ef;
  --cft-coral: #d1723f;
  --cft-coral-soft: #fbe6da;
  --cft-orange: #e8791f;
  --cft-orange-soft: #fde6cf;

  /* Chrome (topo + menu lateral) — verde escuro sólido, dá a "cara" do
     sistema em toda tela, mesmo quando o conteúdo é claro. */
  --cft-chrome-from: #0f3d27;
  --cft-chrome-to: #16532f;
  --cft-chrome-line: rgba(255, 255, 255, 0.14);
  --cft-chrome-ink: #eafaf0;
  --cft-chrome-muted: #a9d9bb;
  --cft-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background:
    radial-gradient(ellipse 70% 40% at 8% -8%, rgba(21, 107, 65, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 35% at 100% 0%, rgba(255, 201, 77, 0.16), transparent 50%),
    var(--bg);
}

.tag.danger {
  background: var(--cft-red-soft);
  color: var(--danger);
}

.tag.info {
  background: var(--cft-blue-soft);
  color: var(--cft-blue);
}

.tag.gold {
  background: var(--cft-yellow-soft);
  color: var(--cft-yellow-deep);
}

.tag.orange {
  background: var(--cft-orange-soft);
  color: var(--cft-orange);
}

/* ---------------------------------------------------------------------- */
/* Botões — mesma base do styles.css, com efeitos mais modernos: pressão   */
/* ao clicar, foco visível e transições mais macias.                       */
/* ---------------------------------------------------------------------- */

.btn {
  border-radius: 12px;
  transition: transform 0.12s var(--cft-ease), box-shadow 0.15s var(--cft-ease),
    background-color 0.15s var(--cft-ease), border-color 0.15s var(--cft-ease), color 0.15s var(--cft-ease);
}

.btn:active {
  transform: translateY(0) scale(0.96);
}

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

.btn-primary {
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  box-shadow: 0 4px 14px rgba(29, 107, 65, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(29, 107, 65, 0.32);
}

.btn-primary:active {
  background: linear-gradient(145deg, var(--brand-deep), var(--brand-deep));
  box-shadow: 0 3px 10px rgba(29, 107, 65, 0.3);
}

.btn-ghost {
  border-width: 1.5px;
}

.btn-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 107, 65, 0.1);
}

.btn-ghost:active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ---------------------------------------------------------------------- */
/* Shell / topo                                                            */
/* ---------------------------------------------------------------------- */

.cft-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 1.1rem;
  background: linear-gradient(120deg, var(--cft-chrome-from), var(--cft-chrome-to));
  border-bottom: 3px solid var(--cft-red);
  flex-wrap: nowrap;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 6px 24px rgba(10, 40, 25, 0.22);
}

.cft-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.cft-brand-symbol {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0.18rem;
  border-radius: 10px;
  background: #fffdf4;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s var(--cft-ease);
}

.cft-brand:hover .cft-brand-symbol {
  transform: translateY(-1px);
}

.cft-brand-symbol img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cft-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cft-yellow), #ffb020);
  color: var(--cft-chrome-from);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.cft-brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 0.98rem;
  color: var(--cft-chrome-ink);
}

.cft-brand-text span {
  font-size: 0.72rem;
  color: var(--cft-chrome-muted);
}

.cft-nav {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
}

.cft-nav a {
  position: relative;
  z-index: 1;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cft-chrome-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border-bottom: none;
  transition: color 0.15s var(--cft-ease), background-color 0.15s var(--cft-ease), transform 0.15s var(--cft-ease);
}

.cft-nav a.active,
.cft-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.cft-nav a.active {
  background: rgba(255, 201, 77, 0.22);
  color: var(--cft-yellow);
}

.cft-nav-bubble {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  display: block;
  box-sizing: border-box;
  border: 1.5px solid #ff777c;
  border-radius: 999px;
  background: #d9434b;
  box-shadow: 0 5px 14px rgba(4, 35, 20, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: transform 410ms cubic-bezier(.2, .85, .25, 1.16), width 410ms cubic-bezier(.2, .85, .25, 1.16), height 410ms cubic-bezier(.2, .85, .25, 1.16), opacity 160ms ease;
}

.cft-nav.has-nav-bubble .cft-nav-bubble { opacity: 1; }
.cft-nav.has-nav-bubble a.active {
  background: transparent;
  color: #fff;
  text-shadow: none;
}
.cft-nav.has-nav-bubble a[data-nav-bubble]:hover { background: transparent; color: #fff; }

.cft-nav a:active {
  transform: scale(0.96);
}

.cft-old-link {
  font-size: 0.75rem;
  color: var(--cft-chrome-muted) !important;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.7rem !important;
}

.cft-old-link:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff !important;
  background: transparent;
}

.cft-account {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-left: 0.35rem;
}

.cft-top .user-chip {
  display: inline-flex;
  gap: 0.42rem;
  max-width: 11rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #eafaf0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cft-top .user-chip svg {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.cft-top .user-chip span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cft-top .cft-account > a {
  color: var(--cft-chrome-muted);
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.cft-check-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.52rem;
  min-height: 1.45rem;
  cursor: pointer;
}

.cft-check-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--cft-red);
}

.cft-report-auto {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed rgba(85, 61, 199, 0.38);
  border-radius: 14px;
  background: rgba(114, 82, 219, 0.06);
}

.cft-report-auto > span {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .82rem;
}

.cft-report-auto article,
.cft-report-editor {
  margin-top: .8rem;
  padding: .8rem;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
}

.cft-report-auto h4 { margin: 0 0 .3rem; font-size: .92rem; }
.cft-report-auto p { margin: 0; white-space: pre-line; }
.cft-report-auto-editor textarea {
  width: 100%; margin-top: .4rem; padding: .65rem .7rem; border: 1px solid #cfc4ff;
  border-radius: 9px; font: inherit; line-height: 1.5; resize: vertical;
}
.cft-report-editor input { flex: 1; min-width: 12rem; }
.cft-report-editor textarea, .cft-report-new input { width: 100%; margin-top: .55rem; }
.cft-report-new { border-style: dashed; }
.cft-remove-section { color: var(--cft-red); font-size: .82rem; }

/* Plano Individualizado do Estudante (PIE) — documento de trabalho interno
   da equipe, com o mesmo "cabeçalho de carta" (logo, faixa de identificação
   do aluno, seções com selo colorido, assinaturas) usado nos impressos do
   Conexões; acento vermelho o diferencia do Documento Unificado (família),
   que usa o acento azul logo abaixo. */
.cft-pie-report { overflow: hidden; padding: 0 !important; border: 0 !important; box-shadow: 0 12px 35px rgba(43, 32, 84, .13); }
.cft-pie-report-head { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; color: #fff; background: linear-gradient(115deg, #147950, #0e5c43 55%, #b43442); }
.cft-pie-report-head img { width: 142px; max-height: 52px; object-fit: contain; object-position: left center; }
.cft-pie-report-head div { display: grid; gap: .15rem; }
.cft-pie-report-head strong { font: 600 1.25rem/1.15 Fraunces, Georgia, serif; letter-spacing: .01em; }
.cft-pie-report-head span { font-size: .78rem; opacity: .86; }
.cft-family-student-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 1rem 1.6rem; background: #f4faf7; border-bottom: 1px solid #dcece4; }
.cft-family-student-meta div { display: grid; gap: .18rem; min-width: 0; }
.cft-family-student-meta b { color: #247053; font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; }
.cft-family-student-meta span { font-size: .82rem; font-weight: 700; overflow-wrap: anywhere; }
.cft-pie-report .report-body { padding: 1.1rem 1.6rem .5rem; }
.cft-pie-report .ficha-label { color: #a52c3e; border-left: 3px solid #e34b59; padding-left: .5rem; }
.cft-pie-report .report-signatures { padding: 0 1.6rem 1.6rem; }

/* Documento Unificado — o documento voltado à família: mesmo "cabeçalho de
   carta" acima, com um acento azul em vez de vermelho pra diferenciar os
   dois documentos impressos à primeira vista. União somente leitura do
   resumo público do Estudo de Caso, do PAEE e do PEI (ver
   individual_plan.documento_unificado). */
.cft-unified-report { overflow: hidden; padding: 0 !important; border: 0 !important; box-shadow: 0 12px 35px rgba(43, 32, 84, .13); }
.cft-unified-report-head { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; color: #fff; background: linear-gradient(115deg, #147950, #0e5c43 55%, #2f6fb0); }
.cft-unified-report-head img { width: 142px; max-height: 52px; object-fit: contain; object-position: left center; }
.cft-unified-report-head div { display: grid; gap: .15rem; }
.cft-unified-report-head strong { font: 600 1.25rem/1.15 Fraunces, Georgia, serif; letter-spacing: .01em; }
.cft-unified-report-head span { font-size: .78rem; opacity: .86; }
.cft-unified-report .report-body { padding: 1.1rem 1.6rem .5rem; }
.cft-unified-report .ficha-label { color: #1f5c8a; border-left: 3px solid #3f8fd1; padding-left: .5rem; margin-top: 1rem; }
.cft-unified-report .report-signatures { padding: 0 1.6rem 1.6rem; }

/* PEI e PAEE em PDF avulso (docs/parte3-plano-individualizado-estudo-caso.md
   §2) — mesmo "cabeçalho de carta", só a seção legal correspondente isolada
   do restante do PIE. Acento roxo (PEI) e acento laranja (PAEE) pra
   diferenciar dos impressos acima. */
.cft-pei-secao-report { overflow: hidden; padding: 0 !important; border: 0 !important; box-shadow: 0 12px 35px rgba(43, 32, 84, .13); }
.cft-pei-secao-report-head { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; color: #fff; background: linear-gradient(115deg, #147950, #0e5c43 55%, #6a3d9a); }
.cft-pei-secao-report-head img { width: 142px; max-height: 52px; object-fit: contain; object-position: left center; }
.cft-pei-secao-report-head div { display: grid; gap: .15rem; }
.cft-pei-secao-report-head strong { font: 600 1.25rem/1.15 Fraunces, Georgia, serif; letter-spacing: .01em; }
.cft-pei-secao-report-head span { font-size: .78rem; opacity: .86; }
.cft-pei-secao-report .report-body { padding: 1.1rem 1.6rem .5rem; }
.cft-pei-secao-report .ficha-label { color: #5b3a86; border-left: 3px solid #8a5fc7; padding-left: .5rem; }
.cft-pei-secao-report .report-signatures { padding: 0 1.6rem 1.6rem; }

.cft-paee-report { overflow: hidden; padding: 0 !important; border: 0 !important; box-shadow: 0 12px 35px rgba(43, 32, 84, .13); }
.cft-paee-report-head { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; color: #fff; background: linear-gradient(115deg, #147950, #0e5c43 55%, #c17a1f); }
.cft-paee-report-head img { width: 142px; max-height: 52px; object-fit: contain; object-position: left center; }
.cft-paee-report-head div { display: grid; gap: .15rem; }
.cft-paee-report-head strong { font: 600 1.25rem/1.15 Fraunces, Georgia, serif; letter-spacing: .01em; }
.cft-paee-report-head span { font-size: .78rem; opacity: .86; }
.cft-paee-report .report-body { padding: 1.1rem 1.6rem .5rem; }
.cft-paee-report .ficha-label { color: #8a5314; border-left: 3px solid #d1922f; padding-left: .5rem; }
.cft-paee-report .report-signatures { padding: 0 1.6rem 1.6rem; }

/* ---------------------------------------------------------------------- */
/* Hambúrguer + menu lateral (mobile) — desktop usa o .cft-nav no topo,    */
/* mobile troca pra sidebar deslizante com grupos expansíveis.             */
/* ---------------------------------------------------------------------- */

.cft-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s var(--cft-ease), transform 0.15s var(--cft-ease);
}

.cft-hamburger:hover {
  background: rgba(255, 255, 255, 0.24);
}

.cft-hamburger:active {
  transform: scale(0.92);
}

.cft-hamburger span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 0 auto;
  background: var(--cft-chrome-ink);
  border-radius: 2px;
}

.cft-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 30, 0.45);
  z-index: 40;
}

.cft-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 320px);
  background: linear-gradient(165deg, var(--cft-chrome-from), var(--cft-chrome-to));
  box-shadow: 12px 0 30px rgba(10, 30, 20, 0.35);
  z-index: 50;
  transform: translateX(-105%);
  transition: transform 0.28s var(--cft-ease);
  display: flex;
  flex-direction: column;
}

body.cft-sidebar-is-open .cft-sidebar {
  transform: translateX(0);
}

body.cft-sidebar-is-open .cft-sidebar-backdrop {
  display: block;
}

.cft-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--cft-chrome-line);
}

.cft-sidebar-head strong {
  font-family: var(--display);
  color: var(--cft-chrome-ink);
}

.cft-sidebar-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--cft-chrome-ink);
  transition: background-color 0.15s var(--cft-ease), transform 0.15s var(--cft-ease);
}

.cft-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.cft-sidebar-close:active {
  transform: scale(0.9);
}

.cft-sidebar-nav {
  padding: 0.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cft-sidebar-nav > a,
.cft-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--cft-chrome-ink);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s var(--cft-ease), transform 0.1s var(--cft-ease);
}

.cft-sidebar-nav > a:hover,
.cft-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cft-sidebar-nav > a:active,
.cft-sidebar-toggle:active {
  transform: scale(0.98);
}

.cft-sidebar-nav > a.active {
  background: rgba(255, 201, 77, 0.2);
  color: var(--cft-yellow);
}

.cft-sidebar-toggle .chev {
  transition: transform 0.15s ease;
  color: var(--cft-chrome-muted);
}

.cft-sidebar-group.is-open .cft-sidebar-toggle .chev {
  transform: rotate(180deg);
}

.cft-sidebar-sub {
  display: none;
  flex-direction: column;
  padding-left: 1rem;
  gap: 0.1rem;
}

.cft-sidebar-group.is-open .cft-sidebar-sub {
  display: flex;
}

.cft-sidebar-sub a {
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--cft-chrome-muted);
  transition: background-color 0.15s var(--cft-ease), color 0.15s var(--cft-ease);
}

.cft-sidebar-sub a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cft-sidebar-foot {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--cft-chrome-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cft-sidebar-foot .user-chip {
  padding: 0.18rem 0;
  background: transparent;
  color: rgba(169, 217, 187, 0.7);
  font-size: 0.72rem;
  font-weight: 500;
}

.cft-sidebar-foot a {
  color: var(--cft-chrome-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.cft-sidebar-foot a:hover {
  color: #fff;
}

@media (max-width: 860px) {
  .cft-hamburger {
    display: flex;
  }

  .cft-nav-desktop {
    display: none;
  }

  .cft-top {
    padding: 0.65rem 0.8rem;
  }

  .cft-brand-text span {
    display: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Home — áreas principais + pendências gerais                             */
/* ---------------------------------------------------------------------- */

.cft-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.cft-area-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--cft-ease), box-shadow 0.2s var(--cft-ease), border-color 0.2s var(--cft-ease);
}

.cft-area-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(31, 107, 65, 0.2);
  border-color: var(--brand);
}

.cft-area-card:active {
  transform: translateY(-1px);
}

.cft-area-card .cft-area-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.cft-area-card .cft-area-icon svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cft-area-card.is-aee .cft-area-icon {
  background: #f6e2e2;
  color: var(--danger);
}

.cft-area-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.2rem;
}

.cft-area-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cft-pendencias-overview {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.cft-pendencias-overview .panel-head {
  margin-bottom: 0.75rem;
}

.cft-pend-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.cft-pend-list {
  display: grid;
  gap: 0.6rem;
}

.cft-pend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: #fbf3f3;
  border: 1px solid #f0dede;
}

.cft-pend-row strong {
  font-size: 0.92rem;
}

.cft-pend-row .hint {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------------- */
/* Etapas / turmas                                                         */
/* ---------------------------------------------------------------------- */

.cft-etapa-group {
  margin-bottom: 2rem;
}

.cft-etapa-group h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--brand-deep);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  margin-bottom: 0.9rem;
}

.cft-turma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

.cft-turma-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s var(--cft-ease), box-shadow 0.18s var(--cft-ease), border-color 0.18s var(--cft-ease);
}

.cft-turma-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(31, 107, 65, 0.18);
  border-color: var(--brand);
}

.cft-turma-card:active {
  transform: translateY(-1px);
}

.cft-turma-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.cft-turma-card .hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.cft-turma-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Nome da professora regente (Turmas §1) — Infantil ao 5º ano só; editável
   inline pela gestão, sem sair do card nem recarregar a lista. */
.cft-turma-regente {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  color: var(--brand-deep);
  font-size: 0.78rem;
}

.cft-turma-regente svg {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.cft-turma-regente .cft-regente-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cft-regente-edit-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  border-radius: 6px;
  transition: color 0.15s var(--cft-ease), background-color 0.15s var(--cft-ease);
}

.cft-regente-edit-btn:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.cft-regente-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* AEE — grid de cards (grupos, acompanhamentos individuais, Oficina)      */
/* ---------------------------------------------------------------------- */

.aee-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.aee-card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
  .aee-card-grid,
  .aee-card-grid-2 {
    grid-template-columns: 1fr;
  }
}

.aee-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s var(--cft-ease), box-shadow 0.18s var(--cft-ease), border-color 0.18s var(--cft-ease);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
  width: 100%;
}

.aee-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(31, 107, 65, 0.18);
  border-color: var(--brand);
}

.aee-card:active {
  transform: translateY(-1px);
}

.aee-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.aee-card-body strong {
  font-size: 1rem;
  color: var(--brand-deep);
}

.aee-card-body .hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.aee-student-link {
  color: var(--brand-deep);
  font-weight: 750;
  text-decoration: none;
}

.aee-student-link:hover,
.aee-student-link:focus-visible {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.aee-participation-count {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 750;
}

.aee-chevron {
  flex-shrink: 0;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aee-oficina-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.aee-oficina-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------------- */
/* Página da turma — abas                                                  */
/* ---------------------------------------------------------------------- */

.cft-tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid var(--line);
  margin: 1.25rem 0 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .cft-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cft-tabs::-webkit-scrollbar {
    display: none;
  }

  .cft-tab {
    flex-shrink: 0;
  }
}

.cft-tab {
  padding: 0.6rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  transition: background-color 0.15s var(--cft-ease), color 0.15s var(--cft-ease), border-color 0.15s var(--cft-ease);
}

.cft-tab:hover {
  background: var(--bg-soft);
  color: var(--brand-deep);
}

.cft-tab.active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
  background: var(--brand-soft);
}

.cft-tab:active {
  transform: scale(0.97);
}

.cft-tab .tag {
  margin-left: 0.4rem;
}

/* ---------------------------------------------------------------------- */
/* Listagem de alunos — resumo + pendências + laudo                        */
/* ---------------------------------------------------------------------- */

.cft-student-list {
  display: grid;
  gap: 0.75rem;
}

/* Tabela inteligente — só desktop (≥860px); no mobile some e o
   .cft-student-list (cards empilhados, linha alta, sem coluna nenhuma)
   assume — assim nunca precisa de scroll lateral no celular. */
.cft-table-wrap {
  display: none;
  overflow-x: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cft-smart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.cft-smart-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.cft-smart-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cft-smart-table tbody tr:last-child td {
  border-bottom: none;
}

.cft-smart-table tbody tr:hover {
  background: var(--bg-soft);
}

.cft-smart-table .cft-clickable-row,
.cft-student-row[data-row-link] {
  cursor: pointer;
}

.cft-smart-table .cft-clickable-row {
  transition: background-color 0.16s var(--cft-ease), transform 0.16s var(--cft-ease), box-shadow 0.16s var(--cft-ease);
}

.cft-smart-table .cft-clickable-row:hover {
  background: #f2fbf5;
  box-shadow: inset 4px 0 0 var(--cft-yellow);
}

.cft-smart-table .cft-clickable-row:focus-visible,
.cft-student-row[data-row-link]:focus-visible {
  outline: 3px solid var(--cft-yellow);
  outline-offset: -3px;
}

.cft-smart-table .cft-cell-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cft-smart-table .cft-cell-name strong {
  display: block;
  font-size: 0.92rem;
}

.cft-smart-table .cft-cell-name .hint {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.cft-smart-table .cft-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.cft-avatar {
  flex-shrink: 0;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cft-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cft-avatar-view { display: block; width: 100%; height: 100%; }
.cft-avatar-view img { display: block; }

/* Upload rápido de foto direto da aba Alunos (parte2-turmas §1) — o
   avatar vira um <label> clicável (input file escondido), com uma
   bolinha de câmera no canto pra indicar a ação sem precisar de texto. */
.cft-avatar-upload {
  position: relative;
  cursor: pointer;
  transition: opacity 0.15s var(--cft-ease);
}

.cft-avatar-upload:hover {
  opacity: 0.85;
}

.cft-avatar-upload.is-uploading {
  opacity: 0.5;
  cursor: wait;
}

.cft-avatar-upload-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-elevated);
}

.cft-avatar-upload-badge svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Foto do aluno/professor(a) em tamanho grande (parte2-turmas §1: cadastro
   e "ao lado do nome" ao abrir o aluno). */
.cft-avatar-lg {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.4rem;
}

.cft-aluno-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.cft-aluno-head .page-title,
.cft-aluno-head .page-sub {
  margin: 0;
}

.cft-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.cft-dot.ok { background: var(--brand); }
.cft-dot.muted { background: var(--line); }
.cft-dot.warn { background: var(--cft-yellow); }
.cft-dot.danger { background: var(--danger); }

@media (min-width: 860px) {
  .cft-table-wrap {
    display: block;
  }

  /* Só esconde a lista de cards quando ela é o par mobile de uma tabela
     inteligente (ex.: turma_alunos.html) — outras listas reaproveitam
     .cft-student-list (grupos do AEE, banco de atividades) e devem
     continuar visíveis no desktop. */
  .cft-table-wrap + .cft-student-list {
    display: none;
  }
}

.cft-student-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
}

.cft-student-row .cft-student-main {
  flex: 1;
  min-width: 0;
}

.cft-student-row strong {
  display: block;
  font-size: 0.98rem;
}

.cft-student-row .hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.cft-student-pend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

/* Indicação do professor regente pro AEE / Oficina do Saber (Turmas §2) —
   painel discreto que abre sob o botão "Indicar", sem sair da tabela. */
.cft-referral {
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.cft-referral summary {
  list-style: none;
  display: inline-block;
}

.cft-referral summary::-webkit-details-marker { display: none; }

.cft-referral-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  margin-top: 0.4rem;
  width: min(260px, 80vw);
}

.cft-referral-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.cft-referral-form select,
.cft-referral-form textarea {
  font: inherit;
  font-size: 0.85rem;
}

/* Status rápidos da aba Alunos (Turmas §3) — um <select> com a cara de um
   .tag (mesmas cores), editável sem sair da tabela nem recarregar a
   página. As cores acompanham as mesmas classes usadas pelos badges
   somente-leitura (AEE/Oficina do Saber) logo abaixo. */
.cft-status-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.32rem 1.7rem 0.32rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink-soft);
  background-color: var(--bg-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.6rem;
  transition: background-color 0.15s var(--cft-ease), opacity 0.15s var(--cft-ease);
  max-width: 100%;
}

.cft-status-select:disabled {
  opacity: 0.6;
  cursor: wait;
}

.cft-status-select.filled {
  background-color: var(--brand-soft);
  color: var(--brand-deep);
}

.cft-status-select.warn {
  background-color: var(--cft-yellow-soft);
  color: var(--cft-yellow-deep);
}

.cft-status-select.info {
  background-color: var(--cft-blue-soft);
  color: var(--cft-blue);
}

.cft-status-select.gold {
  background-color: var(--cft-yellow-soft);
  color: var(--cft-yellow-deep);
}

.cft-status-select.danger {
  background-color: var(--cft-red-soft);
  color: var(--danger);
}

.cft-status-select.orange {
  background-color: var(--cft-orange-soft);
  color: var(--cft-orange);
}

.cft-smart-table td .save-indicator {
  display: inline-flex;
  margin-left: 0.4rem;
}

.cft-smart-table td .tag {
  white-space: nowrap;
}

.cft-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.cft-laudo-flag {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cft-laudo-flag:hover {
  background: #8a2f2f;
}

.cft-laudo-placeholder {
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
}

/* ---------------------------------------------------------------------- */
/* Observação do professor                                                 */
/* ---------------------------------------------------------------------- */

.cft-obs-list {
  display: grid;
  gap: 0.75rem;
}

.cft-obs-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.cft-obs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.cft-obs-head .hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.cft-guiding-questions {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.cft-guiding-questions li {
  margin-bottom: 0.2rem;
}

.cft-obs-kind-section {
  display: grid;
  gap: 0.7rem;
  margin: 0.6rem 0;
}

.cft-checklist-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin: 0;
}

.cft-checklist-step legend {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-deep);
  padding: 0 0.3rem;
}

.cft-checklist-intro {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.1rem 0 0.55rem;
}

.cft-checklist-note {
  font-size: 0.76rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.55rem 0 0;
}

.cft-checklist-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
}

.cft-checklist-question:first-of-type {
  border-top: 0;
}

.cft-checklist-question .q-label {
  flex: 1 1 220px;
  font-size: 0.85rem;
}

.cft-checklist-answer {
  display: inline-flex;
  gap: 0.65rem;
  font-size: 0.8rem;
}

.cft-checklist-answer label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.cft-checklist-question .observe-input {
  flex: 1 1 180px;
  min-width: 150px;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.8rem;
}

.cft-checklist-readonly {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.cft-checklist-readonly strong {
  color: var(--brand-deep);
}

.cft-checklist-readonly .q-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.cft-behavior-groups {
  display: grid;
  gap: 0.6rem;
}

.cft-behavior-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  margin: 0;
}

.cft-behavior-group legend {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-deep);
  padding: 0 0.3rem;
}

.cft-behavior-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cft-behavior-options .cft-check-label {
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

/* ---------------------------------------------------------------------- */
/* Plano Individualizado                                                   */
/* ---------------------------------------------------------------------- */

.cft-plan-section {
  margin-bottom: 1.45rem;
}

.cft-plan-section label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--brand-deep);
}

.cft-plan-section textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  resize: vertical;
}

.cft-catalog-textarea { margin-top: 1rem; }

/* Cada campo do Plano Individualizado é um cartão bem definido, com fundo
   levemente destacado do fundo da página e uma cor de identificação na
   borda esquerda — a mesma cor se repete no histórico da categoria, pra
   ficar claro qual campo é qual (reqs de design: telas muito parecidas
   entre si, difícil separar visualmente uma seção da outra). */
.cft-tag-field-wrap {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 13px;
  background: var(--bg-elevated);
  box-shadow: 0 2px 10px rgba(21, 36, 28, 0.05);
}
.cft-tag-field-wrap.cft-accent-potencialidade { border-left-color: var(--brand); }
.cft-tag-field-wrap.cft-accent-barreira { border-left-color: var(--danger); }
.cft-tag-field-wrap.cft-accent-implicacao { border-left-color: var(--cft-yellow-deep); }
.cft-tag-field-wrap.cft-accent-adaptacao { border-left-color: var(--cft-blue); }
.cft-tag-field-wrap.cft-accent-aee { border-left-color: var(--cft-purple); }
.cft-tag-field-wrap.cft-accent-familia { border-left-color: #d65362; }
.cft-tag-field-wrap.cft-accent-habilidade { border-left-color: var(--cft-teal); }
.cft-tag-field-wrap.cft-accent-comportamento { border-left-color: var(--cft-coral); }
.cft-tag-field-wrap.cft-accent-objetivo { border-left-color: var(--cft-purple); }

/* Numeração dos 7 passos do PEI — pequeno círculo antes do título de cada
   box, na mesma cor de destaque da borda esquerda, pra reforçar a ordem
   sugerida de preenchimento sem depender só da posição na página. */
.cft-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--step-color, var(--brand));
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  margin-right: .5rem;
  flex: 0 0 auto;
}
.cft-tag-field-wrap.cft-accent-habilidade .cft-step-badge { --step-color: var(--cft-teal); }
.cft-tag-field-wrap.cft-accent-comportamento .cft-step-badge { --step-color: var(--cft-coral); }
.cft-tag-field-wrap.cft-accent-barreira .cft-step-badge { --step-color: var(--danger); }
.cft-tag-field-wrap.cft-accent-potencialidade .cft-step-badge { --step-color: var(--brand); }
.cft-tag-field-wrap.cft-accent-adaptacao .cft-step-badge { --step-color: var(--cft-blue); }
.cft-tag-field-wrap.cft-accent-objetivo .cft-step-badge { --step-color: var(--cft-purple); }
.cft-tag-field-head label { display: flex; align-items: center; }

/* Sub-seletor dentro de um box (ex.: Comportamento observado + Momento
   observado dividindo o mesmo box "passo 2") — separação leve sem criar
   outro cartão inteiro. */
.cft-subsection { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.cft-subsection:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.cft-subsection > label { font-weight: 700; display: block; margin-bottom: .4rem; }

/* Descrição breve da barreira, baseada na teoria do PEI — some abaixo do
   nome sempre que a barreira estiver selecionada, curta e discreta. */
.cft-barrier-theory { margin: .3rem 0 0; font-size: .8rem; color: var(--muted); }

/* "Ver todas as adaptações" — expansível, deliberadamente menos destacado
   que o botão principal de selecionar adaptações relacionadas às
   barreiras já escolhidas (essas devem ser o foco). */
.cft-adaptation-all { margin-top: .85rem; }
.cft-adaptation-all summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--muted); list-style: none; }
.cft-adaptation-all summary::-webkit-details-marker { display: none; }
.cft-adaptation-all summary::before { content: "▸ "; }
.cft-adaptation-all[open] summary::before { content: "▾ "; }
.cft-adaptation-all .cft-adaptation-all-body { margin-top: .6rem; }

/* Planos anteriores (Vigência) — encerrar nunca apaga nada, só arquiva;
   esta lista é só pra deixar isso visível, sem virar um editor. */
.cft-previous-plans { margin-top: .85rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.cft-previous-plans summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--muted); list-style: none; }
.cft-previous-plans summary::-webkit-details-marker { display: none; }
.cft-previous-plans summary::before { content: "▸ "; }
.cft-previous-plans[open] summary::before { content: "▾ "; }
.cft-previous-plans-list { display: grid; gap: .5rem; margin-top: .65rem; }
.cft-previous-plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); font-size: .82rem; }
.cft-previous-plan-row span:first-child { font-weight: 700; }

/* Sub-bloco de texto livre dentro de um cartão maior (ex.: "outras
   barreiras" dentro do cartão de Barreiras) — fundo levemente diferente e
   borda própria, pra separar visualmente do catálogo selecionado acima,
   sem parecer um cartão flutuando solto fora de qualquer contorno. */
.cft-tag-field-wrap.cft-tag-field-flat {
  margin-top: 0.9rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px dashed var(--line);
  border-left: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: none;
}

.cft-tag-field-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.cft-tag-field-head label { margin: 0; }
.cft-field-hint { margin-top: .15rem; color: var(--muted); font-size: .78rem; font-weight: 500; }
.cft-tag-editor { display: grid; gap: .65rem; margin-top: .65rem; }

/* Cada propriedade selecionada (catálogo ou texto livre) ocupa a própria
   linha inteira — nunca espremida entre outras, e com espaço confortável
   até o "×" de remover, sempre isolado à direita da linha
   (`margin-left: auto`). Catálogo e texto livre ("outro") ficam na mesma
   lista vertical, um empilhado abaixo do outro. */
.cft-chip-group { display: flex; flex-direction: column; gap: .5rem; }
.cft-chip-list { display: flex; flex-direction: column; gap: .5rem; }
.cft-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* `align-items: stretch` (padrão do flex) faz o Selecionar/Adicionar
   crescerem até a mesma altura do botão de Sugestão (que é mais alto por
   causa do ícone animado) — sem isso os três ficavam com altura diferente.
   Mesma "cara" do botão de Sugestão (borda fina, bem arredondado) pra não
   destoar dele nem parecer maior/mais alto do que é. */
.cft-tag-action-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; }
.cft-tag-action-row .ai-suggest { margin: 0; }

/* "×" de remover — vive DENTRO da própria etiqueta colorida (não solto no
   fim da linha), pra ficar óbvio a qual item cada "×" pertence. Círculo
   vermelho translúcido sobre o fundo roxo do chip, com o "×" em branco
   (legível) — fica sólido vermelho ao passar o mouse. Nome de classe
   próprio (não reaproveita `.cft-chip-remove`, que já é o "×" circular do
   Planejamento da turma — outro componente, mesmo prefixo). */
.cft-item-remove {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: .4rem;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 85, 92, .38);
  color: #fff;
  font-size: .92rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s var(--cft-ease);
}
.cft-item-remove:hover, .cft-item-remove:focus-visible { background: var(--danger); outline: none; }

/* Sub-bloco "Alcançados" — some da lista principal ao ser marcado (o
   Acompanhamento continua tendo o histórico), mas fica só um clique de
   distância pra reabrir se for engano. */
.cft-achieved-details { margin-top: .85rem; padding-top: .7rem; border-top: 1px dashed var(--line); }
.cft-achieved-details summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style: none; font-size: .82rem; }
.cft-achieved-details summary::-webkit-details-marker { display: none; }
.cft-achieved-details summary::before { content: "▸ "; }
.cft-achieved-details[open] summary::before { content: "▾ "; }
.cft-achieved-details .cft-chip-list { margin-top: .6rem; }
.cft-selected-chip.is-achieved { opacity: .85; }

/* Confirmação de exclusão (modal genérico do TF, ver conexoes.js) — texto
   de aviso quando o item já tem acompanhamento registrado. */
.cft-confirm-text { margin: 0 0 1rem; line-height: 1.5; }
.cft-confirm-text strong.cft-confirm-danger { color: var(--danger); }
.cft-confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* Editor de tags: por padrão só mostra os itens já adicionados e um
   gatilho discreto "+ Adicionar"; o campo de texto some depois de cada
   item adicionado e só reaparece ao clicar no gatilho (evita que um
   input vazio compita visualmente com os itens já selecionados). */
.cft-tag-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--line);
}
.cft-tag-entry[hidden] { display: none; }
.cft-tag-entry input[type="text"] { flex: 1 1 180px; min-width: 140px; width: auto; padding: .55rem .7rem; border: 1px solid var(--cft-purple); border-radius: 9px; font: inherit; background: #fff; }
.cft-tag-entry input[type="text"]:focus { outline: 2px solid rgba(104, 74, 169, .2); border-color: var(--cft-purple); }

/* Selecionar/Adicionar — mesma altura, borda e arredondamento do botão de
   Sugestão (`.ai-suggest`, ver static/css/ai.css: borda fina, bem
   arredondado/pill), só trocando a cor pra roxo (distingue de IA sem
   quebrar o padrão visual dos três botões lado a lado). */
.cft-add-trigger {
  padding: 7px 13px !important;
  border: 1px solid #cdbdf0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #6b5aa3 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
.cft-add-trigger:hover {
  background: var(--cft-purple-soft, #f0ecff) !important;
  border-color: #a996dd !important;
  color: #4b3684 !important;
}

@media (max-width: 560px) { .cft-tag-field-head { align-items: flex-start; flex-direction: column; } }
.cft-plan-fields { display: grid; gap: 1.1rem; }
.cft-observation-actions { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; padding-top: .25rem; }
.cft-observation-actions .cft-check-label { margin: 0; }

.cft-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.cft-admin-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; }
.cft-admin-list div { display: grid; gap: .12rem; padding: .75rem .85rem; border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--line); }
.cft-admin-list span { color: var(--muted); font-size: .82rem; }
.cft-admin-classroom { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.cft-admin-classroom select { min-width: 0; flex: 1; font-size: .78rem; }
.cft-admin-list article { display: grid; gap: .25rem; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elevated); }
.cft-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .25rem; }
.cft-admin-actions form { margin: 0; }
.cft-admin-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.cft-admin-inline-form input { flex: 1 1 12rem; }
.cft-admin-table-wrap { overflow-x: auto; }
.cft-admin-table { width: 100%; border-collapse: collapse; }
.cft-admin-table th, .cft-admin-table td { padding: .75rem .65rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cft-admin-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.cft-admin-filter { display: flex; align-items: center; gap: .35rem; margin: -.35rem 0 1rem; font-size: .84rem; }
.cft-admin-filter a { padding: .25rem .55rem; border-radius: 999px; color: var(--muted); }
.cft-admin-filter a.active { color: #fff; background: var(--cft-purple); }
.cft-construction { text-align: center; padding: 3rem 1rem; }
.cft-construction > div { font-size: 3rem; }
.cft-mapping-tabs { margin-bottom: 1rem; }
.cft-mapping-tabs button { border: 0; font: inherit; cursor: pointer; }
.cft-mapping-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.cft-mapping-layout[hidden] { display: none; }
.cft-mapping-construction { min-height: 30rem; display: grid; place-content: center; }
.cft-mapping-construction[hidden] { display: none; }
.cft-relation-map[hidden] { display: none; }
.cft-relation-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.cft-relation-toolbar h2, .cft-relation-toolbar p { margin: 0; }
.cft-relation-switch { display: flex; gap: .45rem; flex-wrap: wrap; }
.cft-relation-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.cft-relation-parents { display: grid; gap: .4rem; max-height: 68vh; overflow: auto; }
.cft-relation-parents h3 { margin: .15rem 0 .55rem; }
.cft-relation-parent { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elevated); color: inherit; text-align: left; cursor: pointer; }
.cft-relation-parent small { min-width: 1.8rem; padding: .15rem .38rem; border-radius: 999px; background: var(--bg-soft); text-align: center; }
.cft-relation-parent.active { border-color: var(--cft-purple); background: #f7f5ff; box-shadow: 0 0 0 2px rgba(104, 74, 169, .1); }
.cft-relation-children { min-height: 34rem; }
.cft-relation-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.cft-relation-head h3 { margin: .12rem 0 0; }
.cft-unmapped-toggle { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .78rem; cursor: pointer; }
.cft-relation-list { display: grid; gap: .45rem; margin-top: .5rem; max-height: 58vh; overflow: auto; }
.cft-relation-child { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elevated); cursor: pointer; }
.cft-relation-child.is-linked { border-color: #91c9b6; background: #f3fbf7; }
.cft-relation-child span { display: grid; gap: .16rem; }
.cft-relation-child small { color: var(--muted); }
.cft-relation-child em { color: var(--muted); font-size: .72rem; font-style: normal; white-space: nowrap; }
.cft-relation-child em.is-unmapped { color: #9a5b00; font-weight: 700; }
.cft-mapping-categories { display: grid; gap: .5rem; }
.cft-mapping-category { display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: center; gap: .65rem; width: 100%; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cft-mapping-category > span { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px; background: #f0ecff; color: var(--cft-purple); font-size: .72rem; font-weight: 800; }
.cft-mapping-category small { color: var(--muted); white-space: nowrap; }
.cft-mapping-category.active { border-color: var(--cft-purple); box-shadow: 0 0 0 2px rgba(104, 74, 169, .1); }
.cft-catalog-panel { min-height: 30rem; }
.cft-catalog-heading h2 { margin: .1rem 0 0; }
.cft-catalog-step { color: var(--cft-purple); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.cft-catalog-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; padding: .85rem; margin: .7rem 0 .25rem; border-radius: 12px; background: #f7f5ff; }
.cft-catalog-add.has-code { grid-template-columns: minmax(9rem, .35fr) minmax(0, 1fr) auto; }
.cft-catalog-add.has-category { grid-template-columns: minmax(10rem, .35fr) minmax(0, 1fr) auto; }
.cft-catalog-add input, .cft-catalog-item input { width: 100%; min-width: 0; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
.cft-catalog-feedback { min-height: 1.25rem; margin: .25rem 0; color: #126348; font-size: .78rem; }
.cft-catalog-feedback.is-error { color: var(--danger); }
.cft-catalog-list { display: grid; gap: .45rem; }
.cft-catalog-item { display: grid; grid-template-columns: minmax(0, 1fr) 3.4rem auto; align-items: center; gap: .5rem; padding: .55rem; border-bottom: 1px solid var(--line); }
.cft-catalog-item.has-code { grid-template-columns: minmax(8rem, .22fr) minmax(0, 1fr) minmax(7rem, .2fr) 3.4rem auto; }
.cft-catalog-item.has-category { grid-template-columns: minmax(10rem, .28fr) minmax(0, 1fr) 3.4rem auto; }
.cft-catalog-years { color: var(--muted); font-size: .78rem; }
.cft-catalog-save { color: #126348; font-size: .72rem; }
.cft-catalog-year-filter-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .1rem 0 .5rem; font-size: .82rem; color: var(--muted); }
.cft-catalog-year-filter-wrap select { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
.cft-csv-dialog { width: min(92vw, 480px); padding: 1.5rem; border: 0; border-radius: 16px; box-shadow: 0 18px 60px rgba(30,20,60,.25); }
.cft-csv-dialog::backdrop { background: rgba(25,18,38,.45); }
.cft-csv-dialog h3 { margin-top: 0; }
.cft-dialog-close { float: right; border: 0; background: transparent; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 760px) { .cft-mapping-layout, .cft-relation-layout { grid-template-columns: 1fr; } .cft-mapping-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cft-relation-toolbar, .cft-relation-head { align-items: flex-start; flex-direction: column; } .cft-relation-parents { max-height: 18rem; } }
@media (max-width: 520px) { .cft-mapping-categories { grid-template-columns: 1fr; } .cft-catalog-add, .cft-catalog-item { grid-template-columns: 1fr; } }
.cft-audit-filters { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.cft-audit-filters .field { min-width: 125px; flex: 1; }
.cft-audit-filters .field:first-child { flex: 2; min-width: 220px; }
.cft-audit-timeline { display: grid; }
.cft-audit-timeline-item { display: grid; grid-template-columns: 76px 28px minmax(0, 1fr); align-items: stretch; }
.cft-audit-time { padding: .95rem .7rem .95rem 0; text-align: right; font-style: normal; }
.cft-audit-time strong, .cft-audit-time span, .cft-audit-time b { display: block; }
.cft-audit-time strong { color: var(--text); font-size: .9rem; }
.cft-audit-time span { margin-top: -.08rem; color: var(--muted); font-size: .67rem; }
.cft-audit-time b { margin-top: .35rem; color: var(--cft-purple); font-size: .8rem; }
.cft-audit-rail { position: relative; min-height: 100%; }
.cft-audit-rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: #ded7ef; }
.cft-audit-rail span { position: absolute; z-index: 1; top: 1.2rem; left: 50%; width: 12px; height: 12px; transform: translateX(-50%); border: 3px solid #fff; border-radius: 50%; background: var(--cft-purple); box-shadow: 0 0 0 2px #d8ceee; }
.cft-audit-timeline-item:first-child .cft-audit-rail::before { top: 1.2rem; }
.cft-audit-timeline-item:last-child .cft-audit-rail::before { bottom: calc(100% - 1.2rem); }
.cft-audit-entry { margin: .35rem 0 .8rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid #d2c7e8; border-radius: 12px; background: var(--bg-elevated); box-shadow: 0 3px 12px rgba(39, 28, 67, .06); }
.cft-audit-timeline-item.is-create .cft-audit-entry { border-left-color: #38a779; }
.cft-audit-timeline-item.is-update .cft-audit-entry { border-left-color: #d7a72e; }
.cft-audit-timeline-item.is-delete .cft-audit-entry { border-left-color: #d85c70; }
.cft-audit-entry-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: start; }
.cft-audit-event { display: flex; align-items: flex-start; gap: .65rem; min-width: 0; }
.cft-audit-event > div { min-width: 0; }
.cft-audit-summary { display: block; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.cft-audit-summary + small { display: block; margin-top: .18rem; color: var(--muted); }
.cft-audit-user { display: flex; align-items: center; gap: .55rem; min-width: 190px; padding: .48rem .62rem; border: 1px solid #dfd7ee; border-radius: 10px; background: #f7f4fc; }
.cft-audit-user-avatar { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: var(--cft-purple); font-size: .78rem; font-weight: 800; }
.cft-audit-user > span:last-child, .cft-audit-user strong, .cft-audit-user small { display: block; }
.cft-audit-user small { margin-bottom: .1rem; color: var(--muted); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cft-audit-user strong { font-size: .78rem; line-height: 1.25; }
.cft-audit-action { display: inline-flex; padding: .22rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.cft-audit-action.is-create { color: #116043; background: #dff6e9; }
.cft-audit-action.is-update { color: #654900; background: #fff1bd; }
.cft-audit-action.is-delete { color: #98283a; background: #ffe0e5; }
.cft-audit-details { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.cft-audit-details summary { cursor: pointer; color: var(--cft-purple); font-size: .8rem; font-weight: 700; }
.cft-audit-diff { width: 100%; min-width: 0; margin-top: .65rem; padding: .65rem .8rem; border-radius: 9px; background: #f7f5ff; }
.cft-audit-diff > div { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.cft-audit-diff > div:first-child::before { content: ""; }
.cft-audit-diff .cft-audit-diff-head { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.cft-audit-diff b, .cft-audit-diff span { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.45; }
.cft-audit-diff .before { color: #9b3443; }
.cft-audit-diff .after { color: #126348; }
.cft-audit-empty { padding: 1.25rem; text-align: center; }
.cft-audit-pagination { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-top: 1rem; }
@media (max-width: 760px) {
  .cft-audit-timeline-item { grid-template-columns: 54px 18px minmax(0, 1fr); }
  .cft-audit-time { padding-right: .3rem; }
  .cft-audit-entry-head { grid-template-columns: 1fr; }
  .cft-audit-user { min-width: 0; width: 100%; }
  .cft-audit-diff > div { grid-template-columns: 1fr; gap: .3rem; }
  .cft-audit-diff-head { display: none !important; }
  .cft-audit-diff .before::before, .cft-audit-diff .after::before { display: block; margin-bottom: .12rem; color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; }
  .cft-audit-diff .before::before { content: "Antes"; }
  .cft-audit-diff .after::before { content: "Depois"; }
}
@media (max-width: 480px) {
  .cft-audit-timeline-item { grid-template-columns: 46px 14px minmax(0, 1fr); }
  .cft-audit-time strong { font-size: .76rem; }
  .cft-audit-time span { font-size: .6rem; }
  .cft-audit-time b { font-size: .7rem; }
  .cft-audit-entry { padding: .8rem; }
  .cft-audit-event { display: grid; }
}
@media (max-width: 760px) { .cft-admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .cft-admin-table-wrap { overflow: visible; }
  .cft-admin-table, .cft-admin-table tbody, .cft-admin-table tr, .cft-admin-table td { display: block; width: 100%; }
  .cft-admin-table thead { display: none; }
  .cft-admin-table tr { margin: .65rem 0; padding: .75rem; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elevated); }
  .cft-admin-table td { display: grid; grid-template-columns: 5.2rem 1fr; gap: .5rem; padding: .25rem 0; border: 0; }
  .cft-admin-table td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
  .cft-admin-table td[colspan] { display: block; }
  .cft-admin-table td[colspan]::before { content: none; }
}

.cft-goal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 2px 10px rgba(21, 36, 28, 0.05);
}

.cft-goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.cft-goal-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* Cada select do objetivo ganha um rótulo em cima — sem isso, "status" e
   "resultado" eram dois menus soltos sem indicação de qual era qual. */
.cft-goal-field {
  display: grid;
  gap: 0.2rem;
}

.cft-goal-field-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cft-goal-meta select {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.cft-goal-meta .cft-check-label {
  font-size: 0.8rem;
  padding-bottom: 0.35rem;
}

.cft-entry-history {
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--bg-elevated);
  margin-bottom: 0.9rem;
  box-shadow: 0 2px 10px rgba(21, 36, 28, 0.05);
}

.cft-entry-history.cft-accent-potencialidade { border-left-color: var(--brand); }
.cft-entry-history.cft-accent-barreira { border-left-color: var(--danger); }
.cft-entry-history.cft-accent-implicacao { border-left-color: var(--cft-yellow-deep); }
.cft-entry-history.cft-accent-adaptacao { border-left-color: var(--cft-blue); }

/* Referência recolhível aos objetivos individualizados, dentro de cada
   box do histórico — ajuda o professor a registrar o histórico já
   pensando em qual objetivo aquilo se relaciona, sem sair da tela. */
.cft-history-goals-ref {
  margin-bottom: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  padding: 0.5rem 0.7rem;
}
.cft-history-goals-ref summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-deep);
  list-style: none;
}
.cft-history-goals-ref summary::-webkit-details-marker { display: none; }
.cft-history-goals-ref summary::before { content: "▸ "; }
.cft-history-goals-ref[open] summary::before { content: "▾ "; }
.cft-history-goals-ref ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.cft-history-goals-ref li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  background: #fff;
  border-radius: 7px;
}

.cft-entry-list {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.cft-entry-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.7rem;
  background: var(--bg-soft);
  border-radius: 9px;
  font-size: 0.85rem;
}

.cft-entry-item strong {
  color: var(--brand-deep);
}

.cft-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cft-entry-meta form {
  margin: 0;
}

.cft-entry-add {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}

.cft-entry-add select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.cft-entry-add textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  resize: vertical;
}

.cft-entry-add button {
  justify-self: start;
}

.cft-entry-acompanhamento {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.cft-entry-add-empty {
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}

/* ---------------------------------------------------------------------- */
/* Acompanhamento do PEI (passo 7) — tabela estilo planilha                */
/* ---------------------------------------------------------------------- */

.cft-tracking-head { display: flex; justify-content: flex-end; margin-bottom: .85rem; }
.cft-tracking-add-btn::before { content: "+ "; }

.cft-tracking-new {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--cft-purple);
  border-radius: 12px;
  background: var(--cft-purple-soft);
}
.cft-tracking-new[hidden] { display: none; }
.cft-tracking-question { margin: 0 0 .6rem; font-weight: 700; }
.cft-tracking-step[hidden] { display: none; }
.cft-tracking-step + .cft-tracking-step { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed rgba(104, 74, 169, .25); }

.cft-tracking-category-choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.cft-tracking-choice {
  padding: .55rem .9rem;
  border-radius: 10px;
  border: 2px solid var(--choice-color, var(--brand));
  background: #fff;
  color: var(--choice-color, var(--brand));
  font-weight: 800;
  font-size: .85rem;
  cursor: pointer;
}
.cft-tracking-choice:hover { background: var(--choice-color, var(--brand)); color: #fff; }
.cft-tracking-choice.is-selected { background: var(--choice-color, var(--brand)); color: #fff; }
.cft-tracking-choice[data-tracking-category="habilidade"] { --choice-color: var(--cft-teal); }
.cft-tracking-choice[data-tracking-category="adaptacao"] { --choice-color: var(--cft-blue); }
.cft-tracking-choice[data-tracking-category="objetivo"] { --choice-color: var(--cft-purple); }

.cft-tracking-new select,
.cft-tracking-new textarea {
  width: 100%;
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
}
.cft-tracking-new textarea { min-height: 6rem; resize: vertical; }
.cft-tracking-actions { display: flex; gap: .6rem; margin-top: .9rem; }
.cft-tracking-actions [hidden] { display: none; }

.cft-tracking-table { display: grid; gap: .5rem; }
.cft-tracking-row {
  display: grid;
  grid-template-columns: 6.5rem 9rem 1fr 2fr auto;
  gap: .7rem;
  align-items: start;
  padding: .6rem .75rem;
  border-radius: 9px;
  border-left: 4px solid var(--row-color, var(--line));
  background: var(--bg-elevated);
  font-size: .85rem;
}
.cft-tracking-row-head {
  border-left-color: transparent;
  background: transparent;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding-bottom: .1rem;
}
.cft-tracking-row.cft-accent-habilidade { --row-color: var(--cft-teal); }
.cft-tracking-row.cft-accent-adaptacao { --row-color: var(--cft-blue); }
.cft-tracking-row.cft-accent-objetivo { --row-color: var(--cft-purple); }
.cft-tracking-row form { margin: 0; }
.cft-tracking-text-preview { display: block; }
.cft-tracking-expand summary { cursor: pointer; color: var(--brand-deep); font-weight: 700; font-size: .78rem; list-style: none; }
.cft-tracking-expand summary::-webkit-details-marker { display: none; }
.cft-tracking-expand summary::before { content: "ver tudo ▸"; }
.cft-tracking-expand[open] summary::before { content: "ver menos ▾"; }
.cft-tracking-expand p { margin: .4rem 0 0; white-space: pre-wrap; }

@media (max-width: 760px) {
  .cft-tracking-row { grid-template-columns: 1fr; gap: .3rem; }
  .cft-tracking-row > span::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
  .cft-tracking-row-head { display: none; }
}

/* Status automático do objetivo individualizado (passo 6) — calculado a
   partir do Acompanhamento, não editável diretamente. */
.cft-goal-status-tag { font-size: .72rem; }

/* Marca "Alcançado" — habilidade/adaptação que não precisa mais de
   acompanhamento (mesmo verde do status "Alcançado" do objetivo). */
.cft-achieved-tag { margin: 0; }
.cft-achieved-reopen { display: inline-flex; margin: 0; }
.cft-achieved-check { display: flex; align-items: center; gap: .4rem; margin-top: .7rem; font-size: .82rem; }
.cft-goal-concluded { margin-top: 1.1rem; }
.cft-goal-concluded summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style: none; }
.cft-goal-concluded summary::-webkit-details-marker { display: none; }
.cft-goal-concluded summary::before { content: "▸ "; }
.cft-goal-concluded[open] summary::before { content: "▾ "; }
.cft-goal-concluded .cft-goal-card { margin-top: .75rem; opacity: .85; }

/* ---------------------------------------------------------------------- */
/* AEE                                                                     */
/* ---------------------------------------------------------------------- */

.cft-group-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.cft-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cft-group-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.2rem 0 0.6rem;
}

.cft-group-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

/* ---------------------------------------------------------------------- */
/* Login / definir senha — tela cheia própria, não usa o shell do app      */
/* (templates/login.html, templates/set_password.html — compartilhadas    */
/* com o sistema antigo, é a única tela que todo mundo vê antes de entrar).*/
/* ---------------------------------------------------------------------- */

body.cft-auth-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 90% 60% at 15% -10%, rgba(255, 201, 77, 0.18), transparent 55%),
    linear-gradient(160deg, var(--cft-chrome-from), var(--cft-chrome-to) 60%, #0b2d1c);
}

/* Navegação contextual: volta evidente e abas da turma com personalidade. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid #bde0cb;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(29, 107, 65, 0.08);
  transition: transform 0.16s var(--cft-ease), background-color 0.16s var(--cft-ease);
}

.back-link:hover {
  background: var(--cft-yellow-soft);
  transform: translateX(-3px);
}

.cft-tabs {
  padding: 0.42rem;
  border: 0;
  border-radius: 16px;
  background: #e3f4e9;
  box-shadow: inset 0 0 0 1px rgba(29, 107, 65, 0.08);
}

.cft-tab {
  border: 0;
  border-radius: 11px;
  color: #31664a;
  font-weight: 800;
  transition: transform 0.17s var(--cft-ease), background-color 0.17s var(--cft-ease), color 0.17s var(--cft-ease), box-shadow 0.17s var(--cft-ease);
}

.cft-tab:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
}

.cft-tab.active {
  border: 0;
  background: linear-gradient(135deg, #6c4fd1, #4b36a5);
  color: #fff;
  box-shadow: 0 5px 12px rgba(75, 54, 165, 0.26);
}

/* Abas internas com uma bolha que desliza entre as opções. As paletas por
   contexto deixam a navegação reconhecível sem perder a identidade visual. */
.cft-tabs {
  --tab-surface: #eee9fb;
  --tab-ink: #5c468f;
  --tab-bubble-a: #7457cf;
  --tab-bubble-b: #5037aa;
  --tab-shadow: rgba(80, 55, 170, .28);
  position: relative;
  isolation: isolate;
  background: var(--tab-surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tab-bubble-a) 15%, transparent);
}

.cft-tabs-turma {
  --tab-surface: #ddf4e8;
  --tab-ink: #276b4b;
  --tab-bubble-a: #2daa72;
  --tab-bubble-b: #18835b;
  --tab-shadow: rgba(24, 131, 91, .28);
}

.cft-tabs-aluno {
  --tab-surface: #fff0ed;
  --tab-ink: #95493f;
  --tab-bubble-a: #ef765f;
  --tab-bubble-b: #d65362;
  --tab-shadow: rgba(214, 83, 98, .27);
}

.cft-tabs-admin {
  --tab-surface: #fff5d9;
  --tab-ink: #7d6220;
  --tab-bubble-a: #e8aa31;
  --tab-bubble-b: #d17b26;
  --tab-shadow: rgba(209, 123, 38, .27);
}

.cft-tabs-data {
  --tab-surface: #e5f3fb;
  --tab-ink: #356a82;
  --tab-bubble-a: #45a9c8;
  --tab-bubble-b: #397fc0;
  --tab-shadow: rgba(57, 127, 192, .27);
}

.cft-tab-bubble {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--tab-bubble-a), var(--tab-bubble-b));
  box-shadow: 0 6px 15px var(--tab-shadow);
  pointer-events: none;
  opacity: 0;
  transition: transform .38s cubic-bezier(.2, .9, .25, 1.18), width .3s ease, height .3s ease, opacity .16s ease;
}

.cft-tab-bubble.no-transition { transition: none; }
.cft-tabs.has-tab-bubble .cft-tab-bubble { opacity: 1; }
.cft-tabs.has-tab-bubble .cft-tab { position: relative; z-index: 1; color: var(--tab-ink); background: transparent; box-shadow: none; }
.cft-tabs.has-tab-bubble .cft-tab:hover { color: var(--tab-ink); background: rgba(255,255,255,.46); }
.cft-tabs.has-tab-bubble .cft-tab.active { color: #fff; background: transparent; box-shadow: none; transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .cft-nav-bubble,
  .cft-tab-bubble { transition: none; }
}

.cft-planning-skills {
  border: 2px solid #d8cfff;
  background: linear-gradient(135deg, #faf8ff, #f0ecff);
}

.cft-selected-catalog,
.cft-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 0.9rem;
}

/* Dentro de um cartão de campo, a lista de selecionados vira um "poço"
   com fundo próprio — reforça que os chips moram dentro do box do campo,
   e não soltos entre o título e o campo de texto livre abaixo. */
.cft-tag-field-wrap > .cft-catalog-actions {
  padding: 0.65rem 0.7rem;
  background: var(--bg-soft);
  border-radius: 10px;
}

/* Item selecionado de um catálogo (barreira, adaptação, habilidade…) —
   mesma família visual do cft-keyword-tag: preenchido e com sombra, bem
   destacado do botão discreto de "+ Importar do banco" ao lado. */
.cft-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.42rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, #7457cf, #5037aa);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 3px 10px rgba(80, 55, 170, 0.22);
}

.cft-selected-chip::before {
  content: "\2713";
  font-weight: 800;
  opacity: 0.85;
}

.cft-selected-chip small {
  margin-right: 0.1rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.cft-chip-remove {
  flex-shrink: 0;
  margin-left: 0.2rem;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  transition: color 0.15s var(--cft-ease), background-color 0.15s var(--cft-ease);
}

.cft-chip-remove:hover {
  color: #fff;
  background: var(--danger);
}

.cft-drive-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  vertical-align: -2px;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cft-drive-icon:hover {
  opacity: 1;
  transform: scale(1.12);
}

.cft-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.tf-pick-create-row {
  margin-bottom: 0.6rem;
}

.tf-pick-back-btn {
  margin-right: auto;
}

/* ---------------------------------------------------------------------- */
/* Planejamentos — lista em acordeão (um aberto por vez, cabeçalho sempre  */
/* visível com período/disciplina/status; o resto vira um box único com   */
/* sub-boxes por assunto, editável só quando expandido).                   */
/* ---------------------------------------------------------------------- */

.cft-planning-entries {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}

.cft-planning-entry {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.15s var(--cft-ease);
}

.cft-planning-entry.is-open {
  box-shadow: 0 14px 32px rgba(29, 107, 65, 0.16);
  border-color: var(--brand);
}

.cft-planning-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.2rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cft-planning-entry-head:hover {
  background: var(--brand-soft);
}

.cft-planning-entry-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cft-planning-entry-summary strong {
  font-size: 1rem;
}

.cft-planning-entry-discipline {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.cft-planning-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}

.cft-accordion-chevron {
  color: var(--muted);
  transition: transform 0.2s var(--cft-ease);
  flex: 0 0 auto;
}

.cft-planning-entry.is-open .cft-accordion-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}

.cft-planning-entry-body {
  padding: 0 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.cft-planning-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 0.7rem;
  padding: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cft-planning-subbox {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.cft-planning-subbox-wide {
  grid-column: 1 / -1;
}

.cft-planning-subbox h4 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.cft-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
}

.cft-planning-subbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.cft-planning-subbox-head h4 {
  margin: 0;
}

.cft-planning-subbox .field + .field {
  margin-top: 0.7rem;
}

@media (max-width: 720px) {
  .cft-planning-box {
    grid-template-columns: 1fr;
  }
}

/* Planejamento: histórico e formulário na coluna principal; conversa da
   equipe acompanha toda a página pela lateral, como um chat de verdade. */
.cft-planning-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}

.cft-planning-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
}

.cft-planning-create-disclosure {
  padding: 0;
  overflow: hidden;
}

.cft-home-start-title {
  margin: 1.5rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--brand-deep);
}

.cft-home-areas {
  margin-top: 0;
}

.cft-home-areas .cft-area-card {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.05rem;
  min-height: 8.6rem;
  padding: 1.25rem 1.35rem;
}

.cft-home-areas .cft-area-icon,
.cft-home-areas .cft-area-card.is-aee .cft-area-icon {
  width: 5.4rem;
  height: 4.6rem;
  margin: 0;
  border-radius: 0;
  background: transparent;
}

.cft-home-areas .cft-area-icon svg {
  width: 5.25rem;
  height: 4.25rem;
  stroke-width: 1.65;
}

.cft-home-areas .cft-area-card.is-aee .cft-area-icon {
  color: var(--cft-red);
}

.cft-home-areas .cft-area-copy {
  min-width: 0;
}

.cft-home-areas .cft-area-copy h2 {
  margin-bottom: 0.4rem;
}

.cft-area-arrow {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--brand-deep);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s var(--cft-ease), background-color 0.2s var(--cft-ease);
}

.cft-area-card.is-aee .cft-area-arrow {
  color: var(--cft-red);
}

.cft-home-areas .cft-area-card:hover .cft-area-arrow {
  transform: translateX(3px);
  background: var(--brand-soft);
}

.cft-home-areas .cft-area-card.is-aee:hover .cft-area-arrow {
  background: var(--cft-red-soft);
}

@media (max-width: 640px) {
  .cft-home-areas .cft-area-card {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    gap: 0.75rem;
    min-height: 7.5rem;
    padding: 1rem;
  }

  .cft-home-areas .cft-area-icon,
  .cft-home-areas .cft-area-card.is-aee .cft-area-icon,
  .cft-home-areas .cft-area-icon svg {
    width: 4rem;
    height: 3.5rem;
  }
}

.cft-planning-create-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  list-style: none;
}

.cft-planning-create-summary::-webkit-details-marker {
  display: none;
}

.cft-planning-create-summary > span:first-child {
  min-width: 0;
}

.cft-planning-create-summary strong,
.cft-planning-create-summary small {
  display: block;
}

.cft-planning-create-summary strong {
  font-size: 1.05rem;
}

.cft-planning-create-summary small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.cft-planning-close-label {
  display: none;
}

.cft-planning-create-disclosure[open] .cft-planning-open-label {
  display: none;
}

.cft-planning-create-disclosure[open] .cft-planning-close-label {
  display: inline-flex;
}

.cft-new-planning {
  padding: 1.15rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.cft-new-planning-title h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.cft-planning-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.cft-planning-zone {
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.cft-planning-zone-wide {
  grid-column: 1 / -1;
}

.cft-planning-zone h4 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  color: var(--brand-deep);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cft-planning-zone select[multiple] {
  min-height: 9rem;
  padding: 0.45rem;
}

.cft-planning-zone select[multiple] option {
  padding: 0.45rem 0.35rem;
  white-space: normal;
}

.cft-inline-activity {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.cft-inline-activity > strong {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--brand-deep);
  font-size: 0.86rem;
}

.cft-planning-create-actions,
.cft-planning-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.cft-planning-details {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.cft-planning-details > summary {
  padding: 0.8rem 1rem;
  color: var(--brand-deep);
  font-weight: 800;
  cursor: pointer;
}

.cft-planning-details[open] {
  padding: 0 0.85rem 0.85rem;
}

.cft-planning-review {
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.cft-planning-review input {
  min-width: 12rem;
  flex: 1;
}

.cft-planning-empty {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: none;
}

.cft-planning-chat {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 2rem);
  min-height: 32rem;
  max-height: 52rem;
  overflow: hidden;
}

.cft-planning-chat .chat-messages {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.cft-planning-chat .chat-form {
  flex: 0 0 auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.cft-planning-chat .chat-form .btn {
  align-self: flex-end;
}

@media (max-width: 980px) {
  .cft-planning-page {
    grid-template-columns: 1fr;
  }

  .cft-planning-chat {
    position: static;
    height: min(34rem, 70vh);
    min-height: 26rem;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .cft-planning-form-grid {
    grid-template-columns: 1fr;
  }

  .cft-planning-zone-wide {
    grid-column: auto;
  }

  .cft-planning-create-summary {
    align-items: flex-start;
  }

  .cft-planning-create-summary .btn {
    flex: 0 0 auto;
  }
}

body.cft-login-body {
  background:
    radial-gradient(circle at 7% 14%, rgba(176, 221, 188, 0.58), transparent 25rem),
    radial-gradient(circle at 94% 85%, rgba(228, 71, 79, 0.14), transparent 27rem),
    #f4f8f1;
}

.cft-auth-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.cft-auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

.cft-auth-blob-a {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(47, 158, 100, 0.55), transparent 70%);
}

.cft-auth-blob-b {
  width: 380px;
  height: 380px;
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, rgba(228, 71, 79, 0.2), transparent 70%);
}

.cft-auth-card {
  position: relative;
  width: min(100%, 400px);
  background: var(--bg-elevated);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 30px 70px rgba(6, 26, 16, 0.45);
  padding: 2.4rem 2.1rem;
  text-align: center;
}

.cft-auth-mark {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  border-radius: 16px;
}

.cft-auth-title {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--brand-deep);
}

.cft-auth-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cft-auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  text-align: left;
}

.cft-auth-form .field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font: inherit;
}

.cft-auth-submit {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.98rem;
  margin-top: 0.35rem;
}

.cft-auth-foot {
  position: relative;
  color: rgba(234, 250, 240, 0.65);
  font-size: 0.78rem;
  margin: 0;
}

.cft-login-body .cft-auth-foot {
  color: var(--muted);
}

.cft-login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.86fr);
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(18, 76, 48, 0.1);
  border-radius: 30px 30px 30px 10px;
  box-shadow: 0 28px 80px rgba(18, 76, 48, 0.18);
}

.cft-login-intro {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem);
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.11), transparent 14rem),
    linear-gradient(145deg, #103f29, #17613d);
}

.cft-login-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 19rem;
  height: 19rem;
  right: -8rem;
  bottom: -9rem;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.cft-login-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 14px;
  height: 14px;
  right: 3rem;
  bottom: 3rem;
  border-radius: 50%;
  background: #e4474f;
  box-shadow: -34px -21px 0 -3px rgba(255, 255, 255, 0.72), -64px 8px 0 -5px #9fd7ad;
  opacity: 0.82;
}

.cft-login-logo-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(100%, 220px);
  padding: 0.7rem 0.9rem;
  background: #fffdf8;
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 12px 28px rgba(5, 29, 17, 0.18);
}

.cft-login-logo {
  display: block;
  width: 100%;
  height: auto;
}

.cft-login-message {
  position: relative;
  z-index: 1;
  max-width: 27rem;
  margin-top: auto;
  padding-top: 3.5rem;
}

.cft-login-school {
  margin: 0 0 1.2rem;
  color: #ff9ba0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cft-login-message h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.5vw, 2.65rem);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.cft-login-message > p:last-child {
  max-width: 24rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
  line-height: 1.65;
}

.cft-login-symbol {
  position: absolute;
  z-index: -1;
  right: -4.5rem;
  bottom: -5.5rem;
  width: 15rem;
  opacity: 0.07;
  filter: grayscale(1) brightness(4);
  transform: rotate(-8deg);
}

.cft-login-form-panel {
  align-self: center;
  width: 100%;
  padding: clamp(2rem, 4vw, 3.25rem);
  background:
    radial-gradient(circle at 100% 100%, rgba(205, 235, 216, 0.42), transparent 13rem),
    #fffdf8;
}

.cft-login-form-head {
  margin-bottom: 2rem;
}

.cft-login-form-head span {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--brand-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cft-login-form-head h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  color: var(--brand-deep);
  font-size: 2rem;
  letter-spacing: -0.025em;
}

.cft-login-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cft-login-form {
  margin-top: 0;
}

.cft-login-forgot-wrap {
  margin: 1.35rem 0 0;
  text-align: center;
}

.cft-login-forgot {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #257949;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.cft-login-forgot:hover {
  color: #1d5f3a;
  background: rgba(37, 121, 73, 0.08);
  text-decoration: underline;
}

.cft-login-flashes {
  margin: -0.75rem 0 1.25rem;
}

@media (max-width: 760px) {
  .cft-login-card {
    grid-template-columns: 1fr;
  }

  .cft-login-intro {
    min-height: 225px;
    padding: 1.6rem 1.75rem;
  }

  .cft-login-intro::before {
    display: none;
  }

  .cft-login-logo-wrap {
    width: min(100%, 185px);
  }

  .cft-login-message {
    margin-top: 1.4rem;
    padding-top: 0;
  }

  .cft-login-message h1 {
    max-width: 18rem;
    margin-bottom: 0;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .cft-login-message > p:last-child {
    display: none;
  }

  .cft-login-symbol {
    right: -3rem;
    bottom: -4rem;
    width: 11rem;
  }

  .cft-login-form-panel {
    padding: 1.7rem 1.75rem 1.9rem;
  }
}

@media (max-width: 430px) {
  .cft-auth-screen {
    justify-content: flex-start;
    padding: 1rem;
  }

  .cft-login-card {
    border-radius: 24px;
  }

  .cft-login-form-head {
    margin-bottom: 1.35rem;
  }

  .cft-login-form-head h2 {
    font-size: 1.7rem;
  }

  .cft-login-body .cft-auth-foot {
    margin-top: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Shell lateral + home editorial (v0.9.1)                                 */
/* ---------------------------------------------------------------------- */

:root {
  --cft-rail-width: 264px;
  --cft-rail-light: #d9f1e2;
  --cft-rail-lighter: #edf8f1;
  --cft-rail-dark: #124c30;
}

body:not(.cft-auth-body) {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.78), transparent 24rem),
    radial-gradient(circle at 18% 90%, rgba(205, 235, 216, 0.72), transparent 30rem),
    #edf7f1;
}

body:not(.cft-auth-body) .tf-shell {
  max-width: none;
  min-height: 100vh;
  margin: 0 0 0 var(--cft-rail-width);
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.25rem, 4vw, 4.5rem) 4rem;
}

body:not(.cft-auth-body) .cft-top {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--cft-rail-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 1.35rem 1rem 1.1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 255, 255, 0.72), transparent 9rem),
    linear-gradient(165deg, var(--cft-rail-lighter), var(--cft-rail-light));
  border: 0;
  border-right: 3px solid var(--cft-red);
  box-shadow: 10px 0 30px rgba(18, 76, 48, 0.11);
}

body:not(.cft-auth-body) .cft-top::after {
  content: "";
  position: absolute;
  right: -4.2rem;
  bottom: -4rem;
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(18, 76, 48, 0.14);
  border-radius: 46% 54% 66% 34%;
  transform: rotate(22deg);
  pointer-events: none;
}

body:not(.cft-auth-body) .cft-brand {
  position: relative;
  z-index: 1;
  width: 100%;
  gap: 0.7rem;
  padding: 0.25rem 0.35rem 1.2rem;
  border-bottom: 1px solid rgba(18, 76, 48, 0.13);
}

body:not(.cft-auth-body) .cft-brand-symbol {
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(18, 76, 48, 0.09);
  box-shadow: 0 5px 14px rgba(18, 76, 48, 0.11);
}

body:not(.cft-auth-body) .cft-brand-text strong {
  color: var(--cft-rail-dark);
  font-size: 1.08rem;
}

body:not(.cft-auth-body) .cft-brand-text > span {
  display: block;
  margin-top: 0.16rem;
  color: #527962;
  font-size: 0.66rem;
}

body:not(.cft-auth-body) .badge-version {
  color: #fff;
  background: var(--cft-red);
  box-shadow: none;
}

body:not(.cft-auth-body) .cft-nav-desktop {
  flex: 1;
  width: 100%;
  margin-top: 1.3rem;
}

body:not(.cft-auth-body) .cft-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.42rem;
  flex-wrap: nowrap;
}

body:not(.cft-auth-body) .cft-nav > a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.72rem 0.85rem;
  color: #38664d;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 700;
}

body:not(.cft-auth-body) .cft-nav > a svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:not(.cft-auth-body) .cft-nav > a:hover {
  color: var(--cft-rail-dark);
  background: rgba(255, 255, 255, 0.5);
}

body:not(.cft-auth-body) .cft-nav-bubble {
  border: 0;
  border-radius: 14px;
  background: var(--cft-rail-dark);
  box-shadow: 0 8px 18px rgba(18, 76, 48, 0.2);
}

body:not(.cft-auth-body) .cft-nav.has-nav-bubble > a.active,
body:not(.cft-auth-body) .cft-nav.has-nav-bubble > a[data-nav-bubble]:hover {
  color: #fff;
}

body:not(.cft-auth-body) .cft-account {
  width: 100%;
  margin: auto 0 0;
  padding: 1rem 0.2rem 0;
  border-top: 1px solid rgba(18, 76, 48, 0.13);
  display: grid;
  gap: 0.45rem;
}

body:not(.cft-auth-body) .cft-top .user-chip {
  width: 100%;
  max-width: none;
  justify-content: flex-start;
  padding: 0.58rem 0.65rem;
  color: var(--cft-rail-dark);
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(18, 76, 48, 0.13);
}

body:not(.cft-auth-body) .cft-top .cft-account > a {
  padding: 0.45rem 0.65rem;
  color: #5e806c;
  font-size: 0.72rem;
}

body:not(.cft-auth-body) .cft-top .cft-account > a:hover {
  color: var(--cft-red);
  background: transparent;
}

.cft-home {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.cft-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(150px, 0.45fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  min-height: 7.5rem;
  padding: clamp(0.85rem, 1.5vw, 1.2rem) clamp(1.1rem, 2vw, 1.6rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.11), transparent 15rem),
    linear-gradient(135deg, #0d4129, #16643d);
  border-radius: 30px 30px 30px 10px;
  box-shadow: 0 18px 44px rgba(18, 76, 48, 0.18);
}

.cft-home-hero::before {
  content: "";
  position: absolute;
  left: -3rem;
  bottom: -4.5rem;
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.cft-home-hero-copy {
  position: relative;
  z-index: 1;
}

.cft-home-kicker,
.cft-home-section-heading > span,
.cft-home-closing span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--cft-red);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cft-home-hero .cft-home-kicker {
  margin-bottom: 0.3rem;
  font-size: 0.58rem;
}

.cft-home-hero h1 {
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.cft-home-lead {
  margin: 0.4rem 0 0 !important;
  color: #ffd9d9 !important;
  font-family: var(--display);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem) !important;
}

.cft-home-hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.cft-home-hero-art > svg {
  width: min(100%, 6rem);
  fill: none;
  stroke: #d8efe1;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cft-home-hero-art svg .accent {
  fill: var(--cft-red);
  stroke: var(--cft-red);
}

.cft-home-orbit {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.cft-home-orbit.orbit-one { inset: 7%; }
.cft-home-orbit.orbit-two { inset: 20%; transform: rotate(20deg); }
.cft-home-dot { position: absolute; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--cft-red); }
.cft-home-dot.dot-one { top: 12%; right: 16%; }
.cft-home-dot.dot-two { bottom: 18%; left: 9%; background: #aad6b9; }

.cft-home-intro-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cft-home-intro-copy p {
  margin: 0;
  padding: 1.15rem 1.25rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 76, 48, 0.09);
  border-radius: 18px 18px 18px 6px;
  font-size: 0.84rem;
  line-height: 1.65;
}

.cft-home-access,
.cft-home-method {
  margin-top: clamp(2.75rem, 6vw, 5.5rem);
}

.cft-home-section-heading h2 {
  max-width: 38rem;
  margin: 0;
  color: var(--brand-deep);
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.cft-home-section-heading > p {
  max-width: 42rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.cft-home-section-heading.is-centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.cft-home-section-heading.is-centered > p {
  max-width: 46rem;
}

.cft-home-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.35rem;
}

.cft-home-area-card {
  position: relative;
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 10.5rem;
  padding: 1.35rem 1.25rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(18, 76, 48, 0.14);
  border-radius: 22px 22px 22px 8px;
  box-shadow: 0 10px 28px rgba(18, 76, 48, 0.08);
  transition: transform 0.22s var(--cft-ease), box-shadow 0.22s var(--cft-ease), border-color 0.22s ease;
}

.cft-home-area-card:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 76, 48, 0.34);
  box-shadow: 0 18px 36px rgba(18, 76, 48, 0.14);
}

.cft-home-area-number {
  position: absolute;
  top: 0.72rem;
  right: 0.85rem;
  color: rgba(18, 76, 48, 0.18);
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
}

.cft-home-area-icon {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  color: var(--cft-rail-dark);
  background: var(--brand-soft);
  border-radius: 18px 18px 18px 6px;
}

.cft-home-area-card.is-aee .cft-home-area-icon {
  color: #b72f39;
  background: var(--cft-red-soft);
}

.cft-home-area-icon svg {
  width: 2.85rem;
  height: 2.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cft-home-area-copy h3 {
  margin: 0 0 0.42rem;
  color: var(--brand-deep);
  font-family: var(--display);
  font-size: 1.35rem;
}

.cft-home-area-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.cft-home-area-arrow {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--cft-rail-dark);
  border: 1px solid currentColor;
  border-radius: 50%;
}

.cft-home-area-card.is-aee .cft-home-area-arrow { color: var(--cft-red); }
.cft-home-area-arrow svg { width: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cft-home-area-card:hover .cft-home-area-arrow { transform: translateX(2px); }

.cft-home-method {
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(18, 76, 48, 0.09);
  border-radius: 30px 10px 30px 30px;
}

.cft-home-method-figure {
  width: min(100%, 1040px);
  margin: 1.75rem auto 0;
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(18, 76, 48, 0.1);
}

.cft-home-method-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.cft-home-explanation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cft-home-explanation article {
  padding: 1.55rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 76, 48, 0.1);
  border-radius: 20px 20px 20px 7px;
}

.cft-home-note-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  color: #fff;
  background: var(--brand-deep);
  border-radius: 50%;
}

.cft-home-note-icon.is-red { background: var(--cft-red); }
.cft-home-explanation h2 { margin: 0 0 0.55rem; color: var(--brand-deep); font-family: var(--display); font-size: 1.15rem; }
.cft-home-explanation p { margin: 0; color: var(--muted); font-size: 0.83rem; line-height: 1.65; }

.cft-home-closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.5rem 1.7rem;
  color: #fff;
  background: var(--cft-rail-dark);
  border-radius: 8px 22px 22px 22px;
}

.cft-home-closing span { margin-bottom: 0.35rem; }
.cft-home-closing strong { display: block; font-family: var(--display); font-size: 1.25rem; }
.cft-home-closing p { margin: 0; color: rgba(239, 251, 244, 0.74); font-size: 0.8rem; line-height: 1.55; }

@media (max-width: 1040px) {
  :root { --cft-rail-width: 232px; }
  .cft-home-areas { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  body:not(.cft-auth-body) .tf-shell {
    margin-left: 0;
    padding: 5.6rem 1rem 3rem;
  }

  body:not(.cft-auth-body) .cft-top {
    inset: 0 0 auto 0;
    width: 100%;
    height: auto;
    min-height: 4.55rem;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem 0.85rem;
    background: rgba(222, 243, 230, 0.96);
    border-right: 0;
    border-bottom: 2px solid var(--cft-red);
    backdrop-filter: blur(14px);
  }

  body:not(.cft-auth-body) .cft-top::after { display: none; }
  body:not(.cft-auth-body) .cft-hamburger { display: flex; background: var(--cft-rail-dark); }
  body:not(.cft-auth-body) .cft-brand { width: auto; padding: 0; border: 0; }
  body:not(.cft-auth-body) .cft-brand-symbol { width: 2.3rem; height: 2.3rem; }
  body:not(.cft-auth-body) .cft-nav-desktop { display: none; }
  body:not(.cft-auth-body) .cft-sidebar {
    background:
      radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.72), transparent 10rem),
      linear-gradient(165deg, var(--cft-rail-lighter), var(--cft-rail-light));
    border-right: 2px solid var(--cft-red);
    box-shadow: 12px 0 30px rgba(18, 76, 48, 0.2);
  }
  body:not(.cft-auth-body) .cft-sidebar-head { border-color: rgba(18, 76, 48, 0.13); }
  body:not(.cft-auth-body) .cft-sidebar-head strong { color: var(--cft-rail-dark); }
  body:not(.cft-auth-body) .cft-sidebar-close { color: var(--cft-rail-dark); background: rgba(255, 255, 255, 0.55); }
  body:not(.cft-auth-body) .cft-sidebar-nav > a,
  body:not(.cft-auth-body) .cft-sidebar-toggle { color: #38664d; }
  body:not(.cft-auth-body) .cft-sidebar-nav > a { justify-content: flex-start; }
  body:not(.cft-auth-body) .cft-sidebar-nav svg {
    width: 1.12rem;
    height: 1.12rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body:not(.cft-auth-body) .cft-sidebar-label { flex: 1; }
  body:not(.cft-auth-body) .cft-sidebar-nav > a:hover,
  body:not(.cft-auth-body) .cft-sidebar-toggle:hover { color: var(--cft-rail-dark); background: rgba(255, 255, 255, 0.52); }
  body:not(.cft-auth-body) .cft-sidebar-nav > a.active,
  body:not(.cft-auth-body) .cft-sidebar-group.is-active > .cft-sidebar-toggle { color: #fff; background: var(--cft-rail-dark); box-shadow: 0 8px 18px rgba(18, 76, 48, 0.18); }
  body:not(.cft-auth-body) .cft-sidebar-sub a { color: #527962; }
  body:not(.cft-auth-body) .cft-sidebar-sub a:hover { color: var(--cft-rail-dark); background: rgba(255, 255, 255, 0.52); }
  body:not(.cft-auth-body) .cft-sidebar-foot { border-color: rgba(18, 76, 48, 0.13); }
  body:not(.cft-auth-body) .cft-sidebar-foot .user-chip,
  body:not(.cft-auth-body) .cft-sidebar-foot a { color: #527962; }
  .cft-home-hero { grid-template-columns: 1fr minmax(180px, 0.45fr); }
}

@media (max-width: 680px) {
  .cft-home-hero { grid-template-columns: 1fr; min-height: 0; padding: 1rem 1.15rem; border-radius: 24px 24px 24px 8px; }
  .cft-home-hero-art { display: none; }
  .cft-home-hero h1 { font-size: 1.7rem; }
  .cft-home-intro-copy { grid-template-columns: 1fr; }
  .cft-home-area-card { grid-template-columns: 3.6rem minmax(0, 1fr); min-height: 0; padding: 1.15rem; }
  .cft-home-area-icon { width: 3.45rem; height: 3.45rem; border-radius: 14px 14px 14px 5px; }
  .cft-home-area-icon svg { width: 2.35rem; }
  .cft-home-area-arrow { display: none; }
  .cft-home-explanation,
  .cft-home-closing { grid-template-columns: 1fr; }
  .cft-home-method { padding: 1rem; border-radius: 22px 8px 22px 22px; }
  .cft-home-method-figure { margin-top: 1.15rem; border-radius: 14px; }
}

/* ---------------------------------------------------------------------- */
/* Impressão — documentos por função (PDF §11). styles.css já esconde      */
/* .tf-top no print; aqui só soma as classes novas do shell.               */
/* ---------------------------------------------------------------------- */

@media print {
  body:not(.cft-auth-body) .tf-shell {
    margin: 0;
    padding: 0;
  }

  .cft-top,
  .cft-sidebar,
  .cft-sidebar-backdrop,
  .no-print {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------- */
/* AEE — grupo/atendimento individual/Oficina do Saber (reqs2 §AEE)        */
/* ---------------------------------------------------------------------- */

.aee-breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.aee-breadcrumb a {
  color: var(--muted);
}

.aee-breadcrumb a:hover {
  color: var(--brand-deep);
}

.aee-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.aee-page-head .page-title,
.aee-page-head .page-sub {
  margin: 0;
}

.aee-page-head .page-sub {
  margin-top: 0.3rem;
}

/* Cards de estatística do grupo (alunos, frequência, duração, atendimentos) */
.aee-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
  .aee-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aee-stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
}

.aee-stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.aee-stat-card strong {
  font-size: 1.02rem;
  color: var(--brand-deep);
}

.aee-stat-card-action {
  position: relative;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s var(--cft-ease), border-color 0.18s var(--cft-ease), box-shadow 0.18s var(--cft-ease);
}

.aee-stat-card-action:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(31, 107, 65, 0.16);
}

.aee-stat-add {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  margin-left: auto;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

/* Duas colunas (características/objetivos, frequência/atalhos) */
.aee-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.aee-two-col-freq {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}

.aee-priority-area {
  margin-top: 0;
}

.aee-middle-sections,
.aee-danger-zone,
.aee-members-box {
  margin-top: 1.25rem;
}

.aee-middle-sections {
  align-items: start;
}

.aee-disclosure,
.aee-new-entry {
  padding: 0;
  overflow: hidden;
}

.aee-disclosure > summary,
.aee-new-entry > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.aee-disclosure > summary::-webkit-details-marker,
.aee-new-entry > summary::-webkit-details-marker {
  display: none;
}

.aee-disclosure > summary > span:first-child,
.aee-new-entry > summary > span:nth-child(2),
.aee-collapse-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.18rem;
  text-align: left;
}

.aee-disclosure summary strong,
.aee-new-entry summary strong,
.aee-collapse-copy strong {
  color: var(--brand-deep);
  font-size: 1rem;
}

.aee-disclosure summary small,
.aee-new-entry summary small,
.aee-collapse-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.aee-disclosure-icon {
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-right: 2px solid var(--brand-deep);
  border-bottom: 2px solid var(--brand-deep);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.aee-disclosure[open] > summary .aee-disclosure-icon,
.aee-new-entry[open] > summary .aee-disclosure-icon,
.aee-collapsible-toggle[aria-expanded="true"] .aee-disclosure-icon {
  transform: rotate(225deg);
}

.aee-disclosure-body,
.aee-new-entry-form,
.aee-collapsible-content {
  border-top: 1px solid var(--line);
  padding: 1rem 1.15rem 1.15rem;
}

.aee-disclosure-body > :first-child {
  margin-top: 0;
}

.aee-new-entry-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 1.4rem;
}

.aee-new-entry[open] .aee-new-entry-icon {
  background: var(--brand-deep);
}

.aee-draft-actions {
  align-items: center;
  justify-content: space-between;
}

.aee-draft-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.aee-draft-status[data-state="saving"] {
  color: #9a6a10;
}

.aee-draft-status[data-state="error"] {
  color: var(--danger);
}

.aee-history-head,
.aee-month-picker,
.aee-collapsible-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.aee-history-head,
.aee-collapsible-head {
  justify-content: space-between;
}

.aee-month-picker select {
  min-width: 12rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.aee-show-all {
  align-self: center;
  margin-top: 0.15rem;
  cursor: pointer;
}

.aee-history-expand-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.aee-timeline [data-history-extra] {
  display: none;
}

.aee-history-expand-toggle:checked ~ [data-history-extra] {
  display: flex;
}

.aee-history-expand-toggle:checked ~ .aee-show-all {
  display: none;
}

.aee-history-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.aee-history-footer label {
  display: flex;
  min-width: min(100%, 18rem);
  flex-direction: column;
  gap: 0.35rem;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.aee-history-footer select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.aee-danger-zone {
  border: 1px solid #d96868;
  background: #fff8f8;
  box-shadow: none;
}

.aee-danger-zone .panel-head h3 {
  color: #a82f2f;
}

.aee-collapsible-head {
  padding: 0.85rem 1rem;
}

.aee-collapsible-toggle {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.aee-members-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.aee-members-table th,
.aee-members-table td {
  padding: 0.48rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.3;
  vertical-align: middle;
}

.aee-members-table th {
  font-size: 0.72rem;
}

.aee-member-notes-text {
  white-space: pre-wrap;
}

.aee-compact-action {
  display: inline-flex;
  margin-left: 0.3rem;
  padding: 0.15rem 0.35rem;
  border: 0;
  background: transparent;
  color: var(--brand-deep);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.aee-compact-action:hover {
  text-decoration: underline;
}

.aee-compact-action-danger {
  color: var(--danger);
}

@media (max-width: 860px) {
  .aee-two-col,
  .aee-two-col-freq {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .aee-collapsible-head,
  .aee-history-head,
  .aee-draft-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .aee-collapsible-toggle {
    width: 100%;
  }

  .aee-collapsible-head > .btn,
  .aee-month-picker,
  .aee-month-picker select,
  .aee-draft-actions .btn {
    width: 100%;
  }

  .aee-month-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .aee-history-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.aee-nav-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.aee-nav-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s var(--cft-ease), box-shadow 0.18s var(--cft-ease), border-color 0.18s var(--cft-ease);
}

.aee-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(31, 107, 65, 0.18);
  border-color: var(--brand);
}

/* Objetivos — lista com "x" de remover */
.aee-objective-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aee-objective-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-soft);
  border-radius: 8px;
}

.aee-objective-list li span {
  font-size: 0.9rem;
}

.aee-objective-remove,
.aee-chip-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
  flex-shrink: 0;
}

.aee-objective-remove:hover,
.aee-chip-remove:hover {
  color: var(--danger);
}

/* Picker de aluno (modal) — busca + filtro por segmento */
.aee-picker-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.aee-picker-toolbar .tf-pick-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.aee-segment-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.aee-segment-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.aee-segment-tab:hover {
  border-color: var(--brand);
}

.aee-segment-tab.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}

.aee-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

.aee-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.aee-picker-row strong {
  display: block;
  font-size: 0.9rem;
}

/* Grade de frequência */
.aee-att-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.aee-att-toolbar select {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.aee-attendance-table th,
.aee-attendance-table td {
  text-align: center;
}

.aee-attendance-table th:first-child,
.aee-attendance-table td:first-child {
  text-align: left;
}

.aee-att-cell {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: 0.15s ease;
}

.aee-att-cell:hover:not(:disabled) {
  border-color: var(--brand);
}

.aee-att-cell:disabled {
  cursor: default;
  opacity: 0.6;
}

.aee-att-cell.is-present {
  background: var(--brand);
  border-color: var(--brand);
}

.aee-att-cell.is-absent {
  background: var(--danger);
  border-color: var(--danger);
}

/* Linha do tempo — planejamento e registro dos encontros */
.aee-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aee-timeline-item {
  display: flex;
  gap: 1rem;
}

.aee-date-badge {
  flex-shrink: 0;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.aee-date-day {
  font-size: 1.15rem;
  font-weight: 800;
}

.aee-date-mon {
  font-size: 0.68rem;
}

.aee-timeline-body {
  flex: 1;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aee-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.aee-timeline-body p {
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.aee-inline-edit {
  margin-top: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.aee-activity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.aee-activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

.aee-activity-chip a {
  color: var(--brand-deep);
}

.aee-registro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem 1rem;
}

.aee-field-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.3rem;
}

.aee-field-label-inline {
  color: var(--brand-deep);
  font-size: 0.82rem;
}

.aee-registro-grid p {
  margin: 0.1rem 0 0;
  white-space: pre-wrap;
}

/* Parte 3 §1 — preservar quebra de parágrafo no que foi digitado, nos
   demais textos salvos do AEE/Oficina do Saber (características, registros
   do formato anterior, comentários, versão de impressão). */
.aee-comment p,
.ficha-preview p,
[data-description-display] {
  white-space: pre-wrap;
}

/* Textareas maiores do Planejamento/Registro — "o campo atual é pequeno,
   ao digitar o texto sobe e fica difícil de ler/escrever" (reqs2 parte 2) */
.aee-textarea-lg {
  min-height: 9rem;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

/* Relato mensal da Oficina do Saber — uma linha por aluno (reqs2 parte 2) */
.aee-monthly-reports {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aee-monthly-report-row {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: 10px;
}

.aee-monthly-report-row label {
  font-weight: 600;
  font-size: 0.88rem;
  padding-top: 0.5rem;
}

.aee-monthly-report-row textarea {
  min-height: 4rem;
}

.paee-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.paee-section-card .panel-head h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.paee-objective-tracking {
  display: grid;
  gap: 0.75rem;
}

.paee-objective-track {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.paee-objective-track-head,
.paee-objective-track-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.paee-objective-track-head strong {
  color: var(--brand-deep);
}

.paee-objective-track-head select {
  width: auto;
  min-width: 10rem;
}

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

@media (max-width: 620px) {
  .paee-objective-track-head,
  .paee-objective-track-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .paee-objective-track-head select {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .aee-monthly-report-row {
    grid-template-columns: 1fr;
  }
}

/* Fotos do encontro — miniatura maior, com baixar/ampliar (reqs2 parte 2) */
.aee-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.aee-photo-thumb {
  position: relative;
  width: 8rem;
  height: 8rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.aee-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.aee-photo-thumb-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 0.25rem;
}

.aee-photo-download,
.aee-photo-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 36, 28, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  line-height: 1;
}

.aee-photo-download:hover {
  background: var(--brand);
  color: #fff;
}

.aee-photo-remove:hover {
  background: var(--danger);
  color: #fff;
}

.aee-dropzone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.15s ease;
}

.aee-dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

/* Comentários da coordenação/direção */
.aee-comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.aee-comment {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}

.aee-comment strong {
  font-size: 0.86rem;
  margin-right: 0.4rem;
}

.aee-comment p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
}

@media print {
  .aee-photo-grid {
    break-inside: avoid;
  }
}

/* Eixos da escola (Administração) */
.cft-axis-add { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cft-axis-add-btn {
  display: inline-flex; align-items: center; gap: .4rem; width: 100%;
  padding: .75rem .9rem; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--brand-deep); background: var(--bg-elevated);
  transition: background-color .15s ease;
}
.cft-axis-add-btn::-webkit-details-marker { display: none; }
.cft-axis-add-btn:hover { background: var(--brand-soft); }
.cft-axis-add-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .95rem; line-height: 1;
}
.cft-axis-add[open] > .cft-axis-add-btn { border-bottom: 1px solid var(--line); background: var(--brand-soft); }
.cft-axis-add-form { padding: 1rem; margin: 0; }

.cft-axis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .85rem; }
.cft-axis-card {
  padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--brand-soft);
  background: linear-gradient(160deg, var(--brand-soft) 0%, #fff 78%);
  box-shadow: var(--shadow);
}
.cft-axis-card-form { display: flex; flex-direction: column; gap: .75rem; }
.cft-axis-card-fields { display: flex; flex-wrap: wrap; gap: .65rem; }
.cft-axis-card-fields .field { flex: 1 1 10rem; margin: 0; }
.cft-axis-card-year { flex: 0 0 7rem; }
.cft-axis-card-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.cft-icon-btn { display: inline-flex; align-items: center; gap: .35rem; }
.cft-icon-btn svg { flex-shrink: 0; }
.cft-icon-btn-danger { color: var(--danger); border-color: var(--danger); }
.cft-icon-btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: var(--danger); color: var(--danger); }
@media (max-width: 520px) {
  .cft-axis-card-actions { justify-content: stretch; }
  .cft-axis-card-actions .btn { flex: 1; justify-content: center; }
}
.cft-activity-bank-list > section {
  margin: 1.5rem 0 2rem;
}
.cft-activity-bank-list > section > h2 {
  font-size: 1.2rem;
  margin-bottom: .8rem;
}
.cft-activity-bank-list > section > .cft-activity-bank-card {
  margin-bottom: .8rem;
}

.cft-autosave-status.is-saving {
  color: var(--brand-deep, var(--brand));
  font-weight: 600;
}

.cft-autosave-status.is-saved {
  color: var(--brand-deep, var(--brand));
}

.cft-autosave-status.is-error {
  color: var(--danger, #b42318);
  font-weight: 600;
}
