/* ============================================================
   PLANEJAMENTO DE ESTUDO — estilos das páginas /planejamento/
   Carregado só pela base do planejamento. Tudo que poderia colidir
   com o SO360 (variáveis, botões do chrome, foco) fica sob .pl-app;
   menu, rodapé e mensagens são os do SO360.
   ============================================================ */

.pl-app {
  /* Clareza Acadêmica */
  --cd-primary: #667eea;
  --cd-primary-hover: #545fcb;
  --cd-primary-soft: #f0f1ff;
  --cd-secondary: #764ba2;
  --cd-canvas: #f6f7fb;
  --cd-green: #10b981;
  --cd-orange: #f59e0b;
  --cd-red: #ef4444;
  --cd-gray: #6b7280;
  --cd-light: #f9fafb;
  --cd-border: #e5e7eb;
  --cd-border-strong: #d8dce5;
  --cd-radius-sm: 9px;
  --cd-radius: 14px;
  --cd-radius-lg: 20px;

  /* Auxiliares */
  --cd-title: #1f2937;
  --cd-text: #374151;
  --cd-soft: #9ca3af;
  --cd-hover: #f3f4f6;
  --cd-hover-purple: #f0f1ff;
  --cd-green-2: #34d399;

  color: var(--cd-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.pl-modal-open { overflow: hidden; }

/* O Bootstrap zera o outline de .btn e .form-control no foco; o !important
   garante o foco visível em todos os controles do planejamento. */
.pl-app :focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.55) !important;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pl-app *, .pl-app *::before, .pl-app *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.pl-app code, .pl-app .font-mono, .pl-app .cd-mono { font-family: 'Fira Code', monospace; }

/* ------------------------------------------------------------
   CABEÇALHO DA PÁGINA
   Superfície clara: identificação (ícone + título + subtítulo) à
   esquerda e chips ou ações à direita; no celular empilham.
   ------------------------------------------------------------ */
.cd-hero {
  background: #fff;
  color: var(--cd-title);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-lg);
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
}
.cd-hero h1 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--cd-title);
  margin: 0;
  overflow-wrap: anywhere;
}
.cd-hero .cd-hero-sub { color: var(--cd-gray); font-size: 0.9rem; line-height: 1.5; margin-top: 0.3rem; }
.cd-hero .cd-hero-sub strong { color: var(--cd-text); }
.cd-hero a:not([class]) { color: var(--cd-primary-hover); font-weight: 600; }
.pl-app h1.h3, .pl-app .cd-card h2.h4, .pl-app .cd-card h2.h5 {
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--cd-title);
}
.cd-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--cd-radius);
  background: var(--cd-primary-soft);
  color: var(--cd-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.cd-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  background: var(--cd-primary-soft);
  border: 1px solid #dfe3ff;
  color: var(--cd-primary-hover);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: 100%;
}
.cd-hero-pill .cd-mono { font-size: 0.8rem; }
/* Nome de plano longo (ex.: "BACEN (Analista - Área 1 - …)"): quebra em várias
   linhas em vez de vazar do cartão no celular. Com mais de uma linha, a pílula
   vira um retângulo de cantos arredondados. */
.cd-hero-pill--wrap { white-space: normal; align-items: flex-start; border-radius: 14px; line-height: 1.35; }
.cd-hero-pill--wrap > i { flex-shrink: 0; margin-top: 0.2em; }
.cd-hero-pill--wrap > span { min-width: 0; overflow-wrap: anywhere; }
.cd-hero .cd-progress { background: var(--cd-border); }

/* ------------------------------------------------------------
   BOTÕES
   Primário sólido, secundário branco com borda; sem gradiente nem
   deslocamento no hover. cd-btn-white e cd-btn-ghost eram os botões
   claros do hero em gradiente: hoje equivalem a primário e secundário.
   ------------------------------------------------------------ */
.cd-btn-primary,
.cd-btn-white,
.cd-btn-soft,
.cd-btn-ghost,
.cd-btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--cd-radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cd-btn-primary,
.cd-btn-white { background: var(--cd-primary); border-color: var(--cd-primary); color: #fff; }
.cd-btn-primary:hover,
.cd-btn-white:hover { background: var(--cd-primary-hover); border-color: var(--cd-primary-hover); color: #fff; }
.cd-btn-soft,
.cd-btn-ghost { background: #fff; border-color: var(--cd-border-strong); color: var(--cd-text); }
.cd-btn-soft:hover,
.cd-btn-ghost:hover { background: #fafafa; border-color: #bfc5d1; color: var(--cd-primary-hover); }
.cd-btn-success { background: var(--cd-green); border-color: var(--cd-green); color: #fff; }
.cd-btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.cd-btn-primary:disabled, .cd-btn-white:disabled, .cd-btn-soft:disabled,
.cd-btn-ghost:disabled, .cd-btn-success:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Botões do Bootstrap usados no planejamento (excluir, confirmar). */
.pl-app .btn { border-radius: var(--cd-radius-sm); font-weight: 650; }
.pl-app .btn:not(.btn-sm):not(.btn-link) { min-height: 44px; }

/* Abas / pílulas de filtro */
.cd-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  font-weight: 650;
  font-size: 0.84rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--cd-radius-sm);
  border: 1px solid var(--cd-border-strong);
  background: #fff;
  color: var(--cd-gray);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.cd-filter-tab:hover { border-color: #bfc5d1; color: var(--cd-primary-hover); }
.cd-filter-tab.active {
  background: var(--cd-primary);
  border-color: var(--cd-primary);
  color: #fff;
}
.cd-filter-tab .tab-count {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  background: var(--cd-hover);
  color: var(--cd-gray);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}
.cd-filter-tab.active .tab-count { background: rgba(255, 255, 255, 0.25); color: #fff; }

/* ------------------------------------------------------------
   CARDS
   ------------------------------------------------------------ */
.cd-card {
  background: #fff;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  padding: 1.2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cd-card.cd-card-hover:hover {
  border-color: #c7cdfa;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
}
.cd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cd-section-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--cd-gray);
  text-transform: uppercase;
}
.cd-card h2, .cd-card h3 { color: var(--cd-title); }
/* Âncora das disciplinas: não esconder o título sob o menu fixo do SO360. */
.pl-app [id^="disciplina-"] { scroll-margin-top: 88px; }

.cd-onboarding {
  background: var(--cd-primary-soft);
  border: 1px solid #dfe3ff;
  border-radius: var(--cd-radius);
  padding: 1.25rem;
}
.cd-onboarding h2 { color: var(--cd-title); }
.cd-onboarding-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.cd-onboarding-steps li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .8rem;
  border: 1px solid var(--cd-border);
  border-radius: 12px;
  background: #fff;
}
.cd-onboarding-steps li.done { background: #ecfdf5; border-color: #a7f3d0; }
.cd-onboarding-steps a { color: var(--cd-title); text-decoration: none; }
.cd-onboarding-steps a:hover { color: var(--cd-primary); text-decoration: underline; }
.cd-onboarding-steps .step-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cd-hover-purple);
  color: var(--cd-primary);
  font-weight: 800;
  font-size: .75rem;
}
.cd-onboarding-steps li.done .step-icon { background: var(--cd-green); color: #fff; }

/* Barras de progresso */
.cd-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--cd-border);
  overflow: hidden;
}
.cd-progress > .bar {
  height: 100%;
  border-radius: 4px;
  background: var(--cd-primary);
  transition: width 0.4s ease;
}
.cd-progress > .bar.bar-indigo { background: var(--cd-primary); }
.cd-progress > .bar.bar-green { background: var(--cd-green); }
.cd-progress > .bar.bar-red { background: var(--cd-red); }

/* Badges de tipo (REVISÃO / ESTUDO) */
.cd-type-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
}
.cd-type-badge.rev { background: #fdeef0; color: #b03a52; }
.cd-type-badge.est { background: var(--cd-hover-purple); color: var(--cd-primary); }
.cd-interval-chip {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  color: var(--cd-gray);
  background: var(--cd-hover);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

/* Lista de tópicos */
.cd-topic-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.3rem;
  border-top: 1px solid var(--cd-hover);
  cursor: pointer;
  transition: background 0.15s;
}
.cd-topic-row:hover { background: var(--cd-hover-purple); }
.cd-topic-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid #d1d5db;
  background: #fff;
}
.cd-topic-row.done .cd-topic-check { border-color: var(--cd-green); background: var(--cd-green); }
.cd-topic-title { font-size: 0.86rem; color: var(--cd-title); }
.cd-topic-row.done .cd-topic-title { color: var(--cd-soft); text-decoration: line-through; }

/* Hierarquia: subtópicos indentados por nível */
.cd-topic-row.lvl-1 { padding-left: 1.8rem; }
.cd-topic-row.lvl-2 { padding-left: 3rem; }
.cd-topic-row.lvl-3 { padding-left: 4.2rem; }
.cd-topic-row.lvl-1 .cd-topic-title,
.cd-topic-row.lvl-2 .cd-topic-title,
.cd-topic-row.lvl-3 .cd-topic-title { font-size: 0.8rem; color: var(--cd-gray); }
.cd-topic-row.lvl-1 .cd-topic-check,
.cd-topic-row.lvl-2 .cd-topic-check,
.cd-topic-row.lvl-3 .cd-topic-check { width: 16px; height: 16px; font-size: 0.6rem; }
/* Tópico-pai (com subtópicos) = cabeçalho não marcável */
.cd-topic-row.cd-topic-header { cursor: default; }
.cd-topic-row.cd-topic-header:hover { background: transparent; }
.cd-topic-row.cd-topic-header .cd-topic-title {
  font-weight: 700;
  color: var(--cd-title);
  font-size: 0.84rem;
}

/* Tile de estatística */
.cd-stat-tile .tile-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cd-gray);
  text-transform: uppercase;
}
.cd-stat-tile .tile-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--cd-title);
  margin-top: 0.3rem;
  line-height: 1.1;
}
.cd-stat-tile .tile-sub { font-size: 0.75rem; color: var(--cd-soft); margin-top: 0.15rem; }

/* Gráfico de barras semanal */
.cd-week-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
  margin-top: 1rem;
}
.cd-week-chart .col-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  text-align: center;
  gap: 6px;
}
.cd-week-chart .bar {
  width: 100%;
  border-radius: 6px 6px 3px 3px;
  background: var(--cd-primary);
  min-height: 4px;
}
.cd-week-chart .bar.today { background: var(--cd-orange); }
.cd-week-chart .bar.empty { background: var(--cd-border); }
.cd-week-chart .lbl { font-size: 0.68rem; color: var(--cd-soft); }

/* Cartão de constância: dias seguidos + mapa de estudo */
.cd-streak-card {
  background: #fff;
  color: var(--cd-text);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  padding: 1.2rem;
}
.cd-streak-card .streak-num {
  font-size: 2.1rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--cd-title);
  line-height: 1;
}
.cd-streak-card .streak-label { color: var(--cd-gray); }
/* Mapa de estudo no estilo GitHub: uma coluna por semana, um quadrado por dia */
.heatmap { --gap: 3px; }
/* minmax(0, 1fr): com "1fr" as colunas não encolhiam abaixo dos rótulos dos
   meses e o mapa alargava a página no celular (F-020). */
.heatmap { min-width: 0; }
.heatmap-months, .heatmap-grid { display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); gap: var(--gap); }
.heatmap-months { margin-left: 28px; margin-bottom: 4px; overflow: hidden; }
.heatmap-months span { font-size: .6rem; color: var(--cd-gray); white-space: nowrap; overflow: visible; height: .8rem; line-height: .8rem; }
.heatmap-body { display: flex; gap: 4px; }
.heatmap-weekdays { display: grid; grid-template-rows: repeat(7, 1fr); gap: var(--gap); width: 24px; flex: 0 0 auto; }
.heatmap-weekdays span { font-size: .58rem; color: var(--cd-gray); display: flex; align-items: center; }
.heatmap-grid { flex: 1; min-width: 0; }
.heatmap-week { display: grid; grid-template-rows: repeat(7, 1fr); gap: var(--gap); }
.heatmap-cell { display: block; aspect-ratio: 1; border-radius: 3px; background: #ebedf0; }
.heatmap-cell.l1 { background: #c6e9d6; }
.heatmap-cell.l2 { background: #6fd3a3; }
.heatmap-cell.l3 { background: #10b981; }
.heatmap-cell.l4 { background: #047857; }
.heatmap-cell.future { background: transparent; }
.heatmap-cell.today { outline: 2px solid var(--cd-orange); outline-offset: 1px; }
.heatmap-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; font-size: .72rem; color: var(--cd-gray); }
.heatmap-legend { display: inline-flex; align-items: center; gap: 3px; }
.heatmap-legend .heatmap-cell { width: 10px; height: 10px; aspect-ratio: auto; }

@keyframes cd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Bloco da agenda */
.cd-agenda-block {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 13px;
  border: 1px solid var(--cd-border);
  background: #fff;
  transition: all 0.2s;
}
.cd-agenda-block.active { border-color: var(--cd-primary); background: #fbfbff; }
.cd-agenda-block.done { background: var(--cd-light); opacity: 0.65; }
.cd-agenda-block .color-strip {
  width: 4px;
  align-self: stretch;
  border-radius: 4px;
  flex-shrink: 0;
}
.cd-agenda-block .timer-display {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cd-gray);
  white-space: nowrap;
}
.cd-agenda-block.active .timer-display {
  font-size: 1.1rem;
  color: var(--cd-title);
  animation: cd-pulse 2s infinite;
}
.cd-agenda-block.done .timer-display { color: var(--cd-green); }
/* Celular: numa linha só, cronômetro e botões espremiam a disciplina em ~60px
   e o nome quebrava uma palavra por linha. Aqui o bloco vira duas linhas:
   disciplina e aula na largura toda; embaixo, cronômetro à esquerda e botões
   à direita. A faixa de cor sai do fluxo para acompanhar as duas linhas. */
@media (max-width: 575.98px) {
  .cd-agenda-block[data-block] {
    position: relative;
    flex-wrap: wrap;
    gap: 0.55rem 0.5rem;
    padding: 0.8rem 0.85rem 0.8rem 1.15rem;
  }
  .cd-agenda-block[data-block] > .color-strip {
    position: absolute;
    left: 0.45rem;
    top: 0.8rem;
    bottom: 0.8rem;
  }
  .cd-agenda-block[data-block] > .flex-grow-1 { flex: 1 0 100%; }
  .cd-agenda-block[data-block] > .timer-display { margin-right: auto; }
  /* Sessão aberta (rodando ou pausada): aparecem mais três botões. O
     cronômetro ganha a linha dele e os botões ficam juntos, à direita. */
  .cd-agenda-block[data-block]:has([data-complete]:not(.d-none)) > .timer-display { flex: 1 0 100%; }
  .cd-agenda-block[data-block]:has([data-complete]:not(.d-none)) > [data-action] { margin-left: auto; }
}

/* Aviso de conquista */
.cd-achievement {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--cd-radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.82rem;
  color: #92400e;
}
.cd-achievement .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cd-orange);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   MODAIS
   ------------------------------------------------------------ */
.cd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.cd-modal-overlay.open { display: flex; }
.cd-modal {
  background: #fff;
  border-radius: var(--cd-radius-lg);
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.18);
  width: 92%;
  max-width: 540px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: cd-modal-in 0.3s ease;
}
@keyframes cd-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.cd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--cd-border);
}
.cd-modal-header .title { font-size: 1rem; font-weight: 700; color: var(--cd-title); }
.cd-modal-header .close-btn {
  width: 44px;
  height: 44px;
  margin: -0.5rem -0.6rem -0.5rem 0;
  border-radius: var(--cd-radius-sm);
  border: none;
  background: none;
  color: var(--cd-gray);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.cd-modal-body { padding: 1rem 1.2rem; overflow-y: auto; }
.cd-confirm-modal { max-width: 460px; }
.cd-confirm-modal .cd-modal-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding-block: 1.35rem;
}
.cd-confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
  background: #fef3c7;
  font-size: 1.1rem;
}
.cd-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding: .9rem 1.2rem 1.2rem;
  border-top: 1px solid var(--cd-border);
}

