/* Castellaris Workflow v86 — Fase 3 em demonstração (clínica, papéis, ficha, pré-consulta do técnico, equipe) */
.v86-vercomo { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: #091629; border: 1px solid #c6a354; border-radius: 999px; color: #e6cf9c; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 8px 24px rgba(5,19,45,.3); }
.v86-vercomo select { border: 0; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 700; color: #0c2346; background: #fff; cursor: pointer; }
.v86-nome { color: #143565; }
.v86-menor { color: #8a651a; font-weight: 700; }
.v86-busca { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.v86-busca .wf65-field { flex: 1; min-width: 260px; margin: 0; }
.v86-busca .btn { height: 46px; }
.v86-ficha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.v86-c-nome, .v86-c-endereco { grid-column: 1 / -1; }
.v86-consent { border: 1px solid #dde5ef; border-radius: 12px; padding: 10px 14px; margin: 6px 0 12px; }
.v86-consent legend { font-weight: 800; color: #143565; padding: 0 4px; }
.v86-chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.v86-tri { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.v86-tri-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.v86-tri-lista li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e6ebf2; }
.v86-tri-lista span { color: #5b6b80; }
.v86-h2 { font-size: 17px; color: #143565; margin: 26px 0 10px; }
.v86-papeis ul { margin: 0; padding-left: 20px; line-height: 1.6; }
.v86-inativo td { opacity: .55; }
.v86-aud td { font-size: 13px; }
.v86-pront-id { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid #dde5ef; border-left: 4px solid #c6a354; border-radius: 12px; padding: 14px 18px; margin: 0 0 16px; box-shadow: 0 10px 28px rgba(18,42,76,.06); }
.v86-pront-id b { font-size: 18px; color: #0c2346; }
.v86-colegas { background: #fff; border: 1px solid #dde5ef; border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.v86-colegas h2 { font-size: 16px; margin: 0 0 10px; color: #143565; }
.v86-colegas article { border-top: 1px solid #e6ebf2; padding: 10px 0; }
.v86-colegas article header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.v86-colegas article header span { color: #5b6b80; font-size: 13px; }
.v86-colegas article p { margin: 6px 0 0; }
.wf65-pill.confirmado { background: #e8f1ff; color: #1d4f91; }
.wf65-pill.preconsulta { background: #fff4dc; color: #7d5a12; }
.wf65-pill.pronto { background: #e8f7f0; color: #1f7a55; }
@media (max-width: 760px) { .v86-ficha, .v86-tri { grid-template-columns: 1fr; } .v86-vercomo span { display: none; } }

/* v87 — pré-consulta com as caixinhas da refração; agenda com vários médicos */
body:has(.wf65-dialog-back) #wf-values26 { z-index: 2147483600; }
.v87-tri { display: grid; gap: 4px; margin: 4px 0 10px; }
.v87-linha { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 6px; padding: 7px 0; border-bottom: 1px solid #eef2f7; }
.v87-linha[hidden] { display: none; }
.v87-rot { min-width: 132px; font-weight: 800; color: #143565; font-size: 14px; }
.v87-olho { font-weight: 800; color: #143565; margin: 0 2px 0 10px; font-size: 13.5px; }
.v87-rot + .v87-olho { margin-left: 0; }
.v87-cx { width: 8ch; min-width: 0; padding: 6px 7px; border: 1px solid #cfd9e6; border-radius: 8px; background: #fff; font: inherit; font-size: 15px; color: #0c2346; cursor: pointer; text-align: center; }
.v87-cx.v87-c8 { width: 10ch; }
.v87-cx:focus { outline: 2px solid #7098c4; outline-offset: 1px; border-color: #7098c4; }
.v87-cx::placeholder { color: #9aa8ba; }
.v87-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.v87-linha .v87-chips:not(:nth-child(3)) { margin-left: 14px; }
.v87-sinais { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 18px; margin: 4px 0 10px; }
.v87-sv { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid #eef2f7; }
.v87-sv .v87-rot { min-width: 74px; }
.v87-sv small { color: #5b6b80; font-size: 12.5px; }
.v87-barra { color: #5b6b80; }
.v87-imc { min-width: 7ch; font-weight: 800; color: #0c2346; }
.v87-obs { margin-top: 6px; }
/* agenda: abas por médico */
.v87-abas { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.v87-abas button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d3deeb; background: #fff; color: #143565; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.v87-abas button small { font-weight: 600; color: #5b6b80; }
.v87-abas button i { font-style: normal; font-size: 12px; background: #eef3f9; border-radius: 999px; padding: 1px 8px; }
.v87-abas button.on { background: #0c2346; border-color: #0c2346; color: #fff; }
.v87-abas button.on small { color: #d9e3f1; }
.v87-abas button.on i { background: #c6a354; color: #0c2346; }
.v87-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, #1d4f91); display: inline-block; flex: none; }
.v87-med { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #143565; }
/* agenda: visão de todos os médicos */
.v87-grade-wrap { min-width: 0; overflow-x: auto; }
.v87-grade { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid #dde5ef; border-radius: 12px; table-layout: fixed; min-width: 640px; }
.v87-grade th, .v87-grade td { border-bottom: 1px solid #e9eef5; border-left: 1px solid #eef2f7; vertical-align: top; padding: 8px; text-align: left; }
.v87-grade thead th { border-top: 4px solid var(--cor, #1d4f91); background: #f8fafd; padding: 0; }
.v87-grade thead th:first-child { border-top-left-radius: 12px; }
.v87-grade thead th:last-child { border-top-right-radius: 12px; }
.v87-grade thead th button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 10px 9px; font: inherit; cursor: pointer; color: #0c2346; }
.v87-grade thead th button:hover b { text-decoration: underline; }
.v87-grade thead th button small { display: block; color: #5b6b80; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.v87-grade .v87-hora { width: 72px; font-size: 15px; color: #0c2346; background: #f8fafd; border-left: 0; }
.v87-grade thead .v87-hora { padding: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5b6b80; }
.v87-grade tfoot td, .v87-grade tfoot th { border-bottom: 0; background: #fbfcfe; }
.v87-grade tfoot .btn { width: 100%; font-size: 13px; }
.v87-cartao { border: 1px solid #dde5ef; border-left: 4px solid var(--cor, #1d4f91); border-radius: 9px; padding: 7px 9px; background: #fff; display: grid; gap: 3px; }
.v87-cartao + .v87-cartao { margin-top: 6px; }
.v87-grade td { --cor: inherit; }
.v87-cartao.st-finalizado, .v87-cartao.st-faltou { opacity: .6; }
.v87-c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.v87-c-top b { color: #0c2346; font-size: 14px; line-height: 1.25; }
.v87-c-top .wf65-pill { flex: none; font-size: 11px; padding: 2px 7px; }
.v87-cartao small { color: #5b6b80; font-size: 12.5px; }
.v87-espera.longa { color: #a5461e; font-weight: 700; }
.v87-c-acoes { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.v87-c-acoes .btn { padding: 4px 10px; min-height: 0; font-size: 12.5px; }
.v87-vago { width: 100%; min-height: 40px; border: 1px dashed #cfd9e6; border-radius: 9px; background: transparent; color: #9aa8ba; font-size: 18px; cursor: pointer; opacity: .55; }
.v87-vago:hover, .v87-vago:focus { opacity: 1; color: #143565; border-color: #7098c4; background: #f4f8fd; }
.v87-medico select { font-weight: 700; }
@media (max-width: 760px) { .v87-rot { min-width: 100%; } .v87-linha .v87-chips:not(:nth-child(3)) { margin-left: 0; } }

/* v88 — pré-consulta no prontuário, exames em caixinhas, escores do prontuário, diagnósticos pediátricos */
.v88-tri-nota { background: #fff; border: 1px solid #dde5ef; border-left: 4px solid #c6a354; border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.v88-tri-nota > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.v88-tri-nota b { color: #143565; font-size: 15px; }
.v88-tri-nota small { color: #5b6b80; }
.v88-tri-nota .v86-tri-lista li { padding: 5px 0; font-size: 14px; }
.v88-labs { display: grid; gap: 8px; margin: 4px 0 8px; }
#v67-labs .v78-ex-grid { grid-template-columns: 1fr; }
.v88-tab-wrap { overflow-x: auto; border: 1px solid #dde5ef; border-radius: 10px; background: #fff; }
.v88-tab { border-collapse: collapse; font-size: 13.5px; width: auto; }
.v88-tab-wrap { width: fit-content; max-width: 100%; }
.v88-tab th, .v88-tab td { border-bottom: 1px solid #eef2f7; padding: 0; text-align: left; white-space: nowrap; }
.v88-tab tbody tr:last-child th, .v88-tab tbody tr:last-child td { border-bottom: 0; }
.v88-tab thead th { background: #f8fafd; font-size: 11.5px; color: #5b6b80; font-weight: 700; padding: 4px 6px; border-bottom: 1px solid #dde5ef; }
.v88-tab .v88-tab-ex { position: sticky; left: 0; background: #fff; z-index: 1; padding: 3px 6px 3px 10px; min-width: 150px; max-width: 220px; border-right: 1px solid #eef2f7; }
.v88-tab thead .v88-tab-ex { background: #f8fafd; text-transform: uppercase; letter-spacing: .04em; }
.v88-ex-in { display: flex; align-items: baseline; gap: 5px; font-weight: 700; color: #143565; }
.v88-ex-n { overflow: hidden; text-overflow: ellipsis; }
.v88-ex-in small { color: #8593a6; font-weight: 600; font-size: 11px; }
.v88-ex-in .v88-x { margin-left: auto; }
.v88-col { display: inline-flex; align-items: center; gap: 1px; }
.v88-col input { width: 112px; border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: #143565; padding: 2px; cursor: pointer; }
.v88-tab td input { width: 86px; border: 0; border-left: 1px solid #f1f4f8; background: transparent; padding: 5px 8px; font: inherit; font-size: 14px; font-weight: 700; color: #0c2346; text-align: right; }
.v88-tab td input:hover { background: #f8fafd; }
.v88-tab td input:focus { outline: 2px solid #7098c4; outline-offset: -2px; background: #fff; }
.v88-col-nova label { display: inline-flex; align-items: center; gap: 4px; color: #1d4f91; cursor: pointer; font-weight: 700; padding: 0 4px; }
.v88-col-nova input { width: 22px; border: 0; background: transparent; color: transparent; cursor: pointer; padding: 0; }
.v88-col-nova input::-webkit-datetime-edit { display: none; }
.v88-x { border: 0; background: transparent; color: #b3bfcd; font-size: 15px; line-height: 1; cursor: pointer; padding: 1px 3px; }
.v88-x:hover { color: #b4232f; }
.v88-txts { display: grid; gap: 4px; }
.v88-txt { display: grid; grid-template-columns: auto minmax(0, 1fr) 128px auto; align-items: center; gap: 6px; border: 1px solid #dde5ef; border-radius: 9px; padding: 3px 6px 3px 10px; background: #fff; font-size: 13.5px; }
.v88-txt b { color: #143565; }
.v88-txt input { border: 0; background: transparent; font: inherit; padding: 4px; color: #0c2346; }
.v88-txt input[type=date] { font-size: 12px; color: #5b6b80; }
.v88-vazio { color: #5b6b80; margin: 0; font-size: 14px; }
.v88-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.v88-add input[data-v88lab-novo] { flex: 1; min-width: 240px; padding: 7px 10px; border: 1px dashed #b8cbe1; border-radius: 9px; font: inherit; font-size: 14px; background: #fbfcfe; }
.v88-add-data { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5b6b80; font-weight: 700; }
.v88-add-data input { padding: 5px; border: 1px solid #cfd9e6; border-radius: 7px; font: inherit; font-size: 12.5px; }
.v88-rapida { margin-top: 4px; }
.v88-rapida summary { cursor: pointer; color: #143565; font-weight: 700; font-size: 13.5px; }
.v88-dica { color: #5b6b80; font-size: 12.5px; margin: 6px 0; }
.v88-orig { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #eef3f9; color: #1d4f91; font-size: 11.5px; font-weight: 700; }
.v88-orig-aviso { background: #f4f8fd; border: 1px solid #d3deeb; border-radius: 9px; padding: 8px 12px; color: #143565; font-size: 13.5px; }
.v88-dx-aviso { color: #143565; font-size: 14px; margin: 4px 0 10px; }
.v88-dx-pend { display: grid; gap: 4px; border: 1px dashed #c6a354 !important; background: #fffaf0 !important; cursor: default; }
.v88-dx-pend small { color: #5b6b80; font-size: 12px; }
.v88-dx-bts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.v88-dx-bts .btn { padding: 5px 12px; font-size: 13px; min-height: 0; }
svg[data-wf62g-plot] { cursor: default; }

/* laboratório (ambiente de teste) */
#v88-lab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; white-space: nowrap; z-index: 2147483500; background: #c6a354; color: #0c2346; border: 1px solid #a88536; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(12, 35, 70, .25); pointer-events: none; }
#v88-lab b { text-transform: uppercase; letter-spacing: .06em; }
@media print { #v88-lab { display: none; } }
