/* TriadFlow — Main Stylesheet */
:root {
  --primary:       #1e3a5f;
  --primary-light: #2563eb;
  --primary-50:    #eff6ff;
  --secondary:     #0ea5e9;
  --income:        #16a34a;
  --income-bg:     #f0fdf4;
  --income-light:  #dcfce7;
  --expense:       #dc2626;
  --expense-bg:    #fef2f2;
  --expense-light: #fee2e2;
  --neutral-50:    #f8fafc;
  --neutral-100:   #f1f5f9;
  --neutral-200:   #e2e8f0;
  --neutral-300:   #cbd5e1;
  --neutral-400:   #94a3b8;
  --neutral-500:   #64748b;
  --neutral-600:   #475569;
  --neutral-700:   #334155;
  --neutral-800:   #1e293b;
  --neutral-900:   #0f172a;
  --white:         #ffffff;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-md:     0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --transition:    all .18s ease;
  --sidebar-w:     260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--neutral-50);
  color: var(--neutral-800);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.brand-icon img {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.3px;
}

.brand-tagline {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}

.nav-item.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
}

.nav-item .nav-icon {
  width: 18px;
  opacity: .8;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.user-avatar {
  width: 34px; height: 34px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main content ─────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--neutral-600);
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-800);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-quick-add {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-quick-add:hover {
  background: var(--primary);
  color: var(--white);
}

.page-body {
  padding: 28px;
  flex: 1;
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--neutral-800);
}

.card-subtitle {
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 2px;
}

.card-body {
  padding: 20px 24px;
}

/* ── Stat Cards ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--neutral-200);
}

.stat-card.income::after { background: var(--income); }
.stat-card.expense::after { background: var(--expense); }
.stat-card.balance.positive::after { background: var(--income); }
.stat-card.balance.negative::after { background: var(--expense); }
.stat-card.count::after { background: var(--primary-light); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-icon.income { background: var(--income-light); }
.stat-icon.expense { background: var(--expense-light); }
.stat-icon.balance { background: var(--primary-50); }
.stat-icon.count { background: #f0f9ff; }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--neutral-800);
  letter-spacing: -.5px;
}

.stat-value.income { color: var(--income); }
.stat-value.expense { color: var(--expense); }
.stat-value.positive { color: var(--income); }
.stat-value.negative { color: var(--expense); }

.stat-period {
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 6px;
}

/* ── Grid layouts ─────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Tables ─────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--neutral-100);
  transition: var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--neutral-50); }

tbody td {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--neutral-700);
}

.amount-income { color: var(--income); font-weight: 600; }
.amount-expense { color: var(--expense); font-weight: 600; }

/* ── Badges ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-income { background: var(--income-light); color: var(--income); }
.badge-expense { background: var(--expense-light); color: var(--expense); }

/* ── Category Dot ─────────────────────────────── */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-light);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary); color: var(--white); }

.btn-secondary {
  background: var(--neutral-100);
  color: var(--neutral-700);
}
.btn-secondary:hover { background: var(--neutral-200); }

.btn-danger {
  background: #fef2f2;
  color: var(--expense);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: var(--expense); color: var(--white); }

.btn-success {
  background: var(--income-light);
  color: var(--income);
  border: 1px solid #bbf7d0;
}
.btn-success:hover { background: var(--income); color: var(--white); }

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-icon {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 6px;
}

/* ── Forms ─────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: 8px;
  font-size: 14px;
  color: var(--neutral-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.form-control::placeholder { color: var(--neutral-400); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 4px;
}

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

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center; /* ajuste conforme seu layout atual */
}

.toggle-balance-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-balance-btn:hover {
  opacity: 1;
}

/* ── Alerts ─────────────────────────────────── */
/*.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}*/

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: block;
  line-height: 1.5;
}

