/* Mise (pasta calda) — tema sálvia, responsivo (celular, tablet, desktop). Menta-gelo, verde-sálvia, grafite. Mobile primeiro. Tema claro. Figtree (OFL) hospedada; sem CDN.
   Referência de linguagem: .impeccable/ref/ (app de receitas de terceiro; nada copiado). */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700.woff2) format("woff2"); }
:root {
  color-scheme: light;
  --bg: #f2f7f6; --white: #ffffff; --card: #ffffff; --line: #dce8e6; --line-in: #7a9391; --line-btn: #c4d4d1;
  --ink: #232a2e; --muted: #55646a; --chip: #e4edec; --chip-hv: #d6e4e1;
  --sage: #7fa8a3;           /* só decoração (anel tracejado, detalhes) */
  --sage-dk: #4a7872;        /* cartão de destaque (texto branco 5:1), ícones, traço do anel */
  --sage-ink: #3d6a65;       /* texto pequeno em sálvia sobre branco/menta (>= 5,6:1) */
  --sage-deep: #2f5853;      /* texto sobre sálvia-claro */
  --sage-soft: #e0edeb;      /* círculo de ícone, confirmar, selo Entregue */
  --on-sage: #eef7f5;        /* texto secundário sobre o cartão sálvia */
  --red-ink: #a8261f; --red-soft: #fbe4e1; --amber-ink: #7a4a0c; --amber-soft: #fbefd5;
  --radius: 22px; --radius-s: 18px;
  --shadow: 0 10px 30px rgba(40, 70, 66, .08), 0 1px 3px rgba(40, 70, 66, .05);
  --shadow-s: 0 4px 14px rgba(40, 70, 66, .07), 0 1px 2px rgba(40, 70, 66, .05);
  --nav-h: 64px; --ease: cubic-bezier(.22, 1, .36, 1);
  --gut: 20px; --side-w: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #b9cbc8 transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums; caret-color: var(--sage-ink); accent-color: var(--sage-dk);
}
body.is-app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
::selection { background: #cfe3e0; color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #b9cbc8; border-radius: 10px; border: 2px solid var(--bg); }
a { color: var(--sage-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gut); }
.main { padding-top: 8px; padding-bottom: 24px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.sub { margin: 4px 0 20px; }
.nb { white-space: nowrap; }
.rs { font-size: .6em; font-weight: 400; letter-spacing: 0; }
.ic { width: 1.35em; height: 1.35em; flex: none; vertical-align: -.3em; }
.pos { color: var(--sage-ink); } .neg { color: var(--red-ink); }

/* topo (celular e tablet): letreiro Mise e atalho da conta */
.top { background: var(--bg); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 72px; padding-top: 12px; }
.logo { min-height: 44px; justify-content: center; align-items: flex-start; display: inline-flex; flex-direction: column; text-decoration: none; color: var(--sage-ink); line-height: 1; }
.logo-img { display: block; height: 36px; width: auto; }
.is-auth .logo-img { height: 64px; }
.logo-tag { display: none; margin-top: 4px; font-size: .875rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.v-painel .logo-tag, .is-auth .logo-tag { display: block; }
.top-perfil { margin-left: auto; display: grid; place-items: center; width: 48px; height: 48px; color: var(--ink); background: var(--white); border-radius: 50%; box-shadow: var(--shadow-s); }
.top-perfil .ic { width: 28px; height: 28px; stroke-width: 1.5; }
.top-perfil:hover { background: var(--sage-soft); }
.is-auth .top-in { justify-content: center; }
.side { display: none; }

/* barra inferior (celular): branca, ícones de linha, botão central flutuante */
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  max-width: 560px; margin: 0 auto;
  background: var(--white); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(40, 70, 66, .10); padding-bottom: env(safe-area-inset-bottom);
}
.bottom a:not(.fab) { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--nav-h);
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; }
.bottom a:not(.fab) .ic { width: 26px; height: 26px; stroke-width: 1.5; }
.bottom a[aria-current] { color: var(--sage-ink); font-weight: 700; }
.bottom a[aria-current] .ic { color: var(--sage-dk); stroke-width: 1.9; }
.bottom a[aria-current]::before { content: ""; position: absolute; z-index: -1; top: 8px; left: 50%; width: 54px; height: 32px; margin-left: -27px; border-radius: 16px; background: var(--sage-soft); }
.fab-slot { display: grid; place-items: center; }
.fab { display: grid; place-items: center; width: 58px; height: 58px; margin-top: -38px; border-radius: 50%; background: var(--ink); color: #fff;
  box-shadow: 0 0 0 5px var(--bg), 0 12px 24px rgba(35, 42, 46, .34); transition: transform .2s var(--ease), background-color .2s var(--ease); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2; vertical-align: 0; }
.fab:hover { background: #3a454a; }
.fab:active { transform: scale(.94); }
/* telas com barra de salvar: o botão de salvar ocupa o lugar da barra inferior */
body.v-receita { --nav-h: 0px; }
body.v-receita .bottom { display: none; }
@supports selector(:has(a)) {
  body:has(details.edit[open]) { --nav-h: 0px; }
  body:has(details.edit[open]) .bottom { display: none; }
  body.v-pedido:not(:has(details.edit)) { --nav-h: 0px; }
  body.v-pedido:not(:has(details.edit)) .bottom { display: none; }
}
/* blocos */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card-head, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
.page-head .page-title { margin: 0; }
.page-head { margin: 8px 0 16px; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 18px; }
.head-acoes { display: none; gap: 10px; flex-wrap: wrap; }
.hello-sub { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; color: var(--muted); font-size: .95rem; }
.hello-sub .ic { width: 1.25em; height: 1.25em; color: var(--sage-dk); vertical-align: 0; }
.hello-nome { font-size: clamp(2rem, 8.5vw, 2.5rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.stack > * + * { margin-top: 16px; }
.stack > h2 + *, .stack > h3 + * { margin-top: 8px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 8px; }
.sec-head h2 { font-size: 1.35rem; font-weight: 700; }
.sec-head a { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; font-weight: 600; text-decoration: none; }
.voltar { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px 0 10px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--white); border-radius: 99px; box-shadow: var(--shadow-s); }
.voltar:hover { background: var(--sage-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.vazio, .vazio-card { color: var(--muted); }
.vazio-card { text-align: center; padding: 32px 20px; }
.vazio-card p { margin: 0 0 8px; }
.vazio-card .btn { margin-top: 8px; }
.circ { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dk); font-weight: 700; }
.circ .ic { width: 58%; height: 58%; vertical-align: 0; stroke-width: 1.6; }
.saldo .circ { width: 56px; height: 56px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 16px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.15;
  transition: background-color .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease); }
.btn:active { transform: scale(.98); }
.page-head .btn { white-space: nowrap; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-pri { background: var(--ink); color: #fff; } .btn-pri:hover { background: #3a454a; }
.btn-sec { background: var(--white); color: var(--ink); border-color: var(--line-btn); } .btn-sec:hover { background: var(--sage-soft); border-color: var(--sage-dk); }
.btn-ok { background: var(--sage-soft); color: var(--sage-deep); } .btn-ok:hover { background: #cfe3e0; }
.btn-ghost { background: transparent; color: var(--muted); } .btn-ghost:hover { background: var(--chip); color: var(--ink); }
.btn-danger { background: var(--white); color: var(--red-ink); border-color: var(--red-ink); } .btn-danger:hover { background: var(--red-soft); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--sage-dk); outline-offset: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0 8px; min-height: 44px; font: inherit; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 10px; }
.link-btn:hover { color: var(--ink); }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .9rem; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=search], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: 8px 14px; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-in); border-radius: 14px; appearance: none; -webkit-appearance: none;
}
input::placeholder { color: #5d6b71; opacity: 1; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; text-overflow: ellipsis; }
input:focus, select:focus, textarea:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(74, 120, 114, .22); outline: none; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 99px; padding: 4px; gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 99px; font-weight: 600; color: var(--muted); transition: background-color .18s var(--ease), color .18s var(--ease); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--sage-dk); outline-offset: 2px; }
.preview { margin: 0; min-height: 1.4em; color: var(--sage-ink); font-weight: 700; }
.auth-box { max-width: 420px; margin: 16px auto; padding: 28px 24px; }
.auth-box h1 { margin-bottom: 4px; font-size: 1.75rem; font-weight: 700; }
.links { text-align: center; margin: 16px 0 0; color: var(--muted); }
.links a { display: inline-flex; align-items: center; min-height: 44px; }

/* avisos */
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-s); margin: 8px 0 16px; font-weight: 600;
  animation: entra .35s var(--ease); }
