/* Laboratório v2 — Coleta e amostras (prefixo lbc-). Só este grupo edita este arquivo.
   Tokens --p-* herdados de .mm (claro/escuro). Base comum: ../mc-modulo-laboratorio.css (lb-).
   Telas: Coleta, Triagem de Amostras, Etiquetas (+ impressão), Soroteca, Recipientes/Frascos.
   Sem media query de largura (a escala .mc-scaled cuida). */

/* ---------------------------------------------------------------- tubo (cor da tampa) */
.lbc-tubo {
    --cap: #94a3b8;
    position: relative; display: inline-block; flex: none;
    width: 16px; height: 34px; border-radius: 3px 3px 8px 8px;
    border: 1.5px solid var(--p-border-strong); border-top: 0;
    background: linear-gradient(180deg, transparent 0 34%, color-mix(in srgb, var(--cap) 12%, var(--p-surface)) 34%);
    margin-top: 6px;
}
.lbc-tubo::before {
    content: ""; position: absolute; left: -3px; right: -3px; top: -7px; height: 9px;
    border-radius: 3px; background: var(--cap); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.lbc-tubo.sm { width: 11px; height: 22px; margin-top: 4px; }
.lbc-tubo.sm::before { left: -2px; right: -2px; top: -5px; height: 6px; }
.lbc-tubo.frasco { width: 22px; height: 28px; border-radius: 4px 4px 6px 6px; }
.lbc-tubo.frasco::before { left: 2px; right: 2px; }

/* ---------------------------------------------------------------- chips */
.lbc-cap { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; color: var(--p-ink); }
.lbc-cap .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cap, #94a3b8); box-shadow: 0 0 0 2px var(--p-surface), 0 0 0 3px var(--p-border); }
.lbc-siglas { font: 700 .68rem var(--p-mono); letter-spacing: .3px; color: var(--p-blue); }
.lbc-senha {
    min-width: 46px; height: 46px; border-radius: 12px; flex: none;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--p-blue-soft); color: var(--p-blue); border: 1px solid var(--p-blue-line-soft);
    font-weight: 800; font-size: 1.05rem; line-height: 1;
}
.lbc-senha small { font-size: .52rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; opacity: .8; margin-top: 2px; }
.lbc-senha.leito { background: var(--p-purple-soft); color: var(--p-purple); border-color: var(--p-purple-line); font-size: .9rem; }
.lbc-senha.amb { background: var(--p-soft); color: var(--p-muted); border-color: var(--p-border); font-size: .8rem; }

/* ---------------------------------------------------------------- Coleta: lista + paciente */
.lbc-coleta { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 16px; align-items: start; }
.lbc-fila .mm-card-body { padding: 10px; }
.lbc-fila-lista { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 330px); min-height: 320px; overflow: auto; padding-right: 2px; }
.lbc-pac { position: relative; align-items: flex-start; }
.lbc-pac.urg { border-left: 4px solid var(--p-red); }
.lbc-pac .mm-item-tit { font-size: .82rem; }
.lbc-pac-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.lbc-tentativa { font-size: .66rem; font-weight: 600; color: var(--p-orange); margin-top: 4px; display: flex; gap: 4px; align-items: flex-start; }

