/* Payflow — sistema visual. Temas trocam só tokens; componentes usam apenas variáveis. */

/* ===================== Tokens e temas ===================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --r-xs: 8px; --r-sm: 12px; --r: 18px; --r-lg: 24px; --r-xl: 32px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 160ms; --t: 260ms; --t-slow: 520ms;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tabbar-h: 64px;
  color-scheme: dark;

  /* Noir (padrão) */
  --bg: #07070d; --bg-2: #0d0d17;
  --glow-1: #6d3cff; --glow-2: #00c2ff; --glow-3: #ff3d81;
  --surface: rgba(255, 255, 255, .045); --surface-2: rgba(255, 255, 255, .075); --surface-3: rgba(255, 255, 255, .11);
  --solid: #12121d; --solid-2: #191927;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --text: #f3f3f8; --text-2: #b4b5c6; --text-3: #7d7f94;
  --accent: #8b5cf6; --accent-2: #22d3ee; --on-accent: #fff;
  --inc: #2ee6a6; --exp: #ff6b81; --xfer: #60a5fa; --warn: #fbbf24; --bad: #ff5468; --good: #2ee6a6;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
  --blur: saturate(160%) blur(22px);
}
[data-theme="aurora"] { --bg: #040d0c; --bg-2: #081614; --glow-1: #00d4a8; --glow-2: #7cff6b; --glow-3: #00a3ff; --solid: #0b1917; --solid-2: #102320; --accent: #2dd4bf; --accent-2: #a3e635; --on-accent: #04110f; --inc: #a3e635; --exp: #fb7185; }
[data-theme="sunset"] { --bg: #0f0708; --bg-2: #180b0c; --glow-1: #ff5a36; --glow-2: #ffb020; --glow-3: #ff2e7e; --solid: #1a0d0f; --solid-2: #241215; --accent: #ff7a59; --accent-2: #ffc145; --on-accent: #1a0905; --inc: #3ee0a0; --exp: #ff5c7a; }
[data-theme="ocean"] { --bg: #040a14; --bg-2: #07111f; --glow-1: #0066ff; --glow-2: #00d1ff; --glow-3: #6c5cff; --solid: #0a1626; --solid-2: #0f1e33; --accent: #38bdf8; --accent-2: #818cf8; --on-accent: #03121d; --inc: #34d399; --exp: #f87171; }
[data-theme="rose"] { --bg: #10060d; --bg-2: #1a0a15; --glow-1: #ff4fa3; --glow-2: #b14dff; --glow-3: #ff8a5c; --solid: #1c0c18; --solid-2: #261120; --accent: #f472b6; --accent-2: #c084fc; --on-accent: #1d0614; --inc: #5eead4; --exp: #fb7185; }
[data-theme="grafite"] { --bg: #0c0d0f; --bg-2: #121316; --glow-1: #4b5563; --glow-2: #6b7280; --glow-3: #374151; --solid: #15161a; --solid-2: #1c1d22; --accent: #e5e7eb; --accent-2: #9ca3af; --on-accent: #0c0d0f; --inc: #4ade80; --exp: #f87171; }
[data-theme="claro"], [data-theme="areia"] {
  color-scheme: light;
  --bg: #f4f5fa; --bg-2: #ffffff; --glow-1: #b9a6ff; --glow-2: #8fe3ff; --glow-3: #ffb3cf;
  --surface: rgba(255, 255, 255, .72); --surface-2: rgba(255, 255, 255, .9); --surface-3: #ffffff;
  --solid: #ffffff; --solid-2: #f1f2f7;
  --line: rgba(17, 17, 34, .08); --line-2: rgba(17, 17, 34, .14);
  --text: #12121c; --text-2: #4a4b5e; --text-3: #85879a;
  --accent: #6d28d9; --accent-2: #0891b2; --on-accent: #fff;
  --inc: #059669; --exp: #e11d48; --xfer: #2563eb; --warn: #d97706; --bad: #dc2626; --good: #059669;
  --shadow: 0 10px 30px -14px rgba(30, 30, 70, .25), 0 2px 6px -2px rgba(30, 30, 70, .08);
  --shadow-lg: 0 30px 80px -24px rgba(30, 30, 70, .35);
}
[data-theme="areia"] { --bg: #f6f1e9; --bg-2: #fffaf3; --glow-1: #ffc58f; --glow-2: #ffd9a8; --glow-3: #f8a5a5; --solid-2: #f3ece1; --accent: #ea580c; --accent-2: #0f766e; }

/* ===================== 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: 15px/1.45 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, select, textarea { font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.num, .amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); }
.inc { color: var(--inc); } .exp { color: var(--exp); } .xfer { color: var(--xfer); } .warn { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Fundo aurora: duas manchas de cor que derivam devagar (só transform/opacity). */
.aurora { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .22;
  background: radial-gradient(circle, var(--glow-1), transparent 62%); top: 0; left: -5vmax; animation: drift 28s var(--ease) infinite alternate;
}
.aurora::after { background: radial-gradient(circle, var(--glow-2), transparent 62%); top: auto; bottom: 0; left: auto; right: -10vmax; opacity: .16; animation-duration: 36s; animation-direction: alternate-reverse; }
[data-theme="claro"] .aurora::before, [data-theme="areia"] .aurora::before { opacity: .35; }
@keyframes drift { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); } }

/* ===================== Layout ===================== */
.app { display: flex; min-height: 100dvh; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: calc(var(--safe-t) + 8px) max(16px, var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 28px) max(16px, var(--safe-l)); }
.view { max-width: 1180px; margin: 0 auto; animation: viewIn var(--t-slow) var(--spring) both; }
@keyframes viewIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
.view.back { animation-name: viewBack; }
@keyframes viewBack { from { opacity: 0; transform: translate3d(-14px, 0, 0); } }
.stagger > * { animation: rise var(--t-slow) var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.985); } }

.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols > * { min-width: 0; }
.main, .view { min-width: 0; }
html { overflow-x: clip; }
@media (min-width: 900px) {
  :root { --tabbar-h: 0px; }
  .side {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; width: 248px; flex: none;
    padding: calc(var(--safe-t) + 22px) 14px 18px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  }
  .main { padding: 26px 34px 60px; }
  .tabbar { display: none !important; }
  .cols.two { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
  .cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols.two-eq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 899px) { .cols.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols.two-eq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 6px 18px -6px var(--accent); }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--text-2); font-weight: 550;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.side a i { font-size: 20px; }
.side a:hover { background: var(--surface); color: var(--text); }
.side a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side a.on i { color: var(--accent); }
.side .grow { flex: 1; }
.side .sync-row { padding: 10px 12px; font-size: 12.5px; }

/* Barra de abas (iPhone) */
.tabbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 10px); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 26px; isolation: isolate;
}
/* O vidro fica numa camada atrás: assim o brilho do botão + não é recortado pela barra. */
.tabbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: color-mix(in srgb, var(--solid) 72%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
}
.tabbar a { display: grid; place-items: center; gap: 2px; height: 100%; color: var(--text-3); font-size: 10.5px; font-weight: 600; transition: color var(--t-fast); position: relative; }
.tabbar a i { font-size: 23px; transition: transform var(--t) var(--pop); }
.tabbar a.on { color: var(--text); }
.tabbar a.on i { color: var(--accent); transform: translateY(-1px) scale(1.06); }
.tabbar a:active i { transform: scale(.88); }
.tabbar .fab-slot { display: grid; place-items: center; }
.fab {
  width: 54px; height: 54px; border-radius: 19px; display: grid; place-items: center; font-size: 26px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 85%, transparent), 0 10px 28px -6px color-mix(in srgb, var(--accent) 85%, transparent), 0 0 30px -4px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform var(--t) var(--pop), box-shadow var(--t); transform: translateY(-10px);
}
.fab:active { transform: translateY(-10px) scale(.9) rotate(45deg); }
.side .fab-wide {
  margin: 0 0 14px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); box-shadow: 0 10px 24px -10px var(--accent);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast);
}
.side .fab-wide:hover { filter: brightness(1.08); } .side .fab-wide:active { transform: scale(.97); }

