/* Estilos do módulo de presença (chamada). Usa as variáveis de cor de app.css. */
.pill.att-P { background: var(--ok-bg); color: var(--ok); }
.pill.att-A { background: var(--warn-bg); color: var(--warn); }
.pill.att-F { background: var(--bad-bg); color: var(--bad); }
.pill.att-J { background: var(--info-bg); color: var(--text-2); }
.pill.info { background: var(--info-bg); color: var(--text-2); }
.tbl th.c, .tbl td.c { text-align: center; }
.att-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 640px) { .att-form { grid-template-columns: minmax(0, 1fr); } }

/* Lista de encontros */
.att-today { margin-bottom: 16px; border-left: 4px solid var(--brand); }
.att-days { gap: 14px; }
.att-day-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 2px; }
.att-day.is-today .att-day-h { color: var(--text); }
.att-item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 6px; color: var(--text); text-decoration: none !important; }
.att-item:hover { background: var(--surface-2); }
.att-item.done { border-left-color: var(--ok); }
.att-item.pending { border-left-color: var(--bad); }
.att-item.today { border-left-color: var(--brand); }
.att-item.canceled { opacity: .6; }
.att-date { display: flex; flex-direction: column; align-items: center; min-width: 38px; line-height: 1.1; }
.att-date b { font-family: var(--font-display); font-size: 22px; }
.att-date span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.att-title { font-weight: 700; }
.att-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
@media (max-width: 640px) { .att-item { flex-wrap: wrap; } .att-right { flex-direction: row; width: 100%; justify-content: space-between; } }

/* Chamada — pensada para tocar no celular */
.att-list { display: flex; flex-direction: column; }
.att-stu { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.att-stu:first-child { border-top: 0; }
.att-stu-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.att-stu-name b { overflow: hidden; text-overflow: ellipsis; }
.att-note-btn { padding: 4px 6px; opacity: .5; }
.att-note-btn.on, .att-note-btn:hover { opacity: 1; }
.att-note-btn .ico { width: 16px; height: 16px; }
.att-note { grid-column: 1 / -1; padding: 8px 10px; font-size: 14px; }
.att-marks { display: flex; gap: 6px; }
.att-mk { min-width: 48px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-2);
  position: relative; font-weight: 800; font-size: 15px; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.att-mk span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.att-mk:disabled { opacity: .4; cursor: not-allowed; }
.att-mk.att-P.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-mk.att-A.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.att-mk.att-F.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.att-mk.att-J.on { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
@media (max-width: 520px) {
  .att-stu { grid-template-columns: minmax(0, 1fr); }
  .att-marks { display: grid; grid-template-columns: repeat(4, 1fr); }
  .att-mk { width: 100%; height: 48px; }
}
.att-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-lg); margin-top: 6px; }
@media (max-width: 520px) { .att-savebar .btn { width: 100%; } }
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border-radius: 99px; padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 600; }
.att-chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 2px; display: grid; }
.att-chip .ico { width: 14px; height: 14px; }
.att-pick { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.att-pick-lv { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* Agenda */
.att-slot { flex-wrap: nowrap; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.att-slot.off { opacity: .55; }

/* Grade da turma */
.att-grid-wrap { overflow-x: auto; }
.att-grid th, .att-grid td { padding: 6px 8px; white-space: nowrap; }
.att-grid .att-sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.att-cell { text-align: center; font-weight: 800; font-size: 13px; color: var(--muted); }
.att-cell.att-P { color: var(--ok); }
.att-cell.att-A { color: var(--warn); }
.att-cell.att-F { color: var(--bad); background: var(--bad-bg); }
.att-cell.att-J { color: var(--text-2); background: var(--info-bg); }
.att-cell.na { color: var(--line-2); }

/* Frequência resumida (aluno e responsável) */
.att-big.ok { color: var(--ok); } .att-big.warn { color: var(--warn); } .att-big.bad { color: var(--bad); }
.att-mini { display: flex; gap: 16px; align-items: center; }
.att-ring { --p: 0; --c: var(--muted); width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg-2) 0); }
.att-ring.ok { --c: var(--ok); } .att-ring.warn { --c: var(--warn); } .att-ring.bad { --c: var(--bad); }
.att-ring b { font-family: var(--font-display); font-size: 20px; line-height: 1; }
.att-ring span { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.att-abs { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }

/* Relatório para o contratante */
.att-report { padding: 32px; }
.att-rp-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.att-rp-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.att-rp-sub { font-size: 16px; color: var(--text-2); font-weight: 600; }
.att-rp-org { text-align: right; font-size: 13px; color: var(--text-2); }
.att-rp-org b { color: var(--text); font-size: 15px; }
.att-rp-info, .att-rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.att-rp-info th, .att-rp-info td, .att-rp-tbl th, .att-rp-tbl td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.att-rp-info th { width: 24%; background: var(--surface-2); font-weight: 600; color: var(--text-2); }
.att-rp-tbl thead th { background: var(--surface-2); font-weight: 700; }
.att-rp-tbl .c { text-align: center; }
.att-rp-tbl .muted { font-size: 12px; }
.att-report h3 { font-size: 15px; margin: 18px 0 8px; }
.att-rp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.att-rp-kpis > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.att-rp-kpis span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.att-rp-kpis b { font-family: var(--font-display); font-size: 22px; }
.att-rp-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 48px 0 20px; text-align: center; }
.att-rp-sign > div { display: flex; flex-direction: column; gap: 2px; }
.att-rp-sign i { border-top: 1px solid var(--text); margin-bottom: 6px; }
.att-rp-sign span { font-size: 12px; color: var(--muted); }
.att-report footer { border-top: 1px dashed var(--line-2); padding-top: 10px; text-align: center; }
@media (max-width: 640px) { .att-report { padding: 18px; } .att-rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .att-rp-org { text-align: left; } .att-rp-sign { gap: 16px; } }

@media print {
  body:has(.att-report) { background: #fff; }
  body:has(.att-report) .side, body:has(.att-report) .topbar, body:has(.att-report) .no-print, body:has(.att-report) .toasts { display: none !important; }
  body:has(.att-report) .app { display: block; }
  body:has(.att-report) .main { padding: 0; }
  body:has(.att-report) .wrap { max-width: none; }
  .att-report { box-shadow: none; border: 0; padding: 0; color: #000; background: #fff; }
  .att-report .muted, .att-rp-org, .att-rp-kpis span, .att-rp-sign span { color: #444 !important; }
  .att-rp-info th, .att-rp-tbl thead th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .att-rp-info th, .att-rp-info td, .att-rp-tbl th, .att-rp-tbl td, .att-rp-kpis > div { border-color: #999; }
  .att-rp-tbl tr { break-inside: avoid; }
  .att-rp-sign { break-inside: avoid; }
  @page { margin: 14mm; }
}
