/* Laboratório v2 — Interfaceamento de equipamentos (prefixo lbi-). Só este grupo edita este arquivo.
   Tokens --p-* herdados de .mm (claro/escuro). Base comum: ../mc-modulo-laboratorio.css (lb-).
   Telas: Equipamentos, Mapeamento Exames, Resultados Equipamento, Comunicação, Ponte do Laboratório. */

/* ---------- cartões de equipamento ---------- */
.lbi-eqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.lbi-eq {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 14px; box-shadow: var(--p-shadow-sm);
    display: flex; flex-direction: column; overflow: hidden; border-top: 4px solid var(--tom, var(--p-border-strong));
}
.lbi-eq.inativo { opacity: .62; }
.lbi-eq-head { display: flex; align-items: flex-start; gap: 11px; padding: 14px 14px 10px; }
.lbi-eq-ico {
    width: 42px; height: 42px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
    font-size: 21px; background: var(--tom-soft, var(--p-blue-soft)); color: var(--tom, var(--p-blue));
}
.lbi-eq-nome { font-size: .9rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; }
.lbi-eq-mod { font-size: .68rem; font-weight: 600; color: var(--p-faint); margin-top: 2px; }
.lbi-eq-body { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.lbi-eq-erro {
    font-size: .68rem; font-weight: 600; color: var(--p-red); background: var(--p-red-soft); border: 1px solid var(--p-red-line);
    border-radius: 9px; padding: 6px 9px; line-height: 1.4; overflow-wrap: anywhere;
}
.lbi-eq-foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--p-border-soft); background: var(--p-soft); }
.lbi-eq-nums { display: flex; gap: 14px; font-size: .7rem; color: var(--p-muted); font-weight: 600; }
.lbi-eq-nums b { color: var(--p-ink); font-size: .82rem; }
.lbi-eq-nums a { color: var(--p-orange); text-decoration: none; }
.lbi-eq-nums a:hover { text-decoration: underline; }

/* estado ao vivo (cor do cartão e do chip) */
.lbi-st-conectado { --tom: var(--p-green); --tom-soft: var(--p-green-soft); --tom-line: var(--p-green-line); }
.lbi-st-aguardando { --tom: var(--p-yellow); --tom-soft: var(--p-yellow-soft); --tom-line: var(--p-yellow-line); }
.lbi-st-erro, .lbi-st-ponte_offline, .lbi-st-ponte_revogada { --tom: var(--p-red); --tom-soft: var(--p-red-soft); --tom-line: var(--p-red-line); }
.lbi-st-sem_ponte { --tom: var(--p-orange); --tom-soft: var(--p-orange-soft); --tom-line: var(--p-orange-line); }
.lbi-st-desconectado, .lbi-st-inativo { --tom: var(--p-faint); --tom-soft: var(--p-soft2); --tom-line: var(--p-border); }
.lbi-chip-st { background: var(--tom-soft); color: var(--tom); border: 1px solid var(--tom-line); }

/* ---------- assistente "Novo equipamento" ---------- */
.lbi-modelos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lbi-modelo { min-height: 104px; }
.lbi-modelo .mm-opt-sub { font-size: .66rem; }
.lbi-passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .76rem; line-height: 1.5; color: var(--p-text); }
.lbi-passos li::marker { color: var(--p-blue); font-weight: 800; }
.lbi-mapa-prev { max-height: 260px; overflow: auto; border: 1px solid var(--p-border); border-radius: 10px; }
.lbi-falta { color: var(--p-orange); font-weight: 700; }

