/* Praxis Dialyse · Documentos do paciente (janela KwDialiseDocs): atestado, declarações e laudos. Prefixo hd2-. */
.hd2-janela { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hd2-janela h2 { margin: 0; }
.hd2-pac { margin: 0; font-weight: 600; }
.hd2-pac small { display: block; font-weight: 400; }
#hd2-raiz { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#hd2-raiz select, #hd2-raiz input:not([type="checkbox"]), #hd2-raiz textarea { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
#hd2-raiz textarea { resize: vertical; line-height: 1.4; }
.hd2-h3 { font-size: 1.02rem; margin: 6px 0 0; }
.hd2-peq { font-size: .88rem; margin: 0; }

/* botões grandes */
.hd2-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.hd2-grade-l { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hd2-big { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 72px; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--linha); border-left: 5px solid var(--px); border-radius: 12px; background: var(--sup); color: inherit; font: inherit; min-width: 0; }
.hd2-big b { font-size: 1.02rem; }
.hd2-big small { color: var(--aco); font-size: .82rem; line-height: 1.3; }
.hd2-big:hover, .hd2-big:focus-visible { background: color-mix(in srgb, var(--px) 7%, var(--sup)); }
.hd2-laudo { border-left-color: #6a3fa0; min-height: 64px; }
.hd2-off { border-left-color: var(--linha); opacity: .7; }
.hd2-nota { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--px) 6%, var(--sup)); border: 1px solid var(--linha); font-size: .9rem; }

/* emitidos */
.hd2-emit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hd2-emit li { display: flex; flex-direction: column; border: 1px solid var(--linha); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.hd2-emit small { color: var(--aco); font-size: .8rem; overflow-wrap: anywhere; }

/* formulário */
.hd2-topo { display: flex; }
.hd2-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hd2-campos .campo { min-width: 0; }
.hd2-seg { display: flex; flex-wrap: wrap; }
.hd2-seg button { flex: 1 1 140px; }
.hd2-chk { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.hd2-chk input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.hd2-chk span { display: flex; flex-direction: column; min-width: 0; }
.hd2-chk small { font-size: .8rem; }
.hd2-cx { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: 10px; }
.hd2-refazer { margin-top: 6px; align-self: flex-start; }
.hd2-avisos { padding: 9px 12px; border-radius: 10px; background: #eef4fb; border: 1px solid #c6d8ef; color: #17365d; font-size: .88rem; }
.hd2-avisos ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.hd2-falta { padding: 9px 12px; border-radius: 10px; background: #fff4dc; border: 1px solid #f1d08a; color: #5c3b00; font-size: .9rem; }
.hd2-falta ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.hd2-falta li.hd2-bloq { color: #8a1c12; }
.hd2-ok { margin: 0; color: #157347; font-size: .9rem; }
.hd2-acoes { position: sticky; bottom: -18px; background: var(--sup); padding: 8px 0; border-top: 1px solid var(--linha); flex-wrap: wrap; }

/* prévia (folha A4 reduzida para caber) */
.hd2-prev-cx { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--linha); border-radius: 10px; padding: 8px; background: #f4f5f4; }
.hd2-prev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hd2-prev { overflow: hidden; position: relative; }
.hd2-prev-in { width: 794px; transform-origin: top left; background: #fff; }

@media (max-width: 600px) {
  .hd2-grade, .hd2-grade-l { grid-template-columns: 1fr; }
  .hd2-acoes .btn { flex: 1 1 auto; }
}
