/* =====================================================================
   4 FLOW — PREMIUM DARK FINANCE · design system
   ===================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-800.woff2') format('woff2'); }

:root {
  /* cores */
  --color-bg: #09090F;
  --color-bg-elevated: #100D19;
  --color-surface: #161320;
  --color-surface-hover: #211A30;
  --color-surface-pressed: #291D40;
  --color-border: #30283F;
  --color-purple-deep: #32106F;
  --color-purple: #7127E8;
  --color-purple-electric: #A020F0;
  --color-purple-light: #C084FC;
  --color-gold: #D8B66A;
  --color-gold-light: #F3DB95;
  --color-text: #FFFFFF;
  --color-text-secondary: #9692A4;
  --color-text-muted: #6D687C;
  --color-success: #2EDB88;
  --color-danger: #FF5B70;
  --color-warning: #F4BC55;
  /* raios */
  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 18px; --radius-xl: 24px;
  /* espaços */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --gutter: 16px;
  /* tipografia */
  --font-main: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* degradês */
  --gradient-brand: linear-gradient(135deg, #211048 0%, #40138B 54%, #7013C1 100%);
  --gradient-action: linear-gradient(135deg, #6420CF, #9B18E9);
  --gradient-active: linear-gradient(135deg, #7127E8, #A020F0);
  --gradient-gold: linear-gradient(90deg, #C99C49, #F3DE9B);
  /* sombras */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-purple: 0 0 20px rgba(113, 39, 232, .18);
  /* movimento */
  --motion-fast: 120ms; --motion-normal: 200ms; --motion-slow: 320ms;
  --ease-premium: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 74px;
  --surface-grad: linear-gradient(155deg, rgba(30, 25, 43, .97), rgba(15, 14, 22, .99));
  --surface-border: rgba(181, 146, 241, .13);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--color-bg); color: var(--color-text); font-family: var(--font-main); font-size: 14px; line-height: 1.45; font-weight: 500;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.money, .num, .row-val, .goal-value, .big-num, .fin-v, .lv, .trow b, .trow span, .metric .v { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--color-purple-light); outline-offset: 2px; }

/* ===== estrutura ===== */
.stage { height: 100%; }
.phone { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(900px 520px at 85% -10%, rgba(113, 39, 232, .16), transparent 60%), radial-gradient(700px 500px at -10% 30%, rgba(50, 16, 111, .22), transparent 60%), var(--color-bg); }
.app-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.screens { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.screens::-webkit-scrollbar { width: 0; height: 0; }
.screen { display: none; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); animation: screenIn var(--motion-slow) var(--ease-premium); }
.screen.active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== cabeçalho ===== */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 52px; padding: 4px 0 var(--space-4); }
.top .title { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.2px; text-align: center; flex: 1; }
.top-spacer { width: 44px; height: 44px; flex-shrink: 0; }
.brand-logo { height: 30px; width: auto; display: block; }
.top-brand { display: flex; align-items: center; gap: var(--space-3); flex: 1; }
.hello { margin: -2px 0 var(--space-4); }
.hello h2 { font-size: 23px; font-weight: 700; line-height: 1.25; letter-spacing: -.3px; }
.hello p { color: var(--color-text-secondary); font-size: 13px; font-weight: 500; margin-top: 2px; }

/* ===== PremiumIconButton ===== */
.icon-btn {
  position: relative; width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(160deg, #1d1530, #120e1d); border: 1px solid var(--color-border); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform var(--motion-fast) var(--ease-premium), border-color var(--motion-normal), box-shadow var(--motion-normal), background var(--motion-normal);
}
.icon-btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--color-purple-light); }
.icon-btn.accent { background: linear-gradient(160deg, #2b1458, #1a0f3a); border-color: rgba(160, 32, 240, .55); color: #fff; box-shadow: 0 0 14px rgba(160, 32, 240, .22), inset 0 1px 0 rgba(255, 255, 255, .1); }
.icon-btn.bell { background: linear-gradient(160deg, #24133f, #150d29); border-color: rgba(160, 32, 240, .35); }
.icon-btn img.prem-ic { width: 30px; height: 30px; }
.icon-btn:active, .icon-btn.tap { transform: scale(.94); border-color: rgba(192, 132, 252, .7); box-shadow: 0 0 16px rgba(160, 32, 240, .45), inset 0 1px 0 rgba(255, 255, 255, .1); }
@media (hover: hover) { .icon-btn:hover { border-color: rgba(160, 32, 240, .5); } }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--color-danger); color: #fff; font-size: 10px; font-weight: 800; font-style: normal; border: 2px solid var(--color-bg); }

/* ===== PremiumButton ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 14px;
  background: var(--gradient-action); color: #fff; font-weight: 700; font-size: 15px; border: 1px solid rgba(211, 169, 255, .30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 14px rgba(112, 34, 220, .20);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.btn:active, .btn.tap { transform: scale(.97); filter: brightness(1.08); box-shadow: 0 0 8px rgba(160, 32, 240, .35), 0 0 20px rgba(113, 39, 232, .18), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-block { width: 100%; margin-top: var(--space-3); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn-ghost { background: var(--color-surface); border: 1px solid var(--color-border); color: #fff; box-shadow: none; font-weight: 600; font-size: 14px; }
.btn-ghost .ico { color: var(--color-purple-light); }
.btn-ghost:active, .btn-ghost.tap { background: var(--color-surface-pressed); border-color: rgba(160, 32, 240, .5); }
.btn-success { background: linear-gradient(135deg, #17a865, #2EDB88); color: #04240f; border-color: rgba(255, 255, 255, .2); box-shadow: 0 4px 14px rgba(46, 219, 136, .18); }
.btn-danger { background: rgba(255, 91, 112, .12); color: var(--color-danger); border: 1px solid rgba(255, 91, 112, .35); box-shadow: none; }
.btn-gold { background: var(--gradient-gold); color: #2a1d02; border-color: rgba(255, 255, 255, .25); box-shadow: 0 4px 14px rgba(216, 182, 106, .2); }
.actions { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.actions .btn { width: 100%; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.loading { position: relative; color: transparent !important; pointer-events: none; }
.loading .ico { opacity: 0; }
.loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { display: block; margin: 14px auto 0; background: none; border: none; color: var(--color-text-secondary); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; }

/* ===== PremiumCard ===== */
.card {
  position: relative; background: var(--surface-grad); border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: transform var(--motion-normal) ease, border-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 14px; font-weight: 600; color: #DAD6E6; }
.big-num { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; margin-top: 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: var(--space-6) 2px var(--space-3); }
.sec-head h3 { font-size: 16px; font-weight: 700; }
.sec-head a, .sec-head button.link { font-size: 13px; color: var(--color-purple-light); font-weight: 600; cursor: pointer; background: none; border: none; display: inline-flex; align-items: center; gap: 2px; padding: 6px 0; }
.list-title { font-size: 13px; color: var(--color-text-secondary); margin: var(--space-1) 2px var(--space-3); font-weight: 500; }
.hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; line-height: 1.45; font-weight: 400; }
.note-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px; font-size: 13px; color: var(--color-text-secondary); line-height: 1.55; white-space: pre-wrap; font-weight: 400; margin-bottom: var(--space-3); }
.note-box b { color: #fff; }
.pos { color: var(--color-success) !important; } .neg { color: var(--color-danger) !important; } .warn { color: var(--color-warning) !important; } .gold { color: var(--color-gold) !important; }

/* ===== WealthGoalCard ===== */
.goal-card {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 20px 18px 16px; text-align: center;
  background-image: radial-gradient(circle at 85% 0%, rgba(192, 132, 252, .18), transparent 55%), var(--gradient-brand);
  border: 1px solid rgba(192, 132, 252, .38); box-shadow: 0 0 0 1px rgba(160, 32, 240, .12), 0 14px 36px rgba(64, 19, 139, .38), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.goal-label { font-size: 12px; letter-spacing: 3px; font-weight: 600; color: rgba(255, 255, 255, .78); text-transform: uppercase; }
.goal-value { font-size: clamp(28px, 8.6vw, 34px); font-weight: 800; line-height: 1.12; margin: 8px 0 14px; color: var(--color-gold-light); letter-spacing: -.5px; }
.goal-prog-row { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255, 255, 255, .8); margin-bottom: 8px; font-weight: 500; }
.goal-prog-row b { color: #fff; font-weight: 700; }
.goal-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--gradient-gold); transition: width 900ms var(--ease-premium); }
.goal-accum { font-size: 14px; color: rgba(255, 255, 255, .82); margin-top: 12px; }
.goal-accum b { color: #fff; font-weight: 700; }
.goal-proj {
  display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 14px; padding: 12px 12px 12px 14px; border-radius: var(--radius-md); width: 100%; color: #fff;
  background: rgba(10, 6, 24, .38); border: 1px solid rgba(192, 132, 252, .22); cursor: pointer; transition: background var(--motion-normal), border-color var(--motion-normal), transform var(--motion-fast);
}
.goal-proj .gp-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--color-purple-light); background: rgba(160, 32, 240, .16); border: 1px solid rgba(192, 132, 252, .25); flex-shrink: 0; }
.goal-proj .gp-txt { flex: 1; min-width: 0; font-size: 13px; color: rgba(255, 255, 255, .78); line-height: 1.4; }
.goal-proj .gp-when { display: block; font-size: 16px; color: #fff; font-weight: 600; margin: 1px 0 3px; }
.goal-proj .gp-when b { color: var(--color-gold-light); font-weight: 700; }
.goal-proj small { display: block; font-size: 12px; color: rgba(255, 255, 255, .58); font-weight: 400; }
.goal-proj .gp-chev { color: rgba(255, 255, 255, .7); }
.goal-proj.tap { background: rgba(10, 6, 24, .55); border-color: rgba(192, 132, 252, .5); transform: scale(.985); }

/* ===== FinancialSummaryCards ===== */
.fin-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: var(--space-3) 0; }
.fin-card { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-md); padding: 12px 10px 11px; cursor: pointer; min-width: 0; text-align: left; color: #fff; transition: transform var(--motion-fast), border-color var(--motion-normal); }
.fin-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.fin-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.fin-ic .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.fin-ic.success { background: rgba(46, 219, 136, .14); color: var(--color-success); border: 1px solid rgba(46, 219, 136, .3); }
.fin-ic.danger { background: rgba(255, 91, 112, .14); color: var(--color-danger); border: 1px solid rgba(255, 91, 112, .3); }
.fin-ic.gold { background: rgba(216, 182, 106, .14); color: var(--color-gold); border: 1px solid rgba(216, 182, 106, .35); }
.fin-k.success { color: var(--color-success); } .fin-k.danger { color: var(--color-danger); } .fin-k.gold { color: var(--color-gold); }
.fin-v { display: block; font-size: 16px; font-weight: 700; margin: 8px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.fin-s { font-size: 11px; color: var(--color-text-secondary); font-weight: 400; }
.fin-card:active, .fin-card.tap { transform: scale(.97); border-color: rgba(160, 32, 240, .5); }

/* ===== grid de módulos (PremiumModuleTile) ===== */
.mod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: var(--space-3) 0; }
.mod-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 10px 4px; border-radius: var(--radius-md);
  background: var(--surface-grad); border: 1px solid var(--surface-border); color: #fff;
  transition: transform var(--motion-fast) var(--ease-premium), border-color var(--motion-normal), box-shadow var(--motion-normal); }
