/* Fôlego — identidade "adesivo de rua": tinta índigo, marca-texto amarelo, tipografia condensada */
:root {
  --papel: #E6E7EA;
  --folha: #F7F7F8;
  --folha-2: #EDEEF1;
  --tinta: #111214;
  --tinta-2: #50545C;
  --tinta-3: #858993;
  --linha: #D2D4D9;
  --contorno: #111214;
  --caneta: #C8FF3D;
  --caneta-tinta: #141A00;
  --caneta-texto: #4E6A00;
  --caneta-suave: #EAF7C8;
  --marca: #C8FF3D;
  --marca-tinta: #141A00;
  --marca-escura: #8DB800;
  --cromo: #C9CCD3;
  --cromo-tinta: #111214;
  --hero-bg: #111214;
  --hero-tinta: #EDEEF0;
  --hero-sub: #A3A7B0;
  --hero-num: #C8FF3D;
  --grade: rgba(17, 18, 20, .045);
  --saida: #D63A3A;
  --entrada: #4E7F00;
  --alerta: #A86400;
  --menta: #EAF7C8;
  --rosa: #FFDADA;
  --laranja: #FFE6C7;
  --sombra-dura: 0 4px 0 var(--contorno);
  --sombra: 0 3px 0 var(--contorno);
  --raio: 16px;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --recibo: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --hud: "JetBrains Mono", ui-monospace, monospace;
  --tab-h: 78px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100; --viz-5: #e87ba4; --viz-6: #008300;
  --viz-linha: #6A8F00; --viz-grade: #DCDEE2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --papel: #0E0F11;
    --folha: #17181B;
    --folha-2: #1F2024;
    --tinta: #EDEEF0;
    --tinta-2: #A3A7B0;
    --tinta-3: #6E727B;
    --linha: #2A2C30;
    --contorno: #000000;
    --caneta-texto: #C8FF3D;
    --caneta-suave: #232B10;
    --hero-bg: #C9CCD3;
    --hero-tinta: #111214;
    --hero-sub: #4A4D55;
    --hero-num: #111214;
    --grade: rgba(255, 255, 255, .035);
    --saida: #FF6464;
    --entrada: #C8FF3D;
    --alerta: #FFB547;
    --menta: #232B10;
    --rosa: #3A1D1F;
    --laranja: #3A2C17;
    --sombra-dura: 0 4px 0 #000;
    --sombra: 0 3px 0 #000;
    --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-5: #d55181; --viz-6: #008300;
    --viz-linha: #C8FF3D; --viz-grade: #26282C;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--papel); color: var(--tinta);
  font-family: var(--display); font-size: 16px; line-height: 1.45;
  font-variation-settings: "wdth" 100;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--caneta); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.chart { stroke: none; }

