/* Listinha — design system (mobile first, sem dependências externas) */

:root {
  color-scheme: light;
  --bg: #f3f5f0;
  --bg-desk: #e7ece4;
  --surface: #ffffff;
  --surface-2: #f2f5f1;
  --surface-3: #e6ebe4;
  --glass: rgba(255, 255, 255, .78);
  --text: #142019;
  --text-2: #435049;
  --muted: #7a867f;
  --line: rgba(20, 44, 28, .08);
  --line-2: rgba(20, 44, 28, .16);
  --primary: #13a05b;
  --primary-2: #0b8549;
  --primary-soft: #dff4e7;
  --primary-ring: rgba(19, 160, 91, .2);
  --primary-glow: rgba(19, 160, 91, .45);
  --accent: #ff7a3d;
  --accent-2: #e85d1c;
  --accent-soft: #ffeee4;
  --danger: #e5484d;
  --danger-soft: #fdeceb;
  --warn: #c77700;
  --up: #e5484d;
  --down: #13a05b;
  --shadow-sm: 0 1px 2px rgba(16, 30, 20, .05), 0 1px 1px rgba(16, 30, 20, .03);
  --shadow: 0 8px 24px -12px rgba(16, 40, 24, .22), 0 2px 6px -2px rgba(16, 40, 24, .07);
  --shadow-lg: 0 24px 50px -18px rgba(16, 40, 24, .38), 0 6px 16px -8px rgba(16, 40, 24, .14);
  --r: 18px;
  --r-lg: 22px;
  --maxw: 560px;
  --tabbar-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --bottom-space: 32px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .9, .25, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1210;
    --bg-desk: #080b0a;
    --surface: #161d19;
    --surface-2: #1d2621;
    --surface-3: #26312b;
    --glass: rgba(22, 29, 25, .8);
    --text: #e8efea;
    --text-2: #b7c3bb;
    --muted: #7f8d85;
    --line: rgba(220, 240, 228, .07);
    --line-2: rgba(220, 240, 228, .14);
    --primary: #2fc77c;
    --primary-2: #17a862;
    --primary-soft: #173525;
    --primary-ring: rgba(47, 199, 124, .25);
    --primary-glow: rgba(47, 199, 124, .35);
    --accent-soft: #3a2216;
    --danger-soft: #3a1b1c;
    --warn: #f2b64a;
    --up: #ff6b6f;
    --down: #3ddc8b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 10px 28px -14px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 50px -18px rgba(0, 0, 0, .8), 0 6px 16px -8px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1210;
  --bg-desk: #080b0a;
  --surface: #161d19;
  --surface-2: #1d2621;
  --surface-3: #26312b;
  --glass: rgba(22, 29, 25, .8);
  --text: #e8efea;
  --text-2: #b7c3bb;
  --muted: #7f8d85;
  --line: rgba(220, 240, 228, .07);
  --line-2: rgba(220, 240, 228, .14);
  --primary: #2fc77c;
  --primary-2: #17a862;
  --primary-soft: #173525;
  --primary-ring: rgba(47, 199, 124, .25);
  --primary-glow: rgba(47, 199, 124, .35);
  --accent-soft: #3a2216;
  --danger-soft: #3a1b1c;
  --warn: #f2b64a;
  --up: #ff6b6f;
  --down: #3ddc8b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 28px -14px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 50px -18px rgba(0, 0, 0, .8), 0 6px 16px -8px rgba(0, 0, 0, .5);
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.has-tabbar { --bottom-space: calc(var(--tabbar-h) + var(--safe-b) + 34px); }
body.has-actionbar { --bottom-space: calc(104px + var(--safe-b)); }
body.sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }
mark { background: var(--primary-soft); color: inherit; border-radius: 4px; padding: 0 1px; }
.muted { color: var(--muted); }

.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 18px; height: 18px; }
.i-xs { width: 14px; height: 14px; }
.spin { animation: spin 1s linear infinite; }