.mod-tile .prem-ic { width: 46px; height: 46px; object-fit: contain; }
.mod-tile span { font-size: 12px; font-weight: 500; color: #ECEAF2; text-align: center; line-height: 1.2; }
.mod-tile:active, .mod-tile.tap { transform: scale(.96); border-color: rgba(160, 32, 240, .6); box-shadow: 0 0 18px rgba(160, 32, 240, .3); }
@media (hover: hover) { .mod-tile:hover, .fin-card:hover, .menu-tile:hover { transform: translateY(-2px); border-color: rgba(160, 32, 240, .35); } }
@media (max-width: 340px) { .mod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fin-row { grid-template-columns: 1fr; } }

/* ===== PremiumWealthChart ===== */
.wealth-card .card-head { margin-bottom: 2px; }
.eye-btn { width: 40px; height: 40px; margin: -8px -8px -8px 0; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--color-text-secondary); display: grid; place-items: center; }
.eye-btn:active, .eye-btn.tap { background: var(--color-surface-pressed); color: #fff; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; margin: 2px 0 6px; }
.delta .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.wchart { position: relative; margin: 6px -4px 0; touch-action: pan-y; cursor: crosshair; outline: none; border-radius: 12px; }
.wchart:focus-visible { box-shadow: 0 0 0 2px rgba(192, 132, 252, .6); }
.wchart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.wc-grid line { stroke: rgba(255, 255, 255, .05); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wc-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.wc-glow { fill: none; stroke-width: 6; opacity: .55; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.wc-area { opacity: 0; }
.wchart.drawn .wc-line, .wchart.drawn .wc-glow { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms var(--ease-premium); }
.wchart.drawn .wc-area { opacity: 1; transition: opacity 700ms ease 500ms; }
.wc-dot { fill: #fff; stroke: #A020F0; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.wc-dot-halo { fill: rgba(160, 32, 240, .3); }
.wc-guide { stroke: rgba(192, 132, 252, .45); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity var(--motion-fast); }
.wc-labels text { fill: var(--color-text-muted); font-size: 10px; font-family: var(--font-main); }
.wchart.active .wc-guide { opacity: 1; }
.wc-tip { position: absolute; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity var(--motion-fast);
  background: var(--color-bg-elevated); border: 1px solid rgba(160, 32, 240, .45); border-radius: 10px; padding: 6px 10px; text-align: center; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); z-index: 2; }
.wc-tip b { display: block; font-size: 13px; font-weight: 700; } .wc-tip span { font-size: 11px; color: var(--color-text-secondary); }
.wchart.active .wc-tip { opacity: 1; }
.chart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 110px; padding: 16px 12px; margin-top: 8px;
  border: 1px dashed rgba(181, 146, 241, .2); border-radius: var(--radius-sm); color: var(--color-text-secondary); font-size: 12px; font-weight: 400; }
.chart-empty .ico { color: var(--color-purple-light); }
.chart-one { width: 100%; height: 34px; position: relative; }
.chart-one::before { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 1px dashed rgba(192, 132, 252, .3); }
.chart-one i { position: absolute; right: 6%; top: 50%; width: 11px; height: 11px; margin: -5.5px -5.5px 0 0; border-radius: 50%; background: #fff; border: 2.5px solid #A020F0; box-shadow: 0 0 12px rgba(160, 32, 240, .8); }
.breakdown { margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.bd-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; font-size: 13px; border-radius: 6px; }
.bd-row:last-child { border-bottom: none; }
.bd-row .cat-ic { width: 22px; height: 22px; }
.bd-row span { flex: 1; color: var(--color-text-secondary); } .bd-row b { font-weight: 700; }
.bd-row.tap { background: rgba(160, 32, 240, .08); }
body.hide-values .money { filter: blur(7px); user-select: none; }

/* ===== avisos ===== */
.notif { display: flex; gap: 12px; align-items: center; padding: 11px 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; margin-bottom: 6px; background: var(--color-surface); }
.notif .notif-ic { width: 30px; height: 30px; flex-shrink: 0; }
.notif .nm { flex: 1; min-width: 0; } .notif .nm b { display: block; font-size: 13px; font-weight: 600; } .notif .nm span { font-size: 12px; color: var(--color-text-secondary); font-weight: 400; }
.notif .nlvl { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; flex-shrink: 0; }
.notif.alto { border-color: rgba(255, 91, 112, .3); } .notif.alto .nlvl { color: var(--color-danger); background: rgba(255, 91, 112, .12); }
.notif.medio { border-color: rgba(244, 188, 85, .25); } .notif.medio .nlvl { color: var(--color-warning); background: rgba(244, 188, 85, .12); }
.notif.tap { background: var(--color-surface-pressed); }

/* ===== PremiumSegmentedControl ===== */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 4px; margin-bottom: var(--space-3); border-radius: 16px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); }
.seg::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 12px; background: var(--gradient-active);
  border: 1px solid rgba(220, 185, 255, .45); box-shadow: 0 0 8px rgba(160, 32, 240, .35), 0 0 20px rgba(113, 39, 232, .18), inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateX(calc(var(--i) * 100%)); transition: transform 220ms var(--ease-premium); }
