/* =====================================================================
   Sistema de desenho — calmo, editorial, compacto.
   Hierarquia por peso, tamanho e espaço (não por caixas). Um só acento.
   ===================================================================== */
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/instrument-sans-latin.woff2') format('woff2'); }

:root {
  --bg: #F5F4F1; --paper: #FAF9F7; --raised: #FFFFFF; --tile: #F0EDE8;
  --line: rgba(28, 24, 20, .075); --line-2: rgba(28, 24, 20, .15);
  --ink: #1D1A17; --ink-2: #6A645C; --ink-3: #A39C92;
  --accent: #D9530B;                       /* laranja da marca (o mesmo do ícone), escurecido para texto legível */
  --brand: #FF7A00; --btn: #EE6A10; --on-btn: #FFFFFF;
  --accent-soft: #FFF0E4;
  --ok: #2F9E62; --soon: #B08A0E; --low: #E8770C; --crit: #DD3F3F;   /* estados: vivos mas calmos */
  --shadow: 0 1px 2px rgba(28, 24, 20, .05), 0 12px 32px rgba(28, 24, 20, .10);
  --card: 0 1px 2px rgba(28, 24, 20, .04), 0 4px 16px rgba(28, 24, 20, .055);
  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --r-s: 12px; --r-m: 16px; --r-l: 28px; --r-card: 22px;
  --nav-h: 64px; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1); --soft: cubic-bezier(.22, .9, .3, 1); --seg-on: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121110; --paper: #1A1917; --raised: #1F1D1B; --tile: #2A2724;
    --line: rgba(243, 239, 234, .08); --line-2: rgba(243, 239, 234, .17);
    --ink: #F3EFEA; --ink-2: #ABA398; --ink-3: #746D64;
    --accent: #FF9447; --brand: #FF7A00; --btn: #F2700F; --on-btn: #FFFFFF; --accent-soft: rgba(255, 122, 0, .15);
    --ok: #4CC487; --soon: #D8B64A; --low: #FF9F43; --crit: #FF6B6B;
    --shadow: 0 0 0 1px rgba(243, 239, 234, .06), 0 18px 40px rgba(0, 0, 0, .5);
    --card: 0 0 0 1px rgba(243, 239, 234, .05);
    --seg-on: #3A3632; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
    --bg: #121110; --paper: #1A1917; --raised: #1F1D1B; --tile: #2A2724;
    --line: rgba(243, 239, 234, .08); --line-2: rgba(243, 239, 234, .17);
    --ink: #F3EFEA; --ink-2: #ABA398; --ink-3: #746D64;
    --accent: #FF9447; --brand: #FF7A00; --btn: #F2700F; --on-btn: #FFFFFF; --accent-soft: rgba(255, 122, 0, .15);
    --ok: #4CC487; --soon: #D8B64A; --low: #FF9F43; --crit: #FF6B6B;
    --shadow: 0 0 0 1px rgba(243, 239, 234, .06), 0 18px 40px rgba(0, 0, 0, .5);
    --card: 0 0 0 1px rgba(243, 239, 234, .05);
    --seg-on: #3A3632; color-scheme: dark;
}
:root[data-theme='light'] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); word-spacing: .07em; font: 400 15px/1.4 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.lock { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { opacity: .38; cursor: default; }
input, select { font: inherit; color: inherit; }
.ic { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }

#app { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 14px) 20px calc(var(--nav-h) + var(--sab) + 44px); min-height: 100dvh; }
#app.noauth { padding-bottom: 32px; }
.view-in > * { animation: rise .22s var(--ease) backwards; } /* backwards: sem estado final retido (um transform retido quebraria o 'fixed' da barra A–Z) */
.view-in > *:nth-child(2) { animation-delay: .02s; } .view-in > *:nth-child(3) { animation-delay: .04s; } .view-in > *:nth-child(4) { animation-delay: .06s; }

/* ---------- tipografia ---------- */
.display { font-size: 32px; line-height: 1.06; font-weight: 600; letter-spacing: -.024em; word-spacing: .12em; }
.title { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; word-spacing: .1em; }
.sub { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.link { font-size: 13.5px; font-weight: 600; color: var(--accent); min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
.link.ink { color: var(--ink); }
.link:active, .btn:active, .mbtn:active, .row-main:active, .recent:active, .pf-link:active { opacity: .6; }

/* ---------- topo da Home ---------- */
.home-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 18px; }
.greet { font-size: 14px; color: var(--ink-2); }
.avatar { overflow: hidden; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: var(--ink); font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.ph { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 14px; }

/* ---------- indicador de saúde do estoque ---------- */
.health { display: flex; gap: 3px; height: 6px; margin-top: 14px; border-radius: 3px; overflow: hidden; }
.health i { display: block; border-radius: 3px; min-width: 6px; background: var(--sc); transition: flex-grow .3s var(--ease); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sc, var(--ink-3)); flex: none; }
[data-s='OK'] { --sc: var(--ok); } [data-s='LOW'] { --sc: var(--soon); } [data-s='BUY'] { --sc: var(--low); } [data-s='OUT'] { --sc: var(--crit); }

/* ---------- secções ---------- */
.sh { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 2px; }
.sec-note { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.group { margin-top: 28px; }
.group-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.group-h .n { font-weight: 500; color: var(--ink-3); }

/* ---------- linhas compactas (produtos e atividade) ---------- */
.rows { margin-top: 2px; }
.row { display: flex; align-items: center; gap: 10px; min-height: 64px; border-top: 1px solid var(--line); }
.rows > .row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; transition: opacity .15s; }
.th { width: 46px; height: 46px; border-radius: 15px; background: var(--tile); display: grid; place-items: center; overflow: hidden; flex: none; position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.th img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; border-radius: inherit; }
.th .emo { font-size: 22px; line-height: 1; filter: saturate(.85); }
.th.sm { width: 40px; height: 40px; border-radius: 13px; }
.tx { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.tx b { font-size: 15px; font-weight: 600; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx i { font-style: normal; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q { display: flex; flex-direction: column; align-items: flex-end; flex: none; gap: 1px; text-align: right; }
.q b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.q b.tick { animation: tick .26s var(--ease); }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--sc, var(--ink-2)); white-space: nowrap; }
.when { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; flex: none; }
.delta { font-style: normal; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.delta.plus { color: var(--ok); } .delta.minus { color: var(--ink-2); }

/* ---------- controles pequenos ---------- */
.mbtn { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); flex: none; transition: transform .15s var(--ease), background .15s; }
.mbtn::after { content: ''; position: absolute; inset: -8px; }
.mbtn:active { transform: scale(.92); background: var(--tile); }
.mbtn.lg { width: 40px; height: 40px; }
.btn { height: 46px; padding: 0 22px; border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; letter-spacing: -.005em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: transform .15s var(--ease), opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; border-radius: var(--r-s); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.wide { width: 100%; }
.btnrow { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.btnrow .grow { flex: 1; min-width: 0; padding: 0 12px; }

/* ---------- busca e filtros ---------- */
.search { position: relative; display: flex; align-items: center; height: 42px; padding: 0 14px 0 40px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.search .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: grid; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 12px -20px 0; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 10px 0 11px; font-size: 14px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; }
.tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- vazio ---------- */
.empty { padding: 44px 8px 20px; text-align: center; color: var(--ink-2); }
.empty h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 14px; max-width: 280px; margin: 0 auto 16px; }

/* ---------- folhas (sheets) e páginas ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 16, .38); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; margin: 0 auto; width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; overflow-x: hidden; padding: 8px 20px calc(22px + var(--sab)); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--raised); box-shadow: var(--shadow); overscroll-behavior: contain; }
.anim.sheet { animation: up .24s var(--ease); }
.anim.scrim { animation: fade .2s ease-out; }
.grab { width: 34px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
.sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.stitle { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); flex: none; margin: -4px -8px 0 0; }
.iconbtn:active { background: var(--tile); }
.page { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overflow-x: hidden; background: var(--bg); overscroll-behavior: contain; }
.anim.page { animation: slide .24s var(--ease); }
.page-in { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 8px) 20px calc(40px + var(--sab)); }
.pbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0 -10px 6px; }
.pbar .iconbtn { margin: 0; width: 44px; height: 44px; color: var(--ink); }

/* ---------- detalhe do produto ---------- */
.hero { position: relative; min-height: 196px; border-radius: 20px; background: var(--tile); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hero img { display: block; width: 100%; height: auto; max-height: 360px; min-height: 196px; object-fit: contain; }
.hero .emo { font-size: 86px; line-height: 1; filter: saturate(.85) drop-shadow(0 10px 14px rgba(37, 34, 31, .14)); }
.hero .cam { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); box-shadow: var(--shadow); color: var(--ink); }
.pname { margin-top: 18px; }
.stock-now { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.big { font-size: 56px; line-height: 1; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.big.tick { animation: tick .26s var(--ease); }
.big-unit { font-size: 15px; color: var(--ink-2); margin-left: 6px; letter-spacing: 0; font-weight: 400; }
.facts { margin-top: 26px; }
.fact { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; border-top: 1px solid var(--line); font-size: 14.5px; }
.fact:first-child { border-top: 0; }
.fact > span:first-child { color: var(--ink-2); }
.fact > span:last-child { font-weight: 500; font-variant-numeric: tabular-nums; }
.level { position: relative; height: 5px; border-radius: 3px; background: var(--line); margin: 14px 0 6px; }
.level i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--sc, var(--ok)); transition: width .3s var(--ease); }
.level b { position: absolute; top: -4px; bottom: -4px; width: 1.5px; background: var(--ink-2); border-radius: 1px; }
.level-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; padding: 14px 16px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.suggest .tx b { font-size: 14.5px; }
.tl { position: relative; margin-top: 4px; padding-left: 18px; }
.tl::before { content: ''; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl li { position: relative; padding: 9px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tl li::before { content: ''; position: absolute; left: -19px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1.5px var(--ink-3); }
.tl li small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* ---------- reposição ---------- */
.rs-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 16px 0 6px; font-variant-numeric: tabular-nums; }
.rs-sum .from { color: var(--ink-2); font-size: 14px; }
.rs-sum .to { font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stepper .val { font-size: 22px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 96px; text-align: center; }

/* ---------- formulários ---------- */
.field { margin-top: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.inp { width: 100%; height: 44px; border: 0; border-radius: var(--r-m); padding: 0 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15.5px; outline: none; }
.inp:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 19px, calc(100% - 15px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.suffix { position: relative; }
.suffix .inp { padding-right: 70px; }
.suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13.5px; color: var(--ink-3); pointer-events: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.err { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-s); background: color-mix(in srgb, var(--crit) 11%, var(--raised)); color: var(--crit); font-size: 13.5px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 14px; border-radius: var(--r-s); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.steps { display: flex; gap: 4px; margin: 4px 0 18px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .2s; }
.steps i.on { background: var(--ink); }
.step-h { font-size: 22px; font-weight: 600; letter-spacing: -.022em; line-height: 1.15; }
.photo-pick { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.photo-pick .th { width: 64px; height: 64px; }
.photo-pick .th .emo { font-size: 30px; }

/* ---------- catálogo (adicionar) ---------- */
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--line); }
.pick:first-child { border-top: 0; }
.pick .tick-c { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; color: transparent; flex: none; transition: background .15s, color .15s; }
.pick.sel .tick-c { background: var(--ink); color: var(--bg); box-shadow: none; }
.pick.have { opacity: .45; }
.pick.have .tick-c { box-shadow: none; color: var(--ink-3); }
.sticky-foot { position: sticky; bottom: -22px; margin: 14px -20px -22px; padding: 12px 20px calc(18px + var(--sab)); background: linear-gradient(to top, var(--raised) 78%, transparent); }

/* ---------- métrica de saúde (Início) ---------- */
.metric { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.metric-n { font-size: 52px; line-height: 1; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-n small { font-size: 24px; font-weight: 500; margin-left: 2px; color: var(--ink-2); letter-spacing: 0; }
.metric-l { font-size: 14px; color: var(--ink-2); }
.recent { display: flex; align-items: center; width: 100%; min-height: 52px; gap: 12px; border-top: 1px solid var(--line); }
.recent:first-child { border-top: 0; }
.recent .tx b { font-weight: 500; font-size: 15.5px; }
.recent .ic { color: var(--ink-3); }

/* ---------- controle segmentado ---------- */
.segc { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 2px; padding: 3px; border-radius: 13px; background: var(--tile); }
.segc button { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background .18s var(--ease), color .18s, box-shadow .18s; }
.segc button.on { background: var(--seg-on); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .06); }
.segc button em { font-style: normal; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.segc button.on em { color: var(--ink-2); }
.rs-seg { margin-top: 16px; }
.rs-seg button { min-height: 42px; padding: 0 8px; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); flex: none; transition: background .2s var(--ease); }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch.on { background: var(--ok); }
.switch.on i { transform: translateX(18px); }

/* ---------- perfil (folha) ---------- */
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.pf-head { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.pf-head .tx b { font-size: 17px; }
.pf-sec { margin: 22px 0 2px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; border-top: 1px solid var(--line); font-size: 14.5px; }
.pf-sec + .pf-row { border-top: 0; }
.pf-row > span:first-child { flex: none; }
.pf-row .segc { flex: 1; max-width: 262px; }
.pf-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; border-top: 1px solid var(--line); font-size: 14.5px; }
.pf-link .muted { font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
/* lista de moedas (Perfil → Moeda) */
.cur-list { display: grid; gap: 2px; background: var(--raised); border-radius: var(--r-card); padding: 4px; box-shadow: var(--card); }
.cur-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 8px 12px; border-radius: 14px; text-align: left; transition: background .18s; }
.cur-row:active { background: var(--line); }
.cur-row.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cur-sym { flex: none; display: grid; place-items: center; width: 60px; height: 38px; padding: 0 4px; border-radius: 11px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 700; font-size: 15px; }
.cur-row.on .cur-sym { background: var(--accent); color: #fff; box-shadow: none; }
.cur-name { flex: 1; display: flex; flex-direction: column; font-size: 15px; font-weight: 600; line-height: 1.25; }
.cur-name small { font-size: 12px; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; }
.cur-ok { flex: none; width: 20px; color: var(--accent); }
.pf-edit { display: grid; gap: 10px; padding: 4px 0 14px; }
.pf-edit .btn { justify-self: start; }

/* ---------- Mais (ajustes) ---------- */
.set { margin-top: 26px; }
.set-h { font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 2px; }
.person { display: flex; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--line); }
.set > .person:nth-of-type(1) { border-top: 0; }
.invite { margin-top: 12px; padding: 16px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.code { font-size: 26px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.acc-h { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.acc-h .ic { transition: transform .2s var(--ease); color: var(--ink-3); }
.acc-h[aria-expanded='true'] .ic { transform: rotate(90deg); }
.acc-b { padding-bottom: 6px; }
.seg { display: inline-flex; gap: 20px; }
.seg button { padding: 8px 0; font-size: 14.5px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; }
.seg button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- entrar ---------- */
.auth { max-width: 380px; margin: 0 auto; padding-top: 9vh; }
.auth .logo { font-size: 40px; font-weight: 600; letter-spacing: -.045em; }
.auth .tag { margin: 4px 0 30px; color: var(--ink-2); font-size: 15px; }
.auth .tabs { margin: 0 0 6px; padding: 0; }
.auth .btn { width: 100%; margin-top: 22px; }
.auth .link { margin-top: 12px; }

/* ---------- navegação inferior (flutuante) ---------- */
#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; pointer-events: none; padding: 0 12px calc(10px + var(--sab)); }
.nav-in { pointer-events: auto; max-width: 520px; margin: 0 auto; height: 62px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px; border-radius: 26px; background: color-mix(in srgb, var(--raised) 78%, transparent); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.nav-in button { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 20px; color: var(--ink-3); font-size: 10.5px; font-weight: 500; letter-spacing: .01em; transition: color .2s, transform .15s var(--ease); }
.nav-in button:active { transform: scale(.94); }
.nav-in button.on { color: var(--ink); font-weight: 600; }
.nav-in button.on::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: var(--tile); animation: fade .2s ease-out; }
.nav-in .badge { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ---------- aviso ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 26px); z-index: 60; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 16px; max-width: min(92vw, 420px); padding: 11px 16px; border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); transition: opacity .2s, transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { flex: none; min-height: 36px; padding: 0 2px; font-weight: 600; color: var(--bg); text-decoration: underline; text-underline-offset: 3px; opacity: .9; }
body.lock .toast { bottom: auto; top: calc(var(--sat) + 12px); transform: translate(-50%, -10px); }
body.lock .toast.show { transform: translate(-50%, 0); }
.offline { margin: 0 -20px 12px; padding: 7px 20px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 500; text-align: center; }

@keyframes up { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide { from { transform: translateX(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tick { from { transform: translateY(-7px); opacity: .15; } to { transform: none; opacity: 1; } }
/* "Reduzir movimento" liga-se muitas vezes sozinho com a poupança de bateria (iPhone em Modo de Pouca Energia, Android em poupança):
   a pedido do proprietário a app continua fluida (movimentos curtos e suaves). Só o deslizar automático da página fica desligado. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (min-width: 900px) { #app { padding-top: 40px; } .display { font-size: 38px; } .title { font-size: 32px; } }

.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.ava-wrap { position: relative; flex: none; border-radius: 50%; }
.ava-wrap .cam-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); box-shadow: 0 0 0 2px var(--raised); }
.ava-wrap:active { opacity: .7; }
.person .avatar { width: 40px; height: 40px; }

/* ---------- histórico (página) ---------- */
.day { margin: 26px 0 2px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; border-top: 1px solid var(--line); }
.day + .hrow { border-top: 0; }
.hrow .tx b { font-weight: 600; }
.hk { font-weight: 600; }
.hk.in, .hq.in { color: var(--ok); }
.hk.out { color: var(--ink); }
.hk.fix { color: var(--low); }
.hq { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hq.out { color: var(--ink); } .hq.fix { color: var(--ink-2); font-weight: 500; }
.hmini { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-top: 1px solid var(--line); font-size: 14.5px; }
.hmini .when { font-size: 12.5px; }
.pbar .h2 { position: absolute; left: 50%; transform: translateX(-50%); }

/* ---------- foto: escolher e conferir ---------- */
.pframe { margin-top: 14px; border-radius: 20px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.pframe img { display: block; width: 100%; max-height: 52dvh; object-fit: contain; }
.pcircle { width: 220px; height: 220px; margin: 18px auto 4px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.pcircle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-link .ic:first-child { color: var(--ink-2); }
.pf-link .lead { display: flex; align-items: center; gap: 14px; }

/* ---------- entrar (idioma separado do resto) ---------- */
.auth { padding-top: 4vh; }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: 34px; }
.auth .link { display: flex; justify-content: center; width: 100%; margin: 18px auto 0; min-height: 44px; }

/* ---------- botão central "Comprar" ---------- */
.nav-in .nav-buy { color: var(--ink); font-weight: 600; justify-content: flex-end; padding-bottom: 6px; gap: 2px; }
.nav-in .nav-buy::before { display: none; }
.buy-orb { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--bg); margin-bottom: 1px; transform: translateY(-13px); box-shadow: 0 10px 22px rgba(0, 0, 0, .22), 0 0 0 4px var(--bg); transition: transform .15s var(--ease); }
.nav-buy:active .buy-orb { transform: translateY(-11px) scale(.94); }
.buy-orb .badge { position: absolute; top: -3px; right: -3px; left: auto; min-width: 20px; height: 20px; border-radius: 10px; font-size: 11px; box-shadow: 0 0 0 2px var(--bg); }
.nav-buy > span:last-child { margin-top: -16px; }

/* ---------- página de compras ---------- */
.shop .page-in { padding-bottom: calc(140px + var(--sab)); }
.prog { height: 6px; border-radius: 3px; background: var(--line); margin-top: 12px; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 3px; background: var(--ok); transition: width .3s var(--ease); }
.aisle { margin: 26px 0 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.srow { padding: 14px 0; border-top: 1px solid var(--line); }
.aisle + .srow { border-top: 0; }
.srow-top { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-width: 0; }
.srow-top .tx b { font-size: 16.5px; white-space: normal; }
.srow .iact { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.srow .iact .btn { flex: 1; height: 48px; font-size: 16px; }
.qstep { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 28px; background: var(--tile); flex: none; }
.qstep .mbtn { width: 42px; height: 42px; border: 0; background: var(--seg-on); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.qstep .qv { min-width: 78px; padding: 0 4px; text-align: center; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.srow.other { opacity: .62; }
.cnote { font-style: italic; }
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 6px 6px 6px 16px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.offline-note { margin-top: 14px; padding: 10px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--low) 16%, var(--raised)); font-size: 13.5px; font-weight: 500; }
.finish-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 22px 16px calc(12px + var(--sab)); background: linear-gradient(to top, var(--bg) 62%, transparent); pointer-events: none; }
.fb-in { pointer-events: auto; max-width: 600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 9px 9px 18px; border-radius: 24px; background: var(--raised); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.fb-txt { display: flex; flex-direction: column; min-width: 0; }
.fb-txt b { font-size: 15.5px; font-weight: 600; }
.fb-txt i { font-style: normal; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fb-in .btn { height: 50px; padding: 0 22px; font-size: 16px; }
.fin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; border-top: 1px solid var(--line); }
.fin .fin-row:first-child { border-top: 0; }
.fin-row .num { font-weight: 600; }
.fin-total { display: flex; justify-content: space-between; padding: 14px 0 2px; border-top: 1px solid var(--line-2); font-size: 16px; }
.fin-total b { font-variant-numeric: tabular-nums; }

/* ---------- compras do mês ---------- */
.mrows { margin-top: 2px; }
.mrow { display: flex; align-items: center; gap: 12px; min-height: 66px; border-top: 1px solid var(--line); }
.mrows .mrow:first-child { border-top: 0; }
.chk { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .15s, color .15s; position: relative; }
.chk::after { content: ''; position: absolute; inset: -8px; }
.chk.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.mtx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 8px 0; text-align: left; transition: opacity .15s; }
.mtx b { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtx i { font-style: normal; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow:not(.on) .mtx { opacity: .55; }
.qstep.sm .mbtn { width: 34px; height: 34px; }
.qstep.sm .qv { min-width: 40px; font-size: 14px; }
.month-foot { position: sticky; bottom: calc(var(--nav-h) + var(--sab) + 28px); margin-top: 28px; z-index: 5; }
.month-foot .btn { box-shadow: var(--shadow); height: 50px; font-size: 16px; }
.st.incart { color: var(--ok); font-weight: 600; font-size: 13px; }

/* ---------- entrar por código ---------- */
.code-inp { height: 58px; font-size: 26px; font-weight: 600; letter-spacing: .5em; text-align: center; padding: 0 0 0 .5em; font-variant-numeric: tabular-nums; }
.demo-code { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-s); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 500; }

.inp::placeholder { color: var(--ink-3); opacity: .7; }
.code-inp::placeholder { letter-spacing: .5em; }

/* ---------- botão redondo de selecionar (verde = no carrinho; toque de novo = sai) ---------- */
.thw { position: relative; flex: none; display: block; }
.seltg { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: transparent; box-shadow: inset 0 0 0 2px var(--line-2); transition: background .18s var(--ease), color .18s, transform .15s var(--ease); }
.seltg::after { content: ''; position: absolute; inset: -9px; }
.seltg:active { transform: scale(.88); }
.seltg-sp { flex: none; width: 30px; }
.seltg.on { background: var(--ok); color: #fff; box-shadow: none; }

/* ---------- deslizar entre abas ---------- */
.view-in.dir-l > * { animation-name: riseL; animation-duration: .38s; animation-timing-function: var(--soft); } .view-in.dir-r > * { animation-name: riseR; animation-duration: .38s; animation-timing-function: var(--soft); }
@keyframes riseL { from { transform: translateX(56px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes riseR { from { transform: translateX(-56px); opacity: 0; } to { transform: none; opacity: 1; } }
/* toque na barra de baixo: o ecrã antigo sai e o novo entra AO MESMO TEMPO (View Transitions); a barra de baixo fica parada */
#main { view-transition-name: main; }
#nav { view-transition-name: nav; }
::view-transition-group(main) { animation-duration: .36s; }
html[data-vt='l']::view-transition-old(main) { animation: vtOutL .3s cubic-bezier(.4, 0, .2, 1) both; }
html[data-vt='l']::view-transition-new(main) { animation: vtInL .36s cubic-bezier(.22, .8, .24, 1) both; }
html[data-vt='r']::view-transition-old(main) { animation: vtOutR .3s cubic-bezier(.4, 0, .2, 1) both; }
html[data-vt='r']::view-transition-new(main) { animation: vtInR .36s cubic-bezier(.22, .8, .24, 1) both; }
@keyframes vtOutL { to { transform: translateX(-24%); opacity: 0; } }
@keyframes vtInL { from { transform: translateX(24%); opacity: 0; } }
@keyframes vtOutR { to { transform: translateX(24%); opacity: 0; } }
@keyframes vtInR { from { transform: translateX(-24%); opacity: 0; } }

/* ---------- abecedário lateral ---------- */
.alpha { margin: 16px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.alpha + .row, .alpha + .pick { border-top: 0; }
.az { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 38; width: 17px; padding: 5px 0; display: flex; flex-direction: column; border-radius: 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); touch-action: none; user-select: none; -webkit-user-select: none; }
.sheet .az { z-index: 55; }
.az span { font-size: 9.5px; font-weight: 700; line-height: 14px; text-align: center; color: var(--accent); }
.az span.dim { color: var(--ink-3); opacity: .55; font-weight: 500; }
.az-bubble { position: fixed; left: 50%; top: 42%; z-index: 90; transform: translate(-50%, -50%) scale(.9); width: 74px; height: 74px; border-radius: 22px; background: var(--ink); color: var(--bg); font-size: 38px; font-weight: 600; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s var(--ease); }
.az-bubble.show { opacity: .94; transform: translate(-50%, -50%) scale(1); }

/* ---------- editar produto (ícones) ---------- */
.emojis { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 6px; }
.emojis::-webkit-scrollbar { display: none; }
.emo-btn { flex: none; width: 46px; height: 46px; border-radius: 13px; font-size: 24px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); }
.emo-btn.on { background: var(--tile); box-shadow: inset 0 0 0 2px var(--ink); }
.sheet .tabs { margin-top: 8px; }
.toast { touch-action: pan-y; }

#app { overflow-x: clip; } /* a animação de deslize entre abas nunca cria rolagem lateral */

.azwrap { padding-left: 16px; } /* corredor reservado à barra A–Z: as imagens começam depois dela */
.sheet .azwrap .alpha { padding-left: 0; }

/* ---------- filtro por cômodo (lista que abre ao tocar) ---------- */
.roombtn { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; font-weight: 600; }
.roombtn > span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roombtn .ic { color: var(--ink-2); }
.roombtn .ic:last-child { color: var(--ink-3); transition: transform .2s var(--ease); }
.roombtn.open .ic:last-child { transform: rotate(90deg); }
.roombtn.active { box-shadow: inset 0 0 0 1.5px var(--ink); }
.menu { margin-top: 6px; border-radius: var(--r-m); background: var(--raised); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); overflow: hidden; animation: fade .15s ease-out; }
.menu-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 15px; }
.menu-row:first-child { border-top: 0; }
.menu-row > span:first-child { flex: 1; text-align: left; }
.menu-row .n { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.menu-row .mchk { width: 18px; display: grid; place-items: center; color: transparent; }
.menu-row.on { font-weight: 600; } .menu-row.on .mchk { color: var(--ok); }
.menu-row.dim { opacity: .5; }
.menu-row:active { background: var(--tile); }

.shop .roommenu { margin-top: 12px; }

/* ---------- compras: linhas completas e suaves ---------- */
.srow-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; transition: opacity .15s; }
.srow-open:active { opacity: .65; }
.srow-top .tx b { white-space: normal; }
.btn.incart { background: color-mix(in srgb, var(--ok) 15%, var(--raised)); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 32%, transparent); font-weight: 600; }
.finish-bar { transition: transform .32s var(--ease), opacity .28s; }
.finish-bar.off { transform: translateY(115%); opacity: 0; pointer-events: none; }
.pbar .link { margin-right: 10px; }
.srow { transition: opacity .2s; }

/* ---------- entrada: senha com "Mostrar", lembrar de mim, Google ---------- */
.pw { position: relative; }
.pw .inp { padding-right: 84px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 40px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--accent); }
.rem-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.rem { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; text-align: left; }
.chk-sq { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: transparent; background: var(--raised); box-shadow: inset 0 0 0 2px var(--line-2); transition: background .15s, color .15s; flex: none; }
.chk-sq.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.link-sm { min-height: 44px; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.auth .rem-row .link-sm { width: auto; margin: 0; display: inline-flex; align-items: center; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 2px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth .btn.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; background: #fff; color: #1F1F1F; box-shadow: inset 0 0 0 1px #DADCE0; font-weight: 600; }
.auth .btn.gbtn:active { background: #F6F6F6; }
.legal { margin: 22px 0 0; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- créditos: cantinho, cartão do plano, pagamento ---------- */
.home-top { align-items: center; }
.home-right { display: inline-flex; align-items: center; gap: 10px; }
.plan-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.plan-chip.amber i { background: var(--low); } .plan-chip.red i { background: var(--crit); } .plan-chip.red { color: var(--crit); }
.plan-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin: 12px 0 0; border-radius: var(--r-l, 18px); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.plan-card .big { font-size: 34px; font-weight: 600; letter-spacing: -.04em; min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.plan-card .tx { flex: 1; min-width: 0; } .plan-card .tx b { display: block; font-size: 15.5px; } .plan-card .tx i { display: block; font-style: normal; font-size: 13.5px; color: var(--ink-2); }
.plan-card.expired { box-shadow: inset 0 0 0 1.5px var(--crit); } .plan-card.expired .big { color: var(--crit); }
.plan-hero { display: flex; align-items: center; gap: 16px; padding: 18px 16px; margin: 6px 0 4px; border-radius: 18px; background: color-mix(in srgb, var(--ok) 12%, var(--raised)); }
.plan-hero.low { background: color-mix(in srgb, var(--low) 16%, var(--raised)); } .plan-hero.expired { background: color-mix(in srgb, var(--crit) 12%, var(--raised)); }
.plan-hero .big { font-size: 46px; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; } .plan-hero .big small { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-top: 4px; text-align: center; }
.plan-hero .tx b { display: block; font-size: 17px; } .plan-hero .tx i { display: block; font-style: normal; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.exp-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 10px 0 0; border-radius: 14px; background: color-mix(in srgb, var(--crit) 12%, var(--raised)); font-size: 14.5px; }
.exp-banner .btn { flex: none; }
.optcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; margin-top: 8px; border-radius: 16px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; }
.optcard .tx { flex: 1; } .optcard .tx b { display: block; font-size: 15.5px; } .optcard .tx i { display: block; font-style: normal; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.optcard.on { box-shadow: inset 0 0 0 2px var(--ink); } .optcard.on .tick-c { background: var(--ink); color: var(--bg); box-shadow: none; }
.refcard { padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.rrow { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); } .rrow:last-of-type { border-bottom: 0; }
.rrow span { color: var(--ink-2); font-size: 14px; width: 92px; flex: none; } .rrow b { flex: 1; font-size: 20px; letter-spacing: .02em; font-variant-numeric: tabular-nums; } .rrow .link { margin: 0; min-height: 36px; }
.waiting { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.waiting i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); } .pay-row .tx { flex: 1; } .pay-row .tx b { display: block; } .pay-row .tx i { display: block; font-style: normal; font-size: 13px; color: var(--ink-2); }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--tile); color: var(--ink-2); } .pill.PAID { background: color-mix(in srgb, var(--ok) 18%, var(--raised)); color: var(--ok); } .pill.FAILED, .pill.EXPIRED { color: var(--crit); }
.inv-mail { display: flex; gap: 8px; margin-top: 14px; align-items: center; } .inv-mail .inp { flex: 1; min-width: 0; height: 44px; } .inv-mail .btn { flex: none; }
.btn.danger { background: var(--crit); color: #fff; }

.optcard .tick-c { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: transparent; box-shadow: inset 0 0 0 2px var(--line-2); }
.optcard .tx i, .plan-card .tx i { white-space: normal; overflow: visible; text-overflow: clip; }
.exp-banner { margin-bottom: 14px; }

/* ---------- pessoas: vagas, convites ---------- */
button.person { width: 100%; text-align: left; }
.person .tx .pmail { color: var(--ink-3); font-size: 12.5px; word-break: break-all; }
.avatar.dash { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-2); border: 0; }
.person.free .tx b { color: var(--ink-2); font-weight: 600; } .person.free .avatar.dash { box-shadow: inset 0 0 0 1.5px var(--line-2); border-style: dashed; }
.person.pend .tx i { font-variant-numeric: tabular-nums; } .person.pend.old .tx b { color: var(--ink-2); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; } .share-grid .btn { margin: 0; width: 100%; justify-content: center; text-align: center; text-decoration: none; }
.howto { display: block; margin: 4px 0 8px; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; } .howto li { margin: 4px 0; padding-left: 4px; }
.link-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 8px; }
.inv-banner { margin: 6px 0 4px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 13%, var(--raised)); font-size: 14.5px; line-height: 1.45; }
.hint.bad { color: var(--crit); }

.msg { white-space: pre-wrap; word-break: break-word; margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); user-select: text; -webkit-user-select: text; }
.inp.manual { height: auto; min-height: 110px; padding: 12px 14px; resize: none; font-size: 15px; line-height: 1.45; user-select: text; -webkit-user-select: text; }
.share-grid { grid-template-columns: 1fr 1fr; }

/* ---------- sem emojis: foto do catálogo, ou quadrado com a inicial ---------- */
.th.ini { background: color-mix(in srgb, hsl(var(--h) 60% 52%) 20%, var(--tile)); color: color-mix(in srgb, hsl(var(--h) 55% 38%) 85%, var(--ink)); display: grid; place-items: center; }
.th.ini b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.th.sm.ini b { font-size: 16px; } .th.lg.ini b { font-size: 30px; }
.hero-ini { display: grid; place-items: center; width: 118px; height: 118px; border-radius: 30px; font-size: 56px; font-weight: 600; letter-spacing: -.03em; background: color-mix(in srgb, hsl(var(--h) 60% 52%) 20%, var(--tile)); color: color-mix(in srgb, hsl(var(--h) 55% 38%) 85%, var(--ink)); }
.edit-photo { display: flex; align-items: center; gap: 14px; } .edit-photo .th { width: 64px; height: 64px; flex: none; border-radius: 18px; } .edit-photo .tx i { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.addbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; } .addbar .link { margin-top: 0; }
.selall { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 2px 0 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.selall:disabled { opacity: .4; }
.selall .tick-c { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: transparent; box-shadow: inset 0 0 0 2px var(--line-2); transition: background .15s, color .15s; }
.selall .tick-c.on { background: var(--ink); color: var(--bg); box-shadow: none; }

.addbar .link { flex: none; white-space: nowrap; }
.selall small { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-left: 2px; font-variant-numeric: tabular-nums; }

.pf-help { margin: 2px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }

/* =====================================================================
   v2 — visual moderno e casual: laranja da marca, cartões brancos arredondados,
   etiquetas de estado coloridas, botões grandes. (Só aparência: as classes e a
   estrutura de antes mantêm-se, para não estragar nada.)
   ===================================================================== */
#app { touch-action: pan-y; }                                 /* o deslizar entre abas é nosso; a rolagem vertical continua do telemóvel */
#main { will-change: auto; }
.display { font-size: 31px; font-weight: 700; letter-spacing: -.03em; }
.title { font-size: 29px; font-weight: 700; letter-spacing: -.028em; }
.h2 { font-size: 17px; font-weight: 700; }
.link, .link-sm, .pw-eye { color: var(--accent); }

/* botões: o principal é laranja; o secundário é branco com contorno */
.btn { height: 50px; border-radius: var(--r-m); background: var(--btn); color: var(--on-btn); font-weight: 650; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--btn) 75%, transparent), inset 0 -1px 0 rgba(0, 0, 0, .08); }
.btn.sm { height: 36px; border-radius: var(--r-s); box-shadow: none; }
.btn.ghost { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.danger { background: var(--crit); color: #fff; box-shadow: none; }
.btn.incart { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 32%, transparent); }
.btn:disabled { box-shadow: none; }
.mbtn { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.mbtn:active { background: var(--accent-soft); }

/* cartões: as listas das abas passam a viver em cartões brancos arredondados */
#main .rows, #main .mrows, #main .set, .page .facts { background: var(--raised); border-radius: var(--r-card); padding: 2px 16px; box-shadow: var(--card); }
#main .rows { margin-top: 10px; }
#main .set { padding: 14px 16px 6px; }
#main .set .set-h { margin-bottom: 4px; }
#main .acc .rows, #main .acc .mrows { box-shadow: none; padding: 0; background: transparent; }
#main .acc { background: var(--raised); border-radius: var(--r-card); padding: 0 16px; box-shadow: var(--card); }
#main .acc .acc-h { border-top: 0; }
#main .azwrap { padding-left: 4px; }
#main .rows .alpha:first-child { margin-top: 12px; }
.page .facts { margin-top: 22px; }
.row-main { min-height: 66px; }

/* miniaturas: fotos em fundo branco (as fotos do catálogo têm fundo branco), cantos mais redondos */
.th { border-radius: 16px; }
.th:not(.ini) { background: #FFFFFF; }
.hero { background: #FFFFFF; border-radius: 24px; }

/* etiquetas de estado em "pílula" colorida */
.st { padding: 3px 9px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--sc, var(--ink-3)) 13%, transparent); font-weight: 600; }
.st .dot { width: 6px; height: 6px; }
.q .st { margin-top: 3px; }
.st.incart { padding: 3px 10px; background: color-mix(in srgb, var(--ok) 13%, transparent); }

/* início: cartão de saúde + atalhos */
.hero-card { margin-top: 16px; padding: 18px 18px 16px; border-radius: var(--r-card); background: var(--raised); box-shadow: var(--card); }
.hero-card .metric { margin-top: 0; }
.hero-card .metric-n { font-size: 50px; font-weight: 700; color: var(--ink); }
.health { height: 8px; border-radius: 4px; gap: 4px; }
.health i { border-radius: 4px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.qtile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 104px; padding: 14px 14px 12px; border-radius: 20px; background: var(--raised); box-shadow: var(--card); text-align: left; transition: transform .18s var(--ease); }
.qtile:active { transform: scale(.96); }
.qtile .qi { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 12px; background: var(--tile); color: var(--ink-2); }
.qtile .qi[data-s='LOW'] { background: color-mix(in srgb, var(--soon) 16%, transparent); color: var(--soon); }
.qtile b { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.qtile b small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 1px; }
.qtile > span:last-child { font-size: 12.5px; font-weight: 500; color: var(--ink-2); line-height: 1.2; }
.qtile.hot { background: var(--btn); box-shadow: 0 12px 24px -14px var(--btn); }
.qtile.hot .qi { background: rgba(255, 255, 255, .2); color: #fff; }
.qtile.hot b, .qtile.hot > span:last-child { color: #fff; }
.sh { margin-top: 30px; }

/* navegação inferior: aba ativa em laranja, botão central laranja */
.nav-in { height: 64px; border-radius: 28px; background: color-mix(in srgb, var(--raised) 86%, transparent); }
.nav-in button.on { color: var(--accent); }
.nav-in button.on::before { background: var(--accent-soft); border-radius: 22px; }
.buy-orb { background: linear-gradient(160deg, var(--brand), var(--btn)); color: #fff; box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--btn) 70%, transparent), 0 0 0 4px var(--bg); }
.nav-buy > span:last-child { color: var(--ink); }
.nav-in .badge { background: var(--crit); color: #fff; }
.buy-orb .badge { background: var(--ink); color: var(--bg); }

/* escolhas e seleções em laranja */
.tabs button.on { border-bottom-color: var(--accent); border-bottom-width: 2.5px; }
.seg button.on { border-bottom-color: var(--accent); }
.chip { border-radius: 999px; }
.chip.on { background: var(--btn); color: var(--on-btn); }
.chk.on, .chk-sq.on, .pick.sel .tick-c, .optcard.on .tick-c, .selall .tick-c.on { background: var(--btn); color: #fff; }
.optcard.on { box-shadow: inset 0 0 0 2px var(--btn); }
.steps i.on { background: var(--btn); }
.segc { border-radius: 14px; }
.segc button { border-radius: 11px; }
.alpha, .az span { color: var(--accent); }
.az-bubble { background: var(--btn); color: #fff; }
.avatar { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* campos de texto e pesquisa */
.inp { border-radius: 14px; background: var(--raised); height: 48px; }
.inp:focus { box-shadow: inset 0 0 0 1.5px var(--btn), 0 0 0 4px color-mix(in srgb, var(--btn) 16%, transparent); }
.search { height: 46px; border-radius: 14px; background: var(--raised); box-shadow: var(--card); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--btn), 0 0 0 4px color-mix(in srgb, var(--btn) 16%, transparent); }
.roombtn { border-radius: 14px; background: var(--raised); box-shadow: var(--card); }
.roombtn.active { box-shadow: inset 0 0 0 1.5px var(--btn); }
.sheet .inp, .sheet .search, .sheet .roombtn { background: var(--paper); }

/* folhas e páginas */
.sheet { border-radius: 30px 30px 0 0; }
.anim.sheet { animation: up .34s var(--soft); }
.anim.page { animation: slide .32s var(--soft); }
.grab { width: 40px; height: 5px; border-radius: 3px; }
.toast { border-radius: 16px; padding: 12px 18px; }
.plan-card, .invite, .suggest, .refcard { border-radius: 20px; }

/* entrar: marca com o ícone laranja */
.auth .logo { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.logo-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(160deg, var(--brand), var(--btn)); color: #fff; box-shadow: 0 10px 22px -10px var(--btn); }
.logo-mark .ic { stroke-width: 2; }

/* compras: barra de finalizar e linhas */
.fb-in { border-radius: 24px; }
.qstep { background: var(--tile); }
.prog i { background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 70%, #9be0b8)); }
.empty h3 { font-size: 18px; font-weight: 700; }
.plan-card .tx b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
#main .set:has(> .pf-link) { padding: 2px 16px; }
#main .set .plan-card { background: var(--paper); }
.qtile > span:last-child { min-height: 2.4em; }
/* compras: cada produto num cartão próprio (mais fácil de ler com o telemóvel na mão, no supermercado) */
.shop .srow { margin-top: 10px; padding: 12px 14px 14px; border-top: 0; border-radius: 20px; background: var(--raised); box-shadow: var(--card); }
.shop .aisle { margin: 22px 4px 0; text-transform: none; }
.shop .srow.other { opacity: .7; }
.shop .undo-bar { border-radius: 16px; background: var(--raised); box-shadow: var(--card); }
.btn[data-act='inviteWhatsapp'] { background: #1E9E50; box-shadow: 0 8px 18px -10px rgba(30, 158, 80, .7); }
.stock-now .inc-btn { margin-left: auto; }
.optcard + .optcard { margin-top: 10px; }
.optcard .ic { color: var(--ink-3); }

.typo { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14.5px; font-weight: 600; }
.typo-b { display: flex; gap: 8px; }
.auth .typo .btn { width: auto; margin-top: 0; height: 36px; }

.optcard.soon { opacity: .62; cursor: default; margin-top: 8px; }
.optcard.soon .pill { flex: none; background: var(--accent-soft); color: var(--accent); }
.optcard .tx { min-width: 0; }
.optcard .tx b { white-space: normal; overflow: visible; text-overflow: clip; }

/* remover do estoque: tocar sem soltar num produto e escolher vários */
.row-main[data-lp], .row.selmode .row-main { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.selck { width: 24px; height: 24px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--line-2); display: grid; place-items: center; color: transparent; transition: background .15s, color .15s, box-shadow .15s, transform .15s var(--ease); }
.row.picked .selck { background: var(--accent); color: #fff; box-shadow: none; transform: scale(1.04); }
.row.picked .tx b { color: var(--accent); }
.selhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; }
.lp-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.selbar { position: sticky; bottom: calc(var(--nav-h) + var(--sab) + 26px); z-index: 6; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 9px 9px 18px; border-radius: 22px; background: color-mix(in srgb, var(--raised) 90%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: fade .2s ease-out; }
.selbar-n { font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.selbar .btn { padding: 0 16px; flex: none; }
.btn.danger { background: var(--crit); color: #fff; }
.btn.danger:disabled { opacity: .45; }

/* assinatura com cartão */
.sub-card.bad { box-shadow: inset 0 0 0 1.5px var(--crit); }
