/* Brotas Saúde — estilos das telas próprias (o CSS do Filament só traz as classes que ele usa) */
.bs-linha { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bs-linha-3 { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.bs-direita { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bs-muted { color: rgb(100 116 139); } .dark .bs-muted { color: rgb(148 163 184); }
.bs-peq { font-size: .875rem; } .bs-mini { font-size: .75rem; } .bs-micro { font-size: 11px; }
.bs-forte { font-weight: 600; }
.bs-link { color: rgb(47 102 190); text-decoration: underline; }
.bs-cards { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .bs-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bs-num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bs-grid-3 { display: grid; gap: 1rem; } @media (min-width: 1024px) { .bs-grid-3 { grid-template-columns: 2fr 1fr; } }
.bs-aviso { border-radius: 8px; padding: .55rem 1rem; font-size: .875rem; border: 1px solid; }
.bs-aviso-azul { background: #eef4fc; border-color: #c7d9f3; color: #1e3a6e; }
.bs-aviso-amarelo { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.bs-aviso-vermelho { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.dark .bs-aviso-azul { background: #0f1f3a; color: #c7d9f3; } .dark .bs-aviso-amarelo { background: #3a2a05; color: #fcd34d; } .dark .bs-aviso-vermelho { background: #3b0d0d; color: #fecaca; }
.bs-item { border-bottom: 1px solid rgb(241 245 249); padding: .55rem 0; } .bs-item:last-child { border-bottom: 0; }
.dark .bs-item { border-color: rgb(255 255 255 / .08); }
.bs-hora { width: 3rem; font-weight: 700; }
.bs-campos { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .875rem; }
.bs-pre { white-space: pre-line; }
.bs-input { border: 1px solid rgb(203 213 225); border-radius: 8px; padding: .3rem .5rem; font-size: .875rem; background: #fff; }
.dark .bs-input { background: rgb(17 24 39); border-color: rgb(255 255 255 / .1); color: #e2e8f0; }

/* Agenda */
.bs-agenda { overflow-x: auto; border: 1px solid rgb(226 232 240); border-radius: 10px; background: #fff; }
.dark .bs-agenda { background: rgb(17 24 39); border-color: rgb(255 255 255 / .1); }
.bs-agenda-corpo { display: flex; min-width: max-content; }
.bs-agenda-horas { width: 3.5rem; flex-shrink: 0; border-right: 1px solid rgb(241 245 249); }
.bs-agenda-horas div { text-align: right; padding-right: .35rem; font-size: 11px; color: rgb(148 163 184); }
.bs-agenda-cab { height: 3rem; border-bottom: 1px solid rgb(241 245 249); padding: 0 .5rem; display: flex; flex-direction: column; justify-content: center; }
.bs-agenda-col { width: 14rem; flex-shrink: 0; border-right: 1px solid rgb(241 245 249); }
.bs-agenda-col:last-child { border-right: 0; }
.dark .bs-agenda-horas, .dark .bs-agenda-cab, .dark .bs-agenda-col { border-color: rgb(255 255 255 / .08); }
.bs-agenda-area { position: relative; cursor: pointer; }
.bs-bloco { position: absolute; left: 4px; right: 4px; overflow: hidden; border-radius: 6px; border-left: 4px solid; background: #fff; padding: 2px 6px; font-size: 12px; box-shadow: 0 0 0 1px rgb(226 232 240); color: inherit; text-decoration: none; }
.bs-bloco:hover { box-shadow: 0 0 0 1px rgb(148 163 184); }
.dark .bs-bloco { background: rgb(31 41 55); box-shadow: 0 0 0 1px rgb(255 255 255 / .1); }
.bs-trunca { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-perigo { color: #b91c1c; }

/* Agenda: bloqueio, encaixe, mês */
.bs-bloqueio { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(148,163,184,.18) 0, rgba(148,163,184,.18) 6px, transparent 6px, transparent 12px); color: rgb(100 116 139); font-size: 11px; padding: 2px 6px; pointer-events: none; }
.bs-encaixe { border-style: dashed; border-top: 1px dashed rgb(148 163 184); border-right: 1px dashed rgb(148 163 184); border-bottom: 1px dashed rgb(148 163 184); }
.bs-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bs-mes-cab { font-size: .75rem; color: rgb(100 116 139); text-align: center; padding: .25rem 0; }
.bs-mes-dia { min-height: 70px; text-align: left; border: 1px solid rgb(226 232 240); border-radius: 8px; background: #fff; padding: .35rem .5rem; display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; cursor: pointer; }
.bs-mes-dia:hover { border-color: rgb(148 163 184); }
.bs-mes-fora { opacity: .45; }
.bs-mes-hoje { border-color: #2F66BE; box-shadow: inset 0 0 0 1px #2F66BE; }
.bs-mes-cont { font-size: .72rem; background: #eef4fc; color: #1e3a6e; border-radius: 4px; padding: 1px 5px; align-self: flex-start; }
.dark .bs-mes-dia { background: rgb(17 24 39); border-color: rgb(255 255 255 / .1); }
@media (max-width: 640px) { .bs-mes-dia { min-height: 52px; font-size: .75rem; } .bs-mes-cont { font-size: .65rem; } }
@media print { .fi-sidebar, .fi-topbar { display: none !important; } }

/* Tabelas simples de relatório */
.bs-tabela { width: 100%; border-collapse: collapse; font-size: .875rem; }
.bs-tabela th { text-align: left; font-weight: 600; color: rgb(100 116 139); font-size: .75rem; padding: .35rem .5rem; border-bottom: 1px solid rgb(226 232 240); }
.bs-tabela td { padding: .4rem .5rem; border-bottom: 1px solid rgb(241 245 249); }
.dark .bs-tabela th, .dark .bs-tabela td { border-color: rgb(255 255 255 / .08); }
.bs-mes-livre { background: #f0fdf4; } .bs-mes-cheio { background: #fffbeb; } .bs-mes-lotado { background: #fef2f2; } .bs-mes-feriado { background: #f1f5f9; }
.dark .bs-mes-livre { background: #052e16; } .dark .bs-mes-cheio { background: #3a2a05; } .dark .bs-mes-lotado { background: #3b0d0d; } .dark .bs-mes-feriado { background: #1e293b; }

/* Q06 — confirmação do prontuário */
.bs-confirma { max-width: 28rem; display: grid; gap: .75rem; }
.bs-erro { color: #b91c1c; font-size: .875rem; }

/* R28 */
.bs-cronometro { font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 600; min-width: 6rem; }
/* R37 — gráficos de evolução */
.bs-graficos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.bs-grafico { color: #334155; --bs-serie: #2563eb; }
.dark .bs-grafico { color: #cbd5e1; --bs-serie: #60a5fa; }
.bs-grafico svg { width: 100%; height: auto; }
.bs-fotos { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.bs-fotos img { width: 96px; height: 128px; object-fit: cover; border-radius: .375rem; border: 1px solid #e2e8f0; }

/* T85 — abas por área */
.bs-abas { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid #e2e8f0; margin-bottom: .75rem; }
.bs-abas button { padding: .4rem .8rem; font-size: .875rem; color: #475569; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bs-abas button.ativo { color: #1d4ed8; border-bottom-color: #1d4ed8; font-weight: 600; }
.dark .bs-abas { border-color: #334155; }
.dark .bs-abas button { color: #cbd5e1; }
.dark .bs-abas button.ativo { color: #93c5fd; border-bottom-color: #93c5fd; }
/* onda 4a — barra de ocupação, matriz de permissões, sessões */
.bs-barra { display: inline-block; width: 70%; height: .55rem; background: #e2e8f0; border-radius: 999px; overflow: hidden; vertical-align: middle; }
.bs-barra > span { display: block; height: 100%; border-radius: 999px; }
.dark .bs-barra { background: #334155; }
.bs-matriz td, .bs-matriz th { text-align: center; }
.bs-matriz td:first-child, .bs-matriz th:first-child { text-align: left; }
.bs-sessao { display: flex; gap: .75rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #e2e8f0; }
.dark .bs-sessao { border-color: #334155; }
/* S23 — fotos de evolução lado a lado */
.bs-comparar img { width: 100%; max-width: 260px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: .375rem; border: 1px solid #e2e8f0; }
.dark .bs-comparar img { border-color: rgb(255 255 255 / .1); }

/* Onda 4e — psicologia: temas, linha do tempo e registros conjuntos */
.bs-psi-sessao { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .3rem; }
.bs-psi-tema { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: .75rem; }
.dark .bs-psi-tema { background: #1e1b4b; color: #c7d2fe; }
button.bs-psi-tema { border: 0; cursor: pointer; }
button.bs-psi-tema.ativo { background: #3730a3; color: #fff; }
.bs-psi-tempo { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid #e2e8f0; }
.dark .bs-psi-tempo { border-color: #334155; }
.bs-psi-tempo li { position: relative; padding: 0 0 .9rem .5rem; }
.bs-psi-tempo li::before { content: ''; position: absolute; left: -1.4rem; top: .35rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--bs-serie, #2563eb); }
.bs-psi-tempo li.bs-psi-conjunto::before { background: #7c3aed; }
.bs-psi-tempo li.bs-psi-pausa::before { background: #d97706; }
/* 4h — audiometrias comparadas lado a lado */
.bs-audio-comparacao { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.bs-audio-comparacao svg { max-width: 100%; height: auto; }
/* A18 — recado fixado no mural */
.bs-recado-fixo { background: rgb(254 243 199 / .45); border-radius: .375rem; padding-left: .5rem; padding-right: .5rem; }
.dark .bs-recado-fixo { background: rgb(146 64 14 / .18); }
/* E20 — comparação de fotos clínicas em duas colunas iguais */
.bs-comparar-lado td, .bs-comparar-lado th { width: 50%; vertical-align: top; }
.bs-comparar-lado img { max-width: 100%; aspect-ratio: auto; max-height: 70vh; object-fit: contain; }

/* R10 — marcação postural */
.bs-postura { display: grid; grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 768px) { .bs-postura { grid-template-columns: 1fr; } }
.bs-postura-foto { position: relative; line-height: 0; }
.bs-postura-foto img { width: 100%; height: auto; border-radius: 6px; }
.bs-postura-foto svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs-postura-editavel { cursor: crosshair; }
.bs-postura-ponto { fill: #ef4444; stroke: #fff; stroke-width: 1; }
.bs-postura-atual { fill: #f59e0b; }
.bs-postura-reta { stroke: #22d3ee; fill: none; }
.bs-postura-rotulo { fill: #fff; paint-order: stroke; stroke: rgb(15 23 42 / .8); stroke-width: 3px; }
.bs-postura-painel select.bs-input { max-width: 100%; }
.bs-postura-medidas { margin-top: .8rem; }
.bs-postura-medidas td { padding: .15rem .6rem .15rem 0; vertical-align: top; }
/* R78 — linha de prumo e grade sobre a foto postural */
.bs-postura-grade { stroke: rgb(255 255 255 / .45); }
.bs-postura-prumo { stroke: #facc15; }
.bs-postura-guias { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; padding-bottom: .6rem; border-bottom: 1px solid rgb(148 163 184 / .3); }

/* P19/P64 — onda 5e medicina */
.bs-ok { color: #047857; }
.dark .bs-ok { color: #34d399; }
/* T74 — cronômetro e metrônomo da sessão de fonoaudiologia */
.bs-ferramentas { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; }
.bs-ferramenta { border: 1px solid rgb(226 232 240); border-radius: 8px; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .4rem; }
.dark .bs-ferramenta { border-color: rgb(255 255 255 / .1); }
.bs-relogio { font-size: 1.75rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.bs-botao { border: 1px solid rgb(203 213 225); border-radius: 8px; padding: .3rem .7rem; font-size: .875rem; background: #fff; cursor: pointer; }
.dark .bs-botao { background: rgb(31 41 55); border-color: rgb(255 255 255 / .15); color: #e2e8f0; }
.bs-botao[aria-pressed="true"] { background: #2563eb; color: #fff; border-color: #2563eb; }
.bs-metro-luz { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: rgb(203 213 225); vertical-align: middle; transition: background .05s; }
.bs-metro-luz.bs-ativo { background: #16a34a; }
.bs-metro-luz.bs-acento { background: #dc2626; }
.bs-relogio.bs-fim { color: #dc2626; }

/* Suporte — faixa da personificação */
.bs-personificacao { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; padding: .5rem 1rem; background: #b45309; color: #fff; font-size: .875rem; }
.bs-personificacao form { margin: 0; }
.bs-personificacao button { background: #fff; color: #b45309; border: 0; border-radius: .375rem; padding: .25rem .75rem; font-weight: 600; cursor: pointer; }
/* onda 6a — A22 atalhos de teclado */
.bs-atalhos-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bs-atalhos-caixa { background: #fff; color: #1e293b; border-radius: 10px; padding: 1rem 1.25rem; width: 100%; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.bs-atalhos-caixa .bs-tabela { margin: .5rem 0; }
.bs-tecla { display: inline-block; min-width: 1.6rem; text-align: center; font-family: ui-monospace, monospace; font-size: .8rem; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 4px; padding: .05rem .35rem; background: #f8fafc; }
.dark .bs-atalhos-caixa { background: #1e293b; color: #e2e8f0; }
.dark .bs-tecla { background: #0f172a; border-color: #475569; }
/* onda 6a — M06 mapa de calor das salas */
.bs-calor td.bs-calor-c { text-align: center; font-variant-numeric: tabular-nums; }

/* 6c — erros do lote TISS por guia */
.bs-erros-tiss{margin:0;padding-left:1.1rem;list-style:disc;font-size:.875rem;line-height:1.5}
.bs-erros-tiss ul{padding-left:1.1rem;list-style:circle;margin:.15rem 0 .5rem}

/* 6f — psicologia: duas colunas, conceituação cognitiva (Q72), termos (Q07) e editor de genograma (Q69) */
.bs-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.bs-cc { display: flex; flex-direction: column; align-items: stretch; gap: .25rem; max-width: 900px; }
.bs-cc-caixa { border: 1px solid #cbd5e1; border-radius: .5rem; padding: .45rem .65rem; font-size: .85rem; background: #fff; white-space: pre-wrap; }
.bs-cc-caixa span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: .1rem; }
.bs-cc-forte { border-color: #2F66BE; background: #eef4fd; }
.bs-cc-seta { text-align: center; color: #94a3b8; line-height: 1; }
.bs-cc-situacoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.bs-cc-coluna { display: flex; flex-direction: column; gap: .3rem; }
.dark .bs-cc-caixa { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .15); }
.dark .bs-cc-forte { background: rgb(47 102 190 / .2); }
.bs-termo { white-space: pre-wrap; font-family: inherit; font-size: .82rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .4rem; padding: .6rem .75rem; margin: .4rem 0; }
.dark .bs-termo { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .1); }
.bs-geno-barra { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.bs-geno-grupo { display: inline-flex; gap: .3rem; align-items: center; }
.bs-geno-btn { border: 1px solid #cbd5e1; border-radius: .4rem; padding: .3rem .6rem; font-size: .8rem; background: #fff; color: #1e293b; }
.bs-geno-btn.ativo { background: #2F66BE; border-color: #2F66BE; color: #fff; }
.bs-geno-salvar { background: #1aa39c; border-color: #1aa39c; color: #fff; }
.bs-geno-pendente { box-shadow: 0 0 0 3px rgb(26 163 156 / .35); }
.bs-geno-sel { width: auto; padding: .2rem .4rem; font-size: .8rem; }
.bs-geno-area { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: .75rem; }
.bs-geno-svg { width: 100%; height: auto; border: 1px solid #e2e8f0; border-radius: .5rem; background: #fff; touch-action: none; user-select: none; }
.bs-geno-painel { font-size: .85rem; }
.bs-geno-campo { display: block; margin-bottom: .45rem; }
.bs-geno-campo span { display: block; font-size: .72rem; color: #64748b; }
@media (max-width: 800px) { .bs-geno-area { grid-template-columns: 1fr; } }

/* onda 7c — conversas (mensagens do portal J12 e caixa do WhatsApp I10) */
.bs-conversa { display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.bs-bolha { max-width: 85%; align-self: flex-start; background: rgb(248 250 252); border: 1px solid rgb(226 232 240); border-radius: 10px; padding: .5rem .75rem; font-size: .875rem; overflow-wrap: anywhere; }
.bs-bolha-minha { align-self: flex-end; background: #eef4fc; border-color: #c7d9f3; }
.bs-bolha-auto { opacity: .8; font-style: italic; }
.dark .bs-bolha { background: rgb(31 41 55); border-color: rgb(255 255 255 / .1); } .dark .bs-bolha-minha { background: #0f1f3a; border-color: #1e3a6e; }
.bs-selo { display: inline-block; min-width: 1.25rem; padding: 0 .4rem; border-radius: 9999px; background: #2F66BE; color: #fff; font-size: .75rem; text-align: center; margin-left: .35rem; }
/* onda 7d — P77/P78 figura do corpo e lesões de pele */
.bs-figura-par { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 560px; }
.bs-figura-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }
.bs-corpo { width: 100%; height: auto; display: block; background: rgb(248 250 252); border: 1px solid rgb(226 232 240); border-radius: .5rem; }
.dark .bs-corpo { background: rgb(17 24 39); border-color: rgb(255 255 255 / .1); }
.bs-figura-posicionando .bs-corpo { outline: 2px dashed #b45309; outline-offset: 2px; }
.bs-lesao-miniatura { width: 64px; height: 64px; object-fit: cover; border-radius: .375rem; border: 1px solid #e2e8f0; }
/* onda 7d — P68/P69 agenda prevista */
.bs-agenda-prevista { display: flex; flex-wrap: wrap; gap: .35rem; }
.bs-agenda-prevista span { border: 1px solid rgb(203 213 225); border-radius: .375rem; padding: .15rem .45rem; font-size: .78rem; }
.bs-agenda-prevista .bs-feita { background: rgb(220 252 231); border-color: rgb(134 239 172); }
.bs-agenda-prevista .bs-atrasada { background: rgb(254 226 226); border-color: rgb(252 165 165); }
.bs-agenda-prevista .bs-agora { background: rgb(254 243 199); border-color: rgb(252 211 77); }
.dark .bs-agenda-prevista .bs-feita, .dark .bs-agenda-prevista .bs-atrasada, .dark .bs-agenda-prevista .bs-agora { background: transparent; }
/* onda 8b — E11 ditado por voz */
.bs-ditado { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; flex-wrap: wrap; }
.bs-ditado-botao { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; padding: .2rem .55rem; border: 1px solid rgb(203 213 225); border-radius: .375rem; background: transparent; color: inherit; cursor: pointer; }
.bs-ditado-botao:hover { border-color: #2F66BE; color: #2F66BE; }
.bs-ditado-botao.bs-ditado-ativo { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.bs-ditado-previa { font-size: .78rem; color: rgb(100 116 139); font-style: italic; }
.dark .bs-ditado-botao { border-color: rgb(255 255 255 / .2); }
/* onda 8e — medidor de voz (T75) e comparação lado a lado (T64) */
.bs-medidor { font-size: 2.2rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.bs-medidor-barra { height: .8rem; background: #e2e8f0; border-radius: .4rem; overflow: hidden; max-width: 28rem; }
.bs-medidor-barra div { height: 100%; width: 0; background: #1aa39c; transition: width .08s; }
.bs-lado { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