/* Cabeçalho das telas */
.top { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 4px 0 14px; }
.top h1 { font-size: 28px; line-height: 1.1; margin: 0; font-weight: 750; letter-spacing: -.03em; flex: 1; min-width: 0; }
.top h1 small { display: block; font-size: 13px; font-weight: 550; color: var(--text-3); letter-spacing: 0; margin-top: 3px; }
.top .back-btn { margin-left: -6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: var(--text);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t-fast) var(--ease), background var(--t-fast); flex: none; position: relative;
}
.icon-btn:hover { background: var(--surface-2); } .icon-btn:active { transform: scale(.92); }
.icon-btn.plain { background: none; box-shadow: none; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--exp); box-shadow: 0 0 0 2px var(--bg); }

/* ===================== Superfícies ===================== */
.card {
  position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 18px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.card.flat { box-shadow: inset 0 0 0 1px var(--line); }
.card.tight { padding: 6px; }
.card + .card, .card + .sec, .sec + .card { margin-top: 14px; }
.cols > .card + .card { margin-top: 0; }
.card h3, .sec-h { font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .grow, .sec-h .grow { flex: 1; }
.card h3 a, .sec-h a, .card h3 button.link, .sec-h button.link { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.sec { margin: 22px 0 10px; }
.sec-h { padding: 0 4px; margin-bottom: 8px; }
.glow-edge::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--accent-2) 60%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Herói com saldo */
.hero { padding: 22px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; width: 240px; height: 240px; right: -80px; top: -110px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%); filter: blur(10px);
}
.hero .label { font-size: 13px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.hero .big { font-family: var(--font-num); font-size: clamp(34px, 9vw, 46px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.hero .big .cents { font-size: .55em; opacity: .6; letter-spacing: -.01em; }
.hero .split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.mini {
  border-radius: 16px; padding: 12px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.mini .k { font-size: 12px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mini .v { font-family: var(--font-num); font-size: 18px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Seletor de perfil (Geral / Empresa / Pessoal) e segmentados */
.seg {
  --n: 3; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate;
}
.seg button { position: relative; z-index: 1; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color var(--t); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { color: var(--text); }
.seg .pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: var(--surface-3);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line); transition: transform var(--t-slow) var(--spring), width var(--t-slow) var(--spring);
}
.seg.accent .pill { background: var(--accent); } .seg.accent button.on { color: var(--on-accent); }
.seg.sm button { height: 28px; font-size: 12.5px; padding: 0 10px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); transition: all var(--t-fast);
}
.chip i { font-size: 16px; }
.chip.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.chip:active { transform: scale(.96); }
.chip .x { margin-right: -4px; opacity: .6; }

/* ===================== Listas ===================== */
.list { display: flex; flex-direction: column; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; min-height: 58px;
  transition: background var(--t-fast); text-align: left; width: 100%; background: none; color: inherit;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 64px; right: 12px; height: 1px; background: var(--line); }
.row:hover { background: var(--surface); }
.row:active { background: var(--surface-2); }
.row .main-col { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.row .s { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .r { text-align: right; flex: none; }
.row .r .amt { font-weight: 650; font-size: 15px; }
.row .r .s { margin-top: 0; }
.row.hid { opacity: .55; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 12px 6px; font-size: 12.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.day-h .amt { text-transform: none; letter-spacing: 0; }

/* Ícone em bolha colorida */
.ico {
  --c: var(--accent); flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; position: relative;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}
.ico img, .ico svg.brand { width: 62%; height: 62%; object-fit: contain; }
.ico.brandbg { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ico.brandnone { background: transparent; box-shadow: none; }
.ico.brandnone img { width: 82%; height: 82%; }
.ico.brandfull { background: transparent; box-shadow: none; overflow: hidden; }
.ico.brandfull img { width: 100%; height: 100%; }
.ico.photo { overflow: hidden; } .ico.photo img { width: 100%; height: 100%; object-fit: cover; }
.ico.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 16px; }
.ico.lg { width: 52px; height: 52px; border-radius: 17px; font-size: 27px; }
.ico.xl { width: 64px; height: 64px; border-radius: 21px; font-size: 33px; }
.ico.round { border-radius: 50%; }
.ico .badge { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; background: var(--c); box-shadow: 0 0 0 2px var(--bg); }

/* Swipe nas linhas (pagar, adiar, ocultar…) */
.swipe { position: relative; overflow: hidden; border-radius: 16px; }
.swipe .acts { position: absolute; inset: 0 0 0 auto; display: flex; align-items: stretch; }
.swipe .acts button { width: 74px; display: grid; place-items: center; gap: 2px; font-size: 11px; font-weight: 650; color: #fff; }
.swipe .acts button i { font-size: 21px; }
.swipe .acts .a-pay { background: var(--good); color: #04130c; } .swipe .acts .a-later { background: var(--xfer); } .swipe .acts .a-del { background: var(--bad); } .swipe .acts .a-hide { background: #64748b; }
.swipe > .row { transition: transform var(--t) var(--spring); touch-action: pan-y; }
.swipe .acts { opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
.swipe.swiping .acts, .swipe.open .acts { opacity: 1; pointer-events: auto; }

/* ===================== Botões e formulários ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 15px; font-weight: 650; font-size: 15px;
  background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t-fast) var(--ease), filter var(--t-fast), background var(--t-fast);
}
.btn:hover { background: var(--surface-3); } .btn:active { transform: scale(.97); }
.btn.primary { color: var(--on-accent); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); box-shadow: 0 10px 24px -12px var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn i { font-size: 19px; }
.link { color: var(--accent); font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-size: 12.5px; font-weight: 650; color: var(--text-3); letter-spacing: .01em; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 0; outline: 0; background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t-fast), background var(--t-fast); -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface-2); }
.input::placeholder { color: var(--text-3); }
.input-row { display: flex; gap: 10px; } .input-row > * { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform var(--t) var(--spring); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; min-height: 56px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .main-col { flex: 1; min-width: 0; } .set-row .t { font-weight: 600; } .set-row .s { font-size: 12.5px; color: var(--text-3); }

/* ===================== Sheet (painel que sobe) ===================== */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity var(--t-slow) var(--ease); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: calc(100dvh - var(--safe-t) - 12px); display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--solid) 94%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 28px 28px 0 0; box-shadow: var(--shadow-lg), inset 0 1px 0 var(--line-2); transform: translate3d(0, 105%, 0);
  transition: transform var(--t-slow) var(--spring); padding-bottom: var(--safe-b); will-change: transform;
}
.sheet.on { transform: none; }
.sheet .grab { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet .grab::before { content: ""; width: 38px; height: 5px; border-radius: 99px; background: var(--line-2); }
.sheet .sh-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; touch-action: none; }
.sheet .sh-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; text-align: center; }
.sheet .sh-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; }
.sheet .sh-foot { flex: none; padding: 10px 16px 14px; display: flex; gap: 10px; }
@media (min-width: 900px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 48px)); max-height: min(86vh, 860px); border-radius: 28px; transform: translate3d(-50%, -46%, 0) scale(.96); opacity: 0; transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease); }
  .sheet.on { transform: translate3d(-50%, -50%, 0); opacity: 1; }
  .sheet.wide { width: min(820px, calc(100vw - 48px)); }
  .sheet .grab { visibility: hidden; height: 14px; }
}

/* Toast */
.toasts { position: fixed; z-index: 120; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(92vw, 460px); padding: 11px 14px 11px 12px; border-radius: 16px; font-weight: 600; font-size: 14px;
  background: color-mix(in srgb, var(--solid-2) 92%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  animation: toastIn var(--t-slow) var(--pop) both;
}
.toast i { font-size: 20px; color: var(--accent); } .toast.ok i { color: var(--good); } .toast.err i { color: var(--bad); }
.toast button { color: var(--accent); font-weight: 700; margin-left: 6px; }
.toast.out { animation: toastOut var(--t) var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ===================== Teclado-calculadora ===================== */
.amount-display { text-align: center; padding: 6px 0 10px; }
.amount-display .val { font-family: var(--font-num); font-size: clamp(40px, 12vw, 54px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; transition: color var(--t); min-height: 1.1em; }
.amount-display .val.zero { color: var(--text-3); }
.amount-display .expr { font-size: 14px; color: var(--text-3); min-height: 20px; font-family: var(--font-num); }
.amount-display .val.bump { animation: bump 200ms var(--pop); }
@keyframes bump { 50% { transform: scale(1.04); } }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad button {
  height: 52px; border-radius: 16px; font-family: var(--font-num); font-size: 23px; font-weight: 550; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 90ms var(--ease), background var(--t-fast);
}
.keypad button:active { transform: scale(.93); background: var(--surface-3); }
.keypad .op { color: var(--accent); font-size: 21px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.keypad .ok { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); color: var(--on-accent); font-family: var(--font); font-size: 16px; font-weight: 700; grid-row: span 2; height: auto; }

/* Grade de categorias / ícones */
.grid-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.grid-pick button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 16px; font-size: 11.5px; font-weight: 600; color: var(--text-2); transition: background var(--t-fast), transform var(--t-fast) var(--ease); }
.grid-pick button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-pick button:hover { background: var(--surface); } .grid-pick button:active { transform: scale(.94); }
.grid-pick button.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.icon-grid button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 23px; color: var(--text-2); background: var(--surface); transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
.icon-grid button:hover { background: var(--surface-2); color: var(--text); } .icon-grid button.on { background: var(--accent); color: var(--on-accent); }
.icon-grid button img, .icon-grid button svg { width: 60%; height: 60%; }
.icon-grid button.brand { background: var(--surface); }
.icon-grid button.brand.on { box-shadow: 0 0 0 2px var(--accent); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 0 var(--c); transition: transform var(--t-fast) var(--pop), box-shadow var(--t); }
.swatches button.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c), 0 0 16px var(--c); transform: scale(1.06); }
.swatches label { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; cursor: pointer; }
.swatches label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ===================== Cartões de crédito empilhados ===================== */
.cc-stack { display: grid; gap: 12px; }
.cc {
  --c1: #6d3cff; --c2: #00c2ff; position: relative; aspect-ratio: 1.586; max-height: 210px; border-radius: 22px; padding: 18px; overflow: hidden; color: #fff; text-align: left; width: 100%;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c1) 92%, #fff) 0%, var(--c1) 35%, color-mix(in srgb, var(--c2) 80%, #000) 100%);
  box-shadow: 0 22px 44px -22px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform var(--t-slow) var(--spring), box-shadow var(--t);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cc::after { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); transform: rotate(18deg); pointer-events: none; }
.cc .cc-top { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.cc .cc-top .ico { width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .92); }
.cc .cc-top .grow { flex: 1; }
.cc .cc-mid .k { font-size: 12px; opacity: .8; font-weight: 600; }
.cc .cc-mid .v { font-family: var(--font-num); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.cc .bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 8px; }
.cc .bar i { display: block; height: 100%; border-radius: inherit; background: #fff; transform-origin: left; animation: grow 900ms var(--spring) both; }
.cc .cc-foot { display: flex; justify-content: space-between; font-size: 12.5px; opacity: .9; font-weight: 600; }
.cc.dim { filter: grayscale(.85) brightness(.7); }
.cc:active { transform: scale(.98); }
@media (hover: hover) { .cc:hover { transform: translateY(-4px) rotate(-.4deg); } }
.cc-stack.stacked { grid-template-columns: 1fr; gap: 0; }
.cc-stack.stacked .cc { margin-top: -62%; } .cc-stack.stacked .cc:first-child { margin-top: 0; }
@keyframes grow { from { transform: scaleX(0); } }

/* ===================== Gráficos ===================== */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.donut-wrap { position: relative; display: grid; place-items: center; }
.donut-wrap svg { overflow: visible; }
.donut-wrap .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-wrap .center .v { font-family: var(--font-num); font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.donut-wrap .center .k { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.donut-seg { transition: stroke-dashoffset 1s var(--spring), opacity var(--t), stroke-width var(--t) var(--spring); cursor: pointer; }
.donut-seg:hover, .donut-seg.on { stroke-width: 26; }
.donut-wrap.has-on .donut-seg:not(.on) { opacity: .3; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; margin-top: 14px; }
.legend button { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; text-align: left; font-size: 13px; }
.legend button:hover { background: var(--surface); }
.legend .sw { width: 10px; height: 10px; border-radius: 4px; background: var(--c); flex: none; box-shadow: 0 0 10px var(--c); }
.legend .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.legend .a { font-family: var(--font-num); font-weight: 650; }
.bar-rect { transition: opacity var(--t); transform-box: fill-box; transform-origin: bottom; animation: barUp 820ms var(--spring) both; animation-delay: calc(var(--i, 0) * 28ms); }
.bar-rect.neg { transform-origin: top; }
@keyframes barUp { from { transform: scaleY(0); } }
.line-path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.3s var(--spring) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.area-path { animation: fadeIn 1s var(--ease) .25s both; }
@keyframes fadeIn { from { opacity: 0; } }
.axis text { fill: var(--text-3); font-size: 10.5px; font-family: var(--font); }
.axis line { stroke: var(--line); }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 12px; font-size: 12.5px; background: var(--solid-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); transition: opacity var(--t-fast); }
.tip b { font-family: var(--font-num); }

/* Anéis de progresso (orçamento, saúde) */
.ring { --size: 64px; --stroke: 6px; position: relative; width: var(--size); height: var(--size); flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: var(--stroke); stroke-linecap: round; }
.ring .trk { stroke: var(--surface-3); }
.ring .val { transition: stroke-dashoffset 1.1s var(--spring), stroke var(--t); }
.ring .in { position: absolute; inset: 0; display: grid; place-items: center; }
.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 8px; }
.budget-grid button { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 6px 2px; border-radius: 16px; transition: background var(--t-fast); }
.budget-grid button:hover { background: var(--surface); }
.budget-grid .ring { --size: 66px; }
.budget-grid .n { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-grid .a { font-family: var(--font-num); font-size: 12.5px; font-weight: 650; }
.budget-grid .l { font-family: var(--font-num); font-size: 11.5px; color: var(--text-3); }
.over .val { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--exp) 80%, transparent)); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); }
.progress i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--c, var(--accent)); box-shadow: 0 0 10px -1px color-mix(in srgb, var(--c, var(--accent)) 75%, transparent); transform-origin: left; animation: grow 1s var(--spring) both; }

