/* TATAME — Gestão de Turmas e Matrículas (migração 012). Mobile primeiro, consistente com app.css. */
.tm-top-acts { flex-wrap: wrap; }
.tm-bar-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.tm-view-seg { flex: none; }
.tm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tm-filters select.input { width: auto; min-width: 150px; flex: 0 1 auto; }
.tm-list { display: grid; gap: 10px; }
.tm-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--raised); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.tm-card:hover { border-color: var(--line-3); }
.tm-card.off { opacity: .62; }
.tm-card.full { border-color: rgba(240,107,115,.28); }
.tm-card-link { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: grid; gap: 8px; }
.tm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tm-card-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.tm-card-meta { margin-top: 3px; }
.tm-card-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-card-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.tm-bar { margin-top: 2px; }

/* Grade semanal dentro de #turmas */
.tm-wcls { text-decoration: none; color: inherit; display: flex; flex-direction: column; text-align: left; }
.tm-wocc { margin-top: 6px; font-size: 12px; }
.tm-wocc b.bad { color: var(--bad); }
.tm-wl-txt { color: var(--warn); font-size: 11.5px; font-weight: 500; }

/* Detalhe da turma (#turma/<id>) */
.tm-hero { display: grid; gap: 14px; }
.tm-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tm-title { margin: 0; font-family: var(--display); font-stretch: 80%; font-size: 26px; line-height: 1.1; font-weight: 600; }
.tm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tm-kpis > div { display: flex; flex-direction: column; min-width: 0; }
.tm-kpis b { font-family: var(--display); font-stretch: 75%; font-size: 24px; line-height: 1.1; }
.tm-kpis b.bad { color: var(--bad); }
.tm-kpis b.warn { color: var(--warn); }
.tm-kpis span { font-size: 12px; color: var(--muted); }
.tm-erow { align-items: center; gap: 10px; }
.tm-stu-link { text-decoration: none; color: inherit; min-width: 0; }
.tm-pos { flex: none; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 12.5px; }
.tm-hist { margin-top: 22px; }
.tm-hist summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
.tm-hrow { opacity: .75; }

/* Sheet de matrícula */
.tm-warn-box { border-color: rgba(232,180,76,.35); background: var(--warn-soft); color: var(--text); font-size: 13px; margin-bottom: 12px; }
.tm-pick-list { max-height: 260px; overflow: auto; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; background: var(--surface); }
.tm-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; transition: background .12s; }
.tm-pick:hover:not([disabled]) { background: var(--surface-2); }
.tm-pick.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tm-pick.taken { opacity: .55; cursor: default; }

/* Banner na aba Horários da Agenda + dias múltiplos no formulário de turma */
.tm-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-day-chk { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; cursor: pointer; }
.tm-day-chk:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.tm-day-chk input { margin: 0; }

/* Agenda: indicação de vagas */
.ag-cap { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ag-cap.full { color: var(--bad); }

/* Chamada: destaque de matriculados */
.ls-enr-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

@media (max-width: 640px) {
  .tm-card { flex-direction: column; align-items: stretch; }
  .tm-card-acts { justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
  .tm-filters select.input { width: 100%; }
  .tm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tm-kpis b { font-size: 20px; }
  .tm-enroll-cta { width: 100%; }
}