.seg button { position: relative; z-index: 1; border: none; background: none; padding: 11px 6px; min-height: 44px; border-radius: 12px; color: #C9C5D6; font-weight: 600; font-size: 14px; transition: color 220ms; }
.seg button.on { color: #fff; }

/* ===== seletor de mês ===== */
.month-pick { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); padding: 4px; border-radius: 16px; background: var(--surface-grad); border: 1px solid var(--surface-border); }
.month-pick button { width: 44px; height: 40px; border: none; background: none; color: var(--color-purple-light); border-radius: 12px; display: grid; place-items: center; transition: background var(--motion-fast); }
.month-pick button:active, .month-pick button.tap { background: var(--color-surface-pressed); }
.month-pick span { font-size: 15px; font-weight: 700; cursor: pointer; }

/* ===== chips / busca ===== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: #C9C5D6; transition: all var(--motion-normal); }
.chip.on { background: var(--gradient-active); color: #fff; border-color: rgba(220, 185, 255, .45); box-shadow: 0 0 10px rgba(160, 32, 240, .3); }
.chip.tap { border-color: rgba(160, 32, 240, .6); }
.filter-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: rgba(160, 32, 240, .12); border: 1px solid rgba(160, 32, 240, .35); color: var(--color-purple-light); border-radius: 999px; padding: 5px 6px 5px 12px; margin-bottom: 10px; }
.filter-tag button { background: none; border: none; color: inherit; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.search { position: relative; margin-bottom: 10px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.search input { padding-left: 42px !important; }

/* ===== PremiumAccountRow ===== */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; margin-bottom: 8px; border-radius: 15px; cursor: pointer;
  background: var(--surface-grad); border: 1px solid rgba(181, 146, 241, .12);
  transition: transform var(--motion-fast) var(--ease-premium), border-color var(--motion-normal), box-shadow var(--motion-normal), background var(--motion-normal); }
.row-ic { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, #241a3a, #150f24); border: 1px solid rgba(181, 146, 241, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.row-ic .cat-ic { width: 30px; height: 30px; object-fit: contain; }
.row-ic img.photo { width: 100%; height: 100%; object-fit: cover; }
.row-ic .ico { color: var(--color-purple-light); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-sub { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.row-val { font-size: 15px; font-weight: 700; white-space: nowrap; }
.row-chev { color: var(--color-text-muted); display: grid; place-items: center; margin-left: -2px; }
.row:active, .row.tap { transform: scale(.985); border-color: rgba(160, 32, 240, .55); box-shadow: 0 0 16px rgba(160, 32, 240, .22); background: linear-gradient(155deg, #261c3a, #15101f); }
@media (hover: hover) { .row:hover { border-color: rgba(160, 32, 240, .35); } }
.row.compact { padding: 10px; }
.row.compact .row-ic { width: 40px; height: 40px; }
.row.compact .row-ic .cat-ic { width: 28px; height: 28px; }

/* ===== PremiumStatusBadge ===== */
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.status.ok { color: var(--color-success); } .status.late { color: var(--color-danger); } .status.soon { color: var(--color-warning); } .status.open { color: var(--color-text-secondary); }
.status.open .ico { width: 8px; height: 8px; }

/* ===== totais ===== */
.totals { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-md); padding: 4px 16px; margin-top: 4px; }
.trow { display: flex; justify-content: space-between; align-items: center; font-size: 13px; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.trow:last-child { border-bottom: none; }
.trow > span:first-child { color: var(--color-text-secondary); }
.trow b { font-weight: 700; font-size: 14px; }
.trow span small { display: block; font-size: 11px; color: var(--color-text-muted); font-weight: 400; }
.mini-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; padding: 11px 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; color: var(--color-text-secondary); border-radius: 8px; }
.mini-line .ml-name { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 13px; min-width: 0; }
.mini-line .cat-ic { width: 22px; height: 22px; }
.mini-line.tap { background: rgba(160, 32, 240, .08); }

/* ===== lançamentos ===== */
.day-head { font-size: 12px; color: var(--color-text-muted); margin: 14px 4px 6px; font-weight: 600; text-transform: capitalize; }
.lv { font-weight: 700; }

/* ===== menu Mais ===== */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-tile { display: flex; flex-direction: column; gap: 6px; min-height: 124px; padding: 16px 14px 14px; border-radius: 20px; cursor: pointer; text-align: left; color: #fff;
  background: var(--surface-grad); border: 1px solid var(--surface-border);
  transition: transform var(--motion-fast) var(--ease-premium), border-color var(--motion-normal), box-shadow var(--motion-normal); }
.menu-tile .prem-ic { width: 52px; height: 52px; margin: -2px 0 4px -3px; }
.menu-tile .mt { font-size: 15px; font-weight: 700; }
.menu-tile .md { font-size: 12px; color: var(--color-text-secondary); font-weight: 400; }
.menu-tile:active, .menu-tile.tap { transform: scale(.97); border-color: rgba(160, 32, 240, .6); box-shadow: 0 0 18px rgba(160, 32, 240, .3); }
.whoami { text-align: center; font-size: 12px; color: var(--color-text-secondary); margin-top: 18px; }
.whoami b { color: var(--color-purple-light); }

/* ===== estados ===== */
.empty { text-align: center; color: var(--color-text-secondary); font-size: 13px; padding: 28px 16px; font-weight: 400; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .empty-ic { width: 52px; height: 52px; opacity: .9; }
.empty .empty-ic img { width: 100%; height: 100%; }
.state-box { text-align: center; padding: 60px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.state-box .state-ic { width: 72px; height: 72px; }
.state-box h3 { font-size: 18px; } .state-box p { color: var(--color-text-secondary); font-size: 13px; max-width: 300px; }
.skel { display: block; border-radius: 14px; background: linear-gradient(100deg, #161320 30%, #221a33 50%, #161320 70%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ===== toast ===== */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  background: var(--color-bg-elevated); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none;
  border: 1px solid rgba(160, 32, 240, .4); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity var(--motion-normal), transform var(--motion-normal) var(--ease-premium); z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(46, 219, 136, .45); } .toast.ok .ico { color: var(--color-success); }
.toast.err { border-color: rgba(255, 91, 112, .5); } .toast.err .ico { color: var(--color-danger); }

/* ===== PremiumBottomNavigation ===== */
.nav {
  position: absolute; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; height: var(--nav-h); display: flex; align-items: stretch; justify-content: space-around;
  padding: 6px 6px 0; border-radius: 24px; background: rgba(12, 9, 22, .96); border: 1px solid rgba(160, 32, 240, .28);
  box-shadow: 0 -6px 28px rgba(0, 0, 0, .25), 0 0 18px rgba(113, 39, 232, .08), inset 0 1px 0 rgba(255, 255, 255, .045);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.nav-logo { display: none; }
.nav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; background: none; color: #CFCBDB; font-size: 11.5px; font-weight: 600; padding-bottom: 6px; border-radius: 16px; transition: color 220ms ease, background 220ms ease; }
.nav button .ni { position: relative; width: 26px; height: 26px; }
.nav button .ni img { position: absolute; inset: 0; width: 26px; height: 26px; object-fit: contain; transition: opacity 220ms ease, transform 220ms var(--ease-premium), filter 220ms ease; }
.nav button .ic-off { opacity: .9; filter: grayscale(1) brightness(1.6) contrast(.9); }
.nav button .ic-on { opacity: 0; transform: scale(.9); }
.nav button.on { color: #fff; }
.nav button.on .ic-off { opacity: 0; }
.nav button.on .ic-on { opacity: 1; transform: scale(1.05); filter: drop-shadow(0 0 8px rgba(160, 32, 240, .7)); }
.nav button::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 32px; height: 3px; border-radius: 999px; background: #A020F0; transform: translateX(-50%) scaleX(0);
  box-shadow: 0 0 9px rgba(160, 32, 240, .8), 0 0 19px rgba(160, 32, 240, .3); transition: transform 240ms var(--ease-premium); }
.nav button.on::after { transform: translateX(-50%) scaleX(1); }
.nav button:active .ni img, .nav button.tap .ni img { transform: scale(.9); }
.nav button:focus-visible { outline: 2px solid var(--color-purple-light); outline-offset: -2px; }
.nav-badge { top: 4px; right: calc(50% - 22px); }

/* ===== barra de rolagem roxa ===== */
.vscroll { position: absolute; top: 0; width: 14px; z-index: 15; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.vscroll.show, .vscroll.drag { opacity: 1; pointer-events: auto; }
.vscroll i { position: absolute; right: 3px; top: 0; width: 5px; border-radius: 6px; cursor: grab; touch-action: none; background: linear-gradient(180deg, #C084FC 0%, #A020F0 45%, #7127E8 100%); box-shadow: 0 0 10px rgba(160, 32, 240, .8); transition: width .15s, right .15s; }
.vscroll i::before { content: ''; position: absolute; inset: 0 -8px; }
.vscroll.drag i, .vscroll i:hover { width: 8px; right: 2px; cursor: grabbing; }

/* ===== PremiumModal ===== */
.overlay { position: fixed; inset: 0; background: rgba(5, 3, 12, .72); display: flex; align-items: flex-end; justify-content: center; z-index: 50; opacity: 0; visibility: hidden; transition: opacity var(--motion-normal), visibility var(--motion-normal); }
.overlay.show { opacity: 1; visibility: visible; }
.sheet { width: 100%; max-width: 560px; max-height: 90%; overflow-y: auto; background: var(--color-bg-elevated); border: 1px solid rgba(160, 32, 240, .35); border-bottom: none; border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(113, 39, 232, .12);
  transform: translateY(24px); transition: transform var(--motion-slow) var(--ease-premium); scrollbar-width: thin; scrollbar-color: #7127E8 transparent; }
.overlay.show .sheet { transform: none; }
.sheet::-webkit-scrollbar { width: 5px; } .sheet::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #A020F0, #7127E8); border-radius: 6px; }
.sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .18); margin: 0 auto 14px; }
.sheet-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; line-height: 1.3; }
.sheet .row2 { display: flex; gap: 10px; } .sheet .row2 .field { flex: 1; min-width: 0; }
.sheet-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.sheet-actions button, .sheet-actions label.cancel { flex: 1; min-width: 96px; min-height: 48px; border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 700; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms; }
.sheet-actions.col { flex-direction: column; } .sheet-actions.col button, .sheet-actions.col label { width: 100%; flex: none; }
.sheet-actions .save { background: var(--gradient-action); color: #fff; border-color: rgba(211, 169, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 14px rgba(112, 34, 220, .2); }
.sheet-actions .cancel { background: var(--color-surface); color: #fff; border-color: var(--color-border); cursor: pointer; }
.sheet-actions .cancel .ico { color: var(--color-purple-light); }
.sheet-actions .danger { background: rgba(255, 91, 112, .1); color: var(--color-danger); border-color: rgba(255, 91, 112, .3); }
.sheet-actions button:active, .sheet-actions button.tap { transform: scale(.97); filter: brightness(1.08); }
.sheet-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sheet-info > div { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 10px; min-width: 0; }
.sheet-info span { display: block; font-size: 11px; color: var(--color-text-secondary); font-weight: 500; }
.sheet-info b { font-size: 13px; font-weight: 700; }
.sheet-note { font-size: 12px; color: var(--color-text-secondary); margin: -4px 0 12px; display: flex; gap: 6px; align-items: flex-start; }
.sheet-note .ico { color: var(--color-purple-light); margin-top: 1px; }

/* ===== PremiumInput / Select / Textarea ===== */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: #CFCBDB; margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px 14px; color: #fff; font-size: 15px; font-weight: 500;
  transition: border-color var(--motion-normal), box-shadow var(--motion-normal); caret-color: var(--color-purple-light); appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C084FC' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field select option { background: var(--color-surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-muted); }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-purple); box-shadow: 0 0 0 3px rgba(113, 39, 232, .22), 0 0 14px rgba(160, 32, 240, .18); }
.field input[type=color] { padding: 5px; height: 48px; }
.field input[type=date], .field input[type=month], .field input[type=time] { color-scheme: dark; }
.currency { position: relative; }
.currency span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-secondary); font-weight: 600; font-size: 14px; pointer-events: none; }
.currency input { padding-left: 42px; }
.login-err { color: var(--color-danger); font-size: 13px; min-height: 18px; margin: 2px 0 8px; text-align: center; font-weight: 500; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; max-height: 196px; overflow-y: auto; padding: 2px; }
.icon-pick button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); display: grid; place-items: center; padding: 6px; }
.icon-pick button .cat-ic { width: 100%; height: 100%; }
.icon-pick button.on { border-color: var(--color-purple-electric); background: var(--color-surface-pressed); box-shadow: 0 0 0 2px rgba(160, 32, 240, .3), 0 0 12px rgba(160, 32, 240, .3); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.thumbs .th { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); }
.thumbs .th img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .th button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.thumbs .th button .ico { width: 13px; height: 13px; }
.upload-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; background: rgba(113, 39, 232, .1); border: 1px dashed rgba(192, 132, 252, .5); border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--color-purple-light); cursor: pointer; }
.upload-btn input { display: none; }
.upload-btn.block { width: 100%; }
.upload-btn.tap { background: rgba(113, 39, 232, .22); border-color: var(--color-purple-electric); }
.file-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #fff; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 8px 8px 8px 12px; margin-bottom: 8px; }
.file-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { width: 32px; height: 32px; border-radius: 9px; border: none; background: rgba(255, 91, 112, .12); color: var(--color-danger); display: grid; place-items: center; }
.file-chip > .ico { color: var(--color-purple-light); }
label.check { display: flex !important; gap: 10px; align-items: center; font-size: 13px !important; color: #fff !important; padding: 8px 0; cursor: pointer; font-weight: 500 !important; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--color-purple); }

/* ===== custos / entradas ===== */
.center-total { text-align: center; margin: 2px 0 14px; }
.center-total .k { font-size: 13px; font-weight: 600; }
.center-total .v { font-size: 28px; font-weight: 700; margin-top: 2px; letter-spacing: -.5px; }
.center-total .s { font-size: 12px; color: var(--color-text-secondary); font-weight: 400; margin-top: 2px; }
.donut-wrap { display: grid; place-items: center; margin: 4px 0 18px; position: relative; }
.donut-center { position: absolute; text-align: center; }
.donut-center .dc-k { font-size: 11px; color: var(--color-text-secondary); } .donut-center .dc-v { font-size: 17px; font-weight: 800; } .donut-center .dc-s { font-size: 11px; color: var(--color-text-muted); }
.lrow { display: flex; flex-direction: column; gap: 7px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; border-radius: 8px; }
.lrow:last-child { border-bottom: none; }
.lrow.tap { background: rgba(160, 32, 240, .08); }
.lline { display: flex; align-items: center; gap: 10px; }
.lline .cat-ic { width: 26px; height: 26px; }
.lname { flex: 1; font-size: 14px; font-weight: 600; } .lval { font-size: 14px; font-weight: 700; } .lpct { font-size: 12px; color: var(--color-text-secondary); width: 40px; text-align: right; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.budget { display: flex; align-items: center; gap: 8px; padding-left: 36px; }
.budget span { font-size: 11px; color: var(--color-text-secondary); white-space: nowrap; }
.pbar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: var(--gradient-active); }
.pbar.gold i { background: var(--gradient-gold); } .pbar.warn i { background: linear-gradient(90deg, #d6922c, #F4BC55); } .pbar.over i { background: var(--color-danger); }
.bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 156px; padding: 8px 4px 0; }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bcol > i { width: 62%; max-width: 26px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, rgba(46, 219, 136, .9), rgba(46, 219, 136, .35)); }
.bcol.on > i { background: var(--gradient-active); box-shadow: 0 0 12px rgba(160, 32, 240, .4); }
.bcol b { font-size: 9px; color: var(--color-text-secondary); font-weight: 600; white-space: nowrap; }
.bcol span { font-size: 11px; color: var(--color-text-secondary); }
.bars.dual { gap: 3px; height: 140px; }
.bars.dual .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars.dual .pair i { width: 40%; max-width: 9px; border-radius: 3px 3px 0 0; display: block; }
.bars.dual i.e { background: var(--color-success); } .bars.dual i.s { background: var(--color-danger); }
.legend-mini { display: flex; gap: 16px; justify-content: center; font-size: 11px; color: var(--color-text-secondary); margin-top: 10px; }
.legend-mini i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.legend-mini i.e { background: var(--color-success); } .legend-mini i.s { background: var(--color-danger); }

/* ===== métricas ===== */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: var(--space-3) 0; }
.metrics.two { grid-template-columns: 1fr 1fr; }
.metric { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-md); padding: 12px; min-width: 0; }
.metric .k { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; }
.metric .v { font-size: 16px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics.two .metric .v { font-size: 18px; }
.metric.gold .v { color: var(--color-gold); } .metric.red .v { color: var(--color-danger); } .metric.green .v { color: var(--color-success); }

/* ===== tabelas ===== */
.card.table { padding: 4px 16px; }
.trow.t4, .trow.th { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; text-align: right; }
.trow.t4 { cursor: pointer; }
.trow.t4 span:first-child, .trow.th span:first-child { text-align: left; color: #fff; }
.trow.th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.trow.th span { color: var(--color-text-muted) !important; }
.trow.tf { font-weight: 800; }

/* ===== bens / investimentos / detalhes ===== */
.bem-item { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 8px; border-radius: 16px; cursor: pointer; background: var(--surface-grad); border: 1px solid rgba(181, 146, 241, .12); transition: transform var(--motion-fast), border-color var(--motion-normal); }
.bem-item .thumb { width: 64px; height: 52px; border-radius: 12px; background: linear-gradient(160deg, #241a3a, #150f24); border: 1px solid rgba(181, 146, 241, .16); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.bem-item .thumb img.photo { width: 100%; height: 100%; object-fit: cover; } .bem-item .thumb .cat-ic { width: 34px; height: 34px; }
.bem-item .info { flex: 1; min-width: 0; }
.bem-item .nm { font-size: 15px; font-weight: 600; } .bem-item .val { font-size: 12px; color: var(--color-text-secondary); margin: 3px 0 8px; font-weight: 400; }
.bem-item .prow { display: flex; align-items: center; gap: 8px; } .bem-item .pp { font-size: 12px; color: var(--color-text-secondary); white-space: nowrap; }
.bem-item.tap { transform: scale(.985); border-color: rgba(160, 32, 240, .55); }
.detail-hero { text-align: center; padding: 4px 0 6px; }
.detail-hero .thumb { width: 100%; height: 190px; border-radius: 20px; background: radial-gradient(circle at 50% 30%, rgba(160, 32, 240, .2), transparent 60%), linear-gradient(160deg, #1d1530, #100c19); border: 1px solid rgba(181, 146, 241, .15); display: grid; place-items: center; margin-bottom: 14px; overflow: hidden; }
.detail-hero .thumb img.photo { width: 100%; height: 100%; object-fit: cover; } .detail-hero .thumb .cat-ic { width: 92px; height: 92px; }
.detail-hero .nm { font-size: 20px; font-weight: 700; } .detail-hero .val { font-size: 14px; color: var(--color-text-secondary); margin-top: 2px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; }
.gallery img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 1px solid var(--color-border); flex-shrink: 0; cursor: pointer; }
.prog-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--color-text-secondary); margin: 16px 0 8px; }
.prog-head b { color: #fff; }
.goal-bar.big { height: 8px; }
.hist { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-md); padding: 2px 14px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.hrow:last-child { border-bottom: none; }
.hrow .ck { color: var(--color-success); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(46, 219, 136, .12); flex-shrink: 0; }
.hrow .dt { flex: 1; font-size: 13px; } .hrow .vl { font-size: 13px; font-weight: 700; }
.paid-tag { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--color-success); font-size: 13px; font-weight: 700; padding: 12px; background: rgba(46, 219, 136, .08); border: 1px solid rgba(46, 219, 136, .25); border-radius: 14px; margin: 8px 0; }

/* ===== cartões de crédito ===== */
.credit-card { border-radius: 20px; padding: 18px; color: #fff; margin-bottom: 12px; position: relative; min-height: 176px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); overflow: hidden; cursor: pointer; transition: transform var(--motion-fast); }
.credit-card::after { content: ''; position: absolute; top: -40%; right: -10%; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); pointer-events: none; }
.credit-card.tap { transform: scale(.985); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.cc-bank { font-size: 16px; font-weight: 700; } .cc-flag { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .9; }
.cc-num { font-size: 15px; letter-spacing: 3px; font-weight: 600; opacity: .9; position: relative; z-index: 1; }
.cc-fat { font-size: 12px; opacity: .92; position: relative; z-index: 1; }
.cc-bot { display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; position: relative; z-index: 1; }
.cc-bot .lbl { opacity: .7; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; } .cc-bot b { font-size: 14px; }
.cc-limit-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-top: 6px; position: relative; z-index: 1; }
.cc-limit-bar > i { display: block; height: 100%; background: #fff; border-radius: 999px; }

/* ===== agenda ===== */
.cal { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); padding: 10px; }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-h span { text-align: center; font-size: 11px; color: var(--color-text-muted); padding: 4px 0; font-weight: 600; }
.cal-d { aspect-ratio: 1; min-width: 0; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; font-size: 13px; font-weight: 600; border: 1px solid transparent; background: none; color: #fff; }
.cal-d.empty { cursor: default; }
.cal-d.today span { color: var(--color-gold); font-weight: 800; }
.cal-d.sel { background: var(--color-surface-pressed); border-color: rgba(160, 32, 240, .55); box-shadow: 0 0 10px rgba(160, 32, 240, .25); }
.cal-d.tap { background: var(--color-surface-pressed); }
.cal-d .dots { display: flex; gap: 2px; height: 5px; }
.cal-d .dots i, .cal-leg i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.cal-leg { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 11px; color: var(--color-text-secondary); margin-top: 8px; }
.cal-leg i { margin-right: 4px; }
.t-conta { background: var(--color-danger); } .t-receber { background: var(--color-success); } .t-fatura { background: var(--color-purple-light); } .t-tarefa { background: var(--color-gold); } .t-documento, .t-seguro { background: #5B9BFF; }
.chk { width: 30px; height: 30px; border-radius: 9px; border: 2px solid rgba(192, 132, 252, .5); background: none; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.chk.on { background: var(--gradient-active); border-color: transparent; }
.row.done .row-title.strike { text-decoration: line-through; color: var(--color-text-secondary); }

/* ===== documentos / notas / perfil ===== */
.doc-cat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-secondary); margin: 18px 2px 8px; font-weight: 600; }
.doc-cat .cat-ic { width: 20px; height: 20px; }
.docview-frame { width: 100%; height: 68vh; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.docview-img { width: 100%; border-radius: 16px; border: 1px solid var(--color-border); }
.vault-lock { text-align: center; padding: 28px 6px; }
.vault-lock .prem-ic { width: 76px; height: 76px; margin: 0 auto 12px; }
.vault-lock h3 { font-size: 20px; font-weight: 700; }
.vault-lock p { font-size: 13px; color: var(--color-text-secondary); margin: 8px auto 20px; line-height: 1.55; max-width: 320px; font-weight: 400; }
.vault-lock .field { max-width: 320px; margin: 0 auto 12px; text-align: left; }
.vault-lock .btn { max-width: 320px; width: 100%; }
.note-card { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: 16px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.note-card .nt { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; } .note-card .nt .cat-ic { width: 24px; height: 24px; }
.note-card .nc { font-size: 13px; color: var(--color-text-secondary); margin-top: 6px; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-weight: 400; }
.note-card .ncat { font-size: 11px; color: var(--color-purple-light); margin-top: 8px; font-weight: 600; }
.vault-bar { display: flex; align-items: center; gap: 8px; background: rgba(46, 219, 136, .06); border: 1px solid rgba(46, 219, 136, .2); border-radius: 12px; padding: 6px 6px 6px 12px; margin-bottom: 14px; font-size: 13px; color: var(--color-success); font-weight: 600; }
.vault-bar .btn { margin-left: auto; }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 4px; }
.avatar { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(160deg, #241a3a, #150f24); border: 2px solid rgba(160, 32, 240, .55); display: grid; place-items: center; position: relative; cursor: pointer; box-shadow: 0 0 22px rgba(160, 32, 240, .25); padding: 0; }
.avatar img.photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; } .avatar > .prem-ic { width: 64px; height: 64px; }
.avatar .cam { position: absolute; bottom: -2px; right: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-action); color: #fff; display: grid; place-items: center; border: 3px solid var(--color-bg); }
.avatar .cam .ico { width: 16px; height: 16px; }
.profile-head .pn { font-size: 21px; font-weight: 700; margin-top: 12px; } .profile-head .pu { font-size: 13px; color: var(--color-purple-light); margin-top: 2px; } .profile-head .pb { font-size: 13px; color: var(--color-text-secondary); margin-top: 8px; max-width: 300px; line-height: 1.45; font-weight: 400; }
.info-list { background: var(--surface-grad); border: 1px solid var(--surface-border); border-radius: var(--radius-md); padding: 2px 14px; }
.irow { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.irow:last-child { border-bottom: none; }
.irow .il { width: 24px; display: grid; place-items: center; color: var(--color-purple-light); } .irow .ik { flex: 1; font-size: 13px; color: var(--color-text-secondary); } .irow .iv { font-size: 13px; font-weight: 600; text-align: right; }
.srow { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; border-radius: 8px; }
.srow:last-child { border-bottom: none; }
.srow .si { width: 24px; display: grid; place-items: center; color: var(--color-purple-light); } .srow .sn { flex: 1; font-size: 14px; font-weight: 500; } .srow .sa { color: var(--color-text-muted); font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.srow.static { cursor: default; }
.srow.logout .sn, .srow.logout .si { color: var(--color-danger); }
.srow.tap { background: rgba(160, 32, 240, .08); }
.imp-row { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; margin-bottom: 8px; }
.imp-row.off { opacity: .45; }
.imp-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--color-purple); flex-shrink: 0; }
.imp-row .im { flex: 1; min-width: 0; }
.imp-row .ln { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .imp-row .ls { font-size: 11px; color: var(--color-text-secondary); }
.imp-row .lv { font-size: 13px; white-space: nowrap; }
.imp-cat { width: 100%; margin-top: 6px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 9px; padding: 7px 9px; color: #fff; font-size: 12px; }

/* ===== acesso (login) ===== */
.login { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; padding-top: max(24px, env(safe-area-inset-top));
  background: radial-gradient(700px 420px at 50% -10%, rgba(64, 19, 139, .55), transparent 65%), radial-gradient(600px 400px at 100% 110%, rgba(112, 19, 193, .28), transparent 60%), var(--color-bg); }
.login-inner { width: 100%; max-width: 340px; text-align: center; }
.login-logo-full { width: 230px; max-width: 72%; height: auto; margin: 0 auto 34px; display: block; filter: drop-shadow(0 10px 30px rgba(160, 32, 240, .35)); }
.login form { text-align: left; }
.code-txt { font-size: 13px; color: var(--color-text-secondary); text-align: center; margin-bottom: 16px; }
.code-input { text-align: center; font-size: 22px !important; letter-spacing: 8px; }

/* ===== recorte de foto ===== */
.cropper { position: fixed; inset: 0; background: rgba(5, 3, 12, .96); z-index: 70; display: none; flex-direction: column; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); padding-top: max(20px, env(safe-area-inset-top)); }
.cropper.show { display: flex; }
.cropper > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.crop-head { font-size: 17px; font-weight: 700; text-align: center; }
.crop-hint { font-size: 12px; color: var(--color-purple-light); text-align: center; margin: 6px auto 14px; }
.crop-stage { position: relative; aspect-ratio: 4/3; background: #000; border-radius: 16px; overflow: hidden; touch-action: none; border: 1px solid var(--color-border); flex-shrink: 0; }
.crop-stage img { position: absolute; top: 50%; left: 50%; user-select: none; -webkit-user-drag: none; max-width: none; }
.crop-frame { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(160, 32, 240, .7); border-radius: 16px; }
.crop-controls { display: flex; align-items: center; gap: 12px; margin: 18px auto; font-size: 13px; color: var(--color-text-secondary); }
.crop-controls input[type=range] { flex: 1; accent-color: var(--color-purple); }
.crop-actions { display: flex; gap: 10px; margin-top: auto; }
.crop-actions button { flex: 1; min-height: 50px; border-radius: 14px; font-size: 15px; font-weight: 700; border: 1px solid var(--color-border); }
.crop-actions .cancel { background: var(--color-surface); color: #fff; }
.crop-actions .save { background: var(--gradient-action); color: #fff; border-color: rgba(211, 169, 255, .3); }

.ico { flex-shrink: 0; }
.prem-ic, .cat-ic { display: block; object-fit: contain; }

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .screen { max-width: 760px; margin: 0 auto; }
  .nav { left: 50%; right: auto; width: min(560px, calc(100% - 32px)); transform: translateX(-50%); }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .mod-grid { gap: 12px; }
  .mod-tile { min-height: 108px; } .mod-tile .prem-ic { width: 52px; height: 52px; }
  .sheet { border-radius: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(160, 32, 240, .35); }
  .overlay { align-items: center; }
  .sheet-grab { display: none; }
}
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  .app-wrap { flex-direction: row; }
  .nav { position: relative; order: -1; left: auto; right: auto; bottom: auto; transform: none; width: 236px; height: auto; flex-direction: column; justify-content: flex-start; align-items: stretch;
    gap: 6px; margin: 16px 0 16px 16px; padding: 24px 14px; border-radius: 24px; flex-shrink: 0; }
  .nav-logo { display: block; width: 128px; height: auto; margin: 0 0 24px 12px; }
  .nav button { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; font-size: 14px; min-height: 52px; }
  .nav button .ni, .nav button .ni img { width: 24px; height: 24px; }
  .nav button::after { left: 0; top: 50%; bottom: auto; width: 3px; height: 26px; transform: translateY(-50%) scaleY(0); }
  .nav button.on { background: rgba(160, 32, 240, .1); }
  .nav button.on::after { transform: translateY(-50%) scaleY(1); }
  .nav-badge { top: 8px; right: auto; left: 34px; }
  .screen { max-width: 1140px; padding: 26px 40px 48px; }
  .toast { bottom: 28px; left: calc(50% + 126px); }
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
  .metrics { gap: 14px; }
  .resumo-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .resumo-grid > .col { min-width: 0; }
  .resumo-grid .fin-row { margin-top: 0; }
  .wchart svg { height: 190px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .goal-value { font-size: 36px; }
}
@media (hover: hover) and (min-width: 1024px) { .nav button:hover { background: rgba(255, 255, 255, .04); color: #fff; } .nav button.on:hover { background: rgba(160, 32, 240, .14); } }

/* ===== impressão / PDF ===== */
@media print {
  html, body, .phone { background: #fff !important; color: #000 !important; height: auto; }
  .nav, .login, .overlay, .toast, .vscroll, .no-print, .top button, .month-pick button, .icon-btn { display: none !important; }
  .phone, .app-wrap, .screens { overflow: visible; height: auto; display: block; }
  .screen:not(.active) { display: none !important; }
  .screen { padding: 0; max-width: none; }
  .card, .metric, .totals, .note-box, .fin-card { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none; color: #000; }
  .trow span, .trow b, .top .title, .metric .v, .metric .k, .sec-head h3, .month-pick span, .center-total .v { color: #000 !important; }
  .pos { color: #0a7a35 !important; } .neg { color: #b42318 !important; }
}

/* ===== movimento reduzido ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .wc-line, .wc-glow { stroke-dashoffset: 0 !important; } .wc-area { opacity: 1 !important; }
}
.icon-btn .cat-ic { width: 24px; height: 24px; }
.strike { text-decoration: line-through; color: var(--color-text-secondary); }
.meta-card .pbar { max-width: 100%; }
.fin-v, .metric .v { font-size: clamp(14px, 4.1vw, 16px); letter-spacing: -.3px; }
.metric { padding: 12px 10px; }
@media (min-width: 1024px) {
  .menu-btn, .top-brand .brand-logo { display: none !important; }
  .top-brand.hide-desk { visibility: hidden; }
  .resumo-grid .fin-row { margin-top: 12px; }
  .fin-v, .metric .v { font-size: 17px; }
  .metrics.two .metric .v { font-size: 19px; }
}

/* ---------- notificações push ---------- */
.push-card { padding-bottom: 6px; }
.srow .sa.pos { color: var(--color-success, #34D399); font-weight: 600; }
.srow .sa.neg { color: var(--color-danger); font-weight: 600; }
.push-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 4px 8px; }
.push-actions .btn { flex: 1 1 140px; }
.push-note { font-size: 12.5px; line-height: 1.5; color: var(--color-text-secondary); margin: 2px 4px 10px; }
.push-steps { margin: 4px 4px 6px 22px; padding: 0; font-size: 13px; line-height: 1.55; color: var(--color-text-secondary); }
.push-steps li { margin-bottom: 6px; } .push-steps b, .push-note b { color: #fff; font-weight: 600; }

/* ---------- assistente de IA ---------- */
.ia-ask { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px 8px 10px; margin: 0 0 var(--space-4); border-radius: 16px;
  background: linear-gradient(180deg, rgba(113, 39, 232, .16), rgba(113, 39, 232, .06)); border: 1px solid rgba(160, 32, 240, .38); color: var(--color-text-secondary); font-size: 14px; font-weight: 500; text-align: left;
  box-shadow: 0 0 18px rgba(160, 32, 240, .12); transition: transform 180ms ease, border-color 180ms; }
.ia-ask .cat-ic { width: 30px; height: 30px; flex: none; }
.ia-ask > span:nth-child(2) { flex: 1; }
.ia-ask-ics { display: inline-flex; gap: 10px; color: var(--color-purple-light); }
.ia-ask:active, .ia-ask.tap { transform: scale(.985); border-color: var(--color-purple-electric); }
.ia-cat-btn { margin: -2px 0 12px; }
.srow-sub { display: block; font-size: 11.5px; color: var(--color-text-muted); font-weight: 500; margin-top: 2px; }
.srow .si .cat-ic { width: 22px; height: 22px; }

#scr-ia { display: none; }
#scr-ia.active { display: flex; flex-direction: column; min-height: 100%; }
.ia-msgs { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.ia-hero { text-align: center; padding: 18px 6px 4px; }
.ia-hero-ic { width: 84px; height: 84px; margin: 0 auto 10px; display: block; }
.ia-hero h3 { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.ia-hero p { color: var(--color-text-secondary); font-size: 14px; line-height: 1.55; max-width: 420px; margin: 0 auto 14px; }
.ia-hero .btn { margin-top: 4px; }
.ia-fine { font-size: 12px !important; color: var(--color-text-muted) !important; margin-top: 14px !important; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ia-chip { padding: 9px 14px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border); color: #fff; font-size: 13px; font-weight: 600; transition: transform 160ms, border-color 160ms; }
.ia-chip:active, .ia-chip.tap { transform: scale(.96); border-color: var(--color-purple-electric); color: var(--color-purple-light); }

.ia-msg { display: flex; gap: 8px; max-width: 100%; }
.ia-msg.eu { flex-direction: column; align-items: flex-end; }
.ia-msg.eu .ia-bolha { background: var(--gradient-action); color: #fff; border-radius: 18px 18px 6px 18px; max-width: 86%; border: 1px solid rgba(211, 169, 255, .25); }
.ia-msg.ela { align-items: flex-start; }
.ia-av { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--color-surface); border: 1px solid rgba(160, 32, 240, .35); margin-top: 2px; }
.ia-av .cat-ic { width: 20px; height: 20px; }
.ia-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ia-bolha { padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ia-msg.ela .ia-bolha { max-width: 100%; }
.ia-bolha p { margin: 0 0 8px; } .ia-bolha p:last-child { margin-bottom: 0; }
.ia-bolha ul, .ia-bolha ol { margin: 4px 0 8px 18px; padding: 0; } .ia-bolha li { margin-bottom: 4px; }
.ia-bolha b { color: #fff; font-weight: 700; }
.ia-msg.erro .ia-bolha { border-color: rgba(255, 91, 112, .4); color: #FFC2CB; }
.ia-thumb { width: 120px; max-height: 160px; object-fit: cover; border-radius: 14px; border: 1px solid var(--color-border); margin-bottom: 4px; }
.ia-file { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--color-text-secondary); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 6px 10px; margin-bottom: 4px; }
.ia-digitando { display: inline-flex; gap: 5px; padding: 15px 16px; }
.ia-digitando i { width: 7px; height: 7px; border-radius: 50%; background: var(--color-purple-light); opacity: .35; animation: iaDot 1.1s infinite ease-in-out; }
.ia-digitando i:nth-child(2) { animation-delay: .15s; } .ia-digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes iaDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.ia-props { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ia-prop { background: var(--color-surface); border: 1px solid rgba(160, 32, 240, .32); border-radius: 16px; padding: 10px 12px; box-shadow: 0 0 14px rgba(160, 32, 240, .08); }
.ia-prop.salvo { border-color: rgba(46, 219, 136, .35); box-shadow: none; }
.ia-prop.descartado { opacity: .5; box-shadow: none; border-color: var(--color-border); }
.ia-prop-main { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ia-prop.salvo .ia-prop-main, .ia-prop.descartado .ia-prop-main { cursor: default; }
.ia-prop-main > .cat-ic, .ia-prop-main > .ico { width: 36px; height: 36px; flex: none; }
.ia-prop-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ia-prop-tx b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-prop-tx span:last-child { font-size: 12px; color: var(--color-text-secondary); line-height: 1.4; }
.ia-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--color-purple-light); }
.ia-prop-v { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.ia-prop-act { display: flex; gap: 6px; margin-top: 10px; }
.ia-prop-act .ia-mini { flex: 1; justify-content: center; }
.ia-mini { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 12px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--color-border); color: #fff; font-size: 12.5px; font-weight: 600; }
.ia-mini .ico { color: var(--color-purple-light); }
.ia-mini.accent { background: var(--gradient-action); border-color: rgba(211, 169, 255, .3); }
.ia-mini:active, .ia-mini.tap { transform: scale(.96); }
.ia-prop-st { margin-top: 8px; font-size: 12.5px; color: var(--color-text-muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.ia-prop-st.ok { color: var(--color-success); }
.ia-prop-edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.ia-prop-edit .field { margin-bottom: 10px; }
.ia-prop-edit .field input, .ia-prop-edit .field select { min-height: 42px; padding: 9px 12px; font-size: 14px; }
.ia-prop-edit .field select { padding-right: 36px; }
.ia-save-all { margin-top: 2px; }

.ia-composer { position: sticky; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 6px; }
.ia-composer::before { content: ''; position: absolute; inset: -14px -12px -14px; background: linear-gradient(180deg, rgba(11, 11, 13, 0), rgba(11, 11, 13, .92) 30%); z-index: -1; pointer-events: none; }
.ia-bar { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 22px; background: var(--color-surface); border: 1px solid rgba(160, 32, 240, .4); box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 0 16px rgba(160, 32, 240, .14); }
.ia-bar textarea { flex: 1; min-width: 0; resize: none; background: transparent; border: 0; color: #fff; font: inherit; font-size: 15px; line-height: 1.4; padding: 10px 4px; max-height: 140px; outline: none; }
.ia-bar textarea::placeholder { color: var(--color-text-muted); }
.ia-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 14px; color: var(--color-purple-light); cursor: pointer; background: transparent; border: 0; }
.ia-ic.on { background: rgba(255, 91, 112, .15); color: var(--color-danger); animation: iaPulse 1.2s infinite; }
@keyframes iaPulse { 50% { box-shadow: 0 0 0 6px rgba(255, 91, 112, .08); } }
.ia-send { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--gradient-action); color: #fff; border: 1px solid rgba(211, 169, 255, .3); }
.ia-send:disabled { opacity: .45; }
.ia-anexo-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 0 0 8px 4px; padding: 6px 8px 6px 6px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: 12.5px; color: var(--color-text-secondary); }
.ia-anexo-chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 9px; }
.ia-anexo-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.ia-anexo-chip button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .06); color: #fff; border: 0; }
@media (prefers-reduced-motion: reduce) { .ia-digitando i, .ia-ic.on { animation: none; } }
.ia-prop-edit .row2 { display: flex; gap: 10px; } .ia-prop-edit .row2 .field { flex: 1; min-width: 0; }
body[data-tela=ia] .toast { bottom: calc(var(--nav-h) + 98px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { #scr-ia .ia-msgs, #scr-ia .ia-composer { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; } }

/* ---------- foto padrão dos bens ---------- */
.crop-alt { margin-left: 6px; background: none; border: 0; color: #fff; text-decoration: underline; font-size: 12px; font-weight: 600; padding: 2px 4px; }
.crop-stage.busy::after { content: 'IA ajustando a foto…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-purple-light); font-size: 14px; font-weight: 600;
  background: linear-gradient(110deg, #120d22 30%, #231640 50%, #120d22 70%); background-size: 200% 100%; animation: fotoBusy 1.3s linear infinite; }
@keyframes fotoBusy { to { background-position: -200% 0; } }
.foto-ia-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.foto-ia-acts .btn { flex: 1 1 160px; }
.detail-hero .thumb.has-photo { height: auto; aspect-ratio: 4 / 3; max-height: 380px; }

/* ---------- lista de backups ---------- */
.bk-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-bottom: 8px; }
.bk-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-border); }
.bk-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .bk-tx b { font-size: 13.5px; font-weight: 600; } .bk-tx span { font-size: 12px; color: var(--color-text-secondary); }
.bk-row .ia-mini { text-decoration: none; }

/* ---------- revisão de textos com IA ---------- */
.ia-form-nota { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--color-purple-light); margin: -4px 0 8px; font-weight: 500; }
.toast.com-acao { padding-right: 8px; } .toast.com-acao.show { pointer-events: auto; }
.toast-acao { margin-left: 4px; padding: 6px 10px; border-radius: 10px; background: rgba(160, 32, 240, .18); border: 1px solid rgba(160, 32, 240, .45); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.toast span { overflow: hidden; text-overflow: ellipsis; }
.toast.com-acao { width: min(440px, calc(100% - 32px)); } .toast.com-acao span { flex: 1; min-width: 0; }
#ia-cfg-row > .srow { border-bottom: 1px solid rgba(255, 255, 255, .05); }

/* ---------- cadastro BETA ---------- */
.login-alt { text-align: center; font-size: 13.5px; color: var(--color-text-secondary); margin-top: 16px; }
.login-alt a { color: var(--color-purple-light); font-weight: 700; text-decoration: none; }
.beta-tag { display: inline-block; vertical-align: middle; font-size: 10px; font-weight: 800; letter-spacing: .8px; padding: 3px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #6420CF, #9B18E9); border: 1px solid rgba(211, 169, 255, .35); margin-left: 4px; }
.cad-title { font-size: 22px; font-weight: 700; text-align: center; margin: 2px 0 6px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cad-ok { text-align: center; }
.cad-ok-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #12a866, #2EDB88); box-shadow: 0 0 24px rgba(46, 219, 136, .35); }
.sheet-info b { overflow-wrap: anywhere; }
.login-err.info { color: var(--color-purple-light); }
