/* Visual Arcada Gestão (antes: visual da Oral Vitalli): superfícies de porcelana, menu lateral escuro e movimento curto.
   Carrega depois de clinica.css. As folhas impressas mantêm cores e fonte próprias. */
:root {
  --navy: #0E3B43;
  --navy-light: #17505A;
  --accent: #0F7F7C;
  --accent-soft: #E3F4F3;
  --accent-line: #ADE0DD;
  --bg: #F7F4EE;
  --line: #E6E0D6;
  --border: #E6E0D6;
  --muted: #4F6266;
  --text: #10262B;
  --latao: #E8735A;
  --radius: 18px;
  --shadow: 0 0 0 1px rgba(14,59,67,0.05), 0 1px 2px rgba(14,59,67,0.04), 0 14px 34px -18px rgba(14,59,67,0.16);
  --shadow-hover: 0 0 0 1px rgba(15,127,124,0.22), 0 18px 36px -18px rgba(14,59,67,0.24);
  --corpo: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --titulo: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --suave: cubic-bezier(.2, .8, .2, 1);
}
* { font-family: var(--corpo); }
.folha, .folha *, #fichaImpressao, #fichaImpressao * { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; }
.folha, #fichaImpressao {
  --navy: #0f2537; --navy-light: #1b3a54; --accent: #0891b2; --accent-soft: #ecfeff;
  --line: #e6ebf2; --muted: #64748b; --text: #1e293b;
}
body { background: var(--bg); }
::selection { background: var(--accent-line); }
* { scrollbar-width: thin; scrollbar-color: #CFC6B8 transparent; }

/* ---------- Menu lateral ---------- */
.topo {
  position: fixed; inset: 0 auto 0 0; width: 236px; z-index: 50;
  background: var(--navy); border: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  background-image: linear-gradient(180deg, rgba(255,255,255,.045), transparent 34%);
  view-transition-name: topo;
}
.topo-linha { max-width: none; height: 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 22px 14px 16px; overflow-y: auto; }
.topo-marca { padding: 0 8px 22px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.topo-marca img { height: 44px; width: 44px; border-radius: 13px; box-shadow: none; }
.topo-marca h1 { font-family: var(--titulo); font-size: 1.42rem; font-weight: 600; letter-spacing: .2px; color: #fff; line-height: 1; }
.topo-marca span { display: block; margin-top: 4px; font-size: .74rem; letter-spacing: 0; color: rgba(255,255,255,.58); }

.abas { position: relative; flex: 0 0 auto; flex-direction: column; justify-content: flex-start; gap: 3px; background: none; padding: 0; border-radius: 0; overflow: visible; }
.abas .aba-btn {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: 12px; font-size: .92rem; font-weight: 500; text-align: left;
  color: rgba(255,255,255,.66); transition: color .22s var(--suave), transform .16s var(--suave);
}
.abas .aba-btn:hover { color: #fff; background: rgba(255,255,255,.045); }
.abas .aba-btn:active { transform: scale(.975); }
.abas .aba-btn.ativa { color: #fff; font-weight: 600; background: none; box-shadow: none; }
.aba-btn svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aba-luz { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 12px; background: rgba(255,255,255,.1); pointer-events: none; transition: transform .38s var(--suave), width .38s var(--suave), height .38s var(--suave); }
.aba-luz::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2.5px; border-radius: 3px; background: var(--latao); }

.topo-dentista { margin-top: auto; padding: 12px 8px 0; }
.topo-dentista .rotulo { padding: 0 0 4px; font-size: .74rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.58); }
.dentist-select { width: 100%; background-color: rgba(255,255,255,.08); font-size: .82rem; font-weight: 500; text-overflow: ellipsis; transition: background-color .2s; }
.dentist-select:hover { background-color: rgba(255,255,255,.14); }
.dentist-select option { color: var(--text); background: #fff; }
.topo-conta { margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: none; color: rgba(255,255,255,.84); text-align: left; font-size: .88rem; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: background .2s, box-shadow .2s; }
.topo-conta:hover { background: rgba(255,255,255,.08); }
body:not([data-aba="receita"]):not([data-aba="atestado"]):not([data-aba="exames"]) .topo-conta { margin-top: auto; }
body.dentista-fixo .topo-conta { margin-top: auto; }

body { padding-left: 236px; }
.painel, .barra-paciente, .container, .aviso-offline { max-width: 1280px; padding-left: 32px; padding-right: 32px; }
.painel { margin-top: 28px; }
.barra-paciente { margin-top: 28px; }
.sticky-col { top: 24px; }
.container { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
@media (max-width: 1120px) {
  .container { grid-template-columns: minmax(0, 1fr); }
  .sticky-col { position: static; }
  .barra-paciente-card { grid-template-columns: 1fr 1fr; }
}

/* ---------- Superfícies ---------- */
.card, .barra-paciente-card, .agenda-rolagem, .tabela-caixa, .resumo-item { box-shadow: var(--shadow); }
.card { padding: 24px; }
.pedido { padding: 26px; }
.card-titulo, .pedido-topo .card-titulo { font-family: var(--titulo); font-size: 1.4rem; font-weight: 600; letter-spacing: 0; }
.painel-titulo { font-family: var(--titulo); font-size: 1.6rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.pedido-miolo h3 { font-size: .96rem; }
label { font-size: .78rem; font-weight: 500; letter-spacing: 0; }

input:not([type]), input[type="text"], input[type="date"], input[type="tel"], input[type="number"], input[type="time"],
input[type="password"], input[type="email"], input[type="search"], select, textarea {
  padding: 11px 13px; border-color: #E3DDD2; border-radius: 12px; background: #FBF9F5;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #c2d0cf; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,127,124,.13); }
button:focus-visible, a:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aba-btn:focus-visible, .topo-conta:focus-visible { outline-color: var(--latao); }

.botao, .botao-claro, .botao-perigo, .btn, .chip, .pedido-limpar, .doc-opcao, .exame-seta, .dente-chip, .ficha-cartao, .ficha-acoes button, .ficha-acoes a, .med-tag, .marca-dente {
  transition: transform .16s var(--suave), background .2s, color .2s, box-shadow .2s, border-color .2s, filter .2s;
}
.botao:active, .botao-claro:active, .botao-perigo:active, .btn:active, .chip:active, .doc-opcao:active, .dente-chip:active, .ficha-cartao:active, .ficha-acoes button:active, .med-tag:active { transform: scale(.97); }
.botao, .botao-claro, .botao-perigo { border-radius: 12px; padding: 10px 16px; font-size: .86rem; font-weight: 600; }
.botao { background: var(--accent); box-shadow: 0 8px 18px -10px rgba(15,127,124,.8); }
.botao:hover { filter: none; background: #0B6B68; box-shadow: 0 10px 22px -10px rgba(15,127,124,.9); }
.botao-claro { box-shadow: inset 0 0 0 1px #d8e2e1; }
.botao-claro:hover { background: #F8F5EF; box-shadow: inset 0 0 0 1px #CFC6B8; }
.botao-whats, .botao.botao-whats { background: #128c7e; box-shadow: none; }
.botao-whats:hover, .botao.botao-whats:hover { background: #0f7a6e; }
.pequeno { padding: 7px 11px; font-size: .78rem; }
.btn { border-radius: 13px; font-weight: 600; }
.btn-primary { box-shadow: 0 10px 22px -12px rgba(14,59,67,.7); }
.btn-secondary { background: var(--accent); box-shadow: 0 10px 22px -12px rgba(15,127,124,.8); }
.btn-secondary:hover { background: #0B6B68; }
.chip { border-color: #E3DDD2; color: var(--muted); }
.chip:hover { background: var(--accent-soft); }
#listaMedicamentos .med-item { background: #F8F5EF; border-radius: 13px; transition: background .2s, box-shadow .2s; }
#listaMedicamentos .med-item:hover { background: #F1ECE3; }
.exame-item, .doc-opcao, .pedido-opcao, .aviso-vias { background: #F8F5EF; }
.exame-item:hover, .doc-opcao:hover { background: #F1ECE3; }
.med-check, .exame-marca { transition: background .18s, border-color .18s, box-shadow .18s; }
.allergy-bar { font-weight: 600; }
.cat-header { font-weight: 600; }

/* ---------- Agenda ---------- */
#agendaBarra { gap: 10px; margin-bottom: 18px; }
.agenda-rolagem { background: #fff; }
.agenda-cab { padding: 12px 6px; background: #fff; font-size: .82rem; font-weight: 600; }
.agenda-cab.hoje { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.agenda-coluna { transition: background-color .2s; background-image: linear-gradient(to bottom, #ECE6DC 1px, transparent 1px), linear-gradient(to bottom, #F6F2EB 1px, transparent 1px); }
.agenda-coluna:hover { background-color: #FCFAF6; }
.agenda-agora { height: 1.5px; background: #d9503f; box-shadow: 0 0 8px rgba(217,80,63,.5); }
.bloco { border-radius: 9px; border-left-width: 3px; padding: 2px 8px; box-shadow: none; transition: transform .16s var(--suave), box-shadow .2s; }
.bloco:hover { filter: none; transform: translateX(1px); box-shadow: 0 6px 14px -6px rgba(14,59,67,.32); }
.bloco.st-agendada { background: #e6f3f6; border-color: var(--accent); color: #0a4d5a; }
.bloco.st-confirmada { background: #e3f4ec; border-color: #1f9d68; color: #0f5238; }
.legenda { font-size: .76rem; gap: 14px; }
.legenda i { border-radius: 50%; width: 9px; height: 9px; }

/* ---------- Tabelas ---------- */
.tabela th { background: #fff; font-size: .76rem; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 14px 18px 10px; }
.tabela td { padding: 13px 18px; border-color: #edf1f0; transition: background .16s; }
.tabela tr.clicavel:hover td { background: #f4f8f8; }
.etiqueta { font-weight: 600; padding: 3px 10px; }
.et-azul { background: var(--accent-soft); color: #0a6677; }
.ficha-avatar { background: var(--navy); color: #fff; font-family: var(--titulo); font-size: 1.3rem; font-weight: 600; }

/* ---------- Janelas ---------- */
.modal-fundo { background: rgba(7,34,39,.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fundo-entra .22s ease both; }
.modal { border-radius: 22px; padding: 28px; box-shadow: 0 40px 80px -30px rgba(7,34,39,.6); animation: janela-entra .32s var(--suave) both; }
.modal-fundo.sem-entrada, .modal-fundo.sem-entrada .modal { animation: none; }
.modal-fundo.saindo { pointer-events: none; animation: fundo-sai .17s ease both; }
.modal-fundo.saindo .modal { animation: janela-sai .17s ease both; }
.modal-cab h3, .ficha-nome h3 { font-family: var(--titulo); font-size: 1.55rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.modal-x { border-radius: 10px; transition: background .2s, color .2s; }
.modal-x:hover { background: #eef3f2; color: var(--navy); }
.ficha-abas button { transition: color .2s, border-color .2s; }
.ficha-cartao, .ficha-acoes button, .ficha-acoes a, .modal .anamnese-row { background: #f4f7f7; }
.total-plano { background: var(--navy); }
@keyframes fundo-entra { from { opacity: 0; } }
@keyframes fundo-sai { to { opacity: 0; } }
@keyframes janela-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes janela-sai { to { opacity: 0; transform: translateY(6px) scale(.992); } }

/* ---------- Login ---------- */
.login-fundo { background: var(--navy); isolation: isolate; overflow: hidden auto; }
.login-fundo::before, .login-fundo::after { content: ''; position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(70px); }
.login-fundo::before { width: 60vmax; height: 60vmax; left: -18vmax; top: -24vmax; background: rgba(15,127,124,.5); animation: aurora 16s ease-in-out infinite alternate; }
.login-fundo::after { width: 44vmax; height: 44vmax; right: -14vmax; bottom: -20vmax; background: rgba(232,115,90,.22); animation: aurora 20s ease-in-out infinite alternate-reverse; }
.login-caixa { max-width: 400px; padding: 36px 34px; border-radius: 26px; box-shadow: 0 50px 100px -40px rgba(0,0,0,.75); animation: janela-entra .6s var(--suave) both; }
.login-marca img { height: 76px; animation: logo-entra .8s var(--suave) both; }
.login-marca h2 { font-family: var(--titulo); font-size: 2rem; font-weight: 600; line-height: 1.1; margin-top: 8px; }
.login-marca p { font-size: .9rem; margin-top: 5px; }
.login-caixa .botao { padding: 13px; font-size: .92rem; }
@keyframes aurora { to { transform: translate(9vmax, 7vmax) scale(1.14); } }
@keyframes logo-entra { from { opacity: 0; transform: scale(.86); } }

/* ---------- Troca de aba ---------- */
::view-transition { pointer-events: none; }
::view-transition-old(root) { animation: tela-sai .12s ease both; }
::view-transition-new(root) { animation: tela-entra .28s var(--suave) both; }
::view-transition-old(topo) { display: none; }
::view-transition-new(topo) { animation: none; }
@keyframes tela-sai { to { opacity: 0; } }
@keyframes tela-entra { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Tablet e celular: menu vira barra inferior ---------- */
@media (max-width: 899px) {
  body { padding-left: 0; padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .topo { position: sticky; inset: 0 auto auto 0; width: auto; }
  .topo-linha { height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; overflow: visible; }
  .topo-marca { padding: 0; margin: 0; border: none; flex: 1 1 auto; min-width: 0; }
  .topo-marca img { height: 34px; width: 34px; border-radius: 10px; }
  .topo-marca h1 { font-size: 1.25rem; }
  .topo-marca span { display: none; }
  .topo-dentista { order: 2; flex: 1 1 100%; margin: 0; padding: 0; }
  .topo-dentista .rotulo { display: none; }
  .topo-conta, body:not([data-aba="receita"]):not([data-aba="atestado"]):not([data-aba="exames"]) .topo-conta, body.dentista-fixo .topo-conta { order: 1; margin: 0; padding: 8px 12px; font-size: .82rem; }

  .abas {
    position: fixed; inset: auto 0 0 0; z-index: 60; order: 0; flex-direction: row; flex-basis: auto; justify-content: stretch; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -1px 0 var(--line), 0 -12px 30px -22px rgba(14,59,67,.4);
  }
  .abas .aba-btn { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 2px 6px; font-size: .68rem; text-align: center; color: var(--muted); }
  .abas .aba-btn:hover { background: none; color: var(--muted); }
  .abas .aba-btn.ativa { color: var(--accent); }
  .aba-btn svg { width: 22px; height: 22px; }
  .aba-luz { top: 6px; left: 0; background: var(--accent-soft); }
  .aba-luz::before { display: none; }

  .painel, .barra-paciente, .container, .aviso-offline { padding-left: 14px; padding-right: 14px; }
  .painel, .barra-paciente { margin-top: 14px; }
  .card { padding: 18px; }
  .modal { border-radius: 0; padding: 18px 14px; }
  .modal-fundo { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .login-caixa { padding: 28px 22px; }
}
@media (max-width: 550px) {
  .barra-paciente-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .painel, .barra-paciente, .container, .aviso-offline { padding-left: 10px; padding-right: 10px; }
  #agendaBarra .painel-titulo { font-size: 1.2rem; }
}

/* ---------- Impressão e acessibilidade ---------- */
/* ---------- Marca Arcada Gestão (o sistema; a clínica continua com nome e logo próprios) ---------- */
.selo-arcada { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.72); font-size: .86rem; font-weight: 800; letter-spacing: -.2px; }
.selo-arcada small { font-size: .62rem; font-weight: 600; letter-spacing: 2.5px; color: rgba(255,255,255,.55); }
.login-fundo { flex-direction: column; justify-content: flex-start; gap: 16px; }
.assinatura-arcada { order: 2; display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.78); font-size: .9rem; }
.assinatura-arcada svg { width: 28px; }
.assinatura-arcada strong { font-weight: 800; color: #fff; font-size: 1.1rem; letter-spacing: -.3px; }
.login-fundo > .login-caixa {
  box-sizing: border-box;
  flex: 0 0 auto;
  margin: auto 0 0;
  max-height: none;
  overflow: visible;
  min-width: 0;
}
.login-marca img { max-width: 100%; }
.login-caixa .campos-2 > .campo { min-width: 0; }
.login-caixa input, .login-caixa select, .login-caixa .botao { box-sizing: border-box; max-width: 100%; }
.login-caixa form { margin: 0; }
.resumo-primeiro-acesso {
  background: #f2f7f8;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.resumo-primeiro-acesso dt { font-weight: 700; }
.resumo-primeiro-acesso dd { margin: 0 0 8px; }
.resumo-primeiro-acesso dd:last-child { margin-bottom: 0; }
.campo .login-exibir-senha { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.campo .login-exibir-senha input { width: auto; margin: 0; }
@media (max-width: 420px) {
  .login-caixa .campos-2 { grid-template-columns: minmax(0, 1fr); }
}
.login-fundo > .assinatura-arcada { margin: 0 0 auto; }
@media (max-width: 899px) { .selo-arcada { display: none; } }
/* Títulos em Figtree (marca Arcada): tamanhos menores que os da letra antiga, que era mais miúda */
.topo-marca h1 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.3px; }
.card-titulo, .pedido-topo .card-titulo { font-size: 1.15rem; font-weight: 700; letter-spacing: -.2px; }
.painel-titulo { font-size: 1.35rem; font-weight: 700; letter-spacing: -.4px; }
.ficha-avatar { font-size: 1.05rem; font-weight: 700; }
.modal-cab h3, .ficha-nome h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px; }
.login-marca h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.4px; }
@media (max-width: 640px) { #agendaBarra .painel-titulo { font-size: 1rem; letter-spacing: -.2px; } }

@media print {
  body { padding: 0 !important; background: #fff !important; }
  .abas, .aba-luz { display: none !important; }
  .container { max-width: 100%; margin: 0; padding: 0 !important; }
  .card { padding: 0 !important; box-shadow: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Agenda e navegação da clínica */
@media screen {
  body { background: #f3f7f6; }
  .topo { background: linear-gradient(160deg, #16464b 0, #102f35 42%, #0d282e 100%); }
  .topo-marca { padding-bottom: 18px; margin-bottom: 10px; }
  .nav-grupo { color: #a9c3c5; font-size: .72rem; font-weight: 650; padding: 12px 12px 5px; }
  .abas .aba-btn { border-radius: 9px; min-height: 42px; }
  .abas .aba-btn.ativa { background: #285456; }
  .aba-luz { display: none; }
  .nav-recolher { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0; min-height: 36px; border: 1px solid #507074; border-radius: 8px; background: transparent; color: #daecea; cursor: pointer; }
  .nav-recolher:hover { background: #285456; }
  .nav-recolher svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
  .topo-conta { overflow: hidden; text-overflow: ellipsis; }
  #abaAgenda { width: 100%; max-width: 1680px; padding-bottom: 20px; }
  #agendaBarra { gap: 17px; margin-bottom: 16px; }
  .agenda-cabecalho, .agenda-ferramentas { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .agenda-cabecalho h1 { color: #142f35; font-size: clamp(1.75rem, 2.7vw, 2.55rem); letter-spacing: -.045em; line-height: 1.05; }
  .agenda-data-titulo { display: block; margin-top: 5px; color: #52686b; font-size: .95rem; }
  .agenda-data-titulo::first-letter { text-transform: uppercase; }
  .agenda-ferramentas { padding: 9px; border: 1px solid #dce8e5; border-radius: 13px; background: #fff; }
  .agenda-ferramentas :is(button, select, input) { min-height: 38px; }
  .agenda-paginacao { gap: 3px; }
  .agenda-visoes { gap: 2px; padding: 2px; border-radius: 9px; background: #eef4f3; }
  .agenda-visoes .botao-claro { border: 0; background: transparent; border-radius: 7px; }
  .agenda-visoes .botao-claro.ativo { color: #135752; background: #fff; box-shadow: 0 1px 4px #173f3520; }
  #agendaGrade { border: 1px solid #dce8e5; border-radius: 15px; box-shadow: 0 8px 24px -19px #173f3585; }
  .agenda-grade { width: max-content; }
  .agenda-grade .agenda-cab { appearance: none; border: 0; border-bottom: 1px solid #e1eae8; background: #fff; }
  .agenda-grade .agenda-cab.hoje { color: #08645b; background: #e9f6f2; }
  .agenda-coluna { border-color: #e4eeeb; background-image: linear-gradient(#e4eeeb 1px, transparent 1px), linear-gradient(#f0f5f4 1px, transparent 1px); }
  .agenda-coluna:hover { background-color: #fafdfc; }
  button.bloco { display: block; text-align: left; border: 0; border-left: 3px solid; padding-block: 1px; }
  button.bloco:focus-visible, .agenda-grade .agenda-cab:focus-visible { z-index: 4; outline-offset: -2px; }
  .agenda-lista-dia { padding: 9px; }
  .agenda-lista-dia li { border-color: #e0ebe8; }
  #abaAgenda > .legenda { row-gap: 6px; }
  .consulta-painel.modal-fundo { padding: 0; align-items: stretch; justify-content: flex-end; backdrop-filter: none; }
  .consulta-painel .modal { width: min(100%, 520px); max-width: none; max-height: 100dvh; height: 100%; margin: 0; border-radius: 18px 0 0 18px; overflow: auto; animation: consulta-entra .24s var(--suave) both; }
  .consulta-painel.sem-entrada .modal { animation: none; }
  @keyframes consulta-entra { from { transform: translateX(100%); } }
  .consulta-painel .modal-cab { margin-bottom: 18px; }
  .consulta-resumo { display: grid; justify-items: start; gap: 4px; margin-bottom: 16px; border: 1px solid #dce8e5; border-radius: 12px; background: #eef7f5; padding: 13px 15px; }
  .consulta-resumo strong { font-size: 1.15rem; overflow-wrap: anywhere; }
  .consulta-resumo span { font-size: .85rem; }
  .consulta-status { padding: 3px 8px; border-radius: 6px; background: #e4ecec; }
  .consulta-status.st-confirmada { background: #d5f1e5; color: #12563b; }
  .consulta-status.st-agendada { background: #dceff6; color: #0a4d5a; }
  .consulta-status.st-faltou { background: #f7e4e2; color: #802d26; }
  .consulta-tipo { margin-bottom: 13px; }
  .consulta-painel .modal-rodape { position: sticky; bottom: 0; padding: 12px 0; background: #fff; }
}
@media screen and (min-width: 900px) {
  body { transition: padding-left .2s var(--suave); }
  .topo { transition: width .2s var(--suave); }
  body.menu-recolhido { padding-left: 76px; }
  .menu-recolhido .topo { width: 76px; }
  .menu-recolhido .topo-linha { padding-inline: 10px; }
  .menu-recolhido .topo-marca { padding-inline: 0; justify-content: center; }
  .menu-recolhido :is(.topo-marca > div, .aba-btn > span, .nav-recolher > span, .nav-grupo, .selo-arcada > span, .topo-dentista .rotulo) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-recolhido .abas .aba-btn, .menu-recolhido .selo-arcada { justify-content: center; }
  .menu-recolhido .nav-recolher svg { transform: scaleX(-1); }
  .menu-recolhido .topo-dentista { padding-inline: 0; }
  .menu-recolhido .topo-conta { padding-inline: 6px; text-align: center; }
}
@media screen and (max-width: 899px) {
  .nav-grupo, .nav-recolher { display: none; }
  .abas .aba-btn.ativa { color: #075850; background: #dff1ec; }
  .consulta-painel .modal { border-radius: 0; min-height: 0; }
}
@media screen and (max-width: 520px) {
  .agenda-cabecalho { align-items: flex-start; }
  .agenda-acoes-controle .botao, .agenda-acoes-controle .botao-claro { white-space: nowrap; }
  .agenda-ferramentas .agenda-controle { width: 100%; }
  .agenda-ferramentas .agenda-controle > select { flex: 1 1 9rem; }
}
@media (prefers-reduced-motion: reduce) {
  body, .topo { transition: none; }
  .consulta-painel .modal { animation: none; }
}

/* Prontuário e odontograma */
@media screen {
  .prontuario-painel.modal-fundo { padding: 18px; }
  .prontuario-painel .modal.largo { max-width: 1120px; max-height: calc(100dvh - 36px); overflow: auto; padding: 0 24px 24px; scroll-padding-top: 100px; }
  .prontuario-painel .ficha-cab { position: sticky; top: 0; z-index: 5; min-height: 78px; margin-bottom: 12px; padding: 12px 0; background: #fff; border-bottom: 1px solid #dfebe8; }
  .prontuario-painel .ficha-avatar { border-radius: 15px; background: #e3f3ee; color: #126156; }
  .prontuario-painel .ficha-nome h3 { font-size: 1.4rem; }
  .prontuario-painel .ficha-acoes { gap: 8px; margin: 8px 0 16px; }
  .prontuario-painel .ficha-acoes :is(button,a), .prontuario-painel .ficha-abas button { min-height: 40px; }
  .prontuario-painel .ficha-grupos { gap: 4px; padding: 4px; border: 0; border-radius: 12px; background: #eff5f3; }
  .prontuario-painel .ficha-grupos button { margin: 0; border: 0; border-radius: 8px; }
  .prontuario-painel .ficha-grupos button.ativa { background: #fff; color: #14574f; box-shadow: 0 1px 4px #173f3520; }
  .prontuario-painel .ficha-subabas { margin-top: 4px; }
  .prontuario-painel .ficha-rodape { flex-wrap: wrap; }
  .odonto-cabecalho { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 10px; }
  .odonto-cabecalho h4, .odonto-editor h4 { color: #173b3e; font-size: 1.23rem; letter-spacing: -.02em; }
  .odonto-cabecalho p { color: var(--muted); font-size: .87rem; margin-top: 4px; }
  .odonto-denticao { padding: 3px; border-radius: 10px; background: #eef4f3; }
  .odonto-denticao .botao-claro { border: 0; min-height: 34px; border-radius: 7px; background: transparent; }
  .odonto-denticao .botao-claro.ativo { background: #fff; color: #14574f; box-shadow: 0 1px 4px #173f3520; }
  #odBocaToda { margin: 0 0 12px; background: #eff8f5; border: 1px solid #dcebe6; }
  #odBocaToda summary { color: #16594e; }
  .odonto-rolagem { border: 1px solid #dbe8e4; border-radius: 13px; background: #f3f8f7; }
  .odonto-rolagem .odonto { background: transparent; padding: 12px; }
  .odonto-arcada-titulo { display: block; margin: 0 0 6px; color: #4d6867; font-size: .75rem; font-weight: 650; }
  .odonto-divisa { border-color: #dde9e6; }
  .odonto .dente { border-radius: 9px; min-height: 44px; }
  .odonto .dente.selecionado { background: transparent; box-shadow: none; }
  .odonto-editor { margin-top: 14px; padding: 16px; border: 1px solid #dbe8e4; border-radius: 14px; background: #f5f9f8; }
  .odonto-editor h4 { margin-bottom: 12px; scroll-margin-top: 3px; }
  .odonto-editor h5 { margin: 8px 0; font-size: .94rem; color: #284e4f; }
  .odonto-editor-colunas { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
  .odonto-editor-dados, .odonto-editor-catalogo { min-width: 0; }
  .odonto-editor .odonto-outro { padding: 7px 0; }
  .odonto-editor .procedimentos-painel { margin-top: 0; }
  .odonto-editor .procedimentos-lista { max-height: min(45dvh, 420px); }
  .odonto-editor .procedimento-opcao { min-height: 46px; }
  .odonto-editor .modal-rodape { padding-top: 10px; border-top: 1px solid #dce9e5; }
}
@media screen and (max-width: 700px) {
  .prontuario-painel.modal-fundo { padding: 0; }
  .prontuario-painel .modal.largo { padding: 0 14px max(16px, env(safe-area-inset-bottom)); max-height: 100dvh; min-height: 100dvh; border-radius: 0; }
  .prontuario-painel .ficha-cab { min-height: 68px; }
  .prontuario-painel .ficha-avatar { flex-basis: 42px; height: 42px; }
  .prontuario-painel .ficha-nome h3 { font-size: 1.16rem; }
  .odonto-editor { padding: 12px; }
  .odonto-editor-colunas { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

.odonto-numero { display: inline-flex; align-items: center; gap: 3px; }
.odonto-numero .odonto-indicador-plano, #odontoArea .legenda .odonto-indicador-plano {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #64338e;
  background: #9045ba;
}

.odonto-propostas { margin-bottom: 14px; padding: 8px 12px; border: 1px solid #e5dae9; border-radius: 10px; background: #fff; }
.odonto-propostas ul { list-style: none; margin: 0; padding: 0; }
.odonto-propostas li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 7px 0; border-top: 1px solid #ede7ef; }
.odonto-propostas li span { color: var(--muted); font-size: .82rem; }

.odonto-marcacoes-manuais { margin-top: 12px; }
.odonto-marcacoes-manuais summary { width: fit-content; padding: 6px 0; color: var(--muted); font-size: .85rem; cursor: pointer; }
.odonto-marcacoes-manuais .marcas-dente { margin: 6px 0; }

/* Edição e prévia dos documentos clínicos */
@media screen {
  .documento-editor { gap: 16px; }
  .documento-editor-cab { grid-column: 1 / -1; }
  .documento-editor-cab h1 { color: #142f35; font-size: clamp(1.55rem, 2.5vw, 2.25rem); letter-spacing: -.04em; line-height: 1.15; }
  .documento-vistas { display: none; }
  .documento-editor > .right-col > .card { background: #ecf3f1; border: 1px solid #dae8e4; }
  .documento-editor .right-col .folha { box-shadow: 0 3px 14px #173f3522; }
  #documentoPreviaEmitida { margin: 10px 0; padding: 9px; border: 1px solid #dde9e5; border-radius: 10px; background: #eef5f3; }
  #documentoPreviaEmitida summary { color: #14574f; font-weight: 650; cursor: pointer; }
  #documentoPreviaFolhas .ficha-papel { width: 100%; margin: 10px 0 0; padding: clamp(12px, 3vw, 26px); }
  #documentoPreviaFolhas .ficha-papel-marca { min-width: 0; }
  #documentoPreviaFolhas .ficha-papel-marca img { width: clamp(28px, 7vw, 65px); }
  #documentoPreviaFolhas .ficha-papel-cab { gap: 8px; }
}
@media screen and (min-width: 1001px) {
  .documento-editor.container { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .documento-editor > .sticky-col { position: sticky; }
}
@media screen and (max-width: 1000px) {
  .documento-editor.container { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .documento-editor-cab { display: grid; gap: 9px; }
  .documento-vistas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #e3eeeb; border-radius: 11px; }
  .documento-vistas button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: #395a58; cursor: pointer; font-weight: 650; }
  .documento-vistas button[aria-pressed="true"] { background: #fff; color: #14574f; box-shadow: 0 1px 4px #173f3520; }
  .documento-editor[data-documento-vista="editar"] > .right-col,
  .documento-editor[data-documento-vista="previa"] > .left-col { display: none; }
}

.documento-abrir-previa { display: none; }
@media screen and (max-width: 1000px) {
  .documento-abrir-previa { display: block; width: 100%; margin-top: 10px; }
  .documento-editor-cab { scroll-margin-top: 125px; }
}

@media screen and (max-width: 700px) {
  .prontuario-painel .ficha-grupos { flex-wrap: wrap; }
}

#botaoDownloadsArcada[hidden], .downloads-nav-curto { display: none; }
.downloads-arcada { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-top: 16px; }
.downloads-arcada article { display: grid; align-content: start; justify-items: start; gap: 10px; padding: 14px; border: 1px solid #dce8e5; border-radius: 12px; }
.downloads-arcada a { text-decoration: none; }
@media (max-width: 899px) {
  .downloads-nav-completo { display: none; }
  .downloads-nav-curto { display: inline; }
}

.agenda-calendario-mobile { display: none; }
@media screen and (max-width: 640px) {
  #agendaBarra .agenda-data-controle { display: none; }
  .agenda-calendario-mobile { display: block; padding: 9px 10px 10px; border: 1px solid #dce8e5; border-radius: 13px; background: #fff; }
  .agenda-calendario-cab, .agenda-calendario-setas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .agenda-calendario-cab { justify-content: space-between; margin-bottom: 5px; }
  .agenda-calendario-cab button, .agenda-calendario-dia { min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: #164946; font-weight: 650; cursor: pointer; }
  #agendaMesBotao { text-transform: capitalize; padding: 0 4px; }
  .agenda-calendario-setas button { min-width: 38px; padding: 0 5px; }
  .agenda-calendario-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
  .agenda-calendario-dias > span { padding: 2px 0; color: #506466; font-size: .76rem; }
  .agenda-calendario-dia[aria-current="date"] { box-shadow: inset 0 0 0 1px #3d8580; }
  .agenda-calendario-dia.outro-mes { color: #587270; }
  .agenda-calendario-dia:disabled { color: #788482; cursor: default; }
  .agenda-calendario-dia[aria-pressed="true"] { background: #0e5753; color: #fff; }
}
