/* =========================================================
   GuiaBolso - Mobile-First Financial Web App Stylesheet
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg-body: #070b14;
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263449;
  --bg-input: #0f172a;
  --bg-nav: rgba(15, 23, 42, 0.92);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --income: #10b981;
  --income-bg: rgba(16, 185, 129, 0.14);
  --expense: #ef4444;
  --expense-bg: rgba(239, 68, 68, 0.14);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --info: #3b82f6;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg-body: #e2e8f0;
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-nav: rgba(255, 255, 255, 0.94);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(15, 23, 42, 0.08);
  --primary: #059669;
  --primary-dark: #047857;
  --primary-glow: rgba(5, 150, 105, 0.2);
  --income: #059669;
  --income-bg: rgba(16, 185, 129, 0.12);
  --expense: #dc2626;
  --expense-bg: rgba(239, 68, 68, 0.12);
  --warning: #d97706;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --info: #2563eb;
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container Mobile Centralizado */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
}

/* Ocultar valores (Modo Privacidade) */
body.hide-values .money-val {
  filter: blur(7px);
  user-select: none;
}

/* =========================================================
   TELA DE LOGIN / CADASTRO
   ========================================================= */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 22px;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 55%), var(--bg-app);
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #10b981, #047857);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  margin-bottom: 12px;
}

.auth-brand h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
}

/* =========================================================
   HEADER E SELETOR DE MÊS
   ========================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px 12px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.user-greet {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #047857);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.user-greet-text small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.user-greet-text strong {
  font-size: 15px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.icon-btn:active {
  transform: scale(0.93);
}

.month-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 6px 10px;
}

.month-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.month-current {
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* =========================================================
   CONTEÚDO E ABAS
   ========================================================= */
.tab-view {
  display: none;
  padding: 16px 16px 24px;
  animation: fadeIn 0.2s ease;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card Principal de Saldo */
.balance-hero {
  background: linear-gradient(135deg, #059669 0%, #047857 55%, #065f46 100%);
  border-radius: 22px;
  padding: 20px;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.28);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.balance-hero::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.85;
  font-weight: 600;
}

.balance-amount {
  font-size: 30px;
  font-weight: 800;
  margin: 4px 0 16px;
  letter-spacing: -0.8px;
}

.hero-flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  padding: 12px;
}

.hero-flow-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.flow-icon.in {
  background: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}

.flow-icon.out {
  background: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.flow-details small {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}

.flow-details strong {
  font-size: 14px;
  font-weight: 700;
}

.flow-details span {
  display: block;
  font-size: 10px;
  opacity: 0.78;
}

/* Alerta de Contas Vencidas */
.overdue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--expense-bg);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}

.overdue-banner i {
  font-size: 22px;
  color: var(--expense);
}

.overdue-text {
  flex: 1;
}

.overdue-text strong {
  display: block;
  font-size: 13px;
  color: var(--expense);
}

.overdue-text span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Títulos de Seção */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-header h2 {
  font-size: 15px;
  font-weight: 700;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Carrossel Horizontal de Carteiras */
.wallets-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.wallets-scroll::-webkit-scrollbar {
  display: none;
}

.wallet-pill-card {
  min-width: 155px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s;
}

.wallet-pill-card:active {
  transform: scale(0.97);
}

.wallet-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wallet-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
}

.wallet-pill-name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-pill-bal {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

/* Lista de Lançamentos */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-date-divider {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 8px 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tx-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}

.tx-item:hover {
  background: var(--bg-card-hover);
}

.tx-cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.tx-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.tx-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text-muted);
  flex-shrink: 0;
}

.tx-badge.overdue {
  background: var(--expense-bg);
  color: var(--expense);
}

.tx-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tx-amount {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tx-amount.income {
  color: var(--income);
}

.tx-amount.expense {
  color: var(--expense);
}

.status-pill-btn {
  border: none;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.1s;
}

.status-pill-btn:active {
  transform: scale(0.93);
}

.status-pill-btn.paid {
  background: var(--income-bg);
  color: var(--income);
}

.status-pill-btn.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Filtros do Extrato */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.search-box {
  position: relative;
  margin-bottom: 12px;
}

.search-box i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 13px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
}

/* Cards de Gráficos e Metas */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.budget-item {
  margin-bottom: 14px;
}

.budget-item:last-child {
  margin-bottom: 0;
}

.budget-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 6px;
}

.budget-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.budget-cat-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.progress-track {
  width: 100%;
  height: 9px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* =========================================================
   BARRA DE NAVEGAÇÃO INFERIOR (ESTILO APP NATIVO)
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  align-items: center;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
}

