/* Atendimentos › Chamadas da Triagem (Pages/Atendimentos/ChamadasTriagem.razor) — fundação mm-* (mc-modulo.css).
   Linhas .mm-grade-l já têm content-visibility (docs/listas-grandes.md, item 11). */
.ct .ct-periodo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct .ct-periodo input[type=date] { width: 150px; }
.ct .ct-ate { color: var(--p-faint); font-size: .75rem; }
.ct .ct-filtros { flex-wrap: wrap; gap: 8px; }
.ct .ct-filtros select.prmd-field { width: auto; min-width: 150px; max-width: 220px; }

.ct .ct-g { --cols: 70px minmax(200px, 1.5fr) minmax(130px, 1fr) minmax(190px, 1.3fr) 96px minmax(120px, .9fr) 150px 130px; }
.ct .ct-g small { display: block; color: var(--p-faint); font-size: .68rem; line-height: 1.25; }
.ct .ct-hora b { font-size: .86rem; color: var(--p-ink); }
.ct .ct-nome { font-weight: 700; color: var(--p-ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct .ct-sub { color: var(--p-faint); }
.ct .ct-prior { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 1px 6px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.ct .ct-rechamada { margin-left: 6px; font-size: .65rem; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: #ede9fe; color: #5b21b6; }

/* Espera: verde até 15 min, amarelo até 30, laranja até 60, vermelho acima */
.ct .ct-espera { display: inline-block; font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.ct .ct-espera.ok { background: #dcfce7; color: #166534; }
.ct .ct-espera.media { background: #fef9c3; color: #854d0e; }
.ct .ct-espera.alta { background: #ffedd5; color: #9a3412; }
.ct .ct-espera.critica { background: #fee2e2; color: #991b1b; }
.ct .ct-espera.correndo { outline: 2px dashed currentColor; outline-offset: -2px; }

/* Classificação de risco (Manchester) */
.ct .ct-risco { display: inline-block; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ct .ct-risco.vermelho { background: #dc2626; color: #fff; }
.ct .ct-risco.laranja { background: #ea580c; color: #fff; }
.ct .ct-risco.amarelo { background: #facc15; color: #422006; }
.ct .ct-risco.verde { background: #16a34a; color: #fff; }
.ct .ct-risco.azul { background: #2563eb; color: #fff; }

.ct .ct-sit { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--p-soft); color: var(--p-text); white-space: nowrap; }
.ct .ct-sit-aguardando { background: #fee2e2; color: #991b1b; }
.ct .ct-sit-chamado { background: #ede9fe; color: #5b21b6; }
.ct .ct-sit-emtriagem { background: #dbeafe; color: #1e40af; }
.ct .ct-sit-triado { background: #dcfce7; color: #166534; }
.ct .ct-sit-desistencia, .ct .ct-sit-evasao { background: #f3f4f6; color: #4b5563; }

/* Linha do tempo (janela de detalhe — irmã do .mc-scaled, por isso sem o prefixo .ct) */
.ct-tl { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--p-border, #e5e7eb); margin-left: 6px; }
.ct-tl-item { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 0 8px 14px; position: relative; font-size: .8rem; }
.ct-tl-item::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: #2563eb; border: 2px solid #fff; }
.ct-tl-item.consultorio::before { background: #16a34a; }
.ct-tl-item.saiu::before { background: #6b7280; }
.ct-tl-hora { color: #6b7280; font-variant-numeric: tabular-nums; font-weight: 700; }
.ct-tl-txt small { color: #6b7280; }
.ct-tl .ct-sub { color: #6b7280; }

/* Médico × tempo-alvo da cor (Manchester) */
.ct .ct-fora, .ct small.ct-fora { color: #b91c1c !important; font-weight: 700; }

/* Quadro por classificação de risco */
.ct .ct-rc { margin-bottom: 12px; }
.ct .ct-rc .mm-card-head { flex-wrap: wrap; }
.ct .ct-rc-sub { font-size: .7rem; color: var(--p-faint); font-weight: 500; }
.ct .ct-rg { display: grid; grid-template-columns: minmax(160px, 1.1fr) 84px 110px 96px minmax(160px, 1.1fr) minmax(180px, 1.3fr) 62px 140px 140px; }
.ct .ct-rg-h, .ct .ct-rg-l { display: contents; }
.ct .ct-rg-h > div { padding: 8px 12px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--p-faint); border-bottom: 1px solid var(--p-border); }
.ct .ct-rg-l > div { padding: 8px 12px; font-size: .8rem; border-bottom: 1px solid var(--p-border); cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ct .ct-rg .num { text-align: right; align-items: flex-end; }
.ct .ct-rg-l:hover > div { background: var(--p-soft); }
.ct .ct-rg-l.on > div { background: var(--p-blue-soft, #eff6ff); }
.ct .ct-rg-l:last-child > div { border-bottom: 0; }
.ct .ct-rg-l > div:first-child { flex-direction: row; align-items: center; gap: 8px; justify-content: flex-start; }
.ct .ct-rg small { display: block; color: var(--p-faint); font-size: .68rem; line-height: 1.25; }
.ct .ct-meta-barra { display: flex; align-items: center; gap: 8px; }
.ct .ct-meta-barra b { font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.ct .ct-meta-trilho { flex: 1; height: 8px; border-radius: 4px; background: var(--p-soft2, #eef0f3); overflow: hidden; }
.ct .ct-meta-fill { height: 100%; border-radius: 4px; }
.ct .ct-meta-fill.ok { background: #16a34a; }
.ct .ct-meta-fill.media { background: #ca8a04; }
.ct .ct-meta-fill.critica { background: #dc2626; }

/* Janela do detalhe: resultado contra o tempo da cor */
.ct-tl-meta { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: .78rem; background: #f3f4f6; color: #374151; }
.ct-tl-meta.ok { background: #dcfce7; color: #166534; }
.ct-tl-meta.fora { background: #fee2e2; color: #991b1b; }
.ct-tl-meta i { font-size: 16px; }

/* Janela de impressão */
.ct-imp-atalhos { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-imp-opc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--p-border, #e5e7eb); border-radius: 10px; margin-top: 6px; cursor: pointer; }
.ct-imp-opc.on { border-color: var(--p-blue-line, #93c5fd); background: var(--p-blue-soft, #eff6ff); }
.ct-imp-opc input { margin-top: 3px; }
.ct-imp-opc b { display: block; font-size: .82rem; }
.ct-imp-opc small { display: block; color: var(--p-faint, #6b7280); font-size: .72rem; line-height: 1.35; }

@media (max-width: 767.98px) {
    .ct .ct-rg { overflow-x: auto; grid-template-columns: 150px 80px 110px 90px 160px 170px 60px 140px 140px; }
}