/* Seq. de dias (streak) */
.week-dots { display: flex; justify-content: space-between; gap: 6px; }
.week-dots div { flex: 1; display: grid; justify-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.week-dots span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 15px; }
.week-dots .ok span { background: var(--good); color: #04130c; box-shadow: 0 0 16px color-mix(in srgb, var(--good) 60%, transparent); animation: rise var(--t-slow) var(--pop) both; animation-delay: calc(var(--i) * 60ms); }
.week-dots .now span { background: none; box-shadow: inset 0 0 0 2.5px var(--good); }

/* Perfis */
.profile-card {
  --c: var(--accent); position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px; text-align: left; width: 100%; color: var(--text);
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 34%, transparent), transparent 55%), var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, var(--line)), var(--shadow); transition: transform var(--t-slow) var(--spring), box-shadow var(--t);
}
.profile-card:active { transform: scale(.985); }
@media (hover: hover) { .profile-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, var(--line)), 0 30px 60px -30px var(--c); } }
.profile-card .head { display: flex; align-items: center; gap: 12px; }
.profile-card .head .t { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.profile-card .head .s { font-size: 13px; color: var(--text-3); }
.profile-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.profile-card .stats .k { font-size: 11.5px; color: var(--text-3); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.profile-card .stats .v { font-family: var(--font-num); font-size: 17px; font-weight: 700; margin-top: 2px; }
.score { display: grid; place-items: center; text-align: center; }
.score .n { font-family: var(--font-num); font-size: 22px; font-weight: 800; line-height: 1; }
.score .l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.tone-good { --tone: var(--good); } .tone-ok { --tone: #60a5fa; } .tone-warn { --tone: var(--warn); } .tone-bad { --tone: var(--bad); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { border-radius: 18px; padding: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kpi .k { font-size: 12px; font-weight: 650; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-family: var(--font-num); font-size: 21px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi .d { font-size: 12px; font-weight: 650; margin-top: 2px; }

/* Tiles do "Mais" */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  --c: var(--accent); display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 22px; text-align: left; min-height: 116px;
  background: radial-gradient(100% 100% at 0% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t) var(--spring);
}
.tile:active { transform: scale(.97); }
.tile .t { font-weight: 700; font-size: 15.5px; } .tile .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* Estados vazios e carregando */
.empty { text-align: center; padding: 34px 16px; color: var(--text-3); }
.empty i { font-size: 44px; color: var(--text-3); opacity: .7; display: block; margin-bottom: 10px; }
.empty .t { color: var(--text-2); font-weight: 650; font-size: 16px; margin-bottom: 4px; }
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Busca: total fixo no rodapé */
.search-bar { position: sticky; top: calc(var(--safe-t) + 4px); z-index: 20; display: flex; gap: 10px; align-items: center; padding: 6px 0 10px; background: linear-gradient(var(--bg) 70%, transparent); }
.search-input { position: relative; flex: 1; }
.search-input i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--text-3); pointer-events: none; }
.search-input .input { padding-left: 42px; border-radius: 16px; }
.sum-foot {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px); z-index: 15; margin-top: 14px; border-radius: 20px; padding: 14px 16px;
  background: color-mix(in srgb, var(--solid-2) 90%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-2);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; animation: rise var(--t-slow) var(--spring) both;
}
@media (min-width: 900px) { .sum-foot { bottom: 18px; } }
.sum-foot .k { font-size: 11.5px; color: var(--text-3); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.sum-foot .v { font-family: var(--font-num); font-weight: 750; font-size: 17px; margin-top: 2px; }
.sum-foot .count { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 2px; }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; font-weight: 700; color: var(--text-3); padding: 4px 0; }
.cal button { aspect-ratio: 1; border-radius: 12px; font-family: var(--font-num); font-size: 14.5px; font-weight: 600; display: grid; place-items: center; position: relative; transition: background var(--t-fast); }
.cal button:hover { background: var(--surface); }
.cal button.out { color: var(--text-3); opacity: .4; }
.cal button.today { color: var(--accent); }
.cal button.sel { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -8px var(--accent); }
.cal .dots { position: absolute; bottom: 5px; display: flex; gap: 3px; }
.cal .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }

