/* ============================================================
   CCIH (out/2026) — complementos do mc-modulo.css (prefixo cc-).
   Só o que a fundação mm-* não cobre: etiqueta de precaução, linha
   de sinais da busca ativa, checklists (critérios ANVISA, 5 blocos
   da avaliação, bundles) e a placa impressa da porta do leito.
   Tudo com os tokens --p-* (claro/escuro herdados de .mm/.mm-layer).
   ============================================================ */

/* ---- Etiqueta de precaução (cor fixa da placa: igual no claro e no escuro) ---- */
.cc-etq {
    display: inline-flex; align-items: center; gap: 4px;
    padding: .14rem .5rem; border-radius: 6px;
    background: var(--etq, #64748b); color: #fff;
    font-size: .6rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.cc-etq i { font-size: 12px; }
.cc-etq.lg { padding: .3rem .7rem; font-size: .72rem; border-radius: 8px; }
.cc-etq.lg i { font-size: 15px; }
.cc-etqs { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }

/* ---- Sinais na linha (dispositivo D5, febre, cultura…) ---- */
.cc-sinais { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cc-sinais .mm-chip b { font-weight: 900; }
.cc-temp { font-variant-numeric: tabular-nums; font-weight: 800; }
.cc-temp.febre { color: var(--p-red); }
.cc-nada { color: var(--p-faint); font-size: .7rem; }

/* Linha da tabela com barra de prioridade (a mesma ideia da fila da regulação) */
.cc-tbl tbody tr > td:first-child { box-shadow: inset 4px 0 0 var(--tom, transparent); }
:is(.mm, .mm-layer) .mm-tbl td.acoes .prmd-iconbtn { display: inline-flex; vertical-align: middle; }
.cc-pac { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cc-pac-nome { font-size: .8rem; font-weight: 700; color: var(--p-ink); line-height: 1.25; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-pac-sub { font-size: .66rem; font-weight: 600; color: var(--p-faint); margin-top: 1px; }
.cc-dia {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 24px; padding: 0 7px; border-radius: 7px;
    background: var(--tom-soft, var(--p-soft2)); color: var(--tom, var(--p-ink));
    border: 1px solid var(--tom-line, var(--p-border));
    font-family: var(--p-mono); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* ---- Checklists (critérios, blocos da avaliação, bundles) ---- */
.cc-grupo { display: flex; flex-direction: column; gap: 6px; }
.cc-grupo + .cc-grupo { margin-top: 12px; }
.cc-grupo-tit { display: flex; align-items: center; gap: 7px; font-size: .62rem; font-weight: 800; letter-spacing: 1px; color: var(--p-faint); text-transform: uppercase; }
.cc-grupo-tit .ok { color: var(--p-green); font-size: 14px; }
.cc-grupo-ajuda { font-size: .68rem; color: var(--p-muted); font-weight: 500; margin-top: -2px; }
.cc-op {
    display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left;
    padding: 8px 10px; border-radius: 10px;
    border: 1px solid var(--p-border); background: var(--p-surface); color: var(--p-text);
    font: inherit; font-size: .76rem; font-weight: 600; line-height: 1.4;
    transition: border-color .15s, background .15s;
}
.cc-op:hover { border-color: var(--p-blue-line); }
.cc-op .cx {
    width: 18px; height: 18px; border-radius: 5px; flex: none; margin-top: 1px;
    border: 1.5px solid var(--p-border-strong); background: var(--p-surface);
    display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 13px;
}
.cc-op.on { border-color: var(--tom, var(--p-blue-light)); background: var(--tom-soft, var(--p-blue-soft)); color: var(--p-ink); }
.cc-op.on .cx { background: var(--tom, var(--p-blue-light)); border-color: var(--tom, var(--p-blue-light)); color: #fff; }
.cc-op:disabled { opacity: .55; cursor: not-allowed; }
.cc-ops2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

/* Resultado do critério ANVISA */
.cc-veredito {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    background: var(--tom-soft, var(--p-soft2)); border: 1px solid var(--tom-line, var(--p-border));
}
.cc-veredito > i { font-size: 22px; color: var(--tom, var(--p-muted)); flex: none; }
.cc-veredito-tit { font-size: .8rem; font-weight: 800; color: var(--p-ink); line-height: 1.3; }
.cc-veredito ul { margin: 6px 0 0; padding-left: 16px; font-size: .7rem; color: var(--p-text); }

/* Barra de progresso do bundle */
.cc-bundle-prog { display: flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 700; color: var(--p-muted); }
.cc-bundle-prog .mm-progress { flex: 1; }

/* ---- Precauções: cartões por setor ---- */
.cc-prec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cc-prec {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 14px;
    box-shadow: var(--p-shadow-sm); overflow: hidden; display: flex; flex-direction: column;
}
.cc-prec-faixa { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--etq, #64748b); color: #fff; }
.cc-prec-faixa i { font-size: 18px; }
.cc-prec-faixa b { font-size: .78rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.cc-prec-faixa span { margin-left: auto; font-size: .66rem; font-weight: 700; opacity: .9; }
.cc-prec-corpo { padding: 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-prec-pe { padding: 8px 12px; border-top: 1px solid var(--p-border); display: flex; gap: 6px; justify-content: flex-end; }

/* ---- Gráfico de colunas: mês selecionado em destaque ---- */
.cc-cols .mm-col.sel .mm-col-bar { background: var(--p-blue); box-shadow: 0 0 0 2px var(--p-blue-line-soft); }
.cc-cols .mm-col.sel .mm-col-lbl { color: var(--p-blue); font-weight: 800; }
.cc-cols .mm-col { cursor: pointer; }

/* ---- Linha do tempo da avaliação (histórico) ---- */
.cc-aval-itens { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; font-size: .7rem; color: var(--p-text); }
.cc-aval-itens b { color: var(--p-muted); font-weight: 700; }

/* ---- Modal: cabeçalho da ficha de antimicrobiano ---- */
.cc-ficha-med { font-size: .92rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; }
.cc-ficha-pos { font-size: .74rem; font-weight: 600; color: var(--p-muted); margin-top: 2px; }

/* ---- Mapa do dia (/ccih/mapa): um cartão por leito ---- */
.cm-setores { flex-wrap: wrap; margin-bottom: 12px; }
.cm-legenda { display: flex; flex-wrap: wrap; gap: 10px; font-size: .7rem; font-weight: 600; color: var(--p-muted); }
.cm-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.cm-legenda i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cm-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; padding: 2px; align-items: start; }
.cm-leito {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 16px; box-shadow: var(--p-shadow-sm);
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
    content-visibility: auto; contain-intrinsic-size: auto 360px;
}
.cm-leito.alerta { border-color: var(--p-orange-line); }
.cm-cab { display: flex; align-items: flex-start; gap: 10px; }
.cm-num {
    flex: none; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px;
    background: var(--p-blue-soft); color: var(--p-blue); border: 1px solid var(--p-blue-line-soft);
    display: flex; align-items: center; justify-content: center; font-family: var(--p-mono); font-weight: 800; font-size: .95rem;
}
.cm-pac { flex: 1; min-width: 0; }
.cm-pac-nome { font-size: .86rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; overflow-wrap: anywhere; }
.cm-pac-sub { font-size: .68rem; font-weight: 600; color: var(--p-muted); margin-top: 2px; }
.cm-cab-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cm-prec {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px;
    background: color-mix(in srgb, var(--etq) 13%, var(--p-surface)); border: 1px solid color-mix(in srgb, var(--etq) 45%, transparent);
}
.cm-prec > i { font-size: 18px; color: var(--etq); flex: none; }
.cm-prec-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-prec-txt b { font-size: .74rem; font-weight: 800; color: var(--p-ink); text-transform: uppercase; letter-spacing: .4px; }
.cm-prec-txt span { font-size: .7rem; font-weight: 600; color: var(--p-text); }
.cm-prec-btn {
    flex: none; border: 1px solid var(--p-border); background: var(--p-surface); color: var(--p-ink); border-radius: 8px;
    padding: 4px 8px; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}
.cm-padrao { font-size: .72rem; font-weight: 600; color: var(--p-muted); background: var(--p-soft2); border-radius: 10px; padding: 7px 10px; }
.cm-sec { font-size: .6rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--p-faint); margin-top: 4px; }
.cm-vazio { font-size: .72rem; color: var(--p-faint); }
.cm-linha { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: .76rem; color: var(--p-text); padding: 3px 0; border-top: 1px dashed var(--p-border); }
.cm-sec + .cm-linha { border-top: 0; }
.cm-ico { color: var(--p-muted); font-size: 15px; }
.cm-forte { font-weight: 700; color: var(--p-ink); }
.cm-det { font-size: .7rem; color: var(--p-muted); font-weight: 600; }
.cm-atencao { color: var(--p-orange); font-weight: 800; }
.cm-positiva { color: var(--p-red); font-weight: 800; }
.cm-alertas {
    list-style: none; margin: 4px 0 0; padding: 8px 10px; border-radius: 10px;
    background: var(--p-orange-soft); border: 1px solid var(--p-orange-line); display: flex; flex-direction: column; gap: 4px;
}
.cm-alertas li { display: flex; gap: 6px; align-items: flex-start; font-size: .72rem; font-weight: 700; color: var(--p-ink); }
.cm-alertas li i { color: var(--p-orange); font-size: 14px; margin-top: 1px; flex: none; }
.cm-alertas li.grave i { color: var(--p-red); }
.cm-pe { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--p-border); }

/* ---- Registrar dispositivos: passo a passo (nov/2026 — CcihModalNovosDispositivos) ----
   1. Paciente (lista em grade, padrão de listas grandes) → 2. Dispositivos (catálogo | lista a registrar) → 3. Conferir.
   As etapas ficam no cabeçalho da janela; abaixo de 900 px só os números. */
.ccd-steps { gap: 4px; margin-right: 4px; }
.ccd-steps .mm-step { flex: none; gap: 6px; padding: 5px 11px 5px 5px; border-radius: 50px; font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.ccd-steps .mm-step .n { width: 21px; height: 21px; font-size: .64rem; }
.ccd-steps .mm-step .n i { font-size: 13px; }
.ccd-steps .mm-step:disabled { cursor: default; }
.ccd-steps .mm-step:not(:disabled):not(.on):hover { border-color: var(--p-blue-line); color: var(--p-blue); }
.ccd .mm-mbody.cols > .mm-mlist { width: 420px; }
.ccd-forte { font-weight: 700; color: var(--p-ink); }
.ccd-vazio {
    display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 12px;
    border: 1px dashed var(--p-border-strong); background: var(--p-surface);
    font-size: .74rem; font-weight: 500; color: var(--p-muted); line-height: 1.5;
}
.ccd-vazio > i { font-size: 20px; color: var(--p-blue); flex: none; margin-top: 1px; }

/* 1. Paciente: a lista rola dentro da coluna (o campo de busca fica parado) */
.ccd .mm-mbody.cols > .mm-mmain.ccd-p1 { overflow: hidden; }
.ccd-busca { max-width: none; flex: 0 0 auto; }
.ccd-pacs { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--p-border); border-radius: 12px; background: var(--p-surface); }
.ccd-pacs.busy > .mm-grade { opacity: .38; pointer-events: none; transition: opacity .15s; }
.ccd-grade { --cols: minmax(0, 1.7fr) minmax(0, 1.1fr) 52px minmax(0, 1.3fr); }
.ccd-grade .mm-grade-l { cursor: pointer; }
.ccd-grade .mm-grade-l:focus-visible { outline: 2px solid var(--p-blue-light); outline-offset: -2px; }
.ccd-grade .mm-grade-l.ccd-sel { background: var(--p-blue-soft); box-shadow: inset 4px 0 0 var(--p-blue-light); }
.ccd-pac-card .mm-pessoa-nome { font-size: .86rem; white-space: normal; }
.ccd-pac-det { margin-top: 8px; font-size: .68rem; font-weight: 600; color: var(--p-muted); }

/* 2. Catálogo */
.ccd-cat-topo { display: flex; flex-direction: column; gap: 10px; }
.ccd-cats { display: flex; flex-wrap: wrap; align-self: flex-start; max-width: 100%; }
.ccd-cats button { padding-left: 10px; padding-right: 10px; }
.ccd-opts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ccd-opts .mm-opt { position: relative; min-height: 62px; cursor: pointer; }
.ccd-opts .mm-opt:disabled { opacity: .5; cursor: not-allowed; background: var(--p-soft); }
.ccd-qtd {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 50px; margin-left: auto;
    background: var(--tom, var(--p-blue-light)); color: #fff; font-size: .62rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
.ccd-opt-uso { font-size: .6rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--tom, var(--p-blue)); }

/* 2. Lista a registrar: um cartão por dispositivo; o aberto mostra os campos */
.ccd-item { border: 1px solid var(--p-border); border-left: 4px solid var(--tom, var(--p-blue)); border-radius: 12px; background: var(--p-surface); box-shadow: var(--p-shadow-sm); flex: none; }
.ccd-item.aberto { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tom, var(--p-blue-light)) 16%, transparent); }
.ccd-item.erro { border-color: var(--p-red); border-left-color: var(--p-red); }
.ccd-item-head { display: flex; align-items: center; gap: 9px; padding: 9px 8px 9px 10px; cursor: pointer; }
.ccd-item-ico {
    width: 30px; height: 30px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center;
    background: var(--tom-soft, var(--p-blue-soft)); color: var(--tom, var(--p-blue)); font-size: 16px;
}
.ccd-item-txt { flex: 1; min-width: 0; }
.ccd-item-tit { font-size: .8rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccd-item-tit span { font-weight: 600; color: var(--p-muted); font-size: .72rem; }
.ccd-item-sub { font-size: .68rem; font-weight: 600; color: var(--p-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccd-item-seta { color: var(--p-faint); font-size: 18px; flex: none; }
.ccd-item-erro { display: flex; gap: 6px; align-items: flex-start; margin: 0 10px 9px; padding: 7px 9px; border-radius: 8px; background: var(--p-red-soft); color: var(--p-red); font-size: .7rem; font-weight: 700; line-height: 1.4; }
.ccd-item-erro i { font-size: 14px; margin-top: 1px; flex: none; }
.ccd-item-corpo { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 12px; border-top: 1px dashed var(--p-border); padding-top: 11px; }
.ccd-item-corpo .prmd-flabel { display: flex; align-items: center; gap: 5px; }
.ccd-item-corpo .prmd-flabel .opc { font-weight: 600; color: var(--p-faint); text-transform: none; letter-spacing: 0; }
.ccd-item-corpo textarea.prmd-field { resize: vertical; min-height: 54px; }
.ccd-dupla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ccd-sug { margin-top: 6px; gap: 5px; }
.ccd-sug .mm-pill.sm { height: 26px; padding: 0 9px; font-size: .68rem; }
.ccd-bundle { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--p-soft); border: 1px solid var(--p-border-soft); }
.ccd-bundle .cc-op { font-size: .72rem; padding: 7px 9px; }
.ccd-prog { flex: 1; height: 7px; border-radius: 50px; background: var(--p-soft2); overflow: hidden; }
.ccd-prog > div { height: 100%; border-radius: 50px; background: var(--tom, var(--p-blue-light)); }
.ccd-dica-btns { display: inline-flex; gap: 5px; margin-left: 4px; vertical-align: middle; }

/* 3. Conferir: o paciente em destaque */
.ccd-conf-pac {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
    background: var(--p-blue-soft); border: 1px solid var(--p-blue-line);
}
.ccd-conf-txt { flex: 1; min-width: 0; }
.ccd-conf-rot { font-size: .6rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--p-blue); }
.ccd-conf-nome { font-size: 1.05rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; }
.ccd-conf-sub { font-size: .74rem; font-weight: 600; color: var(--p-muted); margin-top: 2px; }

@media (max-width: 900px) {
    .ccd-steps .mm-step { padding: 4px; }
    .ccd-steps .mm-step .t { display: none; }
    .ccd .mm-mbody.cols > .mm-mlist { width: 100%; }
    .ccd .mm-mbody.cols > .mm-mmain.ccd-p1 { overflow: visible; }
    .ccd-pacs { max-height: 60vh; }
    .ccd-dupla { grid-template-columns: 1fr; }
    .ccd-conf-pac { flex-wrap: wrap; }
}
/* celular: cabeçalho só com título e etapas; pacientes em duas colunas (o lado mostra o que está em uso) */
@media (max-width: 600px) {
    .ccd .prmd-head { gap: 8px; padding: 0 12px; }
    .ccd .prmd-head-ico, .ccd .prmd-head .prmd-modo, .ccd .prmd-head-sub { display: none; }
    .ccd .prmd-head-title { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ccd-grade { --cols: minmax(0, 1.4fr) minmax(0, 1fr); }
    .ccd-grade .mm-grade-h > :nth-child(n+3), .ccd-grade .mm-grade-l > :nth-child(n+3) { display: none; }
    .ccd-conf-txt { flex: 1 1 180px; }
    .ccd-conf-pac > .mm-btn { width: 100%; justify-content: center; }
}

/* ---- Dispositivos e bundles (/ccih/dispositivos): listas em grade (padrão de listas grandes, nov/2026) ---- */
.cc-grade .mm-grade-l { box-shadow: inset 4px 0 0 var(--tom, transparent); }
.cc-g-uso { --cols: minmax(210px, 1.5fr) minmax(120px, 1fr) minmax(190px, 1.4fr) 118px 56px minmax(150px, 1.1fr) 92px 214px; }
.cc-g-ret { --cols: minmax(190px, 1.4fr) minmax(130px, 1fr) minmax(190px, 1.4fr) 92px 92px 56px minmax(160px, 1.3fr) 44px; }
.cc-pac-btn { border: 0; background: transparent; padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; max-width: 100%; }
.cc-pac-btn:hover .cc-pac-nome { color: var(--p-blue); text-decoration: underline; }
.cc-pac-btn .cc-pac-sub { display: block; }
.cc-grade .acoes .prmd-iconbtn { display: inline-flex; }
