@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url(fonts/Inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url(fonts/Inter-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-weight: 600 800; font-display: swap; src: url(fonts/InterTight-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-weight: 600 800; font-display: swap; src: url(fonts/InterTight-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ───── tokens (claro) ───── */
:root {
  --bg: #F2F2F7; --card: #FFFFFF; --card2: #FAFAFC; --fill: rgba(118, 118, 128, .12); --fill2: rgba(118, 118, 128, .08);
  --tx: #1D1D1F; --tx2: #6E6E73; --tx3: #AEAEB2; --sep: rgba(60, 60, 67, .14);
  --tint: #007AFF; --tint-bg: rgba(0, 122, 255, .1); --red: #FF3B30; --red-bg: rgba(255, 59, 48, .09); --amber: #FF9500; --amber-bg: rgba(255, 149, 0, .12); --green: #34C759;
  --grad: linear-gradient(90deg, #5AC8FA 0%, #7B61FF 50%, #FF6AD5 100%);
  --glass: rgba(249, 249, 251, .78); --aba: #999; --shadow: 0 1px 1px rgba(0, 0, 0, .02), 0 8px 24px -12px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.2, .7, .1, 1); --r: 22px; --r-s: 14px;
  color-scheme: light;
}
/* ───── escuro (automático ou escolhido) ───── */
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) {
  --bg: #000; --card: #141419; --card2: #1B1B22; --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .14);
  --tx: #F5F5F7; --tx2: #86868B; --tx3: #48484A; --sep: rgba(255, 255, 255, .09);
  --tint: #2997FF; --tint-bg: rgba(41, 151, 255, .14); --red: #FF453A; --red-bg: rgba(255, 69, 58, .14); --amber: #FFB340; --amber-bg: rgba(255, 179, 64, .14); --green: #30D158;
  --glass: rgba(22, 22, 26, .72); --aba: #6E6E73; --shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  color-scheme: dark;
} }
:root[data-tema="escuro"] {
  --bg: #000; --card: #141419; --card2: #1B1B22; --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .14);
  --tx: #F5F5F7; --tx2: #86868B; --tx3: #48484A; --sep: rgba(255, 255, 255, .09);
  --tint: #2997FF; --tint-bg: rgba(41, 151, 255, .14); --red: #FF453A; --red-bg: rgba(255, 69, 58, .14); --amber: #FFB340; --amber-bg: rgba(255, 179, 64, .14); --green: #30D158;
  --glass: rgba(22, 22, 26, .72); --aba: #6E6E73; --shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--tx); font: 400 17px/1.47 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.011em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.travado { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; letter-spacing: inherit; }
input, textarea, select { font: inherit; color: var(--tx); letter-spacing: inherit; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#app { max-width: 600px; margin: 0 auto; min-height: 100vh; min-height: 100svh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
#tela > * { animation: entra .45s var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.pad { padding: 0 16px 28px; }

/* ───── barra de navegação + título grande ───── */
.nb { position: sticky; top: 0; z-index: 20; height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  transition: background .3s, border-color .3s; border-bottom: .5px solid transparent; }
.nb.rolou { background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--sep); }
.nb-t { font-weight: 600; font-size: 17px; letter-spacing: -.02em; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.nb.rolou .nb-t { opacity: 1; transform: none; }
.nb-v { justify-self: start; display: flex; align-items: center; color: var(--tint); font-size: 17px; padding: 6px 4px; }
.nb-v svg.i { width: 26px; height: 26px; margin-right: -2px; stroke-width: 2.2; }
.nb-dir { justify-self: end; display: flex; align-items: center; gap: 2px; }
.nb-a { color: var(--tint); font-size: 17px; padding: 6px 8px; }
.nb-tema { width: 36px; height: 36px; margin-right: 4px; border-radius: 50%; display: grid; place-items: center; color: var(--tint); background: var(--fill2); transition: transform .4s var(--ease), background .2s; }
.nb-tema:active { transform: scale(.88) rotate(-30deg); }
.nb-tema svg.i { width: 20px; height: 20px; stroke-width: 2; }
.bv-tema { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.grande { padding: 2px 16px 18px; }
.grande small { display: block; font-size: 15px; font-weight: 500; color: var(--tx2); margin-bottom: 2px; }
.grande h1 { font-family: "Inter Tight", Inter, sans-serif; font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
.grande p { margin-top: 8px; color: var(--tx2); font-size: 16px; line-height: 1.4; }
.avatar { width: 34px; height: 34px; margin-right: 6px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; }

/* ───── textos ───── */
.cab-sec { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--tx2); text-transform: uppercase; letter-spacing: .02em; margin: 28px 16px 8px; }
.cab-sec a, .cab-sec button { color: var(--tint); text-transform: none; font-size: 15px; letter-spacing: -.01em; }
.pad .cab-sec { margin-left: 16px; margin-right: 16px; }
.rodape-sec { font-size: 13px; color: var(--tx2); margin: 8px 16px 0; line-height: 1.4; }
.titulo-sec { font-family: "Inter Tight"; font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin: 30px 4px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.titulo-sec a { font-family: Inter; font-size: 15px; font-weight: 500; color: var(--tint); letter-spacing: -.01em; }
.vazio { color: var(--tx2); text-align: center; padding: 40px 16px; font-size: 15px; }
.vazio a { color: var(--tint); }
.grad-t { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───── busca ───── */
.busca { display: flex; align-items: center; gap: 6px; height: 40px; background: var(--fill); border-radius: 12px; padding: 0 10px; margin: 0 0 6px; color: var(--tx2); }
.busca svg.i { width: 18px; height: 18px; }
.busca input { border: 0; outline: 0; background: none; width: 100%; font-size: 17px; height: 100%; }
.busca input::placeholder { color: var(--tx2); }

/* ───── ícone em squircle colorido ───── */
.tile { --c: var(--tint); flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--fg, #fff); background: var(--c);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%); }
.tile svg.i { width: 18px; height: 18px; stroke-width: 2; }
.tile.g { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 6px 16px -8px var(--c); }
.tile.g svg.i { width: 27px; height: 27px; stroke-width: 1.9; }
.tile.m { width: 40px; height: 40px; border-radius: 11px; }
.tile.m svg.i { width: 22px; height: 22px; }

/* ───── listas agrupadas (estilo Ajustes) ───── */
.grupo { background: var(--card); border-radius: var(--r-s); overflow: hidden; box-shadow: var(--shadow); }
.grupo + .grupo { margin-top: 16px; }
.lin { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 10px 16px; text-align: left; transition: background .15s; }
.lin:active { background: var(--fill2); }
.lin + .lin::before { content: ""; position: absolute; top: 0; right: 0; left: 60px; border-top: .5px solid var(--sep); }
.lin.sem-ic + .lin::before, .lin.sem-ic::before { left: 16px; }
.lin .tx { flex: 1; min-width: 0; }
.lin .tx b { display: block; font-weight: 500; font-size: 17px; letter-spacing: -.02em; line-height: 1.25; }
.lin .tx small { display: block; color: var(--tx2); font-size: 14px; line-height: 1.32; margin-top: 2px; letter-spacing: -.005em; }
.lin .dir { color: var(--tx2); font-size: 16px; white-space: nowrap; }
.lin .chev { color: var(--tx3); width: 18px; height: 18px; stroke-width: 2.4; }
.lin.perigo .tx b { color: var(--red); }

/* ───── botões ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 17px; letter-spacing: -.015em;
  transition: transform .25s var(--ease), background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.prim { background: var(--tint); color: #fff; }
.btn.sec { background: var(--tint-bg); color: var(--tint); }
.btn.cinza { background: var(--fill); color: var(--tx); }
.btn.branco { background: #fff; color: #000; }
.btn.largo { width: 100%; }
.btn.peq { height: 34px; padding: 0 14px; font-size: 15px; }
.btn svg.i { width: 19px; height: 19px; stroke-width: 2; }
.link { color: var(--tint); font-size: 16px; padding: 12px; width: 100%; text-align: center; display: block; }

/* ───── início ───── */
.destaque { position: relative; isolation: isolate; display: block; margin: 6px 0 4px; border-radius: 26px; padding: 24px 22px 22px; color: #F5F5F7; background: #0B0B10; overflow: hidden; }
.destaque::before { content: ""; position: absolute; inset: -1.5px; border-radius: 27px; background: conic-gradient(from var(--ang, 0deg), #5AC8FA, #7B61FF, #FF6AD5, #FFB340, #5AC8FA); z-index: -2; animation: gira 7s linear infinite; }
.destaque::after { content: ""; position: absolute; inset: 0; border-radius: 26px; background: radial-gradient(120% 90% at 100% 0%, rgba(123, 97, 255, .35), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(90, 200, 250, .18), transparent 60%), #0B0B10; z-index: -1; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes gira { to { --ang: 360deg; } }
.destaque small { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #A1A1A6; }
.destaque h2 { font-family: "Inter Tight"; font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin: 8px 0 8px; }
.destaque p { color: #A1A1A6; font-size: 15px; line-height: 1.4; max-width: 330px; }
.destaque .btn { margin-top: 18px; height: 44px; font-size: 16px; }
.icones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
.ap { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; text-align: center; line-height: 1.22; color: var(--tx); letter-spacing: -.01em; transition: transform .25s var(--ease); }
.ap:active { transform: scale(.93); }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bx { position: relative; overflow: hidden; background: var(--card); border-radius: var(--r); padding: 16px; min-height: 132px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .25s var(--ease); }
.bx:active { transform: scale(.97); }
.bx b { margin-top: auto; font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; position: relative; }
.bx small { color: var(--tx2); font-size: 13.5px; line-height: 1.3; margin-top: 3px; position: relative; }
.bx .orbe { position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--c), transparent 70%); opacity: .22; }
.bx.largo { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.bx.largo b { margin: 0; }
.banner { position: relative; display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r); padding: 14px 40px 14px 14px; margin-top: 14px; box-shadow: var(--shadow); }
.banner .tx b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.banner .tx small { display: block; color: var(--tx2); font-size: 13.5px; line-height: 1.3; }
.banner .x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--fill); color: var(--tx2); display: grid; place-items: center; }
.banner .x svg.i { width: 14px; height: 14px; stroke-width: 2.6; }
.alerta { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-bg); color: var(--tx); border-radius: var(--r-s); padding: 12px 14px; font-size: 14.5px; line-height: 1.38; margin-top: 16px; }
.alerta svg.i { color: var(--amber); width: 20px; height: 20px; margin-top: 1px; }
.nota-hist { display: block; padding: 12px 16px; width: 100%; text-align: left; position: relative; }
.nota-hist + .nota-hist::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.nota-hist .topo-h { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.nota-hist .topo-h small { color: var(--tx2); font-weight: 400; font-size: 14px; }
.nota-hist p { color: var(--tx2); font-size: 14.5px; line-height: 1.38; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ───── formulário ───── */
.form-cartao { background: var(--card); border-radius: var(--r-s); box-shadow: var(--shadow); padding: 4px 16px; }
.cp { padding: 14px 0; position: relative; }
.cp + .cp::before { content: ""; position: absolute; top: 0; left: 0; right: -16px; border-top: .5px solid var(--sep); }
.cp[hidden], .cp.inline[hidden] { display: none; }
.cp .rot { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 10px; }
.cp .rot em { font-style: normal; font-weight: 400; color: var(--tx2); }
.cp.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; min-height: 50px; }
.cp.inline .rot { margin: 0; font-weight: 500; font-size: 17px; letter-spacing: -.02em; }
.cp.inline .valor { display: flex; align-items: center; gap: 6px; color: var(--tx2); font-size: 17px; }
.cp.inline input { width: 92px; text-align: right; border: 0; outline: 0; background: none; font-size: 17px; color: var(--tint); padding: 6px 0; font-variant-numeric: tabular-nums; }
.cp.inline input[type=time] { width: auto; color: var(--tint); }
.cp.inline input::placeholder { color: var(--tx3); }
.cp .pa { display: flex; align-items: center; gap: 4px; color: var(--tx2); }
.cp .pa input { width: 46px; text-align: center; }
.cp input[type=text], .cp textarea, .cp select, .entrada { width: 100%; border: 0; outline: 0; background: var(--fill2); border-radius: 12px; padding: 12px 14px; font-size: 17px; transition: box-shadow .2s; }
.cp input[type=text]:focus, .cp textarea:focus, .entrada:focus { box-shadow: 0 0 0 2px var(--tint); }
.cp textarea, textarea.entrada { resize: vertical; min-height: 90px; line-height: 1.45; }
.cp input::placeholder, .cp textarea::placeholder, .entrada::placeholder { color: var(--tx3); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--fill2); color: var(--tx); font-size: 15px; font-weight: 500; letter-spacing: -.015em; transition: background .2s, color .2s, transform .2s var(--ease); }
.pill:active { transform: scale(.95); }
.pill.on { background: var(--tint); color: #fff; }
.pills.rolar { flex-wrap: nowrap; overflow-x: auto; margin: 10px -16px 4px; padding: 0 16px; scrollbar-width: none; }
.pills.rolar::-webkit-scrollbar { display: none; }
.aviso-i { display: flex; gap: 10px; align-items: flex-start; background: var(--tint-bg); border-radius: var(--r-s); padding: 12px 14px; font-size: 14.5px; line-height: 1.4; margin-bottom: 16px; }
.aviso-i svg.i { color: var(--tint); width: 20px; height: 20px; margin-top: 1px; }

/* anotação gerada */
.doc { position: relative; background: var(--card); border-radius: var(--r); padding: 20px 18px 18px; box-shadow: var(--shadow); overflow: hidden; }
.doc::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.doc p { font-size: 16px; line-height: 1.6; letter-spacing: -.01em; }
.doc .ass { display: block; margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--sep); color: var(--tx2); font-size: 14.5px; }
mark { background: var(--amber-bg); color: var(--amber); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.revisa { margin-top: 12px; background: var(--red-bg); border-radius: var(--r-s); padding: 4px 14px; }
.revisa p { display: flex; gap: 10px; margin: 10px 0; font-size: 14.5px; line-height: 1.4; }
.revisa p::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 7px; }
.revisa p.medio::before, .revisa p.baixo::before { background: var(--amber); }
.ok-rev { display: flex; gap: 8px; align-items: center; color: var(--green); font-weight: 600; font-size: 15px; margin-top: 12px; }
.ok-rev svg.i { width: 20px; height: 20px; }
.acao { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30; max-width: 576px; margin: 0 auto; display: flex; gap: 8px; padding: 8px;
  border-radius: 24px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 0 0 .5px var(--sep), 0 12px 32px -12px rgba(0, 0, 0, .3); }
.acao .btn { height: 46px; }
.acao .btn.prim { flex: 1; }
.form-pad { padding-bottom: 110px; }

/* ───── cálculos e escalas ───── */
.res { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px 18px; }
.res-l { padding: 14px 0; position: relative; }
.res-l + .res-l::before { content: ""; position: absolute; top: 0; left: 0; right: -18px; border-top: .5px solid var(--sep); }
.res-l span { display: block; font-size: 14px; color: var(--tx2); font-weight: 500; }
.res-l b { display: block; font-family: "Inter Tight"; font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.res-l:first-child b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-l small { display: block; font-size: 13px; color: var(--tx2); margin-top: 2px; }
.passos { margin-top: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.passos h3 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; color: var(--tx2); margin-bottom: 10px; }
.passos p { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 10px; background: var(--fill2); margin-top: 6px; letter-spacing: 0; }
.passos .nota { font-family: Inter; background: var(--amber-bg); font-size: 14px; letter-spacing: -.01em; }
.calc-vazio { color: var(--tx2); text-align: center; padding: 22px; font-size: 15px; }
.opc { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 11px 16px; text-align: left; font-size: 16.5px; letter-spacing: -.02em; }
.opc + .opc::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.opc:active { background: var(--fill2); }
.opc span { flex: 1; }
.opc em { font-style: normal; color: var(--tx2); font-size: 15px; font-variant-numeric: tabular-nums; }
.opc .ck { width: 20px; height: 20px; color: var(--tint); stroke-width: 2.6; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.opc.on .ck { opacity: 1; transform: none; }
.opc.on span { color: var(--tint); }
.total { display: flex; align-items: baseline; justify-content: space-between; }
.total b { font-family: "Inter Tight"; font-size: 56px; font-weight: 700; letter-spacing: -.05em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.interp { font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.botoes { display: flex; gap: 10px; margin-top: 14px; }
.botoes .btn { flex: 1; }

/* termos / regras */
.regra-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); color: var(--tx); font-weight: 600; font-size: 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.sigla b { min-width: 74px; font-weight: 600; color: var(--tint); font-size: 16px; }
.texto p { font-size: 16px; line-height: 1.55; margin-bottom: 14px; color: var(--tx); }
.texto p:last-child { margin: 0; }

/* ───── boas-vindas ───── */
.bv { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(40px + env(safe-area-inset-top)) 20px 32px; overflow: hidden; }
.bv .brilho { position: absolute; left: 50%; top: 12%; width: 560px; aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(123, 97, 255, .35), rgba(90, 200, 250, .12) 45%, transparent 70%); filter: blur(10px); pointer-events: none; z-index: -1; }
.bv-ic { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto; box-shadow: 0 20px 40px -14px rgba(123, 97, 255, .6); }
.bv h1 { font-family: "Inter Tight"; font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1.02; text-align: center; margin: 26px 0 12px; }
.bv > p { text-align: center; color: var(--tx2); font-size: 17px; line-height: 1.42; max-width: 380px; margin: 0 auto 28px; }
.bv .form-cartao { padding: 4px 16px 16px; }
.bv .btn { margin-top: 18px; }
.bv.aceite { justify-content: flex-start; }
.bv.aceite h1 { font-size: 34px; margin-top: 18px; }
.bv.aceite > p { margin-bottom: 16px; }
.termos-caixa { max-height: 46svh; overflow-y: auto; -webkit-overflow-scrolling: touch; border-radius: 18px; }
.doc.texto h3 { font-size: 15px; margin: 16px 0 4px; }
.aceite-ck { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 15px; line-height: 1.4; color: var(--tx); cursor: pointer; }
.aceite-ck input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: #0A84FF; }
.btn:disabled { opacity: .4; pointer-events: none; }
.miudo { font-size: 13px; color: var(--tx2); text-align: center; margin-top: 16px; }

/* ───── barra de abas ───── */
.abas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around; padding: 6px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); }
.abas[hidden] { display: none; }
.abas a { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--aba); font-size: 10.5px; font-weight: 500; letter-spacing: 0; padding: 2px 0; transition: color .2s; }
.abas a svg.i { width: 25px; height: 25px; stroke-width: 1.7; }
.abas a.ativo { color: var(--tint); }
.abas a.ativo svg.i { stroke-width: 2.1; }


/* ───── folha (sheet) e aviso ───── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; animation: fundo .3s ease both; }
.modal[hidden] { display: none; }
@keyframes fundo { from { background: rgba(0, 0, 0, 0); } }
.folha { width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 14px 14px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: sobe .45s var(--ease) both; }
@keyframes sobe { from { transform: translateY(100%); } }
.folha::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--tx3); margin: 0 auto 14px; }
.folha h2 { font-family: "Inter Tight"; font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 14px; }
.folha .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tx2); font-weight: 500; }
.folha .botoes { flex-direction: column; }
.folha .botoes .btn { width: 100%; flex: none; }
.folha textarea.entrada { min-height: 240px; background: var(--card); font-size: 16px; }
.passos-inst { list-style: none; margin: 0 0 18px; }
.passos-inst li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; font-size: 16px; line-height: 1.4; }
.passos-inst .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: #fff; font-weight: 600; font-size: 14px; display: grid; place-items: center; }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 80; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 0 0 .5px var(--sep), 0 10px 30px -10px rgba(0, 0, 0, .35);
  font-size: 15px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; animation: cai .5s var(--ease) both; }
.toast[hidden] { display: none; }
.toast svg.i { width: 20px; height: 20px; color: var(--green); stroke-width: 2.4; }
@keyframes cai { from { opacity: 0; transform: translate(-50%, -24px) scale(.95); } }

@media (prefers-reduced-motion: reduce) {
  #tela > *, .folha, .toast, .modal { animation: none; }
  .destaque::before { animation: none; }
}

/* interruptor (switch) e seletor estilo iOS */
.sw { position: relative; width: 51px; height: 31px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; }
.sw i { position: absolute; inset: 0; border-radius: 99px; background: var(--fill); transition: background .25s; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .3s var(--ease); }
.sw input:checked + i { background: var(--green); }
.sw input:checked + i::after { transform: translateX(20px); }
.sel { border: 0; outline: 0; background: none; color: var(--tint); font-size: 17px; text-align: right; appearance: none; -webkit-appearance: none; padding: 6px 0; cursor: pointer; }
.cp.inline input[type=text] { background: none; padding: 6px 0; text-align: right; color: var(--tint); border-radius: 0; }
.cp.inline input[type=text]:focus { box-shadow: none; }
.cp.inline select.sel { width: auto; background: none; padding: 6px 0; border-radius: 0; box-shadow: none; }
.cp.inline .rot { white-space: nowrap; }

/* ───── plantão, rascunhos, histórico (v8) ───── */
.plantao { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r); padding: 16px 16px 16px 18px; margin: 6px 0 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.plantao::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.plantao.off::before { background: var(--fill); }
.plantao .tx { flex: 1; min-width: 0; }
.plantao small { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--tx2); }
.plantao b { display: block; font-family: "Inter Tight"; font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin: 3px 0 2px; }
.plantao .tx > span { display: block; font-size: 13.5px; color: var(--tx2); line-height: 1.3; }
.plantao .btn { flex: none; height: 38px; padding: 0 16px; font-size: 15px; }
.pl-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); animation: pulsa 2s ease-in-out infinite; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 6%, transparent); } }
.vazio-cartao { background: var(--card); border-radius: var(--r); padding: 28px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.vazio-cartao > b { font-family: "Inter Tight"; font-size: 21px; letter-spacing: -.03em; margin-top: 4px; }
.vazio-cartao p { color: var(--tx2); font-size: 15px; line-height: 1.45; max-width: 340px; margin-bottom: 8px; }
.cab-nota { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--tx3); }
.cab-sec > span { text-transform: none; letter-spacing: 0; font-size: 13px; }
.nota-hist .pac { font-style: normal; font-size: 12px; font-weight: 600; color: var(--tint); background: var(--tint-bg); border-radius: 6px; padding: 2px 7px; margin-left: 8px; letter-spacing: 0; }
.doc .pre { white-space: pre-wrap; }
.total b.txt { font-size: 30px; }
.rodape-sec svg.i.mini { width: 13px; height: 13px; vertical-align: -2px; color: var(--green); margin-left: 2px; }
.pills.rolar + .pills.rolar { margin-top: 2px; }
.grupo + .form-cartao { margin-top: 8px; }
.form-cartao.paciente { margin-bottom: 14px; }
.cp.inline .rot { flex: 1 1 auto; min-width: 0; }

/* ───── AnotaEnf Pro ───── */
.selo-ar { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--red-bg); color: var(--red); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.alerta-ar { display: flex; gap: 12px; align-items: flex-start; background: var(--red-bg); border-radius: var(--r-s); padding: 14px; margin-top: 4px; }
.alerta-ar svg.i { color: var(--red); width: 24px; height: 24px; flex: none; }
.alerta-ar b { display: block; font-size: 16px; letter-spacing: -.015em; }
.alerta-ar small { display: block; color: var(--tx2); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.fi-l { padding: 12px 0; position: relative; }
.fi-l + .fi-l::before { content: ""; position: absolute; top: 0; left: 0; right: -18px; border-top: .5px solid var(--sep); }
.fi-l span { display: block; font-size: 13px; color: var(--tx2); font-weight: 500; }
.fi-l p { font-size: 16px; line-height: 1.4; margin-top: 3px; }
.fi-l.via { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fi-l.via p { text-align: right; margin: 0; }
.fi-l.via small { display: block; font-size: 13.5px; color: var(--tx2); line-height: 1.35; margin-top: 2px; }
.via-sim { font-style: normal; font-weight: 600; color: var(--green, #30D158); }
.via-nao { font-style: normal; font-weight: 600; color: var(--tx2); }
.fi-at p { font-size: 15px; line-height: 1.4; margin: 10px 0; }