/* Bloqueio (Face ID) */
.lock { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.lock .box { width: min(380px, 100%); text-align: center; animation: rise var(--t-slow) var(--spring) both; }
.lock .logo { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px; box-shadow: 0 20px 50px -14px var(--accent); }
.lock h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.03em; }
.lock p { color: var(--text-2); margin: 0 0 22px; }
.lock .face { width: 74px; height: 74px; border-radius: 24px; margin: 0 auto 16px; display: grid; place-items: center; font-size: 40px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent), 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent); } }
.lock .err { color: var(--bad); min-height: 20px; font-size: 13.5px; margin-top: 10px; }

/* Tabelas (impostos/relatórios) */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.n, .table th.n { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 750; border-top: 1px solid var(--line-2); }
.scroll-x { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.callout { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); font-size: 13.5px; line-height: 1.5; }
.callout i { font-size: 22px; color: var(--accent); flex: none; }
.callout.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); } .callout.warn i { color: var(--warn); }

.pill-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.pill-tag.inc { background: color-mix(in srgb, var(--inc) 16%, transparent); color: var(--inc); }
.pill-tag.exp { background: color-mix(in srgb, var(--exp) 16%, transparent); color: var(--exp); }
.pill-tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill-tag.acc { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.sync-dot.on { background: var(--good); box-shadow: 0 0 10px var(--good); }
.sync-dot.busy { background: var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.theme-card { border-radius: 18px; padding: 10px; text-align: left; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); transition: transform var(--t) var(--spring); }
.theme-card.on { box-shadow: inset 0 0 0 2px var(--accent), 0 10px 30px -14px var(--accent); }
.theme-card .pv { height: 70px; border-radius: 12px; position: relative; overflow: hidden; margin-bottom: 8px; }
.theme-card .pv i { position: absolute; width: 60px; height: 60px; border-radius: 50%; filter: blur(16px); }
.theme-card .pv b { position: absolute; left: 10px; bottom: 10px; width: 46%; height: 10px; border-radius: 5px; }
.theme-card .pv u { position: absolute; right: 10px; top: 10px; width: 20px; height: 20px; border-radius: 7px; }
.theme-card span { font-size: 13px; font-weight: 650; }

.drop {
  border: 1.5px dashed var(--line-2); border-radius: 20px; padding: 26px 16px; text-align: center; color: var(--text-2); transition: all var(--t-fast);
}
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop i { font-size: 36px; color: var(--accent); display: block; margin-bottom: 6px; }

/* Impressão: só o relatório */
@media print {
  body { background: #fff; color: #000; }
  .aurora, .side, .tabbar, .top .icon-btn, .no-print { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; background: #fff; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .aurora::before, .aurora::after { animation: none; }
}

/* Ícone pequeno em linha (texto) */
.mini-glyph { display: inline-grid; place-items: center; width: 17px; height: 17px; font-size: 16px; flex: none; }
.mini-glyph img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.chip .ico { width: 22px; height: 22px; border-radius: 7px; font-size: 13px; margin-left: -6px; }
.sum-foot .v { font-size: clamp(13.5px, 4.1vw, 17px); white-space: nowrap; }
@media (max-width: 420px) { .kpi .v { font-size: 18px; } .hero .big { font-size: 34px; } }

/* Arrastar categorias */
.drag-h { display: grid; place-items: center; width: 22px; height: 40px; margin: 0 -4px 0 -6px; color: var(--text-3); font-size: 18px; cursor: grab; touch-action: none; flex: none; }
.cat-row.dragging { opacity: .3; }
.drag-ghost { position: fixed; z-index: 300; pointer-events: none; background: var(--solid-2); border-radius: 16px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--accent); transform: scale(1.02); }
.cat-row.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.cat-row.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.cat-row.drop-into { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }

/* Guia Payflow */
.guide-hero { display: flex; gap: 16px; align-items: center; padding: 22px; margin: 6px 0 14px; border-radius: var(--r-xl); position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px var(--line); animation: rise var(--t-slow) var(--spring) both; }
.guide-hero img { width: 64px; height: 64px; border-radius: 20px; box-shadow: 0 16px 40px -14px var(--accent); animation: float 5s var(--ease) infinite alternate; }
.guide-hero h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.guide-hero p { margin: 4px 0 0; color: var(--text-2); }
@keyframes float { to { transform: translateY(-6px) rotate(-3deg); } }
.guide-feed { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.g-card { position: relative; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 90px;
  opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .6s var(--ease) var(--d, 0ms), transform .7s var(--spring) var(--d, 0ms); }
.g-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.g-card.in { opacity: 1; transform: none; }
.g-card.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 20% { box-shadow: inset 0 0 0 2px var(--c), 0 0 40px -6px var(--c); } }
.g-head { display: flex; gap: 12px; align-items: center; }
.g-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.g-p { color: var(--text-2); line-height: 1.6; margin: 12px 0 0; }
.g-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.g-steps li { counter-increment: s; display: flex; gap: 10px; line-height: 1.55; font-size: 14.5px; }
.g-steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); margin-top: 1px; }
.g-faq { display: grid; gap: 8px; margin-top: 12px; }
.g-faq details { border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 0 14px; }
.g-faq summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq details[open] summary i { transform: rotate(180deg); }
.g-faq summary i { transition: transform var(--t) var(--spring); color: var(--text-3); }
.g-faq p { margin: 0 0 14px; color: var(--text-2); line-height: 1.6; }

