/* Praxis Dialyse · módulo hospitalar · telas do médico (prefixo hm-). */
.hm { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hm * { min-width: 0; }
.hm h3 { font-size: 1rem; margin: 0 0 8px; }
.hm h4 { font-size: .9rem; margin: 6px 0; }
.hm-bloco { border-top: 1px solid var(--linha); padding-top: 10px; }
.hm-dica { font-size: .8rem; margin: 2px 0 6px; }
.hm-rot { margin: 8px 0 4px; }
.hm-g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.hm-g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.hm-larga { grid-column: 1 / -1; }
.hm-campo label small { font-weight: 400; }
/* progresso */
.hm-progresso { display: flex; flex-direction: column; gap: 6px; }
.hm-trilho { height: 6px; background: var(--linha); border-radius: 999px; overflow: hidden; }
.hm-trilho span { display: block; height: 100%; background: var(--px); transition: width .2s; }
.hm-passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hm-passos button { width: 100%; border: 1px solid var(--linha); background: var(--sup); border-radius: 8px; padding: 6px 8px; font-size: .82rem; cursor: pointer; text-align: left; display: flex; gap: 6px; align-items: center; line-height: 1.2; }
.hm-passos button b { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg); font-size: .75rem; }
.hm-passos .hm-atual { border-color: var(--px); background: var(--px-suave); font-weight: 700; }
.hm-passos .hm-atual b, .hm-passos .hm-feito b { background: var(--px); color: var(--px-tinta, #fff); }
/* sub-abas */
.hm-partes { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-partes button { border: 1px solid var(--linha); background: var(--sup); border-radius: 999px; padding: 5px 11px; font-size: .82rem; cursor: pointer; }
.hm-partes button[aria-pressed="true"] { border-color: var(--px); background: var(--px-suave); color: var(--px); font-weight: 700; }
.hm-seg-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hm-seg-3 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.hm-seg-4 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.hm-seg button { min-width: 0; }
.hm-procs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.hm-procs button { text-align: left; border: 1px solid var(--linha); background: var(--sup); border-radius: 8px; padding: 7px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.hm-procs button b { font-size: .92rem; }
.hm-procs button span { font-size: .8rem; font-weight: 600; }
.hm-procs button small { font-size: .74rem; color: var(--aco); line-height: 1.25; }
.hm-procs button[aria-pressed="true"] { border-color: var(--px); background: var(--px-suave); box-shadow: inset 0 0 0 1px var(--px); }
.hm-procs button[aria-pressed="true"] b { color: var(--px); }
.hm-chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--tinta); font-size: .88rem; margin: 0; padding: 5px 0; cursor: pointer; }
.hm-chk input { margin-top: 3px; flex: none; }
.hm-crits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 12px; }
/* paciente */
.hm-pac { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.hm-pac .hd-al { align-self: flex-start; margin-top: 3px; }
.hm-res-l { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.hm-res-i { text-align: left; border: 1px solid var(--linha); background: var(--sup); border-radius: 8px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; }
.hm-res-i:hover { border-color: var(--px); }
.hm-np { border: 1px dashed var(--linha); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.hm-np h4 { margin: 0; }
/* avisos e contas */
.hm-info { font-size: .85rem; background: var(--px-suave); border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
.hm-alerta { font-size: .85rem; color: #7a4b00; background: #fff4dc; border: 1px solid #f1d08a; border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
.hm-calc { font-size: .86rem; background: var(--bg); border-radius: 6px; padding: 8px 10px; margin-top: 8px; line-height: 1.45; }
.hm-mal { color: #b42318; }
.hm-ok { color: #157347; }
.hm-proc-t { margin: 0; }
.hm-falta { border: 1px solid #f4b8b0; background: #fdecea; color: #8a1c12; border-radius: 8px; padding: 10px 12px; }
.hm-falta ul { margin: 6px 0 0; padding-left: 18px; }
.hm-falta li { margin: 4px 0; font-size: .88rem; }
.hm-lnk { border: 0; background: none; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }
.hm-pronto { border: 1px solid #b7e1c6; background: #eaf7ef; color: #11532f; border-radius: 8px; padding: 10px 12px; margin: 0; }
.hm-devolvido { border: 2px solid #e5735f; background: #fdecea; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hm-devolvido p { margin: 0; }
.hm-nav { position: sticky; bottom: -18px; background: var(--sup); padding: 10px 0 4px; border-top: 1px solid var(--linha); }
.hm-cabver { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hm-visto, .hm-cancel { border: 1px solid var(--linha); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.hm-visto h4, .hm-cancel h4 { margin: 0; }
.hm-ult summary { cursor: pointer; font-size: .85rem; color: var(--aco); }
/* leitura (chave: valor) */
.hm-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin: 0 0 8px; }
.hm-kv > div { border-bottom: 1px dotted var(--linha); padding-bottom: 4px; }
.hm-kv dt { font-size: .74rem; color: var(--aco); }
.hm-kv dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.hm-resumo h3 { margin-top: 10px; }
/* histórico */
.hm-hist { display: flex; flex-direction: column; gap: 6px; }
.hm-hist details { border: 1px solid var(--linha); border-radius: 8px; padding: 6px 10px; }
.hm-hist summary { cursor: pointer; font-size: .86rem; }
.hm-hist p { font-size: .88rem; margin: 6px 0; }
.hm-hist-i { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: center; border: 1px solid var(--linha); border-radius: 8px; padding: 6px 10px; font-size: .86rem; }
/* em tratamento */
.hm-trat-h h3 { border-bottom: 2px solid var(--px); padding-bottom: 4px; }
.hm-trat-h h4 { margin: 10px 0 6px; }
.hm-trat-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.hm-trat-i { border: 1px solid var(--linha); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.hm-trat-t { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.hm-trat-n { display: flex; flex-direction: column; font-size: .82rem; }
/* impressão */
.hm-doc { font-size: 10pt; }
.hm-doc h3 { font-size: 10.5pt; margin: 10px 0 4px; border-bottom: 1px solid #999; }
.hm-doc .hm-kv { grid-template-columns: repeat(3, 1fr); gap: 3px 10px; }
.hm-doc .hm-kv dt { font-size: 7.5pt; color: #444; }
.hm-doc .hm-kv dd { font-size: 9.5pt; text-align: left; }
.hm-doc p, .hm-kv dd { text-align: left; text-indent: 0; }
.hm-doc-st { font-size: 9pt; margin: 6px 0; }
.hm-doc-txt { white-space: pre-wrap; }
.hm-doc-ck { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 9pt; }
.hm-dt { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 4px 0; }
.hm-dt th, .hm-dt td { border: 1px solid #555; padding: 3px 5px; text-align: left; vertical-align: top; }
.hm-dt th { background: #eee; }
.hm-dt-id td small { display: block; font-size: 7.5pt; color: #444; }
@media print { .hm-dt th { background: #eee !important; } }
@media (max-width: 520px) {
  .hm-passos button { font-size: .74rem; padding: 5px; }
  .hm-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-procs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-kv { grid-template-columns: 1fr 1fr; }
}