.errorlist {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
  color: var(--bs-danger-text-emphasis, #842029);
  font-size: .78rem;
  font-weight: 600;
}

/* ------------------------------------------------------------
   FORMULÁRIOS
   ------------------------------------------------------------ */
.cd-label {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--cd-title);
  margin-bottom: 0.4rem;
  display: block;
}
.cd-input, .cd-textarea, .cd-select,
.pl-app .form-control, .pl-app .form-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--cd-border-strong);
  border-radius: var(--cd-radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  background-color: #fff;
  color: var(--cd-title);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cd-textarea, .pl-app textarea.form-control { min-height: 0; }
/* Tela de toque: abaixo de 16px o Safari do iPhone dá zoom ao focar o campo,
   e um modal aberto passa a sair da tela. */
@media (hover: none) and (pointer: coarse) {
  .cd-input, .cd-textarea, .cd-select,
  .pl-app .form-control, .pl-app .form-select { font-size: 16px; }
}
.cd-input:focus, .cd-textarea:focus, .cd-select:focus,
.pl-app .form-control:focus, .pl-app .form-select:focus {
  border-color: var(--cd-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
  background-color: #fff;
}
.cd-input:disabled, .cd-select:disabled { background-color: var(--cd-light); color: var(--cd-gray); }
.cd-textarea.mono { font-family: 'Fira Code', monospace; font-size: 0.75rem; line-height: 1.5; }

/* Chat da comunidade */
.cd-chat {
  display: flex;
  flex-direction: column;
  height: 480px;
  overflow: hidden;
  padding: 0;
}
.cd-chat .chat-head {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--cd-hover);
}
.cd-chat .chat-tabs {
  display: flex;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--cd-hover);
  overflow-x: auto;
}
.cd-chat .chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cd-chat .chat-input {
  display: flex;
  gap: 8px;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--cd-hover);
}
.cd-bubble {
  max-width: 78%;
  padding: 0.55rem 0.9rem;
  font-size: 0.83rem;
  line-height: 1.45;
  border-radius: 14px 14px 14px 4px;
  background: var(--cd-hover);
  color: var(--cd-title);
}
.cd-bubble.me {
  border-radius: 14px 14px 4px 14px;
  background: var(--cd-primary);
  color: #fff;
  align-self: flex-end;
}
.cd-bubble .who { font-size: 0.68rem; font-weight: 700; opacity: 0.7; display: block; margin-bottom: 2px; }

/* ============================================================
   Estratégia: fases, projeção e rankings
   ============================================================ */
.cd-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: .45rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.cd-phase-track {
  display: flex;
  gap: 4px;
  min-height: 64px;
}
.cd-phase {
  flex-basis: 0;
  min-width: 64px;
  border-radius: 10px;
  padding: .5rem .6rem;
  background: var(--cd-hover);
  border: 1px solid var(--cd-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .25rem;
  overflow: hidden;
}
.cd-phase.past { opacity: .55; }
.cd-phase.current {
  background: var(--cd-hover-purple);
  border-color: var(--cd-primary);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, .2);
}
.cd-phase-name { font-size: .78rem; font-weight: 700; color: var(--cd-title); line-height: 1.2; }
.cd-phase-dates { font-size: .68rem; color: var(--cd-gray); }
@media (max-width: 575.98px) {
  .cd-phase-track { flex-direction: column; }
  .cd-phase { flex-grow: 0 !important; flex-direction: row; align-items: center; }
}
.cd-projection-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--cd-hover);
  border: 1px solid var(--cd-border);
}
.cd-projection-bar .range {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: rgba(102, 126, 234, .28);
}
.cd-projection-bar .point {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 20px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--cd-primary);
}
.cd-projection-bar .cutoff {
  position: absolute;
  top: -6px;
  width: 2px;
  height: 24px;
  margin-left: -1px;
  background: var(--cd-red);
}
.cd-rank-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cd-rank-list li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .7rem;
  border: 1px solid var(--cd-border);
  border-radius: 10px;
  counter-increment: rank;
}
.cd-rank-list li::before {
  content: counter(rank);
  font-weight: 800;
  color: var(--cd-primary);
  width: 1.2rem;
}
.cd-rank-list { counter-reset: rank; }
.cd-banner {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem 1rem;
  border-radius: var(--cd-radius);
  border: 1px solid var(--cd-border);
  background: #fff;
  font-size: .86rem;
}
.cd-banner i { margin-top: .15rem; }
.cd-banner.info { background: var(--cd-hover-purple); border-color: #d9d2ff; }
.cd-banner.info i { color: var(--cd-primary); }
.cd-banner.warn { background: #fffbeb; border-color: #fde68a; }
.cd-banner.warn i { color: var(--cd-orange); }
.cd-banner.ok { background: #ecfdf5; border-color: #a7f3d0; }
.cd-banner.ok i { color: var(--cd-green); }
.cd-rating-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.cd-rating-grid label {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  border: 1px solid var(--cd-border);
  border-radius: 10px;
  padding: .55rem .7rem;
  cursor: pointer;
  font-size: .85rem;
}
.cd-rating-grid input { position: absolute; opacity: 0; }
.cd-rating-grid input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: 2px; }
.cd-rating-grid label:has(input:checked) { border-color: var(--cd-primary); background: var(--cd-hover-purple); }
.cd-rating-grid small { color: var(--cd-gray); }

/* Modal "Salvar tempo": resumo em destaque e escolha da atividade em cartões. */
.cd-finish-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--cd-primary-soft);
  border: 1px solid #dfe3ff;
}
.cd-finish-time {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cd-primary-hover);
  white-space: nowrap;
}
.cd-finish-what { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cd-finish-subject { font-size: 0.75rem; font-weight: 700; color: var(--cd-gray); text-transform: uppercase; letter-spacing: 0.03em; }
.cd-finish-subject:empty { display: none; }
.cd-finish-topic { font-size: 0.92rem; font-weight: 600; color: var(--cd-title); overflow-wrap: anywhere; }
#modal-finish fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cd-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.cd-choice-grid label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--cd-border-strong);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cd-title);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cd-choice-grid label i { color: var(--cd-gray); width: 1.1em; text-align: center; flex-shrink: 0; }
/* Número ímpar de opções: a última ocupa a linha inteira em vez de ficar sozinha. */
.cd-choice-grid label:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cd-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.cd-choice-grid label:has(input:checked) { border-color: var(--cd-primary); background: var(--cd-hover-purple); }
.cd-choice-grid label:has(input:checked) i { color: var(--cd-primary); }
.cd-choice-grid label:has(input:focus-visible) { outline: 3px solid #f59e0b; outline-offset: 2px; }
.cd-incidence {
  display: inline-block;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .05rem .4rem;
  border-radius: 999px;
  vertical-align: middle;
}
.cd-incidence.high { background: #fef3c7; color: #92400e; }
.cd-incidence.out { background: #f3f4f6; color: #4b5563; }
.cd-line-chart { width: 100%; height: auto; display: block; }
.cd-line-chart .grid { stroke: var(--cd-border); stroke-width: 1; }
.cd-line-chart .axis { font-size: 10px; fill: var(--cd-soft); font-family: 'Fira Code', monospace; }
.cd-line-chart .cutoff { stroke: var(--cd-red); stroke-width: 2; stroke-dasharray: 6 4; }
.cd-line-chart .line { fill: none; stroke: var(--cd-primary); stroke-width: 2.5; stroke-linejoin: round; }
.cd-line-chart .dot { fill: #fff; stroke: var(--cd-primary); stroke-width: 2.5; }
.cd-diff {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.cd-diff.new { background: #ecfdf5; color: #065f46; }
.cd-diff.changed { background: #eff6ff; color: #1e40af; }
.cd-diff.removed { background: #fef2f2; color: #991b1b; }
.cd-diff.restored { background: #fef3c7; color: #92400e; }
.cd-diff.same { background: var(--cd-hover); color: var(--cd-gray); }
.cd-diff-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
/* Tabelas roláveis só na horizontal: a borda inferior gerava 1px de rolagem vertical. */
/* position: relative prende os .visually-hidden (absolutos) dentro da
   área rolável; sem isso eles alargam a página no celular. */
.pl-app .table-responsive { overflow-y: hidden; position: relative; }
.cd-topic-row.archived:hover { background: transparent; }
.cd-topic-row.archived .cd-topic-check { border-style: dashed; color: var(--cd-soft); font-size: .6rem; }
.cd-topic-row.archived .cd-topic-title { color: var(--cd-soft); text-decoration: line-through; }
.cd-topic-row.archived .cd-incidence { text-decoration: none; }
.cd-code {
  background: #111827;
  color: #e5e7eb;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-family: 'Fira Code', monospace;
  font-size: .78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ------------------------------------------------------------
   MEUS PLANOS
   ------------------------------------------------------------ */
.plan-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}
.plan-list-item.is-active { border: 2px solid var(--cd-primary); }
.plan-list-title { font-size: 1.05rem; font-weight: 800; margin: .15rem 0 .2rem; }
.plan-list-title a { color: var(--cd-title); text-decoration: none; }
.plan-list-title a:hover { color: var(--cd-primary); }
.plan-active-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cd-green);
}
.plan-list-date {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-size: .7rem;
  color: var(--cd-gray);
  line-height: 1.2;
}
.plan-list-date strong { font-size: 1.3rem; color: var(--cd-title); }

/* Menu "mais ações" no topo do plano */
/* Menus de ações (plano, grupo): o estilo nav-menu vinha do layout do Rumo. */
.pl-app .nav-menu {
  min-width: 13rem;
  padding: .4rem;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.12);
}
.pl-app .nav-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 40px;
  padding: .45rem .7rem;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--cd-text);
}
.pl-app .nav-menu .dropdown-item > i { width: 1rem; text-align: center; color: var(--cd-gray); }
.pl-app .nav-menu .dropdown-item:hover,
.pl-app .nav-menu .dropdown-item:focus { background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-app .nav-menu .dropdown-item:hover > i { color: var(--cd-primary); }
.pl-app .nav-menu .dropdown-divider { margin: .3rem .2rem; border-color: var(--cd-border); }
.plan-actions-menu .dropdown-item.text-danger,
.plan-actions-menu .dropdown-item.text-danger > i { color: #b91c1c; }
.plan-actions-menu .dropdown-item.text-danger:hover { background: #fef2f2; }
.plan-actions-menu form .dropdown-item { width: 100%; border: 0; background: transparent; text-align: left; }

/* ------------------------------------------------------------
   CRIAR PLANO: modo, método de revisão e aulas
   ------------------------------------------------------------ */
.plan-mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .75rem; }
@media (min-width: 576px) { .plan-mode-grid.has-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan-mode-option { position: relative; display: block; cursor: pointer; }
.plan-mode-option input { position: absolute; opacity: 0; inset: 0; }
.plan-mode-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 2px solid var(--cd-border);
  border-radius: var(--cd-radius);
  background: #fff;
  transition: border-color .15s, background .15s;
}
.plan-mode-card i { font-size: 1.3rem; color: var(--cd-primary); }
.plan-mode-card strong { color: var(--cd-title); }
.plan-mode-card small { color: var(--cd-gray); line-height: 1.4; }
.plan-mode-option:hover .plan-mode-card { border-color: #c7d2fe; }
.plan-mode-option input:checked + .plan-mode-card { border-color: var(--cd-primary); background: var(--cd-hover-purple); }
.plan-mode-option input:focus-visible + .plan-mode-card { outline: 3px solid #a5b4fc; outline-offset: 2px; }

.review-method-list { display: flex; flex-direction: column; gap: .5rem; }
.review-method-option {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .7rem .85rem;
  border: 1px solid var(--cd-border);
  border-radius: 12px;
  cursor: pointer;
}
.review-method-option input { margin-top: .25rem; accent-color: var(--cd-primary); }
.review-method-option span { display: flex; flex-direction: column; }
.review-method-option strong { color: var(--cd-title); font-size: .9rem; }
.review-method-option small { color: var(--cd-gray); font-size: .78rem; }
.review-method-option:has(input:checked) { border-color: var(--cd-primary); background: var(--cd-hover-purple); }

.lesson-rows { display: flex; flex-direction: column; gap: .6rem; }
.lesson-row { display: flex; align-items: flex-end; gap: .5rem; }
.lesson-row .lesson-count { width: 96px; flex: 0 0 auto; }
.lesson-row { flex-wrap: wrap; }
.lesson-topics { flex: 1 0 100%; margin-top: -.15rem; }
.lesson-range { flex: 1 0 100%; margin-top: -.2rem; font-variant-numeric: tabular-nums; }
.lesson-range:empty { display: none; }
.lesson-topics summary, .lesson-topics-edit summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--cd-primary); width: fit-content; }
.lesson-topics-edit summary { font-size: .88rem; }
.lesson-topic-list { list-style: none; padding: 0; margin-bottom: 0; display: flex; flex-direction: column; gap: .4rem; }
.lesson-topic-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: .5rem; }
.lesson-topic-list label { font-size: .8rem; color: var(--cd-gray); margin: 0; }
.pl-cost { font-weight: 500; opacity: .85; margin-left: .15rem; }
.pl-cost-note { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem .9rem; border: 1px solid var(--cd-border); border-radius: var(--cd-radius-sm); background: var(--cd-light); font-size: .85rem; color: var(--cd-text); }
.pl-cost-note i { color: var(--cd-orange); margin-top: .2rem; }
.pl-cost-note.is-short { border-color: #fcd34d; background: #fffbeb; }
.pl-seq { border-top: 1px solid var(--cd-border); padding-top: 1rem; }
.pl-seq-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; align-items: center; gap: .6rem; margin: .3rem 0; font-size: .82rem; }
.pl-seq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cd-title); }
.pl-seq-track { position: relative; height: 14px; background: var(--cd-primary-soft); border-radius: 4px; }
.pl-seq-track i { position: absolute; top: 2px; width: 4px; height: 10px; margin-left: -2px; border-radius: 2px; }
.pl-seq-end { color: var(--cd-gray); font-size: .75rem; white-space: nowrap; }
.pl-seq-list { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; counter-reset: aula; padding: 0; margin: .9rem 0 0; max-height: 260px; overflow-y: auto; }
.pl-seq-list li { counter-increment: aula; display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; padding: .15rem .5rem; border: 1px solid var(--cd-border); border-radius: 6px; color: var(--cd-title); }
.pl-seq-list li::before { content: counter(aula); color: var(--cd-gray); font-variant-numeric: tabular-nums; }
.pl-seq-list li i { width: 8px; height: 8px; border-radius: 2px; }
@media (max-width: 576px) { .pl-seq-row { grid-template-columns: minmax(0, 1fr) auto; } .pl-seq-track { grid-column: 1 / -1; grid-row: 2; } }
.lesson-remove {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cd-border);
  border-radius: 10px;
  background: #fff;
  color: var(--cd-gray);
}
.lesson-remove:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

/* ------------------------------------------------------------
   ESTATÍSTICAS: tempo por período
   ------------------------------------------------------------ */
.time-nav-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cd-border);
  border-radius: 50%;
  color: var(--cd-text);
  text-decoration: none;
  flex: 0 0 auto;
}
.time-nav-btn:hover { border-color: var(--cd-primary); color: var(--cd-primary); }
.time-nav-btn.disabled { opacity: .35; }
.time-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 1rem; }
.time-kpis .tile-label { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cd-soft); }
.time-kpi-value { font-size: 1.45rem; font-weight: 700; color: var(--cd-title); line-height: 1.2; }
.time-source-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--cd-border); }
.time-source-bar .timer, .time-dot.timer { background: var(--cd-primary); }
.time-source-bar .manual, .time-dot.manual { background: var(--cd-orange); }
.time-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .25rem; }
.time-chart .bar.future { background: transparent; border: 1px dashed var(--cd-border); }
.time-chart.dense { gap: 3px; }
.time-chart.dense .lbl { font-size: .55rem; }
@media (max-width: 575.98px) {
  .time-chart.dense .col-bar:nth-child(odd) .lbl { visibility: hidden; }
}

