/* FicaQuanto: azul royal, dourado e marsala. Uma coluna de app, barra de menu fixa embaixo. */
/* Letras guardadas no app (licença SIL OFL, em assets/fontes) para abrir igual sem internet. */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../assets/fontes/sora-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: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../assets/fontes/nunito-sans-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;
}
:root {
  --page: #f5f7fc;
  --card: #ffffff;
  --ink: #111633;
  --muted: #586080;
  --line: #e0e5f0;
  --axis: #c9cfdf;
  --blue: #2846b0;
  --blue-soft: #e3e8fb;
  --btn: #2846b0;
  --gold: #d4a23c;
  --gold-ink: #87600f;
  --marsala: #8c2f39;
  --marsala-soft: #f7e7e9;
  --good: #1d7a45;
  --warn: #9a6200;
  --bad: #b3261e;
  --waze: #33ccff;
  --waze-ink: #04263a;
  --hero-bg: #2846b0;
  --hero-ink: #ffffff;
  --hero-muted: #c9d3ff;
  --hero-gold: #f2c560;
  --hero-cost: #e8909a;
  --hero-res: #9fb3ff;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d1122; --card: #161b31; --ink: #edf0fa; --muted: #a2a9c4; --line: #262d48; --axis: #3a4262;
    --blue: #7d96ff; --blue-soft: #1d2652; --btn: #3f5ee0; --gold: #e0b453; --gold-ink: #ecc574; --marsala: #e48791; --marsala-soft: #3a1d24;
    --good: #4cc483; --warn: #e8b23a; --bad: #f07a72; --hero-bg: #1a2a7a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--page); }
img { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; line-height: 1.15; }
p { margin: 0; }
small { font-size: .8rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.app { max-width: 560px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.appbar { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: sticky; top: env(safe-area-inset-top, 0px); background: var(--page); z-index: 3; }
.appbar img { width: 34px; height: 34px; border-radius: 9px; }
.appbar .wm { font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.appbar .wm b { color: var(--gold-ink); }
.appbar h2 { font-size: 1.05rem; }
.back { display: flex; align-items: center; gap: 2px; border: 0; background: none; padding: 6px 6px 6px 0; color: var(--blue); font-weight: 700; }
.view { padding: 4px 16px 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 14px; }
.view > header { display: grid; gap: 2px; }
.view > header h1 { font-size: 1.45rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.card h3 { font-size: 1rem; }
.sub { color: var(--muted); font-size: .88rem; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.selo { font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: var(--blue); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

.hero { background: var(--hero-bg); color: var(--hero-ink); border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.hero-label { color: var(--hero-muted); font-weight: 700; font-size: .9rem; }
.hero-num { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--hero-gold); }
.hero-sub { color: var(--hero-muted); font-size: .88rem; }
.hbar { display: flex; gap: 2px; height: 10px; }
.hbar i { display: block; height: 100%; }
.hbar i:first-child { border-radius: 4px 0 0 4px; }
.hbar i:last-child { border-radius: 0 4px 4px 0; }
.hleg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--hero-muted); }
.hleg span { display: inline-flex; align-items: center; gap: 6px; }
.hleg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 2px; }
.tile span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tile b { font-family: var(--display); font-size: 1.08rem; }

.alert { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--marsala-soft); font-size: .9rem; }
.alert.info { background: var(--blue-soft); }
.alert .ic { color: var(--marsala); }
.alert.info .ic { color: var(--blue); }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tab { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-weight: 800; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.tab.add { border-style: dashed; color: var(--blue); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: .78rem; color: var(--muted); font-weight: 800; }
.inwrap { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); padding: 0 10px; }
.inwrap input { border: 0; background: transparent; font: inherit; font-size: 1.05rem; font-weight: 800; color: var(--ink); padding: 9px 0; width: 100%; min-width: 0; outline: none; }
.inwrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.inwrap em { font-style: normal; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.step { display: flex; gap: 10px; align-items: center; }
.step i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: .8rem; display: grid; place-items: center; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .88rem; }
.chip[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.sumline { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .86rem; color: var(--muted); }
.sumline span { display: inline-flex; gap: 6px; align-items: center; }
.result { position: sticky; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); background: var(--page); padding-top: 4px; display: grid; gap: 8px; }
.result-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--hero-bg); color: var(--hero-ink); border-radius: 16px; padding: 12px 14px; }
.result-box b { font-family: var(--display); font-size: 1.5rem; color: var(--hero-gold); }
.btn { display: flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 16px; font-weight: 800; font-size: 1rem; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--btn); color: #ffffff; }
.btn-gold { background: var(--gold); color: #1d1606; }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: none; border: 1px solid var(--marsala); color: var(--marsala); }
.btn-waze { background: var(--waze); color: var(--waze-ink); }
.link { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 700; font-size: .82rem; text-align: left; text-decoration: underline; }
.pbox { background: color-mix(in srgb, var(--gold) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.pval { font-family: var(--display); font-size: 1.5rem; font-weight: 800; color: var(--gold-ink); }
.pfeitas { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }

.env { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.env:last-of-type { border-bottom: 0; }
.env .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--marsala-soft); color: var(--marsala); }
.env .ic.g { background: color-mix(in srgb, var(--gold) 22%, var(--card)); color: var(--gold-ink); }
.env b { font-variant-numeric: tabular-nums; }
.env .what { display: grid; gap: 4px; min-width: 0; }
.retirar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.you { background: color-mix(in srgb, var(--gold) 16%, var(--card)); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.you .big { font-family: var(--display); font-size: 1.6rem; font-weight: 800; color: var(--gold-ink); }
.st { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st.ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.st.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.st.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

.hb { display: grid; grid-template-columns: 82px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: .86rem; }
.hb-app { grid-template-columns: 96px minmax(0, 1fr) 82px; }
.hb .nome { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .track { height: 10px; border-left: 1px solid var(--axis); }
.hb .track i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }
.mesnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-transform: capitalize; }

.list { display: grid; padding-block: 4px; }
.li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.li:last-child { border-bottom: 0; }
.li-dia { grid-template-columns: minmax(0, 1fr) auto 16px; }
.li .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.li b, .li small { display: block; }
.li .chev { color: var(--muted); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; max-width: 560px; margin: 0 auto; background: var(--card); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
.nav button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: .68rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.nav button[aria-current="true"] { color: var(--blue); }
.nav .fab { position: relative; top: -14px; color: var(--ink); }
.nav .fab span.c { width: 54px; height: 54px; border-radius: 50%; background: var(--gold); color: #1d1606; display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(120, 80, 0, .6); border: 4px solid var(--card); }

.toast { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); max-width: 528px; margin: 0 auto; background: var(--ink); color: var(--page); padding: 12px 14px; border-radius: 12px; font-weight: 800; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 6; }
.toast.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Telas de "Mais" */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mi { display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sbar { display: flex; gap: 2px; height: 14px; }
.sbar i { display: block; height: 100%; }
.sbar i:first-child { border-radius: 4px 0 0 4px; }
.sbar i:last-child { border-radius: 0 4px 4px 0; }
.leg { display: grid; gap: 6px; }
.leg .r { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: .88rem; }
.leg .r > small { min-width: 38px; text-align: right; }
.vbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 100%; align-items: end; gap: 6px; height: 140px; border-bottom: 1px solid var(--axis); }
.vb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.vb i { width: 62%; max-width: 26px; background: var(--blue); border-radius: 4px 4px 0 0; display: block; }
.vb.best i { background: var(--gold); }
.vb span { font-size: .66rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.vlabels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: .74rem; color: var(--muted); font-weight: 700; }
.verdict { border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.verdict.ok { background: color-mix(in srgb, var(--good) 14%, var(--card)); }
.verdict.warn { background: color-mix(in srgb, var(--warn) 16%, var(--card)); }
.verdict.bad { background: color-mix(in srgb, var(--bad) 13%, var(--card)); }
.verdict b { font-family: var(--display); font-size: 1.25rem; }
.verdict.ok b { color: var(--good); }
.verdict.warn b { color: var(--warn); }
.verdict.bad b { color: var(--bad); }
.switch { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; transition: left .15s; }
.switch:checked { background: var(--good); }
.switch:checked::after { left: 19px; }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }
