/* ═══════════════════════════════════════════════
   OLIVER FINANCE PRO — Premium UI v48
   Font: Sora (display) + DM Sans (body)
   Theme: Dark luxury finance
   ═══════════════════════════════════════════════ */

:root{
  /* Background layers */
  --bg:       #07091a;
  --surface:  #0c1220;
  --surface2: #101828;
  --surface3: #14203a;
  --card:     #111928;

  /* Borders */
  --border:        rgba(255,255,255,0.06);
  --border-active: rgba(139,92,246,0.5);

  /* Brand */
  --primary:      #7c3aed;
  --primary-light: #8b5cf6;
  --primary-dim:  rgba(124,58,237,0.15);
  --primary-glow: 0 0 28px rgba(124,58,237,0.28);

  /* Semantic */
  --green:      #10b981;
  --green-dim:  rgba(16,185,129,0.14);
  --red:        #f43f5e;
  --red-dim:    rgba(244,63,94,0.14);
  --yellow:     #f59e0b;
  --yellow-dim: rgba(245,158,11,0.14);
  --blue:       #3b82f6;

  /* Text */
  --text:   #f1f5f9;
  --text2:  #cbd5e1;
  --muted:  #64748b;
  --muted2: #94a3b8;

  /* Radius */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 20px;
  --r-xl: 26px;

  /* Shadows */
  --shadow:    0 20px 50px rgba(0,0,0,0.5);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.3);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3 { font-family: 'Sora', sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:active { transform: scale(.97); }

.hidden { display: none !important; }
.green  { color: var(--green) !important; }
.red    { color: var(--red) !important; }
.yellow { color: var(--yellow) !important; }
.file-input { display: none; }

/* ══════════════════════════════════════════════
   SPLASH SCREEN
   ══════════════════════════════════════════════ */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashFadeOut 0.55s cubic-bezier(0.4,0,0.2,1) 2.3s forwards;
}

@keyframes splashFadeOut {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

.splash.force-hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: splashRise 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}

@keyframes splashRise {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo-wrap {
  width: 100px;
  height: 100px;
  position: relative;
}

.splash-svg {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 24px rgba(124,58,237,0.45));
}

/* Rect draws in */
.splash-rect {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: drawRect 0.8s cubic-bezier(0.4,0,0.2,1) 0.3s forwards;
}
@keyframes drawRect {
  to { stroke-dashoffset: 0; }
}

/* Line draws in */
.splash-line {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: drawLine 0.7s cubic-bezier(0.4,0,0.2,1) 0.9s forwards;
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* Dot pops */
.splash-dot {
  transform-origin: 74px 28px;
  transform: scale(0);
  animation: popDot 0.4s cubic-bezier(0.34,1.56,0.64,1) 1.5s forwards;
}
@keyframes popDot {
  to { transform: scale(1); }
}

.splash-name {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  animation: fadeUp 0.5s ease 1.2s both;
}

.splash-pro {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--primary-light);
  background: var(--primary-dim);
  border: 1px solid var(--border-active);
  border-radius: 999px;
  padding: 4px 12px;
  animation: fadeUp 0.5s ease 1.4s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
#toastRoot {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 2000;
  display: grid;
  gap: 10px;
  width: min(92vw, 400px);
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}
.toast b  { display: block; margin-bottom: 3px; font-weight: 700; }
.toast p  { margin: 0; color: var(--muted2); font-size: 13px; }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

/* ══════════════════════════════════════════════
   AUTH SCREEN
   ══════════════════════════════════════════════ */
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(109,40,217,0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(16,185,129,0.08), transparent),
    var(--bg);
}

.auth-card {
  width: min(94vw, 460px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  animation: cardIn 0.5s cubic-bezier(0.34,1.2,0.64,1) 0.1s both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}
.brand-icon svg { width: 56px; height: 56px; display: block; }

.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-card > p {
  color: var(--muted2);
  line-height: 1.55;
  margin-bottom: 24px;
  font-size: 14px;
}

/* Segmented control */
.segmented {
  height: 54px;
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 22px;
  border: 1px solid var(--border);
}
.segmented button {
  border-radius: var(--r);
  font-weight: 700;
  color: var(--muted);
  transition: 0.2s;
}
.segmented button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

/* Form */
.form-stack { display: grid; gap: 12px; }

.form-stack label, .panel-card label, .sheet label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted2);
  text-transform: uppercase;
}

.form-stack input,
.form-stack select,
.panel-card input,
.sheet input,
.sheet select,
.sheet textarea,
.tools-row input,
.tools-row select {
  width: 100%;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-stack input:focus,
.panel-card input:focus,
.sheet input:focus,
.sheet select:focus,
.sheet textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Buttons */
.btn {
  height: 52px;
  border-radius: var(--r);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.18s;
  font-size: 15px;
}
.btn-primary {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(109,40,217,0.3);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(109,40,217,0.45); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-google {
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  font-weight: 600;
}

/* Google Logo */
.g-logo {
  width: 20px; height: 20px; min-width: 20px; min-height: 20px; display: inline-block; flex-shrink: 0;
  vertical-align: middle;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%23FFC107" d="M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.1 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20c10 0 19-7.3 19-20 0-1.2-.1-2.3-.4-3.5z"/><path fill="%23FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.1 6.1 29.3 4 24 4 16.3 4 9.6 8.3 6.3 14.7z"/><path fill="%234CAF50" d="M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3C29.3 35.1 26.8 36 24 36c-5.2 0-9.6-3.3-11.2-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z"/><path fill="%231976D2" d="M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4.1-4.1 5.5l6.3 5.3C39.2 37.2 43 33 43 24c0-1.2-.1-2.3-.4-3.5z"/></svg>') center/contain no-repeat;
}

.auth-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.auth-row.center { justify-content: center; }
.auth-row button { color: var(--primary-light); font-weight: 700; font-size: 13px; }
.auth-download-card {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(139,92,246,0.34);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(124,58,237,0.16), rgba(16,185,129,0.07)),
    var(--surface2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  transition: 0.18s ease;
}
.auth-download-card:hover {
  transform: translateY(-1px);
  border-color: rgba(139,92,246,0.64);
  box-shadow: 0 12px 26px rgba(0,0,0,0.22);
}
.auth-download-card b { display: block; font-size: 14px; }
.auth-download-card small { display: block; margin-top: 3px; color: var(--muted2); font-size: 12px; }
.auth-download-card strong {
  color: #a78bfa;
  font-size: 12px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(139,92,246,0.28);
}
.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted2);
  font-size: 13px;
  font-weight: 700;
  margin-top: -2px;
}
.remember-row input {
  accent-color: #8b5cf6;
}

/* Photo picker */
.photo-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px dashed rgba(139,92,246,0.3);
  border-radius: var(--r);
  cursor: pointer;
}
.photo-row small { display: block; color: var(--muted); font-size: 12px; }
.photo-row strong {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-light);
}
.photo-circle {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}
.photo-circle img, .avatar img, .big-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ══════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════ */
.app {
  min-height: 100dvh;
  padding-bottom: 86px;
  background: var(--bg);
}

