/* Salva-Plantão Pediatria — estilos (prancheta aprovada: design/prancheta/*.dc.html).
   Tipografia IBM Plex Sans / Condensed / Mono; modo claro e noturno; layout responsivo único. */

:root {
  --bg: #eef1f5; --surface: #ffffff; --surface-2: #f4f6f9; --surface-3: #f1f4f8;
  --border: #d7dde6; --line: #edf0f4; --input: #b9c3d0; --input-bg: #ffffff;
  --text: #14202e; --text-2: #3d4756; --muted: #5b6778; --heading: #13315c;
  --primary: #13315c; --on-primary: #ffffff; --link: #1d5fb8;
  --red: #c62828; --red-dark: #8d1010; --red-bg: #fbe9e9; --red-border: #ecb4b4;
  --green: #2f7d32; --green-dark: #2f6a32; --green-bg: #e8f4e8; --green-border: #b6d8b6;
  --amber: #8a5a00; --amber-bg: #fff4dc; --amber-border: #e6b85c;
  --teal: #0e7c73; --teal-dark: #0b625b; --teal-bg: #e3f4f2;
  --blue: #1d5fb8; --blue-dark: #174f9a; --blue-bg: #e7f0fd; --blue-border: #b7cdee;
  --av-bg: #fde7c8; --av-fg: #7a3e00; --chip-bg: #e7ecf4; --chip-fg: #13315c;
  --verde-c: #e2efda; --verde-b: #538135; --amar-c: #fff2cc; --amar-b: #bf9000; --verm-c: #f8dcdc; --verm-b: #c62828;
  --lar-c: #fdf0e3; --lar-b: #efc39a; --azul-c: #e7f0fd; --azul-b: #8eaadb;
  --hl: #ffe14d; --hl-b: #b38f00;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --cond: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(16,32,56,.06), 0 6px 18px rgba(16,32,56,.06);
  --gutter: 32px;
  color-scheme: light;
}
:root[data-tema="noturno"] {
  --bg: #0f1621; --surface: #18212e; --surface-2: #1d2735; --surface-3: #1d2735;
  --border: #2a3546; --line: #222c3a; --input: #3a4658; --input-bg: #1d2735;
  --text: #e6ebf2; --text-2: #c3ccd9; --muted: #9aa6b8; --heading: #dbe6f7;
  --primary: #23406e; --on-primary: #ffffff; --link: #8fb8ff;
  --red: #e0453f; --red-dark: #ff7b7b; --red-bg: #2e1716; --red-border: #5a2a28;
  --green: #3f9a44; --green-dark: #8fd694; --green-bg: #16271a; --green-border: #2f5a33;
  --amber: #ffc27a; --amber-bg: #33240f; --amber-border: #7a5a20;
  --teal: #4fc1b6; --teal-dark: #7fd8cf; --teal-bg: #12302d;
  --blue: #5aa9ff; --blue-dark: #a9d0ff; --blue-bg: #13243a; --blue-border: #2c4a70;
  --av-bg: #4a3210; --av-fg: #ffc27a; --chip-bg: #263246; --chip-fg: #dbe6f7;
  --verde-c: #1b2e1d; --verde-b: #5fa463; --amar-c: #2f2810; --amar-b: #c9a400; --verm-c: #2e1716; --verm-b: #ff7b7b;
  --lar-c: #2c1f0f; --lar-b: #7a5a20; --azul-c: #13243a; --azul-b: #2c4a70;
  --hl: #6b5a00; --hl-b: #ffd34d;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.4; font-size: 15px; }
a { color: var(--link); }
a:hover { color: var(--heading); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
h1, h2, h3 { color: var(--heading); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cond { font-family: var(--cond); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Topo ---------- */
.topo { background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px var(--gutter); display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; position: relative; z-index: 20; }
.topo > * { flex-shrink: 0; }
.topo > .busca { flex-shrink: 1; }
.topo .logo-upa { height: 48px; width: auto; display: block; }
.topo .logo-pref { height: 42px; width: auto; display: block; }
:root[data-tema="noturno"] .topo .logo-upa, :root[data-tema="noturno"] .topo .logo-pref, :root[data-tema="noturno"] .login-topo img { background: #fff; border-radius: 8px; padding: 2px 6px; }
.topo .sep { width: 1px; height: 38px; background: var(--border); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca-nome { display: flex; flex-direction: column; gap: 3px; }
.marca-nome b { font-family: var(--cond); font-weight: 700; font-size: 22px; line-height: 1; color: var(--heading); }
.marca-nome small { font-size: 10px; font-weight: 600; letter-spacing: 2.5px; color: var(--muted); }
.busca { flex: 1 1 240px; min-width: 160px; max-width: 560px; position: relative; }
.busca label { display: flex; align-items: center; gap: 8px; background: var(--surface-3); border: 1.5px solid var(--input); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.busca input { flex: 1; border: 0; background: transparent; color: var(--text); padding: 10px 0; font-size: 15px; min-width: 0; }
.busca input:focus { outline: none; }
.busca label:focus-within { outline: 3px solid #ffb300; outline-offset: 1px; }
.busca-res { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 40px rgba(10,25,50,.18); max-height: 70vh; overflow: auto; padding: 6px; z-index: 40; }
.busca-res .grupo { font-size: 11.5px; font-weight: 700; letter-spacing: .6px; color: var(--muted); padding: 8px 10px 4px; }
.busca-res a { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); min-height: 44px; justify-content: center; }
.busca-res a:hover, .busca-res a.ativo { background: var(--blue-bg); }
.busca-res a small { color: var(--muted); font-size: 12.5px; }
.busca-res .vazio { padding: 12px; color: var(--muted); font-size: 14px; }
.espaco { flex: 1; }
.tema { display: flex; gap: 2px; padding: 2px; border: 1.5px solid var(--input); border-radius: 999px; }
.tema button { display: flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; color: var(--heading); background: transparent; min-height: 32px; }
.tema button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); }
.btn-pilula { background: var(--surface); color: var(--heading); font-size: 14px; font-weight: 600; border: 1.5px solid var(--input); border-radius: 999px; padding: 6px 12px; min-height: 36px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-pilula:hover { border-color: var(--heading); }
.usuario { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.usuario .nome-u { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario { gap: 4px; font-size: 13.5px; }
.usuario button, .usuario a { font-size: 13px; white-space: nowrap; }
@media (max-width: 1360px) { .usuario .nome-u { display: none; } }
.usuario button { border: 0; background: none; color: var(--link); font-weight: 600; padding: 6px 4px; min-height: 36px; }
.so-cel { display: none !important; }
.icone-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--surface-3); color: var(--heading); }
.menu-cel { position: absolute; right: 12px; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 40px rgba(10,25,50,.2); padding: 6px; min-width: 220px; z-index: 50; display: flex; flex-direction: column; }
.menu-cel a, .menu-cel button { text-align: left; background: none; border: 0; padding: 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; min-height: 44px; }
.menu-cel a:hover, .menu-cel button:hover { background: var(--surface-2); }

/* ---------- Faixa da criança ---------- */
.faixa { background: var(--z-fundo); border-bottom: 3px solid var(--z-cor); padding: 10px var(--gutter); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--z-texto); }
.faixa .barra { width: 18px; height: 54px; border-radius: 5px; background: var(--z-cor); border: 1px solid rgba(0,0,0,.15); flex: none; }
.faixa .peso { font-family: var(--cond); font-weight: 700; font-size: 42px; line-height: 1; }
.faixa .idade { font-size: 18px; }
.faixa .grupo1 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.faixa .grupo2 { display: flex; flex-direction: column; gap: 2px; }
.faixa .grupo2 b { font-size: 15px; }
.faixa .grupo2 span { font-size: 14px; }
.faixa .estimado { font-size: 12px; font-weight: 700; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); border-radius: 999px; padding: 2px 8px; }
.faixa .dengue { font-size: 12px; font-weight: 700; background: var(--red-bg); color: var(--red-dark); border: 1px solid var(--red-border); border-radius: 999px; padding: 2px 8px; }
.btn-pcr { display: inline-flex; align-items: center; gap: 8px; background: #c62828; color: #fff !important; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 9px 18px; font-size: 15px; border: 0; min-height: 44px; }
.btn-pcr:hover { background: #a31f1f; }
.btn-trocar { background: var(--surface); color: var(--heading); font-weight: 600; text-decoration: none; border-radius: 999px; padding: 9px 16px; font-size: 15px; border: 1px solid rgba(0,0,0,.15); min-height: 44px; display: inline-flex; align-items: center; }
.regua-mini { display: none; }

/* ---------- Abas ---------- */
.abas { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 var(--gutter); display: flex; gap: 4px; flex-wrap: wrap; }
.abas a { padding: 14px 18px; font-weight: 600; font-size: 16px; color: var(--muted); text-decoration: none; border-bottom: 4px solid transparent; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.abas a svg { display: none; }
.abas a[data-aba="gestao"] svg { display: inline; }
.abas a[aria-current="page"] { font-weight: 700; color: var(--aba-cor); border-bottom-color: var(--aba-cor); }
.abas a[data-aba="emergencia"] { --aba-cor: #c62828; }
.abas a[data-aba="medicamentos"] { --aba-cor: var(--green); }
.abas a[data-aba="condutas"] { --aba-cor: var(--teal); }
.abas a[data-aba="calculadoras"] { --aba-cor: var(--blue); }
.abas a[data-aba="gestao"] { --aba-cor: var(--heading); }
.subabas { background: var(--chip-bg); border-bottom: 1px solid var(--border); padding: 10px var(--gutter); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.subabas .rot { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--muted); margin-right: 6px; }
.subabas a { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--heading); border: 1.5px solid var(--input); min-height: 36px; display: inline-flex; align-items: center; }
.subabas a[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------- Conteúdo ---------- */
main.conteudo { flex: 1; width: 100%; max-width: 1380px; margin: 0 auto; padding: 22px var(--gutter); display: flex; flex-direction: column; gap: 16px; }
main.estreito { max-width: 1080px; }
.titulo { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.titulo h1 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 34px; color: var(--heading); line-height: 1.1; }
.titulo .sub { font-size: 14.5px; color: var(--muted); }
.cartao { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.cartao > h2, .cartao-tit { margin: 0 0 8px; font-size: 15px; color: var(--heading); }
.cartao p { margin: 0; }
.duas-col { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.duas-col > .principal { flex: 999 1 760px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.duas-col > .lateral { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grade-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.aviso { border-radius: 10px; padding: 9px 12px; font-size: 14px; line-height: 1.45; }
.aviso.info { background: var(--blue-bg); color: var(--blue-dark); border: 1px solid var(--blue-border); }
.aviso.atencao { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.aviso.perigo { background: var(--red-bg); color: var(--red-dark); border: 1px solid var(--red-border); }
.aviso.ok { background: var(--green-bg); color: var(--green-dark); border: 1px solid var(--green-border); }
.nota-diretor { display: inline-block; font-size: 12px; font-weight: 600; color: var(--blue-dark); background: var(--blue-bg); border: 1px dashed var(--blue-border); border-radius: 6px; padding: 2px 8px; }
.legenda { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.legenda b:first-child { color: var(--heading); }
.verificar { display: inline-block; font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-bg); border: 1px dashed var(--amber-border); border-radius: 6px; padding: 1px 7px; }
.av { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; color: var(--av-fg); background: var(--av-bg); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.chip { justify-self: end; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--chip-bg); color: var(--chip-fg); }
.chip.insulina { background: var(--av-bg); color: var(--av-fg); }
.pill { font-size: 12px; font-weight: 700; letter-spacing: .5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.pill.PODE { background: var(--green-bg); color: var(--green-dark); }
.pill.CAUTELA { background: var(--amber-bg); color: var(--amber); }
.pill.NAO, .pill.SUSPENSO { background: #c62828; color: #fff; }
.pill.IDADE, .pill.PESO, .pill.CRITERIO { background: var(--surface); color: var(--red-dark); border: 1.5px solid var(--red); }
.pill.cheia { font-size: 13px; padding: 4px 10px; }
.pill.cheia.PODE { background: var(--green); color: #fff; }
.num { font-family: var(--cond); font-weight: 700; color: var(--heading); line-height: 1.05; white-space: nowrap; }
.teto { font-size: 11px; font-weight: 700; color: var(--red-dark); margin-top: 2px; letter-spacing: .3px; }
.bloqueio { background: var(--red-bg); border: 1.5px solid var(--red-border); color: var(--red-dark); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 700; font-size: 17px; padding: 13px 18px; border-radius: 10px; border: 0; min-height: 48px; }
.botao:hover { filter: brightness(1.1); color: var(--on-primary); }
.botao:disabled, .botao[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.botao.sec { background: var(--surface); color: var(--heading); border: 1.5px solid var(--input); }
.botao.perigo { background: var(--surface); color: var(--red-dark); border: 1.5px solid var(--red); }
.botao.ok { background: var(--green); }
.botao.peq { font-size: 13px; padding: 5px 11px; min-height: 34px; border-radius: 999px; }
.botao.peq.verde { background: var(--green); color: #fff; }
.botao.peq.contorno { background: var(--surface); color: var(--heading); border: 1.5px solid var(--heading); }
.botao.peq.ambar { background: var(--surface); color: var(--amber); border: 1.5px solid var(--amber); }
.botao.peq.vermelho { background: var(--surface); color: var(--red-dark); border: 1.5px solid var(--red); }
.botao.peq.verde-c { background: var(--surface); color: var(--green-dark); border: 1.5px solid var(--green-dark); }
.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--heading); }
.campo input, .campo select, .campo textarea { padding: 12px 14px; border: 1.5px solid var(--input); border-radius: 10px; font-size: 17px; background: var(--input-bg); color: var(--text); font-weight: 400; min-height: 48px; }
.campo textarea { min-height: 120px; resize: vertical; }
.campo small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.erro-form { color: var(--red-dark); font-size: 14px; font-weight: 600; }
.mem { font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
.fonte { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Rodapé, marca d'água, faixa de versão ---------- */
.rodape { border-top: 1px solid var(--border); background: var(--surface); padding: 10px var(--gutter); font-size: 13px; color: var(--muted); }
.rodape .versao { white-space: nowrap; }
.marca-dagua { position: fixed; inset: auto 0 50% 0; text-align: center; font-family: var(--cond); font-weight: 700; font-size: clamp(40px, 10vw, 140px); color: rgba(198,40,40,.07); transform: rotate(-18deg); pointer-events: none; z-index: 1; letter-spacing: 6px; user-select: none; }
.faixa-demo { background: #c62828; color: #fff; text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; padding: 3px 8px; }
.faixa-off { background: #5b6778; color: #fff; text-align: center; font-size: 13px; padding: 4px 8px; }
.faixa-atualizar { background: var(--blue-bg); color: var(--blue-dark); text-align: center; font-size: 14px; padding: 6px 8px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--blue-border); }

/* ---------- Modal ---------- */
.veu { position: fixed; inset: 0; background: rgba(15,25,45,.62); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.caixa { background: var(--surface); color: var(--text); max-width: 620px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; border-radius: 16px; border-top: 6px solid var(--heading); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.caixa h2 { margin: 0; font-family: var(--cond); font-size: 26px; }
.caixa .acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #13315c; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 120; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: 90vw; }

/* ---------- Entrar / Termo ---------- */
.login-topo { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 48px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.login-topo .upa { height: 76px; width: auto; }
.login-topo .pref { height: 82px; width: auto; }
.login-topo .txt { font-size: 15px; line-height: 1.4; color: var(--text-2); }
.login-topo .txt b { color: var(--heading); }
.login-corpo { flex: 1; display: flex; flex-wrap: wrap; }
.login-marca { flex: 1 1 560px; background: #13315c; color: #fff; padding: 64px 72px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.login-marca .nome { font-family: var(--cond); font-weight: 700; font-size: 76px; line-height: .95; letter-spacing: -.5px; }
.login-marca .fita { display: flex; height: 8px; width: 100%; border-radius: 2px; overflow: hidden; }
.login-marca .fita span { flex: 1; }
.login-marca .sub { font-size: 18px; font-weight: 600; letter-spacing: 5px; color: #c9d6ea; }
.login-marca p { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.55; color: #dbe4f2; }
.login-marca .tags { display: flex; gap: 10px; flex-wrap: wrap; }
.login-marca .tags span { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.login-form-area { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-form { width: 100%; max-width: 440px; background: var(--surface); border-radius: 16px; padding: 36px; box-shadow: 0 14px 40px rgba(10,25,50,.12); display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { margin: 0; font-family: var(--cond); font-size: 32px; }
.login-form p { margin: 0; color: var(--muted); font-size: 15px; }
.termo-grade { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; align-items: start; }
.termo-texto { height: 600px; overflow: auto; font-size: 14px; line-height: 1.55; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.termo-texto p { margin: 0; }
.termo-texto h3 { margin: 8px 0 0; font-size: 14px; color: var(--heading); }
.pontos > div { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.pontos .n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pontos b { font-size: 15px; color: var(--heading); }
.pontos div div { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; cursor: pointer; min-height: 44px; }
.check input { width: 24px; height: 24px; margin-top: 1px; flex: none; accent-color: var(--green); }

/* ---------- Código de recuperação ---------- */
.codigo-rec { display: flex; flex-direction: column; gap: 14px; }
.codigo-grande { font-family: var(--mono); font-weight: 700; font-size: 44px; letter-spacing: 6px; text-align: center; color: var(--heading); background: var(--surface-2); border: 2px dashed var(--heading); border-radius: 12px; padding: 16px 8px; user-select: all; overflow-wrap: anywhere; }
.link-sutil { border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 600; padding: 6px 4px; min-height: 36px; text-decoration: underline; }
@media (max-width: 760px) { .codigo-grande { font-size: 34px; letter-spacing: 4px; } }

/* ---------- Nova criança ---------- */
.crianca-cartao { background: var(--surface); border-radius: 16px; padding: 28px 32px; display: flex; flex-direction: column; gap: 24px; box-shadow: var(--shadow); }
.crianca-linha { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-end; }
.crianca-linha .grp { display: flex; flex-direction: column; gap: 8px; }
.crianca-linha .grp > span { font-size: 15px; font-weight: 600; color: var(--heading); }
.crianca-linha .ent { display: flex; gap: 10px; align-items: flex-end; }
.crianca-linha label.mini { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ent-grande { width: 96px; padding: 10px 12px; border: 1.5px solid var(--input); border-radius: 10px; font-size: 30px; font-weight: 700; font-family: var(--cond); color: var(--heading); background: var(--input-bg); min-height: 56px; }
.ent-grande.peso { width: 130px; }
.seg { display: flex; border: 1.5px solid var(--primary); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--heading); padding: 14px 16px; font-weight: 600; font-size: 15px; min-height: 52px; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.previa-faixa { flex: 1 1 260px; display: flex; align-items: center; gap: 14px; background: var(--z-fundo, var(--surface-2)); border: 2px solid var(--z-cor, var(--border)); border-radius: 12px; padding: 12px 16px; color: var(--z-texto, var(--text)); min-height: 76px; }
.previa-faixa .barra { width: 18px; height: 52px; border-radius: 5px; background: var(--z-cor, var(--border)); flex: none; border: 1px solid rgba(0,0,0,.12); }
.previa-faixa b { font-size: 17px; }
.previa-faixa div div { font-size: 14px; }
.ciente { display: flex; gap: 14px; align-items: flex-start; background: var(--green-bg); border: 2px solid var(--green); border-radius: 12px; padding: 16px 18px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.ciente input { width: 26px; height: 26px; margin-top: 2px; flex: none; accent-color: var(--green); }
.ciente.desligado { opacity: .55; cursor: not-allowed; }
.situacoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.situacoes .check { border: 1.5px solid var(--input); border-radius: 10px; padding: 9px 12px; background: var(--surface); }
.atalhos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.atalho { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,32,56,.05), 0 8px 20px rgba(16,32,56,.06); }
.atalho .corpo { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.atalho .ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.atalho b { font-family: var(--cond); font-size: 25px; }
.atalho .desc { font-size: 14.5px; line-height: 1.4; color: var(--text-2); }
.atalho .pe { font-weight: 600; font-size: 14px; padding: 11px 20px; }
.atalho[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.atalho.emg { border-color: #e3c4c4; } .atalho.emg .ico, .atalho.emg .pe { background: #c62828; color: #fff; } .atalho.emg b { color: #b71c1c; }
.atalho.med .ico, .atalho.med .pe { background: var(--green-bg); color: var(--green-dark); } .atalho.med b { color: var(--green-dark); }
.atalho.con .ico, .atalho.con .pe { background: var(--teal-bg); color: var(--teal-dark); } .atalho.con b { color: var(--teal-dark); }
.atalho.cal .ico, .atalho.cal .pe { background: var(--blue-bg); color: var(--blue-dark); } .atalho.cal b { color: var(--blue-dark); }
:root[data-tema="noturno"] .atalho.emg b { color: #ff9e9e; }

/* ---------- Emergência ---------- */
.regua { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; align-items: end; }
.regua .z { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.regua .seta { font-size: 12px; font-weight: 700; text-align: center; color: var(--heading); visibility: hidden; }
.regua .z.atual .seta { visibility: visible; }
.regua .bloco { border-radius: 6px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid rgba(0,0,0,.18); }
.regua .z.atual .bloco { height: 64px; border: 3px solid var(--heading); }
.regua .bloco b { font-size: 13px; letter-spacing: .5px; }
.regua .bloco span { font-size: 12px; }
.grupo-doses { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.grupo-doses > h2 { margin: 0; padding: 10px 16px; font-size: 15px; letter-spacing: .5px; color: var(--heading); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.linha-dose { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 2fr) 120px; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.linha-dose:first-of-type { border-top: 0; }
.linha-dose .droga { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.linha-dose .droga a { color: inherit; text-decoration: none; }
.linha-dose .droga a:hover { text-decoration: underline; }
.linha-dose .via { font-size: 13px; color: var(--muted); }
.linha-dose .num { font-size: 27px; }
.linha-dose .detalhe { font-size: 13.5px; color: var(--text-2); line-height: 1.35; }
.como { margin-top: 6px; background: var(--surface-2); border-left: 3px solid var(--heading); border-radius: 6px; padding: 5px 8px; }
.como .rot { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--heading); cursor: pointer; min-height: 28px; display: list-item; }
.como[open] .rot { margin-bottom: 2px; }
.como ol { margin: 2px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.4; color: var(--text); }
.como ol small { color: var(--muted); }
.energia .item { background: var(--lar-c); border-radius: 10px; padding: 9px 12px; }
.energia .item + .item { margin-top: 8px; }
.energia .item .t { font-size: 13px; color: var(--muted); }
.energia .item .t b { font-size: 14px; color: var(--av-fg); }
.energia .item .num { font-size: 28px; }
.material { border-top: 5px solid var(--z-cor); border-radius: 0; }
.material .sec { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--muted); margin: 6px 0 2px; }
.material .item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.material .item span { font-size: 14px; color: var(--text-2); }
.material .item b { font-family: var(--cond); font-weight: 700; font-size: 20px; color: var(--heading); text-align: right; }
.material .item b.conferir { font-size: 16px; color: var(--amber); border: 1.5px dashed var(--amber-border); border-radius: 6px; padding: 1px 7px; }
.vitais { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vitais > div { background: #13315c; color: #fff; border-radius: 8px; padding: 8px 10px; }
.vitais > div.pas { background: var(--surface); color: var(--red); border: 2px solid var(--red); padding: 6px 10px; }
.vitais .r { font-size: 11px; }
.vitais .v { font-family: var(--cond); font-weight: 700; font-size: 20px; white-space: nowrap; }
.nao-usar { display: block; background: var(--surface); border: 2px solid var(--red); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.nao-usar b { color: var(--red); font-size: 15px; }
.nao-usar div { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ---------- Medicamentos ---------- */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros > span { font-size: 14px; font-weight: 600; color: var(--text-2); }
.filtros button { border: 1.5px solid var(--input); background: var(--surface); color: var(--heading); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; min-height: 40px; }
.filtros button.f-PODE { border-color: #9cc79e; color: var(--green-dark); }
.filtros button.f-CAUTELA { border-color: var(--amber-border); color: var(--amber); }
.filtros button.f-NAO { border-color: var(--red-border); color: var(--red-dark); }
.filtros button[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary); color: var(--on-primary); font-weight: 700; }
.filtros input { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1.5px solid var(--input); border-radius: 10px; background: var(--input-bg); min-height: 40px; }
.tabela { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tabela .cab, .tabela .lin { display: grid; gap: 12px; align-items: center; padding: 10px 16px; }
.tabela .cab { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.tabela .lin { border-top: 1px solid var(--line); font-size: 14px; }
.tabela .lin:first-of-type { border-top: 0; }
.tabela .lin.alerta { background: color-mix(in srgb, var(--red-bg) 40%, var(--surface)); }
.tabela .lin > * { min-width: 0; }
.tabela .rot-cel { display: none; }
.t-meds .cab, .t-meds .lin { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1.5fr) 120px 100px; }
.t-meds.com-farmacia .cab, .t-meds.com-farmacia .lin { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1.5fr) 120px 100px 120px; }
.t-meds .nome a { font-weight: 700; font-size: 15.5px; color: var(--heading); text-decoration: none; }
.t-meds .nome a:hover { text-decoration: underline; }
.t-meds .nome small { display: block; font-size: 12.5px; color: var(--muted); }
.t-meds .sit { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.t-meds .sit small { font-size: 12.5px; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lista-az { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; max-height: calc(100vh - 260px); overflow: auto; position: sticky; top: 12px; display: block !important; }
.lista-az > *, .lateral > * { flex-shrink: 0; }
.lista-az a span { flex: 1; min-width: 0; line-height: 1.3; }
.lista-az .rot { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--muted); margin: 2px 6px 6px; }
.lista-az a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); text-decoration: none; border-radius: 6px; min-height: 40px; }
.lista-az a[aria-current="page"] { background: var(--green-bg); font-weight: 700; }
.lista-az .bola { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lista-az small { margin-left: auto; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.recentes { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 6px 12px; }
.recentes a { font-size: 13px; color: var(--text); text-decoration: none; background: var(--bg); border-radius: 999px; padding: 4px 10px; border: 0; min-height: 0; }
.apres-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.apres-barra .rot { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.apres-barra button { font-size: 14px; font-weight: 700; color: var(--heading); background: var(--surface); border: 1.5px solid var(--input); border-radius: 999px; padding: 6px 12px; min-height: 40px; }
.apres-barra button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.apres-barra button .sug { font-size: 11px; font-weight: 600; opacity: .85; margin-left: 4px; }
.cartoes-via { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cartao-via { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cartao-via.destaque { border: 2px solid var(--heading); }
.cartao-via .cab { font-size: 14px; color: var(--muted); }
.cartao-via .num { font-size: 46px; line-height: 1; white-space: normal; }
.cartao-via .dose { font-size: 15px; }
.gotas { display: flex; gap: 3px; flex-wrap: wrap; }
.gotas-leg { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.seringa-svg { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.seringa-leg { font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px; }
.sugestao { background: var(--amber-bg); border: 1.5px solid var(--amber-border); border-radius: 12px; padding: 12px 16px; }
.sugestao .rot { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--amber); }
.sugestao div:last-child { font-size: 17px; margin-top: 4px; }
.cartao.perigo { background: var(--red-bg); border-color: var(--red-border); }
.cartao.perigo h2 { color: var(--red-dark); }
.cartao.tracejado { border: 1.5px dashed var(--muted); }
.passos-ev { margin: 0; padding: 0; list-style: none; }
.passos-ev li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.passos-ev li:first-child { border-top: 0; }
.passos-ev .n { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.passos-ev .t { font-size: 16px; line-height: 1.4; }
.passos-ev .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.faixas-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.faixas-tab td, .faixas-tab th { border-top: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.faixas-tab tr.ativa td { background: var(--hl); font-weight: 700; color: #14202e; }
:root[data-tema="noturno"] .faixas-tab tr.ativa td { color: #fff; }

/* ---------- Condutas (conteúdo do guia com o visual NOVO da prancheta, não o do guia antigo) ---------- */
.lista-condutas a { display: block; padding: 9px 8px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; border-radius: 8px; min-height: 40px; }
.lista-condutas a:first-of-type { border-top: 0; }
.lista-condutas a[aria-current="page"] { background: var(--teal-bg); font-weight: 700; color: var(--teal); }
.lista-condutas a small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.guia { --zc: #13315c; --zf: #e7ecf4; --zt: #ffffff; display: flex; flex-direction: column; gap: 16px; font-size: 15px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.guia .tema { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.guia .tt { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1.15; color: var(--heading); padding: 2px 0 2px 12px; border-left: 5px solid var(--primary); background: none; }
.guia .tt.red { border-left-color: #c62828; color: var(--red-dark); }
.guia .tt.verde { border-left-color: var(--green); color: var(--green-dark); }
.guia .tt.roxo { border-left-color: #7030a0; }
.guia .bx { margin: 0; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.45; background: var(--surface); }
.guia .bx > b:first-child { font-size: 13px; letter-spacing: .4px; }
.guia .bx.azul { background: var(--blue-bg); border-color: var(--blue-border); } .guia .bx.azul > b:first-child { color: var(--blue-dark); }
.guia .bx.amar { background: var(--amber-bg); border-color: var(--amber-border); } .guia .bx.amar > b:first-child { color: var(--amber); }
.guia .bx.verm { background: var(--red-bg); border-color: var(--red-border); } .guia .bx.verm > b:first-child { color: var(--red-dark); }
.guia .bx.verde { background: var(--green-bg); border-color: var(--green-border); } .guia .bx.verde > b:first-child { color: var(--green-dark); }
.guia .bx.lar { background: var(--lar-c); border-color: var(--lar-b); } .guia .bx.lar > b:first-child { color: #8a4510; }
:root[data-tema="noturno"] .guia .bx.lar > b:first-child { color: #ffc27a; }
.guia .bx.cinza { background: var(--surface-2); }
.guia .bx.dt { background: var(--surface); border: 2px solid var(--blue); border-left-width: 6px; }
.guia .bx.dt > b:first-child { color: var(--blue-dark); font-size: 14px; }
.guia .subst { display: inline-block; background: #c62828; color: #fff; font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 4px; white-space: nowrap; letter-spacing: .2px; }
.guia s { color: var(--muted); }
.guia .bx p { margin: 0 0 6px; } .guia .bx p:last-child { margin: 0; }
.guia .bx ul, .guia .bx ol { margin: 4px 0 0; padding-left: 20px; }
.guia .duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guia .tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guia .duas > .bx, .guia .tres > .bx { margin: 0; }
.guia ol.flux { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.guia ol.flux > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); font-size: 15px; }
.guia ol.flux .num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; background: var(--primary); font-family: var(--sans); }
.guia ol.flux > li > div { padding: 4px 0 0; min-width: 0; }
.guia ol.flux > li.azul { background: color-mix(in srgb, var(--blue-bg) 60%, var(--surface)); border-color: var(--blue-border); } .guia ol.flux > li.azul .num { background: var(--blue); }
.guia ol.flux > li.amar { background: color-mix(in srgb, var(--amber-bg) 70%, var(--surface)); border-color: var(--amber-border); } .guia ol.flux > li.amar .num { background: #b45309; }
.guia ol.flux > li.verm { background: color-mix(in srgb, var(--red-bg) 70%, var(--surface)); border-color: var(--red-border); } .guia ol.flux > li.verm .num { background: #c62828; }
.guia ol.flux > li.verde { background: color-mix(in srgb, var(--green-bg) 70%, var(--surface)); border-color: var(--green-border); } .guia ol.flux > li.verde .num { background: var(--green); }
.guia ol.flux > li.lar { background: color-mix(in srgb, var(--lar-c) 70%, var(--surface)); border-color: var(--lar-b); } .guia ol.flux > li.lar .num { background: #c55a11; }
.guia ol.flux .duas { margin: 8px 0 0; }
.guia .tw { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.guia table.t { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.guia table.t caption { background: var(--primary); color: #fff; font-weight: 700; text-align: left; padding: 6px 10px; }
.guia table.t th, .guia table.t td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 7px 10px; vertical-align: top; text-align: left; }
.guia table.t tr > :last-child { border-right: 0; }
.guia table.t tbody tr:last-child > * { border-bottom: 0; }
.guia table.t thead th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.guia table.t tbody th { background: var(--surface); color: var(--heading); font-weight: 700; }
.guia table.t th small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.guia table.t .c-verde { background: var(--green-bg); } .guia table.t .c-amar { background: var(--amber-bg); } .guia table.t .c-verm { background: var(--red-bg); }
.guia table.t .c-azul { background: var(--blue-bg); } .guia table.t .c-lar { background: var(--lar-c); }
.guia table.peso td, .guia table.peso thead th[data-kg] { text-align: center; font-variant-numeric: tabular-nums; }
/* coluna do peso da criança na COR DA FAIXA */
.guia table.peso .kg-on { background: var(--zf) !important; box-shadow: inset 2px 0 0 var(--zc), inset -2px 0 0 var(--zc); font-weight: 800; color: var(--text); }
.guia table.peso thead .kg-on { background: var(--zc) !important; color: var(--zt) !important; }
.guia table.peso .kg-viz { background: color-mix(in srgb, var(--zf) 55%, var(--surface)) !important; box-shadow: inset 2px 0 0 color-mix(in srgb, var(--zc) 55%, transparent), inset -2px 0 0 color-mix(in srgb, var(--zc) 55%, transparent); }
.guia table.peso thead .kg-viz { background: color-mix(in srgb, var(--zc) 45%, var(--surface)) !important; }
.guia tr.faixa-on > * { background: var(--zf) !important; font-weight: 700; color: var(--text); }
.guia tr.faixa-on > :first-child { box-shadow: inset 5px 0 0 var(--zc); }
.guia .aviso-kg { background: var(--zf); border: 2px dashed var(--zc); color: var(--text); padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.escore .grade { display: grid; gap: 6px; font-size: 14px; align-items: stretch; }
.escore .grade > b { align-self: center; }
.escore button.op { text-align: left; border: 1.5px solid var(--input); border-radius: 8px; padding: 7px 10px; background: var(--surface); color: var(--text); min-height: 44px; }
.escore button.op[aria-pressed="true"].c0 { border: 2px solid var(--verde-b); background: var(--verde-c); font-weight: 700; }
.escore button.op[aria-pressed="true"].c1 { border: 2px solid var(--amar-b); background: var(--amar-c); font-weight: 700; }
.escore button.op[aria-pressed="true"].c2 { border: 2px solid var(--verm-b); background: var(--verm-c); font-weight: 700; }
.escore button.op:disabled { opacity: .35; cursor: default; }
.resultado { border-radius: 10px; padding: 10px 14px; font-size: 17px; margin-top: 12px; }
.resultado.c0 { background: var(--verde-c); border: 2px solid var(--verde-b); }
.resultado.c1 { background: var(--amar-c); border: 2px solid var(--amar-b); }
.resultado.c2 { background: var(--verm-c); border: 2px solid var(--verm-b); }
.doses-conduta { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.doses-conduta li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.doses-conduta li a { color: var(--heading); font-weight: 700; text-decoration: none; }
.doses-conduta li small { display: block; color: var(--muted); font-size: 13px; }
.doses-conduta .num { font-size: 26px; text-align: right; }
.doses-conduta li.bloq { background: var(--red-bg); }
.doses-conduta .chip { display: inline-block; margin-top: 4px; }

/* ---------- Calculadoras ---------- */
.menu-calc a { display: flex; flex-direction: column; gap: 2px; padding: 9px 8px; border-radius: 8px; border-top: 1px solid var(--line); text-decoration: none; min-height: 44px; }
.menu-calc a:first-of-type { border-top: 0; }
.menu-calc a span { font-size: 15px; font-weight: 600; color: var(--heading); }
.menu-calc a small { font-size: 12.5px; color: var(--muted); }
.menu-calc a[aria-current="page"] { background: var(--blue-bg); }
.menu-calc a[aria-current="page"] span { color: var(--blue); font-weight: 700; }
.plano { border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.plano.A { background: var(--verde-c); border: 2px solid var(--verde-b); }
.plano.B { background: var(--amar-c); border: 2px solid var(--amar-b); }
.plano.C { background: var(--verm-c); border: 2px solid var(--verm-b); }
.plano .cab b { font-family: var(--cond); font-size: 30px; }
.plano .caixas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.plano .caixas > div { background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.plano .caixas small { font-size: 12px; color: var(--muted); display: block; }
.plano .caixas .num { font-size: 28px; white-space: normal; }
.kg { font-weight: 700; color: var(--heading); background: var(--chip-bg); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.t-simples { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t-simples th, .t-simples td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); }
.t-simples th { font-size: 12px; letter-spacing: .4px; color: var(--muted); border-top: 0; }
.t-simples td.num { font-size: 20px; }

/* ---------- Gestão ---------- */
.indicadores > div { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 12px; padding: 10px 14px; }
.indicadores .num { font-size: 32px; color: var(--c); }
.indicadores small { font-size: 13px; color: var(--text-2); }
.t-pend .cab, .t-pend .lin { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 130px 210px; }
.t-usu .cab, .t-usu .lin { grid-template-columns: minmax(0, 1.2fr) 130px 140px 150px 180px 200px; }
.t-err .cab, .t-err .lin { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 110px 230px; }
.t-aud .cab, .t-aud .lin { grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 100px; }
.sit { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.sit.ativo { background: var(--green-bg); color: var(--green-dark); }
.sit.pendente, .sit.aceite { background: var(--amber-bg); color: var(--amber); }
.sit.suspenso, .sit.revogado { background: var(--red-bg); color: var(--red-dark); }
.sit.novo { background: var(--blue-bg); color: var(--blue-dark); }
.filtros-aud { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto; gap: 10px; align-items: end; }
.filtros-aud label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.filtros-aud input, .filtros-aud select { font-size: 14px; background: var(--input-bg); border: 1.5px solid var(--input); border-radius: 8px; padding: 8px 10px; min-height: 40px; color: var(--text); }
.hash { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

/* ---------- Modo PCR (sempre escuro) ---------- */
.pcr { min-height: 100vh; display: flex; flex-direction: column; background: #0f1720; color: #fff; font-family: var(--sans); }
.pcr a { color: #9cc2ff; }
.pcr-faixa { background: var(--z-fundo); color: var(--z-texto); display: flex; align-items: center; gap: 16px; padding: 10px 28px; flex-wrap: wrap; border-bottom: 4px solid var(--z-cor); }
.pcr-faixa .tag { background: #c62828; color: #fff; font-weight: 700; border-radius: 6px; padding: 4px 10px; letter-spacing: 1px; }
.pcr-faixa .tag.ok { background: #2f7d32; }
.pcr-faixa .peso { font-family: var(--cond); font-weight: 700; font-size: 28px; }
.pcr-faixa .seg2 { display: flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; }
.pcr-faixa .seg2 a { color: inherit; font-weight: 600; text-decoration: none; padding: 6px 14px; min-height: 36px; display: inline-flex; align-items: center; }
.pcr-faixa .seg2 a.on { background: var(--z-texto); color: var(--z-fundo); }
.pcr-faixa .sair { color: inherit; font-weight: 600; text-decoration: none; border: 1.5px solid currentColor; border-radius: 999px; padding: 6px 14px; background: transparent; min-height: 40px; }
.pcr-corpo { display: flex; flex-wrap: wrap; gap: 20px; padding: 24px 28px; }
.pcr-col { display: flex; flex-direction: column; gap: 12px; }
.pcr-col.a { flex: 1 1 300px; } .pcr-col.b { flex: 2 1 460px; } .pcr-col.c { flex: 1 1 300px; }
.relogio { background: #17222d; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.relogio .rot { font-size: 13px; letter-spacing: 1.5px; color: #9fb0c6; text-align: center; }
.relogio .tempo { font-family: var(--mono); font-weight: 500; font-size: 104px; line-height: 1; color: #ffd34d; font-variant-numeric: tabular-nums; }
.relogio .tempo.alerta { color: #ff6b6b; animation: pisca 1s steps(2) infinite; }
@keyframes pisca { 50% { opacity: .45; } }
.relogio .barra { width: 100%; height: 10px; background: #24313f; border-radius: 999px; overflow: hidden; }
.relogio .barra div { height: 10px; background: #ffd34d; }
.relogio .total { font-size: 15px; color: #c9d6ea; }
.relogio .total b { font-family: var(--mono); font-size: 20px; color: #fff; }
.pcr button { font-family: inherit; }
.pcr .b-azul { background: #1d5fb8; color: #fff; border: 0; border-radius: 12px; padding: 16px; font-size: 20px; font-weight: 700; text-align: left; min-height: 56px; }
.pcr .b-azul span, .pcr .b-ritmo span { display: block; font-size: 14px; font-weight: 500; }
.pcr .b-cinza { background: #24313f; color: #fff; border: 0; border-radius: 12px; padding: 14px 16px; font-size: 18px; font-weight: 600; text-align: left; min-height: 52px; }
.pcr .b-cinza[aria-pressed="true"] { outline: 3px solid #46a758; }
.pcr .dica { margin: 0; font-size: 14px; color: #9fb0c6; line-height: 1.5; }
.ritmos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcr .b-ritmo { background: #17222d; color: #fff; border: 3px solid #33414f; border-radius: 12px; padding: 14px; font-size: 20px; font-weight: 700; text-align: left; min-height: 64px; }
.pcr .b-ritmo span { color: #c9d6ea; }
.pcr .b-ritmo[aria-pressed="true"].choc { border-color: #f5a524; background: #3a2a0b; }
.pcr .b-ritmo[aria-pressed="true"].nchoc { border-color: #5aa9ff; background: #0d2a45; }
.proximo { background: #17222d; border-radius: 12px; padding: 12px 16px; font-size: 18px; }
.proximo b { color: #ffd34d; }
.b-droga { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; color: #fff; border: 0; border-radius: 14px; padding: 16px 18px; text-align: left; min-height: 64px; width: 100%; }
.b-droga b { font-size: 22px; }
.b-droga .d { display: block; font-size: 14px; }
.b-droga .st { display: block; font-size: 14px; font-weight: 700; color: #b9f6c5; }
.b-droga .v { font-family: var(--cond); font-weight: 700; font-size: 40px; white-space: nowrap; }
.b-droga.adr { background: #b3261e; } .b-droga.choque { background: #b56a09; } .b-droga.amio { background: #6a3591; } .b-droga.lido { background: #4a3a7a; } .b-droga.glic { background: #2f7d32; }
.b-droga:disabled { opacity: .5; cursor: not-allowed; }
.b-droga.bloq { background: #3a1d1d; }
.registro { background: #fff; color: #14202e; border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 14px; line-height: 1.7; min-height: 240px; max-height: 420px; overflow: auto; }
.registro .vazio { color: #5b6778; }
.cincoht { background: #17222d; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #c9d6ea; line-height: 1.5; }
.cincoht b { color: #fff; }
.pcr .b-rce { display: block; text-align: center; background: #1e8449; color: #fff; border: 0; border-radius: 12px; padding: 14px; font-size: 18px; font-weight: 700; width: 100%; min-height: 52px; }
.pcr .b-fim { display: block; text-align: center; color: #ff9c94; background: transparent; border: 1.5px solid #ff9c94; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600; width: 100%; min-height: 48px; }
.pcr .b-desfazer { background: transparent; color: #9fb0c6; border: 1px dashed #4a5a6c; border-radius: 10px; padding: 8px 12px; font-size: 13px; min-height: 40px; }
.fluxo { margin: 0 28px 28px; background: #121c27; border: 1px solid #24313f; border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.fluxo h2 { margin: 0; font-family: var(--cond); font-size: 26px; color: #fff; }
.fluxo .cab { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fluxo .cab span { font-size: 13px; color: #9fb0c6; }
.fluxo .no { background: #24313f; border-radius: 10px; padding: 10px 18px; text-align: center; font-size: 15px; max-width: 900px; }
.fluxo .seta { color: #6c7d92; }
.fluxo .ramos { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fluxo .ramo { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.fluxo .ramo .t { border-radius: 10px; padding: 9px; font-weight: 700; font-size: 17px; }
.fluxo .ramo .t.choc { background: #3a2a0b; border: 2px solid #f5a524; }
.fluxo .ramo .t.nchoc { background: #0d2a45; border: 2px solid #5aa9ff; }
.fluxo .ramo .p { border: 1px solid #33414f; border-radius: 10px; padding: 9px; font-size: 15px; }
.fluxo .p.aqui, .fluxo .no.aqui { border: 3px solid #ffd34d; background: #2b2610; }
.fluxo .rce { background: #1e5a2b; border: 2px solid #46a758; }
.fluxo .extras { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.fluxo .extras > div { background: #17222d; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.fluxo .extras b:first-child { color: #ffd34d; }
.pcr-rodape { border-top: 1px solid #24313f; padding: 10px 28px; font-size: 13px; color: #9fb0c6; margin-top: auto; }
.relatorio { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 20px; align-items: start; max-width: 1240px; width: 100%; margin: 0 auto; padding: 22px 28px; }
.relatorio h1 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 30px; color: #fff; }
.relatorio .texto { background: #fff; color: #14202e; border-radius: 12px; padding: 14px 16px; font-family: var(--mono); font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.relatorio .fmt { display: flex; gap: 6px; flex-wrap: wrap; }
.relatorio .fmt button { font-size: 14px; font-weight: 700; border-radius: 999px; padding: 6px 12px; border: 1.5px solid #9fb0c6; background: transparent; color: #fff; min-height: 40px; }
.relatorio .fmt button[aria-pressed="true"] { background: #ffd34d; color: #14202e; border-color: #ffd34d; }
.relatorio .copiar { width: 100%; background: #ffd34d; color: #14202e; border: 0; border-radius: 12px; padding: 15px; font-size: 18px; font-weight: 700; min-height: 52px; }
.relatorio .copiado { text-align: center; font-size: 14px; font-weight: 700; color: #b9f6c5; }
.relatorio .antes { background: #17222d; border-radius: 12px; padding: 14px 16px; }
.relatorio .antes h2 { margin: 0 0 8px; font-size: 15px; color: #ffd34d; }
.relatorio .antes ul { margin: 0; padding-left: 18px; color: #dbe4f0; font-size: 14px; line-height: 1.45; }
.relatorio .voltar { display: block; text-align: center; color: #fff; border: 1.5px solid #9fb0c6; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; background: transparent; width: 100%; min-height: 48px; }
.relatorio .apagar { display: block; text-align: center; color: #ff9e9e; border: 1.5px solid #ff9e9e; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; background: transparent; width: 100%; min-height: 48px; }

/* ---------- Celular (390 px): abas embaixo, faixa compacta ---------- */
@media (max-width: 760px) {
  :root { --gutter: 14px; }
  body { font-size: 15px; }
  .so-desk { display: none !important; }
  .so-cel { display: inline-flex !important; }
  .topo { padding: 8px 14px; gap: 10px; flex-wrap: nowrap; }
  .topo .logo-upa { height: 32px; }
  .topo .marca svg { width: 28px; height: 28px; }
  .topo .icone-btn { width: 44px; height: 44px; }
  .topo:has([data-acao="menu-cel"]) > .icone-btn[data-acao="tema-cel"] { display: none !important; }
  html, body { overflow-x: hidden; }
  .topo .logo-pref, .topo .sep.s2, .marca-nome small { display: none; }
  .topo .sep { height: 26px; }
  .marca-nome b { font-size: 19px; }
  .busca { position: absolute; left: 0; right: 0; top: 100%; max-width: none; background: var(--surface); padding: 8px 14px; border-bottom: 1px solid var(--border); display: none; }
  .busca.aberta { display: block; }
  .busca-res { left: 14px; right: 14px; }
  .faixa { padding: 8px 14px; gap: 10px; flex-wrap: nowrap; }
  .faixa .barra { width: 12px; height: 40px; border-radius: 4px; }
  .faixa .peso { font-size: 28px; }
  .faixa .grupo1 { flex-direction: column; gap: 0; align-items: flex-start; flex: 1; min-width: 0; }
  .faixa .idade { font-size: 12.5px; }
  .faixa .grupo2 { display: none; }
  .faixa .espaco { display: none; }
  .btn-pcr { padding: 9px 12px; font-size: 14px; gap: 5px; }
  .btn-trocar { padding: 9px 12px; font-size: 14px; }
  .regua-mini { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; padding: 8px 14px 0; align-items: end; }
  .regua-mini span { height: 10px; border-radius: 2px; }
  .regua-mini span.atual { height: 18px; outline: 2px solid var(--heading); }
  .abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(var(--n-abas, 4), minmax(0, 1fr)); gap: 0; padding: 0 0 max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); border-bottom: 0; }
  .abas a { flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 12px; border-bottom: 0; border-top: 3px solid transparent; min-height: 56px; justify-content: center; }
  .abas a svg { display: inline; }
  .abas a[aria-current="page"] { border-top-color: var(--aba-cor); border-bottom: 0; }
  #app.com-abas { padding-bottom: 72px; }
  .subabas { padding: 8px 14px; overflow-x: auto; flex-wrap: nowrap; }
  .subabas .rot { display: none; }
  .subabas a { white-space: nowrap; }
  main.conteudo { padding: 12px 14px 16px; gap: 10px; }
  .titulo h1 { font-size: 26px; }
  .rodape { padding: 6px 14px; font-size: 11px; line-height: 1.35; }
  .grade-2, .grade-3, .grade-4, .atalhos { grid-template-columns: minmax(0, 1fr); }
  .indicadores.grade-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duas-col { gap: 12px; }
  .duas-col > .lateral.recolher { order: 2; }
  .lista-az { position: static; max-height: none; display: none !important; }
  .regua, .regua-cartao { display: none !important; }
  .linha-dose { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 12px; }
  .linha-dose .detalhe { grid-column: 1 / -1; }
  .linha-dose .chip { grid-column: 1 / -1; justify-self: start; }
  .linha-dose .num { font-size: 24px; text-align: right; }
  .tabela .cab { display: none; }
  .tabela .lin { grid-template-columns: minmax(0, 1fr) !important; gap: 4px; padding: 10px 12px; }
  .tabela .rot-cel { display: inline; font-size: 12px; color: var(--muted); font-weight: 600; }
  .login-topo { padding: 12px 14px; gap: 12px; }
  .login-topo .upa { height: 48px; } .login-topo .pref { height: 50px; } .login-topo .txt { display: none; }
  .login-marca { padding: 28px 20px; gap: 16px; flex-basis: 100%; }
  .login-marca .nome { font-size: 48px; }
  .login-marca .sub { font-size: 13px; letter-spacing: 3px; }
  .login-marca p { font-size: 16px; }
  .login-marca .tags, .login-marca svg { display: none; }
  .login-form-area { padding: 16px 14px 24px; }
  .login-form { padding: 22px 18px; }
  .termo-grade { grid-template-columns: minmax(0, 1fr); }
  .termo-texto { height: 340px; }
  .crianca-cartao { padding: 18px 16px; gap: 16px; }
  .crianca-linha { gap: 16px; }
  .ent-grande { width: 84px; }
  .ent-grande.peso { width: 120px; }
  .cartao-via .num { font-size: 40px; }
  .cartoes-via { grid-template-columns: minmax(0, 1fr); }
  .filtros { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 4px; }
  .filtros > span { display: none; }
  .filtros button { flex: none; white-space: nowrap; }
  .filtros input { flex: 0 0 180px; }
  .guia .duas, .guia .tres, .fluxo .ramos, .fluxo .extras { grid-template-columns: minmax(0, 1fr); }
  .guia .tema { padding: 12px; }
  .guia .tt { font-size: 21px; }
  .escore .grade { grid-template-columns: minmax(0, 1fr) !important; }
  .escore .grade .cabcol { display: none; }
  .filtros-aud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcr-faixa { padding: 8px 12px; gap: 8px; }
  .pcr-faixa .info { display: none; }
  .pcr-faixa .seg2 { display: none; }
  .pcr-corpo { padding: 12px; gap: 10px; flex-direction: column; flex-wrap: nowrap; }
  .pcr-col { display: contents; }
  .pcr-col > * { order: 10; }
  .pcr-col .relogio { order: 1; } .pcr-col .ritmos { order: 2; } .pcr-col #proximo { order: 3; } .pcr-col #botoes-drogas { order: 4; }
  .pcr-col .b-azul { order: 5; } .pcr-col #b-metro { order: 6; } .pcr-col .b-rce { order: 7; } .pcr-col .b-fim { order: 8; }
  .pcr-faixa .sair { padding: 6px 12px; }
  .relogio .tempo { font-size: 72px; }
  .b-droga .v { font-size: 30px; }
  .b-droga b { font-size: 17px; }
  .b-droga .d, .b-droga .st { font-size: 12px; }
  .fluxo { margin: 0 12px 12px; padding: 14px; }
  .relatorio { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .relatorio .texto { font-size: 13px; }
  .pcr-rodape { padding: 8px 12px; font-size: 11px; }
  .caixa { padding: 18px 16px; }
}
@media print {
  .topo, .abas, .faixa, .rodape, .subabas, .faixa-demo { display: none !important; }
}

/* Toque (celular/tablet): alvos de pelo menos 44 px */
@media (pointer: coarse) {
  .botao.peq, .filtros button, .tema button, .apres-barra button, .subabas a, .relatorio .fmt button, .busca-res a, .lista-condutas a, .menu-calc a { min-height: 44px; }
}