#app { position: relative; max-width: var(--maxw); margin: 0 auto; min-height: 100dvh; }
.view { padding: 0 16px var(--bottom-space); min-height: 100dvh; }
.view.enter { animation: viewIn .32s var(--ease); }

@media (min-width: 640px) {
  html, body { background: var(--bg-desk); }
  #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(0, 0, 0, .35); }
}

/* ───────── cabeçalhos ───────── */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-t) + 26px) 4px 6px;
}
.eyebrow { color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.title-xl { font-family: var(--font-round); font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.avatar-link { display: block; border-radius: 50%; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -16px; padding: calc(var(--safe-t) + 10px) 12px 10px;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(var(--bg) 55%, transparent);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--glass); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
  mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent);
}
.tb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.tb-title b { font-size: 17px; font-weight: 750; letter-spacing: -.02em; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small { font-size: 12.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform .15s, background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.flat { background: var(--surface-2); box-shadow: none; width: 38px; height: 38px; }
.icon-btn.primary { background: linear-gradient(180deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 10px 22px -10px var(--primary-glow); }

.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 28px 4px 10px; font-size: 13px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.section-title .count, .count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-2); font-size: 12px; letter-spacing: 0;
}
.st-link { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.st-right { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ───────── botões ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 15px;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .14s, background .2s, box-shadow .2s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn .i { width: 20px; height: 20px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #1cb569, var(--primary-2)); box-shadow: 0 10px 22px -10px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-accent { color: #fff; background: linear-gradient(180deg, #ff8f52, var(--accent-2)); box-shadow: 0 10px 22px -10px rgba(255, 122, 61, .55), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-soft { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-danger { color: #fff; background: linear-gradient(180deg, #f05a5f, #d63c41); }
.danger { color: var(--danger) !important; }
.btn-lg { height: 56px; font-size: 17px; border-radius: 17px; padding: 0 22px; }
.btn-sm { height: 38px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.grow { flex: 1; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; font-size: 15px; padding: 4px 2px 14px; }

/* ───────── atalhos da tela inicial ───────── */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.qa {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 138px; padding: 16px; border-radius: 24px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; text-align: left;
  transition: transform .18s var(--ease);
}
.qa:active { transform: scale(.97); }
.qa::before, .qa::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); z-index: -1; }
.qa::before { width: 150px; height: 150px; right: -50px; top: -60px; }
.qa::after { width: 90px; height: 90px; right: 30px; bottom: -55px; background: rgba(255, 255, 255, .08); }
.qa-primary { background: radial-gradient(130% 120% at 0% 0%, #34d68a 0%, #13a05b 48%, #087a41 100%); box-shadow: 0 18px 30px -18px rgba(19, 160, 91, .8); }
.qa-accent { background: radial-gradient(130% 120% at 0% 0%, #ffb36b 0%, #ff7a3d 50%, #e4531a 100%); box-shadow: 0 18px 30px -18px rgba(232, 93, 28, .8); }
.qa-ic { position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); }
.qa-deco { position: absolute; top: 12px; right: 12px; font-size: 38px; transform: rotate(10deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.qa b { font-family: var(--font-round); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.qa small { font-size: 13px; opacity: .9; line-height: 1.25; margin-top: 2px; }

/* ───────── cartões de lista ───────── */
.cards { display: grid; gap: 12px; }
.lcard {
  display: block; padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transition: transform .16s var(--ease);
}
.lcard:active { transform: scale(.985); }
.lcard.is-live { box-shadow: var(--shadow), 0 0 0 2px var(--accent-soft), 0 0 0 1px rgba(255, 122, 61, .35); }
.lc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lc-title { min-width: 0; }
.lc-title h3 { font-size: 18px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-sub { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 500; }
.lc-emojis { display: flex; align-items: center; margin: 14px 0 12px; padding-left: 2px; }
.lc-emojis span {
  width: 36px; height: 36px; margin-right: -7px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  background: var(--surface-2); box-shadow: 0 0 0 2.5px var(--surface);
}
.lc-emojis em { margin-left: 14px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); }
.lc-empty { margin: 12px 0; font-size: 14px; color: var(--muted); }
.lc-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.lc-foot b { font-family: var(--font-round); font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 750; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge-live { background: var(--accent-soft); color: var(--accent-2); }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.badge-ok { background: var(--primary-soft); color: var(--primary-2); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #48d892); transition: width .6s var(--ease); }

/* ───────── linhas / listas ───────── */
.rows { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); overflow: hidden; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 11px 14px; text-align: left;
  transition: background .15s;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--line); }
a.row:active, button.row:active { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-weight: 650; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-price { flex: none; font-size: 14px; font-weight: 650; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.row-price.est { color: var(--muted); font-weight: 550; font-size: 13px; }
.row-price.strong { color: var(--text); font-weight: 750; font-size: 15px; font-family: var(--font-round); }
.row-price.muted em { font-style: normal; font-size: 12.5px; }
.qty-pill { flex: none; font-size: 13px; font-weight: 750; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-col { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.price-col b { font-size: 15px; font-weight: 750; font-family: var(--font-round); }
.mini-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; vertical-align: -3px; }
.mini-check .i { width: 12px; height: 12px; stroke-width: 3; }
.row.is-done .row-main b { color: var(--text-2); }
.tag-extra { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); font-size: 11px; font-weight: 750; line-height: 17px; vertical-align: 1px; }

.tile {
  flex: none; width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-size: 23px; line-height: 1;
  background: var(--c-soft, var(--surface-2));
}
.tile-lg { width: 54px; height: 54px; border-radius: 18px; font-size: 30px; }
.tile-xl { width: 92px; height: 92px; border-radius: 30px; font-size: 52px; box-shadow: inset 0 0 0 1px var(--line); }
.tile-date { flex-direction: column; gap: 0; background: var(--surface-2); }
.tile-date b { font-family: var(--font-round); font-size: 17px; line-height: 1; font-weight: 800; }
.tile-date small { font-size: 10.5px; line-height: 1.2; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

.group { margin-top: 20px; }
.group-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0 6px 8px; font-size: 14px; font-weight: 750; color: var(--text-2); letter-spacing: -.005em;
}
.gh-count { margin-left: auto; color: var(--muted); font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ───────── modo mercado ───────── */
.shop-sum {
  display: flex; align-items: center; gap: 18px; margin-top: 4px; padding: 16px 18px;
  border-radius: 24px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: url(#ringG); stroke-linecap: round; transition: stroke-dashoffset .7s var(--ease); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-label b { font-family: var(--font-round); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.ring-label small { font-size: 11.5px; color: var(--muted); font-weight: 650; margin-top: 3px; }
.sum-cols { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sum-k { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sum-v { font-family: var(--font-round); font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.sum-sub { margin-top: 2px; font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.sum-sub b { font-variant-numeric: tabular-nums; }

.srow { min-height: 70px; }
.cbox {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2.5px solid var(--line-2); background: var(--surface);
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.cbox .i { width: 17px; height: 17px; color: #fff; stroke-width: 3.2; opacity: 0; transform: scale(.3); transition: opacity .2s, transform .25s var(--ease); }
.srow.is-checked .cbox, .srow.checking .cbox { background: var(--primary); border-color: var(--primary); }
.srow.is-checked .cbox .i, .srow.checking .cbox .i { opacity: 1; transform: none; }
.srow.checking .cbox { animation: pop .35s var(--ease); }
.srow.checking .row-main b { text-decoration: line-through; color: var(--muted); }
.srow.is-checked .row-main b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.srow.is-checked .tile { filter: saturate(.4); opacity: .7; }

.cart .cart-head { cursor: pointer; }
.cart .chev { transition: transform .25s var(--ease); margin-left: 2px; }
.cart.collapsed .chev { transform: rotate(-90deg); }
.cart.bump .cart-head { animation: bump .5s var(--ease); }

.all-done {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px;
  border-radius: 20px; background: var(--primary-soft); color: var(--text);
}
.all-done > span { font-size: 30px; }
.all-done div { flex: 1; display: flex; flex-direction: column; }
.all-done small { color: var(--text-2); }

.store-chip {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 12px; padding: 11px 14px; border-radius: 16px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1.5px dashed var(--line-2);
}
.store-chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-chip.set { border-style: solid; border-color: transparent; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.store-chip.set .i-sm { color: var(--accent); }

.add-bar {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-top: 12px; padding: 0 8px 0 16px; height: 58px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  color: var(--muted); font-size: 16.5px; font-weight: 550;
}
.add-bar > span:first-of-type { flex: 1; }
.add-bar-plus { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #1cb569, var(--primary-2)); }

.quick { margin-top: 16px; }
.quick-title { margin: 0 4px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ───────── chips ───────── */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.sheet .chips.scroll { margin: 0 -20px; padding: 2px 20px 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 14px; border-radius: 99px;
  font-size: 14.5px; font-weight: 650; white-space: nowrap;
  background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip-add .i { color: var(--primary); }
.chip.static { height: 30px; padding: 0 11px; font-size: 13px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chip-store .i { color: var(--accent); }

/* ───────── barra de ação inferior ───────── */
.actionbar {
  position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  padding: 22px 12px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
  pointer-events: none;
}
.actionbar-in {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px; border-radius: 24px;
  background: var(--glass); backdrop-filter: saturate(170%) blur(20px); -webkit-backdrop-filter: saturate(170%) blur(20px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.actionbar-in:has(> .btn:first-child) { padding-left: 8px; }
.ab-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-info small { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-info b { font-family: var(--font-round); font-size: 23px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ───────── barra de abas ───────── */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--safe-b));
  width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-radius: 26px; padding: 0 4px;
  background: var(--glass); backdrop-filter: saturate(170%) blur(20px); -webkit-backdrop-filter: saturate(170%) blur(20px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tb-ic { display: grid; place-items: center; width: 54px; height: 32px; border-radius: 16px; transition: background .25s, color .25s, transform .2s var(--ease); }
.tabbar a.on { color: var(--primary-2); }
.tabbar a.on .tb-ic { background: var(--primary-soft); }
.tabbar a:active .tb-ic { transform: scale(.9); }
:root[data-theme="dark"] .tabbar a.on { color: var(--primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar a.on { color: var(--primary); } }

/* ───────── estados ───────── */
.empty { text-align: center; padding: 44px 20px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-art {
  width: 104px; height: 104px; border-radius: 34px; margin-bottom: 8px;
  display: grid; place-items: center; font-size: 54px;
  background: radial-gradient(circle at 30% 25%, var(--surface), var(--surface-2));
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  animation: float 4s ease-in-out infinite;
}
.empty h3 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.empty p { color: var(--muted); max-width: 320px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px;
  font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.sync-pill .i { width: 16px; height: 16px; }
.sync-offline, .sync-error { background: #fff3dc; color: #9a5b00; }
:root[data-theme="dark"] .sync-offline, :root[data-theme="dark"] .sync-error { background: #3a2c12; color: #f2c46b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sync-offline, :root:not([data-theme="light"]) .sync-error { background: #3a2c12; color: #f2c46b; } }

.avatar {
  --h: 140;
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  color: hsl(var(--h) 55% 28%); background: hsl(var(--h) 60% 88%);
  box-shadow: 0 0 0 2px var(--surface), var(--shadow-sm);
}
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 70% 85%); background: hsl(var(--h) 35% 26%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 70% 85%); background: hsl(var(--h) 35% 26%); } }
.avatar-lg { width: 58px; height: 58px; font-size: 20px; }

.skeleton-wrap { display: grid; gap: 12px; margin-top: 8px; }
.sk { border-radius: 18px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-card { height: 180px; border-radius: 24px; }
.sk-row { height: 64px; }
.sk-chart { height: 120px; margin-top: 14px; }

.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 750; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.trend .i { width: 13px; height: 13px; stroke-width: 2.6; }
.trend-up { color: var(--up); background: var(--danger-soft); }
.trend-down { color: var(--down); background: var(--primary-soft); }
.trend-eq { color: var(--muted); background: var(--surface-2); }
.trend.big { font-size: 14px; padding: 6px 10px; flex-direction: column; align-items: flex-end; border-radius: 14px; gap: 0; }
.trend.big small { font-size: 11px; font-weight: 600; opacity: .8; }

/* ───────── cartões genéricos ───────── */
.card { margin-top: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.stat-big { display: block; font-family: var(--font-round); font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-big small { font-size: 16px; color: var(--muted); font-weight: 700; letter-spacing: 0; margin-left: 2px; }
.stat-card .stat-top, .pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-top small, .pc-when { display: block; color: var(--muted); font-size: 13.5px; font-weight: 550; margin-top: 2px; }
.chart-hint { margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; text-align: center; }
.tip { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); color: var(--text); font-size: 14.5px; }

/* ───────── gráficos ───────── */
.chart { display: block; width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.chart-base { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.chart-dot.last { fill: var(--primary); stroke: var(--surface); stroke-width: 3; }
.chart-label { font: 800 12.5px var(--font-round); fill: var(--text); }
.chart-axis { font: 600 11px var(--font); fill: var(--muted); }
.chart-axis.cur { fill: var(--text); font-weight: 800; }
.bar { fill: var(--surface-3); }
.bar.cur { fill: var(--primary); }
.bar-val { font: 700 11px var(--font); fill: var(--muted); }

/* ───────── cupom (compra finalizada) ───────── */
.receipt {
  position: relative; margin: 8px 2px 0; padding: 26px 20px 22px;
  background: var(--surface); border-radius: 6px;
  box-shadow: var(--shadow);
  font-family: var(--font-mono); font-size: 14px;
}
.receipt::before, .receipt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: radial-gradient(circle at 8px 0, transparent 7px, var(--surface) 7.5px) repeat-x;
  background-size: 16px 12px;
}
.receipt::before { top: -11px; transform: rotate(180deg); }
.receipt::after { bottom: -11px; }
.rc-head { text-align: center; font-family: var(--font); }
.rc-logo { font-size: 34px; }
.rc-head h2 { margin-top: 4px; font-family: var(--font-round); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.rc-head p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.rc-sep { margin: 16px 0; border-top: 2px dashed var(--line-2); }
.rc-item + .rc-item { margin-top: 10px; }
.rc-name { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-weight: 650; font-size: 15px; }
.rc-line { display: flex; justify-content: space-between; gap: 10px; padding-left: 28px; color: var(--muted); font-size: 13px; }
.rc-line b { color: var(--text); font-weight: 700; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rc-total b { font-family: var(--font-round); font-size: 30px; letter-spacing: -.03em; text-transform: none; }
.rc-meta { margin-top: 4px; color: var(--muted); font-size: 12.5px; text-align: right; }
.rc-missed { margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-family: var(--font); font-size: 14px; }
.rc-missed p { color: var(--text-2); margin-top: 2px; }
.rc-none { color: var(--muted); text-align: center; font-family: var(--font); }
.done-actions { display: grid; gap: 10px; margin-top: 30px; }

/* ───────── produtos ───────── */
.sticky-tools { position: sticky; top: 0; z-index: 15; margin: 0 -16px; padding: calc(var(--safe-t) + 10px) 16px 4px; background: linear-gradient(var(--bg) 80%, transparent); }
.search-box {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 12px 0 14px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-2);
  color: var(--muted);
  transition: box-shadow .15s;
}
.search-box:focus-within { box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px var(--primary-ring); }
.search-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--muted); }
.search-clear { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.search-clear .i { width: 16px; height: 16px; }
.cat-filter { margin-top: 10px !important; }

.prod-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 4px 0 6px; }
.prod-hero h1 { font-family: var(--font-round); font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.prod-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats3 div { padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); text-align: center; }
.stats3 span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stats3 b { font-family: var(--font-round); font-size: 16.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.prod-actions { display: grid; gap: 8px; margin-top: 26px; }

/* ───────── família / ajustes ───────── */
.me-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-text b { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.me-text small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.members { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.member { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.member .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.member em { color: var(--muted); font-style: normal; font-weight: 500; }
.invite { margin: 16px 0 14px; padding: 14px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.invite-code { display: block; margin: 4px 0; font-family: var(--font-mono); font-size: 30px; font-weight: 800; letter-spacing: .22em; color: var(--primary-2); }
:root[data-theme="dark"] .invite-code { color: var(--primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .invite-code { color: var(--primary); } }
.invite small { display: block; color: var(--muted); font-size: 13px; }
.settings { padding: 4px 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; cursor: pointer; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.set-row b { font-weight: 650; }
.set-row small { color: var(--muted); font-size: 13px; }
.install-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.install-ic { font-size: 30px; }
.install-card div { flex: 1; display: flex; flex-direction: column; }
.install-card small { color: var(--text-2); font-size: 13px; }
.app-ver { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.menu-list { padding: 4px; display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; text-align: left; }
.menu-item:active { background: var(--surface-2); }
.mi-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.menu-item.danger .mi-ic { background: var(--danger-soft); color: var(--danger); }
.mi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-text b { font-weight: 650; }
.mi-text small { color: var(--muted); font-size: 13px; }

/* ───────── controles ───────── */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--surface-3); gap: 2px; }
.seg button { height: 38px; padding: 0 12px; border-radius: 11px; font-size: 14.5px; font-weight: 700; color: var(--text-2); text-align: center; transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 1px 4px rgba(0, 0, 0, .08); }
.seg-full { display: grid; width: 100%; }
.seg-sm button { height: 32px; font-size: 13px; padding: 0 10px; }

.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: background .25s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); transition: transform .28s var(--ease); }
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.stepper [data-st] { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); transition: transform .12s; }
.stepper [data-st]:active { transform: scale(.9); }
.st-mid { display: flex; align-items: baseline; justify-content: center; gap: 3px; min-width: 70px; padding: 0 4px; cursor: text; }
.st-val { width: 52px; border: 0; outline: 0; background: transparent; text-align: right; font-family: var(--font-round); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0; }
.st-mid span { font-size: 14px; font-weight: 700; color: var(--muted); }
.stepper-sm { padding: 3px; border-radius: 13px; gap: 2px; }
.stepper-sm [data-st] { width: 32px; height: 32px; border-radius: 10px; }
.stepper-sm [data-st] .i { width: 18px; height: 18px; }
.stepper-sm .st-mid { min-width: 52px; }
.stepper-sm .st-val { width: 32px; font-size: 16px; }
.stepper-sm .st-mid span { font-size: 12px; }

.field { display: block; margin-bottom: 14px; }
.field > span:first-child { display: block; margin: 0 0 7px 4px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.field > span:first-child em { font-style: normal; font-weight: 500; color: var(--muted); }
.input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 15px;
  border: 1.5px solid var(--line-2); background: var(--surface); outline: none; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.input::placeholder { color: var(--muted); opacity: .85; }
.input-lg { height: 56px; font-size: 18px; font-weight: 600; }
.input-ic { position: relative; display: block; }
.input-ic > .i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 20px; height: 20px; }
.input-ic .input { padding-left: 46px; }
.input-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.input-ic .input[type="password"], .input-ic .input#a-pass { padding-right: 52px; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-family: var(--font-mono); font-weight: 700; }
.code-input::placeholder { text-transform: none; letter-spacing: normal; font-family: var(--font); font-weight: 400; }
.hint { display: block; margin: 8px 4px 0; color: var(--muted); font-size: 13px; }
.form-error { margin: 0 0 14px; padding: 11px 14px; border-radius: 13px; background: var(--danger-soft); color: var(--danger); font-size: 14.5px; font-weight: 600; animation: shake .35s; }
.form-note { margin: 0 0 14px; padding: 11px 14px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-2); font-size: 14.5px; font-weight: 600; }
.share-box { height: 200px; padding: 12px; font-family: var(--font-mono); font-size: 13px; resize: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ───────── folhas (bottom sheets) ───────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(6, 14, 9, .44); opacity: 0; transition: opacity .3s; }
.sheet-wrap + .sheet-wrap .sheet-backdrop { background: rgba(6, 14, 9, .3); }
.sheet {
  position: relative; width: 100%; max-width: var(--maxw);
  max-height: calc(var(--vvh, 100dvh) - var(--safe-t) - 18px);
  margin-bottom: var(--kb, 0px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 30px 30px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
  padding-bottom: var(--safe-b);
  transform: translateY(105%); transition: transform .36s var(--ease);
  will-change: transform;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-full { height: calc(var(--vvh, 100dvh) - var(--safe-t) - 18px); }
.sheet-grip { flex: none; width: 42px; height: 5px; margin: 9px auto 3px; border-radius: 99px; background: var(--line-2); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px 10px 22px; }
.sheet-head h3 { font-family: var(--font-round); font-size: 21px; font-weight: 800; letter-spacing: -.025em; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 20px 20px; }
.sheet-msg { color: var(--text-2); font-size: 15.5px; margin-bottom: 4px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.prompt-form .chips { margin-top: 12px; }
.action-sheet .sheet-body { padding: 0 10px 14px; }
.action-sheet .menu-item { padding: 12px; }

/* adicionar itens */
.add-sheet .sheet-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.add-top { display: flex; align-items: center; gap: 6px; padding: 4px 12px 10px 16px; }
.add-top .search-box { flex: 1; }
.add-grab { display: flex; align-items: center; gap: 12px; margin: 0 16px 8px; padding: 10px 14px; border-radius: 16px; background: var(--accent-soft); cursor: pointer; }
.add-grab span:first-child { flex: 1; display: flex; flex-direction: column; }
.add-grab b { font-size: 15px; }
.add-grab small { color: var(--text-2); font-size: 12.5px; }
.add-grab .switch input:checked + .switch-ui { background: var(--accent); }
.add-count { padding: 0 22px; font-size: 13px; font-weight: 650; color: var(--muted); min-height: 4px; }
.add-count span { display: inline-flex; align-items: center; gap: 5px; padding-bottom: 6px; }
.add-res { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 10px calc(20px + var(--safe-b)); }
.add-sec { margin: 16px 10px 6px; font-size: 13px; font-weight: 800; color: var(--text-2); letter-spacing: .01em; }
.add-sec-ideas:not(:first-child) { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.add-sub { margin: 12px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 60px; border-radius: 16px; cursor: pointer; transition: background .15s; }
.ar:active { background: var(--surface-2); }
.ar.in { background: var(--primary-soft); }
.ar-new { background: var(--surface-2); margin-top: 4px; }
.ar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ar-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-add { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--primary-2); background: var(--primary-soft); }
.ar-new .ar-add { color: #fff; background: var(--primary); }
.ar.in .stepper { background: var(--surface); }

/* marcar com preço */
.cs-head, .is-head { display: flex; align-items: center; gap: 14px; padding: 2px 0 14px; }
.cs-title { flex: 1; min-width: 0; }
.cs-title h3 { font-family: var(--font-round); font-size: 22px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.cs-title p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cs-label { font-weight: 700; color: var(--text-2); }
.money-wrap { margin-top: 12px; }
.money-input {
  width: 100%; height: 76px; border-radius: 20px; text-align: center;
  font-family: var(--font-round); font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  border: 2px solid var(--line-2); background: var(--surface-2); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.money-input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 5px var(--primary-ring); }
.money-input::placeholder { color: var(--line-2); }
.money-input::selection { background: var(--primary-soft); color: var(--text); }
.cs-last { margin: 10px 4px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.cs-last b { color: var(--text-2); }
.cs-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 4px 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-weight: 700; color: var(--text-2); }
.cs-total b { font-family: var(--font-round); font-size: 24px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.cs-alt { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* editar item */
.is-name { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; border-radius: 12px; padding: 0 8px; margin-left: -8px; background: transparent; font-family: var(--font-round); font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.is-name:focus { background: var(--surface-2); }
.info-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 15px; background: var(--surface-2); color: var(--text-2); font-size: 14px; margin-top: 2px; }
.info-line span { flex: 1; }
.info-line .i:first-child { color: var(--primary); }

/* finalizar */
.fin-hero { text-align: center; padding: 4px 0 18px; }
.fin-emoji { font-size: 46px; animation: float 3s ease-in-out infinite; }
.fin-k { margin-top: 4px; font-size: 13px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fin-total { font-family: var(--font-round); font-size: 46px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fin-sub { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.fin-carry { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface-2); cursor: pointer; }
.fin-carry span:first-child { flex: 1; display: flex; flex-direction: column; }
.fin-carry small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.fin-all { text-align: center; padding: 14px; border-radius: 18px; background: var(--primary-soft); font-weight: 650; }

/* ───────── toasts ───────── */
#toasts {
  position: fixed; z-index: 200; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottom-space) - 14px + var(--kb, 0px));
  width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
body.has-actionbar #toasts { bottom: calc(100px + var(--safe-b)); }
body.has-tabbar #toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); }
body.sheet-open #toasts { bottom: auto; top: calc(var(--safe-t) + 12px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 100%;
  padding: 12px 12px 12px 18px; border-radius: 16px; min-height: 50px;
  background: #18221c; color: #f1f6f2; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .5);
  font-size: 15px; font-weight: 600;
  opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .25s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast span { flex: 1; }
.toast button { flex: none; padding: 8px 12px; border-radius: 10px; color: #5ee39d; font-weight: 800; background: rgba(255, 255, 255, .08); }
.toast.warn { background: #3b2a12; color: #ffe7c2; }
.toast.warn button { color: #ffc062; }
:root[data-theme="dark"] .toast { background: #f1f6f2; color: #142019; }
:root[data-theme="dark"] .toast button { color: var(--primary-2); background: rgba(0, 0, 0, .06); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast { background: #f1f6f2; color: #142019; }
  :root:not([data-theme="light"]) .toast button { color: #0b8549; background: rgba(0, 0, 0, .06); }
}

/* ───────── confete ───────── */
.confetti { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; bottom: -20px; width: 9px; height: 15px; border-radius: 2px; animation: confetti var(--d) cubic-bezier(.16, .7, .3, 1) forwards; }

/* ───────── entrar / criar conta ───────── */
body.is-auth .view { padding: 0; }
.auth { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--safe-t) + 56px) 24px 82px; text-align: center; color: #fff;
  background: radial-gradient(120% 90% at 20% 0%, #3be096 0%, #13a05b 45%, #066a37 100%);
}
.auth-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 110px; border-radius: 50%; background: var(--bg); z-index: 1; }
.floaters span {
  --i: 0;
  position: absolute; z-index: -1; font-size: 30px; opacity: .9;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18));
  animation: drift 7s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s);
}
.floaters span:nth-child(odd) { font-size: 24px; opacity: .75; }
.brand { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.brand-logo { width: 86px; height: 86px; border-radius: 28px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 18px 34px -14px rgba(0, 0, 0, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.brand-logo svg { width: 60px; height: 60px; }
.brand h1 { margin-top: 16px; font-family: var(--font-round); font-size: 40px; font-weight: 800; letter-spacing: -.04em; }
.brand p { margin-top: 4px; font-size: 16.5px; opacity: .92; line-height: 1.35; }
.auth-card {
  position: relative; z-index: 2; margin: -44px 16px 0; padding: 18px 18px 8px;
  border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.auth-card .seg { margin-bottom: 18px; }
.auth-foot { margin: 14px 4px 10px; text-align: center; color: var(--muted); font-size: 13.5px; }
@media (min-width: 640px) { .auth-card { margin-left: 32px; margin-right: 32px; } }

/* ───────── animações ───────── */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: none; } 30% { transform: translateY(-3px) scale(1.02); } 100% { transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