.lbc-det { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lbc-idt { display: flex; gap: 14px; align-items: center; }
.lbc-idt-nome { font-size: 1.12rem; font-weight: 800; color: var(--p-ink); line-height: 1.25; }
.lbc-idt-sub { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: .74rem; font-weight: 600; color: var(--p-muted); }
.lbc-idt-sub b { color: var(--p-ink); }
.lbc-conf { margin-top: 10px; }

.lbc-tubos { display: flex; flex-direction: column; gap: 8px; }
.lbc-tuborow {
    display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--p-border); background: var(--p-surface);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.lbc-tuborow:hover { border-color: var(--p-blue-line); }
.lbc-tuborow.on { border-color: var(--p-blue-light); background: var(--p-blue-soft); box-shadow: 0 0 0 2px var(--p-blue-line-soft); }
.lbc-tuborow.feito { cursor: default; opacity: .9; background: var(--p-soft); }
.lbc-tuborow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--p-blue-light); cursor: pointer; }
.lbc-tubo-nome { font-size: .84rem; font-weight: 800; color: var(--p-ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lbc-tubo-sub { font-size: .7rem; font-weight: 600; color: var(--p-muted); margin-top: 2px; }
.lbc-tubo-exames { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.lbc-tubo-exames .mm-tag { font-size: .64rem; }
.lbc-tubo-dir { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.lbc-preparo { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: .68rem; font-weight: 600; color: var(--p-orange); }
.lbc-rodape { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lbc-rodape .mm-input { width: 230px; }
.lbc-motivos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------------------------------------------------------------- campo do bip (Coleta, Triagem, Etiquetas, Soroteca) */
.lbc-bip { position: relative; display: flex; align-items: center; }
.lbc-bip i.ri-barcode-line { position: absolute; left: 12px; font-size: 20px; color: var(--p-faint); pointer-events: none; }
.lbc-bip input {
    width: 100%; height: 42px; padding: 0 12px 0 42px; border-radius: 12px;
    border: 1.5px solid var(--p-border-strong); background: var(--p-surface); color: var(--p-ink);
    font: 700 1rem var(--p-mono); letter-spacing: .6px;
}
.lbc-bip input:focus { outline: none; border-color: var(--p-blue-light); box-shadow: var(--p-focus-ring); }
.lbc-bip input::placeholder { font: 500 .8rem var(--p-font); letter-spacing: 0; color: var(--p-faint); }
.lbc-bip.grande input::placeholder { font-size: 1.05rem; }
.lbc-bip.grande input { height: 64px; font-size: 1.45rem; padding-left: 56px; border-radius: 16px; }
.lbc-bip.grande i.ri-barcode-line { font-size: 28px; left: 16px; }
.lbc-bip.ok input { border-color: var(--p-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-green) 22%, transparent); }
.lbc-bip.erro input { border-color: var(--p-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-red) 22%, transparent); }
.lbc-bip.aviso input { border-color: var(--p-yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-yellow) 22%, transparent); }
.lbc-head-bip { width: 330px; }

/* ---------------------------------------------------------------- Triagem */
.lbc-tri { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.lbc-tri-painel { padding: 18px; }
.lbc-tri-dica { font-size: .74rem; font-weight: 600; color: var(--p-muted); margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.lbc-ult {
    margin-top: 16px; border-radius: 16px; padding: 18px; border: 2px solid var(--p-border);
    background: var(--p-soft); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
}
.lbc-ult.ok { border-color: var(--p-green); background: var(--p-green-soft); }
.lbc-ult.erro { border-color: var(--p-red); background: var(--p-red-soft); }
.lbc-ult.aviso { border-color: var(--p-yellow); background: var(--p-yellow-soft); }
.lbc-ult-ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; background: var(--p-faint); }
.lbc-ult.ok .lbc-ult-ico { background: var(--p-green); }
.lbc-ult.erro .lbc-ult-ico { background: var(--p-red); }
.lbc-ult.aviso .lbc-ult-ico { background: var(--p-yellow); }
.lbc-ult-msg { font-size: .95rem; font-weight: 800; color: var(--p-ink); }
.lbc-ult-pac { font-size: .82rem; font-weight: 700; color: var(--p-text); margin-top: 3px; }
.lbc-ult-ex { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.lbc-ult-acoes { display: flex; flex-direction: column; gap: 6px; }
.lbc-bancada { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 58px); gap: 6px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--p-border-soft); font-size: .76rem; font-weight: 600; color: var(--p-text); }
.lbc-bancada:last-child { border-bottom: 0; }
.lbc-bancada.cab { font-size: .6rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--p-faint); }
.lbc-bancada > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.lbc-bancada b { color: var(--p-ink); }
.lbc-atraso { color: var(--p-red); font-weight: 800; }

/* ---------------------------------------------------------------- Etiqueta (tela e impressão). Medidas em mm. */
.lbc-etq {
    box-sizing: border-box; width: 50mm; height: 25mm; padding: 1.1mm 2mm 0.8mm; overflow: hidden;
    background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; line-height: 1.05;
    display: flex; flex-direction: column; break-inside: avoid; page-break-inside: avoid;
}
.lbc-etq.f40 { width: 40mm; padding: 1.1mm 1.5mm 0.8mm; }
.lbc-etq .e1 { display: flex; justify-content: space-between; gap: 1mm; align-items: baseline; font-size: 7.2pt; font-weight: 800; white-space: nowrap;
    font-family: "Arial Narrow", "Nimbus Sans Narrow", "Liberation Sans Narrow", Arial, Helvetica, sans-serif; }
.lbc-etq .e1 span { overflow: hidden; text-overflow: clip; }
.lbc-etq .e1 em { font-style: normal; font-size: 6.4pt; font-weight: 800; border: .25mm solid #000; padding: 0 .6mm; border-radius: .6mm; }
.lbc-etq .e2 { font-size: 6pt; font-weight: 700; white-space: nowrap; overflow: hidden; margin-top: .3mm; }
.lbc-etq .bar { height: 8.6mm; width: 41.25mm; margin: .7mm auto 0; }
.lbc-etq.f40 .bar { width: 30mm; }
.lbc-etq .bar svg { display: block; width: 100%; height: 100%; }
.lbc-etq .cod { text-align: center; font: 800 8.2pt "Courier New", ui-monospace, monospace; letter-spacing: .9pt; margin-top: .2mm; }
.lbc-etq .e3 { display: flex; gap: 1.2mm; font-size: 6pt; font-weight: 700; white-space: nowrap; overflow: hidden; margin-top: auto; }
.lbc-etq .e3 b { font-weight: 900; }
.lbc-etq .e3 span { overflow: hidden; }
.lbc-etq-prev { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px; background: var(--p-soft); border-radius: 12px; border: 1px dashed var(--p-border-strong); }
.lbc-etq-prev .lbc-etq { box-shadow: 0 1px 3px rgba(0,0,0,.18); border-radius: 1.5mm; zoom: 1.55; }

/* ---------------------------------------------------------------- Etiquetas (tela) */
.lbc-etq-tela { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.lbc-tbl-cod { font: 700 .76rem var(--p-mono); color: var(--p-ink); letter-spacing: .4px; }
.lbc-impr { font-size: .64rem; font-weight: 700; color: var(--p-faint); }

/* ---------------------------------------------------------------- Soroteca: rack */
.lbc-rack { display: grid; grid-template-columns: 22px repeat(10, minmax(0, 1fr)); gap: 4px; }
.lbc-sor-modal .lbc-rack { max-width: 380px; }
.lbc-rack-lbl { font-size: .6rem; font-weight: 800; color: var(--p-faint); display: flex; align-items: center; justify-content: center; }
.lbc-rack-pos {
    aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--p-border-strong); background: var(--p-surface);
    display: flex; align-items: center; justify-content: center; font-size: .5rem; font-weight: 800; color: var(--p-faint);
    padding: 0; cursor: default;
}
.lbc-rack-pos.ocup { border-style: solid; border-color: var(--p-blue-light); background: var(--p-blue-soft); color: var(--p-blue); cursor: pointer; }
.lbc-rack-pos.uso { border-style: solid; border-color: var(--p-yellow); background: var(--p-yellow-soft); color: var(--p-yellow); cursor: pointer; }
.lbc-rack-pos.venc { border-style: solid; border-color: var(--p-red); background: var(--p-red-soft); color: var(--p-red); cursor: pointer; }
.lbc-rack-pos.livre:hover { border-color: var(--p-green); color: var(--p-green); cursor: pointer; }
.lbc-rack-pos.sug { border-style: solid; border-color: var(--p-green); background: var(--p-green-soft); color: var(--p-green); }
.lbc-sor-local { font: 700 .74rem var(--p-mono); color: var(--p-ink); }

/* ---------------------------------------------------------------- Recipientes */
.lbc-recs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lbc-rec { border: 1px solid var(--p-border); border-radius: 14px; background: var(--p-surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lbc-rec.inativo { opacity: .6; }
.lbc-rec-top { display: flex; gap: 12px; align-items: flex-start; }
.lbc-rec-nome { font-size: .84rem; font-weight: 800; color: var(--p-ink); line-height: 1.3; }
.lbc-rec-sub { font-size: .68rem; font-weight: 600; color: var(--p-muted); margin-top: 2px; }
.lbc-rec-uso { font-size: .68rem; font-weight: 600; color: var(--p-text); line-height: 1.45; }
.lbc-rec-acoes { display: flex; gap: 6px; align-items: center; margin-top: auto; }

/* ---------------------------------------------------------------- impressão de etiquetas (página sem barra) */
.lbc-print-barra { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 10px 16px; background: #0b1f3a; color: #fff; font: 600 13px Inter, Arial, sans-serif; }
.lbc-print-barra select, .lbc-print-barra input { height: 32px; border-radius: 8px; border: 0; padding: 0 8px; font: inherit; color: #0b1f3a; }
.lbc-print-barra button { height: 32px; border-radius: 8px; border: 0; padding: 0 14px; font: 700 13px Inter, Arial, sans-serif; cursor: pointer; background: #fff; color: #0b1f3a; }
.lbc-print-barra button.pri { background: linear-gradient(135deg, #1a4a9e, #2563eb); color: #fff; }
.lbc-print-barra .esp { flex: 1; }
.lbc-print-folha { padding: 70px 16px 24px; display: flex; flex-wrap: wrap; gap: 10px; background: #e5e7eb; min-height: 100vh; align-content: flex-start; }
.lbc-print-folha .lbc-etq { box-shadow: 0 1px 4px rgba(0,0,0,.25); }
@media print {
    .lbc-print-barra { display: none !important; }
    .lbc-print-folha { padding: 0 !important; margin: 0 !important; display: block !important; background: #fff !important; min-height: 0 !important; }
    .lbc-print-folha .lbc-etq { box-shadow: none !important; page-break-after: always; break-after: page; }
    .lbc-print-folha .lbc-etq:last-child { page-break-after: auto; break-after: auto; }
}