.flash form { margin: 0; }
.flash-ok { background: var(--sage-soft); color: var(--sage-deep); } .flash-erro { background: var(--red-soft); color: var(--red-ink); }
.flash-undo { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid currentColor; background: var(--white); color: var(--sage-deep); font: inherit; font-weight: 700; cursor: pointer; }
.flash-undo:hover { background: #cfe3e0; }
@keyframes entra { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.aviso-txt { display: flex; align-items: flex-start; gap: 6px; color: var(--red-ink); font-size: .9rem; font-weight: 600; margin: 0; }
.aviso-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--amber-soft); color: var(--amber-ink);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.aviso-box > div { flex: 1; min-width: 200px; } .aviso-box span { display: block; font-weight: 400; color: var(--ink); }
.selo { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; line-height: 1.35; }
.selo-ok { background: var(--sage-ink); color: #fff; } .selo-mid { background: var(--amber-soft); color: var(--amber-ink); }  /* Pago = sálvia escuro · A receber/Falta = âmbar · Atrasado = vermelho (só ele) */
.selo-bad { background: var(--red-soft); color: var(--red-ink); } .selo-neutro { background: var(--chip); color: #3b4649; font-weight: 600; }
.selo-pri { background: var(--sage-soft); color: var(--sage-deep); } .selo-entregue { background: var(--sage-soft); color: var(--sage-deep); }

/* cartão de destaque sálvia (saldo do painel e do caixa) */
.card.saldo { display: grid; gap: 16px; background: var(--sage-dk); color: #fff; padding: 22px; box-shadow: 0 14px 30px rgba(74, 120, 114, .30); }
.card.saldo.neg { background: #9a2a23; box-shadow: 0 14px 30px rgba(154, 42, 35, .28); }
.saldo-top { display: flex; align-items: center; gap: 16px; }
.saldo .circ { background: rgba(255, 255, 255, .2); color: #fff; }
.saldo-l { margin: 0; color: var(--on-sage); font-size: 1rem; }
.saldo-v { display: block; font-size: 2.4rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.saldo-mes { margin: 2px 0 0; color: var(--on-sage); font-size: .875rem; }
.saldo-linha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .3); }
.saldo-linha > * { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.saldo-linha span { font-size: .85rem; color: var(--on-sage); }
.saldo-linha strong { font-size: 1.05rem; font-weight: 700; white-space: nowrap; color: #fff; }
.saldo-linha a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.saldo a:focus-visible { outline-color: #fff; border-radius: 6px; }

/* painel: saldo + anel */
.painel-topo { display: grid; gap: 16px; margin-bottom: 16px; }
.painel-topo > .card { margin: 0; }
.anel-card { display: flex; align-items: center; gap: 16px; }
.anel { position: relative; flex: none; width: 150px; height: 150px; }
.anel svg { display: block; width: 100%; height: 100%; }
.anel circle { fill: none; stroke-linecap: round; }
.anel-trilho { stroke: #e0ebe9; stroke-width: 9; }
.anel-valor { stroke: var(--sage-dk); stroke-width: 9; stroke-dashoffset: 0; animation: anel 1s var(--ease) both; }
.anel-tracejo { stroke: var(--sage); stroke-width: 1.2; stroke-dasharray: 1.5 5; opacity: .8; }
@keyframes anel { from { stroke-dashoffset: var(--len, 0); } to { stroke-dashoffset: 0; } }
.anel-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.anel-c strong { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; line-height: 1.15; }
.anel-c span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.anel-txt { min-width: 0; }
.anel-txt p { margin: 4px 0 0; }

.passos { list-style: none; margin: 8px 0 0; padding: 0; }
.passos li { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.passos li span:not(.num) { flex: 1; min-width: 180px; }
.passos .num { width: 32px; height: 32px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-deep); display: grid; place-items: center; font-weight: 700; }
.passos .feito { color: var(--muted); } .passos .feito .ic { color: var(--sage-dk); width: 32px; height: 32px; }
.passo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .9rem; margin-right: 6px; vertical-align: 1px; }

/* linhas de lista (cada item é um cartão claro: ícone à esquerda, seta à direita) */
.rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.row { display: flex; flex-direction: column; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-s); padding: 14px 16px; min-width: 0; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.row > .row-link { flex: 1 1 auto; align-content: start; }
.row-link { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; align-items: start; color: inherit; text-decoration: none; }
.row-link:focus-visible { outline-offset: 6px; border-radius: 8px; }
.row-link .circ { grid-row: 1 / span 3; }
.row-nome { grid-column: 2; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.row-valor { grid-column: 3; font-size: 1.05rem; text-align: right; white-space: nowrap; }
.row-sub { grid-column: 2; display: flex; flex-direction: column; gap: 1px; color: var(--muted); font-size: .9rem; min-width: 0; }
.row-sub span { overflow-wrap: anywhere; }
.row-selos { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.row-chev { grid-column: 3; grid-row: 2 / span 2; justify-self: end; align-self: center; margin-right: -6px; color: var(--muted); }
.row-chev .ic { width: 20px; height: 20px; display: block; }
.row-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.row-lucro { display: block; font-size: 1.15rem; font-weight: 700; color: var(--sage-ink); text-align: right; white-space: nowrap; }
.row-lucro.neg { color: var(--red-ink); }
.lucro-txt { align-self: center; font-size: .9rem; font-weight: 700; color: var(--sage-ink); white-space: nowrap; }
.lucro-txt.neg { color: var(--red-ink); }
.anel-lucro { display: flex; flex-direction: column; gap: 0; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.anel-lucro span { font-size: .9rem; color: var(--muted); }
.anel-lucro strong { font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: var(--sage-ink); }
.anel-lucro.neg strong { color: var(--red-ink); }
.anel-lucro small { font-size: .85rem; color: var(--muted); }
.row-fino { font-size: .875rem; color: var(--muted); text-align: right; white-space: nowrap; }
.row-fino .neg, .row-fino .pos, .row-fino .mid { font-weight: 700; }
.mid { color: var(--amber-ink); }
.row-link.rec { grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; row-gap: 6px; }
.row-link.rec .circ { grid-column: 1; grid-row: 1; }
.row-link.rec .rl-esq { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-link.rec .rl-dir { grid-column: 2; grid-row: 2; display: flex; flex-flow: row wrap; align-items: baseline; gap: 2px 10px; }
.row-link.rec .row-chev { grid-column: 3; grid-row: 1 / span 2; margin-right: -6px; }
.row-link.rec .row-lucro { text-align: left; }
.row-link.rec .row-fino { text-align: left; }

/* barra de botões rápidos */
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick:empty { display: none; }
.quick form { margin: 0; flex: 1 1 auto; }
.quick .btn { width: 100%; padding: 0 8px; font-size: .9rem; white-space: nowrap; }
.inline { display: inline; }
@media (min-width: 640px) { .quick form { flex: 0 0 auto; } .quick .btn { padding: 0 20px; } }

/* listas dentro de cartões (caixa, pagamentos, histórico) */
.lista { list-style: none; margin: 0; padding: 0; }
.card.lista { padding: 4px 20px; }
.item { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.item-main strong { overflow-wrap: anywhere; }
.item-main strong a { display: inline-flex; align-items: center; min-height: 44px; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.item-col { flex-direction: column; align-items: stretch; }
.item-linha { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.item-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.item-acoes form { margin: 0; }
.ajuste > summary { list-style: none; cursor: pointer; }
.ajuste > summary::-webkit-details-marker { display: none; }
.ajuste[open] { flex-basis: 100%; }
.ajuste-form { margin-top: 10px; align-items: end; }
/* evolução 6 meses (barras CSS, sem biblioteca) */
.evo-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; } .lg-ent, .b-ent { background: var(--sage); } .lg-sai, .b-sai { background: #c9d3d1; } .lg-luc, .b-luc { background: var(--sage-dk); }
.evo-meses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.evo-meses li { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.evo-barras { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 110px; border-bottom: 1px solid var(--line); }
.evo-barras i { display: block; width: 28%; max-width: 12px; min-height: 2px; border-radius: 3px 3px 0 0; }
.b-luc.neg { background: var(--red-ink); }
.evo-mes { font-size: .8rem; color: var(--muted); }
.evo-v { font-size: .72rem; font-weight: 700; color: var(--sage-ink); white-space: nowrap; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; }
.menu { padding: 4px 20px; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item > .ic:first-child { box-sizing: border-box; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dk); vertical-align: 0; }
.menu-item span { flex: 1; font-weight: 700; } .menu-item small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; background: var(--chip); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  transition: background-color .18s var(--ease), color .18s var(--ease); }
.chip:hover { background: var(--chip-hv); }
.chip.on { background: var(--ink); color: #fff; }
.filtros { margin-bottom: 8px; }
.filtros input[type=search] { max-width: 420px; }
.filtros-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 16px; }
@media (min-width: 760px) { .filtros-form { grid-template-columns: repeat(4, 1fr) auto; } }

/* blocos de número: ícone de linha + valor + rótulo (receita, pedido) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats-2, .stats-2.stats { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 4px; padding: 16px 8px 14px; border-radius: var(--radius-s); background: var(--white); border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.stat[hidden], .stat small[hidden] { display: none; }
.stat > .ic { order: 0; width: 26px; height: 26px; color: var(--sage-dk); stroke-width: 1.5; vertical-align: 0; margin-bottom: 2px; }
.stat strong { order: 1; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.2; }
.stat small { order: 2; color: var(--muted); font-size: .8rem; }
.stat-l { order: 3; font-size: .85rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.stat.neg strong { color: var(--red-ink); }
.stat-margem.m-ok strong { color: var(--sage-ink); } .stat-margem.m-mid strong { color: var(--amber-ink); } .stat-margem.m-bad strong { color: var(--red-ink); }
.stat-lucro strong, .stat-ok strong { color: var(--sage-ink); }

/* editor de receita e de pedido */
.itens { display: flex; flex-direction: column; gap: 16px; }
.itens-vazio { margin: 0; padding: 20px 12px; text-align: center; border: 1px dashed var(--line-in); border-radius: var(--radius-s); color: var(--muted); background: var(--white); }
.itens .row-item + .row-item { border-top: 1px solid var(--line); padding-top: 16px; }
.row-item { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; border: 0; background: none; }
.row-item .r-ref, .row-item .r-desc { grid-column: 1 / -1; order: 1; }
.row-item .r-qtd { grid-column: 1; order: 2; } .row-item .r-un { grid-column: 2; order: 2; }
.row-item .r-valor { grid-column: 1 / -1; order: 2; }
.row-item .r-fim { grid-column: 1 / -1; order: 4; display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.row-item .r-custo { font-weight: 700; margin-right: auto; white-space: nowrap; }
.row-item .r-erro { grid-column: 1 / -1; order: 5; color: var(--red-ink); font-size: .9rem; font-weight: 600; margin: 0; }
.ped-item .r-ref { order: 1; } .ped-item .r-desc { order: 2; }
.ped-item .r-qtd { grid-column: 1; order: 3; } .ped-item .r-valor { grid-column: 2; order: 3; }
.row-item .r-novo, .row-item .r-del { min-height: 44px; padding: 0 6px; white-space: nowrap; font-size: .92rem; border-radius: 10px; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.row-item .r-novo { color: var(--sage-ink); }
.row-item .r-novo:hover { background: var(--sage-soft); }
.row-item .r-del { color: var(--muted); min-width: 44px; }
.row-item .r-del:hover { color: var(--red-ink); background: var(--red-soft); }
.row-item [hidden] { display: none !important; }
@media (min-width: 760px) {
  .row-item { grid-template-columns: minmax(0, 1fr) 120px 110px; align-items: center; }
  .row-item .r-ref, .row-item .r-desc { grid-column: 1; order: 1; }
  .row-item .r-qtd { grid-column: 2; order: 2; } .row-item .r-un { grid-column: 3; order: 3; }
  .row-item .r-valor { grid-column: 2 / span 2; order: 2; }
  .ped-item { grid-template-columns: minmax(0, 1fr) 120px 150px; }
  .ped-item .r-qtd { grid-column: 2; order: 2; } .ped-item .r-valor { grid-column: 3; order: 2; }
  .ped-item .r-desc { order: 3; }
}
.add-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; }
.add-grid .btn { width: 100%; padding: 0 8px; white-space: nowrap; }
@media (min-width: 640px) { .add-grid { grid-template-columns: repeat(4, 1fr); } }
.sug { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.sug-b { display: flex; flex-direction: column; gap: 2px; padding: 12px 6px; min-height: 76px; border-radius: var(--radius-s); border: 1px solid var(--line-btn); background: var(--white); color: var(--ink);
  font: inherit; cursor: pointer; text-align: center; transition: background-color .18s var(--ease), color .18s var(--ease); }
.sug-b:hover { border-color: var(--sage-dk); background: var(--sage-soft); }
.sug-b.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sug-b b { font-size: 1.1rem; white-space: nowrap; } .sug-b span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.sug-b.on span { color: #d9e3e1; }
.ifood { display: grid; margin-top: 4px; }
.ifood > div { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.ifood small { color: var(--muted); display: block; }
.barra-salvar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 10; margin: 0 calc(var(--gut) * -1) 16px; padding: 12px var(--gut);
  display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 28px rgba(40, 70, 66, .10); }
.barra-res { margin: 0; text-align: center; font-size: .84rem; color: var(--muted); }
.barra-res b { white-space: nowrap; }
.barra-res .sobra { display: block; font-size: 1.05rem; margin-top: 2px; }
.barra-res .sep-s { display: none; }
.barra-res b { color: var(--ink); font-weight: 700; }
.barra-res b.m-ok { color: var(--sage-ink); } .barra-res b.m-mid { color: var(--amber-ink); } .barra-res b.m-bad { color: var(--red-ink); }
.dlg { border: 0; border-radius: 24px; padding: 24px; width: min(440px, calc(100vw - 24px)); background: var(--white); color: var(--ink); box-shadow: 0 24px 64px rgba(35, 42, 46, .3); }
.dlg::backdrop { background: rgba(35, 42, 46, .5); }
.dlg h2 { font-size: 1.35rem; }
dialog:not([open]) { display: none; }

/* resumo do pedido */
.res { display: grid; gap: 16px; }
.res-top { display: flex; gap: 12px; align-items: center; }
.res-top > div { min-width: 0; flex: 1; }
.res-top strong { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.res-top span { color: var(--muted); font-size: .95rem; }
.res-selos { display: flex; gap: 6px; flex-wrap: wrap; }
.res-itens { list-style: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.res-itens li { display: flex; justify-content: space-between; gap: 12px; }
.res-itens li span:first-child { overflow-wrap: anywhere; }
.res-lucro { display: flex; flex-direction: column; gap: 2px; padding: 20px 22px; border-radius: var(--radius); background: var(--sage-dk); color: #fff; }
.res-lucro.neg { background: #9a2a23; }
.res-lucro > span { font-size: .95rem; color: var(--on-sage); }
.res-lucro strong { font-size: 2.3rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.res-lucro small { color: var(--on-sage); font-size: .875rem; }
.boas { background: var(--sage-soft); }
.boas p { margin: 0; color: var(--sage-deep); font-weight: 600; }
.boas strong { display: block; font-size: 1.5rem; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.boas strong .nb { color: var(--sage-ink); }
.res-obs { margin: 0; color: var(--muted); font-size: .95rem; }
details.edit { margin: 0 0 16px; }
details.edit > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 20px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.1rem;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-s); }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary .ic { transition: transform .25s var(--ease); }
details.edit[open] > summary .ic { transform: rotate(90deg); }
details.edit[open] > summary { margin-bottom: 16px; }
.pagar h3 { margin-top: 6px; }

/* calendário semanal */
.semana-nav strong { flex: 1 1 auto; min-width: 0; text-align: center; }
.semana-nav .btn { padding: 0 8px; gap: 4px; flex: none; }
.page-head .semana-nav { flex: 1 1 100%; margin: 0; }
.semana-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.semana { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dia { background: var(--card); border-radius: 20px; padding: 12px 14px; min-width: 0; box-shadow: var(--shadow-s); }
.dia.hoje { box-shadow: 0 0 0 2px var(--sage-dk), var(--shadow-s); }
.dia.vazio { background: rgba(255, 255, 255, .6); box-shadow: none; }
.dia header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.dia header span { color: var(--muted); }
.dia header .selo-pri { color: var(--sage-deep); }
.dia-add { margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; color: var(--sage-deep); background: var(--sage-soft); border-radius: 50%; }
.dia-add:hover { background: #cfe3e0; }
.ped { border-top: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.ped.entregue .ped-main strong { color: var(--muted); }
.ped-main { display: flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; }
.ped-hora { font-size: .85rem; color: var(--sage-ink); font-weight: 700; }
.ped-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.head-sel { display: flex; gap: 6px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============ RESPONSIVO ============
   Celular (< 680px): barra inferior com "+" flutuante, uma coluna.
   Tablet (680-1023px): mesma barra, flutuando; conteúdo em 2 colunas onde couber.
   Desktop (>= 1024px): barra lateral branca e sólida, conteúdo em grade (até 1200px). */

/* painel (celular): blocos empilhados */
.painel-grid { display: block; }
.painel-topo { grid-column: 1 / -1; }

/* ---------- tablet ---------- */
@media (min-width: 680px) {
  :root { --gut: 28px; }
  .top-in { min-height: 84px; }
  .is-auth .top-in { padding-top: 40px; }
  .logo-img { height: 40px; }
  .hello { margin-top: 12px; }
  .hello-nome { font-size: 2.6rem; }
  .bottom { bottom: 14px; max-width: 560px; border-radius: 28px; padding-bottom: 0; box-shadow: 0 14px 36px rgba(40, 70, 66, .16), 0 1px 3px rgba(40, 70, 66, .08); }
  body.is-app { padding-bottom: calc(var(--nav-h) + 48px); }
  .painel-topo.com-anel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
  .anel-card { flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-bottom: 20px; }
  .semana { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .filtros-form { grid-template-columns: repeat(2, 1fr); }
  .page-head { margin: 12px 0 20px; }
  .page-head .semana-nav { flex: 0 1 380px; margin: 0; }
  body.v-config .main > .card, body.v-insumo .main > .card, body.v-mais .main > .card { max-width: 680px; }
}
@media (min-width: 680px) and (max-width: 1023.98px) {
  body.v-receita, body.v-pedido { --nav-h: 0px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  :root { --gut: 32px; }
  body.is-app { padding-bottom: 0; padding-left: var(--side-w); }
  .is-app .top, .bottom { display: none !important; }
  .main { padding-top: 32px; padding-bottom: 56px; }

  /* barra lateral branca e sólida */
  .side { display: flex; flex-direction: column; position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: var(--side-w); padding: 26px 16px 16px; background: var(--white);
    box-shadow: 1px 0 0 var(--line), 10px 0 32px rgba(40, 70, 66, .05); overflow-y: auto; }
  .side-logo { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin: 0 0 20px 10px; border-radius: 10px; }
  .side-logo .logo-img { height: 44px; }
  .side-novo { min-height: 52px; margin: 0 0 22px; width: 100%; font-size: 1.02rem; box-shadow: 0 8px 18px rgba(35, 42, 46, .22); }
  .side-novo .ic { width: 22px; height: 22px; stroke-width: 2; vertical-align: 0; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav hr { width: calc(100% - 28px); margin: 10px 14px; border: 0; border-top: 1px solid var(--line); }
  .side-nav a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 16px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; line-height: 1.2;
    transition: background-color .18s var(--ease), color .18s var(--ease); }
  .side-nav a .ic { width: 24px; height: 24px; stroke-width: 1.6; color: var(--muted); vertical-align: 0; transition: color .18s var(--ease); }
  .side-nav a:hover { background: var(--bg); }
  .side-nav a:hover .ic { color: var(--sage-dk); }
  .side-nav a[aria-current] { background: var(--sage-soft); color: var(--sage-deep); font-weight: 700; }
  .side-nav a[aria-current] .ic { color: var(--sage-dk); stroke-width: 1.9; }
  .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .side-foot form { margin: 0; }
  .side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .side-user .circ { width: 40px; height: 40px; font-size: .95rem; color: var(--sage-deep); }
  .side-nome { min-width: 0; font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot .btn { padding: 0 12px; }

  /* cabeçalhos de página */
  .page-title { font-size: 2.25rem; line-height: 1.1; }
  .page-head { margin: 0 0 24px; }
  .page-head .btn, .head-acoes .btn { min-height: 48px; }
  .hello { margin: 0 0 24px; align-items: center; }
  .hello-nome { font-size: 2.9rem; }
  .hello-sub { font-size: 1rem; }
  .head-acoes { display: flex; }
  .head-acoes .ic, .page-head .btn .ic { vertical-align: -.35em; }
  .voltar { margin-bottom: 4px; }
  .main > .page-title { margin-bottom: 20px; }
  .barra-salvar .btn:only-child { margin-left: auto; }
  .ped-item { grid-template-columns: minmax(0, 1fr) 120px 180px; }
  .det-lado .stack > .stats, .det-lado .stats { margin-top: 16px; }
  .sub { margin-bottom: 24px; }

  /* barra de salvar vira cartão fixo no pé da tela */
  .barra-salvar { bottom: 16px; flex-direction: row; align-items: center; justify-content: space-between; margin: 0 0 20px; padding: 14px 20px; border-radius: var(--radius); box-shadow: 0 10px 34px rgba(40, 70, 66, .16), 0 1px 3px rgba(40, 70, 66, .08); }
  .barra-res { text-align: left; }
  .barra-res .sobra { display: inline; font-size: inherit; margin: 0; }
  .barra-res .sep-s { display: inline; }

  /* painel em grade */
  .painel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 28px; align-items: start; }
  .painel-topo { margin-bottom: 28px; gap: 20px; }
  .painel-topo.com-anel { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .card.saldo { padding: 30px 32px; gap: 24px; align-content: center; }
  .saldo .circ { width: 64px; height: 64px; }
  .saldo-v { font-size: 3.4rem; }
  .saldo-l { font-size: 1.05rem; }
  .saldo-linha strong { font-size: 1.3rem; }
  .saldo-linha span { font-size: .9rem; }
  .anel-card { padding: 24px; }
  .anel { width: 168px; height: 168px; }
  .anel-c strong { font-size: 1.3rem; }
  .pg-prox .sec-head { margin-top: 0; }
  .pg-lado { margin-top: 52px; }
  .pg-lado .card { margin-bottom: 20px; }
  .painel-grid.sem-lado { grid-template-columns: minmax(0, 1fr); }
  .sem-lado .pg-prox .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-novo { display: none; }
  .pg-prox .passos li span:not(.num) { min-width: 0; }

  /* listas em grade */
  .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
  .pg-prox .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-head { margin: 32px 0 12px; }
  .sec-head h2 { font-size: 1.4rem; }
  .filtros-form { grid-template-columns: repeat(4, 1fr) auto; }
  .filtros-form .btn { min-height: 48px; }
  .card.lista { padding: 6px 24px; }
  body.v-insumos .lista.card { max-width: 860px; }

  /* semana: dias em colunas */
  .semana { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .dia { padding: 14px; }
  .dia.vazio { background: var(--card); }
  .semana-nav { margin: 0 0 16px; }
  .semana-nav strong { white-space: nowrap; }
  .ped .btn-sm { padding: 0 10px; font-size: .88rem; white-space: normal; line-height: 1.15; text-align: center; }
  .ped .quick form { flex-basis: 100%; }

  /* detalhe de receita e de pedido novo: formulário à esquerda, números fixos à direita */
  .det-form, main > form#ped-form { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr auto; gap: 0 28px; align-items: start; }
  .det-form > .card, main > form#ped-form > .card { grid-column: 1; margin-bottom: 20px; }
  .det-form > .det-lado, main > form#ped-form > .det-lado { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain; }
  .det-form > .barra-salvar, main > form#ped-form > .barra-salvar { grid-column: 1 / -1; }
  .det-lado .stats, .det-lado .stats-4 { grid-template-columns: 1fr 1fr; }
  .det-lado .sug { grid-template-columns: repeat(3, 1fr); }

  /* pedido já salvo: ações à esquerda, resumo fixo à direita */
  .det-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0 28px; align-items: start; }
  .det-grid > .det-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .det-grid > .det-lado { grid-column: 2; grid-row: 1; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; margin-bottom: 0; }
  .det-main details.edit > summary { min-height: 60px; }
  details.edit .det-lado { position: static; max-height: none; }

  /* caixa: resumo à esquerda, lançamentos à direita */
  .caixa-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .cx-resumo { position: sticky; top: 24px; }
  .cx-resumo .grid3 { grid-template-columns: 1fr 1fr; }
  .cx-resumo .grid3 > :nth-child(3) { grid-column: 1 / -1; }
  .cx-resumo .saldo-linha strong { font-size: 1.08rem; }
  .cx-mov .item:not(:has(form)) { padding-right: 56px; }
  .cx-mov .sec-head { margin-top: 8px; }
  .cx-mov .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* páginas de formulário simples: coluna de leitura */
  body.v-config .main > .card, body.v-insumo .main > .card { max-width: 720px; }

  /* hover sutil (só com mouse) */
  @media (hover: hover) {
    .row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
    .dia:not(.vazio):hover { box-shadow: var(--shadow); }
    .item-main:hover strong { color: var(--sage-ink); }
    .item:hover { background: linear-gradient(90deg, transparent, rgba(224, 237, 235, .45), transparent); }
    .btn-pri:hover { box-shadow: 0 8px 18px rgba(35, 42, 46, .22); }
    .stat:hover { border-color: var(--sage); }
    a.stat:hover { box-shadow: var(--shadow-s); }
  }
}
/* 7 dias lado a lado quando a tela dá */
@media (min-width: 1400px) {
  .semana { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
  .dia { padding: 12px 10px; font-size: .92rem; }
}
/* foco por teclado: anel sálvia também nos cartões clicáveis */
@supports selector(:has(a)) {
  .row:has(.row-link:focus-visible) { box-shadow: 0 0 0 3px var(--sage-dk), var(--shadow-s); }
  .row-link:focus-visible { outline: none; }
}
.side a:focus-visible, .side button:focus-visible { outline: 3px solid var(--sage-dk); outline-offset: 2px; }

/* ===================== TEMA LEVE (branch tema/leve, para comparar) =====================
   Pedido do dono (2026-11-02): mais leve, no estilo medido no Doce Gestão — letra menor, números menores,
   cartões de vidro (branco translúcido + desfoque + borda branca), sombra larga e clara que "flutua", ícones menores.
   Só sobrescreve; apagar este bloco volta ao tema anterior. */
:root {
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 24px 60px -28px rgba(30, 60, 56, .24), 0 2px 6px -2px rgba(30, 60, 56, .08);
  --shadow-s: inset 0 1px 0 rgba(255, 255, 255, .9), 0 16px 40px -24px rgba(30, 60, 56, .22), 0 1px 4px -1px rgba(30, 60, 56, .07);
  --radius: 20px; --radius-s: 14px;
}
body {
  font-size: 15px;
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(127, 168, 163, .22), transparent 60%),
    radial-gradient(800px 700px at 110% 30%, rgba(224, 237, 235, .9), transparent 60%),
    radial-gradient(700px 500px at 30% 110%, rgba(127, 168, 163, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.card, .row, .dia {
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
}
.card { padding: 16px; }
.row { padding: 12px 14px; }
.stat { background: rgba(255, 255, 255, .55); border-color: rgba(220, 232, 230, .8); padding: 12px 6px 10px; }
.stat > .ic { width: 18px; height: 18px; stroke-width: 2; }
h2 { font-size: 1rem; }
.page-title { font-size: 1.375rem; letter-spacing: -.02em; }
.hello { margin: 4px 0 14px; }
.hello-nome, .hello-nome { font-size: 1.375rem; letter-spacing: -.02em; }
.hello-sub { font-size: .875rem; }
.logo-img { height: 30px; }
.top-in { min-height: 60px; }
.top-perfil { width: 44px; height: 44px; }
.top-perfil .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.circ { width: 36px; height: 36px; }
.circ .ic { stroke-width: 2; }
.saldo .circ { width: 40px; height: 40px; }
.card.saldo { padding: 16px; gap: 12px; border-color: rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 24px 60px -28px rgba(47, 88, 83, .6); }
.saldo-l { font-size: .8rem; font-weight: 600; }
.saldo-v { font-size: 1.6rem; letter-spacing: -.02em; }
.saldo-mes { font-size: .8rem; }
.saldo-linha { padding-top: 12px; }
.saldo-linha span { font-size: .75rem; }
.saldo-linha strong { font-size: .95rem; }
.anel { width: 116px; height: 116px; }
.anel-c strong { font-size: .95rem; }
.anel-c span { font-size: .72rem; }
.anel-lucro strong { font-size: 1.25rem; }
.row-nome, .row-valor { font-size: .95rem; }
.row-sub { font-size: .82rem; }
.row-lucro { font-size: 1rem; }
.lucro-txt { font-size: .8rem; }
.selo { font-size: .75rem; }
.field > span { font-size: .8rem; }
.res-lucro strong { font-size: 1.6rem; }
.bottom a:not(.fab) .ic { width: 22px; height: 22px; stroke-width: 1.9; }
.bottom a[aria-current] .ic { stroke-width: 2.1; }
.fab .ic { width: 24px; height: 24px; }
.bottom { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); }
@media (min-width: 680px) { .hello-nome { font-size: 1.6rem; } .logo-img { height: 32px; } }
.top { background: transparent; }
.sec-head h2 { font-size: 1.05rem; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; padding-top: 12px; }
.detalhes > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.detalhes > summary::-webkit-details-marker { display: none; }
.detalhes > summary h2::after { content: " +"; color: var(--muted); font-weight: 400; }
.detalhes[open] > summary h2::after { content: " −"; }
.detalhes[open] > summary { margin-bottom: 12px; }
@media (min-width: 1024px) { .det-form#rec-form > .det-lado { grid-row: 1 / span 3; } }
.btn-google { gap: 10px; }
.btn-google .ic { width: 20px; height: 20px; vertical-align: 0; }
.ou { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); font-size: .85rem; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
input::placeholder, textarea::placeholder { font-style: italic; }
/* 4) o "+" flutuante não pode cobrir o último botão da tela no celular */
@media (max-width: 679.98px) { body.is-app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 56px); } }
.dica-emb { margin: 8px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--amber-ink); font-size: .9rem; }
/* alvos de toque >= 44 px (revisão qa-visual 2026-11-03) */
.links a, small a, .res-top strong a { display: inline-flex; align-items: center; min-height: 44px; }
.links a { padding: 0 6px; }
.saldo-linha a { min-height: 44px; justify-content: center; }