.nav-item {
  border: none;
  background: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item i {
  font-size: 21px;
}

.nav-item.active {
  color: var(--primary);
}

.fab-add {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -22px auto 0;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  transition: transform 0.15s;
}

.fab-add:active {
  transform: scale(0.92);
}

/* =========================================================
   MODAIS ESTILO BOTTOM SHEET (DESLIZA DE BAIXO)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.bottom-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: 26px 26px 0 0;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.22s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  background: var(--border-color);
  border-radius: 99px;
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sheet-header h3 {
  font-size: 17px;
  font-weight: 700;
}

/* Formulários */
.type-Segmented {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 16px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
}

.seg-btn.active[data-type="expense"] {
  background: var(--expense);
  color: #fff;
}

.seg-btn.active[data-type="income"] {
  background: var(--income);
  color: #fff;
}

.seg-btn.active[data-type="transfer"] {
  background: var(--info);
  color: #fff;
}

.form-group {
  margin-bottom: 13px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.amount-input-lg {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  padding: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-danger {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  background: var(--expense-bg);
  color: var(--expense);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 90%;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }


/* =========================================================
   RESPONSIVIDADE: TABLET E COMPUTADOR
   Mobile (< 768px)  -> layout padrão acima (barra inferior)
   Tablet (>= 768px) -> conteúdo largo em 2 colunas
   Desktop (>= 1024px) -> menu lateral fixo + modais centralizados
   ========================================================= */

/* Elementos exclusivos do desktop ficam ocultos no celular */
.sidebar-brand,
.fab-label {
  display: none;
}

.settings-cat-header {
  margin-top: 24px;
}

/* ---------- TABLET ---------- */
@media (min-width: 768px) {
  .app-shell {
    max-width: 100%;
    box-shadow: none;
  }

  .auth-screen {
    align-items: center;
  }

  .auth-brand,
  .auth-card {
    width: 100%;
    max-width: 420px;
  }

  .tab-view {
    padding: 24px 28px 32px;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
  }

  .bottom-nav {
    max-width: 100%;
  }

  .bottom-sheet {
    max-width: 560px;
  }

  /* Header em uma linha: saudação | mês | ações */
  .app-header {
    padding: 14px 28px;
  }

  .app-header-inner,
  .app-header {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .header-top {
    flex: 1;
    margin-bottom: 0;
  }

  .month-selector {
    width: 300px;
    order: 0;
  }

  /* Início: saldo/carteiras/metas à esquerda, lançamentos à direita */
  .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .home-col-side .section-header:first-child,
  .home-col-main > .balance-hero:first-child {
    margin-top: 0;
  }

  /* Carteiras viram grade em vez de carrossel */
  .wallets-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    overflow: visible;
  }

  .wallet-pill-card {
    min-width: 0;
  }

  /* Relatórios em 2 colunas */
  .reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    align-items: start;
  }

  .report-full {
    grid-column: 1 / -1;
  }

  /* Carteiras e categorias lado a lado */
  .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
  }

  .settings-cat-header {
    margin-top: 0;
  }

  /* Extrato com largura confortável de leitura */
  #tab-transactions {
    max-width: 920px;
  }

  .balance-amount {
    font-size: 36px;
  }
}

/* ---------- DESKTOP ---------- */
@media (min-width: 1024px) {
  :root {
    --sidebar-w: 248px;
  }

  .app-shell:not(.auth-screen) {
    padding-left: var(--sidebar-w);
    padding-bottom: 0;
  }

  /* Barra inferior vira menu lateral fixo */
  .bottom-nav {
    top: 0;
    bottom: 0;
    left: 0;
    transform: none;
    width: var(--sidebar-w);
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 22px 16px;
    border-top: none;
    border-right: 1px solid var(--border-color);
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
    padding: 0 8px 22px;
    order: 0;
  }

  .sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 21px;
    margin-bottom: 0;
  }

  .fab-add {
    order: 1;
    width: 100%;
    height: 48px;
    margin: 0 0 18px;
    border-radius: 14px;
    font-size: 22px;
    gap: 8px;
  }

  .fab-label {
    display: inline;
    font-size: 14px;
    font-weight: 700;
  }

  .nav-item {
    order: 2;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-item i {
    font-size: 20px;
  }

  .nav-item:hover {
    background: var(--bg-card);
    color: var(--text-main);
  }

  .nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
  }

  .app-header {
    padding: 16px 32px;
  }

  .tab-view {
    padding: 28px 32px 40px;
  }

  /* Modais centralizados (em vez de subir de baixo) */
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .bottom-sheet {
    border-radius: 22px;
    max-height: 88vh;
    padding: 22px 26px 26px;
    box-shadow: var(--shadow-lg);
    animation: popIn 0.18s ease-out;
  }

  .sheet-handle {
    display: none;
  }

  /* Interações com mouse */
  .wallet-pill-card:hover,
  .tx-item:hover {
    border-color: rgba(16, 185, 129, 0.35);
  }

  .icon-btn:hover {
    background: var(--bg-card-hover);
  }

  .home-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
  }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Telas muito largas: lançamentos recentes ganham mais espaço */
@media (min-width: 1440px) {
  .home-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}