.cap-native .app {
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.cap-native .app-header {
  padding-top: max(12px, env(safe-area-inset-top));
}

.cap-native .bottom-tabs {
  height: calc(66px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── HEADER ── */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.profile-mini { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid; place-items: center; overflow: hidden; color: white; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.greeting-line { font-size: 10px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.profile-mini h2 { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.header-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r);
  background: var(--surface2); color: var(--muted2);
  display: grid; place-items: center;
  border: 1px solid var(--border); transition: color 0.2s, background 0.2s;
  touch-action: manipulation;
}
.icon-btn:hover { color: var(--text); background: var(--surface3); }

/* ── MONTH PILLS ── */
.month-pills-row {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 14px;
}
.month-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.month-pills::-webkit-scrollbar { display: none; }
.month-pill-btn {
  flex-shrink: 0; padding: 6px 13px; border-radius: 999px;
  font-family: "Sora", sans-serif; font-size: 11px; font-weight: 700;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  transition: 0.18s; cursor: pointer; white-space: nowrap;
}
.month-pill-btn.active { background: var(--primary); color: #fff; box-shadow: 0 3px 12px rgba(109,40,217,0.35); }

/* ── HERO BALANCE CARD ── */
.hero-card {
  background: linear-gradient(145deg, #0f1535 0%, #130d2a 55%, #07091a 100%);
  border-bottom: 1px solid rgba(139,92,246,0.12);
  padding: 16px 16px 14px; position: relative; overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 70%);
  pointer-events: none;
}
.hero-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted2); text-transform: uppercase; margin-bottom: 5px; }
.hero-balance-row { display: flex; align-items: center; gap: 8px; }
.hero-balance { font-family: "Sora", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: #f1f5f9; flex: 1; transition: 0.2s; }
.balance-hidden { color: transparent !important; text-shadow: 0 0 14px rgba(255,255,255,0.2); }
.arrow-ghost {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: var(--muted2);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.08); transition: 0.18s;
}
.hero-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.hero-chip { display: flex; align-items: center; gap: 5px; font-family: "Sora", sans-serif; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.hero-chip.green-chip  { background: rgba(16,185,129,0.15);  color: #10b981; }
.hero-chip.red-chip    { background: rgba(244,63,94,0.15);   color: #f43f5e; }
.hero-chip.yellow-chip { background: rgba(245,158,11,0.15);  color: #f59e0b; }

/* ── BOTTOM TABS (center FAB) ── */
.bottom-tabs {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 66px; background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  align-items: center;
  padding: 0 4px calc(0px + env(safe-area-inset-bottom));
  z-index: 60; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.bottom-tabs button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-radius: var(--r); color: var(--muted);
  transition: color 0.18s; padding: 4px 2px; height: 100%;
  position: relative;
}
.bottom-tabs button span { font-size: 10px; font-weight: 600; }
.bottom-tabs button.active { color: var(--primary-light); }
.bottom-tabs button.active svg { filter: drop-shadow(0 0 5px rgba(139,92,246,0.5)); }
.nav-fab-slot { display: flex; align-items: center; justify-content: center; height: 100%; }
.nav-fab {
  width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(145deg, #9333ea, #7c3aed 45%, #6d28d9);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(124,58,237,0.65), 0 0 0 2px rgba(167,139,250,0.25);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
  border: none; cursor: pointer; margin-bottom: 8px;
}
.nav-fab:hover { transform: scale(1.08); }
.nav-fab:active { transform: scale(0.93) !important; }

/* ── FAB ── */
.fab {
  position: fixed;
  right: 16px;
  bottom: 80px;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #fff;
  z-index: 70;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(109,40,217,0.45), 0 0 0 1px rgba(139,92,246,0.2);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
.fab:hover { transform: scale(1.06); box-shadow: 0 10px 28px rgba(109,40,217,0.55); }
.fab:active { transform: scale(0.95) !important; }

.fab-menu {
  position: fixed;
  right: 16px;
  bottom: 78px;   /* just above the new nav */
  z-index: 80;
  display: grid !important;  /* override the hide-all rule */
  gap: 10px;
  animation: fabMenuIn 0.25s cubic-bezier(0.34,1.2,0.64,1);
}
.fab-menu.hidden { display: none !important; }
@keyframes fabMenuIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

.fab-menu button {
  display: grid;
  grid-template-columns: 1fr 58px;
  align-items: center;
  gap: 10px;
  background: transparent;
}
.fab-menu b {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.fab-menu span {
  width: 58px; height: 58px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 899px) {
  .fab-menu {
    left: 16px;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    max-width: 390px;
    margin: 0 auto;
    padding: 10px;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 24px;
    background:
      radial-gradient(circle at 50% 100%, rgba(124,58,237,0.25), transparent 62%),
      rgba(7,10,26,0.96);
    border: 1px solid rgba(148,163,184,0.16);
    box-shadow: 0 24px 60px rgba(0,0,0,0.58), 0 0 0 1px rgba(139,92,246,0.12);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }
  .fab-menu::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(3,6,18,0.16), rgba(3,6,18,0.42));
    pointer-events: none;
    z-index: -1;
  }
  .fab-menu button {
    min-height: 64px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(30,41,59,0.84), rgba(15,23,42,0.98)),
      rgba(15,23,42,0.94);
    border: 1px solid rgba(148,163,184,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 20px rgba(0,0,0,0.18);
    position: relative;
    overflow: hidden;
  }
  .fab-menu b {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
    color: #f8fafc;
    font-size: 13px;
    line-height: 1.18;
    letter-spacing: -0.01em;
  }
  .fab-menu span {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124,58,237,0.28), rgba(15,23,42,0.96));
    border-color: rgba(167,139,250,0.24);
    box-shadow: none;
  }
  .fab-menu button.plan-locked {
    opacity: 1;
    padding-top: 18px;
    padding-right: 10px;
  }
  #fabMenu button.plan-locked::after {
    top: 6px;
    right: 8px;
    transform: none;
    font-size: 8px;
    padding: 1px 6px;
  }
}

/* ── PAGES ── */
.page {
  padding: 10px 12px;
  animation: pageIn 0.28s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Quick strip */
.quick-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.quick-strip::-webkit-scrollbar { display: none; }

.quick-strip button {
  flex-shrink: 0;
  min-width: 110px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, background 0.2s;
}
.quick-strip button svg { color: var(--primary-light); }
.quick-strip button:hover { border-color: var(--border-active); background: var(--surface3); }

/* Review card */
.review-card, .panel-card, .projection-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.review-card {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 10px;
  align-items: center;
}
.review-card h3, .panel-card h3, .projection-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.review-card p { color: var(--muted2); font-size: 11px; }

/* Category grid */
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.cat-tile {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  min-height: 80px;
  transition: border-color 0.2s;
}
.cat-tile:hover { border-color: rgba(255,255,255,0.1); }
.cat-tile .emoji { font-size: 18px; }
.cat-tile strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.cat-tile span { color: var(--muted); font-size: 11px; font-weight: 500; }

/* Wallet totalizador */
.wallet-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  margin-bottom: 8px;
  min-height: 44px;
}
.wallet-total span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.wallet-total strong {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wallet-total-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.wallet-plan-note {
  display: block;
  width: 100%;
  margin-top: 4px;
  color: var(--muted2);
  font-size: 11px;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
}

.plan-ad {
  margin: 0 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}
.plan-ad-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  padding: 8px 12px 6px;
}
.plan-ad-content {
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 6px 10px 10px;
}
.plan-ad-fallback {
  width: 100%;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  color: var(--muted2);
  font-size: 12px;
  text-align: center;
  padding: 14px 10px;
}

/* Wallet tools */
.tools-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 10px;
  scrollbar-width: none;
  padding-bottom: 2px;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  align-items: center;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 82px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted2);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  transition: 0.18s;
}
.filter-row button.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(109,40,217,0.3);
}

/* Transaction list */
.tx-list { display: grid; gap: 6px; max-height: calc(100dvh - 290px); overflow: auto; padding-bottom: 8px; }

/* Category group */
.cat-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cat-head {
  width: 100%;
  background: var(--surface2);
  color: var(--text);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.cat-head small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; font-family: 'DM Sans', sans-serif; }
.cat-body { display: grid; gap: 5px; padding: 8px; }
.cat-group.closed .cat-body { display: none; }

/* ── SINGLE-LINE TRANSACTION ITEM ── */
.tx-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--r);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: border-color 0.18s;
  cursor: pointer;
}
.tx-item.receita  { border-left-color: var(--green); }
.tx-item.despesa  { border-left-color: var(--red);   }
.tx-item.investido{ border-left-color: var(--blue);  }
.tx-item.paid     { opacity: 0.6; }

.check {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--surface3);
  color: var(--green);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 11px;
  transition: 0.18s;
  flex-shrink: 0;
}
.check.on { background: var(--green-dim); border-color: var(--green); }

/* Middle column: description + meta on ONE line */
.tx-mid { min-width: 0; overflow: hidden; }
.tx-title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-meta {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
}
/* Hide pill tags — show only raw text */
.tag {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 10px;
  color: var(--muted2);
}
.tag + .tag::before { content: '·'; margin-right: 4px; }