/* Escolha do ícone do app */
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.icon-pick button { display: grid; justify-items: center; gap: 8px; padding: 10px 6px; border-radius: 18px; font-size: 12px; font-weight: 600; color: var(--text-2); transition: background var(--t-fast), transform var(--t) var(--spring); }
.icon-pick button img { width: 62px; height: 62px; border-radius: 16px; box-shadow: var(--shadow); transition: transform var(--t) var(--spring); }
.icon-pick button:hover img { transform: translateY(-2px) scale(1.04); }
.icon-pick button.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* Atualização silenciosa (sincronização, ocultar valores): nada re-anima, só o conteúdo muda. */
.view.still .stagger > *, .view.still .bar-rect, .view.still .area-path, .view.still .progress i, .view.still .cc .bar i,
.view.still .week-dots .ok span, .view.still .g-card { animation: none !important; transition: none !important; }
.view.still .line-path { animation: none !important; stroke-dashoffset: 0; }
.view.still .g-card { opacity: 1; transform: none; }

/* ===================== Botões em vidro tingido (mesmo estilo dos chips selecionados) =====================
   Fundo translúcido na cor do tema, borda colorida e brilho neon — no lugar das cores chapadas. */
.fab, .side .fab-wide, .btn.primary, .keypad .ok, .btn-on, .icon-grid button.on, .cal button.sel {
  --tone: var(--accent);
  color: color-mix(in srgb, var(--tone) 35%, var(--text));
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 32%, transparent), color-mix(in srgb, var(--tone) 15%, transparent));
  border: 1px solid color-mix(in srgb, var(--tone) 85%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 0 20px -4px color-mix(in srgb, var(--tone) 85%, transparent), 0 0 44px -14px var(--tone), inset 0 1px 0 rgba(255, 255, 255, .16);
  text-shadow: 0 0 12px color-mix(in srgb, var(--tone) 55%, transparent);
}
.btn.primary:hover, .side .fab-wide:hover, .keypad .ok:hover { filter: none; box-shadow: 0 0 26px -2px color-mix(in srgb, var(--tone) 90%, transparent), 0 0 56px -10px var(--tone), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.primary i, .side .fab-wide i, .keypad .ok i { color: color-mix(in srgb, var(--tone) 55%, var(--text)); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 70%, transparent)); }
.btn.primary[disabled] { box-shadow: none; }

