/* ============================================================
   FinançasVB — Light Refinado
   Design system mobile-first com ícones Lucide
   ============================================================ */

:root {
  /* ── Cores primárias (mantida do app original) ── */
  --primary: #7B4DFF;
  --primary-dark: #5B35DB;
  --primary-light: #F0EBFF;
  --primary-soft-fg: #5B35DB;

  /* ── Cor acento secundária (azul fintech) ── */
  --accent: #4F8AF7;

  /* ── Semânticas ── */
  --green: #10B981;
  --green-light: #E7F8F1;
  --green-soft-fg: #047857;
  --red: #EF4444;
  --red-light: #FEEDED;
  --red-soft-fg: #B91C1C;
  --yellow: #F59E0B;
  --yellow-light: #FFF3D9;
  --yellow-soft-fg: #B45309;
  --blue: #3B82F6;
  --blue-light: #E8F0FE;

  /* ── Cinzas (sutilmente tintados de roxo) ── */
  --gray-50:  #FAFAFC;
  --gray-100: #F1F1F6;
  --gray-200: #E4E4ED;
  --gray-300: #C9CAD6;
  --gray-400: #8E90A2;
  --gray-500: #64657A;
  --gray-600: #4B4C61;
  --gray-700: #34354A;
  --gray-800: #1A1B2E;
  --gray-900: #0B0C1E;
  --white: #FFFFFF;

  /* ── Bg / surface ── */
  --bg: #F1F1F6;
  --surface: #FFFFFF;
  --surface-alt: #FAFAFC;
  --border: rgba(15, 23, 42, 0.06);
  --border-strong: rgba(15, 23, 42, 0.10);

  /* ── Sombras refinadas ── */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-primary: 0 8px 22px rgba(123, 77, 255, 0.35);

  /* ── Geometria ── */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --nav-h: 76px;
  --header-h: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--gray-800);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* SVG icons: defaults */
svg { flex-shrink: 0; }

/* ──────────────────────────────────────────────────────────
   SCREENS
   ────────────────────────────────────────────────────────── */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }

/* ──────────────────────────────────────────────────────────
   LOGO V3
   ────────────────────────────────────────────────────────── */
.logo-v3 {
  font-size: 20px;
  font-weight: 900;
  font-family: 'Arial Black', Arial, sans-serif;
  background: linear-gradient(135deg, #4FC3F7 0%, #7B4DFF 55%, #A347F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 9px;
  background-color: rgba(123, 77, 255, 0.08);
}
.logo-v3-xl {
  font-size: 54px;
  font-weight: 900;
  font-family: 'Arial Black', Arial, sans-serif;
  background: linear-gradient(135deg, #4FC3F7 0%, #7B4DFF 55%, #A347F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2.5px;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}

/* ──────────────────────────────────────────────────────────
   AUTH (tela de login mantida com brilho do app)
   ────────────────────────────────────────────────────────── */
#screen-auth {
  background:
    radial-gradient(circle at 20% 10%, rgba(123,77,255,0.4), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(79,138,247,0.3), transparent 50%),
    linear-gradient(145deg, #0D0D2B 0%, #1A0545 50%, #0A1440 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100dvh;
}
.auth-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: 1px; margin: 4px 0 6px; }
.auth-logo p { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.setup-card { max-width: 430px; }
.setup-card .auth-logo { margin-bottom: 22px; }
.setup-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 16px;
  color: rgba(255,255,255,0.78);
}
.setup-panel-title { color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 12px; text-transform: uppercase; }
.setup-steps { display: grid; gap: 10px; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.setup-steps a { color: #A5D8FF; font-weight: 700; }
.setup-steps code {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #fff; padding: 1px 5px;
}
.setup-note { margin-top: 14px; color: rgba(255,255,255,0.5); font-size: 12px; line-height: 1.45; }

#screen-auth .form-label { color: rgba(255,255,255,0.75); }
#screen-auth .form-control {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
#screen-auth .form-control::placeholder { color: rgba(255,255,255,0.35); }
#screen-auth .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(123,77,255,0.25);
}
#screen-auth p[style] { color: rgba(255,255,255,0.4) !important; }

.auth-error {
  background: rgba(239,68,68,0.18);
  border: 1px solid rgba(239,68,68,0.36);
  color: #FCA5A5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ──────────────────────────────────────────────────────────
   APP LAYOUT
   ────────────────────────────────────────────────────────── */
#screen-app {
  display: none !important;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
#screen-app.active { display: flex !important; }
#screen-auth { display: none !important; }
#screen-auth.active { display: flex !important; }

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-month-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--border);
}
.header-month-nav button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.header-month-nav button:hover { background: var(--white); color: var(--gray-800); }
.header-month-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  min-width: 92px;
  text-align: center;
}
.header-right { display: flex; align-items: center; gap: 4px; }
.app-back-button { display:flex; align-items:center; gap:6px; min-width:36px; height:36px; padding:0 10px; border:1px solid var(--border); border-radius:9px; background:#FFF; color:var(--navy); cursor:pointer; font-family:inherit; font-size:12px; font-weight:700; }
.app-back-button[hidden] { display:none; }
.app-header.has-back .mobile-brand { display:none; }
@media (max-width:599px) { .app-back-button { padding:0; justify-content:center; }.app-back-button .back-label { display:none; }.header-left { gap:6px; } }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-icon svg { width: 20px; height: 20px; }

/* Avatar do usuário no header */
.header-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F472B6, #A855F7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}

/* ──────────────────────────────────────────────────────────
   PAGES
   ────────────────────────────────────────────────────────── */
.pages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 16px);
}
.page { display: none; animation: fadeIn 0.22s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ──────────────────────────────────────────────────────────
   BOTTOM NAV — floating pill
   ────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  height: 66px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  display: flex;
  z-index: 200;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
  padding: 8px 10px;
  align-items: center;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--gray-400);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 4px;
  transition: color 0.15s;
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { stroke-width: 2.1; }
.nav-item .nav-icon { display: flex; align-items: center; justify-content: center; }

.nav-item.nav-add {
  position: relative;
  margin-top: -22px;
}
.nav-item.nav-add .nav-fab {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--shadow-primary), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s;
}
.nav-item.nav-add .nav-fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.nav-item.nav-add:hover .nav-fab { transform: scale(1.05); }
.nav-item.nav-add .nav-label { color: var(--primary); font-size: 10.5px; margin-top: 4px; font-weight: 700; }

/* ──────────────────────────────────────────────────────────
   CARDS
   ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin: 12px 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-title svg { width: 16px; height: 16px; opacity: 0.85; }
.card-title a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.card-title a svg { width: 14px; height: 14px; stroke-width: 2.2; }

/* ──────────────────────────────────────────────────────────
   BALANCE CARD (hero gradiente)
   ────────────────────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, #4F8AF7 0%, #7B4DFF 55%, #A347F5 100%);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  margin: 12px 16px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(123,77,255,0.32);
}
.balance-card::before {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.balance-card.negative {
  background: linear-gradient(135deg, #B91C1C 0%, #7F1D1D 100%);
  box-shadow: 0 14px 32px rgba(185,28,28,0.32);
}
.balance-label {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  position: relative;
}
.balance-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
  position: relative;
}
.balance-row {
  display: flex;
  gap: 10px;
  position: relative;
}
.balance-item {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.balance-item-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.balance-item-icon.income { background: rgba(110,231,183,0.22); color: #6EE7B7; }
.balance-item-icon.expense { background: rgba(252,165,165,0.22); color: #FCA5A5; }
.balance-item-text { min-width: 0; }
.balance-item-label {
  font-size: 9.5px; opacity: 0.78;
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
}
.balance-item-value { font-size: 14px; font-weight: 800; line-height: 1.1; }
.balance-item-value.income { color: #fff; }
.balance-item-value.expense { color: #fff; }

/* ──────────────────────────────────────────────────────────
   STATS ROW
   ────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 4px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.stat-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary-soft-fg);
}
.stat-icon.green  { background: var(--green-light);  color: var(--green-soft-fg); }
.stat-icon.yellow { background: var(--yellow-light); color: var(--yellow-soft-fg); }
.stat-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.stat-icon svg { width: 16px; height: 16px; }
.stat-label { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--gray-800); line-height: 1; }
.stat-sub { font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* ──────────────────────────────────────────────────────────
   TRANSACTIONS
   ────────────────────────────────────────────────────────── */
.transaction-list { display: flex; flex-direction: column; }
.transaction-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  gap: 12px;
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item:hover { background: var(--gray-50); }
.transaction-item:active { background: var(--gray-100); }

.t-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--gray-100);
}
.t-icon svg { width: 18px; height: 18px; }
.t-info { flex: 1; min-width: 0; }
.t-desc {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-meta {
  font-size: 11px; color: var(--gray-400); margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.t-amount {
  font-size: 14px; font-weight: 800; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--gray-800);
}
.t-amount.receita { color: var(--green); }
.t-amount.despesa { color: var(--gray-800); }
.t-delete {
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-300);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: none;
  align-items: center; justify-content: center;
}
.t-delete svg { width: 14px; height: 14px; }
.transaction-item:hover .t-delete { display: flex; }
.t-delete:hover { color: var(--red); background: var(--red-light); }