/* Grade de aulas no plano por aulas */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .4rem; }
.lesson-cell {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--cd-border);
  border-radius: 9px;
  background: #fff;
  color: var(--cd-text);
  font-family: 'Fira Code', monospace;
  font-size: .78rem;
  font-weight: 600;
  transition: transform .1s, background .15s;
}
.lesson-cell:hover { border-color: var(--cd-primary); color: var(--cd-primary); }
.lesson-cell.done { background: var(--cd-green); border-color: var(--cd-green); color: #fff; }
.lesson-cell.current { border: 2px solid var(--cd-primary); color: var(--cd-primary); background: var(--cd-hover-purple); }
.lesson-legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .25rem; vertical-align: -1px; }
.lesson-legend.done { background: var(--cd-green); }
.lesson-legend.current { border: 2px solid var(--cd-primary); background: var(--cd-hover-purple); }
@media (max-width: 575.98px) {
  .lesson-row .lesson-count { width: 70px; }
  .lesson-row { gap: .35rem; }
}

/* ------------------------------------------------------------
   MODO FOCO: cronômetro em tela cheia
   ------------------------------------------------------------ */
.focus-overlay {
  background: radial-gradient(circle at 50% 35%, #2b2f6b 0%, #14152e 70%);
  align-items: stretch;
}
.focus-panel {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  color: #fff;
  animation: cd-modal-in .25s ease;
}
.focus-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 960px; width: 100%; margin: 0 auto; }
.focus-subject { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: rgba(255, 255, 255, .85); min-width: 0; }
.focus-dot { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.focus-minimize {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-weight: 600;
  font-size: .85rem;
}
.focus-minimize:hover { background: rgba(255, 255, 255, .16); }
.focus-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; }
.focus-topic { font-size: clamp(1.2rem, 3.5vw, 1.8rem); font-weight: 700; color: #fff; margin: 0; max-width: 900px; }
.focus-clock {
  font-size: clamp(4.5rem, 19vw, 12rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 40px rgba(165, 180, 252, .35);
  transition: opacity .2s;
}
.focus-overlay.paused .focus-clock { opacity: .45; }
.focus-status { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #a5b4fc; }
.focus-overlay.paused .focus-status { color: #fcd34d; }
.focus-total { font-size: .95rem; color: rgba(255, 255, 255, .7); }
.focus-actions { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.focus-btn {
  min-width: 170px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.focus-btn:hover { background: rgba(255, 255, 255, .16); }
.focus-btn.primary { background: #fff; color: #312e81; border-color: #fff; }
.focus-btn.primary:hover { background: #e0e7ff; }
.focus-btn:focus-visible, .focus-minimize:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
.focus-hint { text-align: center; font-size: .78rem; color: rgba(255, 255, 255, .5); margin: 1rem 0 0; }
@media (max-width: 575.98px) {
  .focus-minimize span { display: none; }
  .focus-btn { min-width: 0; flex: 1; }
  .focus-hint { display: none; }
}

/* Agenda do plano por aulas: aulas em andamento primeiro */
.agenda-section-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: .25rem 0 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cd-soft);
}
.agenda-section-title i { color: var(--cd-primary); }
.cd-agenda-block.in-progress { border-color: #c7d2fe; background: #f8f9ff; }
.cd-agenda-block.in-progress.active { border-color: var(--cd-primary); background: #fbfbff; }

/* Histórico de sessões agrupado por dia */
.session-plan-active { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.session-day { padding-top: .9rem; padding-bottom: .4rem; }
.session-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.session-day-head h2 { font-size: .95rem; font-weight: 700; color: var(--cd-title); margin: 0; }
.session-day-head .cd-mono { font-weight: 600; color: var(--cd-primary); }
.session-list { list-style: none; margin: 0; padding: 0; }
.session-item { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--cd-hover); }
.session-color { width: 4px; align-self: stretch; border-radius: 4px; flex: 0 0 auto; }
.session-main { flex: 1; min-width: 0; }
.session-title { font-weight: 600; color: var(--cd-title); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-meta { font-size: .78rem; color: var(--cd-gray); }
.session-plan { display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: 999px; background: var(--cd-hover-purple); color: var(--cd-secondary); font-size: .7rem; font-weight: 600; }
.session-time { display: flex; flex-direction: column; align-items: flex-end; font-size: .85rem; flex: 0 0 auto; }
.session-source { font-size: .7rem; color: var(--cd-soft); }
.session-source.manual { color: #b45309; }
@media (max-width: 575.98px) {
  .session-item { flex-wrap: wrap; }
  .session-main { flex-basis: calc(100% - 20px); }
  .session-time { flex-direction: row; gap: .5rem; align-items: baseline; margin-left: 16px; flex: 1; }
}

/* Resumo da semana (Estatísticas › Semana) */
.summary-subtitle { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cd-soft); margin: 0 0 .5rem; }
.summary-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.summary-steps a { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .75rem; border: 1px solid var(--cd-border); border-radius: 12px; text-decoration: none; color: var(--cd-text); font-size: .8rem; }
.summary-steps a strong { color: var(--cd-title); font-size: .88rem; }
.summary-steps a:hover { border-color: var(--cd-primary); background: var(--cd-hover-purple); }
.summary-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--cd-title); }
.summary-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .4rem; }

/* Abas da agenda de Hoje */
.agenda-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; padding: .3rem; background: var(--cd-hover); border-radius: 14px; }
.agenda-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--cd-gray);
  font-weight: 700;
  font-size: .85rem;
  transition: background .15s, color .15s;
}
.agenda-tab:hover { color: var(--cd-primary); }
.agenda-tab[aria-selected="true"] { background: #fff; color: var(--cd-title); box-shadow: 0 1px 4px rgba(17, 24, 39, .1); }
.agenda-tab:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 1px; }
.agenda-tab-count {
  min-width: 22px;
  padding: 0 .4rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: var(--cd-primary);
  font-family: 'Fira Code', monospace;
  font-size: .72rem;
  line-height: 1.6;
}
.agenda-tab-count.warn { background: #fef3c7; color: #92400e; }
.agenda-tab-count.ok { background: #d1fae5; color: #065f46; }
.agenda-tab-count-of { opacity: .6; }
/* Plano por aulas, livros ou cadernos: progresso do plano no pé da aba. */
.agenda-tab-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: #e0e7ff; overflow: hidden; }
.agenda-tab-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--cd-primary); }
.agenda-tab-bar.ok > i { background: var(--cd-green, #10b981); }
.pl-units-progress { border: 1px solid #e0e7ff; background: linear-gradient(180deg, #f5f7ff, #fff); border-radius: 14px; padding: .8rem .9rem; }
.pl-units-progress.done { border-color: #a7f3d0; background: linear-gradient(180deg, #ecfdf5, #fff); }
.pl-units-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.pl-units-main { font-weight: 800; color: var(--cd-title); }
.pl-units-left { color: var(--cd-gray); font-size: .82rem; font-weight: 600; }
.pl-units-bar { height: 8px; border-radius: 8px; background: #e0e7ff; margin: .55rem 0 .5rem; overflow: hidden; }
.pl-units-bar > i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #667eea, #764ba2); }
.pl-units-progress.done .pl-units-bar { background: #d1fae5; }
.pl-units-progress.done .pl-units-bar > i { background: var(--cd-green, #10b981); }
.pl-units-foot { display: flex; flex-wrap: wrap; gap: .35rem; }
.pl-units-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; background: var(--cd-hover); color: var(--cd-gray); font-size: .74rem; font-weight: 600; }
.pl-units-chip.today { background: #d1fae5; color: #065f46; }
.pl-units-note { margin: .5rem 0 0; color: var(--cd-gray); font-size: .78rem; }
.agenda-tab-running { display: none; position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cd-orange); animation: cd-pulse 2s infinite; }
.agenda-tab.running .agenda-tab-running { display: block; }
.agenda-panel { display: flex; flex-direction: column; gap: .5rem; margin-top: .9rem; }
.agenda-panel[hidden] { display: none; }
.agenda-empty { text-align: center; color: var(--cd-gray); font-size: .9rem; padding: 1.75rem .5rem; }
.agenda-empty i { display: block; font-size: 1.5rem; margin-bottom: .5rem; color: var(--cd-soft); }
.done-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--cd-border); border-radius: 12px; }
.done-strip { width: 4px; align-self: stretch; border-radius: 4px; flex: 0 0 auto; }
.done-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.done-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .5rem; border-radius: 999px; background: var(--cd-hover); color: var(--cd-gray); font-size: .7rem; font-weight: 600; }
.done-tag.ok { background: #d1fae5; color: #065f46; }
.done-tag.rev { background: #fef3c7; color: #92400e; }
.done-time { font-weight: 600; color: var(--cd-title); flex: 0 0 auto; }
/* Desfazer a conclusão: botão do Feito hoje e aviso logo depois de concluir. */
.done-reopen {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  padding: .3rem .65rem;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-sm);
  background: #fff;
  color: var(--cd-gray);
  font-size: .78rem;
  font-weight: 650;
}
.done-reopen:hover { border-color: #dfe3ff; background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-undo {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .6rem .55rem .85rem;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  font-size: .85rem;
}
.pl-undo > i { flex: none; color: var(--cd-green); }
.pl-undo-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pl-undo-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  padding: .3rem .75rem;
  border: 1px solid #6ee7b7;
  border-radius: var(--cd-radius-sm);
  background: #fff;
  color: #047857;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.pl-undo-btn:hover { background: #d1fae5; }
@media (max-width: 575.98px) {
  .done-reopen span { display: none; }
}
@media (max-width: 575.98px) {
  .agenda-tab { flex-direction: column; gap: .1rem; font-size: .72rem; min-height: 56px; }
  .agenda-tab > i { display: none; }
}

/* Página do plano: abas e matérias recolhíveis */
.plan-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .35rem; padding: .3rem; background: var(--cd-hover); border-radius: 14px; margin-bottom: 1rem; }
.plan-tab { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; border-radius: 11px; color: var(--cd-gray); font-weight: 700; font-size: .88rem; text-decoration: none; }
.plan-tab:hover { color: var(--cd-primary); }
.plan-tab.active { background: #fff; color: var(--cd-title); box-shadow: 0 1px 4px rgba(17, 24, 39, .1); }
.plan-tab:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 1px; }
.subject-acc { padding: 0; }
.subject-acc > summary { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; cursor: pointer; list-style: none; }
.subject-acc > summary::-webkit-details-marker { display: none; }
.subject-acc > summary:focus-visible { outline: 3px solid #a5b4fc; outline-offset: -3px; border-radius: var(--cd-radius); }
.subject-acc-name { font-weight: 700; color: var(--cd-title); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-acc-count { font-size: .78rem; color: var(--cd-gray); white-space: nowrap; }
.subject-acc-bar { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--cd-hover); overflow: hidden; }
.subject-acc-bar > span { display: block; height: 100%; border-radius: 999px; }
.subject-acc-pct { font-size: .75rem; color: var(--cd-gray); width: 36px; text-align: right; }
.subject-acc-caret { color: var(--cd-soft); font-size: .75rem; transition: transform .2s; }
.subject-acc[open] .subject-acc-caret { transform: rotate(180deg); }
.subject-acc-body { padding: 0 1rem 1rem; }
.cycle-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.cycle-row { display: flex; align-items: center; gap: .45rem; font-size: .85rem; }
.cycle-order { width: 20px; color: var(--cd-soft); font-size: .72rem; }
.cycle-minutes { width: 76px; padding: .3rem .5rem; text-align: right; }
@media (max-width: 575.98px) {
  .plan-tab { flex-direction: column; gap: .1rem; font-size: .74rem; min-height: 54px; }
  .subject-acc-bar { display: none; }
  .cycle-row { flex-wrap: wrap; }
}

/* Comunidade: grupos */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .75rem; }
.group-card { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit; }
.group-card-name { font-weight: 700; color: var(--cd-title); }
.group-card-desc { font-size: .82rem; color: var(--cd-gray); }
.group-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: auto; }
.group-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .5rem; border-radius: 999px; background: var(--cd-hover-purple); color: var(--cd-secondary); font-size: .7rem; font-weight: 600; }
.group-card-members { margin-left: auto; font-size: .75rem; color: var(--cd-gray); display: inline-flex; gap: .3rem; align-items: center; }
.group-card-plan { display: flex; align-items: center; gap: .55rem; background: var(--cd-hover-purple); border: 1px solid #dfe3fd; border-radius: 10px; padding: .45rem .6rem; }
.group-card-plan > i { color: var(--cd-primary); font-size: .85rem; }
.group-card-plan-name { display: block; font-size: .8rem; font-weight: 700; color: #3f47a8; line-height: 1.25; }
.group-card-plan-sub { display: block; font-size: .72rem; color: #6870c4; }
.group-plan-info { border: 1px dashed var(--cd-border-strong, #d8dce5); border-radius: 10px; padding: .65rem .8rem; background: #fafbfc; }
.group-plan-info .group-card-meta { margin-top: .35rem; }
.group-empty-plan { text-align: center; padding: .75rem .25rem; }
.group-empty-plan h3 { font-size: 1rem; font-weight: 700; color: var(--cd-title); margin: 0 0 .35rem; }
.group-empty-plan p { font-size: .84rem; color: var(--cd-gray); margin: 0 auto 1rem; max-width: 360px; }
.group-empty-plan-icon { width: 48px; height: 48px; border-radius: 14px; background: #fef3c7; color: #b45309; display: grid; place-items: center; margin: 0 auto .7rem; font-size: 1.1rem; }
.group-plan-box { margin-top: 1.1rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; border: 1px solid #c7cdfa; background: var(--cd-hover-purple); border-radius: 14px; padding: .9rem 1.1rem; }
.group-plan-box.missing { border-color: #fde68a; background: #fffbeb; }
.group-plan-icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--cd-primary); display: grid; place-items: center; }
.group-plan-box.missing .group-plan-icon { color: #b45309; }
.group-plan-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cd-primary); }
.group-plan-name { font-weight: 700; color: var(--cd-title); }
.group-plan-sub { font-size: .8rem; color: var(--cd-gray); }
@media (max-width: 640px) { .group-plan-box { grid-template-columns: minmax(0, 1fr); } .group-plan-icon { display: none; } }

/* Conversa do grupo: blocos por autor, separador de dia e caixa fixa */
.group-chat { position: relative; height: auto; }
.group-chat .chat-body { height: min(60vh, 520px); min-height: 320px; background: #f8f9fc; gap: .2rem; }
.group-chat-head { display: flex; align-items: center; gap: .7rem; font-size: .82rem; }
.chat-stack { display: flex; }
.group-avatar { width: 30px; height: 30px; border-radius: 50%; background: #e0e7ff; color: #3f47a8; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; flex-shrink: 0; }
.group-avatar-lg { width: 38px; height: 38px; font-size: .85rem; }
.chat-stack .group-avatar { width: 26px; height: 26px; font-size: .62rem; border: 2px solid #fff; margin-left: -6px; }
.chat-stack .group-avatar:first-child { margin-left: 0; }
.chat-day { text-align: center; margin: .7rem 0 .3rem; }
.chat-day span { font-size: .7rem; font-weight: 700; color: var(--cd-gray); background: #fff; border: 1px solid var(--cd-border, #e5e7eb); border-radius: 999px; padding: .15rem .7rem; }
.chat-row { display: flex; align-items: flex-start; gap: .5rem; max-width: 78%; }
.chat-row.run-start { margin-top: .55rem; }
.chat-row.me { margin-left: auto; justify-content: flex-end; }
.chat-avatar-gap { width: 30px; flex-shrink: 0; }
.chat-col { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.chat-row.me .chat-col { align-items: flex-end; }
.chat-who { font-size: .72rem; font-weight: 700; color: var(--cd-title); margin-left: .35rem; }
.chat-role { font-size: .62rem; font-weight: 700; color: #3f47a8; background: var(--cd-hover-purple); border-radius: 999px; padding: .05rem .4rem; margin-left: .3rem; }
.group-chat .cd-bubble { max-width: 100%; background: #fff; border: 1px solid var(--cd-border, #e5e7eb); overflow-wrap: anywhere; }
.group-chat .cd-bubble.me { background: var(--cd-primary); border-color: var(--cd-primary); }
.chat-text { white-space: pre-wrap; }
.chat-quote { display: block; font-size: .76rem; color: var(--cd-gray); border-left: 3px solid var(--cd-primary); background: var(--cd-hover-purple); border-radius: 6px; padding: .25rem .5rem; margin-bottom: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-bubble.me .chat-quote { background: rgba(255, 255, 255, .18); border-left-color: #fff; color: #eef0ff; }
.chat-quote b { color: var(--cd-title); }
.cd-bubble.me .chat-quote b { color: #fff; }
.cd-bubble.removed { opacity: .6; }
.bubble-foot { float: right; display: inline-flex; align-items: center; gap: .3rem; margin: .3rem 0 -.15rem .6rem; font-size: .66rem; opacity: .7; white-space: nowrap; }
.bubble-menu { border: 0; background: transparent; color: inherit; padding: 0 .25rem; line-height: 1; }
.chat-new { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: inline-flex; gap: .4rem; align-items: center; border: 0; background: var(--cd-primary); color: #fff; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .35rem .85rem; box-shadow: 0 6px 16px rgba(102, 126, 234, .35); z-index: 2; }
.chat-composer { border-top: 1px solid var(--cd-hover); padding: .65rem .9rem .5rem; background: #fff; }
.chat-composer-row { display: flex; gap: .5rem; align-items: flex-end; }
.chat-composer textarea { flex: 1; resize: none; border-radius: 20px; padding: .55rem .9rem; max-height: 140px; line-height: 1.4; }
.chat-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cd-primary); color: #fff; flex-shrink: 0; }
.chat-send:hover { background: var(--cd-primary-hover, #545fcb); }
.chat-reply { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.chat-reply .chat-quote { flex: 1; margin: 0; }
.chat-hint { font-size: .68rem; color: var(--cd-gray); margin-top: .3rem; }
@media (max-width: 640px) { .chat-row { max-width: 92%; } .chat-hint { display: none; } }
.member-list { list-style: none; padding: 0; margin: 0; }
.member-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--cd-hover); }
.member-row:first-child { border-top: 0; }
.member-role { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .55rem; border-radius: 999px; background: var(--cd-hover); color: var(--cd-gray); }
.member-role.owner { background: #fef3c7; color: #92400e; }
.member-role.mod { background: var(--cd-hover-purple); color: var(--cd-secondary); }
.danger-zone { border-color: #fecaca; }

/* Turmas: recados */
.announcement-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.announcement-list li { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .8rem; border: 1px solid var(--cd-border); border-radius: 12px; font-size: .85rem; }
.announcement-list strong { color: var(--cd-title); }
.announcement-list time { font-size: .72rem; color: var(--cd-soft); }

/* ------------------------------------------------------------
   MENU DO PLANEJAMENTO
   A partir de 992px é uma coluna à esquerda, no mesmo desenho da
   "Área pessoal" do perfil (profile-clarity.css). Abaixo disso vira
   uma grade de ícones numa linha só, sem rolagem lateral, e os
   subitens da seção aberta viram um seletor de largura total.
   ------------------------------------------------------------ */
.pl-shell.has-nav {
  display: grid;
  grid-template-columns: minmax(225px, 255px) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
}
.pl-main { min-width: 0; }

.pl-nav {
  position: sticky;
  top: 5.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  box-shadow: 0 8px 28px rgba(31, 41, 55, .07);
}
.pl-nav-heading {
  display: grid;
  gap: .16rem;
  padding: .2rem .35rem .85rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--cd-border);
}
.pl-nav-heading > span {
  color: var(--cd-primary-hover);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pl-nav-heading strong {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--cd-title);
  font-size: 1rem;
  font-weight: 750;
}
.pl-nav-heading strong > i { color: var(--cd-primary); font-size: .85rem; }
.pl-nav-heading small { color: var(--cd-gray); font-size: .7rem; }

.pl-nav-tabs { display: grid; gap: .3rem; }
.pl-nav-tab {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 54px;
  padding: .45rem .55rem;
  border: 1px solid transparent;
  border-radius: var(--cd-radius-sm);
  color: var(--cd-gray);
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.pl-nav-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--cd-radius-sm);
  background: #f5f6fa;
  color: #7b8494;
  font-size: .85rem;
  transition: background-color .18s ease, color .18s ease;
}
.pl-nav-copy { min-width: 0; }
.pl-nav-copy strong,
.pl-nav-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-nav-copy strong { color: inherit; font-size: .78rem; font-weight: 700; }
.pl-nav-copy small { margin-top: .14rem; color: var(--cd-soft); font-size: .64rem; font-weight: 500; }
.pl-nav-tab:hover { border-color: rgba(102, 126, 234, .18); background: #fafaff; color: var(--cd-title); }
.pl-nav-tab:hover .pl-nav-icon,
.pl-nav-tab.active .pl-nav-icon { background: #fff; color: var(--cd-primary); }
.pl-nav-tab.active {
  border-color: rgba(102, 126, 234, .24);
  background: var(--cd-primary-soft);
  color: var(--cd-primary-hover);
}
.pl-nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--cd-red);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
}
.pl-nav-tab.active .pl-nav-badge { background: #fff; color: var(--cd-red); }

/* Nome curto só aparece na grade do celular. */
.pl-nav-short { display: none; }

.pl-nav-sub {
  display: grid;
  gap: .1rem;
  margin: .05rem 0 .35rem 1.55rem;
  padding-left: .85rem;
  border-left: 2px solid #e4e7fb;
}
.pl-nav-sub a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: .3rem .6rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--cd-gray);
  text-decoration: none;
}
.pl-nav-sub a:hover { background: #fafaff; color: var(--cd-title); }
.pl-nav-sub a.active { background: #fff; color: var(--cd-primary-hover); box-shadow: inset 0 0 0 1px #dfe3ff; }

@media (max-width: 991.98px) {
  .pl-shell.has-nav { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .pl-nav { position: static; padding: .5rem; }
  .pl-nav-heading { display: none; }
  .pl-nav-tabs {
    grid-template-columns: repeat(var(--pl-nav-cols, 6), minmax(0, 1fr));
    gap: 2px;
  }
  .pl-nav-tab {
    position: relative;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: .25rem;
    min-height: 0;
    padding: .4rem .1rem .35rem;
    text-align: center;
  }
  .pl-nav-tab:hover { border-color: transparent; }
  .pl-nav-icon { width: 34px; height: 34px; }
  .pl-nav-copy { width: 100%; }
  /* Encolhe um pouco em telas estreitas para "Progresso" caber sem reticências. */
  .pl-nav-copy strong { font-size: clamp(.54rem, 2.7vw, .62rem); letter-spacing: -.01em; line-height: 1.15; }
  .pl-nav-copy small { display: none; }
  .pl-nav-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .pl-nav-short { display: inline; }
  .pl-nav-badge {
    position: absolute;
    top: .15rem;
    right: calc(50% - 25px);
    min-width: 18px;
    height: 18px;
    padding: 0 .25rem;
    font-size: .6rem;
    border: 2px solid #fff;
  }
  .pl-nav-tab.active .pl-nav-badge { background: var(--cd-red); color: #fff; }

  /* Subitens: seletor de largura total abaixo da grade. */
  .pl-nav-sub {
    grid-row: 2;
    grid-column: 1 / -1;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 3px;
    margin: .45rem 0 0;
    padding: 3px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
  }
  .pl-nav-sub a {
    justify-content: center;
    min-height: 36px;
    padding: .25rem .3rem;
    text-align: center;
    font-size: .74rem;
    line-height: 1.15;
  }
  .pl-nav-sub a.active { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
}
/* Com a Mentoria ligada são 7 colunas: menos folga e rótulo um pouco menor. */
@media (max-width: 479.98px) {
  .pl-nav.has-mentoria { padding: .35rem; }
  .pl-nav.has-mentoria .pl-nav-tabs { gap: 0; }
  .pl-nav.has-mentoria .pl-nav-tab { padding-inline: 0; }
  .pl-nav.has-mentoria .pl-nav-copy strong { font-size: clamp(.5rem, 2.35vw, .58rem); letter-spacing: -.02em; }
}
@media (max-width: 359.98px) {
  .pl-nav { padding: .35rem; }
  .pl-nav-tabs { gap: 0; }
  .pl-nav-icon { width: 30px; height: 30px; }
}

/* Até 900px o container do SO360 tem 3–4px de margem lateral, menos que o
   meio-gutter das .row (8px): sem isto a página rola na horizontal. */
@media (max-width: 900px) {
  .pl-app { padding-inline: 5px; }
}
@media (max-width: 575.98px) {
  .cd-hero { padding: 1.15rem 1.1rem; border-radius: var(--cd-radius); }
  .cd-hero-icon { width: 44px; height: 44px; font-size: 1.15rem; }
}

/* Relatório de estudos: a impressão leva só o cabeçalho e a tabela. */
@media print {
  .pl-nav, .cd-onboarding { display: none !important; }
  .pl-shell.has-nav { display: block; }
  .pl-app .cd-hero, .pl-app .cd-card { box-shadow: none; border-color: #d1d5db; }
}

/* Dias de estudo (Ajustes e criação do plano): os 7 dias numa fileira, cada
   um com a caixa do dia e os minutos dentro (nov/2026). */
.pl-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.pl-day { display: grid; gap: .4rem; justify-items: stretch; padding: .6rem .5rem; border: 1px solid var(--cd-primary); border-radius: 12px; background: var(--cd-primary-soft); min-width: 0; }
.pl-day-check { display: flex; align-items: center; justify-content: center; gap: .35rem; margin: 0; padding: 0; min-height: 0; }
.pl-day-check .form-check-input { float: none; margin: 0; }
.pl-day-check .form-check-label { font-size: .84rem; }
.pl-day .cd-label { font-size: .66rem; color: var(--cd-gray); font-weight: 600; text-align: center; margin-bottom: .15rem; }
.pl-day .cd-input { min-height: 34px; padding: .2rem .35rem; text-align: center; font-size: .82rem; }
.pl-day:has(input[type="checkbox"]:not(:checked)) { border-color: var(--cd-border); background: var(--cd-light); }
.pl-day:has(input[type="checkbox"]:not(:checked)) .pl-day-minutes,
.pl-day:has(input[type="checkbox"]:not(:checked)) .pl-day-start { opacity: .4; }
@media (max-width: 767.98px) { .pl-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 400px) { .pl-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Dia de descanso na página Hoje */
.pl-rest-day {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border: 1px solid #dfe3ff;
  border-radius: var(--cd-radius);
  background: var(--cd-primary-soft);
  color: var(--cd-text);
  font-size: .9rem;
}
.pl-rest-day > i { color: var(--cd-primary); font-size: 1.3rem; margin-top: .15rem; }
.pl-rest-day strong { color: var(--cd-title); }

/* Plano por livros (out/2026) ------------------------------------------ */
.pl-app .book-row { border: 1px solid var(--cd-border); border-radius: 12px; padding: .9rem; background: #fff; }
.pl-app .book-row + .book-row { margin-top: .75rem; }
.pl-app .book-head { display: flex; gap: .6rem; align-items: flex-start; }
.pl-app .book-cover {
  width: 38px; height: 50px; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center;
  color: #fff; font-size: 1rem; background: var(--cd-primary); box-shadow: inset -4px 0 0 rgba(0, 0, 0, .15);
}
.pl-app .book-meta { font-size: .8rem; color: var(--cd-text); margin-top: .45rem; }
.pl-app .book-meta strong { color: var(--cd-title); }
.pl-app .book-pace {
  display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 10px;
  background: #f0f1ff; color: #3730a3; font-size: .82rem; margin-top: .7rem;
}
.pl-app .book-pace.free { background: #f3f4f6; color: #4b5563; }
.pl-app .book-pace.warn { background: #fffbeb; color: #92400e; }
.pl-app .book-progress { height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.pl-app .book-progress > span { display: block; height: 100%; border-radius: 99px; }
.pl-app .pace-warning { color: #b45309; }

/* Estatísticas: período personalizado */
.pl-app .time-custom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: .6rem; }
.pl-app .time-custom label { display: flex; flex-direction: column; min-width: 150px; }
@media (max-width: 480px) {
  .pl-app .time-custom label { flex: 1 1 100%; }
  .pl-app .time-custom button { width: 100%; justify-content: center; }
}

/* Planos compartilhados (vitrine aberta e aba Planos da comunidade): grade de
   cartões. As colunas seguem a largura da lista (container query), não a da
   tela: com o menu lateral aberto sobra menos espaço e a grade cai para 2. */
.pl-vitrine { container-type: inline-size; }
.pl-vitrine-filtro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}
.pl-vitrine-busca,
.pl-vitrine-filtro-acoes { grid-column: 1 / -1; }
.pl-vitrine-filtro-acoes { display: flex; gap: 0.5rem; }
.pl-vitrine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
.pl-vitrine-vazio { grid-column: 1 / -1; }
@container (min-width: 560px) {
  .pl-vitrine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 880px) {
  .pl-vitrine-filtro { grid-template-columns: 2.2fr 1fr 1fr 1fr 0.7fr auto; }
  .pl-vitrine-busca,
  .pl-vitrine-filtro-acoes { grid-column: auto; }
  .pl-vitrine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pl-plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1.15rem 1.15rem 1rem;
}
.pl-plan-card-tags { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; min-height: 24px; }
.pl-plan-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background: var(--cd-primary-soft);
  color: var(--cd-primary-hover);
}
.pl-plan-tag.is-ano { background: var(--cd-hover); color: var(--cd-text); }
.pl-plan-tag.is-ok { background: #ecfdf5; color: #047857; margin-left: auto; }
.pl-plan-card h3 {
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 2.6em;
}
.pl-plan-card h3 a { color: var(--cd-title); text-decoration: none; }
.pl-plan-card h3 a:hover { color: var(--cd-primary-hover); }
.pl-plan-card-orgao {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--cd-gray);
  margin: -0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.pl-plan-card-orgao b { color: var(--cd-text); font-weight: 600; }
.pl-plan-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--cd-border);
  border-radius: 10px;
  overflow: hidden;
}
.pl-plan-card-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.55rem 0.4rem;
}
.pl-plan-card-stats > div + div { border-left: 1px solid var(--cd-border); }
/* No HTML o rótulo vem antes (dt/dd); na tela o número fica em cima. */
.pl-plan-card-stats dd {
  order: -1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.1;
  color: var(--cd-title);
}
.pl-plan-card-stats dt { font-size: 0.7rem; font-weight: 400; color: var(--cd-gray); }
.pl-plan-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--cd-gray);
}
.pl-plan-card-nota { color: var(--cd-text); font-weight: 650; white-space: nowrap; }
.pl-plan-card-nota i { color: var(--cd-orange); }
.pl-plan-card-acoes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--cd-border);
}
.pl-plan-card-acoes form,
.pl-plan-card-acoes .cd-btn-primary { width: 100%; }
.pl-plan-card-acoes .pl-cost { opacity: 0.8; font-weight: 500; }

/* Estatísticas: qual plano está na tela */
.pl-stats-plano {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.pl-stats-plano-nome { font-size: 1.1rem; font-weight: 750; color: var(--cd-title); text-decoration: none; }
.pl-stats-plano-nome:hover { text-decoration: underline; }
.pl-stats-plano-form { display: flex; flex-direction: column; gap: 0.3rem; min-width: min(100%, 280px); }
.pl-stats-plano-form select { min-width: 0; }
.pl-stats-plano-aviso { flex-basis: 100%; }
.pl-plan-tag.is-ativo { background: #ecfdf5; color: #047857; }
.pl-plan-tag.is-outro { background: #fff7ed; color: #c2410c; }
.cd-stat-tile .tile-scope { font-size: 0.7rem; color: var(--bs-secondary-color); margin-top: 0.35rem; text-transform: lowercase; }

/* ------------------------------------------------------------------
   Hoje com vários planos (nov/2026): topo, abas de planos, identidade
   do tipo de plano, "Comece por aqui", Seu dia e Todos os planos.
   ------------------------------------------------------------------ */
.pl-today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pl-today-head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--cd-title); margin: 0; }
.pl-today-date { color: var(--cd-gray); font-size: .86rem; }
.pl-today-date::first-letter { text-transform: uppercase; }
.pl-streak-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--cd-border); background: #fff; color: var(--cd-title); font-size: .82rem; font-weight: 600; text-decoration: none; }
.pl-streak-pill:hover { border-color: var(--cd-border-strong); color: var(--cd-title); }
.pl-streak-pill i { color: var(--cd-orange); }

/* Cor de cada tipo de plano. O nome do tipo sempre vem escrito ao lado. */
.pl-kind--edital { --pl-kind: #4f6bd8; --pl-kind-soft: #eef1fd; }
.pl-kind--aulas { --pl-kind: #0f8f7e; --pl-kind-soft: #e7f6f3; }
.pl-kind--livros { --pl-kind: #a8691a; --pl-kind-soft: #fbf3e4; }
.pl-kind--cadernos { --pl-kind: #7c4ddb; --pl-kind-soft: #f3effe; }
.pl-kind-icon { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; background: var(--pl-kind-soft, var(--cd-hover-purple)); color: var(--pl-kind, var(--cd-primary)); }
.pl-kind-icon--sm { width: 26px; height: 26px; border-radius: 8px; font-size: .72rem; }
.pl-kind-chip { display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--pl-kind-soft, var(--cd-hover-purple)); color: var(--pl-kind, var(--cd-primary)); vertical-align: 1px; }

.pl-count { display: inline-block; min-width: 20px; padding: 0 .38rem; border-radius: 999px; text-align: center; font-size: .7rem; font-weight: 700; background: #fef6e7; color: #92400e; font-variant-numeric: tabular-nums; }
.pl-count.danger { background: #fef2f2; color: #b91c1c; }

.pl-plan-tabs { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; margin: 0 -2px 1rem; }
.pl-plan-tabs::-webkit-scrollbar { display: none; }
.pl-plan-tab { flex: none; display: flex; align-items: center; gap: .5rem; max-width: 280px; min-height: 46px; padding: .35rem .75rem .35rem .45rem; border-radius: 12px; border: 1px solid var(--cd-border); background: #fff; color: var(--cd-title); font-size: .84rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.pl-plan-tab:hover { border-color: var(--cd-border-strong); color: var(--cd-title); }
.pl-plan-tab.active { border-color: var(--cd-primary); box-shadow: 0 0 0 2px rgba(102, 126, 234, .18); }
.pl-plan-tab--all { padding-left: .8rem; }
.pl-plan-tab--add { color: var(--cd-gray); border-style: dashed; padding: .35rem .85rem; }
.pl-plan-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.pl-plan-tab-name small { display: block; font-size: .68rem; font-weight: 600; color: var(--cd-gray); }

.pl-plan-line { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--cd-border); }
.pl-plan-line-text { flex: 1; min-width: 180px; }
.pl-plan-line-name strong { font-size: 1rem; color: var(--cd-title); }
.pl-countdown { text-align: right; line-height: 1.1; }
.pl-countdown strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--cd-title); }
.pl-countdown span { font-size: .7rem; color: var(--cd-gray); }

/* Mostrador sem tempo definido: some até o cronômetro começar. */
.cd-agenda-block .timer-display:empty { display: none; }

/* "Comece por aqui": o primeiro item da lista de estudo. */
.cd-agenda-block.is-featured { padding: 1rem 1.1rem; border-color: #d8d3f5; background: linear-gradient(180deg, #fafaff, #fff); }
.cd-agenda-block.is-featured.active { border-color: var(--cd-primary); }
.cd-agenda-block.is-featured .color-strip { width: 5px; }
.cd-agenda-block.is-featured [data-action] { min-height: 44px; padding-inline: 1.1rem; font-size: .92rem; }
.pl-featured-eyebrow { display: flex; align-items: center; gap: .35rem; margin-bottom: .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cd-primary-hover); }
.pl-featured-eyebrow i { font-size: .6rem; }
.cd-agenda-block.is-featured .pl-block-title { font-size: .98rem; font-weight: 700 !important; }

/* Seu dia */
.pl-day-big { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--cd-title); }
.pl-week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin-top: .9rem; }
.pl-week-strip > span { display: grid; justify-items: center; gap: .2rem; font-size: .66rem; color: var(--cd-gray); }
.pl-week-strip .heatmap-cell { width: 100%; max-width: 28px; border-radius: 7px; }

/* Nos outros planos */
.pl-others { list-style: none; margin: .5rem 0 0; padding: 0; }
.pl-others li { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--cd-border); }
.pl-others li:first-child { border-top: 0; padding-top: .35rem; }
.pl-others-text { flex: 1; min-width: 0; }
.pl-others-text strong { display: block; font-size: .86rem; color: var(--cd-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-others-alert, .pl-others-warn { display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; }
.pl-others-alert { color: #b91c1c; }
.pl-others-warn { color: #92400e; }
.pl-btn-sm { min-height: 34px; padding: .25rem .7rem; font-size: .8rem; }

/* Todos os planos */
.pl-all-plans { display: grid; gap: 1rem; }
.pl-all-group { padding: 0; overflow: hidden; }
.pl-all-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .85rem 1.1rem; border-bottom: 1px solid var(--cd-border); background: #fbfbfc; }
.pl-all-head-text { flex: 1; min-width: 180px; }
.pl-all-head h2 { font-size: .98rem; font-weight: 700; margin: 0; color: var(--cd-title); }
.pl-all-list { list-style: none; margin: 0; padding: .2rem 1.1rem; }
.pl-all-list li { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid #f1f2f5; }
.pl-all-list li:last-child { border-bottom: 0; }
.pl-all-strip { flex: none; width: 4px; align-self: stretch; border-radius: 4px; }
.pl-all-text { flex: 1; min-width: 0; }
.pl-all-title { font-size: .88rem; font-weight: 600; color: var(--cd-title); }
.pl-all-empty { color: var(--cd-gray); font-size: .85rem; }
.pl-all-more { display: block; width: 100%; padding: .6rem 1.1rem; border: 0; border-top: 1px solid var(--cd-border); background: none; text-align: left; font-size: .82rem; font-weight: 600; color: var(--cd-primary-hover); text-decoration: none; cursor: pointer; }
.pl-all-more:hover { background: #fbfbfc; }

@media (max-width: 575.98px) {
  .pl-today-head h1 { font-size: 1.3rem; }
  .pl-plan-tab { max-width: 220px; }
  .pl-countdown { text-align: left; }
  .cd-agenda-block.is-featured [data-action] { flex: 1; justify-content: center; }
  .pl-all-list li { flex-wrap: wrap; }
  .pl-all-list li > form, .pl-all-list li > a { margin-left: calc(4px + .8rem); }
}

/* Plano em foco no topo do menu lateral (só com dois planos ou mais). */
.pl-nav-heading:has(.pl-nav-focus) { grid-template-columns: minmax(0, 1fr); }
.pl-nav-focus { min-width: 0; display: flex; align-items: center; gap: .55rem; margin-top: .6rem; padding: .45rem .55rem; border: 1px solid var(--cd-border); border-radius: 10px; color: var(--cd-title); text-decoration: none; }
.pl-nav-focus:hover { background: var(--cd-light); color: var(--cd-title); }
.pl-nav-focus > i { color: var(--cd-gray); font-size: .72rem; }
.pl-nav-focus-text { flex: 1; min-width: 0; line-height: 1.25; }
.pl-nav-focus-text b { display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-nav-focus-text span { display: block; font-size: .68rem; color: var(--cd-gray); }

/* Meus planos */
.pl-myplans-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.pl-myplans-head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--cd-title); margin: 0 0 .15rem; }
.pl-cost-chip { display: inline-flex; align-items: center; gap: .15rem; padding: .02rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(255, 255, 255, .22); }
.cd-section-label .pl-cost-chip, .pl-myplans-head .cd-btn-soft .pl-cost-chip { background: #fef6e7; color: #92400e; letter-spacing: 0; text-transform: none; }
.pl-myplan.is-focus { border-color: #d8d3f5; box-shadow: 0 0 0 3px rgba(102, 126, 234, .08); }
.pl-myplans-list { padding: 0; }
.pl-myplans-list > .pl-myplan { padding: .95rem 1.1rem; border-bottom: 1px solid var(--cd-border); }
.pl-myplans-list > .pl-myplan:last-child { border-bottom: 0; }
.pl-myplan-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px auto; gap: .9rem; align-items: center; }
.pl-myplan-name { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.pl-myplan-name a { color: var(--cd-title); text-decoration: none; }
.pl-myplan-name a:hover { color: var(--cd-primary-hover); }
.pl-myplan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; margin-top: .25rem; font-size: .78rem; color: var(--cd-gray); }
.pl-myplan-alert, .pl-myplan-warn { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }
.pl-myplan-alert { color: #b91c1c; }
.pl-myplan-warn { color: #92400e; }
.pl-myplan-progress { font-size: .74rem; color: var(--cd-gray); }
.pl-myplan-actions { display: flex; gap: .4rem; align-items: center; }
.pl-myplans-closed { padding: .85rem 1.1rem; }
.pl-myplans-closed summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; list-style: none; font-size: .86rem; font-weight: 600; color: var(--cd-gray); }
.pl-myplans-closed summary::-webkit-details-marker { display: none; }
.pl-myplans-closed summary i { font-size: .65rem; transition: transform .15s; }
.pl-myplans-closed[open] summary i { transform: rotate(90deg); }
.pl-myplans-closed .pl-myplans-list > .pl-myplan { padding: .8rem 0; }
.pl-kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.pl-kind-option { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem; border: 1px solid var(--cd-border); border-radius: 12px; background: #fff; color: var(--cd-title); text-decoration: none; }
.pl-kind-option:hover { border-color: var(--cd-primary); color: var(--cd-title); }
.pl-kind-option strong { display: block; font-size: .84rem; }
.pl-kind-option small { display: block; font-size: .74rem; color: var(--cd-gray); line-height: 1.35; }
@media (max-width: 991.98px) {
  .pl-myplan-row { grid-template-columns: auto minmax(0, 1fr); }
  .pl-myplan-progress, .pl-myplan-actions { grid-column: 1 / -1; }
  .pl-kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .pl-myplan-actions > form, .pl-myplan-actions > .cd-btn-primary { flex: 1; }
  .pl-myplan-actions .cd-btn-primary { width: 100%; justify-content: center; }
  .pl-kind-grid { grid-template-columns: 1fr; }
}

/* Mapa de estudo em Progresso: na largura cheia as células ficavam enormes. */
#mapa .heatmap { max-width: 560px; }
#mapa { scroll-margin-top: 6rem; }

/* Cabeçalho único das páginas do planejamento (nov/2026): contexto em cima
   (plano em foco ou trilha), título e ações à direita. Substitui o .cd-hero. */
.pl-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pl-page-head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--cd-title); margin: 0; }
.pl-page-head-sub { color: var(--cd-gray); font-size: .86rem; margin-top: .15rem; }
.pl-page-ctx { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; min-height: 1.4rem; margin-bottom: .2rem; color: var(--cd-gray); font-size: .82rem; }
.pl-page-ctx a { color: var(--cd-gray); text-decoration: none; }
.pl-page-ctx a:hover { color: var(--cd-primary-hover); }
.pl-page-ctx .fa-chevron-right { font-size: .55rem; }
.pl-page-ctx b { color: var(--cd-title); font-weight: 600; }
.pl-page-actions { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.pl-focus-chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .12rem .6rem .12rem .2rem; border: 1px solid var(--cd-border); border-radius: 999px; background: #fff; color: var(--cd-title) !important; font-size: .78rem; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-focus-chip:hover { border-color: var(--cd-border-strong); }
.pl-focus-chip .pl-kind-icon { width: 20px; height: 20px; border-radius: 999px; font-size: .56rem; }
.pl-page-ctx-note { font-size: .78rem; }
@media (max-width: 575.98px) { .pl-page-head h1 { font-size: 1.3rem; } }

/* Revisões (nov/2026, refeita): o Hoje executa, esta página cuida da memória.
   Fila com uma ação por linha, sessão em sequência, próximos 14 dias,
   memória por disciplina e histórico. */
.pl-rate-skip { min-height: 40px; padding: .25rem .7rem; border: 0; background: none; color: var(--cd-gray); font-size: .8rem; font-weight: 600; cursor: pointer; }
.pl-rate-skip:hover { color: var(--cd-title); }
.pl-empty { display: grid; justify-items: center; gap: .45rem; text-align: center; padding: 1.8rem 1rem; }
.pl-empty > i { font-size: 1.6rem; color: var(--cd-soft); }
.pl-empty strong { color: var(--cd-title); }
.pl-empty p { margin: 0; max-width: 460px; color: var(--cd-gray); font-size: .88rem; }

.pl-rv-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pl-rv-sec-head h2 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--cd-title); }
.pl-rv-sec-head > span { font-size: .8rem; color: var(--cd-gray); }
.pl-rv-muted { margin: 0; color: var(--cd-gray); font-size: .86rem; }
.pl-rv-dot { flex: none; width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.pl-rv-link { border: 0; background: none; padding: 0; color: var(--cd-primary-hover); font-weight: 600; text-decoration: underline; cursor: pointer; }

.pl-rv-now { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; border-color: #d8d3f5; background: linear-gradient(180deg, #fafaff, #fff); }
.pl-rv-eyebrow { display: flex; align-items: center; gap: .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--cd-primary-hover); }
.pl-rv-now h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: .1rem 0 .3rem; color: var(--cd-title); }
.pl-rv-now-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .84rem; color: var(--cd-gray); }
.pl-rv-now-meta b { color: var(--cd-title); }
.pl-rv-now-meta .is-overdue b { color: #b91c1c; }
.pl-rv-bar { display: flex; height: 8px; max-width: 420px; margin-top: .7rem; border-radius: 99px; overflow: hidden; background: #fbbf24; }
.pl-rv-bar i { display: block; height: 100%; }
.pl-rv-bar .is-overdue { background: #ef4444; }
.pl-rv-now-actions { display: grid; gap: .45rem; min-width: 220px; }
.pl-rv-start { width: 100%; min-height: 46px; font-size: .95rem; justify-content: center; }

.pl-rv-group { display: flex; align-items: center; gap: .4rem; padding: .7rem 0 .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--cd-gray); }
.pl-rv-group.is-overdue { color: #b91c1c; }
.pl-rv-row { display: grid; grid-template-columns: 4px minmax(0, 1fr) 130px auto; gap: .2rem .9rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid #f1f2f5; }
.pl-rv-row:last-child { border-bottom: 0; }
.pl-rv-strip { align-self: stretch; border-radius: 4px; }
.pl-rv-row-text { min-width: 0; }
.pl-rv-row-text h3 { font-size: .92rem; font-weight: 700; margin: 0; color: var(--cd-title); }
.pl-rv-row-text div { font-size: .8rem; color: var(--cd-gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-rv-chance { font-size: .72rem; color: var(--cd-gray); line-height: 1.3; }
.pl-rv-chance b { font-size: .84rem; color: var(--cd-title); }
.pl-rv-chance-bar { display: block; height: 5px; margin-top: .2rem; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pl-rv-chance-bar i { display: block; height: 100%; border-radius: 99px; background: #10b981; }
.pl-rv-chance.is-low .pl-rv-chance-bar i { background: #ef4444; }
.pl-rv-chance.is-mid .pl-rv-chance-bar i { background: #f59e0b; }
.pl-rv-row-actions { display: flex; align-items: center; gap: .3rem; }
.pl-rv-more { position: relative; }
.pl-rv-more-btn { list-style: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--cd-gray); cursor: pointer; }
.pl-rv-more-btn::-webkit-details-marker { display: none; }
.pl-rv-more-btn:hover, .pl-rv-more[open] .pl-rv-more-btn { background: #f3f4f6; color: var(--cd-title); }
.pl-rv-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; padding: .3rem; border: 1px solid var(--cd-border); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(31, 41, 55, .14); }
.pl-rv-menu button, .pl-rv-menu a { display: flex; align-items: flex-start; gap: .55rem; width: 100%; padding: .5rem .55rem; border: 0; border-radius: 7px; background: none; color: var(--cd-title); font-size: .84rem; text-align: left; text-decoration: none; cursor: pointer; }
.pl-rv-menu button:hover, .pl-rv-menu a:hover { background: #f6f7fb; }
.pl-rv-menu i { width: 16px; margin-top: .2rem; color: var(--cd-gray); }
.pl-rv-menu small { display: block; color: var(--cd-gray); font-size: .74rem; }

.pl-rv-clear { display: flex; align-items: center; gap: 1rem; border-color: #b7e4cf; background: linear-gradient(180deg, #f3fcf8, #fff); }
.pl-rv-clear-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #ecfdf5; color: #047857; font-size: 1.2rem; }
.pl-rv-clear h2 { font-size: 1.1rem; font-weight: 800; margin: 0; color: var(--cd-title); }
.pl-rv-clear p { margin: 0; color: var(--cd-gray); font-size: .86rem; }

.pl-rv-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.pl-rv-cal { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: .3rem; height: 124px; }
.pl-rv-cal button { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .25rem; height: 100%; padding: 0 0 .1rem; border: 0; border-radius: 6px; background: none; align-items: end; justify-items: center; cursor: pointer; }
.pl-rv-col { width: 100%; max-width: 26px; min-height: 4px; padding-top: 2px; border-radius: 5px 5px 2px 2px; background: #c7cdf6; color: #3c4596; font-size: .66rem; font-weight: 700; text-align: center; line-height: 1.2; }
.pl-rv-col.is-today { background: var(--cd-primary); color: #fff; }
.pl-rv-col.is-peak { background: #f59e0b; color: #fff; }
.pl-rv-cal small { font-size: .62rem; line-height: 1.15; color: var(--cd-gray); text-align: center; }
.pl-rv-cal button[aria-selected="true"] .pl-rv-col { outline: 2px solid var(--cd-primary-hover); outline-offset: 1px; }
.pl-rv-cal button[aria-selected="true"] small { color: var(--cd-primary-hover); font-weight: 700; }
.pl-rv-day { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid #f1f2f5; }
.pl-rv-day-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .86rem; color: var(--cd-title); }
.pl-rv-day-head span { color: var(--cd-gray); font-size: .8rem; }
.pl-rv-day ul { list-style: none; margin: .3rem 0 0; padding: 0; }
.pl-rv-day li { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; font-size: .84rem; }
.pl-rv-day-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cd-title); }
.pl-rv-day-name small, .pl-rv-hist-name small { color: var(--cd-gray); }
.pl-rv-day-empty { margin: .3rem 0 0; color: var(--cd-gray); font-size: .82rem; }
.pl-rv-peak { display: flex; gap: .55rem; align-items: flex-start; margin-top: .8rem; padding: .6rem .75rem; border-radius: 10px; background: #fef6e7; color: #92400e; font-size: .82rem; }
.pl-rv-peak > i { margin-top: .2rem; }

.pl-rv-mem { list-style: none; margin: 0; padding: 0; }
.pl-rv-mem li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid #f1f2f5; }
.pl-rv-mem li:last-child { border-bottom: 0; }
.pl-rv-mem-name { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .86rem; font-weight: 600; color: var(--cd-title); }
.pl-rv-mem-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-rv-mem strong { font-size: .9rem; }
.pl-rv-mem-bar { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 99px; background: #eef0f4; }
.pl-rv-mem-bar i { display: block; height: 100%; border-radius: 99px; background: #10b981; }
.pl-rv-mem-goal, .pl-rv-legend i { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--cd-title); opacity: .45; }
.pl-rv-mem-sub { grid-column: 1 / -1; font-size: .76rem; color: var(--cd-gray); }
.pl-rv-mem .is-risk { color: #b91c1c; font-weight: 600; }
.pl-rv-mem .is-ok strong { color: #047857; }
.pl-rv-mem .is-warn strong { color: #92400e; }
.pl-rv-mem .is-warn .pl-rv-mem-bar i { background: #f59e0b; }
.pl-rv-mem .is-bad strong { color: #b91c1c; }
.pl-rv-mem .is-bad .pl-rv-mem-bar i { background: #ef4444; }
.pl-rv-legend { position: relative; margin: .5rem 0 0; padding-left: .7rem; font-size: .74rem; color: var(--cd-gray); }
.pl-rv-legend i { top: .2rem; bottom: .2rem; left: 0; }

.pl-rv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.pl-rv-stats div { padding: .5rem .65rem; border: 1px solid #f1f2f5; border-radius: 10px; background: #fbfbfc; }
.pl-rv-stats b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--cd-title); }
.pl-rv-stats small { font-size: .74rem; color: var(--cd-gray); }
.pl-rv-hist { list-style: none; margin: 0; padding: 0; }
.pl-rv-hist li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid #f1f2f5; font-size: .84rem; }
.pl-rv-hist li:last-child { border-bottom: 0; }
.pl-rv-when { flex: none; width: 58px; color: var(--cd-gray); font-size: .78rem; }
.pl-rv-hist-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cd-title); }
.pl-rv-back { flex: none; color: var(--cd-gray); font-size: .76rem; }
.pl-rv-grade { flex: none; padding: .05rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pl-rv-grade--again { background: #fef2f2; color: #b91c1c; }
.pl-rv-grade--hard { background: #fef6e7; color: #92400e; }
.pl-rv-grade--good { background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-rv-grade--easy { background: #ecfdf5; color: #047857; }

/* Sessão de revisão: uma por vez, cronômetro, nota e a próxima. */
.pl-rs { max-width: 600px; margin: 0 auto; padding: 0; overflow: hidden; }
.pl-rs-top { display: flex; align-items: center; gap: .7rem; padding: .8rem 1.1rem; border-bottom: 1px solid #f1f2f5; }
.pl-rs-progress { flex: 1; min-width: 0; font-size: .76rem; font-weight: 600; color: var(--cd-gray); }
.pl-rs-progress span { display: block; height: 5px; margin-top: .25rem; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pl-rs-progress i { display: block; height: 100%; background: var(--cd-primary); }
.pl-rs-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--cd-gray); text-decoration: none; }
.pl-rs-close:hover { background: #f3f4f6; color: var(--cd-title); }
.pl-rs-body { padding: 1.2rem 1.3rem 1.3rem; }
.pl-rs-subject { display: flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cd-gray); }
.pl-rs-subject .is-late { color: #b91c1c; }
.pl-rs-body h1, .pl-rs-body h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; margin: .2rem 0 .3rem; color: var(--cd-title); }
.pl-rs-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .82rem; color: var(--cd-gray); }
.pl-rs-steps { list-style: none; display: grid; gap: .45rem; margin: 1rem 0; padding: 0; }
.pl-rs-steps li { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid #f1f2f5; border-radius: 10px; background: #fbfbfc; font-size: .86rem; color: var(--cd-title); }
.pl-rs-steps b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cd-primary-soft); color: var(--cd-primary-hover); font-size: .74rem; }
.pl-rs-steps small { display: block; color: var(--cd-gray); font-size: .78rem; }
.pl-rs-clock { margin: .3rem 0 .1rem; font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; text-align: center; color: var(--cd-title); font-variant-numeric: tabular-nums; }
.pl-rs-clock-sub { margin-bottom: 1rem; text-align: center; font-size: .8rem; color: var(--cd-gray); }
.pl-rs-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pl-rs-actions .cd-btn-primary { min-height: 44px; }
.pl-rs-foot { margin: .9rem 0 0; text-align: center; font-size: .82rem; color: var(--cd-gray); }
.pl-rs-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .9rem 0 1rem; border: 0; padding: 0; }
.pl-rs-rates label { position: relative; display: grid; gap: .1rem; padding: .7rem .8rem; border: 1.5px solid var(--cd-border); border-radius: 12px; cursor: pointer; }
.pl-rs-rates label:hover { background: #fbfbfc; }
.pl-rs-rates input { position: absolute; opacity: 0; }
.pl-rs-rates input:focus-visible ~ b { outline: 3px solid #f59e0b; outline-offset: 2px; }
.pl-rs-rates label:has(input:checked) { border-color: var(--cd-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, .18); }
.pl-rs-rates b { font-size: .93rem; color: var(--cd-title); }
.pl-rs-rates span { font-size: .78rem; color: var(--cd-gray); }
.pl-rs-rates em { margin-top: .15rem; font-style: normal; font-size: .74rem; font-weight: 700; }
.pl-rs-rates .is-again em { color: #b91c1c; }
.pl-rs-rates .is-hard em { color: #92400e; }
.pl-rs-rates .is-good em { color: var(--cd-primary-hover); }
.pl-rs-rates .is-easy em { color: #047857; }
.pl-rs-note { margin: 0 0 1rem; padding: .55rem .7rem; border-radius: 10px; background: #f6f7fb; font-size: .82rem; color: var(--cd-gray); }
.pl-rs-done-icon { width: 54px; height: 54px; margin: .2rem auto .6rem; border-radius: 50%; display: grid; place-items: center; background: #ecfdf5; color: #047857; font-size: 1.4rem; }
.pl-rs-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0; }
.pl-rs-summary div { padding: .55rem .3rem; border: 1px solid #f1f2f5; border-radius: 10px; background: #fbfbfc; text-align: center; }
.pl-rs-summary b { display: block; font-size: 1.2rem; font-weight: 800; color: var(--cd-title); }
.pl-rs-summary small { font-size: .74rem; color: var(--cd-gray); }

@media (max-width: 991.98px) {
  .pl-rv-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .pl-rv-now { grid-template-columns: minmax(0, 1fr); }
  .pl-rv-now-actions { min-width: 0; }
  .pl-rv-row { grid-template-columns: 4px minmax(0, 1fr) auto; }
  .pl-rv-row .pl-rv-strip { grid-row: span 2; }
  .pl-rv-chance { grid-column: 2; grid-row: 2; max-width: 170px; }
  .pl-rv-row-actions { grid-column: 3; grid-row: 1 / span 2; }
  .pl-rv-cal { grid-template-columns: repeat(7, minmax(0, 1fr)); height: auto; row-gap: .6rem; }
  .pl-rv-cal button { height: 84px; }
  .pl-rv-back { display: none; }
  .pl-rv-stats b { font-size: 1rem; }
  .pl-rs-body { padding: 1rem; }
  .pl-rs-rates { grid-template-columns: minmax(0, 1fr); }
}

/* Progresso (nov/2026, refeita): ritmo até a prova, semana, disciplinas,
   constância e metas; histórico de tempo fechado no fim. */
.pl-pg-scope { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #eceef4; }
.pl-pg-scope a { padding: .3rem .7rem; border-radius: 8px; color: var(--cd-gray); font-size: .8rem; font-weight: 600; text-decoration: none; }
.pl-pg-scope a[aria-current="page"] { background: #fff; color: var(--cd-title); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pl-pg-pace { border-color: #d8d3f5; background: linear-gradient(180deg, #fafaff, #fff); }
.pl-pg-pace-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.pl-pg-pace h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; margin: .1rem 0 .2rem; color: var(--cd-title); }
.pl-pg-pace h2 .is-bad { color: #b91c1c; }
.pl-pg-pace h2 .is-ok { color: #047857; }
.pl-pg-pace-sub { margin: 0; color: var(--cd-gray); font-size: .86rem; }
.pl-pg-status { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 99px; background: #f3f4f6; color: var(--cd-gray); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pl-pg-status.is-bad { background: #fef2f2; color: #b91c1c; }
.pl-pg-status.is-ok { background: #ecfdf5; color: #047857; }
.pl-pg-track { position: relative; margin: 1rem 0 .4rem; }
.pl-pg-track.has-expected { margin-top: 1.7rem; }
.pl-pg-track-bar { height: 12px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pl-pg-track-bar i { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: var(--cd-primary); }
.pl-pg-expected { position: absolute; top: -6px; bottom: -6px; width: 2px; border-radius: 2px; background: var(--cd-title); opacity: .6; }
.pl-pg-expected span { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: .68rem; font-weight: 700; color: var(--cd-title); white-space: nowrap; }
.pl-pg-track-legend { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--cd-gray); }
.pl-pg-track-legend b { color: var(--cd-title); }
.pl-pg-pace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.pl-pg-pace-grid > div { padding: .65rem .8rem; border: 1px solid var(--cd-border); border-radius: 12px; background: #fff; }
.pl-pg-pace-grid small { display: block; font-size: .72rem; color: var(--cd-gray); }
.pl-pg-pace-grid b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--cd-title); }
.pl-pg-pace-grid b.is-bad { color: #b91c1c; }
.pl-pg-pace-grid span { font-size: .76rem; color: var(--cd-gray); }
.pl-pg-tip { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; padding: .7rem .85rem; border-radius: 12px; background: #fef6e7; color: #92400e; font-size: .84rem; }
.pl-pg-tip.is-info { background: var(--cd-primary-soft); color: #3c4596; }
.pl-pg-tip > span { flex: 1 1 260px; }

.pl-pg-week { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 1.2rem; align-items: start; }
.pl-pg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; }
.pl-pg-kpi { padding: .65rem .8rem; border: 1px solid var(--cd-border); border-radius: 12px; min-width: 0; }
.pl-pg-kpi small { display: block; font-size: .72rem; color: var(--cd-gray); }
.pl-pg-kpi b { display: block; font-size: 1.2rem; font-weight: 800; color: var(--cd-title); }
.pl-pg-kpi > span { font-size: .75rem; color: var(--cd-gray); }
.pl-pg-kpi .is-up { color: #047857; font-weight: 700; }
.pl-pg-kpi .is-down { color: #b91c1c; font-weight: 700; }
.pl-pg-meter { height: 5px; margin-top: .35rem; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pl-pg-meter i { display: block; height: 100%; background: #10b981; }
.pl-pg-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; align-items: end; margin-top: 1rem; }
.pl-pg-days > div { display: grid; justify-items: center; gap: .25rem; }
.pl-pg-days i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: #c7cdf6; }
.pl-pg-days i.is-today { background: var(--cd-primary); }
.pl-pg-days i.is-empty { background: #eef0f4; }
.pl-pg-days small { font-size: .7rem; color: var(--cd-gray); text-align: center; line-height: 1.15; }
.pl-pg-days small b { color: var(--cd-title); }
.pl-pg-did h3 { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--cd-gray); margin: 0 0 .4rem; }
.pl-pg-did ul { list-style: none; margin: 0; padding: 0; }
.pl-pg-did li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid #f1f2f5; font-size: .82rem; }
.pl-pg-did li:last-child { border-bottom: 0; }
.pl-pg-did-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cd-title); }
.pl-pg-did-name small { color: var(--cd-gray); }
.pl-pg-tag { flex: none; padding: .02rem .45rem; border-radius: 99px; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.pl-pg-tag.is-done { background: #ecfdf5; color: #047857; }
.pl-pg-tag.is-review { background: #fef6e7; color: #92400e; }

.pl-pg-table-wrap { margin: 0; }
.pl-pg-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pl-pg-table th[scope="col"] { padding: .4rem .5rem; border-bottom: 1px solid var(--cd-border); color: var(--cd-gray); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; text-align: left; }
.pl-pg-table th[scope="row"], .pl-pg-table td { padding: .6rem .5rem; border-bottom: 1px solid #f1f2f5; vertical-align: middle; text-align: left; font-weight: 400; }
.pl-pg-table tbody tr:last-child > * { border-bottom: 0; }
.pl-pg-table .is-num { text-align: right; color: var(--cd-gray); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-pg-subject { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--cd-title); }
.pl-pg-prog { display: flex; align-items: center; gap: .5rem; min-width: 140px; }
.pl-pg-prog-bar { flex: 1; height: 7px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pl-pg-prog-bar i { display: block; height: 100%; border-radius: 99px; }
.pl-pg-prog > span:last-child { font-size: .78rem; color: var(--cd-gray); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-pg-last { font-size: .8rem; white-space: nowrap; color: var(--cd-text); }
.pl-pg-last.is-stale { color: #b91c1c; font-weight: 600; }
.pl-pg-last.is-new { color: #92400e; font-weight: 600; }
.pl-pg-last.is-done { color: #047857; }
.pl-pg-go { font-size: .8rem; font-weight: 600; white-space: nowrap; }

.pl-pg-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.pl-pg-streak { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .8rem; color: var(--cd-gray); }
.pl-pg-streak b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--cd-title); }
.pl-pg-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.pl-pg-goal-head, .pl-pg-goal-foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; }
.pl-pg-goal-head { margin-bottom: .3rem; }
.pl-pg-goal-foot { margin-top: .3rem; font-size: .76rem; color: var(--cd-gray); }
.pl-pg-goals-empty { text-align: center; color: var(--cd-gray); font-size: .84rem; }
.pl-pg-goals-empty > i { display: block; margin-bottom: .4rem; font-size: 1.4rem; color: var(--cd-soft); }
.pl-pg-goals-empty p { margin: 0 0 .8rem; }
.pl-pg-goals-empty ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; text-align: left; }
.pl-pg-goals-empty button { display: flex; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; padding: .5rem .7rem; border: 1px dashed var(--cd-border-strong); border-radius: 10px; background: #fff; color: var(--cd-title); font-size: .82rem; cursor: pointer; }
.pl-pg-goals-empty button:hover { border-color: var(--cd-primary); background: var(--cd-primary-soft); }
.pl-pg-goals-empty button i { color: var(--cd-primary-hover); }

.pl-pg-hours { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid #f1f2f5; font-size: .84rem; color: var(--cd-title); }
.pl-pg-hours label { margin: 0; font-weight: 600; }
.pl-pg-hours input { width: 72px; min-height: 34px; padding: .2rem .4rem; text-align: center; }
.pl-pg-hours-bar { flex-basis: 100%; }
.pl-pg-hours-bar small, .pl-pg-hours-hint { display: block; margin-top: .25rem; color: var(--cd-gray); font-size: .76rem; }
.pl-pg-hours-hint { flex-basis: 100%; margin-top: 0; }
.pl-pg-history > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; list-style: none; cursor: pointer; font-size: 1rem; font-weight: 700; color: var(--cd-title); }
.pl-pg-history > summary::-webkit-details-marker { display: none; }
.pl-pg-history-sub { font-size: .8rem; font-weight: 500; color: var(--cd-gray); }
.pl-pg-history[open] > summary .fa-chevron-down { transform: rotate(180deg); }

@media (max-width: 991.98px) {
  .pl-pg-week, .pl-pg-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .pl-pg-pace-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-pg-pace h2 { font-size: 1.12rem; }
  .pl-pg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Tabela vira lista: disciplina e último estudo em cima, progresso embaixo. */
  .pl-pg-table thead { display: none; }
  .pl-pg-table, .pl-pg-table tbody { display: block; }
  .pl-pg-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .6rem; padding: .6rem 0; border-bottom: 1px solid #f1f2f5; }
  .pl-pg-table tr[hidden] { display: none; }
  .pl-pg-table tbody tr:last-child { border-bottom: 0; }
  .pl-pg-table th[scope="row"], .pl-pg-table td { padding: 0; border: 0; }
  .pl-pg-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .pl-pg-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .pl-pg-table td:nth-child(4)::before { content: "na semana "; }
  .pl-pg-table td:nth-child(5)::before { content: "média "; }
  .pl-pg-table td:nth-child(4), .pl-pg-table td:nth-child(5) { grid-row: 3; text-align: left; font-size: .76rem; }
  .pl-pg-table td:nth-child(5) { text-align: right; }
  .pl-pg-table td:nth-child(6):empty { display: none; }
  .pl-pg-table td:nth-child(6) { grid-column: 1 / -1; }
}

/* Ajustes (nov/2026, refeita): menos campos, cada um com efeito visível. */
.pl-aj-nav { position: sticky; top: .75rem; z-index: 20; display: flex; gap: .35rem; padding: .35rem; border-radius: 12px; background: rgba(246, 247, 251, .94); backdrop-filter: blur(6px); overflow-x: auto; scrollbar-width: none; }
.pl-aj-nav a { flex: none; padding: .35rem .8rem; border: 1px solid var(--cd-border); border-radius: 99px; background: #fff; color: var(--cd-gray); font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pl-aj-nav a:hover { color: var(--cd-title); }
.pl-aj-nav a[aria-current] { border-color: #d8d3f5; background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-anchor { scroll-margin-top: 4.5rem; }
.pl-aj-sub { margin: 0 0 .9rem; color: var(--cd-gray); font-size: .86rem; }
.pl-aj-saved { display: inline-flex; align-items: center; gap: .3rem; color: #047857; font-size: .78rem; font-weight: 600; }
.pl-aj-error { margin: .6rem 0 0; color: #b91c1c; font-size: .84rem; }
.pl-aj-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.pl-aj-day { display: grid; justify-items: center; gap: .1rem; width: 100%; padding: .6rem .2rem; border: 1.5px solid var(--cd-border); border-radius: 12px; background: #fff; color: var(--cd-title); font-size: .86rem; font-weight: 700; cursor: pointer; }
.pl-aj-day small { font-size: .68rem; font-weight: 600; color: var(--cd-gray); }
.pl-aj-day.is-on { border-color: var(--cd-primary); background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-aj-day.is-on small { color: var(--cd-primary-hover); }
.pl-aj-day:disabled { opacity: .6; }
.pl-aj-total { display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #f1f2f5; font-size: .86rem; color: var(--cd-text); }
.pl-aj-total b { color: var(--cd-title); }
.pl-aj-presets { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .8rem; }
.pl-aj-presets span { font-size: .78rem; color: var(--cd-gray); }
.pl-aj-presets button { padding: .25rem .65rem; border: 1px dashed var(--cd-border-strong); border-radius: 99px; background: #fff; color: var(--cd-title); font-size: .78rem; font-weight: 600; cursor: pointer; }
.pl-aj-presets button:hover { border-color: var(--cd-primary); color: var(--cd-primary-hover); }
.pl-aj-week { display: grid; gap: .45rem; }
.pl-aj-weekday { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .8rem; align-items: center; margin: 0; padding: .45rem .6rem; border: 1px solid var(--cd-border); border-radius: 12px; min-width: 0; }
.pl-aj-weekday.is-off { background: #fbfbfc; }
.pl-aj-weekday legend { float: left; width: auto; margin: 0; padding: 0; font-size: .88rem; font-weight: 700; color: var(--cd-title); }
.pl-aj-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: #eceef4; justify-self: start; }
.pl-aj-seg label { position: relative; display: inline-flex; align-items: center; gap: .3rem; margin: 0; padding: .3rem .65rem; border-radius: 8px; color: var(--cd-gray); font-size: .8rem; font-weight: 600; cursor: pointer; }
.pl-aj-seg input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pl-aj-seg label:has(input[type=radio]:checked) { background: #fff; color: var(--cd-title); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pl-aj-seg label:has(input[type=radio]:focus-visible) { outline: 3px solid rgba(102, 126, 234, .55); outline-offset: 1px; }
.pl-aj-seg input[type=number] { width: 58px; padding: .1rem .3rem; border: 1px solid var(--cd-border-strong); border-radius: 6px; font-size: .8rem; text-align: center; }

.pl-aj-exceptions { list-style: none; margin: 0 0 .8rem; padding: 0; }
.pl-aj-exceptions li { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid #f1f2f5; font-size: .86rem; }
.pl-aj-exceptions li:last-child { border-bottom: 0; }
.pl-aj-exc-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fef6e7; color: #92400e; }
.pl-aj-exc-text { flex: 1; min-width: 0; color: var(--cd-title); }
.pl-aj-exc-text small { display: block; color: var(--cd-gray); font-size: .76rem; }
.pl-aj-pill { flex: none; padding: .05rem .5rem; border-radius: 99px; background: #f3f4f6; color: var(--cd-gray); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pl-aj-pill.is-now { background: #fef6e7; color: #92400e; }
.pl-aj-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.pl-aj-add > summary::-webkit-details-marker { display: none; }
.pl-aj-exc-form { display: grid; gap: .9rem; margin-top: .8rem; padding: 1rem; border: 1px solid #d8d3f5; border-radius: 12px; background: #fcfcff; }
.pl-aj-exc-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pl-aj-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.pl-aj-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.pl-aj-options label { position: relative; display: grid; gap: .1rem; margin: 0; padding: .6rem .7rem; border: 1.5px solid var(--cd-border); border-radius: 12px; background: #fff; color: var(--cd-title); font-size: .84rem; cursor: pointer; }
.pl-aj-options label small { color: var(--cd-gray); font-size: .74rem; }
.pl-aj-options input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pl-aj-options label:has(input[type=radio]:checked) { border-color: var(--cd-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, .15); }
.pl-aj-options label:has(input[type=radio]:focus-visible) { outline: 3px solid rgba(102, 126, 234, .55); outline-offset: 2px; }
.pl-aj-opt-min { display: flex; align-items: center; gap: .3rem; margin-top: .25rem; color: var(--cd-gray); font-size: .78rem; }
.pl-aj-opt-min input { width: 62px; padding: .15rem .3rem; border: 1px solid var(--cd-border-strong); border-radius: 6px; text-align: center; }
.pl-aj-reasons { display: flex; gap: .35rem; flex-wrap: wrap; }
.pl-aj-reasons label { position: relative; margin: 0; cursor: pointer; }
.pl-aj-reasons input { position: absolute; opacity: 0; pointer-events: none; }
.pl-aj-reasons span { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--cd-border); border-radius: 99px; background: #fff; color: var(--cd-gray); font-size: .8rem; font-weight: 600; }
.pl-aj-reasons input:checked + span { border-color: var(--cd-primary); background: var(--cd-primary-soft); color: var(--cd-primary-hover); }
.pl-aj-reasons input:focus-visible + span { outline: 3px solid rgba(102, 126, 234, .55); outline-offset: 2px; }
.pl-aj-effect { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 10px; background: #fef6e7; color: #92400e; font-size: .82rem; }
.pl-aj-effect i { margin-top: .2rem; }
.pl-aj-effect ul { margin: .2rem 0 0; padding-left: 1rem; }

.pl-aj-switch { display: flex; align-items: flex-start; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid #f1f2f5; }
.pl-aj-switch:last-of-type { border-bottom: 0; }
.pl-aj-switch-text { flex: 1; min-width: 0; font-size: .86rem; color: var(--cd-title); }
.pl-aj-switch-text label { margin: 0; cursor: pointer; }
.pl-aj-switch-text small { display: block; color: var(--cd-gray); font-size: .78rem; }
.pl-aj-toggle { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 42px; height: 24px; margin: 0; border-radius: 99px; background: #d1d5db; cursor: pointer; transition: background .15s; }
.pl-aj-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.pl-aj-toggle:checked { background: #10b981; }
.pl-aj-toggle:checked::after { left: 21px; }
.pl-aj-toggle:focus-visible { outline: 3px solid rgba(102, 126, 234, .55); outline-offset: 2px; }
.pl-aj-hour { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .8rem; color: var(--cd-gray); }
.pl-aj-hour select { width: auto; padding: .25rem 1.8rem .25rem .5rem; }

.pl-aj-more { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid #f1f2f5; }
.pl-aj-more > summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--cd-title); }
.pl-aj-more ul { margin: .5rem 0 0; color: var(--cd-gray); font-size: .82rem; }
.pl-aj-more-body { display: grid; gap: .6rem; margin-top: .6rem; color: var(--cd-gray); font-size: .84rem; }
.pl-aj-more-body p { margin: 0; }
.pl-aj-tz { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--cd-title); }
.pl-aj-tz select { flex: 1 1 180px; width: auto; min-width: 0; max-width: 100%; }

@media (max-width: 575.98px) {
  .pl-aj-days { gap: .25rem; }
  .pl-aj-day { padding: .5rem 0; font-size: .78rem; }
  .pl-aj-weekday { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .pl-aj-seg { flex-wrap: nowrap; width: 100%; }
  .pl-aj-seg label { flex: 1 1 auto; justify-content: center; padding: .3rem .4rem; font-size: .76rem; }
  .pl-aj-seg input[type=number] { width: 44px; }
  .pl-aj-options { grid-template-columns: minmax(0, 1fr); }
}

/* Progresso: partes com o escopo no título */
.pl-sec-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .85rem; }
.pl-sec-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--cd-title); }
.pl-scope { font-size: .7rem; font-weight: 700; padding: .06rem .55rem; border-radius: 999px; background: #f3f4f6; color: var(--cd-gray); white-space: nowrap; }
.pl-scope[class*="pl-kind--"] { background: var(--pl-kind-soft); color: var(--pl-kind); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pl-subhead { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cd-gray); margin: 0 0 .5rem; }
.pl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.pl-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-kpi { padding: .85rem 1rem; border: 1px solid var(--cd-border); border-radius: 12px; background: #fff; min-width: 0; }
.pl-kpi-value { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: .15rem; color: var(--cd-title); }
.pl-map-block .heatmap { max-width: 560px; }
.pl-next-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.pl-next-steps a { display: grid; gap: .15rem; height: 100%; padding: .7rem .85rem; border: 1px solid var(--cd-border); border-radius: 12px; color: var(--cd-title); text-decoration: none; }
.pl-next-steps a:hover { border-color: var(--cd-primary); }
.pl-next-steps span { font-size: .8rem; color: var(--cd-gray); }
.pl-select-sm { min-height: 34px; padding: .2rem .6rem; font-size: .82rem; max-width: 260px; }
@media (max-width: 767.98px) { .pl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .pl-page-actions .pl-select-sm { max-width: 100%; flex: 1; } }

/* Ajustes */
.pl-section-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.pl-section-nav a { padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--cd-border); background: #fff; font-size: .8rem; font-weight: 600; color: var(--cd-title); text-decoration: none; }
.pl-section-nav a:hover, .pl-section-nav a.active { border-color: var(--cd-primary); color: var(--cd-primary-hover); }
.pl-anchor { scroll-margin-top: 6rem; }
.pl-exceptions { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pl-exceptions li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem .75rem; border: 1px solid var(--cd-border); border-radius: 10px; font-size: .86rem; }
.pl-exceptions li > i { color: var(--cd-orange); }
.pl-add-details > summary { list-style: none; display: inline-flex; cursor: pointer; }
.pl-add-details > summary::-webkit-details-marker { display: none; }

/* Topo do plano (nov/2026) */
.pl-plan-head { padding: 1rem 1.2rem; }
.pl-plan-head-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; }
.pl-kind-icon--lg { width: 46px; height: 46px; border-radius: 13px; font-size: 1.15rem; }
.pl-plan-head-text h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0; color: var(--cd-title); overflow-wrap: anywhere; }
.pl-plan-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .8rem; margin-top: .25rem; font-size: .8rem; color: var(--cd-gray); }
.pl-plan-head-meta a { color: var(--cd-gray); }
.pl-plan-head-side { display: flex; align-items: center; gap: .8rem; }
.pl-icon-btn { width: 38px; min-height: 38px; padding: 0; justify-content: center; }
.pl-plan-head-progress { display: flex; align-items: center; gap: .75rem; margin-top: .85rem; font-size: .78rem; color: var(--cd-gray); }
.pl-plan-head-progress .cd-progress { flex: 1; }
.pl-plan-head-progress strong { color: var(--cd-title); }
.pl-out-focus { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 12px; background: #fef6e7; color: #92400e; font-size: .86rem; }
.pl-out-focus > span { flex: 1; min-width: 200px; }
.pl-share-link { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .6rem .8rem; border: 1px solid var(--cd-border); border-radius: 10px; }
.pl-share-link > i { color: var(--cd-gray); }
.pl-share-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.pl-danger-zone { border-color: #f3c4c4; }
@media (max-width: 575.98px) {
  .pl-plan-head-row { grid-template-columns: auto minmax(0, 1fr); }
  .pl-plan-head-side { grid-column: 1 / -1; justify-content: space-between; }
  .pl-plan-head-side .pl-countdown { text-align: left; display: flex; align-items: baseline; gap: .35rem; }
  .pl-plan-head-side .pl-countdown strong { display: inline; font-size: 1.05rem; }
  .pl-plan-head-text h1 { font-size: 1.15rem; }
  .pl-share-link > span { flex-basis: 100%; }
}

/* Criar plano em passos */
.pl-steps { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: .8rem; font-weight: 600; color: var(--cd-gray); }
.pl-steps li { display: inline-flex; align-items: center; gap: .4rem; }
.pl-steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--cd-border-strong); margin-right: .1rem; }
.pl-steps li span { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: #eef0f4; font-size: .72rem; }
.pl-steps li.active { color: var(--cd-primary-hover); }
.pl-steps li.active span { background: var(--cd-primary); color: #fff; }
.pl-steps li.done { cursor: pointer; color: var(--cd-title); }
.pl-steps li.done span { background: #ecfdf5; color: #047857; }
.pl-step-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: 0 0 1rem; }
[data-plan-form]:not(.is-wizard) [data-step-foot] { display: none !important; }
.pl-create-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .8rem 1rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--cd-border); border-radius: var(--cd-radius); box-shadow: 0 -6px 18px rgba(31, 41, 55, .06); }
.pl-create-cost { flex: 1; min-width: 180px; }
.pl-create-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
/* Fica acima da navegação inferior do site, que aparece abaixo de 1200px. */
@media (max-width: 1199.98px) {
  .pl-create-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 575.98px) {
  .pl-create-actions, .pl-create-actions .cd-btn-primary, .pl-create-actions .cd-btn-soft { width: 100%; justify-content: center; }
}