#app { min-height: 100%; max-width: 560px; margin: 0 auto; position: relative; }
#view { padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 28px); min-height: 100vh; outline: none; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  max-width: 560px; margin: 0 auto;
  padding: 6px 8px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--papel) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--linha);
}
.tab { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--tinta-3); font-size: 11.5px; font-weight: 600; }
.tab svg { width: 25px; height: 25px; }
.tab[aria-current="page"] { color: var(--tinta); }
.tab[aria-current="page"] svg { stroke-width: 2.3; }
.tab[aria-current="page"] span { font-weight: 800; }
.tab-mic { padding: 0; }
.mic-pill {
  width: 68px; height: 56px; border-radius: 22px 22px 22px 7px;
  background: var(--marca); color: var(--marca-tinta);
  display: grid; place-items: center; transform: translateY(-16px) rotate(-5deg);
  border: 2px solid var(--contorno);
  box-shadow: 0 5px 0 var(--contorno);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mic-pill svg { width: 28px; height: 28px; stroke-width: 2.3; }
.tab-mic:active .mic-pill { transform: translateY(-12px) rotate(-5deg); box-shadow: 0 1px 0 var(--contorno); }
.listening .mic-pill { animation: pulse 1s ease-in-out infinite; background: var(--caneta); }
@keyframes pulse { 50% { transform: translateY(-16px) rotate(-5deg) scale(1.08); } }

/* ---------- Cabeçalhos ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; padding: calc(20px + env(safe-area-inset-top, 0px)) 0 12px; gap: 12px; }
.top h1 { font-size: 44px; margin: 0; font-weight: 800; font-variation-settings: "wdth" 66; line-height: .92; }
.top .sub { color: var(--tinta-2); font-size: 14px; margin-top: 6px; font-weight: 500; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 32px; height: 28px; border-radius: 11px 11px 11px 3px; background: var(--marca); border: 2px solid var(--contorno); display: grid; place-items: center; transform: rotate(-6deg); color: var(--marca-tinta); box-shadow: 0 2px 0 var(--contorno); flex: none; }
.brand-mark svg { width: 16px; height: 16px; stroke-width: 2.6; }
.icon-btn { width: 44px; height: 44px; border-radius: 15px; border: 2px solid var(--contorno); background: var(--folha); display: grid; place-items: center; color: var(--tinta); box-shadow: var(--sombra); flex: none; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--contorno); }
.icon-btn svg { width: 21px; height: 21px; stroke-width: 2.1; }
h2.sec { font-size: 25px; font-weight: 800; font-variation-settings: "wdth" 74; margin: 30px 0 12px; display: flex; justify-content: space-between; align-items: baseline; line-height: 1; gap: 8px; }
h2.sec small { font-weight: 600; color: var(--tinta-3); font-size: 13px; font-variation-settings: "wdth" 100; }
.link { background: none; border: 0; color: var(--caneta-texto); font-weight: 700; font-size: 14px; padding: 4px 0; font-variation-settings: "wdth" 100; }

/* ---------- Cartões (adesivos) ---------- */
.card { background: var(--folha); border-radius: var(--raio); border: 2px solid var(--contorno); box-shadow: var(--sombra-dura); padding: 16px; }
.card + .card { margin-top: 12px; }
.muted { color: var(--tinta-2); }
.faint { color: var(--tinta-3); }
.num { font-variant-numeric: tabular-nums; }
.neg { color: var(--saida); }
.pos { color: var(--entrada); }

/* Herói */
.hero { padding: 20px 18px 18px; position: relative; overflow: hidden; }
.hero.amarelo { background: var(--caneta); color: #140D08; }
.hero.amarelo .q, .hero.amarelo .foot { color: #3D1A00; }
.hero.amarelo .btn { background: var(--folha); color: var(--tinta); }
.hero.vermelho { background: #FF8A8A; color: #2A0606; }
.hero.vermelho .q, .hero.vermelho .foot { color: #4A1010; }
.hero .q { font-size: 15px; color: var(--tinta-2); margin: 0 0 6px; font-weight: 700; position: relative; }
.hero .big { font-size: 78px; font-weight: 800; font-variation-settings: "wdth" 66; line-height: .88; display: block; position: relative; }
.hero .big small { font-size: .42em; vertical-align: .9em; margin-right: 4px; font-weight: 700; }
.hero .foot { margin-top: 10px; font-size: 14.5px; color: var(--tinta-2); font-weight: 500; position: relative; }
.hero .burst { position: absolute; right: -24px; top: -24px; width: 130px; height: 130px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: repeating-linear-gradient(-45deg, #1A1918 0 10px, var(--marca) 10px 20px); opacity: .9; }
.hero { padding-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--folha); border: 2px solid var(--contorno); border-radius: 18px; padding: 10px 12px; box-shadow: var(--sombra); min-width: 0; }
.stat span { display: block; font-size: 12.5px; color: var(--tinta-2); font-weight: 700; }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1.05; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.menta { background: var(--menta); } .stat.rosa { background: var(--rosa); } .stat.laranja { background: var(--laranja); }

/* Linhas de lista */
.rows { background: var(--folha); border-radius: var(--raio); border: 2px solid var(--contorno); box-shadow: var(--sombra-dura); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; width: 100%; text-align: left; }
.row + .row { border-top: 1.5px solid var(--linha); }
button.row:active { background: var(--folha-2); }
.ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; border: 2px solid var(--contorno); }
.ic svg { width: 22px; height: 22px; stroke-width: 2.1; color: #1A1918; }
.row .main { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { display: block; font-size: 13px; color: var(--tinta-2); }
.row .v { font-weight: 800; white-space: nowrap; font-size: 17px; }
.daylabel { font-size: 13px; color: var(--tinta-3); font-weight: 700; margin: 20px 4px 8px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--caneta-suave); color: var(--caneta-texto); white-space: nowrap; border: 1.5px solid currentColor; }
.pill.warn { background: color-mix(in srgb, var(--alerta) 14%, transparent); color: var(--alerta); }
.pill.bad { background: color-mix(in srgb, var(--saida) 14%, transparent); color: var(--saida); }
.pill.ok { background: color-mix(in srgb, var(--entrada) 15%, transparent); color: var(--entrada); }

.empty { text-align: center; padding: 26px 18px; color: var(--tinta-2); }
.empty b { color: var(--tinta); display: block; font-size: 24px; margin-bottom: 4px; font-weight: 800; font-variation-settings: "wdth" 74; }

/* Passos iniciais */
.steps { counter-reset: s; padding: 6px 16px; }
.step { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1.5px dashed var(--linha); }
.step:first-child { border-top: 0; }
.step::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--contorno); display: grid; place-items: center; font-size: 14px; font-weight: 800; flex: none; background: var(--caneta); color: #140D08; }
.step.done::before { content: "✓"; background: var(--entrada); color: #fff; }
.step.done .t { text-decoration: line-through; color: var(--tinta-3); }
.step .t { flex: 1; font-weight: 700; }

/* Botões */
.btn { border: 2px solid var(--contorno); border-radius: 16px; padding: 13px 18px; font-weight: 800; background: var(--caneta); color: var(--caneta-tinta); box-shadow: var(--sombra); font-size: 15.5px; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--contorno); }
.btn.ghost { background: var(--folha); color: var(--tinta); }
.btn.danger { background: var(--folha); color: var(--saida); }
.btn.marca { background: var(--marca); color: var(--marca-tinta); }
.btn.sm { padding: 8px 13px; font-size: 14px; border-radius: 12px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .45; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* Segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--folha-2); border: 2px solid var(--contorno); border-radius: 15px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; padding: 9px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--tinta-2); }
.seg button[aria-pressed="true"] { background: var(--caneta); color: #140D08; box-shadow: inset 0 0 0 2px var(--contorno); }

/* Barras de categoria */
.bars { display: grid; gap: 12px; }
.bar { border: 0; background: none; padding: 0; text-align: left; width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.bar .ic { width: 34px; height: 34px; border-radius: 11px; }
.bar .ic svg { width: 18px; height: 18px; }
.bar .lbl { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; gap: 8px; }
.bar .lbl span:first-child { font-weight: 700; }
.bar .track { height: 10px; border-radius: 10px; background: var(--folha-2); overflow: hidden; border: 1.5px solid var(--linha); }
.bar .fill { height: 100%; border-radius: 10px; }
.bar.off { opacity: .35; }

.monthnav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.monthnav b { font-size: 28px; text-transform: capitalize; font-weight: 800; font-variation-settings: "wdth" 66; }

/* Dívidas / metas */
.debt { padding: 14px 16px; }
.debt + .debt { border-top: 1.5px solid var(--linha); }
.debt .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.debt .name { font-weight: 800; font-size: 17px; }
.debt .meta { font-size: 13px; color: var(--tinta-2); margin-top: 3px; }
.progress { height: 10px; border-radius: 10px; background: var(--folha-2); margin-top: 10px; overflow: hidden; border: 1.5px solid var(--linha); }
.progress i { display: block; height: 100%; background: var(--entrada); border-radius: 10px; }
.order { font-size: 13px; font-weight: 800; color: #140D08; background: var(--caneta); border: 1.5px solid var(--contorno); border-radius: 8px; padding: 0 6px; margin-right: 4px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: 0; }

/* ---------- Gráficos ---------- */
.chart-card { padding: 14px 14px 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.chart-head b { font-size: 16px; font-weight: 800; }
.chart-tip { font-size: 13px; color: var(--tinta-2); font-weight: 600; min-height: 19px; text-align: right; font-variant-numeric: tabular-nums; }
.chart-tip strong { color: var(--tinta); }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; overflow: visible; }
.chart text { fill: var(--tinta-3); font-family: var(--display); font-size: 11px; font-weight: 600; stroke: none; }
.chart .lbl-strong { fill: var(--tinta); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--tinta-2); font-weight: 600; margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.legend i.dash { height: 0; border-top: 2.5px dashed var(--tinta-3); border-radius: 0; width: 16px; vertical-align: 3px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; min-height: calc(100vh - var(--tab-h) - var(--safe-b)); }
.chat-top { position: sticky; top: 0; z-index: 5; background: var(--papel); padding: calc(14px + env(safe-area-inset-top, 0px)) 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1.5px solid var(--linha); }
.chat-top .who { font-weight: 800; font-size: 32px; font-variation-settings: "wdth" 66; line-height: 1; }
.chat-top .budget { font-size: 12.5px; font-weight: 700; text-align: right; background: var(--caneta); color: #140D08; border: 2px solid var(--contorno); border-radius: 14px; padding: 5px 10px; box-shadow: var(--sombra); transform: rotate(2deg); line-height: 1.15; }
.chat-top .budget.neg { background: #FF8A8A; color: #2A0606; }
.chat-top .budget b { font-size: 20px; font-weight: 800; font-variation-settings: "wdth" 66; }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px 0 16px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 20px; font-size: 15.5px; white-space: pre-wrap; word-wrap: break-word; border: 2px solid var(--contorno); }
.msg.user { align-self: flex-end; background: var(--caneta); color: var(--caneta-tinta); border-bottom-right-radius: 6px; box-shadow: var(--sombra); font-weight: 500; }
.msg.bot { align-self: flex-start; background: var(--folha); border-bottom-left-radius: 6px; box-shadow: var(--sombra); }
.msg.bot .ex { display: inline-block; margin: 6px 5px 0 0; padding: 5px 11px; border-radius: 99px; background: var(--folha-2); color: var(--tinta); font-weight: 600; font-size: 13.5px; border: 1.5px solid var(--linha); text-align: left; }
.msg.bot .ex:active { background: var(--marca); color: var(--marca-tinta); }

/* Recibo térmico */
.recibo {
  align-self: flex-start; width: min(300px, 86%);
  background: #FFFEF6; color: #1B1830;
  font-family: var(--recibo); font-size: 13px; line-height: 1.5;
  padding: 12px 14px 20px; position: relative;
  border-radius: 6px 6px 0 0; transform: rotate(-.6deg);
  filter: drop-shadow(0 4px 0 var(--contorno));
  --dente: 9px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--dente) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--dente) 100%;
}
.recibo.tilt { transform: rotate(.6deg); }
.recibo .rhead { display: flex; justify-content: space-between; color: #8A86A0; font-size: 11.5px; border-bottom: 1.5px dashed #D8D4E8; padding-bottom: 6px; margin-bottom: 8px; }
.recibo .rval { font-family: var(--display); font-size: 40px; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1; }
.recibo .rval.pos { color: #11905A; }
.recibo .rval.neg { color: #C42F2F; }
.recibo .rdesc { margin-top: 4px; }
.recibo .ractions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.recibo .chip { font-family: var(--display); border: 1.5px solid #1B1830; background: #fff; color: #1B1830; border-radius: 99px; padding: 4px 11px 4px 9px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.recibo .chip svg { width: 15px; height: 15px; stroke-width: 2.2; }
.recibo.undone { opacity: .45; }
.recibo.undone .rval { text-decoration: line-through; }

.composer {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 6;
  display: flex; gap: 8px; padding: 10px 0 10px; background: linear-gradient(to top, var(--papel) 78%, transparent);
}
.composer input { flex: 1; min-width: 0; border: 2px solid var(--contorno); background: var(--folha); border-radius: 18px; padding: 13px 16px; font-size: 16px; box-shadow: var(--sombra); }
.composer input:focus { outline: none; border-color: var(--caneta); }
.composer .send { width: 52px; border-radius: 18px; border: 2px solid var(--contorno); background: var(--caneta); color: var(--caneta-tinta); display: grid; place-items: center; box-shadow: var(--sombra); }
.composer .send svg { width: 22px; height: 22px; stroke-width: 2.4; }
.hearing { font-size: 13px; color: var(--caneta-texto); font-weight: 700; text-align: center; padding: 2px 0 0; min-height: 20px; }

.msg.typing { display: flex; gap: 5px; padding: 15px 17px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--tinta-3); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(10, 8, 30, .55); animation: fade .2s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  max-height: 92vh; overflow-y: auto; background: var(--papel);
  border-radius: 28px 28px 0 0; padding: 8px 18px calc(24px + var(--safe-b));
  border: 2px solid var(--contorno); border-bottom: 0;
  animation: up .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--tinta-3); margin: 4px auto 12px; opacity: .5; }
.sheet h3 { font-size: 36px; margin: 4px 0 14px; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1; }
.sheet p.help { color: var(--tinta-2); font-size: 14px; margin: -6px 0 14px; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13.5px; font-weight: 700; color: var(--tinta-2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--contorno); background: var(--folha); border-radius: 14px; padding: 12px 13px; font-size: 16px; }
.field input:focus, .field select:focus { border-color: var(--caneta); outline: none; box-shadow: 0 0 0 3px var(--caneta-suave); }
.field small { display: block; color: var(--tinta-3); font-size: 12.5px; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-weight: 700; }
.check input { width: 22px; height: 22px; accent-color: var(--caneta); }

.catgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.catgrid button { border: 2px solid var(--contorno); background: var(--folha); border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; box-shadow: var(--sombra); }
.catgrid button[aria-pressed="true"] { background: var(--marca); color: var(--marca-tinta); }
.catgrid .ic { width: 38px; height: 38px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 22px); transform: translate(-50%, 20px);
  background: var(--marca); color: var(--marca-tinta); padding: 11px 18px; border-radius: 16px; font-weight: 800; font-size: 14.5px;
  border: 2px solid var(--contorno); box-shadow: var(--sombra);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.note { font-size: 13.5px; color: var(--tinta-2); background: var(--folha-2); border: 1.5px dashed var(--tinta-3); border-radius: 16px; padding: 12px 14px; margin-top: 14px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1.5px dashed var(--linha); font-size: 14.5px; }
.kv:first-child { border-top: 0; }
hr.dash { border: 0; border-top: 2px dashed var(--linha); margin: 18px 0; }


/* ===== Refinamento "pro": menos contorno, hierarquia clara ===== */
body { font-size: 15.5px; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
.card, .rows { border: 1px solid var(--linha); box-shadow: none; border-radius: 18px; }
.hero { border: 2px solid var(--contorno); box-shadow: var(--sombra-dura); border-radius: 22px; }
.hero .big { font-weight: 900; font-variation-settings: "wdth" 62; letter-spacing: -.01em; font-size: 84px; }
.hero .big small { font-weight: 700; font-variation-settings: "wdth" 80; }
.hero .q { font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.hero .burst { display: none; }
.top h1 { font-weight: 900; font-variation-settings: "wdth" 62; font-size: 46px; letter-spacing: -.005em; }
h2.sec { font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 70; margin: 32px 0 12px; }
.monthnav b, .sheet h3, .chat-top .who, .empty b { font-weight: 900; font-variation-settings: "wdth" 62; }
.icon-btn { border: 1px solid var(--linha); box-shadow: none; background: var(--folha); }
.icon-btn:active { transform: none; background: var(--folha-2); box-shadow: none; }
.btn { box-shadow: 0 2px 0 var(--contorno); border-width: 1.5px; font-weight: 700; letter-spacing: .005em; }
.btn.ghost, .btn.danger { border: 1px solid var(--linha); box-shadow: none; }
.btn.ghost:active, .btn.danger:active { transform: none; background: var(--folha-2); }
.stat { border: 1px solid var(--linha); box-shadow: none; border-radius: 16px; background: var(--folha); padding: 11px 12px; }
.stat.menta, .stat.rosa, .stat.laranja { background: var(--folha); }
.stat span { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.stat span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-3); }
.stat.menta span::before { background: var(--entrada); }
.stat.rosa span::before { background: var(--saida); }
.stat.laranja span::before { background: var(--caneta); }
.stat b { font-weight: 800; font-variation-settings: "wdth" 70; font-size: 23px; }
.ic { border: 0; background: var(--folha-2); border-radius: 13px; }
.ic svg { color: currentColor; stroke-width: 2; }
.row { padding: 13px 14px; }
.row + .row { border-top: 1px solid var(--linha); }
.row .t { font-weight: 600; }
.row .v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.seg { border: 1px solid var(--linha); background: var(--folha); }
.seg button[aria-pressed="true"] { box-shadow: none; }
.field input, .field select, .field textarea { border: 1px solid var(--linha); }
.field input:focus, .field select:focus { border-color: var(--caneta); }
.catgrid button { border: 1px solid var(--linha); box-shadow: none; }
.catgrid button[aria-pressed="true"] { border-color: var(--caneta); background: var(--caneta-suave); color: var(--tinta); }
.msg { border: 0; }
.msg.bot { border: 1px solid var(--linha); box-shadow: none; background: var(--folha); }
.msg.user { box-shadow: none; font-weight: 500; }
.composer input { border: 1px solid var(--linha); box-shadow: none; }
.composer .send { border: 0; box-shadow: none; }
.chat-top { border-bottom: 1px solid var(--linha); }
.chat-top .budget { transform: none; box-shadow: 0 2px 0 var(--contorno); border-width: 1.5px; }
.step::before { border: 0; font-size: 13px; }
.progress, .bar .track { border: 0; height: 8px; }
.note { border: 1px solid var(--linha); border-style: solid; background: var(--folha-2); }
.legend { gap: 6px 16px; }
.toast { box-shadow: 0 2px 0 var(--contorno); border-width: 1.5px; }
.tabbar { border-top: 1px solid var(--linha); }
.tab span { font-weight: 600; letter-spacing: .01em; }
.mic-pill { border-width: 2px; box-shadow: 0 4px 0 var(--contorno); }
.recibo .rval { font-weight: 900; font-variation-settings: "wdth" 62; }
.chart text { font-weight: 600; }
.brand-mark { box-shadow: none; border-width: 1.5px; }
.sheet { border: 0; }
.hero.vermelho { background: var(--folha); color: var(--tinta); }
.hero.vermelho .q, .hero.vermelho .foot { color: var(--tinta-2); }
.hero.vermelho .big { color: var(--saida); }
.chat-top .budget.neg { background: var(--saida); color: #140D08; }


/* ===== HUD techwear + cromo ácido ===== */
body { background-color: var(--papel); background-image: linear-gradient(var(--grade) 1px, transparent 1px), linear-gradient(90deg, var(--grade) 1px, transparent 1px); background-size: 22px 22px; background-attachment: fixed; }
.chat-top, .tabbar { background: color-mix(in srgb, var(--papel) 92%, transparent); }
.chat-top { background: var(--papel); }
.composer { background: linear-gradient(to top, var(--papel) 78%, transparent); }

/* rótulos em fonte de terminal */
.top .sub, .hero .q, .stat span, .chart-head .chart-tip, .daylabel, h2.sec small, .order, .recibo .rhead, .legend, .chat-top .budget, .pill {
  font-family: var(--hud); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; font-weight: 500;
}
.chart-head b { font-family: var(--hud); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 700; }
.hero .q { font-size: 11.5px; }
.stat span { font-size: 10.5px; }
.pill { font-size: 10.5px; padding: 3px 8px; border-radius: 6px; }

/* herói: painel cromado com mira nos cantos e código de barras */
.hero, .hero.amarelo { background: var(--hero-bg); color: var(--hero-tinta); border: 0; box-shadow: none; border-radius: 18px; padding: 18px 18px 22px; }
.hero.amarelo .q, .hero.amarelo .foot, .hero .q, .hero .foot { color: var(--hero-sub); }
.hero .big { color: var(--hero-num); }
.hero.vermelho { background: var(--folha); color: var(--tinta); border: 1px solid var(--linha); }
.hero.vermelho .q, .hero.vermelho .foot { color: var(--tinta-2); }
.hero.vermelho .big { color: var(--saida); }
.hero::before { content: ""; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--hero-num), var(--hero-num)) left top / 14px 2.5px no-repeat,
    linear-gradient(var(--hero-num), var(--hero-num)) left top / 2.5px 14px no-repeat,
    linear-gradient(var(--hero-num), var(--hero-num)) right bottom / 14px 2.5px no-repeat,
    linear-gradient(var(--hero-num), var(--hero-num)) right bottom / 2.5px 14px no-repeat; opacity: .9; }
.hero.vermelho::before { background:
    linear-gradient(var(--saida), var(--saida)) left top / 14px 2.5px no-repeat,
    linear-gradient(var(--saida), var(--saida)) left top / 2.5px 14px no-repeat,
    linear-gradient(var(--saida), var(--saida)) right bottom / 14px 2.5px no-repeat,
    linear-gradient(var(--saida), var(--saida)) right bottom / 2.5px 14px no-repeat; }
.hero::after { content: ""; position: absolute; left: auto; right: 30px; bottom: 18px; top: auto; width: 84px; height: 16px; opacity: .55;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px, currentColor 8px 11px, transparent 11px 13px); }
.hero .foot { padding-right: 100px; }
.hero .big small { color: inherit; }

/* cards com cantos técnicos */
.chart-card { position: relative; }
.chart-card::before { content: ""; position: absolute; inset: 6px; pointer-events: none;
  background:
    linear-gradient(var(--tinta-3), var(--tinta-3)) left top / 9px 1.5px no-repeat,
    linear-gradient(var(--tinta-3), var(--tinta-3)) left top / 1.5px 9px no-repeat,
    linear-gradient(var(--tinta-3), var(--tinta-3)) right top / 9px 1.5px no-repeat,
    linear-gradient(var(--tinta-3), var(--tinta-3)) right top / 1.5px 9px no-repeat; opacity: .6; }

/* botões principais com canto cortado */
.btn:not(.ghost):not(.danger) { border: 0; box-shadow: none; border-radius: 4px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); padding: 14px 20px; text-transform: none; }
.btn.marca { background: var(--caneta); color: var(--caneta-tinta); }
.btn:not(.ghost):not(.danger):active { transform: translateY(1px); filter: brightness(.92); }
.mic-pill { border: 0; border-radius: 6px; box-shadow: none; transform: translateY(-16px); width: 70px; height: 54px; background: var(--caneta); color: var(--caneta-tinta);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.tab-mic:active .mic-pill { transform: translateY(-14px); box-shadow: none; }
.listening .mic-pill { background: #FF5CA8; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: translateY(-16px) scale(1.07); } }
.brand-mark { border: 0; border-radius: 3px; background: var(--caneta); color: var(--caneta-tinta); transform: none; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.chat-top .budget { background: var(--cromo); color: var(--cromo-tinta); border: 0; box-shadow: none; transform: none; border-radius: 4px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.chat-top .budget b { font-family: var(--display); letter-spacing: 0; text-transform: none; }
.chat-top .budget.neg { background: var(--saida); color: #1A0505; }
.seg button[aria-pressed="true"] { background: var(--caneta); color: var(--caneta-tinta); }
.step::before { background: var(--caneta); color: var(--caneta-tinta); border-radius: 4px; }
.order { background: var(--caneta); color: var(--caneta-tinta); border: 0; border-radius: 3px; }
.msg.user { background: var(--cromo); color: var(--cromo-tinta); border-radius: 16px 16px 4px 16px; }
.composer .send { background: var(--caneta); color: var(--caneta-tinta); border-radius: 4px; clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px); }
.toast { background: var(--caneta); color: var(--caneta-tinta); border: 0; box-shadow: none; border-radius: 4px; }
.stat b { color: var(--tinta); }
.stat.menta span::before { background: var(--entrada); }
.progress i { background: var(--caneta); }
.catgrid button[aria-pressed="true"] { border-color: var(--caneta-texto); background: var(--caneta-suave); }
.tab[aria-current="page"] { color: var(--tinta); }
.tab[aria-current="page"]::after { content: ""; width: 18px; height: 2px; background: var(--caneta); margin-top: 1px; }
.top h1 { letter-spacing: -.01em; }
.top .sub::before { content: "FLG/OS — "; color: var(--caneta-texto); }
.stat.laranja span::before { background: var(--alerta); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.45; font-family: var(--display); }
