/* Um elemento marcado com "hidden" tem que sumir SEMPRE — regras de classe
   como .field{display:flex} venciam o atributo e deixavam campos escondidos
   aparecendo na tela. Esta linha vale para o sistema inteiro. */
[hidden] { display: none !important; }

:root {
  /* paleta do brasao do colegio: azul-marinho + dourado */
  --blue-50: #eef2fb;
  --blue-100: #dce4f4;
  --blue-200: #b9c8e6;
  --blue-300: #8da1ce;
  --blue-400: #5d76ad;
  --blue-500: #38508c;
  --blue-600: #213564;   /* marinho principal */
  --blue-700: #15244a;   /* marinho escuro (logo) */
  --sky-400: #34518f;
  --sky-500: #213564;

  /* dourado do brasão */
  --gold: #c9a44e;
  --gold-dark: #a8842f;
  --gold-soft: #fbf3dd;

  --bg: #f5f7fc;
  --surface: #ffffff;
  --text: #14213d;
  --text-soft: #5c6b86;
  --border: #e3e8f2;
  --shadow: 0 4px 18px rgba(21, 36, 74, 0.08);
  --shadow-lg: 0 12px 40px rgba(21, 36, 74, 0.16);
  --radius: 14px;
  --radius-sm: 9px;

  --green: #16a34a;
  --amber: #f59e0b;
  --red: #dc2626;
  --purple: #8b5cf6;

  /* cores do calendário */
  --cal-letivo: #e7edf9;
  --cal-letivo-text: #213564;
  --cal-folga: #fde4e4;
  --cal-folga-text: #b91c1c;
  --cal-fimsemana: #f1f3f8;
  --cal-fimsemana-text: #64748b;
  --cal-evento: #fbf0d4;
  --cal-evento-text: #97701d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Topo (cabeçalho + abas) ---------- */
/* Os dois grudam JUNTOS. Separados, as abas precisavam saber a altura do
   cabeçalho para grudar embaixo dele, e essa altura muda com a largura da tela
   e com o nome da escola: qualquer valor fixo escondia as abas em alguma
   largura. Como um bloco só, o problema deixa de existir. */
.topo-fixo { position: sticky; top: 0; z-index: 50; }

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--surface);
  color: var(--blue-700);
  border-bottom: 2px solid var(--gold);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo-img { height: 46px; width: auto; display: block; }
.brand-divider { width: 1px; height: 30px; background: var(--border); }
.brand-text span {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--gold-dark); text-transform: uppercase;
}
/* lado direito do topo, tudo na mesma linha:
   quem está usando · data (com o nome do usuário embaixo) · logo do colégio · versão */
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.hoje-bloco { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.today-label {
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}
.quem-label { font-size: 11.5px; color: var(--text-soft); padding-right: 4px; text-align: right; }
.quem-label strong { color: var(--blue-700); }

/* logo do colégio — mesmo tamanho do logo principal */
.logo-escola {
  height: 46px; min-width: 46px; padding: 0 4px;
  border: 1px dashed transparent; border-radius: 10px;
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.logo-escola img { height: 46px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.logo-escola:hover { border-color: var(--gold); background: var(--gold-soft); }
.logo-vazio {
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  font-size: 17px; color: var(--text-soft); border: 1px dashed var(--border); border-radius: 10px;
  height: 46px; width: 52px;
}
.logo-vazio small { font-size: 8.5px; text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.logo-previa {
  display: flex; align-items: center; justify-content: center; min-height: 90px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 10px;
}
.logo-previa img { max-height: 90px; max-width: 100%; object-fit: contain; }
.logo-previa span { color: var(--text-soft); font-size: 13px; }
@media (max-width: 820px) { .quem-label, .logo-escola { display: none; } }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  border: none;
  background: none;
  padding: 15px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}
.tab:hover { color: var(--blue-600); background: var(--blue-50); }
.tab.active { color: var(--blue-700); border-bottom-color: var(--gold); }

/* ---------- Content ---------- */
.content { padding: 26px 28px 60px; max-width: 1320px; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.page-head p { color: var(--text-soft); font-size: 14px; margin-top: 2px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--blue-700); border-color: var(--border); }
.btn-ghost:hover { background: var(--blue-50); border-color: var(--blue-200); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(0.95); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* ---------- Cards & grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* stat cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat .stat-val { font-size: 26px; font-weight: 800; color: var(--blue-700); }
.stat .stat-lbl { font-size: 12.5px; color: var(--text-soft); font-weight: 500; }

/* ---------- Colaborador card ---------- */
.collab-card { display: flex; flex-direction: column; }
.collab-top { display: flex; gap: 14px; padding: 18px; align-items: center; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--blue-100);
  display: grid; place-items: center;
  color: var(--blue-700); font-weight: 700; font-size: 20px;
  border: 2px solid var(--blue-100);
}
.collab-info h3 { font-size: 16px; font-weight: 700; }
.collab-info .role { color: var(--blue-600); font-weight: 600; font-size: 13px; }
.collab-info .meta { color: var(--text-soft); font-size: 12.5px; margin-top: 2px; }
.collab-body { padding: 0 18px 14px; }
.collab-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-top: 1px dashed var(--border); }
.collab-row span:first-child { color: var(--text-soft); }
.collab-row span:last-child { font-weight: 600; }
.collab-actions { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--blue-50); }

.badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}
.badge-flex { background: var(--cal-evento); color: var(--cal-evento-text); }
.badge-fixo { background: var(--blue-100); color: var(--blue-700); }
.badge-bday { background: #fff4e0; color: #b45309; }
.badge-ativo { background: #dcfce7; color: #15803d; }
.badge-inativo { background: #f1f5f9; color: #64748b; }
.badge-aviso { background: var(--gold-soft); color: var(--gold-dark); }

/* colaborador inativo: esmaecido */
.collab-card.is-inativo { opacity: 0.62; filter: grayscale(0.35); }
.collab-card.is-inativo:hover { opacity: 0.85; }

/* lista de colaboradores (uma linha por pessoa) */
.collab-list { display: flex; flex-direction: column; gap: 8px; }
.collab-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 16px;
  box-shadow: var(--shadow); flex-wrap: wrap;
}
.collab-item .avatar { width: 46px; height: 46px; font-size: 16px; }
.cl-main { flex: 1 1 220px; min-width: 200px; display: flex; flex-direction: column; gap: 1px; }
.cl-nome { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-nome strong { font-size: 14.5px; }
.cl-role { color: var(--blue-600); font-weight: 600; font-size: 12.5px; }
.cl-obs {
  font-size: 12px; color: var(--text-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px;
}
.cl-data { display: flex; flex-direction: column; min-width: 108px; }
.cl-data label { font-size: 10px; text-transform: uppercase; font-weight: 800; color: var(--text-soft); letter-spacing: 0.4px; }
.cl-data span { font-size: 13px; font-weight: 600; }
.cl-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.collab-item.is-inativo { opacity: 0.62; filter: grayscale(0.35); }
.collab-item.is-inativo:hover { opacity: 0.85; }

@media (max-width: 640px) {
  .cl-data { min-width: 90px; }
  .cl-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}

/* ---------- Turmas ---------- */
.filtro-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filtro-chip {
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 20px; padding: 7px 15px;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-soft); cursor: pointer; transition: all 0.15s;
}
.filtro-chip:hover { border-color: var(--blue-300); color: var(--blue-600); }
.filtro-chip.sel { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

.link-btn {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  color: var(--blue-600); padding: 0;
}
.link-btn:hover { text-decoration: underline; color: var(--blue-700); }

.turma-icone {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--blue-50); display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
}
.badge-manha { background: #fff4d6; color: #a16207; }
.badge-tarde { background: var(--blue-100); color: var(--blue-700); }
.badge-integral { background: #ede9fe; color: #7c3aed; }
.badge-noite { background: #e2e8f0; color: #334155; }
.badge-especial { background: var(--gold-soft); color: var(--gold-dark); }

.turma-ocup { min-width: 120px; }
.ocup-bar {
  height: 6px; background: var(--border); border-radius: 4px;
  overflow: hidden; margin-top: 4px;
}
.ocup-fill { height: 100%; background: var(--green); border-radius: 4px; }
.ocup-fill.cheia { background: var(--red); }

/* quadro de aniversários */
.bday-banner.bday-list { display: block; }
.bday-list-head {
  font-weight: 800; color: #b45309; font-size: 15px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.bday-list-head > span { display: flex; align-items: center; gap: 8px; }
.bday-list-head .cake { font-size: 22px; }
.bday-count {
  background: #fed7aa; color: #b45309; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.bday-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bday-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fed7aa;
  border-radius: 10px;
}
.bday-row.is-today { background: #fff; border-color: #fb923c; box-shadow: 0 2px 10px rgba(234,88,12,0.15); }
.bday-when {
  flex-shrink: 0; width: 92px; text-align: center;
  font-weight: 700; font-size: 11.5px; color: #b45309;
  background: #ffedd5; padding: 5px 8px; border-radius: 7px; white-space: nowrap;
}
.bday-row.is-today .bday-when { background: #fb923c; color: #fff; }
.bday-date {
  flex-shrink: 0; width: 52px; text-align: center;
  font-weight: 800; font-size: 13px; color: var(--text);
}
.bday-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bday-name strong { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bday-name span { color: #b45309; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bday-age {
  flex-shrink: 0; font-weight: 700; font-size: 12.5px; color: var(--gold-dark);
  background: var(--gold-soft); padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.bday-row .btn { flex-shrink: 0; }
.bday-empty { color: #b45309; font-size: 13px; padding: 4px 2px; }

/* aviso à equipe (modal) — seletor de canal */
.channel-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.channel-pill {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 12px 8px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-soft);
  background: var(--bg); text-align: center; transition: all 0.15s;
}
.channel-pill .ch-ico { font-size: 22px; }
.channel-pill input { position: absolute; opacity: 0; pointer-events: none; }
.channel-pill:hover { border-color: var(--blue-300); }
.channel-pill:has(input:checked) {
  border-color: var(--blue-500); background: var(--blue-50); color: var(--blue-700);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.recipientes-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px;
}
.recipiente {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.recipiente:hover { background: var(--blue-50); }
.recipiente input { accent-color: var(--blue-600); }
/* dentro de .field o input vira 100% — a caixinha de marcar precisa continuar pequena */
.field .recipiente input[type="checkbox"] { width: auto; flex: none; padding: 0; border: 0; }
.recipiente-nome { flex: 1; font-size: 13.5px; font-weight: 600; }
.recipiente-contato { font-size: 12.5px; color: var(--text-soft); }
.recipiente.disabled { opacity: 0.5; cursor: not-allowed; }
.recipiente.disabled .recipiente-contato { color: var(--red); }
.wa-link { text-decoration: none; }

/* ---------- Birthday banner ---------- */
.bday-banner {
  background: linear-gradient(100deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bday-banner .cake { font-size: 30px; }
.bday-banner .bday-text { flex: 1; min-width: 200px; }
.bday-banner strong { color: #b45309; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-400);
  box-shadow: 0 0 0 3px var(--blue-100); background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }
.checkbox-field { flex-direction: row; align-items: center; gap: 9px; }
.checkbox-field input { width: auto; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.avatar-upload { display: flex; align-items: center; gap: 14px; }
.avatar-preview {
  width: 70px; height: 70px; border-radius: 50%;
  object-fit: cover; background: var(--blue-100);
  display: grid; place-items: center; color: var(--blue-600);
  font-size: 26px; border: 2px dashed var(--blue-200);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 37, 64, 0.45);
  display: grid; place-items: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-body { padding: 22px; }
/* janela larga (editor do contrato) */
.modal.modal-largo { max-width: 1120px; max-height: 94vh; }

/* editor tipo Word: barra com os campos + folha branca de escrita */
.editor-word { display: flex; flex-direction: column; gap: 0; }
.ew-barra {
  position: sticky; top: 0; z-index: 3;
  background: var(--blue-50);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 10px 14px;
}
.ew-barra h4 { font-size: 12.5px; color: var(--blue-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.ew-barra .filtro-chips { gap: 5px; }
.ew-barra .filtro-chip { font-size: 11.5px; padding: 3px 9px; font-family: Consolas, monospace; }
/* barra de formatação do editor */
.ew-ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ew-ferramentas:last-child { margin-bottom: 0; }
.ew-bt {
  min-width: 30px; height: 28px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.ew-bt:hover { background: var(--gold-soft); border-color: var(--gold); }
.ew-sep { width: 1px; height: 20px; background: var(--border); margin: 0 3px; }
.ew-rot { font-size: 11.5px; font-weight: 700; color: var(--blue-700); text-transform: uppercase; letter-spacing: .3px; }
.ew-ferramentas select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 12.5px; background: var(--surface); }
.ew-dica { font-size: 11.5px; color: var(--text-soft); }

/* ---------- Ficha do aluno: cursos extras ---------- */
.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
/* quando a opção é uma frase inteira, e não uma palavra, as colunas são largas */
.extras-grid.esparsa { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 560px) { .extras-grid, .extras-grid.esparsa { grid-template-columns: 1fr; } }
/* prévia do logo dentro do formulário da agenda */
.v-logo-previa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); padding: 10px 12px; }
.v-logo-previa img { max-height: 54px; max-width: 150px; border-radius: 6px; background: #fff; }
.v-logo-previa span { flex: 1 1 200px; font-size: 12px; color: var(--text-soft); line-height: 1.45; }
.extra-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.extra-chip:hover { border-color: var(--blue-400); background: var(--blue-50); }
.extra-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.extra-chip .ec-marca {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--bg);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: transparent;
}
.extra-chip .ec-txt { display: flex; flex-direction: column; min-width: 0; }
/* O rótulo quebra em mais linhas em vez de ser cortado. Com "nowrap" +
   "overflow:hidden", frases como "Não oferecer em férias, recesso e dias sem
   aula" apareciam pela metade — precisavam de 314px numa caixa de 150px. */
.extra-chip .ec-nome {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  white-space: normal; overflow-wrap: anywhere; line-height: 1.35;
}
.extra-chip .ec-turno { font-size: 11.5px; color: var(--text-soft); }
.extra-chip.sel { border-color: var(--blue-600); background: var(--blue-50); }
.extra-chip.sel .ec-marca { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.extra-chip.sel .ec-nome { color: var(--blue-700); }

/* checklist de entrega dos documentos */
.docs-check { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.dc-linha {
  display: grid; grid-template-columns: 1.2fr auto 1.3fr auto 34px; gap: 10px; align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--border); border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); background: var(--surface);
}
.dc-linha.ok { border-left-color: var(--green, #16a34a); background: var(--bg); }
.dc-nome { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dc-opcoes { display: flex; gap: 12px; white-space: nowrap; }
.dc-op { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; }
.dc-op input { width: auto; accent-color: var(--blue-600); }
.dc-anexo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.dc-arq { color: var(--blue-700); font-weight: 600; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-obs { color: var(--text-soft); font-size: 11.5px; }
.dc-validade { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 12.5px; }
@media (max-width: 760px) { .dc-linha { grid-template-columns: 1fr; gap: 6px; } }

/* visor de documento anexado */
.doc-visor {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); padding: 10px; text-align: center;
  max-height: 66vh; overflow: auto;
}
.doc-visor img { max-width: 100%; border-radius: var(--radius-sm); }
.doc-visor iframe { width: 100%; height: 62vh; border: none; background: #fff; }

/* atrasos, advertências e suspensões */
.oco-linha {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 6px;
  border: 1px solid var(--border); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); background: var(--surface);
}
.oco-ico { font-size: 20px; flex: none; }
.oco-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.oco-info strong { font-size: 13.5px; color: var(--text); }
.oco-info span { font-size: 12.5px; color: var(--text-soft); }
.oco-avisado { color: var(--blue-700) !important; font-weight: 600; }

/* subtítulo dos endereços de pai e mãe */
.sub-endereco {
  font-size: 13px; font-weight: 700; color: var(--blue-700);
  margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}

/* ---------- Contratos: lista em cartões e editor em abas ---------- */
.ct-lista { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.ct-card {
  border: 1px solid var(--border); border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-sm); padding: 13px 15px; background: var(--surface);
}
.ct-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.ct-card-topo { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ct-card-nome { font-size: 15px; font-weight: 700; color: var(--blue-700); }
.ct-card-meta { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; line-height: 1.5; }
.ct-card-acoes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ct-card-acoes .btn { padding: 5px 11px; font-size: 12.5px; }

.ct-topo { display: grid; grid-template-columns: 2fr 1.2fr 0.8fr; gap: 12px; margin-bottom: 10px; }
@media (max-width: 760px) { .ct-topo { grid-template-columns: 1fr; } }

.ct-abas {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  margin: 14px 0 16px;
}
.ct-aba-bt {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-soft);
  padding: 9px 14px; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.ct-aba-bt:hover { background: var(--blue-50); color: var(--blue-700); }
.ct-aba-bt.sel { color: var(--blue-700); border-bottom-color: var(--gold); background: var(--blue-50); }
.ct-aba-bt .cont {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 20px;
  background: var(--gold-soft); color: var(--gold-dark); font-size: 11px;
}
.ct-ajuda { color: var(--text-soft); font-size: 12.5px; margin-bottom: 10px; line-height: 1.55; }

/* campo de texto do contrato na ficha do modelo */
.ct-folha {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 22px; background: #fff; color: var(--text);
  min-height: 320px; max-height: 460px; overflow-y: auto;
  line-height: 1.7;
}
.ct-folha:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-100); }
/* a folha encostada na barra de formatação */
.ew-barra + .ct-folha, .ew-barra + .ew-folha { border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

.ew-folha {
  width: 100%;
  min-height: 58vh;
  border: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 34px 46px;
  background: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px; line-height: 1.75; color: var(--text);
  resize: vertical;
}
.ew-folha:focus { outline: 2px solid var(--gold); outline-offset: -2px; }
.ew-rodape { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-soft); margin-top: 8px; }
.icon-btn {
  border: none; background: none; font-size: 26px; line-height: 1;
  color: var(--text-soft); cursor: pointer; padding: 0 6px;
}
.icon-btn:hover { color: var(--red); }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: 60px 20px; color: var(--text-soft);
}
.empty .emoji { font-size: 46px; margin-bottom: 10px; }
.empty h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }

/* ---------- Placeholder pages ---------- */
.placeholder {
  text-align: center; padding: 70px 20px;
  background: var(--surface); border: 1px dashed var(--blue-200);
  border-radius: var(--radius); color: var(--text-soft);
}
.placeholder .emoji { font-size: 52px; margin-bottom: 14px; }
.placeholder h3 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.placeholder .soon { display:inline-block; margin-top:14px; background: var(--blue-100); color: var(--blue-700); font-weight:700; font-size:12px; padding:5px 14px; border-radius: 20px;}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 10px; z-index: 200;
}
.toast {
  background: var(--text); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-weight: 500; font-size: 13.5px;
  animation: slideIn 0.25s ease;
  max-width: 320px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Calendário ---------- */
.cal-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav button {
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 18px; cursor: pointer; color: var(--blue-700);
}
.cal-nav button:hover { background: var(--blue-50); }
.cal-month-title { font-size: 19px; font-weight: 800; min-width: 200px; text-align: center; text-transform: capitalize; }

.cal-legend { margin-left: auto; }
.legend-cats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); font-weight: 500; }
/* o contorno faz as cores claras (branco) aparecerem sobre o fundo claro */
.legend-dot { width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: 0 0 0 1px var(--border) inset; }

.legend-feriados {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  max-width: 560px;
}
.legend-feriados-tit {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px;
}
.legend-feriados-lista { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.legend-feriado {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text); cursor: pointer;
  padding: 2px 4px; border-radius: 6px;
}
.legend-feriado:hover { background: var(--bg); }
.legend-feriado .legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-x {
  border: none; background: rgba(0, 0, 0, .06); cursor: pointer; padding: 0;
  color: var(--text-soft); font-size: 11px; line-height: 1;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: background .12s, color .12s;
}
.legend-x:hover { background: #fdecea; color: #b3362a; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  /* todas as semanas com a mesma altura: o conteúdo do dia não estica a linha */
  grid-auto-rows: 112px;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.cal-weekday {
  text-align: center; font-weight: 700; font-size: 12px;
  color: var(--text-soft); text-transform: uppercase; padding: 6px 0;
  grid-row: 1; height: 28px; align-self: center;
}
.cal-grid > .cal-weekday:first-child ~ .cal-day { }
.cal-day {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  padding: 7px 8px;
  cursor: pointer;
  border: 1px solid var(--border);   /* delimita o dia mesmo quando a cor dele é branca */
  position: relative;
  transition: all 0.12s;
  display: flex; flex-direction: column; gap: 3px;
}
.cal-day:hover { border-color: var(--blue-400); box-shadow: var(--shadow); }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.empty:hover { border-color: transparent; box-shadow: none; }
.cal-day .day-num { font-weight: 700; font-size: 14px; }
.cal-day.today .day-num {
  background: var(--blue-600); color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px;
}
/* nome do dia: no máximo duas linhas, sem empurrar o resto */
.cal-day .day-type {
  font-size: 10px; font-weight: 700; text-transform: uppercase; opacity: 0.85; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cal-day .day-events {
  display: flex; flex-direction: column; gap: 3px; margin-top: auto;
  min-height: 0; overflow: hidden;
}
.cal-mais {
  font-size: 10px; font-weight: 700; color: var(--text-soft);
  padding-left: 2px; white-space: nowrap;
}
.cal-event-pill {
  font-size: 10.5px; font-weight: 600;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 4px;
}
.cal-event-pill .pill-txt {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill-x {
  border: none; background: rgba(0, 0, 0, .06); cursor: pointer;
  color: var(--text-soft); font-size: 11px; line-height: 1;
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  display: grid; place-items: center; padding: 0;
  transition: background .12s, color .12s;
}
.cal-day:hover .pill-x { background: rgba(0, 0, 0, .1); }
.pill-x:hover { background: #fdecea; color: #b3362a; }

.day-letivo { background: var(--cal-letivo); color: var(--cal-letivo-text); }
.day-folga { background: var(--cal-folga); color: var(--cal-folga-text); }
.day-fimsemana { background: var(--cal-fimsemana); color: var(--cal-fimsemana-text); }
.day-evento { background: var(--cal-evento); color: var(--cal-evento-text); }

/* toggle Mês / Programação (estilo Google Agenda) */
.view-toggle {
  display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden;
}
.vt-btn {
  border: none; background: var(--surface); padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-soft); cursor: pointer;
}
.vt-btn.sel { background: var(--blue-600); color: #fff; }

/* visão Ano (12 meses) */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.mini-month {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.mini-title {
  font-weight: 800; font-size: 14px; color: var(--text);   /* todos os meses em preto */
  margin-bottom: 8px; cursor: pointer; text-align: center;
  border-radius: 7px; padding: 4px;
}
.mini-title:hover { background: var(--blue-50); }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.mini-wd {
  text-align: center; font-size: 9.5px; font-weight: 700;
  color: var(--text-soft); text-transform: uppercase; padding: 2px 0;
}
.mini-day {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  border-radius: 6px; cursor: pointer;
  border: 1px solid transparent;
  color: var(--text);   /* o número do dia é sempre preto; a cor fica no fundo */
}
.mini-day:hover { border-color: var(--blue-400); }
.mini-day.empty { background: transparent !important; cursor: default; }
.mini-day.empty:hover { border-color: transparent; }
.mini-day.out { background: transparent !important; color: #c6cdd8; cursor: default; font-weight: 500; }
.mini-day.out:hover { border-color: transparent; }
.mini-day.today { outline: 2px solid var(--blue-600); outline-offset: -1px; }
/* dia com visita marcada (aba Visitas) */
.mini-day.tem-visita { position: relative; box-shadow: inset 0 0 0 2px var(--gold); font-weight: 800; }
.mini-day .vis-pin {
  position: absolute; top: -4px; right: -4px; min-width: 14px; height: 14px;
  border-radius: 8px; background: var(--gold); color: #fff;
  font-size: 9px; font-weight: 800; line-height: 14px; text-align: center; padding: 0 3px;
}
.mini-count {
  text-align: right; font-size: 11px; font-weight: 800;
  color: var(--text-soft); margin-top: 6px;
  border-top: 1px solid var(--border); padding-top: 5px;
}
.mini-notes { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.mini-note { font-size: 10.5px; color: var(--text-soft); line-height: 1.35; display: flex; align-items: center; gap: 5px; }
.mini-notes strong { color: var(--text); }
.note-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border) inset; }
.note-txt { flex: 1; min-width: 0; cursor: pointer; }
.note-txt:hover { color: var(--text); }
.note-x {
  border: none; background: rgba(0, 0, 0, .06); cursor: pointer; padding: 0;
  color: var(--text-soft); font-size: 9.5px; line-height: 1;
  width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: background .12s, color .12s;
}
.note-x:hover { background: #fdecea; color: #b3362a; }

/* seletor de início da semana */
.ws-select {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text-soft); cursor: pointer;
}

/* lista de períodos */
.periodo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.periodo-row .legend-dot { width: 16px; height: 16px; flex-shrink: 0; }
.periodo-info { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.periodo-info strong { font-size: 13.5px; }
.periodo-info span { font-size: 12px; color: var(--text-soft); }

/* flag "conta como dia letivo" no gerenciador de cores */
.cat-flag {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--text-soft);
  cursor: pointer; white-space: nowrap;
}
.cat-flag input { accent-color: var(--blue-600); }

/* visão Programação (lista) */
.agenda-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.ag-day {
  display: flex; gap: 16px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.ag-day:hover { background: var(--blue-50); }
.ag-day:last-child { border-bottom: none; }
.ag-day.ag-today { background: var(--gold-soft); }
.ag-date { width: 46px; text-align: center; flex-shrink: 0; }
.ag-date strong { display: block; font-size: 20px; color: var(--blue-700); line-height: 1.1; }
.ag-date-range { width: 70px; }
.ag-date-range strong { font-size: 16px; }
.ag-periodo-obs { font-size: 12px; color: var(--text-soft); padding-left: 71px; }
@media (max-width: 620px) { .ag-periodo-obs { padding-left: 0; } }
.ag-date span { font-size: 11px; color: var(--text-soft); text-transform: uppercase; font-weight: 700; }
.ag-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.ag-item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.ag-txt { flex: 1; min-width: 0; }
.ag-ate { font-style: normal; font-size: 12px; color: var(--text-soft); }
.ag-x {
  border: none; background: rgba(0, 0, 0, .06); cursor: pointer; padding: 0;
  color: var(--text-soft); font-size: 11px; line-height: 1;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: background .12s, color .12s;
}
.ag-x:hover { background: #fdecea; color: #b3362a; }
.ag-hora { min-width: 62px; color: var(--text-soft); font-size: 12.5px; font-weight: 600; }
.ag-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border) inset; }

/* seletor de categoria no editor de dia */
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-opt {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 9px; padding: 8px 12px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.cat-opt:hover { border-color: var(--blue-300); }
.cat-opt.sel { border-color: var(--gold); background: var(--gold-soft); }

/* gerenciador de cores */
.cat-row {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--surface);
}
.cat-linha1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-cores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 700px) { .cat-cores { grid-template-columns: 1fr; } }
.cat-bloco { background: var(--bg); border-radius: 9px; padding: 8px 10px; }
.cat-bloco-tit { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-soft); margin-bottom: 6px; }
.cat-bloco-tit small { font-weight: 500; }
.cat-bloco-linha { display: flex; align-items: center; gap: 8px; }
/* prévia de impressão dentro do programa (quando o navegador bloqueia a janela) */
.previa-impressao {
  border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  max-height: 55vh; overflow: auto; background: var(--surface); margin-bottom: 4px;
}
/* o documento aparece num quadro próprio, com o CSS dele, do jeito que sai no papel */
.previa-impressao:has(#previa-frame) { padding: 0; background: #fff; }
.previa-impressao #previa-frame { display: block; width: 100%; height: 60vh; border: 0; background: #fff; }
.previa-impressao table { width: 100%; border-collapse: collapse; font-size: 12px; }
.previa-impressao th { background: var(--blue-50); color: var(--blue-600); text-align: left; padding: 6px 8px; border: 1px solid var(--border); }
.previa-impressao td { padding: 5px 8px; border: 1px solid var(--border); }
.previa-impressao h1 { font-size: 17px; color: var(--blue-600); margin-bottom: 4px; }
.previa-impressao h2 { font-size: 14px; color: var(--blue-600); margin: 14px 0 4px; }

/* escolher turmas para a lista */
.acoes-lista { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sel-resumo { font-size: 12.5px; color: var(--text-soft); font-weight: 600; margin-left: auto; }
.seg-bloco { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 9px; }
.seg-tit {
  display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer;
  padding-bottom: 7px; border-bottom: 1px dashed var(--border); margin-bottom: 7px;
}
.seg-tit span { margin-left: auto; font-size: 12px; color: var(--text-soft); font-weight: 500; }
.seg-turmas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; }

/* resumo no fim da lista */
.resumo-lista {
  margin-top: 16px; border: 1px solid var(--border); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 12px 14px; background: var(--bg);
}
.resumo-tit { font-size: 13px; font-weight: 800; color: var(--navy, #213564); margin-bottom: 8px; }
.resumo-tab { font-size: 13px; margin-bottom: 8px; }
.resumo-tab td { padding: 4px 8px; border-bottom: 1px solid var(--border); }
.resumo-tab .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.resumo-tab .linha-seg td { color: var(--text-soft); font-style: italic; }
.resumo-total { font-size: 14px; color: var(--text); }

/* lembretes do colaborador */
.lembretes-box {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.lembretes-tit { font-size: 14px; font-weight: 800; color: var(--navy, #213564); margin-bottom: 10px; }
.lembrete-aviso {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 0; border-top: 1px dashed var(--border); font-size: 13.5px;
}
.lembrete-aviso:first-of-type { border-top: none; }
.lembrete-quem { flex: 1; min-width: 180px; }
.lembrete-data { font-size: 12.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.lembrete-dest { display: block; font-style: normal; font-size: 12px; color: var(--text-soft); }
.lembrete-linha {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; margin-bottom: 7px;
}
.lembrete-feito { opacity: .55; }
.lembrete-feito .doc-info strong { text-decoration: line-through; }
.lembrete-selo {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex: none;
}
.lembrete-selo.st-ok { background: #dcfce7; color: #15803d; }
.lembrete-selo.st-nao { background: #fee2e2; color: #b91c1c; }
.lembrete-selo.st-duvida { background: #fef3c7; color: #a16207; }
.lembrete-selo.st-neutro { background: var(--bg); color: var(--text-soft); }

/* anexos do colaborador */
.doc-linha {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; margin-bottom: 7px;
}
.doc-ico { font-size: 17px; flex: none; }
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-info strong { font-size: 14px; }
.doc-info span { font-size: 12px; color: var(--text-soft); }
.doc-anexar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 6px;
}
.doc-anexar input[type="text"], .doc-anexar #col-doc-nome {
  flex: 1; min-width: 200px; padding: 9px 11px; font-family: inherit; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 8px;
}
.doc-arq { font-size: 12.5px; color: var(--text-soft); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* seletor de calendário e gerenciamento */
.cal-select {
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); cursor: pointer;
  /* a largura é ajustada por JS ao nome do calendário escolhido */
}
.cal-select:hover { border-color: var(--gold); }
.cal-item {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
}
.cal-item-nome {
  flex: 1; min-width: 0; padding: 8px 10px; font-family: inherit; font-size: 14px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text);
}
.cal-item-nome:hover { border-color: var(--border); }
.cal-item-nome:focus { outline: none; border-color: var(--gold); background: var(--surface); }

/* medidor de dias letivos, no lugar da antiga frase de ajuda */
.medidor { max-width: 460px; margin-top: 6px; }
.medidor-barra {
  height: 8px; border-radius: 99px; background: var(--bg);
  border: 1px solid var(--border); overflow: hidden;
}
.medidor-barra span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--blue-600), var(--gold));
  transition: width .4s ease;
}
.medidor-txt { font-size: 13px; color: var(--text-soft); margin-top: 6px; }
.medidor-txt strong { color: var(--text); }
.medidor-sub { font-size: 12.5px; }
.cal-dica { font-size: 13px; color: var(--text-soft); max-width: 620px; line-height: 1.5; }

/* função da categoria (onde o sistema a usa sozinho) */
.cat-papel { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.cat-papel label { font-size: 11.5px; font-weight: 700; color: var(--text-soft); }
.cat-papel-sel {
  flex: 1; min-width: 220px; padding: 7px 10px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
}

/* paleta própria da escola */
.btn-salvar-cor {
  width: 26px; height: 32px; flex: none; cursor: pointer;
  border: 1px dashed var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text-soft); font-size: 16px; line-height: 1;
}
.btn-salvar-cor:hover { border-color: var(--gold); color: var(--gold-deep, #a8863a); }
.minhas-cores { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.minhas-tit { font-size: 11px; font-weight: 700; color: var(--text-soft); }
.minha-cor { position: relative; display: inline-flex; }
.minha-bola {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border) inset;
}
.minha-cor.escolhida .minha-bola { border-color: var(--text); }
.minha-x {
  position: absolute; top: -6px; right: -6px; width: 14px; height: 14px;
  border-radius: 50%; border: none; background: var(--bg); color: var(--text-soft);
  font-size: 9px; line-height: 1; cursor: pointer; display: none; place-items: center;
  box-shadow: 0 0 0 1px var(--border);
}
.minha-cor:hover .minha-x { display: grid; }
.minha-x:hover { background: #fdecea; color: #b3362a; }

/* barra contínua de cores — mais limpa que um punhado de bolinhas */
.cor-barra {
  display: flex; flex: 1; min-width: 0; height: 32px;
  border: 1px solid var(--border); border-radius: 9px; overflow: hidden;
}
.cor-faixa {
  flex: 1; min-width: 0; border: none; padding: 0; cursor: pointer;
  transition: transform .12s;
}
.cor-faixa:hover { transform: scaleY(1.18); }
.cor-faixa.escolhida {
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--text);
}
.cat-previa {
  display: flex; flex-direction: column; gap: 2px;
  border-radius: 8px; padding: 7px 10px; margin-top: 10px;
}
.previa-num { font-weight: 700; font-size: 14px; }
.previa-txt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; opacity: .85; min-height: 13px; }
.previa-vazio { font-size: 10px; color: var(--text-soft); font-style: italic; }
.cats-aviso {
  margin-right: auto; font-size: 12.5px; color: var(--text-soft);
  transition: color .2s, font-weight .2s;
}
.cats-aviso.salvou { color: var(--ok, #1d7a4f); font-weight: 700; }
.cat-row input[type="color"] {
  width: 38px; height: 32px; padding: 2px; flex: none;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface);
}
.cat-row .cat-nome {
  flex: 1; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 13.5px;
}
.cat-core {
  font-size: 11px; font-weight: 700; color: var(--text-soft);
  background: var(--bg); padding: 4px 10px; border-radius: 20px;
}

/* modal google sync */
.gsync-opt { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; }
.gsync-opt h4 { font-size: 14px; color: var(--blue-700); margin-bottom: 6px; }
.gsync-opt p { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.gsync-opt input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
/* caixinha de marcar dentro do bloco não pode esticar */
.gsync-opt .checkbox-field input[type="checkbox"] { width: auto; padding: 0; border: 0; border-radius: 0; }
.gsync-opt .btn { margin-right: 8px; }

/* tabela simples */
/* overflow-x:auto, e nao hidden: no celular a tabela de alunos tem 727px dentro
   de 347px e as ultimas colunas (turma, responsavel, contato) sumiam sem jeito
   de alcancar. O hidden no eixo Y mantem os cantos arredondados. */
.table-wrap { background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--text-soft); padding: 12px 16px; background: var(--blue-50); border-bottom: 1px solid var(--border); }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--blue-50); }

.tag { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11.5px; font-weight:700; }
.tag-visita { background: var(--cal-letivo); color: var(--cal-letivo-text); }
.tag-reuniao { background: var(--cal-evento); color: var(--cal-evento-text); }
.tag-terceiro { background: #fef3c7; color: #b45309; }

.section-sub { font-size: 16px; font-weight: 700; margin: 26px 0 12px; }

/* agendamento online */
.online-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.online-card { padding: 16px 18px 0; }
.online-card h4 { font-size: 15px; margin-bottom: 10px; color: var(--blue-700); }
.online-card .config-rows { margin-bottom: 4px; }
.online-card .collab-actions { margin: 12px -18px 0; }
.dias-row { display: flex; gap: 7px; flex-wrap: wrap; }
.dia-chk {
  display: flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; color: var(--text-soft); background: var(--bg);
}
.dia-chk input { accent-color: var(--blue-600); }
.dia-chk:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }

/* confirmações pós-agendamento */
.confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.confirm-grid .btn { justify-content: center; }

/* pedidos recebidos (caixa de entrada) */
.badge-pend { background: var(--red); color: #fff; }
.pedido-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.pedido-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.pedido-info strong { font-size: 14px; }
.pedido-extra { font-size: 12.5px; color: var(--text-soft); }
.pedido-data {
  flex-shrink: 0; width: 56px; text-align: center;
  display: flex; flex-direction: column; line-height: 1.2;
}
.pedido-data strong { font-size: 15px; color: var(--blue-700); }
.pedido-data span { font-size: 12px; color: var(--text-soft); font-weight: 600; }

/* card de status da agenda de visitas */
.agenda-status { padding: 16px 18px; margin-bottom: 8px; }
.agenda-status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

/* dias/horários da agenda de visitas (um horário por dia) */
.dias-horas { display: flex; flex-direction: column; gap: 6px; }
.dia-hora-row { display: flex; align-items: center; gap: 10px; }
.dia-hora-row input[type="time"] {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; background: var(--bg);
}
.dia-hora-row input[type="time"]:disabled { opacity: 0.4; }
.dh-sep { font-size: 12px; color: var(--text-soft); }

/* editor de perguntas */
.perg-row {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; margin-bottom: 8px; background: var(--bg);
}
.perg-linha1 { display: flex; gap: 8px; align-items: center; }
.perg-linha1 .pg-q {
  flex: 1; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 13.5px;
}
.pg-tipo {
  padding: 9px 8px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  background: var(--surface); cursor: pointer;
}
.pg-ops {
  width: 100%; margin-top: 8px; padding: 9px 11px;
  border: 1px dashed var(--gold); border-radius: 8px;
  font-family: inherit; font-size: 13px; background: var(--gold-soft);
}

/* linhas de crianças na ficha de visita */
.crianca-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.crianca-row .cr-nome { flex: 1; min-width: 90px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13.5px; }
.crianca-row .cr-nasc { padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 12.5px; background: var(--bg); }
.crianca-row .cr-idade { font-size: 11.5px; color: var(--text-soft); min-width: 46px; white-space: nowrap; }
.crianca-row .cr-ano { flex: 1; min-width: 110px; padding: 9px 8px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 12.5px; background: var(--surface); }
@media (max-width: 600px) { .crianca-row { flex-wrap: wrap; } .crianca-row .cr-nome, .crianca-row .cr-ano { flex-basis: 100%; } }

/* select de status da matrícula */
.status-sel {
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 7px 9px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; width: 100%;
}
.status-sel.st-ok { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.status-sel.st-nao { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.status-sel.st-duvida { border-color: #fcd34d; background: #fffbeb; color: #a16207; }
.status-sel.st-neutro { color: var(--text-soft); }

/* ---------- Financeiro ---------- */
/* 6 botões em 2 linhas de 3 — todas as caixas do mesmo tamanho */
.fin-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;          /* todas as linhas com a MESMA altura, mesmo com texto de 2 linhas */
  gap: 12px;
  margin-bottom: 24px;
}
/* menu mais baixo: poucos botões não precisam do volume dos menus de seis ou
   oito. Vale por 'menu-baixo', e não pela quantidade, para a altura não voltar
   ao normal quando um botão é acrescentado. */
.fin-menu.menu-3 { grid-template-columns: repeat(3, 1fr); }
.fin-menu.menu-baixo .fin-btn { min-height: 78px; padding: 13px 12px; gap: 6px; }
.fin-menu.menu-baixo .fin-btn .fin-ico { font-size: 22px; }
.fin-menu.menu-2 { grid-template-columns: repeat(2, 1fr); }   /* 2 botões = 2 colunas, sem buraco */
.fin-menu.menu-4 { grid-template-columns: repeat(2, 1fr); }   /* 4 botões = 2 linhas de 2 */
.fin-menu.menu-6 { grid-template-columns: repeat(3, 1fr); }   /* 6 botões = 2 linhas de 3 */
.fin-menu.menu-8 { grid-template-columns: repeat(4, 1fr); }   /* 8 botões = 2 linhas de 4 */
/* 5 botões: 3 + 2, com a última linha CENTRADA (grade de 6 colunas, cada botão ocupa 2) */
.fin-menu.menu-5 { grid-template-columns: repeat(6, 1fr); }
.fin-menu.menu-5 .fin-btn { grid-column: span 2; }
.fin-menu.menu-5 .fin-btn:nth-child(4) { grid-column: 2 / span 2; }

/* Cada 'menu-N' precisa ser repetido aqui: '.fin-menu.menu-6' tem mais peso que
   '.fin-menu' sozinho, então sem o nome completo a regra de celular não pega e o
   menu fica com tres colunas de 106px no telefone. */
@media (max-width: 900px) {
  .fin-menu, .fin-menu.menu-4, .fin-menu.menu-6, .fin-menu.menu-8 { grid-template-columns: repeat(2, 1fr); }
  /* tres botoes em duas colunas deixariam um sozinho: no aperto, um por linha */
  .fin-menu.menu-3 { grid-template-columns: 1fr; }
  .fin-menu.menu-5 { grid-template-columns: repeat(4, 1fr); }
  .fin-menu.menu-5 .fin-btn:nth-child(4) { grid-column: span 2; }
  .fin-menu.menu-5 .fin-btn:nth-child(5) { grid-column: 2 / span 2; }
}
@media (max-width: 560px) {
  .fin-menu, .fin-menu.menu-2, .fin-menu.menu-4, .fin-menu.menu-6, .fin-menu.menu-8 { grid-template-columns: 1fr; }
  .fin-menu.menu-5 { grid-template-columns: repeat(2, 1fr); }
  .fin-menu.menu-5 .fin-btn:nth-child(5) { grid-column: span 2; }
  /* um botão por linha ocupando a largura toda: não precisa de tanta altura */
  .fin-menu .fin-btn { min-height: 88px; padding: 14px 16px; }
}
.fin-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 116px;
  padding: 20px 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--blue-700);
  cursor: pointer; box-shadow: var(--shadow); transition: all 0.15s;
  text-align: center;
}
.fin-btn:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-2px); }
.fin-btn .fin-ico { font-size: 30px; }
/* segunda linha do botão, explicando o que ele faz */
.fin-btn .fin-sub {
  display: block; margin-top: 3px;
  font-size: 11.5px; font-weight: 500; line-height: 1.35; color: var(--text-soft);
}

/* prévia dinâmica (remessa e comunicação financeira) */
.rm-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--blue-700); line-height: 1.55;
}
.rm-preview:empty { display: none; }
.rm-preview.rm-alerta { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-dark); }
.badge-warn { background: var(--gold-soft); color: var(--gold-dark); }

/* prévia do contrato preenchido */
.previa-contrato {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  max-height: 420px; overflow: auto;
  background: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13.5px; line-height: 1.6; color: var(--text);
  text-align: justify;
}
/* onde a impressão vai quebrar a página (termo de adesão, por exemplo) */
.previa-contrato .quebra-pagina {
  border-top: 2px dashed var(--gold);
  margin: 22px 0 18px;
  position: relative;
}
.previa-contrato .quebra-pagina::after {
  content: 'nova página';
  position: absolute; top: -9px; right: 0;
  background: var(--surface); padding: 0 8px;
  font-family: var(--font); font-size: 10.5px; color: var(--gold-dark); letter-spacing: .3px;
}
.previa-assin { display: flex; gap: 34px; margin-top: 40px; font-size: 12px; text-align: center; }
.previa-assin > div { flex: 1; }
.previa-assin .linha { border-top: 1px solid var(--text); margin-bottom: 6px; }
.previa-assin .pq { font-size: 10.5px; color: var(--text-soft); }

/* tabela de valores por segmento (Dados financeiros) */
.valor-head, .valor-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
}
.valor-head {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  color: var(--text-soft); letter-spacing: 0.4px; margin-bottom: 5px; padding: 0 2px;
}
.valor-row { margin-bottom: 6px; }
.valor-row input {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; background: var(--bg); min-width: 0;
}
.valor-row input:focus { outline: none; border-color: var(--blue-400); background: #fff; }
@media (max-width: 560px) { .valor-head { display: none; } .valor-row { grid-template-columns: 1fr 1fr !important; } }

/* quais contratos o ano manda (aba 📄 Contratos dos Dados financeiros) */
.fd-ct-row {
  display: grid; grid-template-columns: 26px 1.7fr 1.3fr; gap: 10px; align-items: center;
  padding: 7px 8px; border-radius: 8px; margin-bottom: 2px;
}
.fd-ct-row:hover { background: var(--blue-50); }
.fd-ct-row input[type="checkbox"] { width: auto; justify-self: center; accent-color: var(--blue-600); }
@media (max-width: 560px) { .fd-ct-row { grid-template-columns: 26px 1fr; } .fd-ct-row select { grid-column: 2; } }

/* filtros da aba Turmas */
.turmas-filtros {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px;
}
.turmas-filtros .field { margin: 0; }
.turmas-filtros .tf-busca { flex: 1 1 320px; }
.turmas-filtros .tf-seg { flex: 0 1 240px; }
.turmas-filtros input, .turmas-filtros select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 13.5px; background: var(--surface);
}
.turmas-filtros input:focus, .turmas-filtros select:focus { outline: none; border-color: var(--blue-400); }

/* ---------- Alunos ---------- */
.alunos-busca { margin-bottom: 14px; }
.alunos-busca input {
  width: 100%; padding: 12px 16px; font-family: inherit; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.alunos-busca input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-100); }
.fin-alerta { color: var(--red); font-weight: 700; }

/* resumo do plano de pagamento */
.fin-resumo {
  display: flex; gap: 18px; flex-wrap: wrap;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; color: var(--text-soft);
}

/* tabela de parcelas — rola na horizontal quando a tela é estreita */
.parc-wrap { overflow-x: auto; padding-bottom: 4px; }
.parc-head, .parc-row {
  display: grid;
  grid-template-columns: 26px minmax(190px, 1.7fr) 132px 96px 68px 104px 108px 132px 176px;
  gap: 7px; align-items: center; min-width: 1080px;
}
.parc-head {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  color: var(--text-soft); letter-spacing: 0.4px; margin-bottom: 5px; padding: 0 2px;
}
.parc-row { margin-bottom: 6px; }
.parc-row input, .parc-row select {
  padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 12.5px; background: var(--bg); min-width: 0; width: 100%;
}
.parc-row input:focus, .parc-row select:focus { outline: none; border-color: var(--blue-400); background: #fff; }
.parc-head input[type="checkbox"], .parc-row input[type="checkbox"] {
  width: auto; justify-self: center; padding: 0; border: 0; accent-color: var(--blue-600);
}
/* valor com desconto: só leitura */
.pc-liquido { font-size: 12.5px; font-weight: 700; text-align: right; padding-right: 4px; }
/* verde = paga · amarelo = ainda no prazo · vermelho = venceu sem pagar */
.parc-row .pc-st-pago { border-color: #86efac; background: #f0fdf4; color: #15803d; font-weight: 700; }
.parc-row .pc-st-aberta { border-color: var(--gold); background: #fffbeb; }
.parc-row .pc-st-vencida { border-color: #fca5a5; background: #fef2f2; color: #b3362a; font-weight: 700; }
/* desconto acima do limite que a escola definiu */
.parc-row.pc-acima .pc-desconto { border-color: var(--gold); background: #fffbeb; font-weight: 700; }

.pc-acoes { display: flex; gap: 2px; justify-content: flex-end; }
.pc-ac {
  border: 1px solid var(--border); background: var(--surface); border-radius: 7px;
  width: 27px; height: 30px; font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.pc-ac:hover { background: var(--blue-50); border-color: var(--blue-400); }
.pc-ac-del:hover { background: #fdecea; border-color: #fca5a5; }

/* mês marcado para não gerar/enviar boleto — a parcela continua devida */
.pc-ac-sem.ligado { background: #fff7ed; border-color: #fdba74; }
.pc-ac-sem:hover { background: #fff7ed; border-color: #fdba74; }
.parc-row.pc-sem-boleto { background: #fffaf3; }
.parc-row.pc-sem-boleto .pc-desc { border-color: #fdba74; }
.parc-row.pc-sem-boleto .pc-desc::after { content: ''; }
.parc-row.pc-sem-boleto .pc-liquido { color: #b45309; }
.parc-row.pc-sem-boleto .pc-liquido::after {
  content: ' 🚫'; font-size: 10px;
}
.fin-aviso { color: #b45309; font-weight: 700; }

.parc-massa, .parc-editar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px;
}
.parc-massa { margin-top: 10px; }
.parc-editar { margin-bottom: 10px; }
.parc-editar label { font-size: 12.5px; color: var(--text-soft); }
.parc-editar input {
  width: 74px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 12.5px; background: var(--surface);
}
.pc-dica { font-size: 12px; color: var(--text-soft); }

/* parcela já paga: só consulta — não se dá desconto no que foi pago */
.parc-row.pc-travada input, .parc-row.pc-travada select {
  background: #f1f5f9; color: var(--text-soft); cursor: not-allowed; border-style: dashed;
}
.parc-row.pc-travada .pc-st-pago { background: #f0fdf4; color: #15803d; border-style: solid; }
.pc-cadeado {
  font-size: 11px; font-weight: 700; color: #15803d; background: #dcfce7;
  border-radius: 20px; padding: 4px 9px; white-space: nowrap; align-self: center;
}
.parc-row[data-bloq="banco"] .pc-cadeado { color: var(--blue-700); background: var(--blue-100); }
@media (max-width: 700px) { .parc-head { display: none; } }

/* ---------- Notas ---------- */
.sessao-chip {
  background: var(--blue-50); color: var(--blue-700);
  padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center;
}
.aval-head, .aval-row { display: grid; grid-template-columns: 1fr 90px 36px; gap: 8px; align-items: center; }
.aval-head { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--text-soft); letter-spacing: .4px; margin-bottom: 5px; padding: 0 2px; }
.aval-row { margin-bottom: 6px; }
.aval-row input {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; background: var(--bg); width: 100%;
}
.aval-row input:focus { outline: none; border-color: var(--blue-400); background: #fff; }

/* ---- mantenedoras: um cartão por CNPJ do grupo ---- */
.emp-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 12px 14px; margin-bottom: 10px; border-left: 3px solid var(--blue-600);
}
.emp-topo { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.emp-num { font-size: 13px; font-weight: 700; color: var(--blue-700); }
.emp-topo .btn { margin-left: auto; }
/* o cartão do CNPJ é longo: cada assunto ganha um título para não virar um
   paredão de campos */
.emp-secao {
  margin: 16px 0 8px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-soft);
}
.emp-card textarea {
  font-family: inherit; font-size: 14px; padding: 10px 12px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); resize: vertical; min-height: 56px;
}
.emp-conferencia { margin-top: 14px; }
.conf-ok {
  font-size: 12.5px; color: #15803d; background: #f0fdf4; border: 1px solid #86efac;
  border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.5;
}
.conf-falta {
  font-size: 12.5px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.conf-tit { font-weight: 700; color: var(--blue-700); margin-bottom: 7px; }
.conf-grave, .conf-leve { margin-bottom: 6px; }
.conf-grave strong { color: #b3362a; }
.conf-leve strong { color: #8a5a00; }
.conf-falta ul { margin: 3px 0 0; padding-left: 20px; line-height: 1.6; }
.conf-falta .pq { color: var(--text-soft); font-weight: 400; }
.conf-pe { font-size: 11.5px; color: var(--text-soft); margin-top: 7px; }

/* ---- fluência de leitura: palavras por minuto ---- */
.lt-grafico {
  position: relative; display: flex; align-items: flex-end; gap: 4px;
  height: 120px; padding: 14px 8px 4px; margin-bottom: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.lt-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 22px; }
.lt-bar-in { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; }
.lt-bar span { font-size: 10px; font-weight: 700; color: var(--text-soft); margin-top: 2px; }
.lt-meta { position: absolute; left: 8px; right: 8px; border-top: 1px dashed var(--gold-dark); pointer-events: none; }
.lt-meta span {
  position: absolute; right: 0; top: -8px; font-size: 9.5px; font-weight: 700;
  color: var(--gold-dark); background: var(--surface); padding: 0 4px; border-radius: 4px;
}

.lt-wrap { display: flex; flex-direction: column; gap: 6px; }
.lt-linha {
  display: grid; grid-template-columns: 130px 84px 108px 1fr 34px; gap: 10px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; background: var(--surface);
}
.lt-quando { font-size: 12.5px; font-weight: 700; color: var(--blue-700); }
.lt-ppm {
  text-align: center; font-size: 12.5px; font-weight: 800;
  border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--text-soft); border: 1px solid var(--border);
}
.lt-ppm.ok { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.lt-ppm.baixo { background: #fff7ed; color: #b45309; border-color: #fdba74; }
.lt-dif { font-size: 12px; font-weight: 700; color: var(--text-soft); }
.lt-det { font-size: 12px; color: var(--text-soft); }
.lt-det .pq, .lt-dif .pq { font-weight: 400; opacity: .85; }
@media (max-width: 760px) {
  .lt-linha { grid-template-columns: 1fr 84px 34px; }
  .lt-dif, .lt-det { grid-column: 1 / -1; }
}

/* ---- Solicitações: pedidos de serviço entre a equipe ---- */
/* quantas estão esperando por você, no próprio botão */
.fin-btn .fin-badge {
  position: absolute; top: 10px; right: 12px;
  min-width: 22px; text-align: center; font-size: 11.5px; font-weight: 800;
  background: var(--blue-600); color: #fff; border-radius: 999px; padding: 2px 7px;
}
.sol-abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sol-aba {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  padding: 7px 15px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text);
}
.sol-aba:hover { border-color: var(--blue-400); }
.sol-aba.sel { border-color: var(--blue-600); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-600); color: var(--blue-700); }
.sol-bolha {
  min-width: 20px; text-align: center; font-size: 11px; font-weight: 800;
  background: var(--blue-600); color: #fff; border-radius: 999px; padding: 1px 7px;
}

.sol-filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: flex-end; }
.sol-filtros .sol-busca { flex: 1 1 320px; }
.sol-filtros .sol-st { flex: 0 1 280px; }
.sol-filtros .sol-cfg-btn { flex: 0 0 auto; }

.sol-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.sol-card {
  border: 1px solid var(--border); border-left: 4px solid var(--blue-400); border-radius: var(--radius-sm);
  background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.sol-card:hover { box-shadow: var(--shadow); }
.sol-card.st-andamento { border-left-color: var(--gold); }
.sol-card.st-concluida { border-left-color: #86efac; }
.sol-card.st-recusada { border-left-color: #cbd5e1; opacity: .82; }
.sol-card.atrasada { border-left-color: #ef4444; background: #fffbfb; }
.sc-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.sc-tipo { font-weight: 700; color: var(--blue-700); }
.sc-num { color: var(--text-soft); font-weight: 700; }
.sc-pr, .sc-st {
  margin-left: auto; font-size: 10.5px; font-weight: 700; white-space: nowrap;
  border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text-soft);
}
.sc-pr { margin-left: 0; }
.sc-pr.pr-alta { background: var(--gold-soft); color: var(--gold-dark); border-color: var(--gold); }
.sc-pr.pr-urgente { background: #fef2f2; color: #b3362a; border-color: #fca5a5; }
.sc-st.st-aberta { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200, #c3cfe8); }
.sc-st.st-andamento { background: var(--gold-soft); color: var(--gold-dark); border-color: var(--gold); }
.sc-st.st-concluida { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.sc-tit { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.sc-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.sc-linhas { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-soft); }
.sc-linhas .sc-atraso { color: #b3362a; font-weight: 700; }
.sc-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }

.sol-ver-topo {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--border); border-left: 4px solid var(--blue-400); border-radius: var(--radius-sm);
  background: var(--bg); padding: 12px 14px; margin-bottom: 12px;
}
.sol-ver-topo.st-concluida { border-left-color: #86efac; }
.sol-ver-topo.atrasada { border-left-color: #ef4444; }
.sv-tit { font-size: 16px; font-weight: 700; color: var(--blue-700); }
.sv-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; }
.sv-selos { display: flex; gap: 6px; flex-wrap: wrap; }

.sol-sub { font-size: 12.5px; font-weight: 700; color: var(--blue-700); margin: 12px 0 6px; }
.sol-head-itens, .sol-item-row { display: grid; grid-template-columns: 2.2fr .6fr .9fr 1fr 40px; gap: 8px; align-items: center; }
.sol-head-orc, .sol-orc-row { display: grid; grid-template-columns: 1.3fr 1.6fr .8fr 1.2fr 40px; gap: 8px; align-items: center; }
.sol-head-tipos, .sol-tipo-row { display: grid; grid-template-columns: 60px 2fr 90px 90px 40px; gap: 8px; align-items: center; }
.sol-head-itens span, .sol-head-orc span, .sol-head-tipos span {
  font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px;
}
.sol-item-row, .sol-orc-row, .sol-tipo-row { margin-bottom: 6px; }
.sol-item-row input, .sol-orc-row input, .sol-tipo-row input[type="text"], .sol-tipo-row input:not([type]) {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; background: var(--bg); width: 100%;
}
.sol-tipo-row .st-ico { text-align: center; font-size: 16px; }
.sol-tipo-row .st-chk { display: flex; justify-content: center; }
.sol-tipo-row .st-chk input { width: 18px; height: 18px; }

.sol-conversa { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.sol-msg { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; }
.sm-quem { font-size: 11.5px; font-weight: 700; color: var(--blue-700); }
.sm-quem span { font-weight: 400; color: var(--text-soft); margin-left: 6px; }
.sm-txt { font-size: 13px; margin-top: 3px; white-space: pre-wrap; }
.hint-alerta { border-color: #fca5a5; background: #fef2f2; }
/* no lugar do botão de enviar, para quem não é a coordenação */
.envio-bloqueado {
  display: inline-block; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-soft); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}

@media (max-width: 700px) {
  .sol-head-itens, .sol-head-orc, .sol-head-tipos { display: none; }
  .sol-item-row, .sol-orc-row, .sol-tipo-row { grid-template-columns: 1fr 1fr; }
}

/* ---- coordenação: avaliação da equipe ---- */
.cd-topo {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--blue-50); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 15px; margin-bottom: 14px;
}
.cd-topo-tit { font-size: 16px; font-weight: 700; color: var(--blue-700); }
.cd-topo-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; max-width: 640px; line-height: 1.5; }
.cd-ano-campo { flex: 0 0 130px; }

.cd-passos { display: flex; flex-direction: column; gap: 10px; }
.cd-passo {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 12px 15px; transition: border-color .15s, box-shadow .15s;
}
.cd-passo:hover { border-color: var(--blue-400); box-shadow: var(--shadow); }
.cd-passo.travado { opacity: .55; }
.cd-passo.travado:hover { border-color: var(--border); box-shadow: none; }
.cd-num {
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--blue-700);
  background: var(--blue-50); border: 1.5px solid var(--blue-200, #c3cfe8);
}
.cd-passo.ok .cd-num { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.cd-txt { flex: 1; min-width: 0; }
.cd-tit { font-size: 14.5px; font-weight: 700; color: var(--blue-700); }
.cd-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.cd-sit { font-size: 12px; color: var(--text); margin-top: 5px; }
.cd-passo.ok .cd-sit { color: #15803d; }
.cd-passo > .btn { flex: 0 0 auto; }

.cd-media {
  min-width: 46px; text-align: center; font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 3px 10px; background: var(--bg); color: var(--text-soft);
}
.cd-media.ok { background: #f0fdf4; color: #15803d; }
.cd-media.baixa { background: #fef2f2; color: #b3362a; }

/* "quem eu avalio": clicar no nome da função marca a função inteira */
#cd-eq-lista .seg-tit { cursor: pointer; user-select: none; }
#cd-eq-lista .seg-tit:hover strong { color: var(--blue-600); }
.cd-conta {
  margin-left: auto; font-size: 11px; font-weight: 700; white-space: nowrap;
  border-radius: 999px; padding: 2px 9px; background: var(--bg); color: var(--text-soft);
  border: 1px solid var(--border);
}
.cd-conta.parcial { background: var(--gold-soft); color: var(--gold-dark); border-color: var(--gold); }
.cd-conta.cheio { background: #f0fdf4; color: #15803d; border-color: #86efac; }

/* navegação de período quando são muitos (semanal, mensal) */
.cd-navper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cd-navper select { flex: 1 1 220px; max-width: 320px; }
.cd-navper .btn { flex: 0 0 auto; }
.cd-navper .cd-media { flex: 0 0 auto; }
.cd-progresso { font-size: 11.5px; color: var(--text-soft); }
.nt-campo.campo-invalido {
  border-color: #fca5a5 !important; background: #fef2f2 !important; color: #b3362a; font-weight: 700;
}
.cd-invalidos {
  font-size: 12.5px; color: #b3362a; background: #fef2f2; border: 1px solid #fca5a5;
  border-radius: var(--radius-sm); padding: 8px 11px; margin-bottom: 10px;
}
.cd-aviso {
  font-size: 12px; color: var(--gold-dark, #8a5a00); background: var(--gold-soft, #fff8e6);
  border: 1px solid var(--gold, #e6c98a); border-radius: var(--radius-sm); padding: 8px 11px; margin-bottom: 10px;
}
/* no celular o botão do passo desce para baixo do texto, senão sobra uma
   coluna de 50px para a descrição inteira */
@media (max-width: 560px) {
  .cd-passo { flex-wrap: wrap; align-items: flex-start; }
  .cd-num { order: 1; }
  .cd-txt { order: 2; flex: 1 1 calc(100% - 46px); }   /* fica ao lado do número */
  .cd-passo > .btn { order: 3; flex: 1 1 100%; }        /* e o botão desce inteiro */
  .cd-ano-campo { flex: 1 1 100%; }
  .cd-topo-sub { font-size: 12px; }
}

/* ---- notas: pesquisar turma em cartões ---- */
.nt-turmas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.nt-turma-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px;
  border-top: 3px solid var(--blue-600); transition: box-shadow .15s, border-color .15s;
}
.nt-turma-card:hover { box-shadow: var(--shadow); border-color: var(--blue-400); }
.ntc-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ntc-nome { font-size: 15px; font-weight: 700; color: var(--blue-700); line-height: 1.25; }
.ntc-sub { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; }
.ntc-turno {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--gold-dark); background: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.ntc-dados { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-soft); }
.ntc-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }
.ntc-acoes .btn { flex: 1 1 calc(50% - 3px); justify-content: center; white-space: nowrap; }
.ntc-acoes .btn:first-child { flex: 1 1 100%; }

/* ---- lançar notas: cabeçalho do aluno, abas por período e seções ---- */
.lanc-topo {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--blue-50, #f5f8ff); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 12px;
}
.lanc-topo .lt-nome { font-size: 16px; font-weight: 700; color: var(--blue-700); line-height: 1.25; }
.lanc-topo .lt-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.lt-resumo {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; background: #fff;
}
.lt-resumo.ok { border-color: #86efac; background: #f0fdf4; }
.lt-resumo.baixa { border-color: #fca5a5; background: #fef2f2; }
.lt-resumo .lr-rot { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); }
.lt-resumo .lr-nota { font-size: 20px; font-weight: 800; color: var(--blue-700); }
.lt-resumo.ok .lr-nota { color: #15803d; }
.lt-resumo.baixa .lr-nota { color: #b3362a; }
.lt-resumo .lr-sit { font-size: 12.5px; font-weight: 600; }
.lt-resumo .lr-min { font-size: 11px; color: var(--text-soft); width: 100%; }

.lanc-abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lanc-aba {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  padding: 6px 12px 6px 14px; font-family: inherit; font-size: 12.5px; color: var(--text);
  transition: border-color .15s, background .15s;
}
.lanc-aba:hover { border-color: var(--blue-400); }
.lanc-aba.sel { border-color: var(--blue-600, #2a4a8b); background: var(--blue-50, #f5f8ff); box-shadow: inset 0 0 0 1px var(--blue-600, #2a4a8b); }
.lanc-aba .la-nome { font-weight: 600; }
.lanc-aba .la-nota {
  min-width: 34px; text-align: center; font-weight: 700; font-size: 12px;
  border-radius: 999px; padding: 2px 7px; background: var(--bg); color: var(--text-soft);
}
.lanc-aba .la-nota.ok { background: #f0fdf4; color: #15803d; }
.lanc-aba .la-nota.baixa { background: #fef2f2; color: #b3362a; }

.periodo-bloco {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; background: var(--surface);
}
.periodo-bloco h4 { font-size: 13.5px; color: var(--blue-700); margin-bottom: 8px; }
.nt-sec { margin-bottom: 12px; }
.nt-sec:last-of-type { margin-bottom: 0; }
/* Estes textos livres (pontos fortes, plano de ação…) ficam soltos dentro do
   bloco, sem o .field em volta, então não pegavam a largura de 100% dos
   formulários e nasciam com as 20 colunas que o navegador dá de fábrica. */
.nt-sec > textarea {
  font-family: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  width: 100%; resize: vertical; min-height: 58px;
}
.nt-sec > textarea:focus {
  outline: none; border-color: var(--blue-400);
  box-shadow: 0 0 0 3px var(--blue-100); background: #fff;
}
.nt-sec-tit {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--blue-700); margin-bottom: 7px; padding-bottom: 5px; border-bottom: 1px solid var(--border);
}
.nt-sec-tit .lb-peso { text-transform: none; letter-spacing: 0; }
.nt-sec-rec, .nt-sec-ctrl {
  border-radius: 10px; padding: 10px 12px; margin-top: 12px;
}
.nt-sec-rec { background: var(--gold-soft, #fdf7e7); border: 1px solid var(--gold, #e3c77a); }
.nt-sec-rec .nt-sec-tit { color: var(--gold-dark); border-bottom-color: var(--gold, #e3c77a); }
.nt-sec-ctrl { background: var(--bg); border: 1px solid var(--border); }
.nt-sec-ctrl .notas-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.nt-sec-obs { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.nt-nota { font-size: 12px; color: var(--text-soft); margin-top: 7px; }
.lb-peso { font-size: 10.5px; font-weight: 600; color: var(--text-soft); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

.notas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }
/* O rótulo de um critério pode ter uma ou duas linhas ("Trabalho em equipe" x
   "Relacionamento com alunos e famílias"). Sem isto, a caixa de nota nasce logo
   abaixo do texto e a linha inteira fica escalonada. Com o rótulo crescendo até
   encher a célula, todas as caixas encostam no mesmo rodapé e ficam alinhadas. */
.notas-grid .field { justify-content: flex-end; }
.notas-grid .field label { font-size: 12px; flex: 1 0 auto; }
/* caixa e lista suspensa nascem com alturas diferentes (39 e 41): fixando as
   duas, a linha fica com topo e base no mesmo lugar */
.notas-grid input, .notas-grid select { text-align: center; font-weight: 600; height: 40px; }
/* data e nome de quem avaliou não são nota: ficam alinhados à esquerda */
.nt-sec-dev .notas-grid input { text-align: left; font-weight: 400; }
.nt-sec-ctrl .notas-grid select { text-align: left; font-weight: 400; }
.media-preview { margin-top: 10px; font-size: 12.5px; color: var(--text-soft); }
.nota-ok { color: var(--green); }
.nota-baixa { color: var(--red); }

/* resultado da recuperação: verde quando alcançou a média, vermelho quando não */
.media-preview.mp-ok, .media-preview.mp-baixa {
  border-radius: 8px; padding: 9px 12px; font-weight: 500;
}
/* memória de cálculo: a conta passo a passo */
.mem-calc { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.mem-calc .mc-tit { font-weight: 700; }
.mem-calc .mc-tit::after { content: ':'; }
.mem-calc .pq { opacity: .8; font-size: 11.5px; }
.mem-calc .mc-final { display: inline-block; margin-top: 4px; padding-top: 5px; border-top: 1px dashed currentColor; font-weight: 700; }
.mem-calc .mc-falta { font-style: normal; color: var(--gold-dark); background: var(--gold-soft); border-radius: 4px; padding: 0 5px; }
.mem-calc .mc-aviso { color: var(--gold-dark); background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 6px; padding: 4px 8px; display: inline-block; font-size: 11.5px; }
.media-preview.mp-ok { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.media-preview.mp-baixa { background: #fef2f2; border: 1px solid #fca5a5; color: #b3362a; }
.nt-campo.campo-ok, .dg-in.campo-ok { border-color: #86efac !important; background: #f0fdf4 !important; color: #15803d; font-weight: 700; }
.nt-campo.campo-baixo, .dg-in.campo-baixo { border-color: #fca5a5 !important; background: #fef2f2 !important; color: #b3362a; font-weight: 700; }
.diario .dr-media.recuperou { background: #f0fdf4; }
.diario .dr-media.recuperou::after { content: ' ↻'; font-size: 10px; opacity: .7; }

/* diário em grade */
.diario-wrap { max-height: 52vh; overflow: auto; }
table.diario th { position: sticky; top: 0; z-index: 2; font-size: 11px; }
table.diario td { padding: 5px 7px; }
table.diario .dr-nome { min-width: 190px; font-size: 13px; }
table.diario .dg-in {
  width: 100%; min-width: 62px; padding: 6px 7px;
  border: 1px solid var(--border); border-radius: 7px;
  font-family: inherit; font-size: 12.5px; text-align: center; background: var(--bg);
}
table.diario .dg-in:focus { outline: none; border-color: var(--blue-400); background: #fff; }
table.diario .dr-media { text-align: center; font-weight: 800; font-size: 13.5px; }

/* diário com todos os períodos */
table.diario .th-grupo {
  text-align: center; background: var(--blue-600); color: #fff;
  border-left: 2px solid var(--surface); border-right: 2px solid var(--surface);
}
table.diario-todos { min-width: 900px; }
table.diario-todos .dr-nome { position: sticky; left: 0; background: var(--surface); z-index: 1; }

/* abas internas: Notas | Tarefas | Diário de classe */
.nav-diario {
  display: flex; gap: 6px; margin-bottom: 4px;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.nd-btn {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-soft);
  padding: 9px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.nd-btn:hover { color: var(--blue-600); background: var(--blue-50); border-radius: 8px 8px 0 0; }
.nd-btn.sel { color: var(--blue-700); border-bottom-color: var(--gold); }
.nd-legenda { font-size: 12px; color: var(--text-soft); margin: 8px 0 12px; }

/* coluna de recuperação por prova, na grade da turma */
.diario td.td-rec .dg-in { background: var(--gold-soft); border-color: var(--gold); }

/* ---------- diário de classe: calendário do mês ---------- */
.dcal { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface); }
.dcal-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.dcal-topo .link-btn { font-size: 17px; line-height: 1; padding: 0 8px; }
.dcal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dcal-sem { text-align: center; font-size: 10px; font-weight: 800; color: var(--text-soft); padding-bottom: 2px; }
.dcal-vazio { height: 30px; }
.dcal-dia {
  height: 30px; border: 1px solid transparent; border-radius: 7px; background: var(--bg);
  font-family: inherit; font-size: 12.5px; color: var(--text); cursor: pointer;
}
.dcal-dia:hover { background: var(--blue-50); }
.dcal-dia.tem { background: #dcfce7; color: #15803d; font-weight: 700; }
.dcal-dia.hoje { border-color: var(--gold); }
.dcal-dia.sel { background: var(--blue-600); color: #fff; font-weight: 800; }
.dcal-leg { display: flex; gap: 14px; margin-top: 7px; font-size: 11px; color: var(--text-soft); }
.dcal-leg i.q { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.dcal-leg i.tem { background: #dcfce7; border: 1px solid #86efac; }
.dcal-leg i.sel { background: var(--blue-600); }

/* anotações rápidas do conteúdo da aula */
.dc-atalhos { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 7px; }
.dc-at-tit { font-size: 11.5px; color: var(--text-soft); margin-right: 2px; }
.dc-at {
  border: 1px solid var(--border); background: var(--bg); border-radius: 20px;
  padding: 4px 11px; font-family: inherit; font-size: 11.5px; color: var(--text); cursor: pointer;
}
.dc-at:hover { background: var(--blue-50); border-color: var(--blue-400); color: var(--blue-700); }
.dc-at-cfg { color: var(--text-soft); }

/* aviso de validação do CPF/CNPJ */
.doc-aviso { font-size: 11.5px; font-weight: 600; margin-top: 3px; display: block; min-height: 14px; }
.doc-aviso.ok { color: var(--green); }
.doc-aviso.erro { color: var(--red); }

/* célula segmento × tipo de cobrança */
.vl-cell { position: relative; display: flex; align-items: center; min-width: 0; }
.vl-cell .vl-val { width: 100%; padding-right: 22px; }
.vl-off-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; padding: 2px 4px;
  font-size: 11px; color: var(--text-soft); opacity: 0; transition: opacity .15s;
}
.vl-cell:hover .vl-off-btn { opacity: 1; }
.vl-off-btn:hover { color: var(--red); }
/* célula desligada: este segmento não cobra esse tipo */
.vl-cell.off {
  justify-content: space-between; gap: 4px;
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 8px 6px 8px 9px; background: var(--bg);
}
.vl-cell.off span { font-size: 11.5px; color: var(--text-soft); font-style: italic; }
.vl-cell.off .link-btn { font-size: 15px; line-height: 1; color: var(--green); }

/* gráfico de barras entradas/saídas */
.fin-chart {
  display: flex; align-items: flex-end; gap: 18px;
  height: 160px; padding: 0 8px;
  border-bottom: 2px solid var(--border);
}
.fc-grupo { display: flex; flex-direction: column; align-items: center; flex: 1; }
.fc-barras { display: flex; align-items: flex-end; gap: 4px; height: 132px; }
.fc-bar { width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.fc-ent { background: var(--green); }
.fc-sai { background: var(--red); }
.fc-mes { font-size: 11px; font-weight: 700; color: var(--text-soft); margin-top: 5px; }
.fc-legenda { display: flex; gap: 18px; margin-top: 8px; font-size: 12px; color: var(--text-soft); }
.fc-legenda .fc-q { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

/* selo de status na Lista de visitas */
.tag-status { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tag-status.st-ok { background: #dcfce7; color: #15803d; }
.tag-status.st-nao { background: #fee2e2; color: #b91c1c; }
.tag-status.st-duvida { background: #fef3c7; color: #a16207; }
.tag-status.st-neutro { background: var(--bg); color: var(--text-soft); }

.hint {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 12.5px; color: var(--blue-700); margin-bottom: 18px;
  display: flex; gap: 9px; align-items: flex-start;
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 50px; }
  .cal-day { min-height: 64px; }
}

/* ===== Acesso (login, chip do usuário, Página da Coordenação) ===== */
/* ===== Confirmação própria (o confirm do navegador é bloqueado em quadro protegido) ===== */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 37, 64, 0.5);
  display: grid; place-items: center; padding: 20px;
}
.confirm-overlay[hidden] { display: none; }
.confirm-box {
  background: var(--surface); border-radius: 14px; padding: 24px 26px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
  animation: confirmSobe .16s ease;
}
@keyframes confirmSobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.confirm-box h3 { font-size: 17px; color: var(--text); margin-bottom: 8px; }
.confirm-box p { font-size: 14px; color: var(--text-soft); line-height: 1.55; }
.confirm-acts { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; }
@media (prefers-reduced-motion: reduce) { .confirm-box { animation: none; } }

/* Enquanto não se sabe quem está entrando, o programa não aparece — nem por um
   instante. Isto precisa viver no CSS, e não no JS: o navegador pinta a tela
   antes de qualquer script rodar, e era por isso que o programa piscava por
   alguns milésimos antes da tela de login. A classe nasce no <body>, escrita no
   próprio HTML, e sai só quando Auth.entrar() autoriza. Se o JS falhar ou for
   bloqueado, ela nunca sai: falha para o lado seguro. */
body.trancado > .app-header,
body.trancado > .tabs,
body.trancado > .content,
body.trancado > .toast-container { display: none !important; }

.login-screen {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(160deg, #15244a, #213564 55%, #2c4680);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* o cartão de espera, entre a pintura e a resposta do servidor */
.login-espera { color: #cdd6ee; font-size: 14px; text-align: center; }
/* mesmo tamanho do cartão de login, para o brasão não dar um salto quando a
   espera dá lugar ao formulário */
.login-espera img { height: 112px; margin-bottom: 12px; opacity: .95 }
/* o atributo hidden precisa vencer o display:flex acima, senão sobra uma tela azul vazia */
.login-screen[hidden] { display: none; }
.login-card {
  background: #fff; border-radius: 16px; padding: 34px 32px; width: 100%; max-width: 380px;
  box-shadow: 0 18px 60px rgba(8, 15, 40, .5); text-align: center;
}
/* o brasão é detalhado: quanto maior, mais o escudo se lê */
.login-logo { height: 112px; margin-bottom: 12px; }
.login-card h1 { font-size: 20px; color: var(--navy); margin-bottom: 4px; line-height: 1.25; }
.login-card h1 .nome-junto { white-space: nowrap; }
.login-sub { font-size: 13px; color: var(--text-soft); margin-bottom: 18px; line-height: 1.5; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin: 10px 0 4px; }
.login-card input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 15px; font-family: inherit;
}
.login-card input:focus { outline: none; border-color: var(--gold); }
/* mostrar/ocultar a senha: o botão fica dentro do campo, para não empurrar o
   formulário nem mudar de lugar quando a palavra troca de tamanho */
.login-senha { position: relative; }
.login-senha input { padding-right: 86px; }
.login-ver {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-soft); cursor: pointer; padding: 7px 9px; border-radius: 6px;
  min-width: 74px;   /* "Mostrar" e "Ocultar" ocupam a mesma largura */
}
.login-ver:hover { color: var(--navy); background: #eef2f9; }
@media (pointer: coarse) { .login-ver { min-height: 40px; padding: 0 9px; } }
.login-btn { width: 100%; margin-top: 16px; padding: 11px; font-size: 15px; justify-content: center; }
/* segundo caminho da tela de escolha da coordenação: presente, mas sem competir
   com o botão principal */
.login-btn-2 {
  background: #fff; color: var(--navy); border: 1.5px solid var(--border); margin-top: 10px;
}
.login-btn-2:hover { border-color: var(--navy); background: #f6f8fc; }
.login-erro {
  background: #fdecea; color: #b3362a; border-radius: 8px; padding: 9px 11px;
  font-size: 13px; margin-top: 12px;
}
.login-mestre-link {
  display: inline-block; margin-top: 16px; font-size: 12px; color: var(--text-soft);
  text-decoration: none;
}
.login-mestre-link:hover { color: var(--navy); text-decoration: underline; }

.user-area { display: inline-flex; align-items: center; gap: 8px; }
.versao-label {
  font-size: 11px; color: var(--text-soft); opacity: .7;
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px; white-space: nowrap;
}

.coord-user {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: 11px; padding: 11px 13px;
  margin-bottom: 9px; flex-wrap: wrap;
}
.coord-user-off { opacity: .55; }
.coord-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coord-user-login { font-size: 12.5px; color: var(--text-soft); }
.coord-user-perm { font-size: 12.5px; color: var(--text-soft); }
.coord-user-acts { display: flex; gap: 6px; }
.coord-h4 { margin: 16px 0 8px; font-size: 14px; color: var(--navy); }
.chk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.chk-line {
  display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text);
  padding: 3px 0; cursor: pointer;
}

/* ============================================================
   CELULAR E TABLET
   O desktop já estava bom; o que quebrava no celular era o topo:
   ele é uma linha flexível que não quebra, e a soma da marca com o
   bloco da direita passava da largura da tela. Isso empurrava o
   documento inteiro para 422px numa tela de 375px, e por isso TODAS
   as abas rolavam para o lado, não só uma.
   ============================================================ */

/* ---------- tablet ---------- */
/* 1100 e nao 900: um iPad deitado tem 1024, e ali o topo do desktop ja
   quebrava em tres linhas de tao apertado */
@media (max-width: 1100px) {
  .app-header { padding: 10px 16px; gap: 10px; }
  .brand { gap: 10px; min-width: 0; }
  .brand-logo-img { height: 38px; }
  .brand-text span { font-size: 11px; letter-spacing: .3px; }
  /* o lado direito fica numa linha só: quebrando, o topo passava de 100px e
     comia um quinto da tela do tablet o tempo todo */
  .header-actions { gap: 8px; flex-wrap: nowrap; min-width: 0; }
  .versao-label { display: none; }
  .user-area { flex-wrap: nowrap; min-width: 0; }
  .today-label { font-size: 12px; padding: 6px 11px; }
  .tabs { padding: 0 10px; }
  .tab { padding: 13px 13px; font-size: 13.5px; }
  .content { padding: 20px 16px 60px; }
}

/* ---------- celular ---------- */
@media (max-width: 620px) {
  /* o topo cabe numa linha só: marca à esquerda, quem entrou à direita */
  .app-header { padding: 8px 12px; gap: 8px; }
  .brand-divider { display: none; }
  .brand-logo-img { height: 34px; }
  /* O nome fica numa linha só e corta com reticências se faltar espaço.
     Deixá-lo quebrar foi pior: com o espaço espremido a zero, ele quebrava
     letra por letra e o topo virava uma coluna de 648px de altura. */
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-text span {
    font-size: 11px; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* o chip de quem entrou cede espaço e quebra de linha se precisar */
  .header-actions { flex: 0 1 auto; min-width: 0; }
  .user-area { flex-wrap: wrap; justify-content: flex-end; }
  /* a data por extenso ("segunda-feira, 17 de agosto de 2026") não cabe;
     a versão também não faz falta aqui */
  .hoje-bloco, .versao-label { display: none; }

  /* No celular o cabeçalho rola junto com a página em vez de ficar preso: ele
     tem duas linhas e comeria um sexto da tela o tempo todo. Quem fica presa é
     só a barra de abas, que é o que a pessoa usa para navegar. */
  /* display:contents dissolve o embrulho: cabeçalho e abas voltam a ser filhos
     diretos do corpo da página. Sem isso, as abas grudariam só DENTRO do bloco
     e sumiriam junto com ele ao rolar, porque um elemento preso não escapa da
     caixa do pai. */
  .topo-fixo { display: contents; }
  .app-header { position: static; }
  .tabs { position: sticky; top: 0; z-index: 40; padding: 0 6px; }
  /* o chip de quem entrou fica compacto, para caber ao lado da marca */
  .user-area { font-size: 12px; gap: 6px; }
  .user-area .sessao-chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab { padding: 12px 11px; font-size: 13px; }

  .content { padding: 14px 12px 60px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head .acoes, .page-head .form-actions { justify-content: flex-start; flex-wrap: wrap; }

  /* janelas ocupam a tela quase inteira, em vez de um cartãozinho no meio */
  .modal { max-width: 100%; width: 100%; border-radius: 14px 14px 0 0; margin-top: auto; max-height: 92vh; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-body { padding: 16px 14px 20px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* Nenhum elemento pode alargar a página. */
@media (max-width: 1100px) {
  /* NAO usar overflow-x: hidden aqui: isso quebra o position:sticky das abas.
     A largura ja e contida pelas regras acima, entao nao faz falta. */
  html, body { max-width: 100%; }
  .app-header, .content, .page-head { max-width: 100%; }
  /* tabela larga rola dentro do próprio quadro, sem arrastar a página */
  .tabela-rolavel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data { min-width: 520px; }
}

/* ---------- dedo, e não mouse ---------- */
/* 40px é o mínimo confortável; abaixo disso erra-se o alvo */
@media (pointer: coarse) {
  .btn { min-height: 40px; }
  .btn-sm, .link-btn { min-height: 36px; }
  .tab { min-height: 44px; }
  .vt-btn, .filtro-chip, .ws-select, select, input[type="text"], input[type="date"],
  input[type="number"], input[type="password"], input[type="email"] { min-height: 40px; }
  .note-x { min-width: 28px; min-height: 28px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
}

/* O aviso de aniversários tem colunas de largura fixa (quando, data, idade) que
   somadas não cabem num celular: era a única tela que ainda rolava para o lado
   depois que o colégio ficou cheio de gente. No celular a linha vira duas. */
@media (max-width: 620px) {
  .bday-banner { padding: 12px 12px; }
  .bday-row { flex-wrap: wrap; gap: 6px 10px; padding: 9px 10px; }
  .bday-when { width: auto; font-size: 11px; padding: 4px 7px; }
  .bday-date { width: auto; font-size: 12.5px; }
  .bday-name { flex: 1 1 100%; order: 3; }
  .bday-age { font-size: 11.5px; padding: 3px 8px; }
  .bday-list-head { flex-wrap: wrap; font-size: 14px; }
}

/* ---------- aba aberta só para consulta ---------- */
/* A trava de verdade está no Store (js/storage.js); esta faixa é o aviso, para
   a pessoa não preencher uma tela inteira e só descobrir no fim. */
.faixa-so-ver {
  background: #fff8e6; border: 1px solid #e6c65c; color: #7a5c00;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
  font-size: 13.5px; line-height: 1.5;
}

/* ---------- ajuste da foto do colaborador ---------- */
.foto-ajuste { margin: 14px 0; }
.foto-palco {
  position: relative; margin: 0 auto; overflow: hidden;
  border-radius: 12px; background: #1d2b4f;
  cursor: grab; touch-action: none;   /* o dedo arrasta a foto, não a página */
  user-select: none;
}
.foto-palco img { position: absolute; max-width: none; pointer-events: none; }
/* o círculo é um furo: escurece tudo em volta e mostra o que vai ser gravado */
.foto-mascara {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(15, 23, 42, .55) inset;
  border-radius: 50%;
}
.foto-palco::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 2px solid rgba(255,255,255,.9); border-radius: 50%;
}

/* ---------- telefone em duas caixas: DDD e número ---------- */
.tel-duplo { display: flex; gap: 8px; align-items: flex-start; }
.tel-duplo > div { display: flex; flex-direction: column; }
.tel-duplo > div:first-child { flex: 0 0 68px; }
.tel-duplo > div:last-child { flex: 1 1 auto; min-width: 0; }
.tel-duplo input { width: 100%; }
.tel-duplo .tel-ddd { text-align: center; letter-spacing: 1px; }
/* o rótulo de cada caixa fica embaixo, pequeno: diz o que é sem ocupar espaço */
.tel-duplo small {
  font-size: 11px; color: var(--text-soft); text-align: center;
  margin-top: 3px; text-transform: uppercase; letter-spacing: .4px;
}

/* ---------- nome clicável, que abre a ficha para consulta ---------- */
.nome-clicavel { cursor: pointer; border-bottom: 1px dashed transparent; transition: .15s; }
.nome-clicavel:hover { color: var(--blue-700); border-bottom-color: currentColor; }

/* ---------- ficha só de leitura ---------- */
.ver-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.ver-topo .avatar { width: 64px; height: 64px; font-size: 22px; flex: 0 0 auto; }
.ver-nome { font-size: 18px; font-weight: 700; color: var(--blue-700); line-height: 1.2; }
.ver-func { color: var(--text-soft); font-size: 13.5px; margin-top: 2px; }
.ver-linha {
  display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; align-items: baseline;
}
.ver-linha:last-child { border-bottom: none; }
.ver-rot { flex: 0 0 150px; color: var(--text-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.ver-val { flex: 1 1 auto; min-width: 0; word-break: break-word; }
@media (max-width: 620px) {
  .ver-linha { flex-direction: column; gap: 2px; padding: 8px 0; }
  .ver-rot { flex: none; }
}

/* ---------- linha inteira do cadastro abre a ficha ---------- */
.collab-item.clicavel { cursor: pointer; }
.collab-item.clicavel:hover { border-color: var(--blue-400, #38508c); background: var(--blue-50, #f6f8fd); }
/* os botões de ação continuam se comportando como botões, e não como parte da linha */
.collab-item.clicavel .cl-actions { cursor: default; }

/* ---------- escolher as colunas da lista da equipe ---------- */
.col-colunas {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px;
  max-height: 190px; overflow-y: auto; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.marca-col {
  display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px;
  font-size: 13.5px; cursor: pointer; text-transform: none; font-weight: 400;
}
.marca-col:hover { background: var(--blue-50, #f6f8fd); }
.marca-col input { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; }

/* ---------- balãozinho de solicitações na aba ---------- */
.tab { position: relative; }
.tab-balao {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  margin-left: 6px; padding: 0 5px; border-radius: 9px;
  background: var(--gold, #c9a44e); color: #15244a;
  font-size: 11px; font-weight: 800; text-align: center; vertical-align: middle;
}
.tab-balao.atrasado { background: var(--red, #b3362a); color: #fff; }
/* na aba selecionada o fundo é escuro: o balão vira claro para continuar legível */
.tab.active .tab-balao { background: #fff; color: var(--blue-700, #15244a); }
.tab.active .tab-balao.atrasado { background: #ffd9d4; color: #7a1d13; }

/* quem não entra no programa, na escolha de destinatários */
.recipiente.sem-acesso { opacity: .62; }
.sem-acesso-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--red, #b3362a);
  background: var(--red-soft, #fef2f2); border-radius: 10px; padding: 1px 7px;
}

/* ---------- turmas: colunas alinhadas e alturas iguais ---------- */
/* Em flex cada cartão se acomoda sozinho e as colunas de linhas diferentes não
   se encontram. Em grade, todas as linhas usam a MESMA régua de colunas, então
   "Responsável" fica embaixo de "Responsável" na linha de cima. */
.turma-item {
  display: grid;
  grid-template-columns: 44px minmax(200px, 1.6fr) 88px 66px 1fr 1fr 116px auto;
  align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
  box-shadow: var(--shadow); min-height: 74px;
}
.turma-item .cl-data { min-width: 0; }
/* nome comprido vira reticências em vez de empurrar a coluna do vizinho */
.turma-item .cl-data span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turma-item .cl-actions { margin-left: 0; justify-content: flex-end; }
.turma-horario {
  font-size: 12px; color: var(--text-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  /* aperta: some o número da turma e o nome ganha o espaço */
  .turma-item { grid-template-columns: 40px minmax(160px, 1.4fr) 80px 1fr 1fr 104px auto; }
  .turma-item .cl-data.col-numero { display: none; }
}
@media (max-width: 820px) {
  /* no aperto, a grade rigida atrapalha: volta a fluir, com os dados lado a
     lado e os botoes embaixo */
  .turma-item { display: flex; flex-wrap: wrap; gap: 12px 18px; }
  .turma-item .cl-main { flex: 1 1 100%; }
  .turma-item .cl-data { flex: 0 1 auto; min-width: 92px; }
  .turma-item .cl-actions { flex: 1 1 100%; justify-content: flex-start; }
}

/* ---------- alocação de aulas por professor ---------- */
.tm-hora-row {
  display: grid; grid-template-columns: minmax(140px, 1.6fr) minmax(120px, 1.2fr) 92px auto;
  gap: 8px; align-items: center; margin-bottom: 6px;
}
.tm-hora-row .tmh-aulas { text-align: center; }
@media (max-width: 620px) {
  .tm-hora-row { grid-template-columns: 1fr 1fr; }
  .tm-hora-row .tmh-quem { grid-column: 1 / -1; }
}

/* ---------- tempos do dia e disciplinas da turma ---------- */
.tm-tempo-row {
  display: grid; grid-template-columns: 26px 1fr 76px 34px 152px auto;
  gap: 8px; align-items: center; margin-bottom: 5px;
  padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border);
}
.tm-tempo-row.recreio { background: var(--gold-soft, #fdf8ec); border-color: var(--gold, #c9a44e); }
.tm-tempo-nome { font-weight: 700; font-size: 13.5px; }
.tm-tempo-dur { text-align: center; }
.tm-tempo-un { font-size: 12px; color: var(--text-soft); }
.tm-tempo-relogio { font-size: 13px; color: var(--text-soft); font-variant-numeric: tabular-nums; }

.tm-disc-cab, .tm-disc-row {
  display: grid; grid-template-columns: 1.25fr 82px 88px 1.75fr auto;
  gap: 8px; align-items: center;
}
.tm-disc-cab {
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-soft); font-weight: 800; padding: 0 2px 4px;
}
.tm-disc-row { margin-bottom: 5px; }
.tmd-aulas { text-align: center; }
.tmd-carga { font-size: 12px; color: var(--text-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .tm-tempo-row { grid-template-columns: 1fr 62px 28px auto; }
  .tm-arrasta { display: none; }
  .tm-tempo-relogio { grid-column: 1 / -1; }
  .tm-disc-cab { display: none; }
  .tm-disc-row { grid-template-columns: 1fr 72px auto; }
  .tm-disc-row .tmd-quem { grid-column: 1 / -1; }
  .tmd-carga { grid-column: 1 / -1; }
}

/* ---------- Grade horária / compatibilidade ---------- */
.grade-topo { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end;
  justify-content:space-between; margin-bottom:14px; }
.grade-topo .field { min-width:220px; }
.grade-acoes { display:flex; flex-wrap:wrap; gap:8px; }

/* o quadro imita o que a escola já tem na parede: fundo creme, faixa azul
   com o nome da turma e cada aula num bloco colorido com borda escura */
.grade-quadro { background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:14px; overflow-x:auto; }
.grade-titulo { background:#3a7bd5; color:#fff; border:3px solid #1d2b4f; border-radius:12px;
  padding:10px; text-align:center; font-size:19px; font-weight:800; letter-spacing:1px;
  text-transform:uppercase; margin-bottom:12px; }
.grade-tab { width:100%; border-collapse:separate; border-spacing:5px; min-width:640px; }
.grade-tab th { background:#3a7bd5; color:#fff; border:2px solid #1d2b4f; border-radius:8px;
  padding:7px 4px; font-size:11.5px; letter-spacing:.5px; }
.grade-tab td { border:2px solid #1d2b4f; border-radius:8px; background:#fff;
  text-align:center; padding:8px 4px; font-size:12.5px; font-weight:700; }
.grade-tab td.gr-hora { white-space:nowrap; font-size:11.5px; width:1%; font-weight:700; }
.grade-tab tr.gr-intervalo td { font-weight:600; color:#3d4d70; letter-spacing:.5px; }
.gr-cel { cursor:pointer; transition:transform .08s, box-shadow .12s; line-height:1.25;
  min-width:88px; }
.gr-cel:hover { transform:translateY(-1px); box-shadow:0 3px 9px rgba(29,43,79,.28); }
.gr-disc { display:block; }
.gr-prof { display:block; font-size:10.5px; font-weight:600; opacity:.85; margin-top:2px; }
.gr-prof.gr-sem { font-style:italic; opacity:.7; }
.gr-alerta { display:block; font-size:11px; margin-top:1px; }
.gr-cel.gr-conflito { border-color:#b3362a; box-shadow:0 0 0 2px rgba(179,54,42,.35); }

/* escolher a disciplina de um horário */
.gr-escolha { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; }
.gr-opcao { display:flex; align-items:center; gap:8px; flex-wrap:wrap; text-align:left;
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:9px 11px; cursor:pointer; font-size:13px; color:var(--text); }
.gr-opcao:hover { border-color:var(--blue,#3a7bd5); }
.gr-opcao.sel { border-color:var(--blue,#3a7bd5); box-shadow:0 0 0 2px rgba(58,123,213,.25); }
.gr-opcao.ocupado { border-color:#e0b4ae; background:#fdf3f1; }
.gr-opcao-nome { font-weight:600; }
.gr-opcao-prof { font-size:11.5px; color:var(--text-soft); width:100%; }
.gr-opcao-aviso { font-size:11.5px; color:#b3362a; width:100%; }
.gr-bolinha { width:14px; height:14px; border-radius:4px; border:1px solid rgba(0,0,0,.25);
  flex:0 0 auto; }

/* conferência de quantas aulas cada disciplina já tem na grade */
.gr-pend { display:flex; align-items:center; gap:9px; flex-wrap:wrap;
  padding:7px 2px; border-bottom:1px solid var(--border); font-size:13px; }
.gr-pend:last-of-type { border-bottom:0; }
.gr-pend-nome { font-weight:600; }
.gr-pend-prof { color:var(--text-soft); font-size:12px; flex:1; }
.gr-pend-conta { font-size:12px; font-weight:600; white-space:nowrap; }
.gr-pend-conta.ok { color:var(--green,#15803d); }
.gr-pend-conta.falta { color:var(--gold-dark,#a8842f); }
.gr-pend-conta.sobra { color:var(--red,#b3362a); }

@media (max-width:640px) {
  .grade-quadro { padding:9px; }
  .grade-titulo { font-size:15px; }
  .gr-cel { min-width:74px; font-size:11.5px; }
}
.gr-lista-conflito { margin:8px 0 0; padding-left:18px; }
.gr-lista-conflito li { margin-bottom:4px; line-height:1.4; }

.gr-cel.gr-so-ver { cursor:default; }
.gr-cel.gr-so-ver:hover { transform:none; box-shadow:none; }

/* copiar o dia de outra turma, dentro do formulário de turma */
.tm-copiar-dia { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:0 0 10px; padding:9px 12px; background:var(--surface-2, rgba(0,0,0,.03));
  border:1px solid var(--border); border-radius:10px; }
.tm-copiar-dia label { font-size:12.5px; font-weight:600; color:var(--text-soft); margin:0; }
.tm-copiar-dia select { flex:1; min-width:210px; }

/* aberto = a barra virou o painel de escolha do que copiar */
.tm-copiar-dia.aberto { display:block; padding:12px 14px; }
.tm-copiar-tit { font-size:13.5px; margin-bottom:9px; }
.tm-copiar-op { display:flex; align-items:flex-start; gap:9px; margin:0 0 7px;
  font-size:13px; font-weight:400; color:var(--text); cursor:pointer; }
.tm-copiar-op input { margin-top:2px; flex:0 0 auto; }
.tm-copiar-op strong { font-weight:600; }
.tm-copiar-op small { display:block; font-size:11.5px; color:var(--text-soft); margin-top:1px; }
.tm-copiar-op.sub { margin-left:24px; font-size:12.5px; color:var(--text-soft); }
.tm-copiar-op.off { opacity:.5; cursor:default; }
.tm-copiar-aviso { font-size:11.5px; color:var(--text-soft); margin:10px 0 9px; }
.tm-copiar-btns { display:flex; gap:8px; justify-content:flex-end; }

/* coluna extra de duração, só quando o dia tem aulas de durações diferentes */
.tm-disc-cab.com-duracao, #tm-disc.com-duracao .tm-disc-row {
  grid-template-columns: 1.15fr 74px 84px 84px 1.7fr auto;
}
.tmd-duracao { font-size: 12.5px; }
@media (max-width: 620px) {
  #tm-disc.com-duracao .tm-disc-row { grid-template-columns: 1fr 64px 84px auto; }
}

/* nome livre da parada (recreio, lanche, saída...) dentro da linha do tempo */
.tm-tempo-rot {
  font-weight: 700; font-size: 13.5px; padding: 3px 7px; width: calc(100% - 26px);
  border: 1px dashed var(--gold, #c9a44e); border-radius: 7px; background: transparent;
  color: inherit; font-family: inherit;
}
.tm-tempo-rot:focus { background: #fff; border-style: solid; outline: none; }
.tm-tempo-rot::placeholder { font-weight: 700; opacity: .55; }

/* alça de arraste e setas para mudar a ordem dos tempos */
.tm-arrasta {
  cursor: grab; user-select: none; text-align: center; font-size: 15px;
  color: var(--text-soft); line-height: 1; letter-spacing: -1px;
}
.tm-arrasta:active { cursor: grabbing; }
.tm-tempo-row.arrastando { opacity: .45; }
.tm-tempo-row.alvo { border-color: var(--blue, #3a7bd5); box-shadow: 0 0 0 2px rgba(58,123,213,.3); }
.tm-tempo-acoes { display: flex; gap: 4px; }
.tm-tempo-acoes .btn { padding: 3px 7px; min-width: 0; }
.tm-tempo-acoes .btn[disabled] { opacity: .3; cursor: default; }

/* a lista de tempos tem pouco conteúdo por linha: numa janela larga ela para
   de esticar, senão o nome da parada vira um campo de meio metro */
#tm-tempos, #tm-tempos-resumo { max-width: 780px; }

/* ---------- barra do ano letivo, na aba Turmas ---------- */
.ano-barra {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-2, rgba(0,0,0,.03));
}
.ano-barra label { font-size: 12.5px; font-weight: 700; color: var(--text-soft); margin: 0; }
.ano-barra select { min-width: 210px; }
.ano-nota { font-size: 12.5px; color: var(--text-soft); }
/* olhando outro ano que não o em vigor: a faixa muda de cor para a pessoa não
   cadastrar 2027 achando que está mexendo em 2026 */
.ano-barra.outro-ano { background: var(--gold-soft, #fdf8ec); border-color: var(--gold, #c9a44e); }
.ano-barra.outro-ano .ano-aviso { color: var(--gold-dark, #a8842f); font-weight: 600; }

.ano-importar {
  margin: 0 0 16px; padding: 16px 18px; border-radius: 12px;
  border: 1px dashed var(--border); background: var(--surface);
}
.ano-importar h3 { font-size: 15.5px; margin: 0 0 4px; }

/* horário travado: a distribuição automática não mexe nele */
.gr-cel { position: relative; }
.gr-cadeado { position: absolute; top: 2px; right: 4px; font-size: 10px; line-height: 1; opacity: .85; }
.gr-cel.gr-travada { box-shadow: inset 0 0 0 2px rgba(29,43,79,.55); }
.gr-cel.gr-conflito.gr-travada { box-shadow: 0 0 0 2px rgba(179,54,42,.35), inset 0 0 0 2px rgba(29,43,79,.55); }

.gr-trava {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  margin: 0 0 12px; padding: 9px 12px; cursor: pointer; font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.gr-trava:hover { border-color: var(--blue, #3a7bd5); }
.gr-trava.ligada { background: var(--gold-soft, #fdf8ec); border-color: var(--gold, #c9a44e); }
.gr-trava-icone { font-size: 16px; flex: 0 0 auto; }

/* saídas sugeridas para um conflito */
.gr-saida {
  display: inline-block; margin: 4px 5px 0 0; padding: 3px 9px; cursor: pointer;
  font-size: 12px; color: var(--text); background: var(--surface);
  border: 1px solid var(--gold, #c9a44e); border-radius: 20px;
}
.gr-saida:hover { background: var(--gold-soft, #fdf8ec); }
.gr-sem-saida { font-size: 12px; color: var(--text-soft); font-style: italic; }

/* menu do botão direito sobre uma aula da grade */
.gr-menu {
  position: fixed; z-index: 4000; min-width: 224px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0,0,0,.22); padding: 6px; font-size: 13px;
}
.gr-menu-tit {
  font-weight: 700; padding: 5px 8px 7px; border-bottom: 1px solid var(--border);
  margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gr-menu button {
  display: block; width: 100%; text-align: left; padding: 7px 9px; cursor: pointer;
  background: transparent; border: 0; border-radius: 7px; font-size: 13px; color: var(--text);
}
.gr-menu button:hover { background: var(--gold-soft, #fdf8ec); }
.gr-menu-nota { padding: 6px 9px 3px; font-size: 11.5px; color: var(--text-soft); line-height: 1.35; }

/* ============================================================
   Formulário de turma: três blocos numerados em vez de um
   rolo único de campos, e a barra de salvar sempre à vista.
   ============================================================ */
.tf-bloco {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px 20px; margin-bottom: 16px; background: var(--surface);
}
.tf-cab { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.tf-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--blue-100, #e6eefc); color: var(--blue-700, #1d4ed8);
}
.tf-cab h3 { font-size: 15.5px; font-weight: 700; margin: 2px 0 0; line-height: 1.2; }
.tf-cab p { font-size: 12.5px; color: var(--text-soft); margin: 4px 0 0; line-height: 1.45; max-width: 70ch; }

/* três colunas na janela larga: com duas, cada campo virava uma faixa de meio
   metro e o formulário parecia vazio */
#turma-form .form-grid { grid-template-columns: repeat(3, 1fr); }
#turma-form .form-grid.tf-grid-2 { grid-template-columns: 200px 200px; }
#turma-form textarea { min-height: 62px; }

.tf-tipo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.tf-label-linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tf-op { font-weight: 500; color: var(--text-soft); }
.tf-info {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0;
  padding: 9px 12px; border-radius: 9px; font-size: 12.5px; color: var(--text-soft);
  background: var(--surface-2, rgba(0,0,0,.03));
}

/* botões de acrescentar à esquerda, resumo da conta à direita: aproveita a
   largura em vez de empilhar duas linhas soltas */
.tf-barra {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 10px;
}
.tf-barra-botoes { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-barra .ct-ajuda { margin: 0; text-align: right; flex: 1; min-width: 200px; }
.tf-sugestoes { margin: 10px 0 0; }

/* o formulário é alto; sem isto a pessoa rola tudo de volta só para salvar */
.tf-acoes {
  position: sticky; bottom: -22px; z-index: 5;
  display: flex; justify-content: flex-end; gap: 10px;
  margin: 4px -20px -22px; padding: 14px 20px;
  background: var(--surface); border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  #turma-form .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .tf-bloco { padding: 14px 14px 16px; }
  #turma-form .form-grid, #turma-form .form-grid.tf-grid-2 { grid-template-columns: 1fr; }
  .tf-tipo { grid-template-columns: 1fr; }
  .tf-barra .ct-ajuda { text-align: left; }
  .tf-acoes { margin-left: -14px; margin-right: -14px; padding: 12px 14px; }
}

/* ---------- mural: todas as grades numa tela ---------- */
.mural-topo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.mural-topo .ct-ajuda { margin: 0; flex: 1; min-width: 240px; }
.mural-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
/* duas grades lado a lado quando a tela permite, uma quando não */
.mural { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 16px; }
.mural-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff;
  overflow-x: auto;
}
.mural-titulo {
  background: #3a7bd5; color: #fff; border: 2px solid #1d2b4f; border-radius: 9px;
  padding: 7px 10px; text-align: center; font-size: 13.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 9px; cursor: pointer;
}
.mural-titulo:hover { background: #2f6bc0; }
.mural-titulo small {
  display: block; font-size: 10.5px; font-weight: 600; opacity: .9;
  text-transform: none; letter-spacing: 0; margin-top: 1px;
}
.mural-tab { border-spacing: 3px; min-width: 380px; }
.mural-tab th { padding: 4px 2px; font-size: 9.5px; letter-spacing: .3px; }
.mural-tab td { padding: 5px 3px; font-size: 10.5px; border-width: 1.5px; border-radius: 6px; }
.mural-tab td.gr-hora { font-size: 9.5px; }
.mural-tab .mu-cel { line-height: 1.2; }
.mural-tab .mu-cel small { display: block; font-size: 9px; font-weight: 600; opacity: .85; }
.mural-tab .gr-intervalo td { font-size: 9.5px; font-weight: 600; }

@media (max-width: 620px) {
  .mural { grid-template-columns: 1fr; }
  .mural-card { padding: 8px; }
}

/* escolha de quem dá a disciplina — pode ser mais de um na mesma aula */
.tmd-quem {
  font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tmd-quem:hover { border-color: var(--blue, #3a7bd5); }
.tmd-quem.vazio { color: var(--text-soft); }
.prof-menu { min-width: 268px; max-width: 340px; }
.prof-lista { max-height: 260px; overflow-y: auto; }
.prof-op {
  display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px;
  border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 400;
}
.prof-op:hover { background: var(--gold-soft, #fdf8ec); }
.prof-op input { margin-top: 2px; flex: 0 0 auto; }
.prof-op small { display: block; font-size: 11px; color: var(--text-soft); }

/* busca de banco e dígito verificador nos dados financeiros */
.banco-sug {
  margin-top: 4px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); max-height: 240px; overflow-y: auto;
}
.banco-op {
  display: block; width: 100%; text-align: left; padding: 8px 11px; cursor: pointer;
  background: transparent; border: 0; font-family: inherit; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.banco-op:last-child { border-bottom: 0; }
.banco-op:hover { background: var(--gold-soft, #fdf8ec); }
.banco-op strong { font-variant-numeric: tabular-nums; margin-right: 6px; }
.banco-tag {
  float: right; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--blue-700, #1d4ed8);
}
/* conta e agência com o seu dígito ao lado, como no cartão do banco */
.conta-linha { display: flex; align-items: center; gap: 6px; }
.conta-linha input:first-child { flex: 1; min-width: 0; }
.conta-linha .emp-agencia-dv, .conta-linha .emp-conta-dv { width: 56px; text-align: center; }
.conta-tr { color: var(--text-soft); font-weight: 700; }

/* lembrete numa parcela e parcela sem vencimento */
.parc-row .pc-ac-nota.ligado { background: var(--gold-soft, #fdf8ec); border-color: var(--gold, #c9a44e); }
.pc-lembrete {
  grid-column: 1 / -1; font-size: 12px; color: var(--gold-dark, #a8842f);
  background: var(--gold-soft, #fdf8ec); border-radius: 7px; padding: 4px 9px; margin-top: -2px;
}
.parc-row.pc-com-lembrete { align-items: start; }
.parc-row.pc-com-lembrete > input, .parc-row.pc-com-lembrete > select,
.parc-row.pc-com-lembrete > span, .parc-row.pc-com-lembrete > div { align-self: center; }
/* sem data: o campo fica claro em vez de parecer um erro */
.parc-row .pc-venc:invalid, .parc-row .pc-venc[value=""] { color: var(--text-soft); }

.nota-menu { min-width: 300px; max-width: 360px; padding: 10px; }
.nota-menu textarea {
  width: 100%; font-family: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); resize: vertical;
}
.nota-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* o lembrete que vira tarefa em Solicitações */
.nota-tarefa { margin-top: 9px; border-top: 1px solid var(--border); padding-top: 8px; }
.nota-tarefa .nt-rot { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-soft); margin-bottom: 5px; }
.nota-tarefa .nt-linha { display: flex; gap: 6px; }
.nota-tarefa .nt-linha input, .nota-tarefa .nt-linha select {
  font-family: inherit; font-size: 12.5px; padding: 6px 8px; min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text);
}
.nota-tarefa .nt-linha input { flex: 0 0 130px; }
.nota-tarefa .nt-linha select { flex: 1 1 auto; }
.nota-tarefa .nt-dica { font-size: 11px; color: var(--text-soft); margin-top: 5px; line-height: 1.4; }
.pc-tarefa {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700;
  background: var(--blue-50); color: var(--blue-700);
  border: 1px solid var(--blue-200, #c3cfe8); border-radius: 999px; padding: 1px 8px;
}

/* ---- arquivo retorno do banco: o que o programa vai fazer com cada título ---- */
.rt-bloco {
  font-size: 12.5px; border: 1px solid var(--border); border-left-width: 4px;
  border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 9px; background: var(--bg);
}
.rt-bloco .rt-tit { font-weight: 700; margin-bottom: 5px; }
.rt-bloco ul { margin: 0; padding-left: 20px; line-height: 1.65; }
.rt-bloco .pq { color: var(--text-soft); font-weight: 400; }
.rt-ok { border-left-color: #22c55e; background: #f0fdf4; }
.rt-ok .rt-tit { color: #15803d; }
.rt-erro { border-left-color: #dc2626; background: #fef2f2; }
.rt-erro .rt-tit { color: #b3362a; }
.rt-aviso { border-left-color: var(--gold-dark); }
.rt-aviso .rt-tit { color: #8a5a00; }
.rt-info { border-left-color: var(--border); }
.rt-info .rt-tit { color: var(--text-soft); }

/* ---- status gerais dos alunos: a planilha de rematrícula ---- */
.st-anos { align-items: end; }
.st-wrap { max-height: 64vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.st-tabela { font-size: 12.5px; min-width: 940px; border-collapse: separate; border-spacing: 0; }
.st-tabela th {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-soft); font-weight: 700; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.st-tabela td { vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.st-tabela tbody tr:hover td { background: var(--hover, rgba(20,33,61,.035)); }
.st-tabela .pq { color: var(--text-soft); font-weight: 400; font-size: 11.5px; }
/* a faixa da turma separa os blocos sem precisar de linha grossa nenhuma */
.st-tabela tr.st-turma td {
  background: var(--surface); font-weight: 700; font-size: 12px;
  letter-spacing: .03em; text-transform: uppercase; color: var(--text-soft);
  padding: 14px 12px 6px; border-bottom: 1px solid var(--border);
}
.st-tabela tr.st-turma .pq { text-transform: none; letter-spacing: 0; margin-left: 6px; }

.st-nome { min-width: 190px; }
.st-nome strong { font-size: 13px; }
.st-resp { min-width: 190px; }
.st-num { min-width: 118px; white-space: nowrap; }
.st-mat { min-width: 168px; }
.st-ct { text-align: center; white-space: nowrap; }
.st-acoes { text-align: right; white-space: nowrap; }

/* duas alturas de texto por célula: o dado em cima, o detalhe embaixo */
.st-linha1 { font-weight: 700; font-size: 13px; }
.st-linha2 { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }
.st-liq { color: #15803d; }
.st-bolsa { color: #15803d; font-weight: 700; }
.st-fone { color: inherit; text-decoration: none; }
.st-fone:hover { text-decoration: underline; }
.st-ok-pq { font-size: 11.5px; color: #15803d; font-weight: 600; margin-top: 3px; }
.st-pend-pq { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; }
.st-atraso { color: #b3362a; font-weight: 700; font-size: 11.5px; margin-top: 4px; }

/* o nome do aluno fica preso à esquerda: rolando para o lado ainda se sabe
   de quem é a linha */
.st-tabela .st-nome, .st-tabela th:first-child { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.st-tabela th:first-child { z-index: 4; background: var(--surface); }
/* a coluna presa precisa de cor SÓLIDA: translúcida deixaria o texto das
   outras colunas aparecer por baixo ao rolar para o lado */
.st-tabela tbody tr:hover .st-nome { background: #f7f8fa; }
.st-tabela tr.st-turma td { left: 0; }

.st-mat-linha { display: flex; gap: 4px; margin-top: 3px; }
.st-mat-modo { flex: 1 1 auto; min-width: 0; }
.st-mat-valor { width: 84px; flex: 0 0 auto; }
.st-mat-conta { font-size: 11.5px; color: var(--text); margin-top: 4px; line-height: 1.45; }
.st-mat-aplicar { margin-top: 3px; }
.st-mat-alerta { font-size: 11.5px; color: #8a5a00; margin-top: 3px; line-height: 1.4; }
.st-mat-lancada { font-size: 11.5px; color: #15803d; margin-top: 4px; line-height: 1.4; }
.st-mat-lancada .lk { color: #b3362a; }
.st-mat-lancada .lk {
  background: none; border: 0; padding: 0 0 0 4px; font: inherit;
  color: #b3362a; text-decoration: underline; cursor: pointer;
}

/* nº de parcelas no título da coluna e a soma do ano fechando a linha */
.valor-head .vl-parc {
  display: block; margin-top: 2px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--text-soft); font-size: 11px; white-space: nowrap;
}
.valor-head .fd-parc-col {
  width: 46px; padding: 1px 4px; height: auto; font-size: 11.5px;
  text-align: center; display: inline-block; margin: 0 1px;
}
.vl-soma {
  display: flex; align-items: center; justify-content: flex-end;
  font-weight: 700; color: var(--blue-700); font-size: 12.5px; white-space: nowrap;
  padding-right: 4px;
}

/* ---- faixas de desconto por antecipação ---- */
.fd-desc-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border);
}
.fd-desc-row .fdd-dias, .fd-desc-row .fdd-pct { width: 68px; flex: 0 0 auto; }
.fd-desc-row .btn { margin-left: auto; }

/* ---- lista de contratos do ano, mais limpa ---- */
.fd-ct-lista { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.fd-ct-row {
  display: grid; grid-template-columns: 26px 1fr 34px 210px; align-items: center; gap: 8px;
  padding: 9px 12px; margin: 0; cursor: pointer; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.fd-ct-row:last-child { border-bottom: 0; }
.fd-ct-row:hover { background: var(--bg); }
.fd-ct-row.on { background: var(--blue-50, #eef3fb); }
.fd-ct-row input[type="checkbox"] { width: auto; justify-self: center; accent-color: var(--blue-600); }
.fd-ct-nome { font-weight: 600; font-size: 13px; }
.fd-ct-tipo {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
  font-weight: 500; font-size: 11px; color: var(--text-soft); text-transform: lowercase;
}
.fd-ct-estrela { position: relative; text-align: center; color: var(--border); font-size: 17px; line-height: 1; }
.fd-ct-estrela input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fd-ct-estrela:has(input:checked) { color: var(--gold-dark); }
.fd-ct-row .fdc-quando { font-size: 12.5px; padding: 4px 6px; height: auto; }
@media (max-width: 620px) {
  .fd-ct-row { grid-template-columns: 26px 1fr 34px; }
  .fd-ct-row .fdc-quando { grid-column: 2 / -1; }
}

/* ---- escolher meses e datas ao gerar uma cobrança em massa ---- */
.es-meses { display: flex; flex-wrap: wrap; gap: 5px; }
.es-mes { position: relative; cursor: pointer; }
.es-mes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; }
.es-mes span {
  display: block; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; text-transform: capitalize; background: var(--surface); user-select: none;
}
.es-mes:has(input:checked) span {
  background: var(--blue-600); border-color: var(--blue-600); color: #fff; font-weight: 600;
}
.es-datas { display: flex; flex-wrap: wrap; gap: 6px; }
.es-datas .es-data { width: 150px; flex: 0 0 auto; }

/* ---- o que fazer depois de gerar o financeiro do ano ---- */
.es-feito {
  margin-top: 12px; padding: 11px 13px; border-radius: var(--radius-sm);
  background: #f0fdf4; border: 1px solid #86efac; font-size: 13px;
}
.es-feito-tit { font-weight: 700; color: #15803d; margin-bottom: 2px; }
.ct-desigual { font-size: 11px; color: #8a5a00; font-weight: 600; cursor: help; }

/* ---- prévia do contrato antes de mandar para assinar ---- */
.as-previa { max-height: 46vh; overflow: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px; }
.as-previa-folha { background: var(--surface); border: 1px solid var(--border); border-radius: 5px;
  padding: 18px 20px 8px; margin-bottom: 10px; }
.as-previa-folha pre { margin: 0; white-space: pre-wrap; word-wrap: break-word;
  font-family: inherit; font-size: 11.5px; line-height: 1.5; text-align: justify; }
.as-previa-pe { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 5px;
  font-size: 10.5px; color: var(--text-soft); display: flex; justify-content: space-between; }
.fa-acoes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .fa-acoes { width: 100%; justify-content: stretch; } .fa-acoes .btn { flex: 1; } }

/* ---------- logo e assinatura do colégio (Dados financeiros → Contratos) ---------- */
.fd-selos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.fd-selo {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; background: var(--surface);
}
.fd-selo.on { border-color: var(--green, #16a34a); }
.fd-selo-tit { font-weight: 700; font-size: 13.5px; }
.fd-selo-vis {
  height: 78px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 8px; background: #fff; overflow: hidden;
}
.fd-selo-vis img { max-height: 70px; max-width: 92%; object-fit: contain; }
.fd-selo-bts { display: flex; align-items: center; gap: 10px; }
@media (max-width: 700px) { .fd-selos { grid-template-columns: 1fr; } }

/* ---------- outros documentos na ficha do aluno ---------- */
.docs-extra { display: flex; flex-direction: column; gap: 6px; }
.dx-linha {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface);
}
.dx-ico { font-size: 16px; text-align: center; }
.dx-nome { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.dx-pq { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-soft); }
.dx-bts { display: flex; gap: 10px; white-space: nowrap; }
@media (max-width: 560px) {
  .dx-linha { grid-template-columns: 24px 1fr; }
  .dx-bts { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- marcas de contrato na tabela de status ---------- */
.st-marca { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 8px; white-space: nowrap; display: inline-block; }
.st-marca.ok { background: #dcfce7; color: #166534; }
.st-marca.esperando { background: #fef3c7; color: #92400e; }
.st-marca.nao { background: #f1f4fa; color: var(--text-soft); font-weight: 600; }

/* a explicação de um campo com caixinha desce para a linha de baixo, alinhada
   com o texto do rótulo — ao lado dela o campo ficava espremido */
.checkbox-field { flex-wrap: wrap; }
.checkbox-field .ct-ajuda.full { flex: 0 0 100%; margin: 3px 0 0 27px; }

/* ---------- desconto da família, dentro do plano do aluno ---------- */
.fin-bolsa {
  border: 1px solid var(--border); border-left: 4px solid var(--green, #16a34a);
  border-radius: 10px; padding: 10px 14px; margin-top: 10px; background: var(--surface);
}
.fb-titulo { font-size: 13.5px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.fb-atual { font-weight: 400; font-size: 12.5px; color: var(--text-soft); }
.fb-linha { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fb-linha #fin-bolsa-pct { width: 84px; }
.fb-pc { font-weight: 700; margin-left: -4px; }
.fb-linha #fin-bolsa-motivo { flex: 1 1 240px; min-width: 180px; }
.fb-ajuda { font-size: 12px; color: var(--text-soft); margin: 7px 0 0; line-height: 1.5; }
.fb-ajuda.fin-alerta { font-weight: 600; }
@media (max-width: 620px) {
  .fb-linha { flex-direction: column; align-items: stretch; }
  .fb-linha #fin-bolsa-pct { width: 100%; }
  .fb-pc { display: none; }
}

/* editor do contrato antes de enviar para assinar */
.as-editor {
  width: 100%; min-height: 58vh; box-sizing: border-box; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
  white-space: pre-wrap; tab-size: 2;
}
.as-editor:focus { outline: 2px solid var(--blue, #2563eb); outline-offset: -1px; }

/* aviso de desconto acima da bolsa da família, no plano do aluno */
.fin-aviso-bolsa {
  margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: #92400e;
  background: #fef3c7; border-radius: 8px; padding: 8px 12px; line-height: 1.5;
}

/* ---------- formas de pagamento da matrícula (Dados → Contratos) ---------- */
.mo-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mo-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.mo-row .mo-rotulo { width: 100%; font-weight: 600; }
.mo-campos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mo-campos label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-soft); }
.mo-campos .mo-vezes { width: 62px; }
.mo-campos select { width: auto; }
.mo-previa { font-size: 12px; color: var(--text-soft); margin: 7px 0 0; line-height: 1.5; }
.mo-previa.rm-alerta { font-weight: 600; }