/* Owner avatar inline (em t-meta, modal, etc) */
.owner-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gray-400);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}
.owner-avatar.vinicius { background: linear-gradient(135deg,#4F8AF7,#3B82F6); }
.owner-avatar.barbara  { background: linear-gradient(135deg,#F472B6,#EC4899); }
.owner-avatar.casal    { background: linear-gradient(135deg,#A855F7,#7B4DFF); }

/* ──────────────────────────────────────────────────────────
   DATE SEPARATOR
   ────────────────────────────────────────────────────────── */
.date-separator {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-100);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ──────────────────────────────────────────────────────────
   PROGRESS BAR
   ────────────────────────────────────────────────────────── */
.progress-wrap { margin-bottom: 4px; }
.progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.progress-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.progress-values { font-size: 12px; color: var(--gray-500); }
.progress-values strong { color: var(--gray-800); }
.progress-bar-track {
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #34D399);
  transition: width 0.45s ease;
}
.progress-bar-fill.warn { background: linear-gradient(90deg, var(--yellow), #FBBF24); }
.progress-bar-fill.danger { background: linear-gradient(90deg, var(--red), #F87171); }
.progress-bar-fill.over { background: linear-gradient(90deg, var(--red), #DC2626); width: 100% !important; }

/* ──────────────────────────────────────────────────────────
   BUDGET ITEMS
   ────────────────────────────────────────────────────────── */
.budget-section-title {
  padding: 14px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex; align-items: center; gap: 8px;
}
.budget-section-title svg { width: 14px; height: 14px; }
.budget-item {
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.budget-item:last-child { border-bottom: none; }
.budget-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.budget-item-name {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  display: inline-flex; align-items: center; gap: 8px;
}
.budget-item-name svg { width: 16px; height: 16px; }
.budget-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.budget-item-badge.fixo { background: var(--blue-light); color: var(--blue); }
.budget-item-badge.variavel { background: #FFF7ED; color: #F97316; }
.budget-item-badge.temporario { background: #FDF4FF; color: #A855F7; }

/* ──────────────────────────────────────────────────────────
   CHARTS
   ────────────────────────────────────────────────────────── */
.chart-container { position: relative; padding: 8px 0; }
.chart-container canvas { max-height: 220px; }
.chart-empty { display:flex; height:100%; min-height:180px; align-items:center; justify-content:center; padding:20px; color:var(--gray-400); font-size:13px; text-align:center; }

/* ──────────────────────────────────────────────────────────
   RESERVE CARD
   ────────────────────────────────────────────────────────── */
.reserve-card {
  background: linear-gradient(135deg, #047857 0%, #065F46 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  margin: 12px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(4, 120, 87, 0.30);
}
.reserve-card::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110,231,183,0.25) 0%, transparent 70%);
}
.reserve-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; position: relative;
}
.reserve-title { font-size: 12px; opacity: 0.85; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.reserve-percent { font-size: 28px; font-weight: 800; }
.reserve-values { font-size: 12px; opacity: 0.8; margin-bottom: 12px; position: relative; }
.reserve-bar-track {
  height: 8px; background: rgba(255,255,255,0.18); border-radius: 999px; overflow: hidden;
  position: relative;
}
.reserve-bar-fill { height: 100%; background: linear-gradient(90deg, #6EE7B7, #A7F3D0); border-radius: 999px; transition: width 0.5s; }

.reserve-projection {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.reserve-projection h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--gray-800); }
.phase-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.phase-item:last-child { border-bottom: none; }
.phase-dot {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.phase-dot.p1 { background: var(--yellow-light); color: var(--yellow-soft-fg); }
.phase-dot.p2 { background: var(--blue-light); color: var(--blue); }
.phase-dot.p3 { background: var(--primary-light); color: var(--primary-soft-fg); }
.phase-dot svg { width: 16px; height: 16px; }
.phase-info h5 { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.phase-info p { font-size: 12px; color: var(--gray-500); margin-top: 3px; line-height: 1.5; }

/* ──────────────────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(123,77,255,0.12);
}
.form-control::placeholder { color: var(--gray-400); }
.input-amount {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1.2px;
  color: var(--gray-900);
  border: none;
  background: transparent;
  padding: 22px 14px 14px;
}
.input-amount:focus { box-shadow: none; }
.input-amount.receita { color: var(--green); }
.input-amount.despesa { color: var(--red); }
select.form-control { cursor: pointer; }

/* ──────────────────────────────────────────────────────────
   TYPE TOGGLE
   ────────────────────────────────────────────────────────── */
.type-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 14px;
  gap: 4px;
}
.type-toggle button {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.type-toggle button svg { width: 14px; height: 14px; stroke-width: 2.2; }
.type-toggle button.active {
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.type-toggle button.active.despesa { background: var(--red-light); color: var(--red); }
.type-toggle button.active.receita { background: var(--green-light); color: var(--green); }

/* ──────────────────────────────────────────────────────────
   CATEGORY GRID
   ────────────────────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}
.cat-btn .cat-icon {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100);
}
.cat-btn .cat-icon svg { width: 17px; height: 17px; }
.cat-btn .cat-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.2;
}
.cat-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.cat-btn.selected .cat-name { color: var(--primary-soft-fg); font-weight: 700; }
.cat-btn.selected::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ──────────────────────────────────────────────────────────
   OWNER TABS
   ────────────────────────────────────────────────────────── */
.owner-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.owner-tab {
  flex: 1;
  padding: 10px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s;
}
.owner-tab .owner-avatar { width: 22px; height: 22px; font-size: 11px; }
.owner-tab.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-soft-fg);
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  width: 100%;
  font-family: inherit;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(123,77,255,0.45); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: #FECACA; }
.btn-green {
  background: linear-gradient(135deg, var(--green), #059669);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(16,185,129,0.35);
}
.btn-green:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.text-button:disabled { opacity:.45; cursor:not-allowed; pointer-events:none; }

/* Consistent utility screens */
.utility-page { max-width:1196px; }
.history-card { min-height:420px; }
.history-card .filter-bar { flex-wrap:wrap; padding:14px 16px; background:#fff; }
.history-card .historico-period-bar { gap:10px; padding:12px 16px; background:#F8F9FC; }
.history-card .historico-period-bar .form-control { max-width:210px; background:#fff; }
.period-label { color:var(--navy); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.period-separator { color:var(--gray-400); font-size:11px; }
.report-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.report-grid .card { min-width:0; }
.report-controls { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:16px; margin-bottom:18px; background:#FFF; border:1px solid var(--border); border-radius:16px; }
.report-controls label { display:flex; flex-direction:column; gap:6px; font-size:11px; font-weight:700; color:var(--gray-500); min-width:0; }
.report-controls .form-control { width:100%; min-width:0; font-size:12px; }
.report-basis-note { margin:0 0 16px; color:var(--gray-500); font-size:11px; line-height:1.65; }
.report-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.report-kpi { min-width:0; padding:18px; border-radius:16px; border:1px solid #E0E6F4; background:#FFF; box-shadow:0 4px 14px rgba(40,50,100,.03); }
.report-kpi > span { display:block; color:var(--gray-500); font-size:10px; text-transform:uppercase; font-weight:800; letter-spacing:.5px; }
.report-kpi > strong { display:block; margin:8px 0 5px; font-size:22px; color:var(--navy); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.report-kpi.income { background:#F0FDFA; border-color:#CCFBF1; }.report-kpi.income > strong { color:#0F766E; }
.report-kpi.expense { background:#F5F3FF; border-color:#EDE9FE; }.report-kpi.expense > strong { color:#6D28D9; }
.report-kpi.credit { background:#FFF7ED; border-color:#FFEDD5; }.report-kpi.credit > strong { color:#C2410C; }
.report-kpi > small { color:var(--gray-500); font-size:11px; line-height:1.45; }
.report-insights { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.report-insight { min-width:0; padding:15px 16px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.7); }
.report-insight > span { color:var(--gray-500); font-size:11px; }
.report-insight > strong { display:block; color:var(--navy); font-size:15px; line-height:1.4; margin-top:5px; overflow-wrap:anywhere; }
.report-insight > p { color:var(--gray-500); font-size:11px; line-height:1.6; margin:6px 0 0; }
.report-card-heading h2 { margin:0; color:var(--navy); font-size:15px; }
.report-card-heading p { color:var(--gray-500); font-size:11px; line-height:1.6; margin:5px 0 14px; }
.reports-page .report-grid { align-items:start; }
.reports-page .chart-container { height:275px; }
.reports-page .chart-container canvas { max-height:none; }
.report-chart-note { margin-top:8px; color:var(--gray-500); font-size:10px; line-height:1.6; }
.report-card-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; padding:10px 0; border-top:1px solid var(--border-light); font-size:11px; }
.report-card-row > span { display:flex; align-items:center; gap:6px; color:var(--gray-600); min-width:0; }
.report-card-row i { width:7px; height:7px; flex-shrink:0; border-radius:50%; }
.report-card-row > strong { color:var(--navy); white-space:nowrap; font-variant-numeric:tabular-nums; }
.report-card-row > small { grid-column:2; text-align:right; color:var(--gray-500); font-size:10px; }
.report-analysis-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--border-light); font-size:12px; }
.report-analysis-row > span { color:var(--gray-500); }.report-analysis-row > strong { color:var(--navy); white-space:nowrap; }
.report-analysis-row:last-child { padding-top:18px; color:var(--navy); font-weight:800; border:0; }
.report-table-card { margin-top:16px; }
.report-table-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
.report-month-table { width:100%; border-collapse:collapse; font-size:11px; white-space:nowrap; }
.report-month-table th,.report-month-table td { padding:13px 11px; border-bottom:1px solid var(--border-light); text-align:right; font-variant-numeric:tabular-nums; }
.report-month-table th:first-child { text-align:left; }
.report-month-table th { color:var(--navy); }.report-month-table td { color:var(--gray-600); }
.report-month-table thead { background:#F5F7FD; }.report-month-table tfoot { background:#EEF2FF; font-weight:800; }
.report-month-table th small { display:block; font-size:9px; font-weight:400; color:var(--gray-500); margin-top:3px; }
.report-month-table .report-negative { color:#B45363; }
@media (max-width:899px) {
  .report-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-insights { grid-template-columns:1fr; }
}
@media (max-width:599px) {
  .report-controls { grid-template-columns:1fr; padding:12px; gap:10px; }
  .report-summary-grid { gap:8px; }
  .report-kpi { padding:13px 11px; }.report-kpi > strong { font-size:18px; }
  .reports-page .chart-container { height:255px; }
  .reports-page .report-grid .card { padding:16px 12px; }
  .report-table-card { padding:16px 12px; }
}
.report-grid .chart-container { height:280px; }
.report-analysis-card { min-height:338px; }
.config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.config-section { min-width:0; }
.config-section-wide { grid-row:span 2; }
.config-section .section-support-copy { margin:0; padding:12px 18px; border-bottom:1px solid var(--border-light); background:#F8F9FC; }
.config-section .settings-item { min-height:66px; }
.cards-page,.fixed-expenses-page { max-width:1196px; }
.cards-invoice-list { display:grid; gap:14px; }
.card-invoice-panel { border-top:4px solid var(--account-color) !important; }
.card-invoice-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:18px; }
.card-invoice-head > div:first-child { display:flex; align-items:center; gap:11px; min-width:0; }
.card-invoice-head > div:first-child > div { min-width:0; }
.card-invoice-head > div:first-child strong,.card-invoice-head > div:first-child small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-invoice-head > div:first-child strong { color:var(--navy); font-size:16px; }
.card-invoice-head > div:first-child small { margin-top:3px; color:var(--gray-500); font-size:11px; }
.card-invoice-total { flex:0 0 auto; text-align:right; }
.card-invoice-total span,.card-invoice-total small { display:block; color:var(--gray-500); font-size:10px; }
.card-invoice-total strong { display:block; margin:4px 0 2px; color:var(--navy); font-size:24px; font-variant-numeric:tabular-nums; }
.card-invoice-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid var(--border-light); border-bottom:1px solid var(--border-light); background:#F8F9FC; }
.card-invoice-metrics > div { min-width:0; padding:13px 18px; border-left:1px solid var(--border-light); }
.card-invoice-metrics > div:first-child { border-left:0; }
.card-invoice-metrics span { display:block; color:var(--gray-500); font-size:9px; text-transform:uppercase; letter-spacing:.05em; }
.card-invoice-metrics strong { display:block; overflow:hidden; margin-top:4px; color:var(--navy); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.card-invoice-progress { padding:13px 18px 0; }
.card-invoice-progress span { display:block; margin-top:5px; color:var(--gray-500); font-size:9px; }
.card-invoice-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:14px 18px; }
.invoice-purchase-list { border-top:1px solid var(--border-light); }
.invoice-purchase-title { display:flex; align-items:center; justify-content:space-between; padding:11px 18px; background:#F8F9FC; color:var(--gray-500); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.invoice-purchase-row { display:grid; width:100%; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:11px; border:0; border-top:1px solid var(--border-light); padding:12px 18px; background:#fff; color:inherit; cursor:pointer; text-align:left; }
.invoice-purchase-row:hover { background:#FAFBFE; }
.invoice-purchase-icon { display:grid; width:34px; height:34px; place-items:center; border-radius:9px; background:#F0F2F8; color:#65709C; }
.invoice-purchase-row > span:nth-child(2) { min-width:0; }
.invoice-purchase-row > span:nth-child(2) strong,.invoice-purchase-row > span:nth-child(2) small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.invoice-purchase-row > span:nth-child(2) strong { color:var(--navy); font-size:12px; }
.invoice-purchase-row > span:nth-child(2) small { margin-top:3px; color:var(--gray-500); font-size:10px; }
.invoice-purchase-row > strong { color:var(--navy); font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fixed-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.fixed-layout > .card { min-width:0; }

@media (max-width: 899px) {
  .report-grid,.config-grid,.fixed-layout { grid-template-columns:1fr; }
  .config-section-wide { grid-row:auto; }
}

@media (max-width: 599px) {
  .history-card .filter-bar { flex-wrap:nowrap; }
  .history-card .historico-period-bar { display:grid; grid-template-columns:1fr auto 1fr; }
  .history-card .historico-period-bar .period-label { grid-column:1 / -1; }
  .history-card .historico-period-bar .form-control { min-width:0; width:100%; }
  .report-grid .chart-container { height:230px; }
  .cards-page .heading-actions { display:grid; width:100%; grid-template-columns:1fr 1fr; }
  .cards-page .heading-actions .btn { min-width:0; padding-left:8px; padding-right:8px; }
  .card-invoice-head { padding:16px; }
  .card-invoice-total strong { font-size:19px; }
  .card-invoice-metrics { grid-template-columns:1fr; }
  .card-invoice-metrics > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-top:1px solid var(--border-light); border-left:0; }
  .card-invoice-metrics > div:first-child { border-top:0; }
  .card-invoice-metrics strong { margin-top:0; text-align:right; }
  .card-invoice-actions { align-items:stretch; flex-direction:column; }
  .card-invoice-actions .btn { width:100%; }
  .invoice-purchase-row { padding:11px 14px; }
}

/* ──────────────────────────────────────────────────────────
   MODALS
   ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 95dvh;
  overflow-y: auto;
  padding: 16px 16px 32px;
  animation: slideUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--gray-200);
  border-radius: 999px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 20px;
  text-align: center;
}

/* ──────────────────────────────────────────────────────────
   TOAST
   ────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--gray-900);
  color: var(--white);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  animation: toastIn 0.22s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.toast.success { background: linear-gradient(135deg, #065F46, #047857); }
.toast.error { background: linear-gradient(135deg, #991B1B, #B91C1C); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────
   EMPTY STATE
   ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}
.empty-state .empty-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--gray-100);
  color: var(--gray-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.empty-state .empty-icon svg { width: 26px; height: 26px; }
.empty-state p { font-size: 14px; }

/* ──────────────────────────────────────────────────────────
   LOADING
   ────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ──────────────────────────────────────────────────────────
   FILTER BAR
   ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
  font-family: inherit;
}
.filter-chip.active {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: var(--white);
}

/* ──────────────────────────────────────────────────────────
   HISTORICO PERIOD BAR + TOTAL BAR
   ────────────────────────────────────────────────────────── */
.historico-period-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.historico-period-bar .form-control {
  flex: 1;
  font-size: 13px;
  padding: 9px 12px;
}
.historico-total-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}
.historico-total-bar span:last-child {
  margin-left: auto;
  font-weight: 500;
  color: var(--gray-400);
  font-size: 11px;
}

/* ──────────────────────────────────────────────────────────
   BILL ACTION BUTTONS
   ────────────────────────────────────────────────────────── */
.bill-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--gray-400);
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.bill-action-btn svg { width: 14px; height: 14px; }
.bill-action-btn:hover { opacity: 1; background: var(--gray-100); color: var(--gray-700); }

/* ──────────────────────────────────────────────────────────
   RECURRENCE BADGE
   ────────────────────────────────────────────────────────── */
.recurrence-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.recurrence-badge.parcelada { background: var(--blue-light); color: var(--blue); }
.recurrence-badge.fixa { background: var(--green-light); color: var(--green-soft-fg); }

/* ──────────────────────────────────────────────────────────
   BTN GHOST SMALL
   ────────────────────────────────────────────────────────── */
.btn-ghost-sm {
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
  font-family: inherit;
}
.btn-ghost-sm:hover { color: var(--gray-700); }

/* ──────────────────────────────────────────────────────────
   ALERTS
   ────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  margin: 8px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.45;
}
.alert-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.alert-icon svg { width: 16px; height: 16px; }
.alert-body { flex: 1; }
.alert strong { display: block; margin-bottom: 3px; font-weight: 700; }
.alert-warning { background: var(--yellow-light); color: var(--yellow-soft-fg); }
.alert-warning .alert-icon { background: rgba(245,158,11,0.18); color: var(--yellow-soft-fg); }
.alert-success { background: var(--green-light); color: var(--green-soft-fg); }
.alert-success .alert-icon { background: rgba(16,185,129,0.18); color: var(--green-soft-fg); }
.alert-danger { background: var(--red-light); color: var(--red-soft-fg); }
.alert-danger .alert-icon { background: rgba(239,68,68,0.18); color: var(--red-soft-fg); }
.alert-info { background: var(--primary-light); color: var(--primary-soft-fg); }
.alert-info .alert-icon { background: rgba(123,77,255,0.18); color: var(--primary); }

/* ──────────────────────────────────────────────────────────
   SECTION HEADER
   ────────────────────────────────────────────────────────── */
.section-header {
  padding: 16px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Page hero (título grande, ex: "Extrato", "Orçamento") */
.page-hero {
  padding: 16px 16px 4px;
}
.page-hero h1 {
  font-size: 24px; font-weight: 800; color: var(--gray-900);
  margin: 0; letter-spacing: -0.4px;
}
.page-hero p {
  font-size: 12px; color: var(--gray-400); margin: 2px 0 0;
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}
.back-btn svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ──────────────────────────────────────────────────────────
   DIVIDER
   ────────────────────────────────────────────────────────── */
.divider { height: 8px; background: var(--gray-100); }

/* ──────────────────────────────────────────────────────────
   SETTINGS
   ────────────────────────────────────────────────────────── */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.settings-item:hover { background: var(--gray-50); }
.settings-item:last-child { border-bottom: none; }
.settings-item-left { display: flex; align-items: center; gap: 12px; }
.settings-item-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-item-icon svg { width: 18px; height: 18px; }
.settings-item-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.settings-item-sub { font-size: 12px; color: var(--gray-400); margin-top: 1px; }
.settings-item-right { color: var(--gray-300); display: flex; align-items: center; }
.settings-item-right svg { width: 18px; height: 18px; }

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — Desktop layout
   ────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .pages-container { max-width: 600px; margin: 0 auto; }
  .bottom-nav { max-width: 568px; left: 50%; transform: translateX(-50%); right: auto; }
  .modal-sheet { border-radius: var(--radius-xl); margin-bottom: 20px; }
}

/* ──────────────────────────────────────────────────────────
   PAGE PADDING
   ────────────────────────────────────────────────────────── */
.page-top-pad { height: 12px; }

/* ──────────────────────────────────────────────────────────
   TABS
   ────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin: 0 16px 14px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 9px 8px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit;
}
.tab-btn svg { width: 14px; height: 14px; stroke-width: 2; }
.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary-soft-fg);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ──────────────────────────────────────────────────────────
   BILL ITEMS (Contas do Mês)
   ────────────────────────────────────────────────────────── */
.bill-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background 0.12s;
}
.bill-item:last-child { border-bottom: none; }
.bill-item.paid { opacity: 0.65; }
.bill-check {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 2px solid var(--gray-300);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  padding: 0;
}
.bill-check svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.bill-check.checked {
  background: var(--green);
  border-color: var(--green);
}
.bill-check.checked svg { opacity: 1; color: #fff; }
.bill-check:hover { border-color: var(--green); }
.bill-info { flex: 1; min-width: 0; }
.bill-name {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  display: inline-flex; align-items: center; gap: 6px;
}
.bill-name.paid-text { color: var(--gray-400); text-decoration: line-through; }
.bill-meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.bill-amount {
  font-size: 14px; font-weight: 800; color: var(--gray-800);
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.bill-amount.paid { color: var(--green); }
.bill-pay-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: inherit;
}
.bill-pay-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.bill-paid-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
}
.bill-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 8px;
}
.bill-summary-card {
  border-radius: var(--radius);
  padding: 12px;
  position: relative;
}
.bill-summary-card svg { width: 16px; height: 16px; }
.bill-summary-card .bsc-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; margin-top: 6px;
}
.bill-summary-card .bsc-value { font-size: 16px; font-weight: 800; margin-top: 2px; }
.bill-summary-card .bsc-sub { font-size: 10px; margin-top: 1px; opacity: 0.85; }
.bill-summary-card.paid {
  background: var(--green-light); color: var(--green-soft-fg);
}
.bill-summary-card.pending {
  background: var(--yellow-light); color: var(--yellow-soft-fg);
}
.bill-summary-card.total {
  background: var(--surface); border: 1px solid var(--border); color: var(--gray-800);
}

/* ──────────────────────────────────────────────────────────
   ACCOUNT CARDS
   ────────────────────────────────────────────────────────── */
.account-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.account-card:hover { background: var(--gray-50); }
.account-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: system-ui;
}
.account-icon svg { width: 22px; height: 22px; }
.account-info { flex: 1; min-width: 0; }
.account-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.account-bank { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.account-balance { font-size: 17px; font-weight: 800; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.account-balance.positive { color: var(--green); }
.account-balance.negative { color: var(--red); }
.account-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ──────────────────────────────────────────────────────────
   Fatura de Cartão de Crédito
   ────────────────────────────────────────────────────────── */
.fatura-item { border-bottom: 1px solid var(--border); }
.fatura-item.paid { opacity: 0.7; }
.fatura-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; user-select: none;
}
.fatura-header:hover { background: var(--gray-50); }
.fatura-toggle {
  font-size: 10px; color: var(--gray-400); min-width: 14px;
  display: inline-flex; align-items: center;
}
.fatura-detail { background: var(--gray-50); border-top: 1px solid var(--border); }
.fatura-tx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 40px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.fatura-tx-item:last-child { border-bottom: none; }
.fatura-tx-desc { font-size: 13px; font-weight: 500; color: var(--gray-800); }
.fatura-tx-meta { font-size: 11px; color: var(--gray-400); }
.fatura-tx-amount { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--gray-700); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fatura-empty { padding: 12px 16px 12px 40px; font-size: 13px; color: var(--gray-400); }

/* ============================================================
   V3 VIDA FINANCEIRA · REDESIGN 3.0
   Baseado no tema azul corporativo da skill sankhya-html5-dash
   ============================================================ */
:root {
  --navy:#0F2B46;
  --primary:#1D4E7E;
  --primary-dark:#0F2B46;
  --primary-light:#E8F0F8;
  --primary-soft-fg:#1D4E7E;
  --accent:#2E6DA8;
  --bg:#F4F8FC;
  --surface:#FFFFFF;
  --surface-alt:#FBFDFF;
  --border:#D7E2EE;
  --border-strong:#BFCFE0;
  --gray-50:#F8FAFC;
  --gray-100:#EDF2F8;
  --gray-200:#D7E2EE;
  --gray-300:#B7C6D6;
  --gray-400:#718398;
  --gray-500:#5A6B7C;
  --gray-600:#46586A;
  --gray-700:#344454;
  --gray-800:#24303C;
  --gray-900:#17212B;
  --green:#1D6B41;
  --green-light:#E7F4ED;
  --green-soft-fg:#155633;
  --red:#A33A3A;
  --red-light:#FBECEC;
  --red-soft-fg:#853030;
  --yellow:#C47A12;
  --yellow-light:#FFF4DE;
  --yellow-soft-fg:#8C570D;
  --blue:#2E6DA8;
  --blue-light:#E8F0F8;
  --shadow-sm:0 1px 2px rgba(15,43,70,.06);
  --shadow:0 1px 2px rgba(15,43,70,.06), 0 4px 14px rgba(15,43,70,.05);
  --shadow-lg:0 8px 32px rgba(15,43,70,.14);
  --shadow-primary:0 8px 20px rgba(29,78,126,.24);
  --radius-sm:8px;
  --radius:10px;
  --radius-lg:14px;
  --radius-xl:18px;
  --header-h:68px;
  --nav-h:74px;
  --font:"Segoe UI",-apple-system,Roboto,Arial,sans-serif;
}

html,body { background:var(--bg); color:var(--gray-800); }
body,button,input,select,textarea { font-family:var(--font); }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(46,109,168,.24); }
.app-sidebar { display:none; }
.pages-container { max-width:none; width:100%; margin:0; background:var(--bg); }
.page-content { width:100%; max-width:1420px; margin:0 auto; padding:24px 16px 110px; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.page-heading h1 { color:var(--navy); font-size:clamp(24px,4vw,34px); letter-spacing:-.8px; line-height:1.1; margin:3px 0 7px; }
.page-heading p { display:none; }
.eyebrow { color:var(--accent); font-size:10.5px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; }
.quick-actions { display:flex; gap:8px; flex:0 0 auto; }
.global-privacy-button { color:var(--primary); }
.global-privacy-button[aria-pressed="true"] { background:#EEF1FF; color:var(--primary-dark); }
.privacy-hidden canvas { opacity:.18; filter:blur(5px); }
.btn.compact { width:auto; min-height:40px; padding:9px 14px; font-size:13px; white-space:nowrap; }
.btn-header-action { display:none; align-items:center; gap:7px; min-height:38px; padding:8px 13px; border:0; border-radius:8px; background:linear-gradient(135deg,var(--primary),var(--accent)); color:#fff; font-size:13px; font-weight:700; cursor:pointer; box-shadow:var(--shadow-sm); }
.btn-primary { background:linear-gradient(135deg,var(--primary),var(--accent)); border-color:var(--primary); }
.btn-primary:hover { background:linear-gradient(135deg,var(--navy),var(--primary)); }
.app-header { background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-bottom-color:var(--border); flex:0 0 auto; }
.header-month-nav { border-radius:9px; background:var(--bg); border-color:var(--border); }
.header-month-label { color:var(--navy); font-weight:700; }
.logo-v3,.logo-v3-xl { background:linear-gradient(135deg,var(--accent),var(--navy)); -webkit-background-clip:text; background-clip:text; }
#screen-auth { background:radial-gradient(circle at 16% 8%,rgba(46,109,168,.5),transparent 42%),linear-gradient(145deg,#0A2034,#0F2B46 55%,#153F64); }
.auth-card { border-radius:18px; }

.page-content .card { margin:0; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); }
.card-title { color:var(--navy); font-size:13px; }
.card-title > span { display:inline-flex; align-items:center; gap:7px; }
.card-title a,.text-button { color:var(--primary); font-weight:700; }
.card-title-pad { padding:16px 18px 12px; margin:0; border-bottom:1px solid var(--gray-100); }
.card-body-pad { padding:16px 18px; }
.card-flush { padding:0 !important; overflow:hidden; }
.card-title-note { color:var(--gray-400); font-size:11px; font-weight:600; }
.loading-copy { color:var(--gray-400); font-size:13px; text-align:center; padding:10px; }
.chart-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.text-button { border:0; background:none; cursor:pointer; font-size:12px; }

.dashboard-hero-grid { display:grid; grid-template-columns:1fr; gap:12px; margin-bottom:14px; }
.balance-card-main { margin:0; padding:22px; min-height:220px; border-radius:var(--radius-lg); background:linear-gradient(135deg,#0F2B46 0%,#1D4E7E 64%,#2E6DA8 100%); box-shadow:0 12px 28px rgba(15,43,70,.2); display:flex; flex-direction:column; justify-content:space-between; }
.balance-card-main.negative { background:linear-gradient(135deg,#452222,#793434 64%,#A33A3A); }
.balance-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.balance-label { letter-spacing:1.2px; font-size:10px; }
.status-pill { border:1px solid rgba(255,255,255,.24); background:rgba(255,255,255,.11); color:#fff; border-radius:999px; padding:4px 9px; font-size:10px; font-weight:700; }
.balance-card-main .balance-value { font-size:clamp(30px,7vw,44px); font-variant-numeric:tabular-nums; }
.balance-card-main .balance-row { border-top:1px solid rgba(255,255,255,.16); padding-top:16px; }
.kpi-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.kpi-grid .stat-card { margin:0; min-width:0; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.stat-icon.orange { color:#B45309; background:#FFF4DE; }
.stat-value.small { font-size:18px; }
.dashboard-alert { margin-bottom:14px; }
.dashboard-alert .alert { margin:0; }
.dashboard-main-grid { display:grid; grid-template-columns:1fr; gap:14px; }
.dashboard-column { display:grid; gap:14px; align-content:start; }
.contas-mes-card { cursor:pointer; transition:transform .15s,box-shadow .15s; }
.contas-mes-card:hover { transform:translateY(-1px); box-shadow:var(--shadow-lg); }
.comparison-content { display:grid; gap:10px; }
.comparison-row { display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid var(--gray-100); }
.comparison-row:last-child { border-bottom:0; }
.comparison-label { color:var(--gray-500); font-size:12px; }
.comparison-value { color:var(--navy); font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; }
.trend { font-size:11px; font-weight:700; margin-left:6px; }
.trend.good { color:var(--green); }.trend.bad { color:var(--red); }.trend.neutral { color:var(--gray-400); }

.planning-v3 { display:block; }
#page-planejamento > :not(.planning-v3) { display:none !important; }
.planning-health { margin-bottom:14px; }
.health-card { display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:center; padding:20px; background:linear-gradient(135deg,var(--navy),var(--primary)); color:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow); }
.health-score { width:72px; height:72px; border:7px solid rgba(255,255,255,.25); border-top-color:#7ED6A5; border-radius:50%; display:grid; place-items:center; font-size:20px; font-weight:800; }
.health-card h2 { font-size:18px; margin-bottom:4px; }.health-card p { color:rgba(255,255,255,.72); font-size:13px; line-height:1.45; }
.planning-grid { display:grid; grid-template-columns:1fr; gap:14px; }
.planning-main-card { min-height:300px; }
.planning-line { padding:13px 0; border-bottom:1px solid var(--gray-100); }
.planning-line:last-child { border-bottom:0; }
.planning-line-head { display:flex; justify-content:space-between; gap:12px; font-size:13px; margin-bottom:7px; }
.planning-line-head strong { color:var(--navy); }.planning-line-head span { color:var(--gray-500); font-variant-numeric:tabular-nums; }
.planning-bar { height:7px; border-radius:999px; background:var(--gray-100); overflow:hidden; }.planning-bar > i { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.planning-note { display:flex; gap:10px; padding:11px 0; border-bottom:1px solid var(--gray-100); font-size:13px; line-height:1.45; }.planning-note:last-child{border-bottom:0}.planning-note-icon{width:30px;height:30px;border-radius:8px;background:var(--primary-light);color:var(--primary);display:grid;place-items:center;flex:0 0 auto}.planning-note strong{display:block;color:var(--navy);margin-bottom:2px}.planning-note span{color:var(--gray-500)}

.monthly-detail-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.monthly-filter-bar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.monthly-filter-bar button { padding:9px 14px; border:1px solid var(--border); border-radius:999px; background:#FFF; color:var(--gray-600); font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
.monthly-filter-bar button[aria-pressed="true"] { background:var(--navy); border-color:var(--navy); color:#FFF; }
.monthly-breakdown { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.monthly-breakdown button { display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid #E3E7F3; border-radius:12px; background:#F3F5FF; padding:13px 14px; text-align:left; font-family:inherit; cursor:pointer; }
.monthly-breakdown span { font-size:11px; color:#667195; }
.monthly-breakdown strong { font-size:14px; color:var(--navy); font-variant-numeric:tabular-nums; white-space:nowrap; }
.monthly-filter-total { padding-bottom:12px; color:var(--navy); font-size:12px; font-weight:700; }
.monthly-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:12px; }
.monthly-list-toolbar .monthly-filter-total { padding:0; margin:0; }
.monthly-list-toolbar > span { display:inline-flex; align-items:center; gap:6px; color:var(--gray-500); font-size:11px; }
.monthly-detail-section[hidden],.monthly-detail-column[hidden] { display:none!important; }
.monthly-detail-grid.is-focused { grid-template-columns:1fr; }
.monthly-detail-grid { display:grid; grid-template-columns:1fr; gap:12px; align-items:start; }
.monthly-detail-column { display:contents; }
.monthly-detail-section { min-width:0; margin:0; }
#monthly-income { order:0; }#monthly-fixed { order:1; }#monthly-variable { order:2; }#monthly-cards { order:3; }
.monthly-detail-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 16px; border-bottom:0; background:linear-gradient(135deg,var(--primary),#7257D8); }
.monthly-detail-heading h2 { color:#FFF; font-size:16px; margin:0; }
.monthly-detail-heading p { color:rgba(255,255,255,.78); font-size:11px; margin:5px 0 0; line-height:1.5; }
.monthly-detail-heading > strong { color:#FFF; font-size:18px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.monthly-detail-payment-summary { display:flex; flex-wrap:wrap; gap:10px 24px; padding:16px 2px 20px; color:var(--gray-500); font-size:12px; }
.monthly-detail-payment-summary strong { color:var(--navy); }
.monthly-detail-row { display:grid; grid-template-columns:minmax(0,1fr) 125px auto; align-items:center; gap:16px; padding:7px 16px; border-bottom:1px solid var(--border-light); }
.monthly-row-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px; }
.monthly-row-actions button,.credit-tile-actions button { min-height:32px; border:1px solid #DDE3F1; border-radius:7px; padding:5px 9px; background:#FFF; color:#5365B4; font-family:inherit; font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap; }
.monthly-row-actions button.row-delete { color:#AE4D5B; border-color:#EED8DE; }
.monthly-row-actions .monthly-delete-button { display:inline-grid; width:32px; min-width:32px; height:32px; min-height:32px; place-items:center; padding:0; border-color:#EED8DE; color:var(--red); }
.monthly-row-actions .monthly-delete-button:hover { border-color:#DFA8B2; background:var(--red-light); }
.monthly-detail-row > .monthly-detail-side { max-width:none; }
.credit-tile-actions { display:flex; justify-content:space-between; gap:8px; margin-top:14px; }
.transaction-item .monthly-row-actions { flex-shrink:0; }
.invoice-purchase-row { grid-template-columns:34px minmax(0,1fr) auto auto; cursor:default; }
.invoice-purchase-description { border:0; padding:0; min-width:0; background:none; text-align:left; font-family:inherit; cursor:pointer; }
.invoice-purchase-description strong,.invoice-purchase-description small { display:block; }
.invoice-purchase-description strong { color:var(--navy); font-size:12px; }
.invoice-purchase-description small { margin-top:4px; color:var(--gray-500); font-size:10px; line-height:1.5; }
.monthly-detail-row:last-child { border-bottom:0; }
.monthly-detail-copy { min-width:0; }
.monthly-detail-copy > strong { display:block; color:var(--navy); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.monthly-detail-side { display:flex; align-items:flex-end; flex-direction:column; gap:5px; flex:0 0 auto; max-width:46%; text-align:right; }
.monthly-detail-side > strong { color:var(--navy); font-size:14px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.monthly-detail-side .text-button { font-size:11px; padding:3px 0; }
.monthly-detail-side > .monthly-income { color:var(--green); }
.monthly-status { color:var(--gray-500); font-size:10px; line-height:1.4; }
.monthly-detail-group { padding:6px 16px; background:var(--surface-soft); color:var(--gray-500); font-size:10px; text-transform:uppercase; font-weight:800; letter-spacing:.5px; }
.monthly-invoice { border-bottom:1px solid var(--border-light); }
.monthly-invoice:last-child { border-bottom:0; }
.monthly-invoice > .monthly-detail-row { border-bottom:0; }
.monthly-invoice-details { border-top:1px solid var(--border-light); background:var(--surface-soft); }
.monthly-invoice-details[hidden] { display:none; }
.monthly-invoice-details .monthly-detail-row { padding-left:32px; background:var(--surface-soft); }
.monthly-invoice-heading { display:flex; justify-content:space-between; gap:16px; padding:16px 18px 10px; }
.monthly-invoice-heading > div:first-child { min-width:0; }
.monthly-invoice-heading > div:first-child > strong { display:block; color:var(--navy); font-size:13px; }
.monthly-invoice-heading > div:first-child > span { display:block; color:var(--gray-500); font-size:10px; line-height:1.6; margin-top:5px; }
.monthly-invoice-empty { padding:0 18px 14px; color:var(--gray-500); font-size:11px; }
.monthly-invoice-purchases > summary { cursor:pointer; color:var(--primary); font-size:11px; font-weight:700; padding:4px 18px 14px; }
.monthly-invoice-purchases .monthly-detail-row { background:var(--surface-soft); }
.monthly-mobile-link { width:100%; border:0; text-align:left; background:var(--white); font-family:inherit; cursor:pointer; }
.monthly-mobile-link .settings-item-title,.monthly-mobile-link .settings-item-sub { display:block; }
.module-kpi-value.monthly-negative { color:var(--red); }
@media (max-width:1000px) { .monthly-detail-grid { grid-template-columns:1fr; } }
@media (max-width:599px) {
  .monthly-filter-bar { flex-wrap:nowrap; overflow-x:auto; padding:2px 0 8px; margin-bottom:10px; scrollbar-width:thin; }
  .monthly-filter-bar button { flex-shrink:0; }
  .monthly-breakdown { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .monthly-breakdown button { display:block; padding:9px 8px; }
  .monthly-breakdown span { display:block; min-height:24px; font-size:10px; }
  .monthly-breakdown strong { display:block; font-size:clamp(11px,3.1vw,13px); margin-top:3px; }
  .monthly-detail-heading p { display:none; }
  .monthly-detail-row { padding-top:7px; padding-bottom:7px; }
  .monthly-detail-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .monthly-detail-summary .module-kpi { padding:11px 12px; }
  .monthly-detail-summary .module-kpi-label { font-size:9px; }
  .monthly-detail-summary .module-kpi-sub { display:none; }
  .monthly-detail-row { grid-template-columns:minmax(0,1fr) auto; gap:6px 10px; }
  .monthly-detail-row > .monthly-row-actions { grid-column:1 / -1; }
  .monthly-row-actions button { min-height:36px; }
  .invoice-purchase-row { grid-template-columns:26px minmax(0,1fr) auto; gap:8px; padding:10px 12px; }
  .invoice-purchase-row > .monthly-row-actions { grid-column:2 / -1; }
  .invoice-purchase-icon { width:26px; height:26px; }
  .transaction-item { flex-wrap:wrap; }
  .transaction-item .monthly-row-actions { margin-left:auto; }
  .monthly-detail-heading { padding:16px 12px; gap:8px; }
  .monthly-detail-heading h2 { font-size:14px; }
  .monthly-detail-heading > strong { font-size:16px; }
  .monthly-detail-row,.monthly-invoice-heading { padding-left:12px; padding-right:12px; gap:10px; }
  .monthly-detail-side > strong { font-size:13px; }
  .monthly-list-toolbar { align-items:flex-start; flex-direction:column; gap:6px; }
}

.module-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.module-kpi { padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); min-width:0; }
.module-kpi-label { color:var(--gray-500); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.7px; }
.module-kpi-value { color:var(--navy); font-size:20px; font-weight:800; margin-top:6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.module-kpi-sub { color:var(--gray-400); font-size:11px; margin-top:3px; }
.content-two-columns { display:grid; grid-template-columns:1fr; gap:14px; align-items:start; }
.shopping-item,.maintenance-item { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--gray-100); }
.shopping-item:last-child,.maintenance-item:last-child { border-bottom:0; }
.item-icon { width:38px; height:38px; border-radius:10px; background:var(--primary-light); color:var(--primary); display:grid; place-items:center; flex:0 0 auto; }
.item-main { flex:1; min-width:0; }.item-title{font-size:13px;font-weight:700;color:var(--navy)}.item-meta{font-size:11px;color:var(--gray-400);margin-top:2px}.item-amount{font-size:14px;font-weight:800;color:var(--navy);font-variant-numeric:tabular-nums;white-space:nowrap}
.insight-box { padding:13px; border-radius:9px; background:var(--bg); border:1px solid var(--border); margin-bottom:9px; }.insight-box:last-child{margin-bottom:0}.insight-box strong{display:block;font-size:13px;color:var(--navy);margin-bottom:3px}.insight-box span{font-size:12px;color:var(--gray-500);line-height:1.45}
.vehicle-list { display:grid; gap:10px; }
.vehicle-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); }
.vehicle-card-head { display:flex; align-items:center; gap:12px; }.vehicle-glyph{width:48px;height:48px;border-radius:12px;background:var(--navy);color:#fff;display:grid;place-items:center}.vehicle-info{flex:1}.vehicle-info h3{font-size:16px;color:var(--navy)}.vehicle-info p{font-size:11px;color:var(--gray-400);margin-top:3px}.vehicle-owner{font-size:10px;font-weight:800;text-transform:uppercase;color:var(--primary);background:var(--primary-light);padding:4px 8px;border-radius:999px}.vehicle-meta-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:16px}.vehicle-meta{padding:10px;background:var(--bg);border-radius:8px}.vehicle-meta span{display:block;color:var(--gray-400);font-size:10px;text-transform:uppercase}.vehicle-meta strong{display:block;color:var(--navy);font-size:13px;margin-top:3px;font-variant-numeric:tabular-nums}
.migration-notice { margin:12px; padding:14px; border:1px dashed var(--border-strong); border-radius:9px; background:var(--bg); color:var(--gray-500); font-size:12px; line-height:1.5; }
.form-row { display:grid; grid-template-columns:1fr; gap:0; }.modal-actions{display:flex;gap:10px;margin-top:8px}

.bottom-nav { border-radius:18px; bottom:max(8px,env(safe-area-inset-bottom)); left:8px; right:8px; box-shadow:0 10px 28px rgba(15,43,70,.18); }
.nav-fab { background:linear-gradient(135deg,var(--primary),var(--accent)); box-shadow:var(--shadow-primary); }

@media (min-width:600px) {
  .pages-container { max-width:none; margin:0; }
  .bottom-nav { left:50%; right:auto; width:calc(100% - 32px); max-width:640px; transform:translateX(-50%); }
  .page-content { padding-left:24px; padding-right:24px; }
  .dashboard-hero-grid { grid-template-columns:minmax(300px,1.2fr) minmax(320px,1fr); }
  .balance-card-main { min-height:260px; }
  .dashboard-main-grid { grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); }
  .planning-grid { grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); }
  .planning-main-card { grid-row:span 2; }
  .module-summary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .content-two-columns { grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr); }
  .form-row { grid-template-columns:1fr 1fr; gap:10px; }
}

@media (min-width:1024px) {
  #screen-app.active { display:grid !important; grid-template-columns:244px minmax(0,1fr); grid-template-rows:var(--header-h) minmax(0,1fr); }
  .app-sidebar { display:flex; grid-row:1 / 3; grid-column:1; flex-direction:column; background:var(--navy); color:#fff; padding:22px 14px 16px; min-height:100dvh; }
  .sidebar-brand { display:flex; align-items:center; gap:11px; padding:0 8px 24px; }.brand-mark{width:40px;height:40px;border-radius:10px;background:linear-gradient(135deg,#5A9BD4,#fff);color:var(--navy);display:grid;place-items:center;font-weight:900;font-size:17px}.sidebar-brand div{min-width:0}.sidebar-brand strong{display:block;font-size:14px}.sidebar-brand span:not(.brand-mark){display:block;font-size:10px;color:rgba(255,255,255,.52);margin-top:2px}
  .sidebar-nav { display:flex; flex-direction:column; gap:3px; flex:1; overflow-y:auto; scrollbar-width:none; }.sidebar-nav::-webkit-scrollbar{display:none}.side-nav-label{padding:14px 12px 6px;color:rgba(255,255,255,.38);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:1.3px}.side-nav-item{width:100%;display:flex;align-items:center;gap:11px;border:0;background:transparent;color:rgba(255,255,255,.68);border-radius:8px;padding:9px 11px;font-size:13px;font-weight:600;cursor:pointer;text-align:left}.side-nav-item:hover{background:rgba(255,255,255,.07);color:#fff}.side-nav-item.active{background:#fff;color:var(--navy);box-shadow:0 4px 14px rgba(0,0,0,.12)}.side-nav-item svg{width:17px;height:17px}.sidebar-footer{border-top:1px solid rgba(255,255,255,.1);padding-top:10px}.version-stamp{display:block;color:rgba(255,255,255,.34);font-size:9px;padding:10px 11px 0}
  .app-header { grid-column:2; grid-row:1; position:relative; padding:0 28px; }
  .pages-container { grid-column:2; grid-row:2; height:100%; max-width:none; padding-bottom:0; }
  .bottom-nav { display:none; }
  .mobile-brand { display:none; }
  .btn-header-action { display:inline-flex; }
  .page-content { padding:28px 30px 48px; }
  .page:not(#page-dashboard):not(#page-planejamento):not(#page-compras):not(#page-veiculos):not(#page-lancamentos) { max-width:1100px; margin-left:auto; margin-right:auto; }
  #page-lancamentos.page { max-width:760px; margin-left:auto; margin-right:auto; }
  .modal-sheet { max-width:560px; }
}

@media (max-width:599px) {
  .page-heading { align-items:flex-start; flex-direction:column; margin-bottom:16px; }
  .quick-actions { width:100%; }.quick-actions .btn{flex:1;min-width:0;padding-left:8px;padding-right:8px}
  .dashboard-simple .quick-actions { display:grid; grid-template-columns:1fr 1fr; }
  .balance-card-main { min-height:230px; }
  .balance-card-main .balance-row { gap:8px; }.balance-card-main .balance-item{min-width:0;gap:6px}.balance-card-main .balance-item-icon{width:28px;height:28px}.balance-card-main .balance-item-value{font-size:12.5px;white-space:nowrap}
  .kpi-grid .stat-card { padding:13px; }.kpi-grid .stat-value{font-size:20px}
  .module-kpi { padding:13px; }.module-kpi-value{font-size:17px}
  .bill-item { align-items:flex-start; flex-wrap:wrap; }.bill-amount{margin-left:auto}.bill-pay-btn{margin-left:38px}
  .page-content .chart-container { min-height:210px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ============================================================
   V3.2 · AURORA AZUL-VIOLETA
   Gradientes pontuais, superfícies claras e contraste confortável
   ============================================================ */
:root {
  --navy:#28335F;
  --primary:#5368D9;
  --primary-dark:#4052B5;
  --primary-light:#EEF1FF;
  --primary-soft-fg:#4659C0;
  --accent:#8763DE;
  --bg:#F7F7FC;
  --surface:#FFFFFF;
  --surface-alt:#FBFAFF;
  --border:#E2E4F0;
  --border-strong:#CDD1E3;
  --gray-50:#FAFAFD;
  --gray-100:#F0F1F7;
  --gray-200:#E2E4F0;
  --gray-300:#C7CBDC;
  --gray-400:#898FA7;
  --gray-500:#6D738C;
  --gray-600:#595F78;
  --gray-700:#444A65;
  --gray-800:#303650;
  --gray-900:#202640;
  --green:#4E8069;
  --green-light:#EAF5EF;
  --green-soft-fg:#3F6A56;
  --red:#A46072;
  --red-light:#F8EBF0;
  --red-soft-fg:#875063;
  --yellow:#A67C46;
  --yellow-light:#FAF1E3;
  --yellow-soft-fg:#805F35;
  --blue:#5368D9;
  --blue-light:#EEF1FF;
  --shadow-sm:0 1px 2px rgba(40,51,95,.04);
  --shadow:0 1px 2px rgba(40,51,95,.045),0 8px 22px rgba(73,65,130,.055);
  --shadow-lg:0 16px 42px rgba(67,58,126,.12);
  --shadow-primary:0 9px 24px rgba(83,104,217,.22);
  --radius-sm:10px;
  --radius:14px;
  --radius-lg:18px;
  --radius-xl:22px;
}

html,body,.pages-container { background:linear-gradient(145deg,#F8FAFF 0%,#F8F6FC 55%,#FBF9FF 100%); }
#screen-auth { background:radial-gradient(circle at 18% 12%,rgba(94,118,224,.52),transparent 42%),radial-gradient(circle at 82% 84%,rgba(135,99,222,.42),transparent 46%),linear-gradient(145deg,#202A58 0%,#342B68 100%); }
.app-header { background:rgba(255,255,255,.88); border-color:var(--border); }
.header-month-nav { background:#F4F5FB; }
.btn-primary,.btn-header-action { background:linear-gradient(135deg,#4E70DC 0%,#725DD8 100%); border-color:#5967D2; box-shadow:var(--shadow-primary); }
.btn-primary:hover,.btn-header-action:hover { background:linear-gradient(135deg,#435FC4 0%,#654BC8 100%); }
.btn-outline { border-color:var(--border-strong); color:var(--gray-700); background:rgba(255,255,255,.8); }
.btn-outline:hover { border-color:var(--primary); color:var(--primary-dark); background:var(--primary-light); }
.page-heading h1,.launch-heading h1 { color:var(--gray-900); font-weight:750; }
.eyebrow { color:var(--primary); }
.page-content .card { border-color:var(--border); box-shadow:var(--shadow); background:rgba(255,255,255,.92); }

.balance-card-main,.balance-card-main.negative {
  color:var(--gray-900);
  background:
    radial-gradient(circle at 88% 16%,rgba(135,99,222,.14),transparent 34%),
    linear-gradient(135deg,#EDF3FF 0%,#F1EEFF 58%,#FAF8FF 100%);
  border:1px solid #DCE1F2;
  box-shadow:0 12px 30px rgba(73,72,137,.10);
}
.balance-card-main .balance-value { color:#2C3B73; text-shadow:none; }
.balance-card-main .balance-label,.balance-card-main .balance-item-label { color:#727A9A; }
.balance-card-main .balance-row { border-top-color:rgba(83,104,217,.12); }
.balance-card-main .balance-item-value.income { color:#4E7662; }
.balance-card-main .balance-item-value.expense { color:#956866; }
.balance-card-main .balance-item-icon.income { color:#557C68; background:#DDECE2; }
.balance-card-main .balance-item-icon.expense { color:#956866; background:#F1E2E0; }
.status-pill { color:#5261B5; background:rgba(255,255,255,.66); border-color:rgba(83,104,217,.22); }
.kpi-grid .stat-card { background:rgba(255,255,255,.9); box-shadow:var(--shadow); }
.stat-icon { background:#EDF0FF; color:#5368D9; }
.stat-icon.green { background:#E8F1EB; color:#557C68; }
.stat-icon.orange { background:#F7EFE2; color:#9B7647; }
.alert-success { background:#ECF4EE; border-color:#D7E7DC; color:#456957; }
.alert-warning { background:#F8F1E5; border-color:#EADCC5; color:#806239; }
.alert-danger { background:#F7ECEA; border-color:#ECD8D5; color:#875653; }
.progress-bar-fill { background:linear-gradient(90deg,#5578DE,#8662DB); }
.nav-fab { background:linear-gradient(135deg,#4E70DC,#7A5CDA); box-shadow:0 9px 22px rgba(83,104,217,.28); }
.bottom-nav { background:rgba(255,255,255,.95); border-color:var(--border); box-shadow:0 10px 30px rgba(52,52,104,.11); }
.nav-item.active { color:var(--primary-dark); }

@media (min-width:1024px) {
  .app-sidebar { background:linear-gradient(180deg,#EFF3FF 0%,#F4F0FC 100%); color:var(--gray-800); border-right:1px solid #E0E2F0; }
  .brand-mark { background:linear-gradient(135deg,#5676DF 0%,#8962DD 100%); color:#fff; box-shadow:0 8px 18px rgba(83,104,217,.20); }
  .sidebar-brand strong { color:var(--gray-900); }
  .sidebar-brand span:not(.brand-mark) { color:var(--gray-500); }
  .side-nav-label { color:#91A09A; }
  .side-nav-item { color:#66766F; }
  .side-nav-item:hover { background:rgba(255,255,255,.62); color:var(--gray-900); }
  .side-nav-item.active { background:rgba(255,255,255,.94); color:#4759BE; box-shadow:0 4px 14px rgba(67,65,123,.08); }
  .sidebar-footer { border-top-color:#D8E1DC; }
  .version-stamp { color:#95A19C; }
}

.attention-card { border-color:#DCE5E1 !important; }
.attention-list { display:grid; }
.attention-item { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:11px; align-items:center; padding:13px 18px; border-bottom:1px solid var(--gray-100); }
.attention-item:last-child { border-bottom:0; }
.attention-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:var(--primary-dark); background:linear-gradient(135deg,#EBF0FF,#F0EBFF); }
.attention-icon.overdue { color:var(--red-soft-fg); background:var(--red-light); }
.attention-copy { min-width:0; }
.attention-copy strong { display:block; color:var(--gray-800); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.attention-copy span { display:block; color:var(--gray-400); font-size:11px; margin-top:2px; }
.attention-side { text-align:right; }
.attention-side strong { display:block; color:var(--gray-700); font-size:13px; font-variant-numeric:tabular-nums; }
.attention-side button { border:0; background:none; color:var(--primary-dark); font-size:11px; font-weight:700; cursor:pointer; margin-top:2px; }
.all-clear { display:flex; gap:12px; align-items:center; padding:18px; color:var(--gray-600); }
.all-clear-icon { width:40px; height:40px; display:grid; place-items:center; flex:0 0 auto; border-radius:12px; color:var(--green); background:var(--green-light); }
.all-clear strong { display:block; color:var(--gray-800); font-size:13px; }.all-clear span{display:block;font-size:12px;color:var(--gray-400);margin-top:3px}

.launch-content { padding-top:12px !important; padding-bottom:36px !important; }
.launch-heading { margin:4px 0 18px; }
.launch-heading h1 { font-size:28px; letter-spacing:-.6px; margin:3px 0 5px; }
.launch-heading p { color:var(--gray-500); font-size:13px; }
.launch-mode-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-bottom:18px; }
.launch-mode { display:flex; min-width:0; flex-direction:column; align-items:flex-start; gap:5px; padding:13px; border:1px solid var(--border); border-radius:13px; background:var(--surface); color:var(--gray-600); text-align:left; cursor:pointer; transition:border-color .15s,background .15s; }
.launch-mode:hover,.launch-mode.active { border-color:#B8C0EA; background:linear-gradient(135deg,#F0F4FF,#F4F0FF); color:var(--primary-dark); }
.launch-mode svg { width:17px; height:17px; }
.launch-mode strong { color:var(--gray-800); font-size:12px; }
.launch-mode small { color:var(--gray-400); font-size:10px; line-height:1.3; }
.field-help { color:var(--gray-400); font-size:11px; line-height:1.45; margin-top:5px; }
.soft-callout { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px 13px; margin:-2px 0 18px; border:1px solid #DEE1F3; border-radius:12px; background:linear-gradient(135deg,#F2F5FF,#F6F2FF); color:var(--primary-dark); }
.soft-callout strong { display:block; font-size:12px; }.soft-callout span{display:block;color:var(--gray-500);font-size:10.5px;margin-top:2px;line-height:1.35}.soft-callout button{border:0;background:transparent;color:var(--primary-dark);font-size:11px;font-weight:800;cursor:pointer}
.section-support-copy { margin:0 16px 10px; max-width:680px; color:var(--gray-500); font-size:12px; line-height:1.45; }
.modal-intro { color:var(--gray-500); font-size:12px; line-height:1.5; margin:-6px 0 16px; }
.settings-actions { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.modal-overlay { background:rgba(42,58,54,.30); backdrop-filter:blur(4px); }
.modal-sheet { background:#FFFFFF; border:1px solid rgba(226,228,240,.95); }
.form-control { border-color:var(--border); background:#FFFFFF; }
.form-control:focus { border-color:#8C9BE2; box-shadow:0 0 0 3px rgba(83,104,217,.13); }
.type-toggle { background:#EFF0F6; }
.type-toggle button.active.despesa { background:#F4E9E7; color:#8D5F5C; }
.type-toggle button.active.receita { background:#E7F0EA; color:#4E725F; }

@media (max-width:599px) {
  .launch-mode-grid { grid-template-columns:1fr; }
  .launch-mode { display:grid; grid-template-columns:24px minmax(0,1fr); column-gap:8px; padding:11px 12px; }
  .launch-mode svg { grid-row:1 / 3; align-self:center; }
  .launch-mode strong,.launch-mode small { grid-column:2; }
  .soft-callout { grid-template-columns:auto minmax(0,1fr); }.soft-callout button{grid-column:2;justify-self:start;padding:4px 0}
  .attention-item { grid-template-columns:34px minmax(0,1fr); }.attention-side{grid-column:2;text-align:left;display:flex;gap:8px;align-items:center}.attention-side strong{font-size:12px}.attention-side button{margin:0}
}

/* ============================================================
   V3.3 · FECHAMENTO MENSAL SIMPLES
   ============================================================ */
.dashboard-simple { max-width:1220px; }
.resource-overview { display:grid; grid-template-columns:minmax(260px,.86fr) minmax(0,1.5fr); overflow:hidden; margin-bottom:14px; border:1px solid var(--border); border-radius:20px; background:rgba(255,255,255,.94); box-shadow:var(--shadow); }
.resource-primary { grid-row:1 / 3; padding:24px; color:#fff; background:linear-gradient(145deg,#263866,#4559B9 58%,#7258CF); }
.resource-primary > span { display:block; color:rgba(255,255,255,.72); font-size:11px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.resource-primary > strong { display:block; margin:9px 0 8px; font-size:34px; font-variant-numeric:tabular-nums; letter-spacing:-.04em; }
.resource-primary > strong.negative { color:#FFD6DC; }
.resource-primary p { max-width:290px; margin:0; color:rgba(255,255,255,.72); font-size:11px; line-height:1.5; }
.resource-primary button { margin-top:17px; border:1px solid rgba(255,255,255,.28); border-radius:9px; padding:8px 11px; background:rgba(255,255,255,.12); color:#fff; font-size:11px; font-weight:800; cursor:pointer; }
.resource-metrics { display:grid; grid-template-columns:repeat(4,1fr); }
.resource-metrics > div { padding:21px 18px; border-left:1px solid var(--border-light); }
.resource-metrics span,.resource-metrics small { display:block; color:var(--gray-500); font-size:10px; }
.resource-metrics span { font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.resource-metrics strong { display:block; margin:7px 0 3px; color:var(--navy); font-size:20px; font-variant-numeric:tabular-nums; }
.resource-account-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:10px 16px; border-top:1px solid var(--border-light); }
.resource-account-strip button.resource-account { display:flex; width:100%; min-width:0; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--border); border-radius:10px; padding:9px 10px; background:var(--surface-soft); color:var(--gray-600); cursor:pointer; }
.resource-account-strip .resource-account > span { display:flex; min-width:0; flex:1; flex-direction:column; gap:2px; overflow:hidden; text-align:left; }
.resource-account-strip .resource-account b { overflow:hidden; color:var(--gray-700); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.resource-account-strip .resource-account small { overflow:hidden; color:var(--gray-500); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.resource-account-strip .resource-account strong { color:var(--navy); font-size:10px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dashboard-invoices-card { margin-bottom:14px; }
.dashboard-invoice-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:10px 14px 14px; }
.dashboard-invoice-tile { display:flex; min-width:0; flex-direction:column; gap:10px; border:1px solid var(--border); border-top:3px solid var(--account-color); border-radius:12px; padding:12px; background:#fff; color:inherit; cursor:pointer; text-align:left; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.dashboard-invoice-tile:hover { transform:translateY(-2px); border-color:#C7D0EF; box-shadow:0 10px 22px rgba(52,62,125,.10); }
.dashboard-invoice-head { display:flex; min-width:0; align-items:center; gap:7px; }
.dashboard-invoice-head i { display:inline-flex; width:27px; height:27px; align-items:center; justify-content:center; flex:0 0 auto; border-radius:8px; background:color-mix(in srgb,var(--account-color) 12%,white); color:var(--account-color); font-style:normal; }
.dashboard-invoice-head b { overflow:hidden; color:var(--navy); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-invoice-value small,.dashboard-invoice-footer { display:block; color:var(--gray-500); font-size:10px; }
.dashboard-invoice-value strong { display:block; overflow:hidden; margin-top:3px; color:var(--navy); font-size:18px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-invoice-footer { overflow:hidden; margin-top:auto; text-overflow:ellipsis; white-space:nowrap; }

/* Accounts financial center */
.accounts-page { max-width:1196px; }
.heading-actions { display:flex; flex-wrap:wrap; gap:8px; }
.accounts-balance-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(340px,1fr); gap:24px; padding:28px; border:1px solid #DCE2F5; border-radius:20px; background:linear-gradient(135deg,#F1F5FF 0%,#F4F0FF 55%,#FCF7FF 100%); box-shadow:0 16px 42px rgba(73,83,157,.09); }
.accounts-total-copy { display:flex; min-width:0; flex-direction:column; justify-content:center; }
.accounts-total-copy > span { color:#6C7393; font-size:12px; font-weight:750; letter-spacing:.07em; text-transform:uppercase; }
.accounts-total-copy > strong { margin-top:5px; color:#2C3B73; font-size:clamp(34px,6vw,52px); font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.04em; }
.accounts-total-copy > p { max-width:520px; margin:8px 0 0; color:#6B728A; font-size:13px; line-height:1.5; }
.accounts-owner-balances { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; align-self:center; border:1px solid rgba(100,112,181,.14); border-radius:15px; background:rgba(255,255,255,.68); }
.accounts-owner-balances > div { min-width:0; padding:18px 14px; border-left:1px solid rgba(100,112,181,.12); }
.accounts-owner-balances > div:first-child { border-left:0; }
.accounts-owner-balances span { display:block; color:#7A809B; font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.accounts-owner-balances strong { display:block; overflow:hidden; margin-top:5px; color:#394777; font-size:15px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.accounts-section { margin-top:26px; }
.accounts-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:11px; }
.accounts-section-head h2 { margin:3px 0 0; color:var(--navy); font-size:20px; letter-spacing:-.02em; }
.accounts-grid,.credit-accounts-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.account-tile,.credit-account-tile { position:relative; overflow:hidden; min-width:0; border:1px solid var(--border); border-radius:15px; background:var(--white); box-shadow:var(--shadow-sm); cursor:pointer; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.account-tile:hover,.credit-account-tile:hover { transform:translateY(-2px); border-color:#C8D0EF; box-shadow:0 12px 30px rgba(55,65,130,.10); }
.account-tile::before,.credit-account-tile::before { position:absolute; top:0; right:0; left:0; height:3px; background:var(--account-color); content:""; }
.account-tile { display:flex; min-height:174px; flex-direction:column; padding:18px; }
.account-tile-head,.credit-account-head > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.account-tile .account-icon,.credit-account-tile .account-icon { display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; border-radius:10px; background:color-mix(in srgb,var(--account-color) 12%,white); color:var(--account-color); }
.account-owner { color:#727A96; font-size:10px; font-weight:750; letter-spacing:.06em; text-transform:uppercase; }
.account-tile .account-info { margin-top:16px; }
.account-tile .account-name { color:var(--navy); font-size:16px; }
.account-tile .account-bank { margin-top:4px; color:var(--gray-500); }
.account-tile-value { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-top:auto; padding-top:17px; }
.account-tile-value span { color:var(--gray-500); font-size:11px; }
.account-tile-value strong { font-size:20px; font-variant-numeric:tabular-nums; }
.account-tile-value strong.positive { color:#456F5A; }
.account-tile-value strong.negative { color:#A35353; }
.credit-account-tile { min-height:238px; padding:18px; }
.credit-account-head > strong { display:block; margin-top:14px; color:var(--navy); font-size:17px; }
.credit-account-head > small { display:block; margin-top:2px; color:var(--gray-500); }
.credit-account-values { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.credit-account-values > div { min-width:0; }
.credit-account-values span { display:block; color:var(--gray-500); font-size:10px; }
.credit-account-values strong { display:block; overflow:hidden; margin-top:4px; color:#34416F; font-size:15px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.credit-account-tile .progress-bar-track { margin-top:16px; }
.credit-account-tile > p { margin:7px 0 0; color:var(--gray-500); font-size:10px; }
.credit-account-dates { display:flex; justify-content:space-between; gap:10px; margin-top:17px; padding-top:13px; border-top:1px solid var(--border-light); color:#727A96; font-size:10px; }
.accounts-empty { display:flex; min-height:170px; width:100%; flex-direction:column; align-items:center; justify-content:center; gap:7px; border:1px dashed #C8CFE8; border-radius:15px; background:#FAFBFF; color:#6873A4; cursor:pointer; }
.accounts-empty strong { color:#3F4B78; font-size:14px; }
.accounts-empty small { color:#858BA3; }
.accounts-transfers-card { margin-top:26px; }
.account-transfer-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px 16px; border-top:1px solid var(--border-light); }
.account-transfer-row:first-child { border-top:0; }
.transfer-icon { display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; border-radius:10px; background:#EEF0FF; color:#5968B5; }
.account-transfer-row div { min-width:0; }
.account-transfer-row div strong,.account-transfer-row div small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-transfer-row div strong { color:var(--gray-800); font-size:12px; }
.account-transfer-row div small { margin-top:3px; color:var(--gray-500); font-size:10px; }
.account-transfer-row > strong { color:#445782; font-size:13px; font-variant-numeric:tabular-nums; }
.account-credit-fields { margin-bottom:14px; padding:14px; border:1px solid #DFE3F2; border-radius:12px; background:#F8F9FE; }

@media (max-width: 900px) {
  .accounts-balance-hero { grid-template-columns:1fr; }
  .accounts-grid,.credit-accounts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .accounts-page .page-heading { align-items:flex-start; }
  .accounts-page .heading-actions { width:100%; }
  .accounts-page .heading-actions .btn { flex:1; }
  .accounts-balance-hero { gap:18px; padding:20px 16px; border-radius:16px; }
  .accounts-total-copy > strong { font-size:35px; }
  .accounts-owner-balances { grid-template-columns:1fr; }
  .accounts-owner-balances > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; border-top:1px solid rgba(100,112,181,.12); border-left:0; }
  .accounts-owner-balances > div:first-child { border-top:0; }
  .accounts-owner-balances strong { margin-top:0; }
  .accounts-grid,.credit-accounts-grid { grid-template-columns:1fr; }
  .account-tile { min-height:156px; }
  .account-transfer-row { grid-template-columns:30px minmax(0,1fr); }
  .account-transfer-row > strong { grid-column:2; margin-top:-6px; }
}
.resource-upcoming-plan { border-top:1px solid var(--border-light); }
.resource-upcoming-plan button { display:flex; width:100%; align-items:center; justify-content:space-between; gap:12px; border:0; padding:12px 16px; background:#F7F8FC; color:var(--gray-600); cursor:pointer; text-align:left; }
.resource-upcoming-plan span { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.resource-upcoming-plan strong { color:var(--primary-dark); font-size:11px; text-align:right; }
.month-closing-card { color:var(--navy); padding:20px 22px; border:1px solid #DDE2EF; border-top:4px solid #5968B5; border-radius:18px; background:#fff; box-shadow:0 12px 30px rgba(55,65,110,.08); }
.month-closing-card.positive { border-top-color:#5F8C74; background:#FDFFFE; }
.month-closing-card.negative { border-top-color:#B36262; background:#FFFDFD; }
.month-closing-head { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-bottom:13px; border-bottom:1px solid var(--border-light); }
.month-closing-head > div { display:flex; flex-direction:column; gap:3px; }
.month-closing-head span { font-size:11px; text-transform:uppercase; letter-spacing:.09em; color:var(--gray-500); }
.month-closing-head strong { font-size:16px; }
.month-closing-card .status-pill { background:#EEF1FF; color:#4D5CA8; border-color:#D8DEF8; }
.month-closing-card.positive .status-pill { background:#EAF5EF; color:#476C5A; border-color:#D5E8DD; }
.month-closing-card.negative .status-pill { background:#FBECEE; color:#9A4F55; border-color:#F0D4D7; }
.closing-numbers { display:grid; grid-template-columns:1fr auto 1fr auto 1.15fr; gap:22px; align-items:center; padding:19px 0; }
.closing-number { min-width:0; }
.closing-number span { display:block; color:var(--gray-500); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.closing-number strong { display:block; margin:7px 0 3px; font-size:clamp(25px,3vw,38px); line-height:1; font-variant-numeric:tabular-nums; letter-spacing:-.035em; }
.closing-number small { color:var(--gray-500); font-size:11px; }
.closing-number.balance { padding:15px 18px; border:1px solid #E1E4F0; border-radius:14px; background:#F5F6FB; }
.month-closing-card.positive .closing-number.balance { border-color:#D8E9DF; background:#F1F8F4; }
.month-closing-card.positive .closing-number.balance strong { color:#476C5A; }
.month-closing-card.negative .closing-number.balance { border-color:#F0DCDD; background:#FCF3F3; }
.month-closing-card.negative .closing-number.balance strong { color:#A34F56; }
.closing-operator { color:#A4A9BB; font-size:25px; font-weight:300; }
.closing-footer { display:grid; grid-template-columns:160px 180px 1fr; gap:22px; align-items:center; padding-top:13px; border-top:1px solid var(--border-light); }
.closing-footer > div:not(.closing-progress) { display:flex; flex-direction:column; gap:3px; }
.closing-footer span { color:var(--gray-500); font-size:11px; }
.closing-footer strong { font-size:17px; font-variant-numeric:tabular-nums; }
.closing-progress { display:flex; flex-direction:column; gap:7px; }
.month-closing-card .progress-bar-track { height:7px; background:#ECEEF5; }
.month-closing-card .progress-bar-fill { background:#6876C9; }
.month-closing-card.positive .progress-bar-fill { background:#6F9C82; }
.direct-answer { display:flex; align-items:flex-start; gap:12px; margin:14px 0; padding:14px 16px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.direct-answer > span { display:flex; margin-top:1px; }
.direct-answer strong { display:block; color:var(--navy); font-size:14px; }
.direct-answer p { margin:3px 0 0; color:var(--gray-500); font-size:12px; line-height:1.45; }
.direct-answer.positive { background:#F3FAF6; border-color:#D8EBDD; }
.direct-answer.positive > span { color:#4E8069; }
.direct-answer.negative { background:var(--red-light); border-color:#EFD9E0; }
.direct-answer.negative > span { color:var(--red); }
.monthly-ledger-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:stretch; }
.ledger-card { display:flex; min-height:438px; margin:0; flex-direction:column; }
.card-title-actions { display:flex; align-items:center; gap:10px; }
.ledger-list { flex:1; min-height:322px; border-top:1px solid var(--border-light); }
.ledger-list.is-collapsed { height:322px; max-height:322px; overflow:hidden; }
.ledger-card.expanded .ledger-list { height:auto; max-height:none; }
.ledger-expand { color:#6B5FC1; }
.ledger-group-title { padding:10px 16px 6px; background:var(--surface-soft); color:var(--gray-500); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.ledger-row { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:54px; padding:10px 16px; border-bottom:1px solid var(--border-light); }
.ledger-row:last-child { border-bottom:0; }
.ledger-row.paid { background:linear-gradient(90deg,rgba(234,245,239,.48),transparent 42%); }
.ledger-row.pending { background:linear-gradient(90deg,rgba(252,239,243,.42),transparent 42%); }
.ledger-copy { min-width:0; }
.ledger-copy strong { display:block; color:var(--navy); font-size:13px; line-height:1.25; }
.ledger-copy span { display:block; margin-top:3px; color:var(--gray-500); font-size:11px; }
.ledger-side { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-shrink:0; }
.ledger-side > strong { color:var(--navy); font-size:13px; font-variant-numeric:tabular-nums; }
.ledger-row.income .ledger-side > strong { color:var(--green); }
.ledger-status { min-width:56px; padding:4px 7px; border-radius:999px; font-size:9px; font-weight:800; text-align:center; text-transform:uppercase; letter-spacing:.04em; }
.ledger-status.paid { background:var(--green-light); color:var(--green); }
.ledger-status.pending { background:var(--red-light); color:var(--red); }
.ledger-pay { border:0; border-radius:7px; padding:6px 9px; background:var(--primary-light); color:var(--primary-dark); font-size:10px; font-weight:800; cursor:pointer; }
.ledger-total { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; background:var(--surface-soft); border-top:1px solid var(--border); color:var(--navy); }
.ledger-total span { font-size:12px; font-weight:700; }
.ledger-total strong { font-size:18px; font-variant-numeric:tabular-nums; }
.ledger-total.income strong { color:var(--green); }
.ledger-total.expense strong { color:var(--red); }
.dashboard-life-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; align-items:start; }
.dashboard-life-grid > .card { margin:0; }
.limit-list,.goal-list { border-top:1px solid var(--border-light); }
.limit-row,.goal-row { position:relative; padding:14px 16px; border-bottom:1px solid var(--border-light); }
.limit-row:last-child,.goal-row:last-child { border-bottom:0; }
.limit-row-head,.goal-row-head { display:flex; justify-content:space-between; gap:16px; margin-bottom:9px; }
.limit-row-head > div,.goal-row-head > div { display:flex; flex-direction:column; gap:2px; }
.limit-row-head > div:last-child,.goal-values { text-align:right; }
.limit-row-head strong,.goal-row-head strong { color:var(--navy); font-size:13px; font-variant-numeric:tabular-nums; }
.limit-row-head span,.goal-row-head span { color:var(--gray-500); font-size:10px; }
.goal-row p { margin:8px 28px 0 0; color:var(--gray-500); font-size:11px; line-height:1.45; }
.goal-remove { position:absolute; right:13px; bottom:10px; width:26px; height:26px; border:0; background:transparent; color:var(--gray-400); cursor:pointer; }
.empty-state.compact { padding:24px 18px; }
.empty-state.compact p { margin:0 0 8px; }
.dashboard-simple > .attention-card { margin:14px 0 0; }
.cashflow-card { margin:14px 0 0; }
.cashflow-trend { min-height:220px; padding:8px 8px 0; }
.trend-legend { display:flex; justify-content:flex-end; gap:18px; padding:0 8px 8px; color:var(--gray-500); font-size:10px; }
.trend-legend span::before { content:""; display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:3px; }
.trend-legend .income::before { background:#79A58B; }
.trend-legend .expense::before { background:#8169DC; }
.trend-columns { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; height:176px; align-items:end; padding:0 10px; border-bottom:1px solid var(--border); background:repeating-linear-gradient(to bottom,var(--surface) 0,var(--surface) 43px,var(--border-light) 44px); }
.trend-column { display:grid; grid-template-rows:132px 18px 18px; align-items:end; text-align:center; min-width:0; }
.trend-bars { display:flex; align-items:flex-end; justify-content:center; gap:5px; height:128px; }
.trend-bars i { display:block; width:min(22px,34%); min-height:3px; border-radius:5px 5px 2px 2px; box-shadow:0 2px 7px rgba(52,64,120,.08); }
.trend-bars i.income { background:linear-gradient(180deg,#9BC5AA,#66967A); }
.trend-bars i.expense { background:linear-gradient(180deg,#9A85E8,#7058CB); }
.trend-column > strong { color:var(--gray-600); font-size:10px; text-transform:uppercase; }
.trend-column > span { font-size:9px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.trend-column > span.positive { color:var(--green); }.trend-column > span.negative{color:var(--red)}
.cashflow-insight { display:flex; align-items:baseline; gap:8px; padding:12px 16px 14px; color:var(--gray-500); font-size:11px; }
.cashflow-insight strong { color:var(--navy); font-size:12px; }
.resources-page { max-width:1120px; }
.resources-top-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:14px; margin-bottom:14px; }
.resources-top-grid .reserve-card { margin:0; }
.reserve-main-value { margin-top:6px; font-size:28px; font-weight:800; font-variant-numeric:tabular-nums; }
.resource-projection-card { display:flex; flex-direction:column; justify-content:center; margin:0; background:linear-gradient(145deg,#F0F4FF,#F6F1FF); }
.resource-projection-card > span { color:var(--gray-500); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.resource-projection-card > strong { margin:8px 0 5px; color:var(--navy); font-size:24px; font-variant-numeric:tabular-nums; }
.resource-projection-card p { margin:0; color:var(--gray-500); font-size:12px; line-height:1.5; }
.reserve-editor-card { max-width:720px; margin:14px 0 0; }
.resource-plans-card { margin:0 0 14px; }
.resource-plans-list { border-top:1px solid var(--border-light); }
.resource-plan-empty { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 18px; background:linear-gradient(90deg,#F8FAFF,#FBF8FF); }
.resource-plan-empty strong { display:block; color:var(--navy); font-size:14px; }
.resource-plan-empty span { display:block; margin-top:4px; color:var(--gray-500); font-size:11px; }
.resource-plan-empty button,.resource-plan-actions button { border:1px solid var(--border); border-radius:8px; padding:7px 10px; background:#fff; color:var(--gray-600); font-size:10px; font-weight:800; cursor:pointer; }
.resource-plan-item { padding:17px 18px; border-bottom:1px solid var(--border-light); }
.resource-plan-item:last-child { border-bottom:0; }
.resource-plan-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.resource-plan-head h3 { margin:4px 0 2px; color:var(--navy); font-size:15px; }
.resource-plan-head p { margin:0; color:var(--gray-500); font-size:10px; }
.resource-plan-head > strong { color:var(--navy); font-size:20px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.resource-plan-status { display:inline-flex; border-radius:999px; padding:3px 7px; background:var(--primary-light); color:var(--primary-dark); font-size:9px; font-weight:800; text-transform:uppercase; }
.resource-plan-item.received .resource-plan-status { background:var(--green-light); color:var(--green); }
.resource-plan-item.completed { opacity:.72; }
.resource-allocation-list { display:grid; gap:6px; margin:14px 0 10px; padding:11px 12px; border-radius:10px; background:var(--surface-soft); }
.resource-allocation-list div,.resource-plan-result { display:flex; justify-content:space-between; gap:14px; color:var(--gray-600); font-size:11px; }
.resource-allocation-list strong,.resource-plan-result strong { color:var(--navy); font-variant-numeric:tabular-nums; }
.resource-plan-result { padding:0 2px 10px; font-weight:800; }
.resource-plan-result strong.negative,.allocation-balance strong.negative { color:var(--red); }
.resource-plan-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; padding-top:10px; border-top:1px solid var(--border-light); }
.resource-plan-actions button.primary { border-color:transparent; background:var(--primary); color:#fff; }
.resource-plan-actions button.danger { border-color:transparent; color:var(--red); background:var(--red-light); }
.modal-wide { max-width:680px; }
.allocation-header { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin:4px 0 10px; }
.allocation-header strong { display:block; color:var(--navy); font-size:12px; }
.allocation-header span { display:block; margin-top:2px; color:var(--gray-500); font-size:10px; }
.allocation-rows { display:grid; gap:8px; }
.allocation-row { display:grid; grid-template-columns:minmax(0,1fr) 150px 32px; gap:7px; }
.allocation-row button { border:0; border-radius:8px; background:var(--red-light); color:var(--red); font-size:18px; cursor:pointer; }
.allocation-balance { display:flex; justify-content:space-between; align-items:center; margin:10px 0 16px; padding:11px 12px; border-radius:10px; background:linear-gradient(90deg,#F0F4FF,#F7F2FF); color:var(--gray-600); font-size:11px; }
.allocation-balance strong { color:var(--primary-dark); font-size:15px; font-variant-numeric:tabular-nums; }
.schedule-preview { min-height:18px; margin-top:7px; color:var(--primary-dark); font-size:11px; font-weight:700; line-height:1.4; }
.schedule-preview.invalid { color:var(--red); }

/* Monthly decision plan */
.money-plan-page { max-width:1196px; }
.money-plan-tabs { max-width:420px; margin:0 0 14px; }
.money-plan-answer { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; padding:16px 18px; border:1px solid #DDE2EF; border-radius:14px; background:#fff; }
.money-plan-answer > span { display:inline-flex; margin-top:1px; color:#4F7A64; }
.money-plan-answer strong { display:block; color:var(--navy); font-size:15px; }
.money-plan-answer p { margin:4px 0 0; color:var(--gray-500); font-size:12px; line-height:1.5; }
.money-plan-answer.negative { border-color:#EDD5D7; background:#FFF8F8; }
.money-plan-answer.negative > span { color:#A9585E; }
.money-plan-summary-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.money-plan-summary-card { min-width:0; padding:16px; border:1px solid var(--border); border-top:3px solid #6675C5; border-radius:13px; background:#fff; box-shadow:var(--shadow-sm); }
.money-plan-summary-card.mandatory { border-top-color:#8A759F; }
.money-plan-summary-card.allowance { border-top-color:#B17B63; }
.money-plan-summary-card.goal { border-top-color:#5E8A74; }
.money-plan-summary-card.goal strong { color:#476C5A; }
.money-plan-summary-card.goal.negative { border-color:#EDD5D7; border-top-color:#A9585E; background:#FFF8F8; }
.money-plan-summary-card.goal.negative strong { color:#A9585E; }
.money-plan-summary-card.projection { border-top-color:#5E8A74; background:#F7FBF8; }
.money-plan-summary-card.projection.positive strong { color:#476C5A; }
.money-plan-summary-card.projection.negative { border-color:#EDD5D7; border-top-color:#A9585E; background:#FFF8F8; }
.money-plan-summary-card.projection.negative strong { color:#A9585E; }
.money-plan-summary-card.goal strong:first-letter { color:inherit; }
.money-plan-summary-card span,.money-plan-summary-card small { display:block; color:var(--gray-500); }
.money-plan-summary-card span { font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.money-plan-summary-card strong { display:block; overflow:hidden; margin:7px 0 4px; color:var(--navy); font-size:21px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.money-plan-summary-card small { font-size:10px; line-height:1.35; }
.money-plan-live-projection { margin:4px 0 18px; padding:14px 16px; border:1px solid #CFE0D5; border-radius:13px; background:#F7FBF8; }
.money-plan-live-projection > div { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.money-plan-live-projection span { color:var(--gray-500); font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.money-plan-live-projection strong { color:#476C5A; font-size:22px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.money-plan-live-projection p { margin:5px 0 0; color:var(--gray-500); font-size:11px; line-height:1.45; }
.money-plan-live-projection.negative { border-color:#EDD5D7; background:#FFF8F8; }
.money-plan-live-projection.negative strong { color:#A9585E; }
.money-plan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:stretch; }
.money-plan-card { min-height:350px; margin:0; }
.money-plan-explainer { min-height:48px; padding:12px 16px; border-top:1px solid var(--border-light); border-bottom:1px solid var(--border-light); background:#F8F9FC; color:var(--gray-500); font-size:11px; line-height:1.45; }
.allowance-row { padding:15px 16px; border-bottom:1px solid var(--border-light); }
.allowance-row:last-child { border-bottom:0; }
.allowance-head { display:flex; justify-content:space-between; gap:14px; margin-bottom:9px; }
.allowance-head > div { display:flex; min-width:0; flex-direction:column; gap:3px; }
.allowance-head > div:last-child { text-align:right; }
.allowance-head strong { color:var(--navy); font-size:13px; font-variant-numeric:tabular-nums; }
.allowance-head span { color:var(--gray-500); font-size:10px; }
.credit-exit-main { padding:20px 18px 14px; text-align:center; }
.credit-exit-main span { color:var(--gray-500); font-size:11px; }
.credit-exit-main strong { display:block; margin:7px 0 5px; color:var(--navy); font-size:30px; font-variant-numeric:tabular-nums; }
.credit-exit-main p { margin:0; color:var(--gray-600); font-size:11px; }
.credit-invoice-list { border-top:1px solid var(--border-light); }
.credit-invoice-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 18px; border-bottom:1px solid var(--border-light); }
.credit-invoice-row > div { display:flex; min-width:0; flex-direction:column; gap:2px; }
.credit-invoice-row strong { color:var(--navy); font-size:12px; font-variant-numeric:tabular-nums; }
.credit-invoice-row span { color:var(--gray-500); font-size:9px; }
.closed-invoice-block { margin:14px 18px 0; overflow:hidden; border:1px solid #EDD5D7; border-radius:10px; background:#FFF8F8; }
.closed-invoice-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; color:#944A52; font-size:10px; }
.closed-invoice-title strong { font-size:12px; font-variant-numeric:tabular-nums; }
.closed-invoice-block .credit-invoice-row { padding:9px 12px; background:#fff; }
.card-limit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.card-limit-field { margin:0; padding:12px; border:1px solid var(--border); border-radius:10px; background:#F8F9FC; }
.credit-target-line { display:flex; justify-content:space-between; gap:12px; padding:0 18px 9px; color:var(--gray-500); font-size:11px; }
.credit-target-line strong { color:var(--navy); font-variant-numeric:tabular-nums; }
#credit-exit-plan > .progress-bar-track { margin:0 18px; }
.money-plan-tip { margin:16px 18px 18px; padding:12px; border-radius:10px; background:#F5F6FA; color:var(--gray-600); font-size:10px; line-height:1.5; }
.car-plan-main { display:flex; justify-content:space-between; gap:16px; padding:20px 18px 12px; }
.car-plan-main > div span { display:block; color:var(--gray-500); font-size:10px; }
.car-plan-main > div strong { display:block; margin-top:4px; color:var(--navy); font-size:15px; }
.car-plan-main > strong { color:#476C5A; font-size:18px; font-variant-numeric:tabular-nums; text-align:right; }
.car-plan-main small { display:block; margin-top:2px; color:var(--gray-500); font-size:9px; font-weight:500; }
#car-purchase-plan > .progress-bar-track { margin:0 18px; }
.car-plan-details { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin-top:18px; border-top:1px solid var(--border-light); background:var(--border-light); }
.car-plan-details > div { min-width:0; padding:14px 10px; background:#fff; text-align:center; }
.car-plan-details span { display:block; color:var(--gray-500); font-size:9px; }
.car-plan-details strong { display:block; overflow:hidden; margin-top:4px; color:var(--navy); font-size:12px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.money-plan-empty { display:flex; min-height:280px; padding:20px; flex-direction:column; align-items:center; justify-content:center; color:#6F78A3; text-align:center; }
.money-plan-empty strong { margin-top:10px; color:var(--navy); font-size:14px; }
.money-plan-empty p { max-width:330px; margin:5px 0 10px; color:var(--gray-500); font-size:11px; line-height:1.5; }
.mandatory-row { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:48px; padding:9px 16px; border-bottom:1px solid var(--border-light); }
.mandatory-row > div { min-width:0; }
.mandatory-row > div strong,.mandatory-row > div span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mandatory-row > div strong { color:var(--navy); font-size:12px; }
.mandatory-row > div span { margin-top:3px; color:var(--gray-500); font-size:9px; }
.mandatory-row > strong { color:var(--navy); font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.mandatory-more { width:100%; border:0; padding:11px; background:#F7F8FC; color:#5968B5; font-size:10px; font-weight:800; cursor:pointer; }
.bill-summary-wrap { padding:0 0 10px; }
.money-plan-form-section { margin:8px 0 12px; padding:11px 12px; border-left:3px solid #6876C9; background:#F6F7FC; }
.money-plan-form-section strong,.money-plan-form-section span { display:block; }
.money-plan-form-section strong { color:var(--navy); font-size:12px; }
.money-plan-form-section span { margin-top:3px; color:var(--gray-500); font-size:10px; line-height:1.4; }

@media (max-width:899px) {
  .closing-numbers { grid-template-columns:1fr; gap:14px; }
  .closing-operator { display:none; }
  .closing-number { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .closing-number strong { margin:0; font-size:clamp(20px,4vw,26px); white-space:nowrap; text-align:right; }
  .closing-number small { display:none; }
  .monthly-ledger-grid,.dashboard-life-grid { grid-template-columns:1fr; }
  .money-plan-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .card-limit-grid { grid-template-columns:1fr; }
  .money-plan-grid { grid-template-columns:1fr; }
  .resource-overview { grid-template-columns:1fr; }
  .resource-primary { grid-row:auto; }
  .resources-top-grid { grid-template-columns:1fr; }
  .resource-account-strip { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dashboard-invoice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:599px) {
  .dashboard-simple { padding-left:16px; padding-right:16px; }
  .resource-primary { padding:20px 18px; }
  .resource-primary > strong { font-size:30px; }
  .resource-metrics { grid-template-columns:1fr 1fr; }
  .resource-metrics > div { padding:14px 12px; }
  .resource-metrics > div:nth-child(n+3) { border-top:1px solid var(--border-light); }
  .resource-account-strip { grid-template-columns:1fr; }
  .dashboard-invoice-grid { grid-template-columns:1fr; }
  .resource-metrics strong { font-size:17px; }
  .resource-upcoming-plan button { align-items:flex-start; flex-direction:column; }.resource-upcoming-plan strong{text-align:left}
  .month-closing-card { padding:18px 16px; border-radius:18px; }
  .month-closing-head { padding-bottom:14px; }
  .closing-numbers { grid-template-columns:1fr; gap:14px; padding:18px 0; }
  .closing-operator { display:none; }
  .closing-number { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .closing-number strong { margin:0; font-size:clamp(18px,5.4vw,24px); letter-spacing:-.025em; white-space:nowrap; text-align:right; }
  .closing-number small { display:none; }
  .closing-number.balance { padding:14px 10px; border-radius:12px; }
  .closing-number span { font-size:10px; max-width:80px; line-height:1.4; }
  .month-closing-head { flex-direction:column; align-items:flex-start; gap:10px; }
  .month-closing-head strong { font-size:15px; line-height:1.45; }
  .closing-footer { grid-template-columns:1fr 1fr; gap:14px; padding-top:14px; }
  .closing-progress { grid-column:1 / -1; }
  .closing-footer strong { font-size:15px; }
  .monthly-ledger-grid,.dashboard-life-grid { gap:12px; }
  .ledger-card { min-height:408px; }
  .card-title-actions { gap:6px; }
  .card-title-actions .text-button:first-child { display:none; }
  .money-plan-summary-grid { gap:8px; }
  .money-plan-summary-card { padding:13px 12px; }
  .money-plan-summary-card strong { font-size:17px; }
  .money-plan-card { min-height:0; }
  .ledger-row { padding:10px 12px; }
  .ledger-copy strong { font-size:12px; }
  .ledger-side { gap:6px; }
  .ledger-side > strong { font-size:12px; }
  .ledger-status { display:none; }
  .limit-row-head,.goal-row-head { gap:8px; }
  .cashflow-insight { display:block; }.cashflow-insight span{display:block;margin-top:4px;line-height:1.4}
  .trend-columns { gap:6px; padding:0 3px; }.trend-bars{gap:3px}.trend-column>span{font-size:8px}
  .resource-plan-empty { align-items:flex-start; flex-direction:column; }
  .resource-plan-head { gap:8px; }.resource-plan-head>strong{font-size:16px}
  .allocation-row { grid-template-columns:minmax(0,1fr) 105px 30px; }
}
