.saude-modal {
    width: min(540px, calc(100% - 32px));
    max-height: calc(100svh - 40px);
    margin: auto;
    padding: 28px;
    overflow-y: auto;
    border: 1px solid #fff;
    border-radius: 28px;
    background: linear-gradient(160deg, #fff, #f5f8ff);
    color: #172c50;
    box-shadow: 0 40px 120px #000a2866;
    font-family: inherit;
}
.saude-modal[open] { animation: saude-entrar .45s cubic-bezier(.16, 1, .3, 1) both; }
.saude-modal::backdrop { background: #030d2bb8; backdrop-filter: blur(10px); animation: saude-fundo .3s ease both; }
.saude-modal.fechando { animation: saude-sair .18s ease both; }
.saude-modal.fechando::backdrop { animation: saude-fundo .18s ease reverse both; }
.saude-cabecalho { display: flex; align-items: center; gap: 12px; }
.saude-emblema { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 1px solid #d9e5ff; border-radius: 14px; background: #edf3ff; color: #214fbd; }
.saude-emblema svg { width: 25px; height: 25px; }
.saude-sobretitulo { margin: 0 0 4px; color: #6b7b96; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.saude-cabecalho h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.saude-fechar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; margin-left: auto; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #62718d; cursor: pointer; transition: background .2s, color .2s; }
.saude-fechar svg { width: 22px; height: 22px; }
.saude-fechar:hover { background: #e8eef9; color: #183767; }
.saude-resumo { padding: 28px 16px 24px; margin-top: 24px; border: 1px solid #e3eaf8; border-radius: 20px; background: radial-gradient(ellipse at 50% 0, #eaf1ff, #f5f8ff 80%); text-align: center; }
.saude-sinal { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border: 1px solid #cadbfd; border-radius: 50%; background: #e0ebff; color: #275bd0; box-shadow: 0 0 0 7px #eaf1ff; }
.saude-sinal svg { display: none; width: 30px; height: 30px; }
.saude-carregando { width: 28px; height: 28px; border: 2px solid #a9c3f5; border-top-color: #2457c9; border-radius: 50%; animation: saude-girar .8s linear infinite; }
.saude-resumo h3 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.6px; }
.saude-resumo p { max-width: 350px; margin: 0 auto; color: #64738c; font-size: 13px; line-height: 1.65; }
.saude-resumo[data-estado="ok"] { border-color: #d3ebdf; background: radial-gradient(ellipse at 50% 0, #e8f7ef, #f7fcf9 80%); }
[data-estado="ok"] .saude-sinal { border-color: #b9dfca; background: #d9f1e4; color: #19764d; box-shadow: 0 0 0 7px #edf8f2; }
[data-estado="ok"] .saude-ok { display: block; animation: saude-confirmar .4s cubic-bezier(.16, 1, .3, 1) both; }
[data-estado="ok"] .saude-carregando, [data-estado="erro"] .saude-carregando { display: none; }
.saude-resumo[data-estado="erro"] { border-color: #f0d8bc; background: radial-gradient(ellipse at 50% 0, #fff0dd, #fffbf6 80%); }
[data-estado="erro"] .saude-sinal { border-color: #efcca1; background: #ffe6c5; color: #a25c10; box-shadow: 0 0 0 7px #fff4e5; }
[data-estado="erro"] .saude-alerta { display: block; }
.saude-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.saude-dados div { min-width: 0; padding: 13px 15px; border: 1px solid #e2e8f3; border-radius: 13px; background: #ffffffab; }
.saude-dados dt { margin-bottom: 5px; color: #73809a; font-size: 11px; }
.saude-dados dd { margin: 0; color: #243c62; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.saude-dados .saude-conectado { color: #19764d; }
.saude-dados .saude-indisponivel { color: #a25c10; }
.saude-detalhes { margin-top: 16px; border-top: 1px solid #e3e9f3; }
.saude-detalhes summary { padding: 15px 0; color: #64738c; font-size: 12px; cursor: pointer; }
.saude-detalhes pre { max-height: 220px; margin: 0; padding: 16px; overflow: auto; border-radius: 12px; background: #0d1e3d; color: #d6e8ff; font-size: 12px; line-height: 1.6; }
.saude-rodape { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.saude-rodape p { margin: 0; color: #7a879d; font-size: 10px; line-height: 1.6; }
.saude-rodape button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 14px; border: 1px solid #d7e1f4; border-radius: 11px; background: #fff; color: #284e91; font: 600 12px system-ui, sans-serif; cursor: pointer; white-space: nowrap; transition: background .2s; }
.saude-rodape button:hover { background: #eaf1ff; }
.saude-rodape button:disabled { opacity: .5; cursor: wait; }
.saude-rodape button span { font-size: 19px; line-height: 1; }
.saude-modal :is(button, summary):focus-visible { outline: 3px solid #b48814; outline-offset: 3px; }
.saude-modal [hidden] { display: none; }
@keyframes saude-entrar { from { opacity: 0; transform: translateY(26px) scale(.94); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes saude-sair { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes saude-fundo { from { opacity: 0; } to { opacity: 1; } }
@keyframes saude-girar { to { transform: rotate(360deg); } }
@keyframes saude-confirmar { from { opacity: 0; transform: scale(.5) rotate(-15deg); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
    .saude-modal { padding: 20px; border-radius: 23px; }
    .saude-cabecalho { gap: 10px; }
    .saude-cabecalho h2 { font-size: 19px; }
    .saude-sobretitulo { font-size: 8px; }
    .saude-emblema { flex-basis: 40px; height: 40px; }
    .saude-resumo { padding: 24px 12px 20px; }
    .saude-resumo h3 { font-size: 21px; }
    .saude-rodape { flex-wrap: wrap; }
    .saude-rodape p { width: 100%; text-align: center; }
    .saude-rodape button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .saude-modal[open], .saude-modal.fechando, .saude-modal::backdrop, .saude-modal.fechando::backdrop, .saude-sinal svg, .saude-carregando { animation: none; }
    .saude-modal button { transition: none; }
}