/* ---------- log bruto com controles visíveis ---------- */
.lbi-bruto {
    font-family: var(--p-mono); font-size: .74rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
    background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 12px 14px; margin: 0; max-height: 380px; overflow: auto;
}
.lbi-bruto .c { color: #fbbf24; font-weight: 700; }
.lbi-bruto.resp { background: #052e2b; color: #d1fae5; }
.lbi-prev { font-family: var(--p-mono); font-size: .7rem; color: var(--p-muted); max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbi-prev .c { color: var(--p-orange); font-weight: 700; }

/* ---------- tabelas ---------- */
.lbi-tbl td.lbi-aviso { font-size: .7rem; color: var(--p-muted); max-width: 360px; line-height: 1.35; }
.lbi-tbl .lbi-val { font-family: var(--p-mono); font-weight: 700; color: var(--p-ink); }
.lbi-tbl .lbi-un { font-size: .66rem; color: var(--p-faint); margin-left: 3px; }
.lbi-tbl tr.sel td { background: var(--p-blue-soft); }
.lbi-tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--p-blue-light); cursor: pointer; }
.lbi-seta { color: var(--p-faint); margin: 0 4px; }
.lbi-fator { font-family: var(--p-mono); font-weight: 700; }
.lbi-fator.auto { color: var(--p-teal); }
.lbi-paginas { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; font-size: .72rem; color: var(--p-muted); border-top: 1px solid var(--p-border-soft); }

/* ---------- ajuda do fator ---------- */
.lbi-calc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; font-weight: 600; color: var(--p-text); }
.lbi-calc .prmd-field { width: 120px; }
.lbi-calc-res { font-family: var(--p-mono); font-size: .9rem; font-weight: 800; color: var(--p-ink); }

/* ---------- página da Ponte ---------- */
.lbi-download {
    display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px;
    background: linear-gradient(135deg, #0b1f3a, #1a4a9e 55%, #2563eb); color: #fff;
}
.lbi-download-ico { width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 34px; flex: none; }
.lbi-download-tit { font-size: 1.05rem; font-weight: 800; }
.lbi-download-sub { font-size: .74rem; opacity: .86; margin-top: 3px; line-height: 1.5; }
.lbi-download .mm-btn { background: #fff; color: #1a4a9e !important; border-color: #fff; height: 42px; font-size: .82rem; }   /* !important: mc-modulo-social/rh pintam a.mm-btn com --p-text (claro no tema escuro) */
.lbi-download .mm-btn:hover:not(:disabled) { color: #1a4a9e; background: #eff6ff; border-color: #fff; }
.lbi-download .mm-btn:hover { filter: brightness(.96); }
.lbi-hash { font-family: var(--p-mono); font-size: .62rem; opacity: .75; overflow-wrap: anywhere; margin-top: 6px; }
.lbi-etapas { counter-reset: lbi; display: flex; flex-direction: column; gap: 12px; }
.lbi-etapa { display: flex; gap: 12px; }
.lbi-etapa::before {
    counter-increment: lbi; content: counter(lbi); flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--p-blue-light); color: #fff; font-size: .74rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.lbi-etapa-tit { font-size: .8rem; font-weight: 800; color: var(--p-ink); }
.lbi-etapa-txt { font-size: .74rem; line-height: 1.55; color: var(--p-text); margin-top: 2px; }
.lbi-etapa-txt code, .lbi-code { font-family: var(--p-mono); font-size: .7rem; background: var(--p-soft2); border-radius: 5px; padding: 1px 5px; color: var(--p-ink); }
.lbi-modelo-card { border: 1px solid var(--p-border); border-radius: 12px; overflow: hidden; }
.lbi-modelo-card + .lbi-modelo-card { margin-top: 10px; }
.lbi-modelo-card > button {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--p-surface);
    border: 0; text-align: left; font: inherit; color: var(--p-ink); font-weight: 800; font-size: .8rem;
}
.lbi-modelo-card > button:hover { background: var(--p-soft); }
.lbi-modelo-card > button .sub { font-size: .66rem; font-weight: 600; color: var(--p-faint); }
.lbi-modelo-card .corpo { padding: 4px 14px 14px 14px; background: var(--p-surface); }
.lbi-token {
    font-family: var(--p-mono); font-size: .86rem; font-weight: 700; color: var(--p-ink); background: var(--p-yellow-soft);
    border: 1px dashed var(--p-yellow-line); border-radius: 10px; padding: 12px; overflow-wrap: anywhere; user-select: all;
}
.lbi-ponte .mm-item-tit .ver { font-family: var(--p-mono); font-size: .64rem; color: var(--p-faint); }
.lbi-portas { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lbi-conexoes { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.lbi-conexao { display: flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 600; color: var(--p-text); }
.lbi-conexao .nome { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbi-conexao .msg { color: var(--p-faint); font-weight: 600; white-space: nowrap; }
.lbi-ate { font-size: .74rem; font-weight: 700; color: var(--p-faint); padding: 0 2px; }