.alert-success { background: var(--income-light); color: var(--income); border: 1px solid #bbf7d0; }
.alert-danger   { background: var(--expense-light); color: var(--expense); border: 1px solid #fecaca; }
.alert-info     { background: var(--primary-50); color: var(--primary-light); border: 1px solid #bfdbfe; }

/* ── Page header ─────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header-left h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--neutral-800);
  letter-spacing: -.4px;
}

.page-header-left p {
  font-size: 13px;
  color: var(--neutral-400);
  margin-top: 2px;
}

/* ── Filters bar ─────────────────────────────── */
.filters-bar {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

/* ── Auth pages ─────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #0c2340 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.auth-logo-icon img {
  width: 100%;
  height: 100%;
}

.auth-logo-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.3px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 4px;
  text-align: center;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--neutral-400);
  text-align: center;
  margin-bottom: 28px;
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 20px;
}

.auth-footer a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
}

/* ── Empty state ─────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 20px;
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: .4;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: 4px;
}

.empty-text {
  font-size: 14px;
  color: var(--neutral-400);
  margin-bottom: 20px;
}

/* ── Chart canvas ─────────────────────────────── */
.chart-container {
  position: relative;
  height: 240px;
}

/* ── Color picker ─────────────────────────────── */
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.color-swatch {
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.color-swatch:hover,
.color-swatch.selected {
  border-color: var(--neutral-800);
  transform: scale(1.15);
}


/* ── Sidebar scrollbar custom ─────────────────── */
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15);
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.28);
}


/* ── Confirm Modal ─────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

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

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  animation: modalIn .18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.modal-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--expense-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.modal-icon svg {
  color: var(--expense);
}

.modal-header-text {
  flex: 1;
  padding-top: 2px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 4px;
}

.modal-description {
  font-size: 13px;
  color: var(--neutral-500);
  line-height: 1.5;
}

.modal-body {
  padding: 16px 24px 0;
}

.modal-category-name {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer {
  padding: 20px 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================
   Ocultar/Exibir valores (privacidade)
   Adicione este bloco ao seu CSS existente
   (ex: assets/css/style.css ou onde estão
   as regras de .stat-card / .stats-grid)
   ============================================ */

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.value-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: var(--neutral-400, #94a3b8);
  opacity: 0.7;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.value-toggle svg {
  display: block;
}

/* Esconde o ícone inativo via classe controlada pelo JS.
   Usar classe (em vez do atributo "hidden") evita conflitos com
   CSS global/reset que sobrescreva o display padrão. */
.value-toggle svg.is-hidden {
  display: none !important;
}

.value-toggle:hover {
  opacity: 1;
  color: var(--neutral-600, #475569);
  background-color: rgba(0, 0, 0, 0.05);
}

.value-toggle:focus-visible {
  outline: 2px solid var(--primary-light, #6366f1);
  outline-offset: 2px;
}

/* Quando o valor está oculto, destaca levemente o ícone (olho riscado) */
.value-toggle[aria-pressed="true"] {
  color: var(--neutral-500, #64748b);
}

/* Versão usada inline, ao lado de labels (ex: "Saldo do Mês") */
.inline-toggle {
  margin-left: 4px;
  padding: 2px;
  vertical-align: middle;
}

.hideable-value.value-hidden {
  letter-spacing: 2px;
  user-select: none;
}

/* Pequeno efeito visual opcional ao trocar o valor */
.hideable-value {
  transition: opacity 0.1s ease;
}

/* ── Help Page ─────────────────────────────── */
.help-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.help-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.help-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--neutral-800);
  letter-spacing: -.4px;
  margin-bottom: 2px;
}

.help-hero-subtitle {
  font-size: 14px;
  color: var(--neutral-400);
}

/* Quick nav */
.help-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
}

.help-quicknav-item {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  background: var(--primary-50);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.help-quicknav-item:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* Section */
.help-section {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: 84px;
}

.help-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.help-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.help-section-desc {
  font-size: 12px;
  color: var(--neutral-400);
}

.help-content {
  padding: 24px;
  font-size: 14px;
  color: var(--neutral-700);
  line-height: 1.7;
}

.help-content p {
  margin-bottom: 16px;
}

.help-content p:last-child {
  margin-bottom: 0;
}

/* Subtitle */
.help-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-800);
  margin: 20px 0 10px;
}

/* List */
.help-list {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-list li {
  padding-left: 18px;
  position: relative;
}

.help-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
}

/* Step list */
.help-step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.help-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--neutral-700);
  line-height: 1.6;
}

.help-step-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Info cards */
.help-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.help-info-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
}

.help-info-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-info-card-icon.income { background: var(--income-light); color: var(--income); }
.help-info-card-icon.expense { background: var(--expense-light); color: var(--expense); }
.help-info-card-icon.balance { background: var(--primary-50); color: var(--primary-light); }

.help-info-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.help-info-card-text {
  font-size: 12px;
  color: var(--neutral-500);
  line-height: 1.5;
}

/* Tip */
.help-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--primary-50);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 13px;
  color: var(--primary-light);
  line-height: 1.6;
  margin-top: 16px;
}

.help-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Footer */
.help-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 8px;
}

.help-footer svg {
  flex-shrink: 0;
  color: var(--neutral-400);
}

/* Responsive */
@media (max-width: 600px) {
  .help-page {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .help-section-header { padding: 16px; }
  .help-content { padding: 16px; }
  .help-hero-icon { width: 44px; height: 44px; }
  .help-hero-title { font-size: 18px; }
  .help-quicknav { padding: 12px; gap: 6px; }
  .help-quicknav-item { font-size: 12px; padding: 4px 10px; }
  .help-cards-grid { grid-template-columns: 1fr; }
}


/* ── Responsive ─────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .hamburger { display: flex; }
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar { padding: 0 16px; }
  .filters-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .filters-grid { grid-template-columns: 1fr; }
}

/* ── Overlay ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* ── Tooltip ─────────────────────────────────── */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--neutral-800);
  color: var(--white);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.tooltip:hover::after { opacity: 1; }

/* ── Progress bar ─────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--neutral-100);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

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

/* ── Divider ─────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--neutral-200);
  margin: 16px 0;
}

/* ── Misc ─────────────────────────────────── */
a { color: var(--primary-light); }
strong { font-weight: 700; }

.text-muted { color: var(--neutral-400); font-size: 13px; }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-1 { flex: 1; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ── Transactions page fixes ─────────────────── */
@media (max-width: 768px) {
  /* Summary cards — 3 colunas vira 1 coluna */
  .tx-summary-grid {
    grid-template-columns: 1fr !important;
  }

  /* Esconde colunas menos críticas na tabela */
  .tx-table-type,
  .tx-table-desc {
    display: none;
  }

  /* Botões de ação menores */
  .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  /* Rodapé da paginação empilha */
  .tx-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .tx-summary-grid {
    grid-template-columns: 1fr !important;
  }
}