/* Botão + (iPhone): vidro tingido com halo pulsando, recorte na cor do fundo. */
.fab {
  border-radius: 20px; color: color-mix(in srgb, var(--tone) 40%, var(--text));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 85%, transparent), 0 0 26px -2px color-mix(in srgb, var(--tone) 80%, transparent), 0 0 70px -8px var(--tone),
    inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 20px -6px color-mix(in srgb, var(--tone) 60%, transparent);
}
.fab i { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 80%, transparent)); }
.fab::after { content: ""; position: absolute; inset: -6px; border-radius: 24px; border: 1.5px solid color-mix(in srgb, var(--tone) 60%, transparent); opacity: 0; animation: halo 3.2s ease-out infinite; pointer-events: none; }
.fab { position: relative; }
@keyframes halo { 0% { opacity: .7; transform: scale(.92); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
.fab:active { transform: translateY(-10px) scale(.9) rotate(90deg); }

.icon-grid button.on { color: var(--text); }
.cal button.sel { color: var(--text); }
.keypad .ok { font-weight: 750; }

/* Ações do arrastar (pagar, adiar, excluir…) também em vidro tingido */
.swipe .acts button { --tone: var(--accent); color: color-mix(in srgb, var(--tone) 30%, var(--text)); background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 34%, var(--solid)), color-mix(in srgb, var(--tone) 18%, var(--solid))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 70%, transparent), inset 0 0 18px -6px var(--tone); }
.swipe .acts .a-pay { --tone: var(--good); color: color-mix(in srgb, var(--good) 40%, var(--text)); background: linear-gradient(180deg, color-mix(in srgb, var(--good) 34%, var(--solid)), color-mix(in srgb, var(--good) 18%, var(--solid))); }
.swipe .acts .a-later { --tone: var(--xfer); }
.swipe .acts .a-del { --tone: var(--bad); }
.swipe .acts .a-hide { --tone: #94a3b8; }

/* Tela de entrada */
.gate { overflow-y: auto; }
.gate .box { padding: 10px 0 30px; }
.gate .field { margin-bottom: 10px; }
.gate .input { text-align: center; height: 52px; font-size: 17px; }
.pass-field { position: relative; }
.pass-field .icon-btn { position: absolute; right: 6px; top: 6px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0 8px; }
.meter i { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background var(--t), box-shadow var(--t); }
.meter[data-s="0"] i:nth-child(-n+1), .meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.meter[data-s="3"] i:nth-child(-n+3) { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.meter[data-s="4"] i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.gate.out { opacity: 0; transition: opacity .35s var(--ease); }
.shake { animation: shake .42s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Ícone das boas-vindas: flutua devagar com um brilho que respira */
.float-logo { position: relative; width: 104px; height: 104px; margin: 0 auto 26px; }
.float-logo::before { content: ""; position: absolute; inset: -18px; border-radius: 44px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent 72%); filter: blur(10px); animation: glowBreath 4.2s ease-in-out infinite; }
.float-logo img { position: relative; width: 104px; height: 104px; border-radius: 30px; box-shadow: 0 22px 50px -20px var(--accent), inset 0 0 0 1px rgba(255, 255, 255, .08); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(0, -9px, 0) rotate(-1.5deg); } }
@keyframes glowBreath { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: .85; transform: scale(1.06); } }

/* Notificações */
.ntf-list .row { align-items: flex-start; animation: rise var(--t-slow) var(--spring) both; animation-delay: calc(var(--i, 0) * 35ms); }
.ntf-list .row .ico { margin-top: 2px; }
.ntf.unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ntf .t { font-weight: 650; }
.ntf.unread .t { font-weight: 750; }
.ntf-dot { flex: none; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
  color: #fff; background: var(--bad); box-shadow: 0 0 0 2px var(--bg), 0 0 12px color-mix(in srgb, var(--bad) 70%, transparent); animation: pop .5s var(--pop) both; }
.side a .bell-count { position: static; margin-left: auto; box-shadow: 0 0 10px color-mix(in srgb, var(--bad) 60%, transparent); }
.icon-btn.ring-bell i { animation: bellRing 1s var(--ease); transform-origin: 50% 10%; }
@keyframes bellRing { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