/* Right column: value */
.tx-value {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Actions: hidden by default, shown when item is expanded */
.tx-actions {
  display: none;
  grid-column: 2 / 4;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.tx-item.expanded { align-items: start; }
.tx-item.expanded .tx-actions { display: flex; }
.tx-actions button {
  border-radius: var(--r-sm);
  background: var(--surface3);
  color: var(--muted2);
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.tx-actions .danger { color: #fca5a5; }

/* Bars */
.bars { display: grid; gap: 12px; }
.bar-line { display: grid; grid-template-columns: 100px 1fr 80px; gap: 10px; align-items: center; }
.bar-line b { font-size: 13px; font-weight: 600; }
.bar { height: 8px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--green)); border-radius: 999px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* Projection */
.projection-card strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 6px 0;
}
.projection-card p { color: var(--muted2); font-size: 12px; }

/* Profile */
.profile-card { max-width: 720px; display: grid; gap: 8px; }
.profile-card .btn { width: 100%; margin-top: 2px; }
.profile-card .btn-primary  { height: 50px; font-size: 15px; border-radius: var(--r-lg); }
.profile-card .btn-secondary { height: 44px; font-size: 13px; border-radius: var(--r-lg); }

.profile-photo-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.big-avatar {
  width: 96px; height: 96px;
  border-radius: 26px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}
.change-photo {
  background: var(--surface2);
  border: 1px solid var(--border-active);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.change-photo:hover { background: var(--primary-dim); }
.admin-link { display: block; color: var(--primary-light); font-weight: 700; margin-top: 14px; text-decoration: none; font-size: 14px; }

/* ── SHEETS (MODALS) ── */
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: bgIn 0.2s ease;
  overscroll-behavior: contain;
  touch-action: none;
}
@keyframes bgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 18px;
  max-height: 92dvh;
  overflow-y: auto;
  animation: sheetUp 0.3s cubic-bezier(0.34,1.1,0.64,1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0.7; }
  to   { transform: none; opacity: 1; }
}

.small-sheet { max-width: 520px; margin: 0 auto; }
.sheet-handle {
  width: 44px; height: 4px;
  background: var(--surface3);
  border-radius: 999px;
  margin: 0 auto 18px;
}
.sheet h3 {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.plan-locked {
  position: relative;
  opacity: 0.9;
}
#fabMenu button.plan-locked::after,
[data-go].plan-locked::after {
  content: "Upgrade";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #c4b5fd;
  background: rgba(124,58,237,0.22);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 999px;
  padding: 2px 7px;
  pointer-events: none;
}
.sidebar-btn .upgrade-badge,
.ol-nav-btn .ol-upgrade-badge {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ddd6fe;
  background: rgba(124,58,237,0.34);
  border: 1px solid rgba(139,92,246,0.58);
  border-radius: 999px;
  padding: 2px 7px;
  pointer-events: none;
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.08);
}
.sidebar-btn.plan-locked,
.ol-nav-btn.plan-locked {
  min-height: 44px;
  background: rgba(255,255,255,0.012);
  border: 1px solid transparent;
  color: #6f7d94;
}
.sidebar-btn.plan-locked:hover,
.sidebar-btn.plan-locked.active,
.ol-nav-btn.plan-locked:hover,
.ol-nav-btn.plan-locked.active {
  background: rgba(124,58,237,0.18);
  border-color: rgba(139,92,246,0.22);
  color: #a78bfa;
}

.bottom-tabs button.plan-locked {
  opacity: 0.55;
  color: #64748b;
}
.bottom-tabs button.plan-locked::after {
  content: "PRO";
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #ddd6fe;
  background: rgba(124,58,237,.35);
  border: 1px solid rgba(139,92,246,.48);
  border-radius: 999px;
  padding: 1px 4px;
  pointer-events: none;
}

/* Plan cards */
.plan-sheet {
  max-height: calc(100dvh - max(18px, env(safe-area-inset-top)));
  overflow-y: auto;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.plan-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface2);
}
.plan-card-highlight { border-color: var(--primary); background: rgba(109,40,217,0.08); }
.plan-card-ultra { border-color: #4f46e5; background: rgba(79,70,229,0.08); }
.plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.plan-card-name { font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.plan-name-en { font-weight: 400; color: var(--muted2); font-size: 14px; }
.plan-card-price { font-size: 20px; font-weight: 800; }
.plan-per-month { font-size: 13px; font-weight: 400; color: var(--muted2); }
.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted2);
}
.plan-feature-list li.ok { color: var(--text); }
.plan-subscribe-btn { width: 100%; }
.plan-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
}
.plan-pill.free { background: var(--surface2); color: var(--muted2); border: 1px solid var(--border); }
.plan-pill.pro { background: linear-gradient(135deg,#7c3aed,#4f46e5); }
.profile-plan-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-plan-info { display: flex; flex-direction: column; gap: 3px; }
.profile-plan-info small { font-size: 11px; color: var(--muted2); }
.profile-integration-card {
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 12px;
  border: 1px solid rgba(124,58,237,.28);
  border-radius: 12px;
  background: rgba(18,24,44,.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-integration-card small {
  display: block;
  color: var(--muted2);
  font-size: 12px;
  margin-top: 4px;
}
#alexaLinkCode {
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: .04em;
}
.profile-integration-card .btn {
  width: auto !important;
  min-width: 220px;
  height: 44px;
  padding: 0 16px;
}
@media (max-width: 860px) {
  .profile-integration-card {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-integration-card .btn {
    min-width: 0;
    width: 100% !important;
  }
}

/* Renewal banner */
.renewal-banner {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #92400e, #b45309);
  color: #fef3c7;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-width: calc(100vw - 32px);
  width: max-content;
}
.renewal-banner.hidden { display: none; }
.renewal-banner-btn {
  background: #fef3c7;
  color: #92400e;
  border: none;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.renewal-banner-close {
  background: none;
  border: none;
  color: #fef3c7;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}
@media (min-width: 768px) {
  .renewal-banner { bottom: 24px; }
}

/* Settings items */
.setting-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  margin: 8px 0;
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.18s, border-color 0.18s;
}
.setting-item:hover { background: var(--surface3); border-color: rgba(255,255,255,0.1); }

.setting-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--primary-dim);
  display: grid;
  place-items: center;
  color: var(--primary-light);
  flex-shrink: 0;
}
.danger-icon {
  background: var(--red-dim);
  color: var(--red);
}
.chevron { margin-left: auto; color: var(--muted); }
.danger-text { color: #fca5a5 !important; }

/* Misc */
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  font-size: 14px;
}

.mini-bars { display: grid; gap: 5px; }
.mini-bars span { height: 8px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.mini-bars i { display: block; height: 100%; background: var(--primary-light); border-radius: 999px; }

.loading { opacity: 0.6; pointer-events: none; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 760px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .tools-row { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
  .app-header { padding-top: 14px; }
  .review-card { grid-template-columns: 1fr; }
  .bar-line { grid-template-columns: 80px 1fr; }
  .bar-line span { display: none; }
  .page { padding-bottom: 100px; }
  .tx-list { max-height: none; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .app { width: 100%; }
  .bottom-tabs {
    left: 50%;
    transform: translateX(-50%);
    max-width: 520px;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .fab { right: calc(50% - 560px + 20px); }
}

/* ══════════════════════════════════════════════
   DASHBOARD PAGE
   ══════════════════════════════════════════════ */
.dash-hero {
  background: linear-gradient(135deg, #0f1535, #1a1040);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%);
  pointer-events: none;
}
.dash-lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 10px;
}
.dash-balance {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.balance-pos { color: #f1f5f9; }
.balance-neg { color: var(--red); }
.dash-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.green-chip { background: var(--green-dim); color: var(--green); }
.red-chip   { background: var(--red-dim);   color: var(--red);   }
.inv-chip   { background: var(--primary-dim); color: var(--primary-light); }

.dash-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
}
.dash-stat > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.dash-stat > strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.dash-mini-bar {
  height: 5px;
  background: var(--surface3);
  border-radius: 999px;
  overflow: hidden;
}
.dash-mini-bar > div {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* Month comparison */
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.compare-item {
  text-align: center;
}
.compare-item > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.compare-item > strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.compare-item > small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.compare-div {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Recent list */
.recent-list { display: grid; gap: 10px; margin-top: 4px; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.recent-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tp-receita  { background: var(--green); }
.tp-receber  { background: #3b82f6; }
.tp-despesa  { background: var(--red); }
.tp-investido{ background: var(--primary-light); }
.recent-info { flex: 1; min-width: 0; }
.recent-info > span { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-info > small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ══════════════════════════════════════════════
   INVESTMENT PAGE
   ══════════════════════════════════════════════ */
.inv-hero {
  background: linear-gradient(135deg, #0b1a20, #0f2218);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.inv-hero::before {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(16,185,129,0.15), transparent 70%);
  pointer-events: none;
}
.inv-stat { flex: 1; }
.inv-stat > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 8px;
}
.inv-stat > strong {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.inv-vdiv {
  width: 1px;
  height: 48px;
  background: rgba(16,185,129,0.2);
  flex-shrink: 0;
}

/* Investment list */
.inv-list { display: grid; gap: 10px; }
.inv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--r);
}
.inv-icon {
  font-size: 22px;
  width: 38px;
  text-align: center;
  flex-shrink: 0;
}
.inv-info { flex: 1; min-width: 0; }
.inv-info > span { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-info > small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.inv-actions { display: flex; gap: 6px; margin-top: 5px; }
.inv-actions button {
  border-radius: var(--r-sm);
  background: var(--surface3);
  color: var(--muted2);
  padding: 5px 9px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.inv-actions .danger { color: #fca5a5; }

.investment-extra {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.investment-note {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.18);
  color: var(--text2);
  border-radius: var(--r);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.45;
}
.selic-card,
.selected-bank-card,
.selected-asset-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
}
.selic-card b,
.selected-bank-card b,
.selected-asset-card b { display: block; font-size: 13px; }
.selic-card span,
.selected-bank-card span,
.selected-asset-card span { display: block; color: var(--muted2); font-size: 12px; margin-top: 3px; }
.bank-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}
.bank-btn,
.asset-result {
  min-width: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}
.bank-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 6px;
}
.bank-btn img,
.selected-bank-card img,
.asset-result img,
.selected-asset-card img,
.inv-logo img,
.inv-tx-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.bank-btn span {
  width: 100%;
  color: var(--muted2);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bank-btn.active {
  border-color: var(--bank, var(--primary-light));
  background: color-mix(in srgb, var(--bank, var(--primary-light)) 18%, transparent);
}
.selected-bank-card,
.selected-asset-card,
.asset-result {
  display: flex;
  align-items: center;
  gap: 10px;
}
.selected-bank-card { min-height: 54px; }
.asset-search-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  margin-top: -6px;
}
.asset-results {
  display: grid;
  gap: 7px;
  max-height: 255px;
  overflow: auto;
}
.asset-result {
  width: 100%;
  padding: 10px;
  text-align: left;
}
.asset-result div,
.asset-selected-main div { min-width: 0; flex: 1; }
.asset-result b,
.asset-selected-main b {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-result span,
.asset-selected-main span {
  display: block;
  color: var(--muted2);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-result small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-left: auto;
}
.asset-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-dim);
  color: var(--primary-light);
}
.asset-selected-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.asset-selected-price { text-align: right; }

.inv-hero-pro { gap: 12px; }
.inv-hero-pro .inv-stat > strong small {
  font-size: 12px;
  color: inherit;
  margin-left: 4px;
}
.inv-refresh-btn {
  align-self: stretch;
  border-radius: var(--r);
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.24);
  color: var(--green);
  font-weight: 800;
  padding: 0 14px;
}
.inv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.inv-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 13px;
}
.inv-kpi span,
.inv-panel-head span,
.inv-source-list span {
  color: var(--muted2);
  font-size: 11px;
  font-weight: 700;
}
.inv-kpi b {
  display: block;
  margin-top: 5px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
}
.investment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 12px;
  margin: 14px 0;
}
.inv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.inv-panel-head h3 { margin: 0; }
.inv-source-list {
  display: grid;
  gap: 8px;
}
.inv-source-list span {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
}
.inv-position { align-items: flex-start; }
.inv-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface3);
  overflow: hidden;
}
.inv-values {
  min-width: 118px;
  text-align: right;
}
.inv-values > strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
}
.inv-values > small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
}
.inv-empty-pro {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}
.inv-empty-pro b {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
}
.inv-empty-pro p {
  max-width: 480px;
  color: var(--muted2);
  line-height: 1.5;
}
.inv-tx-logo {
  border: 1px solid var(--border);
  background: var(--surface3);
}

/* ══ STREAMING PICKER ══ */
.streaming-hint {
  font-size: 11px;
  color: var(--muted2);
  font-weight: 600;
  margin-bottom: 8px;
}
.streaming-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.streaming-grid::-webkit-scrollbar { display: none; }
.stream-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.stream-btn img { object-fit: contain; }
.stream-btn small {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted2);
  text-align: center;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-btn.active {
  border-color: var(--sc, var(--primary));
  background: color-mix(in srgb, var(--sc, var(--primary)) 18%, transparent);
}
.stream-btn:active { transform: scale(0.95); }

/* Streaming logo in tx list */
.tx-stream-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══ HOME PAGE — NEW COMPONENTS ══ */

/* Income/Expense row */
.income-expense-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ie-card {
  border-radius: var(--r-lg);
  padding: 14px;
}
.ie-card.ie-green { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); }
.ie-card.ie-red   { background: rgba(244,63,94,0.10);  border: 1px solid rgba(244,63,94,0.22); }
.ie-card span { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.ie-card.ie-green span { color: #10b981; }
.ie-card.ie-red   span { color: #f43f5e; }
.ie-card strong { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.ie-card.ie-green strong { color: #f1f5f9; }
.ie-card.ie-red   strong { color: #f1f5f9; }

/* Chart card */
.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-header span { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chart-legend { display: flex; gap: 10px; }
.chart-legend .leg { font-size: 11px; font-weight: 600; color: var(--muted2); }
.chart-legend .leg.green { color: #10b981; }
.chart-legend .leg.red   { color: #f43f5e; }

/* AI Insight card */
.insight-card {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.insight-card p { font-size: 12px; line-height: 1.55; color: var(--text2); flex: 1; }

/* Remove old fixed FAB — now embedded in nav */
.fab { display: none !important; }


/* v50 - Calendário financeiro e Assistente Oliver */
.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.panel-title-row h3{margin:0}.panel-title-row button{border:0;background:rgba(139,92,246,.18);color:#c4b5fd;border-radius:999px;padding:8px 12px;font-weight:800}.muted-pill{font-size:12px;color:#a5b4fc;background:rgba(99,102,241,.14);border:1px solid rgba(129,140,248,.25);border-radius:999px;padding:6px 10px}.muted-text{color:#94a3b8;font-size:13px;margin:0 0 14px}.calendar-weekdays,.finance-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.calendar-weekdays span{text-align:center;color:#64748b;font-size:11px;font-weight:800}.cal-day{min-height:58px;background:rgba(15,23,42,.82);border:1px solid rgba(148,163,184,.12);border-radius:14px;color:#e5e7eb;display:flex;flex-direction:column;gap:2px;align-items:flex-start;justify-content:space-between;padding:8px;cursor:pointer}.cal-day.ghost{opacity:0;pointer-events:none}.cal-day b{font-size:13px}.cal-day span{font-size:10px;color:#94a3b8}.cal-day i{display:flex;gap:3px;height:6px}.cal-day .dot{width:6px;height:6px;border-radius:50%;display:inline-block}.dot.in{background:#10b981}.dot.out{background:#ef4444}.cal-day.today{outline:2px solid rgba(139,92,246,.55)}.cal-day.selected{background:linear-gradient(135deg,rgba(109,40,217,.45),rgba(15,23,42,.95));border-color:#8b5cf6}.upcoming-card{margin-top:12px}.upcoming-list{display:flex;flex-direction:column;gap:10px}.upcoming-item{display:flex;justify-content:space-between;gap:12px;padding:12px;border-radius:16px;background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.10)}.upcoming-item b,.upcoming-item strong{display:block}.upcoming-item small,.upcoming-item span{color:#94a3b8;font-size:12px}.upcoming-item.soon{border-color:rgba(245,158,11,.45)}.upcoming-item.late{border-color:rgba(239,68,68,.55)}.day-list{display:flex;flex-direction:column;gap:10px}.empty.mini{padding:14px;font-size:13px}.assistant-hero{display:flex;gap:14px;align-items:center;padding:18px;margin-bottom:14px;border-radius:24px;background:linear-gradient(135deg,rgba(109,40,217,.30),rgba(16,185,129,.12));border:1px solid rgba(167,139,250,.22)}.assistant-avatar{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,#7c3aed,#10b981);display:grid;place-items:center;font-size:22px;font-weight:900;box-shadow:0 10px 24px rgba(124,58,237,.30)}.assistant-hero h3{margin:0 0 4px}.assistant-hero p{margin:0;color:#cbd5e1;font-size:13px}.assistant-insights{display:flex;flex-direction:column;gap:10px}.ai-tip{padding:12px;border-radius:16px;background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.10);color:#e5e7eb;font-size:13px;line-height:1.45}.chat-box{max-height:260px;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:4px;margin-bottom:12px}.chat-msg{padding:12px 14px;border-radius:16px;font-size:13px;line-height:1.45;max-width:88%}.chat-msg.bot{background:rgba(99,102,241,.16);border:1px solid rgba(129,140,248,.18);align-self:flex-start}.chat-msg.user{background:linear-gradient(135deg,#6d28d9,#8b5cf6);align-self:flex-end}.chat-input-row{display:flex;gap:8px}.chat-input-row input{flex:1}.chat-input-row button{border:0;border-radius:14px;padding:0 16px;background:#8b5cf6;color:white;font-weight:800}.chat-suggestions{display:flex;gap:8px;overflow:auto;margin-top:10px;padding-bottom:4px}.chat-suggestions button{white-space:nowrap;border:1px solid rgba(167,139,250,.24);background:rgba(139,92,246,.12);color:#c4b5fd;border-radius:999px;padding:9px 12px;font-weight:800;font-size:12px}


/* Production visible version badge */
.version-badge{position:fixed;top:8px;right:8px;z-index:10000;background:linear-gradient(135deg,#7c3aed,#10b981);color:#fff;font:700 11px/1 'DM Sans',system-ui,sans-serif;padding:6px 10px;border-radius:999px;box-shadow:0 10px 22px rgba(0,0,0,.28);letter-spacing:.04em;}
@media(max-width:480px){.version-badge{top:6px;right:6px;font-size:10px;padding:5px 8px;}}


/* v57 ajustes solicitados */
.version-badge{display:none!important}
.subpage-header{display:flex;align-items:center;gap:12px;margin:8px 0 14px;padding:0 4px}
.subpage-header h2{font-family:var(--font-title);font-size:20px;margin:0;color:var(--text)}
.back-btn{height:38px;padding:0 14px;border-radius:14px;border:1px solid var(--border);background:var(--surface2);color:var(--text);font-weight:800;transition:.18s}
.back-btn:active{transform:scale(.97)}
@media(max-width:560px){.bottom-tabs{gap:0}.bottom-tabs button span{font-size:9px}.subpage-header{padding:0 14px}}

@media(max-width:560px){
  .filter-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    justify-content: stretch;
  }
  .filter-row button {
    min-width: 0;
    width: 100%;
    padding: 7px 3px;
    font-size: 10px;
    line-height: 1.1;
  }
}

/* ══════════════════════════════════════════
   APP SHELL — SIDEBAR + RESPONSIVE
   ══════════════════════════════════════════ */

.app-shell {
  display: flex;
  min-height: 100dvh;
}
.app-shell.hidden { display: none !important; }

/* ── SIDEBAR ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0c1220;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-brand span {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.brand-mark { overflow: visible; filter: drop-shadow(0 0 0 rgba(124,58,237,0)); animation: brandMarkPulse 5s ease-in-out infinite; }
.brand-mark-bg { animation: brandBgGlow 5s ease-in-out infinite; transform-origin: 50% 50%; }
.brand-mark-line {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: brandLineDraw 5s cubic-bezier(0.4,0,0.2,1) infinite;
}
.brand-mark-dot { animation: brandDotPop 5s ease-in-out infinite; transform-origin: 50% 50%; }
.brand-name-animated { display: inline-flex; align-items: center; }
.brand-name-animated span {
  display: inline-block;
  opacity: 0.55;
  transform: translateY(0);
  animation: brandCharWave 5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.05s);
}
.brand-name-animated .brand-space { width: 0.42em; }
@keyframes brandLineDraw {
  0%, 76%, 100% { stroke-dashoffset: 36; opacity: 0.9; }
  16%, 56% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes brandBgGlow {
  0%, 76%, 100% { filter: brightness(1); }
  22%, 50% { filter: brightness(1.12); }
}
@keyframes brandDotPop {
  0%, 76%, 100% { transform: scale(0.9); opacity: 0.8; }
  24%, 46% { transform: scale(1.15); opacity: 1; }
}
@keyframes brandMarkPulse {
  0%, 76%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0 rgba(124,58,237,0)); }
  26%, 48% { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 0 10px rgba(124,58,237,0.42)); }
}
@keyframes brandCharWave {
  0%, 68%, 100% { opacity: 0.58; transform: translateY(0); text-shadow: 0 0 0 rgba(139,92,246,0); color: #f1f5f9; }
  18% { opacity: 1; transform: translateY(-1px); text-shadow: 0 0 10px rgba(139,92,246,0.42); color: #ffffff; }
  30% { opacity: 0.9; transform: translateY(0); color: #e9d5ff; }
}

.sidebar-nav,
.ol-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar,
.ol-nav::-webkit-scrollbar { display: none; }

.sidebar-btn,
.ol-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.18s, background 0.18s;
  width: 100%;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  user-select: none;
}
.sidebar-btn,
.sidebar-btn:active,
.ol-nav-btn,
.ol-nav-btn:active {
  transform: none !important;
}
.sidebar-btn svg,
.ol-nav-btn svg {
  flex: 0 0 auto;
  pointer-events: none;
}
.sidebar-btn .sidebar-label,
.ol-nav-btn .ol-nav-label {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.25;
  color: inherit !important;
}
.sidebar-btn:hover,
.ol-nav-btn:hover { color: #cbd5e1; background: rgba(255,255,255,0.04); }
.sidebar-btn.active,
.ol-nav-btn.active {
  background: rgba(124,58,237,0.14);
  color: #a78bfa;
}
.sidebar-btn.active svg,
.ol-nav-btn.active svg { filter: drop-shadow(0 0 4px rgba(139,92,246,0.5)); }

.sidebar-badge,
.ol-nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.25);
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg,#6d28d9,#8b5cf6);
  display: grid; place-items: center;
  overflow: hidden; flex-shrink: 0;
}
.sidebar-avatar img { width:100%;height:100%;object-fit:cover; }
#sidebarName {
  font-size: 13px; font-weight: 600; color: #94a3b8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-settings-btn { color: #64748b; }
.sidebar-version {
  display: block;
  padding: 2px 12px 0;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0;
}
.sidebar-version-download {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ddd6fe;
  background: rgba(124,58,237,0.24);
  border: 1px solid rgba(139,92,246,0.38);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  vertical-align: middle;
}
.sidebar-version-download:hover {
  color: #fff;
  background: rgba(124,58,237,0.38);
}
.icon-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
}
.notif-subtitle {
  color: var(--muted2);
  font-size: 12px;
  margin: 0 0 10px;
}
.notif-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}
.notif-action-btn {
  border: 1px solid rgba(124,58,237,0.45);
  background: rgba(124,58,237,0.14);
  color: #ddd6fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(46vh, 360px);
  overflow: auto;
}
.notif-item {
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15,23,42,0.45);
}
.notif-item strong {
  display: block;
  color: #e2e8f0;
  font-size: 13px;
  margin-bottom: 2px;
}
.notif-item small {
  color: #94a3b8;
  font-size: 12px;
}
.notif-item.unread {
  border-color: rgba(139,92,246,0.5);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.25) inset;
}
.notif-item.overdue {
  border-color: rgba(239,68,68,0.45);
  background: rgba(127,29,29,0.2);
}
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.notif-read-btn {
  border: 1px solid rgba(148,163,184,0.35);
  background: transparent;
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.cap-native .sidebar-brand {
  padding-top: max(10px, env(safe-area-inset-top));
}
.sidebar-btn.plan-locked .sidebar-badge,
.ol-nav-btn.plan-locked .ol-nav-badge {
  display: none;
}
.cap-native .sidebar-footer {
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.cap-native .sidebar-settings-btn {
  margin-bottom: 0;
}

/* Main content shifts right when sidebar visible */
.app {
  flex: 1;
  min-width: 0;
}

/* Mobile: sidebar off screen */
@media (max-width: 899px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
    z-index: 1000;
    touch-action: pan-y;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 990;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
    pointer-events: auto;
    touch-action: none;
  }
  @keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
  .bottom-tabs { display: grid !important; }
  .menu-toggle { display: flex !important; }
  .app-header { padding: 10px 14px; }
}

/* Desktop: sidebar always visible */
@media (min-width: 900px) {
  .app-shell { padding-left: 240px; }
  .sidebar { transform: translateX(0) !important; }
  .bottom-tabs { display: none !important; }
  .menu-toggle { display: none !important; }
  .app-header { padding: 14px 24px; }
  .page { padding: 16px 24px 32px; }
  .month-pills-row { padding: 8px 24px; }
  .hero-card { padding: 20px 24px 18px; }
  .hero-balance { font-size: 38px; }
  .income-expense-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .chart-card { padding: 18px; }
  .ie-card strong { font-size: 22px; }
}

/* Very large screens */
@media (min-width: 1280px) {
  .app-shell { padding-left: 260px; }
  .sidebar { width: 260px; }

}

/* Menu toggle button */
.menu-toggle {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}

/* ══════════════════════════════════════════
   CALENDAR — IMPROVED
   ══════════════════════════════════════════ */

.cal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 14px;
}
.cal-top-bar h2 {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 700;
  color: #f1f5f9;
}
.cal-nav-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  font-size: 20px; font-weight: 700;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.cal-nav-btn:hover { background: rgba(124,58,237,0.15); color: #a78bfa; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 11px; font-weight: 800;
  color: #475569;
  padding: 6px 0;
}

.finance-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.cal-day {
  aspect-ratio: 1;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(148,163,184,0.08);
  border-radius: 10px;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 52px;
  position: relative;
}
.cal-day:hover { background: rgba(124,58,237,0.1); border-color: rgba(139,92,246,0.3); }
.cal-day.ghost { opacity: 0; pointer-events: none; }
.cal-day b { font-size: 13px; font-weight: 700; }
.cal-day span { font-size: 9px; color: #64748b; white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
.cal-day i { display: flex; gap: 3px; align-items: center; height: 6px; }
.cal-day .dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot.in  { background: #10b981; }
.dot.out { background: #ef4444; }

.cal-day.today {
  background: rgba(124,58,237,0.12);
  border: 1.5px solid rgba(139,92,246,0.45);
}
.cal-day.today b { color: #a78bfa; }
.cal-day.selected {
  background: linear-gradient(135deg,rgba(109,40,217,0.4),rgba(15,23,42,0.9));
  border-color: #8b5cf6;
}

.cal-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.cal-sum-card {
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(148,163,184,0.08);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.cal-sum-card span { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; margin-bottom: 4px; }
.cal-sum-card strong { font-family:'Sora',sans-serif; font-size: 13px; font-weight: 800; }

/* ══════════════════════════════════════════
   GOALS (METAS)
   ══════════════════════════════════════════ */

.goals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.goals-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; border-radius: 10px; }

.goals-list { display: grid; gap: 14px; }

.goal-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.goal-card-header {
  padding: 20px 20px 16px;
  position: relative;
}
.goal-card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--goal-color, #7c3aed);
  opacity: 0.1;
}
.goal-emoji { font-size: 28px; margin-bottom: 8px; display: block; }
.goal-label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.goal-name { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 800; color: #f1f5f9; margin-bottom: 4px; }
.goal-target-txt { font-size: 12px; color: rgba(255,255,255,0.5); }

.goal-body { padding: 14px 20px 18px; }
.goal-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.goal-progress-label { font-size: 11px; font-weight: 700; color: #64748b; }
.goal-pct { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 800; }
.goal-bar {
  height: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.goal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--goal-color, #7c3aed), #10b981);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.goal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.goal-stat { text-align: center; }
.goal-stat span { display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #475569; margin-bottom: 3px; }
.goal-stat strong { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 800; }
.goal-stat.saved strong { color: #10b981; }
.goal-stat.remaining strong { color: #f1f5f9; }
.goal-stat.deadline strong { color: #f59e0b; }

.goal-insight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 10px;
}
.goal-actions { display: flex; gap: 8px; }
.goal-actions button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #94a3b8;
  cursor: pointer;
  transition: 0.18s;
}
.goal-actions button.add-btn { background: rgba(16,185,129,0.12); color: #10b981; border-color: rgba(16,185,129,0.2); }
.goal-actions button:hover { background: rgba(255,255,255,0.08); }
.goals-empty { text-align: center; padding: 48px 24px; color: #64748b; }
.goals-empty .goals-empty-icon { font-size: 48px; display: block; margin-bottom: 14px; }

/* Add to goal modal */
.add-to-goal-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }

/* ══════════════════════════════════════════
   GEMINI AI
   ══════════════════════════════════════════ */
.ai-badge {
  display: inline-block;
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(59,130,246,0.2));
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.25);
  margin-left: 6px;
  vertical-align: middle;
}
.gemini-setup { margin-bottom: 14px; }
.gemini-setup-card {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 16px;
  padding: 16px;
}
.gemini-setup-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.gemini-setup-card p { font-size: 12px; color: #94a3b8; margin-bottom: 12px; }
.gemini-setup-card a { color: #34d399; }
.gemini-key-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.gemini-change-key {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: #64748b;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}
.chat-msg.bot.thinking { opacity: 0.6; }
.chat-msg.bot.thinking::after { content: '▋'; animation: blink 0.8s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ══ SIDEBAR COLLAPSE ══ */
.sidebar-collapse-btn {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.18s; flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: #94a3b8; background: rgba(255,255,255,0.08); }

/* Collapsed sidebar */
.app-shell.sidebar-collapsed .sidebar { width: 60px; }
.app-shell.sidebar-collapsed { padding-left: 60px; }
.app-shell.sidebar-collapsed .sidebar-brand span,
.app-shell.sidebar-collapsed .sidebar-nav .sidebar-btn > *:not(svg):not(.sidebar-badge):not(.upgrade-badge),
.app-shell.sidebar-collapsed .ol-nav .ol-nav-btn > *:not(svg):not(.ol-nav-badge):not(.ol-upgrade-badge),
.app-shell.sidebar-collapsed .sidebar-badge,
.app-shell.sidebar-collapsed .ol-nav-badge,
.app-shell.sidebar-collapsed #sidebarName,
.app-shell.sidebar-collapsed .sidebar-footer .sidebar-settings-btn span { display: none; }
.app-shell.sidebar-collapsed .sidebar-brand { justify-content: center; }
.app-shell.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .sidebar-btn,
.app-shell.sidebar-collapsed .ol-nav-btn { justify-content: center; padding: 11px; }
.app-shell.sidebar-collapsed .sidebar-user { justify-content: center; padding: 10px 0; }

@media (min-width: 900px) {
  .app-shell.sidebar-collapsed .sidebar-nav .sidebar-btn > .upgrade-badge,
  .app-shell.sidebar-collapsed .ol-nav .ol-nav-btn > .ol-upgrade-badge {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .app-shell.sidebar-collapsed .sidebar.open {
    width: min(286px, 88vw);
  }
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-brand {
    justify-content: flex-start;
  }
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-brand span,
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-nav .sidebar-btn > .sidebar-label,
  .app-shell.sidebar-collapsed .sidebar.open .ol-nav .ol-nav-btn > .ol-nav-label,
  .app-shell.sidebar-collapsed .sidebar.open #sidebarName,
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-footer .sidebar-settings-btn span {
    display: block !important;
  }
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-nav .sidebar-btn,
  .app-shell.sidebar-collapsed .sidebar.open .ol-nav .ol-nav-btn {
    justify-content: flex-start;
    padding: 11px 12px;
  }
  .app-shell.sidebar-collapsed .sidebar.open .sidebar-nav .sidebar-btn > .upgrade-badge,
  .app-shell.sidebar-collapsed .sidebar.open .ol-nav .ol-nav-btn > .ol-upgrade-badge {
    display: inline-flex !important;
  }
}

/* ══ DESKTOP FAB ══ */
.desktop-fab {
  display: none; /* shown only on desktop via media query */
  position: fixed;
  right: 28px; bottom: 32px;
  width: 58px; height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #fff; border: none; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(109,40,217,0.5);
  z-index: 80;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
.desktop-fab:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(109,40,217,0.6); }
.desktop-fab:active { transform: scale(0.94) !important; }

@media (min-width: 900px) {
  .desktop-fab { display: flex; }
  /* fabMenu position on desktop */
  .fab-menu { right: 28px; bottom: 100px; }
}

/* ══ CALENDAR VISIBILITY FIX ══ */
.cal-day b { color: #e2e8f0 !important; font-size: 14px !important; }
.cal-day span { color: #94a3b8 !important; font-size: 10px !important; font-weight: 600 !important; }
.cal-day.today b { color: #a78bfa !important; }
.cal-day.selected b { color: #f1f5f9 !important; }
.cal-day { min-height: 56px !important; }

/* ══ SIDEBAR FILL 100% ══ */
@media (min-width: 900px) {
  .app-shell { min-height: 100vh; }
  .sidebar { height: 100vh; }
  .app { min-height: 100vh; }
  .page { min-height: calc(100vh - 200px); }
  /* Remove sidebar collapse CSS on desktop */
  .sidebar-collapse-btn { display: none !important; }
}

/* ══ REPORTS PAGE ══ */
.report-hero {
  background: linear-gradient(135deg, #0f1535 0%, #1a0a3a 50%, #0c1220 100%);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.report-hero::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
  pointer-events: none;
}
.report-score-ring {
  position: relative;
  flex-shrink: 0;
  transform: rotate(-90deg);
}
.report-score-ring svg { display: block; }
.report-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(90deg);
}
.report-score-inner b { font-family: 'Sora',sans-serif; font-size: 22px; font-weight: 800; line-height: 1; }
.report-score-inner small { font-size: 9px; color: #64748b; font-weight: 700; text-transform: uppercase; }
.report-hero-text h3 { font-family: 'Sora',sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.report-hero-text p { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.report-hero-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.report-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

.report-kpi-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.report-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}
.report-kpi-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.report-kpi span { display: block; font-size: 10px; color: #64748b; font-weight: 600; margin-bottom: 4px; }
.report-kpi b { font-family: 'Sora',sans-serif; font-size: 18px; font-weight: 800; display: block; margin-bottom: 8px; }
.report-kpi-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.report-kpi-bar div { height: 100%; border-radius: 999px; transition: width 0.8s ease; }

.report-compare {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.report-compare-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin-bottom: 14px; }
.report-compare-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.report-compare-item { text-align: center; }
.report-compare-item span { display: block; font-size: 11px; color: #64748b; margin-bottom: 4px; }
.report-compare-item b { display: block; font-family: 'Sora',sans-serif; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.report-compare-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: inline-block; }
.report-compare-badge.up { background: rgba(16,185,129,0.12); color: #10b981; }
.report-compare-badge.down { background: rgba(239,68,68,0.12); color: #ef4444; }

.report-cat-list { display: flex; flex-direction: column; gap: 10px; }
.report-cat-item { display: flex; align-items: center; gap: 12px; }
.report-cat-left { display: flex; align-items: center; gap: 8px; min-width: 120px; font-size: 13px; font-weight: 600; }
.report-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.report-cat-bar-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.report-cat-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.report-cat-bar div { height: 100%; border-radius: 999px; transition: width 0.8s ease; }
.report-cat-bar-wrap span { font-size: 12px; font-weight: 700; min-width: 80px; text-align: right; }

/* ══ GOAL PRESET PICKER ══ */
.goal-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.goal-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 6px;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
}
.goal-preset-btn:hover { border-color: rgba(139,92,246,0.4); transform: translateY(-2px); }
.goal-preset-btn:active { transform: scale(0.95); }
.goal-preset-bg {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.goal-preset-btn small { font-size: 10px; font-weight: 600; color: #94a3b8; }

/* Goal card header solid background (not transparent) */
.goal-card-header {
  padding: 20px 20px 18px;
  position: relative;
  min-height: 100px;
}
/* Override previous transparent bg */
.goal-card-header::before { display: none; }

/* ══ EXPORT BUTTON ══ */
.export-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  color: #10b981; cursor: pointer; transition: 0.18s; flex-shrink: 0;
  font-size: 11px; font-weight: 700;
}
.export-btn:hover { background: rgba(16,185,129,0.18); transform: translateY(-1px); }
.export-btn:active { transform: scale(0.95); }

/* ══ DESKTOP FULL WIDTH FIX ══ */
@media (min-width: 900px) {
  .app-shell { width: 100vw; }
  .app { width: 100%; }
  .page { width: 100%; }
  .hero-card, .month-pills-row, .app-header { width: 100%; }
  /* Investment page full width on desktop */
  .inv-hero { width: 100%; }
}

/* ══ GOAL CARD SCENIC HEADER ══ */
.goal-card-header {
  position: relative;
  overflow: hidden;
  min-height: 130px;
  padding: 20px 20px 18px;
}
.goal-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.goal-emoji, .goal-label, .goal-name, .goal-target-txt {
  position: relative;
  z-index: 1;
}
.goal-emoji { font-size: 30px; display: block; margin-bottom: 8px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.goal-label { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-bottom: 4px; }
.goal-name { font-family: 'Sora',sans-serif; font-size: 24px; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.5); margin-bottom: 4px; }
.goal-target-txt { font-size: 13px; color: rgba(255,255,255,0.6); }

/* Goal card in list of 2 on desktop */
@media (min-width: 900px) {
  .goals-list { grid-template-columns: 1fr 1fr; display: grid; gap: 18px; }
}


/* ─────────────────────────────────────────────
   v59 Ajustes Mateus: desktop compacto + IA + calendário
   ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  /* Transações/Dashboard: gráfico menor para caber próximos vencimentos e ações sem tanto scroll */
  #page-home .chart-card { padding: 14px 16px; margin-bottom: 10px; }
  #page-home .chart-card canvas,
  #evolutionChart { max-height: 220px !important; height: 220px !important; }
  #page-home .income-expense-row { margin-bottom: 10px; }
  #page-home .quick-strip { margin: 8px 0 12px; }
  #page-home .category-grid { margin-top: 8px; }

  /* Wallet/Transações: lista ocupa a altura disponível sem empurrar tudo para baixo */
  #page-wallet .tx-list { max-height: calc(100vh - 360px); overflow: auto; padding-right: 4px; }
  #page-wallet .tools-row,
  #page-wallet .filter-row { margin-bottom: 10px; }

  /* Calendário desktop em duas colunas e mais compacto */
  #page-calendar:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(360px, .85fr);
    gap: 12px;
    align-items: start;
  }
  #page-calendar .cal-top-bar,
  #page-calendar .cal-weekdays,
  #page-calendar .finance-calendar,
  #page-calendar .cal-summary { grid-column: 1; }
  #page-calendar .panel-card { grid-column: 2; margin: 0 0 12px; }
  #page-calendar .cal-day { min-height: 44px; padding: 6px; border-radius: 12px; }
  #page-calendar .finance-calendar { gap: 5px; }
  #page-calendar .day-list,
  #page-calendar .upcoming-list { max-height: 255px; overflow: auto; padding-right: 4px; }

  /* Dashboard/relatório numa experiência só: remove navegação duplicada e mantém nome Dashboard */
  .sidebar-btn[data-page="dashboard"],
  .ol-nav-btn[data-sidebar-page="dashboard"] { display: flex !important; }
}

.ai-badge { white-space: nowrap; }
.gemini-setup-card a { color: #a78bfa; font-weight: 800; }
.chat-msg.thinking::after { content: ' ·'; animation: blinkDots 1s infinite; }
@keyframes blinkDots { 0%,100%{opacity:.2} 50%{opacity:1} }

/* v63 refinements: Assistant, calendar desktop and goal scenes */
.gemini-change-key{display:none!important}
.chat-msg.bot{white-space:pre-line;max-width:72%}
.chat-msg.user{max-width:60%}
@media (min-width:1024px){
  #page-calendar:not(.hidden){
    display:grid!important;
    grid-template-columns:minmax(560px,1fr) minmax(360px,480px);
    grid-auto-rows:auto;
    gap:14px;
    align-items:start;
  }
  #page-calendar .cal-top-bar,
  #page-calendar .cal-weekdays,
  #page-calendar .finance-calendar,
  #page-calendar .cal-summary{grid-column:1}
  #page-calendar .panel-card{grid-column:2;margin:0 0 14px}
  #page-calendar .panel-card:nth-of-type(1){grid-row:1 / span 3}
  #page-calendar .panel-card:nth-of-type(2){grid-row:4 / span 2}
  #page-calendar .finance-calendar{max-height:520px}
  #page-calendar .day-list{max-height:310px;overflow:auto;padding-right:6px}
  #page-calendar .upcoming-list{max-height:360px;overflow:auto;padding-right:6px}
}
.goal-card-header{background-size:cover!important;background-position:center!important;min-height:160px!important}
.goal-card-overlay{background:linear-gradient(90deg,rgba(2,6,23,.82),rgba(15,23,42,.52),rgba(2,6,23,.12))!important}
.goal-name{max-width:70%}
@media (max-width:700px){.chat-msg.bot,.chat-msg.user{max-width:88%}.goal-card-header{min-height:138px!important}.goal-name{max-width:100%}}

/* v64 fixes: assistant, calendar desktop, Google login UX */
@media (min-width:1024px){
  #page-calendar:not(.hidden){
    display:grid!important;
    grid-template-columns:minmax(620px, 1fr) minmax(380px, 520px);
    gap:18px;
    align-items:start;
  }
  #page-calendar .cal-top-bar,
  #page-calendar .cal-weekdays,
  #page-calendar .finance-calendar,
  #page-calendar .cal-summary{grid-column:1!important;}
  #page-calendar .panel-card{grid-column:2!important;margin:0 0 14px!important;}
  #page-calendar .panel-card:nth-of-type(1){grid-row:1 / span 3!important;}
  #page-calendar .panel-card:nth-of-type(2){grid-row:4 / span 2!important;}
  #page-calendar .finance-calendar{
    gap:6px!important;
    max-height:none!important;
    margin-bottom:10px!important;
  }
  #page-calendar .cal-day{
    aspect-ratio:auto!important;
    min-height:68px!important;
    height:68px!important;
    padding:7px!important;
    border-radius:13px!important;
  }
  #page-calendar .cal-summary{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:10px!important;
    margin-top:8px!important;
  }
  #page-calendar .day-list{max-height:320px!important;overflow:auto!important;padding-right:6px!important;}
  #page-calendar .upcoming-list{max-height:365px!important;overflow:auto!important;padding-right:6px!important;}
}
.chat-box{scroll-behavior:smooth;}
.chat-msg.bot{white-space:pre-line!important;line-height:1.55!important;}
.chat-msg.thinking{opacity:.8;}
.chat-msg.rich{
  max-width:96%!important;
  white-space:normal!important;
  padding:14px;
}
.chat-rich-text{
  white-space:normal;
  line-height:1.58;
  margin-bottom:12px;
}
.chat-artifact{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.14);
  background:rgba(15,23,42,.55);
}
.chat-artifact h4{
  margin:0 0 10px;
  font-size:12px;
  color:#e5e7eb;
  letter-spacing:0;
}
.chat-artifact.chart{
  min-height:0;
}
.chat-artifact.chart canvas{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  display:block;
}
.chat-chart-stage{
  position:relative;
  width:100%;
  height:280px;
  max-height:280px;
}
.chat-chart-stage.is-circle{
  height:320px;
  max-width:560px;
  margin:0 auto;
}
.chat-table-wrap{
  width:100%;
  overflow:auto;
}
.chat-table-wrap table{
  width:100%;
  border-collapse:collapse;
  min-width:560px;
  font-size:12px;
}
.chat-table-wrap th,
.chat-table-wrap td{
  padding:9px 10px;
  border-bottom:1px solid rgba(148,163,184,.10);
  text-align:left;
}
.chat-table-wrap th{
  color:#94a3b8;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.chat-table-wrap td{
  color:#e5e7eb;
}
.chat-cards{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.chat-cards article{
  border-radius:14px;
  padding:12px;
  background:rgba(15,23,42,.66);
  border:1px solid rgba(148,163,184,.12);
}
.chat-cards article.good{border-color:rgba(34,197,94,.30)}
.chat-cards article.warn{border-color:rgba(245,158,11,.34)}
.chat-cards article.risk{border-color:rgba(244,63,94,.36)}
.chat-cards span{
  display:block;
  color:#94a3b8;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.chat-cards b{
  display:block;
  margin:7px 0 5px;
  color:#f8fafc;
  font-size:13px;
}
.chat-cards p,.chat-cards small{
  display:block;
  margin:0;
  color:#cbd5e1;
  font-size:12px;
  line-height:1.45;
}
.chat-cards small{margin-top:8px;color:#bae6fd}
.chat-actions-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.chat-actions-list div{
  display:flex;
  gap:9px;
  align-items:flex-start;
  padding:9px 10px;
  border-radius:12px;
  background:rgba(99,102,241,.10);
  border:1px solid rgba(129,140,248,.12);
}
.chat-actions-list b{
  width:20px;
  height:20px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(139,92,246,.35);
  color:#fff;
  font-size:11px;
  flex:0 0 auto;
}
.chat-actions-list span{
  color:#e5e7eb;
  font-size:12px;
  line-height:1.45;
}
@media (max-width:700px){
  .chat-msg.rich{max-width:100%!important}
  .chat-cards{grid-template-columns:1fr}
  .chat-chart-stage{height:240px;max-height:240px}
  .chat-chart-stage.is-circle{height:260px}
}

/* v75 assistant chart sizing and neutral IA branding */
#page-assistant .panel-card{overflow:hidden}
#page-assistant .chat-box{
  max-height:min(560px, calc(100vh - 360px));
  min-height:300px;
  padding:0 4px 10px;
}
#page-assistant .chat-msg.rich{
  width:min(980px, 100%);
  max-width:100%!important;
}
#page-assistant .chat-rich-text strong{color:#f8fafc}

/* v65 fixes: calendar desktop side rail */
@media (min-width:1024px){
  #page-calendar:not(.hidden){
    display:grid!important;
    grid-template-columns:minmax(0, 1fr) minmax(380px, 520px)!important;
    grid-template-areas:
      "calTop calDay"
      "calWeek calDay"
      "calGrid calUpcoming"
      "calSummary calUpcoming"!important;
    gap:18px!important;
    align-items:start!important;
  }
  #page-calendar .cal-top-bar{grid-area:calTop!important;grid-column:auto!important;}
  #page-calendar .cal-weekdays{grid-area:calWeek!important;grid-column:auto!important;}
  #page-calendar .finance-calendar{grid-area:calGrid!important;grid-column:auto!important;max-height:none!important;margin-bottom:0!important;}
  #page-calendar .cal-summary{grid-area:calSummary!important;grid-column:auto!important;margin-top:0!important;margin-bottom:0!important;}
  #page-calendar .panel-card{grid-column:auto!important;margin:0!important;}
  #page-calendar .panel-card:nth-of-type(1){
    grid-area:calDay!important;
    grid-row:auto!important;
    align-self:start!important;
  }
  #page-calendar .panel-card:nth-of-type(2){
    grid-area:calUpcoming!important;
    grid-row:auto!important;
    align-self:stretch!important;
    min-height:0!important;
  }
  #page-calendar .day-list{max-height:160px!important;overflow:auto!important;padding-right:6px!important;}
  #page-calendar .upcoming-list{max-height:calc(100vh - 330px)!important;overflow:auto!important;padding-right:6px!important;}
}

/* v67 fixes: true calendar columns */
.calendar-main,
.calendar-side{min-width:0}
.calendar-side{display:flex;flex-direction:column;gap:10px}
@media (min-width:1024px){
  #page-calendar:not(.hidden){
    display:grid!important;
    grid-template-columns:minmax(620px,1fr) minmax(380px,520px)!important;
    grid-template-areas:none!important;
    gap:18px!important;
    align-items:start!important;
  }
  #page-calendar .calendar-main{
    grid-column:1!important;
    display:block!important;
    min-width:0!important;
  }
  #page-calendar .calendar-side{
    grid-column:2!important;
    display:flex!important;
    flex-direction:column!important;
    gap:14px!important;
    min-width:0!important;
    align-self:start!important;
  }
  #page-calendar .cal-top-bar,
  #page-calendar .cal-weekdays,
  #page-calendar .finance-calendar,
  #page-calendar .cal-summary{
    grid-column:auto!important;
    grid-area:auto!important;
  }
  #page-calendar .finance-calendar{
    align-self:start!important;
    align-content:start!important;
    gap:6px!important;
    margin:0 0 12px!important;
  }
  #page-calendar .panel-card,
  #page-calendar .panel-card:nth-of-type(1),
  #page-calendar .panel-card:nth-of-type(2){
    grid-column:auto!important;
    grid-row:auto!important;
    grid-area:auto!important;
    margin:0!important;
    align-self:auto!important;
  }
  #page-calendar .day-list{max-height:145px!important;overflow:auto!important;padding-right:6px!important;}
  #page-calendar .upcoming-list{max-height:calc(100vh - 300px)!important;overflow:auto!important;padding-right:6px!important;}
}

@media (max-width: 700px) {
  .bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .investment-layout { grid-template-columns: 1fr; }
  .inv-kpi-grid { grid-template-columns: 1fr; }
  .inv-hero-pro { flex-wrap: wrap; }
  .inv-refresh-btn { width: 100%; height: 42px; }
  .asset-selected-price { text-align: left; }
  .selected-asset-card { align-items: flex-start; flex-direction: column; }

  /* Investment card — fix mobile vertical text bug */
  .inv-position {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }
  .inv-position .inv-logo {
    flex-shrink: 0;
  }
  .inv-position .inv-info {
    flex: 1 1 0;
    min-width: 0;
  }
  .inv-position .inv-info > span {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
  }
  .inv-position .inv-info > small {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .inv-position .inv-values {
    flex: 0 0 100%;
    min-width: 0;
    text-align: left;
    padding-left: 50px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .inv-position .inv-values > strong {
    font-size: 15px;
  }
  .inv-position .inv-values > small {
    font-size: 12px;
  }
  .inv-position .inv-actions {
    flex: 0 0 100%;
    padding-left: 50px;
  }
}

/* v76 mobile UX fixes */
.hero-chip {
  border: none;
  cursor: pointer;
}
.hero-chip:active {
  transform: scale(0.98);
}
.app-header {
  justify-content: flex-start;
}
.profile-mini {
  flex: 1;
  margin-left: 6px;
}
.header-actions {
  margin-left: auto;
}
.chat-downloads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chat-download-btn {
  border: 1px solid rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.14);
  color: #86efac;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

/* v77 mobile fixes + IA polish */
.assistant-hero .ai-badge,
.sidebar-badge {
  text-transform: none;
}

@media (max-width: 900px) {
  .app-header {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) auto;
    align-items: center;
    column-gap: 8px;
  }
  .profile-mini {
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
  }
  .profile-mini > div {
    min-width: 0;
  }
  .profile-mini h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #page-calendar {
    overflow-x: hidden;
    padding-right: 0 !important;
  }
  #page-calendar .calendar-main,
  #page-calendar .finance-calendar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  #page-calendar .finance-calendar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  #page-calendar .cal-day {
    min-width: 0 !important;
  }
  #page-investment .inv-position-list,
  #page-investment .inv-item {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  #page-investment .inv-info span,
  #page-investment .inv-info small {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  #streamingPicker {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  #streamingPicker .streaming-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  html, body, .app-shell, .app, .page {
    max-width: 100%;
    overflow-x: hidden;
  }
  #page-calendar {
    padding-right: 10px;
  }
  #page-calendar .calendar-main,
  #page-calendar .calendar-side,
  #page-calendar .finance-calendar {
    width: 100%;
    min-width: 0;
  }
  #page-calendar .finance-calendar {
    gap: 4px;
  }
  #page-calendar .cal-day {
    min-width: 0;
    width: 100%;
  }
  #page-investment .panel-card,
  #page-investment .inv-item,
  #page-investment .inv-info,
  #page-investment .inv-values,
  #page-investment .inv-actions {
    min-width: 0;
  }
  #page-investment .inv-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  #txModal .sheet {
    max-height: 88dvh;
  }
  #streamingPicker .streaming-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 220px;
  }
  #streamingPicker .stream-btn small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
  }
}

/* ── Wallet clear button ── */
.wallet-clear-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--red-dim);
  border: 1px solid rgba(244,63,94,0.2);
  border-radius: var(--r-sm);
  color: var(--red);
  display: grid;
  place-items: center;
  transition: background 0.18s, border-color 0.18s;
}
.wallet-clear-btn:hover { background: rgba(244,63,94,0.22); border-color: rgba(244,63,94,0.4); }

/* ── Clear month sheet options ── */
.clear-opt-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 8px;
  text-align: left;
  color: var(--text);
  transition: background 0.18s, border-color 0.18s;
}
.clear-opt-btn:hover { background: var(--surface3); border-color: rgba(255,255,255,0.1); }
.clear-opt-btn b { display: block; font-size: 14px; font-weight: 700; }
.clear-opt-btn small { display: block; font-size: 12px; color: var(--muted2); margin-top: 2px; }
.clear-opt-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.danger-opt { border-color: rgba(244,63,94,0.2); }
.danger-opt:hover { background: var(--red-dim); border-color: rgba(244,63,94,0.4); }

/* ═══════════════════════════════════════════
   IMPORT EXTRATO
   ═══════════════════════════════════════════ */
.import-dropzone {
  border: 2px dashed var(--border-active);
  border-radius: var(--r-lg);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin: 8px 0 16px;
  color: var(--muted2);
}
.import-dropzone:hover,
.import-dropzone.drag-over {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary-light);
}
.import-dropzone svg { margin-bottom: 10px; opacity: 0.7; }
.import-dropzone p { font-size: 14px; margin: 4px 0; }
.import-dropzone small { font-size: 12px; opacity: 0.6; }

.import-formats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}
.import-format-badge {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted2);
}

.import-loading-box {
  text-align: center;
  padding: 48px 16px;
}
.import-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: importSpin 0.8s linear infinite;
  margin: 0 auto 18px;
}
@keyframes importSpin { to { transform: rotate(360deg); } }

.import-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 4px;
  max-height: 50vh;
  overflow-y: auto;
}
.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
.import-table th {
  text-align: left;
  padding: 10px 8px;
  color: var(--muted2);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--surface2);
  z-index: 2;
}
.import-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.import-table tr:last-child td { border-bottom: none; }
.import-table tr:hover td { background: var(--surface2); }
.imp-field {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.imp-field:focus { border-color: var(--primary); outline: none; }
.imp-desc { width: 100%; min-width: 150px; }
.imp-date { width: 120px; }
.imp-val  { width: 88px; }
.imp-type { width: 90px; }
.imp-cat  { width: 140px; }
.imp-val.income  { color: var(--green); }
.imp-val.expense { color: var(--red); }
.imp-val.invest  { color: #8b5cf6; }

#importModal .sheet { max-width: 860px; margin: 0 auto; }

/* Native Android shell: keep content out of the status/navigation bars. */
.cap-native .auth-screen {
  align-items: start;
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.cap-native .auth-card {
  padding: 24px;
}
.cap-native .auth-download-card,
.cap-native .sidebar-download-btn,
.cap-native .sidebar-version-download {
  display: none !important;
}
.cap-native .app-header {
  padding-top: max(10px, env(safe-area-inset-top)) !important;
}
.cap-native .bottom-tabs {
  height: calc(66px + env(safe-area-inset-bottom)) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}
.cap-native .fab {
  bottom: calc(86px + env(safe-area-inset-bottom));
}
.cap-native .sheet {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.cap-native #settingsSheet .sheet {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.cap-native #settingsSheet .setting-item:last-child {
  margin-bottom: 0;
}

/* metas-r5: visual fallback by fixed sidebar position.
   If Android/WebView mutates label text to "Metas", this keeps the visible
   labels correct while the JS guard restores attributes, icons and clicks. */
#sidebarNav .ol-nav-btn .ol-nav-label {
  font-size: 0 !important;
}
#sidebarNav .ol-nav-btn .ol-nav-label::after {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
}
#sidebarNav .ol-nav-btn:nth-of-type(1) .ol-nav-label::after { content: "Dashboard"; }
#sidebarNav .ol-nav-btn:nth-of-type(2) .ol-nav-label::after { content: "Transações"; }
#sidebarNav .ol-nav-btn:nth-of-type(3) .ol-nav-label::after { content: "Metas"; }
#sidebarNav .ol-nav-btn:nth-of-type(4) .ol-nav-label::after { content: "Investimentos"; }
#sidebarNav .ol-nav-btn:nth-of-type(5) .ol-nav-label::after { content: "Calendário"; }
#sidebarNav .ol-nav-btn:nth-of-type(6) .ol-nav-label::after { content: "Assistente IA"; }
#sidebarNav .ol-nav-btn:nth-of-type(7) .ol-nav-label::after { content: "ADM"; }
#sidebarNav .ol-nav-btn:nth-of-type(8) .ol-nav-label::after { content: "Relatórios"; }

/* metas-r6: keep the Android WebView sidebar on its own paint layer so label/icon
   repairs are actually repainted on screen, not just updated in the DOM. */
#sidebar.open #sidebarNav {
  contain: layout paint style;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
}

#sidebar.open #sidebarNav .ol-nav-btn {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0) !important;
}
