:root {
  --fundo: #f5f6f8; --cartao: #fff; --texto: #1d2433; --suave: #6b7385; --linha: #e3e6ec;
  --cor: #1f6f5c; --menu: #14322b; --alerta: #b4442f; --alerta-clara: #fbe9e5; --ok: #2f7d32;
  --cor-clara: color-mix(in srgb, var(--cor) 13%, white);
  --menu-hover: color-mix(in srgb, var(--menu) 82%, white);
  --menu-ativo: color-mix(in srgb, var(--menu) 65%, var(--cor));
  --fonte-titulo: inherit;
}
@font-face { font-family: "Playfair Display"; src: url(/fontes/PlayfairDisplay.ttf); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(/fontes/Montserrat.ttf); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(/fontes/Figtree.ttf); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/fontes/EBGaramond-700.woff2); font-weight: 700; font-display: swap; }
h1, h2, .marca, .topo div { font-family: var(--fonte-titulo); }
body.fonte-elegante { --fonte-titulo: "Playfair Display", Georgia, serif; }
body.fonte-classica { --fonte-titulo: "EB Garamond", Garamond, Georgia, serif; }
body.fonte-moderna { --fonte-titulo: "Montserrat", "Segoe UI", sans-serif; }
body.fonte-leve { --fonte-titulo: "Figtree", "Segoe UI", sans-serif; }
body.texto-figtree { font-family: "Figtree", system-ui, sans-serif; }
body.texto-montserrat { font-family: "Montserrat", system-ui, sans-serif; }
body.texto-figtree input, body.texto-figtree button, body.texto-figtree select, body.texto-figtree textarea { font-family: "Figtree", system-ui, sans-serif; }
body.texto-montserrat input, body.texto-montserrat button, body.texto-montserrat select, body.texto-montserrat textarea { font-family: "Montserrat", system-ui, sans-serif; }
.marca img { max-height: 40px; max-width: 160px; display: block; margin-bottom: 6px; }
/* Topo com ícone ao lado do nome; iniciais em cursiva */
.com-icone { display: flex !important; align-items: center; gap: 10px; }
body .com-icone img.icone-marca { width: 42px; height: 42px; max-height: none; max-width: none; margin: 0; flex: none; object-fit: contain; }
.nome-marca { display: block; min-width: 0; }
.cursiva { font-style: italic; font-weight: 700; letter-spacing: .02em; margin-right: .06em; }
/* Logo grande na tela de entrada do paciente */
.logo-entrada { text-align: center; margin: 4px 0 18px; }
.logo-entrada img { width: 100%; max-width: 340px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto); background: var(--fundo); display: flex; min-height: 100vh; }
.menu { width: 220px; background: var(--menu); color: rgba(255,255,255,.85); padding: 20px 14px; flex-shrink: 0; }
.marca { display: block; font-size: 20px; font-weight: 700; color: #fff; margin: 0 8px 22px; text-decoration: none; cursor: pointer; }
.menu { position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20; }
.topo { position: sticky; top: 0; z-index: 20; cursor: pointer; }
.marca small { display: block; font: 400 12px system-ui, sans-serif; color: rgba(255,255,255,.6); margin-top: 2px; }
.menu nav { display: flex; flex-direction: column; gap: 2px; }
.menu a { color: rgba(255,255,255,.85); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.menu a:hover { background: var(--menu-hover); }
.menu a.ativo { background: var(--menu-ativo); color: #fff; }
.em-breve { margin: 18px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); }
.desligado { padding: 6px 10px; color: rgba(255,255,255,.45); font-size: 14px; }
.videos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.video-cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; }
.video-cartao .midia { aspect-ratio: 16 / 9; background: #000; }
.video-cartao .midia.vertical { aspect-ratio: 9 / 16; max-height: 520px; margin: 0 auto; }
.video-cartao iframe, .video-cartao video { width: 100%; height: 100%; border: 0; display: block; }
.video-cartao .info { padding: 12px 14px; }
.video-cartao h3 { margin: 0 0 4px; }
.video-cartao a.externo { display: flex; align-items: center; justify-content: center; height: 100%; color: #fff; text-decoration: none; background: var(--cor); font-weight: 600; }
.fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fotos-grade img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; cursor: zoom-in; background: #e9ecef; }
.foto-adm { display: flex; flex-direction: column; gap: 6px; }
.foto-adm img { cursor: default; }
.info-cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.info-cartao img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.info-cartao .corpo { padding: 14px 16px; }
.info-cartao h3 { margin: 0 0 6px; font-family: var(--fonte-titulo); font-size: 18px; }
.info-cartao .texto { white-space: pre-line; }
.ampliada { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; padding: 16px; cursor: zoom-out; }
.ampliada img { max-width: 100%; max-height: 85vh; border-radius: 8px; }
.ampliada p { color: #fff; margin: 10px 0 0; }
.abas-portal { display: flex; gap: 6px; margin: 4px 0 18px; flex-wrap: wrap; position: sticky; top: var(--alto-topo, 0px); z-index: 19; background: var(--fundo); padding: 8px 0; }
.abas-portal button { flex: 1 0 auto; padding: 8px 10px; font-size: 14px; background: #fff; color: var(--cor); border: 1px solid var(--cor); }
.abas-portal button.ativo { background: var(--cor); color: #fff; }
.selfie { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--cor-clara); display: flex; align-items: center; justify-content: center; font-size: 34px; flex-shrink: 0; }
.selfie img { width: 100%; height: 100%; object-fit: cover; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--cor-clara); color: var(--cor); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.avatar.grande { width: 84px; height: 84px; font-size: 28px; }
.temas { display: flex; gap: 10px; flex-wrap: wrap; }
.tema { width: 64px; height: 44px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; padding: 0; overflow: hidden; display: flex; }
.tema span { flex: 1; }
.tema.ativo { border-color: var(--texto); }
.previa { display: flex; border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; height: 170px; }
.previa .pm { width: 120px; padding: 12px; color: #fff; font-weight: 700; }
.previa .pc { flex: 1; padding: 14px; background: var(--fundo); }
main { flex: 1; padding: 28px 32px; max-width: 1100px; }
h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.linha { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.entre { justify-content: space-between; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--suave); }
input, select, textarea { font: inherit; color: var(--texto); padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cor-clara); border-color: var(--cor); }
.largo { grid-column: 1 / -1; }
button, .botao { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--cor); color: #fff; text-decoration: none; display: inline-block; }
button.sec, .botao.sec { background: #fff; color: var(--cor); border: 1px solid var(--cor); }
button.perigo { background: #fff; color: var(--alerta); border: 1px solid #e3b4aa; }
button.mini { padding: 3px 9px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--linha); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); font-weight: 600; }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: #f8faf9; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.numero { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 14px 16px; }
.numero b { display: block; font-size: 26px; }
.numero span { color: var(--suave); font-size: 13px; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.abas a { white-space: nowrap; flex-shrink: 0; padding: 9px 14px; text-decoration: none; color: var(--suave); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.abas a.ativo { color: var(--cor); border-color: var(--cor); font-weight: 600; }
.etiqueta { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--cor-clara); color: var(--cor); }
.etiqueta.alerta { background: var(--alerta-clara); color: var(--alerta); }
.etiqueta.ok { background: #e6f3e6; color: var(--ok); }
.suave { color: var(--suave); }
.vazio { color: var(--suave); padding: 10px 0; }
.aviso { position: fixed; right: 20px; bottom: 20px; background: #1d2433; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.aviso.erro { background: var(--alerta); }
.secao-modelo { border: 1px dashed #cfd4dc; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.pergunta-modelo { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; margin: 8px 0; align-items: start; }
.pergunta-modelo input.opcoes { grid-column: 1 / 3; }
.opcoes-resp { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--texto); }
.opcoes-resp label { flex-direction: row; align-items: center; gap: 6px; color: var(--texto); font-size: 14px; }
.resposta { margin: 6px 0 10px; }
.resposta .p { color: var(--suave); font-size: 13px; }
svg.grafico { width: 100%; height: 220px; }
.etapa { display: flex; gap: 8px; align-items: end; margin-bottom: 6px; }
.etapa label { width: 130px; }
body.sem-login .menu { display: none; }
body.sem-login main { display: flex; justify-content: center; align-items: center; max-width: none; }
.login { width: 100%; max-width: 360px; }
.erro-login { color: var(--alerta); min-height: 1.2em; margin: 8px 0 0; }
/* Modo escuro (ex.: preto e dourado) */
body.escuro {
  --fundo: #0c0b09; --cartao: #16140f; --texto: #ede4d0; --suave: #a39a84; --linha: #2c281f;
  --cor-clara: color-mix(in srgb, var(--cor) 20%, #16140f);
  --alerta-clara: #3a1c16; --alerta: #f0a08c; color-scheme: dark;
}
body.escuro input, body.escuro select, body.escuro textarea { background: #1d1a14; border-color: #3a3427; color: var(--texto); }
body.escuro button.sec, body.escuro .botao.sec, body.escuro button.perigo, body.escuro .abas-portal button:not(.ativo) { background: transparent; }
body.escuro button, body.escuro .botao { color: #0c0b09; }
body.escuro button.sec, body.escuro .botao.sec, body.escuro .abas-portal button:not(.ativo) { color: var(--cor); }
body.escuro button.perigo { color: var(--alerta); border-color: #5a2f25; }
body.escuro tr.clicavel:hover td { background: #1d1a14; }
body.escuro .etiqueta.ok { background: #1c2a1c; color: #9fd59f; }
body.escuro a { color: var(--cor); }
body.escuro .menu a { color: rgba(255,255,255,.85); }
body.escuro .aviso { background: #ede4d0; color: #0c0b09; }
body.escuro h1, body.escuro h2, body.escuro h3 { color: color-mix(in srgb, var(--cor) 55%, #ede4d0); }
.anexo { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
/* evolução */
.fotos-registro { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.fotos-registro img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; cursor: zoom-in; display: block; }
.miniatura { position: relative; }
.miniatura button { position: absolute; top: 4px; right: 4px; padding: 2px 7px; }
.miniatura.nova img { outline: 2px dashed var(--cor); outline-offset: -2px; }
.antes-depois { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.antes-depois figure { margin: 0; }
.antes-depois img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; cursor: zoom-in; display: block; }
.antes-depois figcaption { font-size: 13px; margin-top: 6px; }
.linha-tempo .registro { border-left: 3px solid var(--cor); padding-left: 12px; margin-bottom: 18px; }
.rolar { overflow-x: auto; }
select.mini { padding: 4px 6px; font-size: 13px; }
/* financeiro simples */
.cobranca { padding: 12px 0; border-bottom: 1px solid var(--linha); }
.cobranca:last-child { border-bottom: 0; }
.tres-valores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.tres-valores > div { background: color-mix(in srgb, var(--cor) 7%, transparent); border-radius: 8px; padding: 6px 8px; }
.tres-valores span { display: block; font-size: 12px; color: var(--suave); }
.tres-valores .falta b { color: #e06c5a; }
.form-simples { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.form-simples input, .form-simples select { width: 100%; }
.falta-linha { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--cor) 10%, transparent); }
.falta-calc { font-size: 18px; }
.etapa-form { border-bottom: 1px solid var(--linha); padding-bottom: 8px; margin-bottom: 8px; }
.etapa-form .nota-input { width: 100%; margin-top: 4px; font-size: 13px; }
/* plano de doses do paciente */
.etapa-plano { border-left: 3px solid var(--linha); padding: 4px 0 4px 12px; margin: 12px 0; }
.etapa-plano.atual { border-color: var(--cor); }
.nota-etapa { background: color-mix(in srgb, var(--cor) 10%, transparent); border-radius: 8px; padding: 8px 10px; margin: 6px 0; white-space: pre-line; font-size: 14px; }
.semana { display: grid; grid-template-columns: 100px 1fr 60px auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; border-bottom: 1px solid var(--linha); }
.semana.proxima { font-weight: 600; }
.form-paciente button { width: 100%; padding: 11px; margin-top: 4px; }
@media (max-width: 480px) { .semana { grid-template-columns: 92px 1fr 50px; } .semana > :last-child { grid-column: 1 / -1; justify-self: start; } }
/* Aplicação semana a semana (médico e paciente) */
.semana-p.proxima .semana { font-weight: 600; }
.form-paciente .semana button { width: auto; padding: 4px 12px; margin: 0; }
.semana-med { border-bottom: 1px solid var(--linha); padding: 9px 0; }
.semana-med.proxima { border-left: 3px solid var(--cor); padding-left: 10px; }
.form-semana { background: color-mix(in srgb, var(--cor) 7%, transparent); border: 1px solid var(--linha); border-radius: 10px; padding: 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.form-semana .grade { margin: 0; }
.limite-paciente { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--cor); border-radius: 10px; font-size: 14px; color: var(--cor); }
.caixa-foto { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 110px; border: 2px dashed color-mix(in srgb, var(--cor) 55%, transparent); border-radius: 10px; background: transparent; color: var(--texto); font-size: 15px; padding: 6px; cursor: pointer; }
.form-paciente .caixa-foto { padding: 6px; margin: 0; }
.caixa-foto:hover { border-color: var(--cor); color: var(--texto); }
.caixa-foto img { max-height: 220px; max-width: 100%; border-radius: 8px; display: block; }
.mini-foto { width: 54px; height: 72px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.item-estoque { padding: 8px 0; border-bottom: 1px solid var(--linha); }
.item-estoque:last-child { border-bottom: 0; }
details.cartao summary { cursor: pointer; }
.devedor { padding: 12px 0; border-bottom: 1px solid var(--linha); }
.devedor:last-child { border-bottom: 0; }
.previa-msg { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.45; background: color-mix(in srgb, var(--cor) 10%, transparent); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; }
a.numero:hover { outline: 1px solid var(--cor); }
/* Tablet: o conteúdo nunca passa da tela; menu lateral mais estreito */
main { min-width: 0; }
main .linha.entre { flex-wrap: wrap; gap: 8px; }
.abas { flex-wrap: wrap; }
@media (min-width: 761px) and (max-width: 1100px) {
  .menu { width: 176px; padding: 16px 10px; }
  .menu a { padding: 9px 10px; }
  main { padding: 22px 20px; }
}
@media (max-width: 760px) {
  body { flex-direction: column; }
  .menu { width: auto; padding: 12px 10px 8px; height: auto; overflow: visible; }
  .marca { margin: 0 6px 8px; font-size: 17px; }
  .menu nav { flex-direction: row; overflow-x: auto; white-space: nowrap; gap: 4px; scrollbar-width: none; }
  .menu nav .em-breve, .menu nav .desligado { display: none; }
  table.cobrancas thead { display: none; }
  table.cobrancas tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
  table.cobrancas td { border: 0; padding: 0; }
  table.cobrancas td:last-child { grid-column: 1 / -1; margin-top: 6px; }
  main { padding: 18px; }
}

/* WhatsApp com código do país */
.tel-linha { display: flex; gap: 6px; }
.tel-linha select { flex: 0 0 auto; max-width: 48%; }
.tel-linha input { flex: 1 1 auto; min-width: 0; }

.campo-tel { min-width: 0; }
.tel-linha select { width: 12em; }


/* Seringa e calculadora */
.seringa { display: block; width: 100%; max-width: 680px; margin: 6px auto; color: var(--texto); }
.seringa-liquido { fill: var(--cor); opacity: .9; }
.seringa-embolo { fill: var(--texto); }
.seringa-seta, .seringa-pare { fill: var(--cor); }
.seringa-guia { stroke: var(--cor); stroke-width: 3; stroke-dasharray: 6 5; }
.seringa-dose .seringa { cursor: zoom-in; }
/* Seringa de perto (tela cheia) */
.seringa-zoom { position: fixed; inset: 0; z-index: 1000; background: var(--fundo, #0e0c09); overflow: auto; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
.seringa-zoom h3 { margin: 0; }
.seringa-zoom .seringa { max-width: 1100px; }
.seringa-zoom .legenda { color: var(--suave); font-size: 16px; margin: 0; }
.seringa-zoom .fechar-zoom { align-self: center; }
.calc-grupos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .calc-grupos { grid-template-columns: 1fr; } }
.calc-grupos h3 { text-align: center; margin: 0 0 10px; }
.pilulas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
body .pilulas button { background: transparent; color: var(--texto); border: 1px solid color-mix(in srgb, var(--suave) 55%, transparent); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
body .pilulas button.ativo { background: var(--cor); color: var(--cartao); border-color: var(--cor); }
.calc-grupos input { width: 100%; border-radius: 999px; }
.calc-resultado { text-align: center; }
.calc-resultado p { margin: 4px 0; letter-spacing: .02em; }
.calc-resultado .grande { font-size: 18px; }
.seringa-dose { text-align: center; }
.seringa-dose .legenda { color: var(--suave); font-size: 14px; margin: 4px 0 0; }
.cartao-dose { border: 1px solid var(--cor); border-radius: 12px; padding: 12px; margin: 10px 0 14px; }
.cartao-interno { border: 1px solid var(--linha); border-radius: 12px; padding: 12px; margin: 10px 0; }


/* Exames laboratoriais */
.destaque-exame { padding: 8px 0; border-bottom: 1px solid var(--linha); }
.destaque-exame:last-child { border-bottom: 0; }
.linha-exame-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--linha); flex-wrap: wrap; }
.linha-exame-item:last-child { border-bottom: 0; }
.info-exame { flex: 1 1 260px; min-width: 0; }
.valor-exame { margin: 2px 0; }
.valor-exame .num-ok, .valor-exame .num-fora { font-size: 20px; font-weight: 700; }
.valor-exame .num-fora { color: var(--alerta); }
.mini-exame { width: 180px; height: 48px; flex: 0 0 auto; }
.mini-exame .faixa-normal { fill: var(--ok); opacity: .12; }
.mini-exame .linha-exame { stroke: var(--cor); }
.mini-exame .ponto-ok { fill: var(--cor); }
.mini-exame .ponto-fora { fill: var(--alerta); }
.grupo-exame { border: 1px solid var(--linha); border-radius: 10px; margin: 0 0 12px; padding: 8px 12px 4px; }
.grupo-exame legend { padding: 0 6px; font-weight: 700; }
.grupo-exame small { font-size: 12px; }
.extra-exame { border-bottom: 1px solid var(--linha); padding-bottom: 8px; margin-bottom: 8px; }
/* fotos de exame e leitura pela IA */
.fotos-exame { display: flex; flex-wrap: wrap; gap: 12px; }
.foto-exame-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; border: 1px solid var(--linha); border-radius: 10px; }
.foto-exame-item .mini-foto, .foto-exame-item .mini-pdf { width: 96px; height: 128px; }
.mini-pdf { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--linha); border-radius: 6px; text-decoration: none; width: 54px; height: 72px; }
.revisao-exame { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.revisao-exame > .cartao { margin: 0 0 16px; }
.fotos-revisao { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.fotos-revisao img { width: 100%; border-radius: 8px; margin-bottom: 10px; cursor: zoom-in; display: block; }
.pdf-revisao { width: 100%; height: 70vh; border: 1px solid var(--linha); border-radius: 8px; }
@media (max-width: 860px) { .revisao-exame { grid-template-columns: 1fr; } .fotos-revisao { position: static; max-height: none; } }
.painel-entrega { margin-top: 10px; padding: 10px; border: 1px solid var(--linha); border-radius: 10px; background: rgba(191, 154, 79, .06); }
.painel-entrega textarea { font-family: inherit; font-size: 14px; }
.compra-paciente { padding: 10px 0; border-bottom: 1px solid var(--linha); }
.compra-paciente:last-child { border-bottom: 0; }
.revisao-exame.sem-fotos { grid-template-columns: minmax(0, 1fr); }
.revisao-exame.sem-fotos .fotos-revisao { position: static; max-height: none; }
.foto-revisao-item { margin-bottom: 12px; }
.foto-revisao-item img { margin-bottom: 4px; }
body input.ia { background: #fff7d6; border-color: #e0b84a; color: #1d1d1d; }
body.escuro input.ia { background: #3d3112; border-color: #e0b84a; color: #fff; }
.aviso-ia { background: rgba(224, 184, 74, .12); border: 1px solid rgba(224, 184, 74, .55); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.consulta-exame { border: 1px solid var(--linha); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.consulta-exame summary { cursor: pointer; padding: 4px 0; }
.comentario-consulta { background: rgba(191, 154, 79, .1); border-left: 3px solid var(--cor); border-radius: 6px; padding: 8px 10px; margin: 8px 0; }
.linha-consulta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linha); }
.linha-consulta:last-child { border-bottom: 0; }
.nome-consulta { flex: 1 1 160px; }
.minhas-fotos-exame { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.minhas-fotos-exame > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 12px; }

/* Janelinha de confirmação */
.confirma-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.confirma-caixa { background: #fff; color: #222; border-radius: 12px; padding: 20px; max-width: 420px; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.confirma-caixa p { margin: 0 0 16px; font-size: 16px; line-height: 1.4; }
.confirma-botoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
body.escuro .confirma-caixa { background: #1f2329; color: #eee; }
