/* ==========================================================================
   FinApp - Design System & Modern Styles
   ========================================================================== */

:root {
  /* Color Tokens - Modern Purple Palette */
  --bg-main: #0c0a17;
  --bg-card: rgba(22, 17, 43, 0.78);
  --bg-card-hover: rgba(32, 25, 60, 0.88);
  --bg-input: rgba(16, 12, 33, 0.88);
  
  --border-subtle: rgba(168, 85, 247, 0.14);
  --border-focus: #a855f7;
  --border-accent: rgba(168, 85, 247, 0.35);

  /* Primary Brand & Accents (Purple / Violet) */
  --color-primary: #8b5cf6;
  --color-primary-hover: #7c3aed;
  --color-primary-glow: rgba(139, 92, 246, 0.3);

  /* Income & Positive Colors (Emerald with crisp contrast) */
  --color-income: #10b981;
  --color-income-glow: rgba(16, 185, 129, 0.2);
  --color-income-dark: #064e3b;
  --color-income-light: #34d399;

  /* Expense & Negative Colors (Rose / Magenta) */
  --color-expense: #f43f5e;
  --color-expense-glow: rgba(244, 63, 94, 0.2);
  --color-expense-dark: #881337;
  --color-expense-light: #fb7185;

  /* Warning / Caution (Amber) */
  --color-warning: #f59e0b;
  --color-warning-glow: rgba(245, 158, 11, 0.2);

  /* Text & Typography */
  --text-primary: #f8fafc;
  --text-secondary: #c4b5fd;
  --text-muted: #8b85b3;
  --text-inverse: #0c0a17;

  /* Layout & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Glassmorphism & Shadows */
  --glass-blur: blur(16px);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 8px 12px -6px rgba(139, 92, 246, 0.15);
  --shadow-glow-income: 0 0 25px -5px rgba(16, 185, 129, 0.3);
  --shadow-glow-expense: 0 0 25px -5px rgba(244, 63, 94, 0.3);
  --shadow-glow-balance: 0 0 25px -5px rgba(139, 92, 246, 0.35);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Light Theme Tokens & Customizations
   ========================================================================== */
[data-theme="light"] {
  --bg-main: #f5f3ff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(250, 245, 255, 0.98);
  --bg-input: #ffffff;

  --border-subtle: rgba(139, 92, 246, 0.12);
  --border-focus: #7c3aed;
  --border-accent: rgba(139, 92, 246, 0.25);

  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;

  --color-income: #059669;
  --color-income-light: #059669;
  --color-expense: #e11d48;
  --color-expense-light: #e11d48;

  --text-primary: #1e1538;
  --text-secondary: #5b4d7e;
  --text-muted: #7e73a0;
  --text-inverse: #ffffff;

  --shadow-card: 0 10px 25px -5px rgba(124, 58, 237, 0.07), 0 8px 10px -6px rgba(124, 58, 237, 0.04);
}

[data-theme="light"] body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(192, 132, 252, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%);
  color: var(--text-primary);
}

[data-theme="light"] .brand h1 {
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .panel-title-wrap h2,
[data-theme="light"] .modal-header h2,
[data-theme="light"] .expense-item-title,
[data-theme="light"] .insight-value,
[data-theme="light"] .kpi-value {
  color: #0f172a;
}

[data-theme="light"] .card-income .kpi-value {
  color: #059669;
}

[data-theme="light"] .card-expense .kpi-value {
  color: #e11d48;
}

[data-theme="light"] .card-balance.positive .kpi-value {
  color: #059669;
}

[data-theme="light"] .card-balance.negative .kpi-value {
  color: #e11d48;
}

[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .modal-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .btn-outline {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

[data-theme="light"] .btn-outline:hover {
  background: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .month-indicator,
[data-theme="light"] .month-navigator {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

[data-theme="light"] .tabbed-header {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .list-toolbar {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .list-footer {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .list-footer-stats strong {
  color: #0f172a;
}

[data-theme="light"] .tab-btn {
  color: #64748b;
}

[data-theme="light"] .tab-btn.active {
  color: #0f172a;
}

[data-theme="light"] .expense-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .expense-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .legend-item,
[data-theme="light"] .insight-row {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .chip-content {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

[data-theme="light"] .category-chip input[type="radio"]:checked + .chip-content {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #1d4ed8;
}

[data-theme="light"] .emoji-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .toast {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Container do Seletor de Mês */
.month-picker-container {
  position: relative;
  display: inline-flex;
}

/* Header Month Picker Button (ex: set/26) */
.header-month-picker-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 0.75rem !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  outline: none;
}

.header-month-picker-wrap:hover,
.header-month-picker-wrap.is-open {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

.header-month-picker-wrap i[data-lucide="calendar"] {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
  flex-shrink: 0;
  pointer-events: none;
}

.month-chevron-icon {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  pointer-events: none;
}

.header-month-picker-wrap.is-open .month-chevron-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.header-month-picker-wrap span {
  text-transform: lowercase;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Dropdown / Popover do Calendário de Meses */
.month-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 275px;
  background: rgba(18, 14, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.65), 0 0 25px rgba(139, 92, 246, 0.2);
  padding: 0.95rem;
  z-index: 1000;
  flex-direction: column;
  gap: 0.85rem;
  animation: dropdownFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.month-picker-dropdown.is-open {
  display: flex !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.month-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.picker-year-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.btn-picker-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-picker-nav:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--color-primary);
  color: #fff;
  transform: scale(1.08);
}

.btn-picker-nav i {
  width: 14px;
  height: 14px;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.btn-picker-month {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.2rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-picker-month:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-picker-month.is-selected {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.45);
}

.btn-picker-month.is-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-income);
}

.month-picker-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-picker-today {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--color-primary-light);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-picker-today:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-picker-today i {
  width: 12px;
  height: 12px;
}

/* Light Theme Overrides */
[data-theme="light"] .header-month-picker-wrap {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(139, 92, 246, 0.25);
  color: #1e1538;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .header-month-picker-wrap:hover,
[data-theme="light"] .header-month-picker-wrap.is-open {
  background: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .month-picker-dropdown {
  background: #ffffff;
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.18), 0 0 15px rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .picker-year-title {
  color: #0f172a;
}

[data-theme="light"] .btn-picker-nav {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

[data-theme="light"] .btn-picker-month {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

[data-theme="light"] .btn-picker-month:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: #8b5cf6;
  color: #7c3aed;
}

[data-theme="light"] .btn-picker-today {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
  color: #7c3aed;
}

/* Theme Toggle Button (Icon Only matching user designs) */
.btn.btn-theme-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-theme-toggle svg.theme-svg-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  flex-shrink: 0 !important;
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

/* No tema Escuro: mostra o sol com 8 raios (para alternar para o claro) */
:root:not([data-theme="light"]) .btn-theme-toggle .icon-sun {
  display: block !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
}
:root:not([data-theme="light"]) .btn-theme-toggle .icon-moon {
  display: none !important;
}

/* No tema Claro: mostra a lua vazada (para alternar para o escuro) */
[data-theme="light"] .btn-theme-toggle .icon-sun {
  display: none !important;
}
[data-theme="light"] .btn-theme-toggle .icon-moon {
  display: block !important;
  color: #1e1538 !important;
  stroke: #1e1538 !important;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
}

.btn-theme-toggle:hover svg.theme-svg-icon {
  transform: scale(1.12);
}

[data-theme="light"] .btn.btn-theme-toggle {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
  color: #1e1538 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn.btn-theme-toggle:hover {
  background: #ffffff !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
}

/* Light theme overrides for form inputs */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="date"],
[data-theme="light"] select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="number"]:focus,
[data-theme="light"] input[type="date"]:focus,
[data-theme="light"] select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .search-box input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .filter-select,
[data-theme="light"] .sort-select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .card-percentage .kpi-value {
  color: #7c3aed;
}

[data-theme="light"] .percent-label.status-great {
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
}

[data-theme="light"] .percent-label.status-warning {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}

[data-theme="light"] .percent-label.status-danger {
  background: rgba(225, 29, 72, 0.15);
  color: #be123c;
}

[data-theme="light"] .modal-footer {
  background: #f8fafc;
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.14) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(124, 58, 237, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.1rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  gap: 0.85rem;
  position: relative;
  z-index: 500;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.brand-icon i {
  width: 19px;
  height: 19px;
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-greeting {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.brand-greeting .greeting-salute {
  color: var(--text-muted);
  font-weight: 500;
}

.brand-greeting .greeting-name {
  color: var(--color-primary-light);
  font-weight: 700;
}

[data-theme="light"] .brand-greeting .greeting-name {
  color: #7c3aed;
}

/* Header Profile & Theme Actions (Right side of header) */
.header-profile-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: nowrap;
}

/* User Dashboard View (Container of Toolbar, KPI Cards, and Main Lists) */
#userDashboardView {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
  width: 100%;
}

#userDashboardView[style*="display: none"] {
  display: none !important;
}

/* App Toolbar (Month navigation) */
.app-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.toolbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Month Navigator Component */
.month-navigator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition-normal);
}

.month-navigator:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-month-nav {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.btn-month-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transform: scale(1.08);
}

[data-theme="light"] .btn-month-nav:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.btn-month-nav i {
  width: 17px;
  height: 17px;
}

.month-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}

.month-label-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-primary);
}

[data-theme="light"] .month-label-wrap:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-primary);
}

.month-label-wrap i {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
}

.month-picker-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.btn-jump-current {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--color-primary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: 0.2rem;
}

.btn-jump-current:hover {
  background: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.btn-jump-current i {
  width: 13px;
  height: 13px;
}

[data-theme="light"] .btn-jump-current {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
  color: #2563eb;
}

[data-theme="light"] .btn-jump-current:hover {
  background: rgba(37, 99, 235, 0.18);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn i {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.55);
}

.btn-expense {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.btn-expense:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.5);
}

.btn-income {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.btn-income:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--color-expense-light);
  background: rgba(244, 63, 94, 0.1);
}

/* Botão Limpar com caixa e borda simétricas */
#btnClearData.btn {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.22);
  color: #fb7185;
}

#btnClearData.btn:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
}

[data-theme="light"] #btnClearData.btn {
  background: rgba(225, 29, 72, 0.05);
  border-color: rgba(225, 29, 72, 0.18);
  color: #e11d48;
}

[data-theme="light"] #btnClearData.btn:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.35);
  color: #be123c;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-left: auto;
}

.btn-link:hover {
  color: var(--color-income-light);
}

/* ==========================================================================
   KPI Cards Grid
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.kpi-card.card-income::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.kpi-card.card-expense::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.kpi-card.card-balance::before {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

.kpi-card.card-percentage::before {
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.28);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap i {
  width: 14px;
  height: 14px;
}

.income-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-income-light);
}

.expense-icon {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-expense-light);
}

.balance-icon {
  background: rgba(139, 92, 246, 0.18);
  color: #c084fc;
}

.percent-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.card-income .kpi-value {
  color: var(--color-income-light);
}

.card-expense .kpi-value {
  color: var(--color-expense-light);
}

.card-balance.positive .kpi-value {
  color: #34d399;
}

.card-balance.negative .kpi-value {
  color: #fb7185;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.percent-label {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.percent-label.status-great {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.percent-label.status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.percent-label.status-danger {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

/* Progress bar inside % card */
.progress-bar-container {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.1rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition-normal);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-bar-fill.danger {
  background: linear-gradient(90deg, #f43f5e, #e11d48);
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.70rem;
  margin-top: auto;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
}

.kpi-badge i {
  width: 11px;
  height: 11px;
}

.income-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-income-light);
}

.badge-positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-income-light);
}

.badge-negative {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-expense-light);
}

.kpi-subtext {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ==========================================================================
   Main Layout: Full Width Stacked + Dash Bottom Grid
   ========================================================================== */
.main-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.15rem;
  width: 100% !important;
}

.transaction-list-panel {
  width: 100% !important;
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.dash-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  width: 100%;
  align-items: start;
}

.dash-bottom-grid .panel-card {
  width: 100%;
  height: 100%;
}

/* Panel Cards */
.panel-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel-header {
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.panel-title-wrap h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.panel-title-wrap i {
  width: 20px;
  height: 20px;
}

.panel-icon-income { color: var(--color-income); }
.panel-icon-expense { color: var(--color-expense); }
.panel-icon-chart { color: #8b5cf6; }
.panel-icon-list { color: var(--color-primary); }
.panel-icon-demo { color: #a855f7; }

.badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-expense-light);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-pill-income {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-income-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-count {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.panel-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 {
  flex: 1;
}

label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-with-prefix input {
  padding-left: 2.8rem;
}

input:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

input::placeholder {
  color: var(--text-muted);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-text-action i {
  width: 14px;
  height: 14px;
}

.btn-text-action:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
}

/* Category Chip Selector */
.category-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-chip input[type="radio"] {
  display: none;
}

.chip-content {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.category-chip input[type="radio"]:checked + .chip-content {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.chip-content:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Emoji Picker Grid */
.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.emoji-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.emoji-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.emoji-btn.selected {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Color Picker Row */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.color-option input[type="radio"] {
  display: none;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.color-option input[type="radio"]:checked + .color-dot {
  border-color: #fff;
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Chart Panel
   ========================================================================== */
.chart-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.chart-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  gap: 0.75rem;
}

.chart-empty-state i {
  width: 44px;
  height: 44px;
  opacity: 0.4;
}

.chart-empty-state p {
  font-size: 0.85rem;
}

.category-legend {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  max-height: 180px;
  overflow-y: auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-name {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* Insights Summary Card */
.insights-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.4rem;
}

.insight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.insight-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
}

.insight-label i {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
}

.insight-value {
  color: #fff;
  font-weight: 700;
}

.insight-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

/* Tabs for Gastos & Entradas */
.tabbed-header {
  padding: 0.5rem 1.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.12);
}

.panel-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn i {
  width: 15px;
  height: 15px;
}

.tab-icon-expense { color: var(--color-expense); }
.tab-icon-income { color: var(--color-income); }

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--color-primary);
}

.tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-expense-light);
}

.income-tab-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-income-light);
}

.income-amount {
  color: var(--color-income-light) !important;
}

.income-empty-icon {
  background: rgba(16, 185, 129, 0.1) !important;
}

.income-empty-icon i {
  color: var(--color-income-light) !important;
}

.income-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-income-light);
}
.expense-list-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

/* Toolbar Quick Action Buttons: Saída & Entrada (Super Compact & Elegant) */
.toolbar-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  outline: none;
}

.btn-compact-action i {
  width: 13px;
  height: 13px;
  stroke-width: 2.6px;
  transition: transform var(--transition-fast);
}

/* Saída (Despesa / Vermelho Rosé) */
.btn-compact-expense {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 2px 7px rgba(244, 63, 94, 0.25);
}

.btn-compact-expense:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.38);
  color: #ffffff;
}

.btn-compact-expense:hover i {
  transform: scale(1.18);
}

.btn-compact-expense:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(244, 63, 94, 0.2);
}

/* Entrada (Receita / Verde Esmeralda) */
.btn-compact-income {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 2px 7px rgba(16, 185, 129, 0.25);
}

.btn-compact-income:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.38);
  color: #ffffff;
}

.btn-compact-income:hover i {
  transform: rotate(90deg);
}

.btn-compact-income:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.2);
}

/* Light Theme Overrides */
[data-theme="light"] .btn-compact-expense {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.2);
}

[data-theme="light"] .btn-compact-income {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.list-toolbar {
  padding: 1rem 1.4rem;
  display: flex;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
}

.search-box {
  flex: 2;
  min-width: 180px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 0.85rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  padding-left: 2.3rem;
  font-size: 0.85rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.filter-select-wrap {
  flex: 1;
  min-width: 140px;
}

.filter-select-wrap select {
  font-size: 0.85rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  cursor: pointer;
}

.expense-list-scroll {
  flex: 1;
  max-height: 580px;
  overflow-y: auto;
  padding: 1rem 1.4rem;
  padding: 1.25rem 1.4rem;
  max-height: 480px;
}

.expense-list-scroll::-webkit-scrollbar,
.category-legend::-webkit-scrollbar {
  width: 5px;
}

.expense-list-scroll::-webkit-scrollbar-track,
.category-legend::-webkit-scrollbar-track {
  background: transparent;
}

.expense-list-scroll::-webkit-scrollbar-thumb,
.category-legend::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

.expense-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Expense Item Card */
.expense-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  animation: fadeInSlide 0.3s ease forwards;
  cursor: pointer;
}

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

.expense-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(2px);
}

.expense-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.expense-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.expense-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.expense-badge-cat {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  font-weight: 600;
}

.expense-item-meta {
  flex-wrap: wrap;
}

.expense-tag-chip {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-secondary);
  font-weight: 600;
}

.field-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.expense-item-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  gap: 0.15rem;
  margin-left: auto;
  flex-shrink: 0;
}

.expense-item-amount {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--color-expense-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.expense-item-date {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.expense-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-action i {
  width: 17px;
  height: 17px;
}

.btn-edit-expense:hover,
.btn-edit-income:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--color-primary-light, #c084fc);
}

[data-theme="light"] .btn-edit-expense:hover,
[data-theme="light"] .btn-edit-income:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.btn-delete-expense:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-expense-light);
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-open,
.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(59, 130, 246, 0.15);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open .modal-card,
.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-close i {
  width: 18px;
  height: 18px;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.modal-actions-between {
  justify-content: space-between;
  width: 100%;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fff;
}

.btn-danger-outline i {
  width: 16px;
  height: 16px;
}

[data-theme="light"] .btn-danger-outline {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.3);
  color: #e11d48;
}

[data-theme="light"] .btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: #e11d48;
  color: #be123c;
}

@media (max-width: 480px) {
  .modal-actions-between {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  .modal-actions-between .btn-danger-outline,
  .modal-actions-between .modal-actions-right {
    width: 100%;
  }
  .modal-actions-right {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }
  .modal-actions-right .btn {
    flex: 1;
  }
  .btn-danger-outline {
    justify-content: center;
  }
}

.modal-card.modal-card-sm {
  max-width: 440px;
}

/* ==========================================================================
   Clear Data Modal (Mês Atual vs Todo o Histórico)
   ========================================================================== */
.clear-modal-intro {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

.clear-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.clear-option-btn {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-normal);
  width: 100%;
  font-family: inherit;
  color: inherit;
  position: relative;
}

.clear-option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.clear-option-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clear-option-icon i {
  width: 19px;
  height: 19px;
}

.clear-option-icon.month-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.clear-option-btn:hover .clear-option-icon.month-icon {
  background: rgba(245, 158, 11, 0.25);
}

.clear-option-icon.all-icon {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.clear-option-btn:hover .clear-option-icon.all-icon {
  background: rgba(244, 63, 94, 0.25);
}

.clear-option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.clear-option-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.clear-option-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.clear-option-desc strong {
  color: var(--text-secondary);
}

.clear-option-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.clear-option-btn:hover .clear-option-chevron {
  color: #fff;
  transform: translateX(3px);
}

/* Clear Options Light Theme */
[data-theme="light"] .clear-option-btn {
  background: #f8fafc;
  border-color: rgba(226, 232, 240, 0.9);
}

[data-theme="light"] .clear-option-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .clear-option-title {
  color: #0f172a;
}

[data-theme="light"] .clear-option-desc {
  color: #64748b;
}

[data-theme="light"] .clear-option-desc strong {
  color: #334155;
}

[data-theme="light"] .clear-option-chevron {
  color: #94a3b8;
}

[data-theme="light"] .clear-option-btn:hover .clear-option-chevron {
  color: #0f172a;
}

/* Demo 12M Special Option Styling */
.clear-option-icon.demo-icon-12m {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.clear-option-btn:hover .clear-option-icon.demo-icon-12m {
  background: rgba(168, 85, 247, 0.28);
}

.clear-option-btn.demo-btn-primary {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.05);
}

.clear-option-btn.demo-btn-primary:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.55);
}

[data-theme="light"] .clear-option-btn.demo-btn-primary {
  background: rgba(147, 51, 234, 0.04);
  border-color: rgba(147, 51, 234, 0.25);
}

[data-theme="light"] .clear-option-btn.demo-btn-primary:hover {
  background: rgba(147, 51, 234, 0.09);
  border-color: rgba(147, 51, 234, 0.45);
}

[data-theme="light"] .clear-option-icon.demo-icon-12m {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
  border-color: rgba(147, 51, 234, 0.25);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  gap: 0.75rem;
  margin: auto 0;
}

.empty-state-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.empty-state-icon i {
  width: 30px;
  height: 30px;
  color: var(--text-secondary);
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 320px;
  line-height: 1.45;
}

/* List Footer */
.list-footer {
  padding: 1rem 1.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.list-footer-stats {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.list-footer-stats strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  background: #1e293b;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 360px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-success {
  border-left: 4px solid var(--color-income);
}

.toast.toast-danger {
  border-left: 4px solid var(--color-expense);
}

.toast.toast-info {
  border-left: 4px solid var(--color-primary);
}

/* ==========================================================================
   Responsive Breakpoints - Mobile Optimization
   ========================================================================== */
@media (max-width: 1024px) {
  .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 0.85rem 0.85rem 2.5rem;
    gap: 1.15rem;
  }

  /* Header Compacto no Celular */
  .app-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .brand-icon i {
    width: 18px;
    height: 18px;
  }

  .brand h1 {
    font-size: 1.12rem;
  }

  .brand-greeting {
    font-size: 0.78rem;
  }

  .subtitle {
    display: none;
  }

  .header-profile-actions {
    gap: 0.45rem;
  }

  .header-month-picker-wrap {
    height: 36px !important;
    padding: 0 0.55rem !important;
    font-size: 0.76rem !important;
    gap: 0.25rem !important;
  }

  .month-picker-dropdown {
    right: -45px;
    width: 260px;
    padding: 0.75rem;
  }

  .btn-theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .btn-theme-toggle span {
    display: none;
  }

  .btn-theme-toggle .theme-svg-icon {
    width: 18px;
    height: 18px;
  }

  .user-profile-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
  }

  .user-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.82rem !important;
  }

  /* Barra de Navegação de Mês & Ações Rápidas no Celular */
  .app-toolbar {
    padding: 0.75rem 0.85rem;
    gap: 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-nav {
    width: 100%;
    justify-content: center;
  }

  .month-navigator {
    width: 100%;
    justify-content: space-between;
    padding: 0.2rem 0.35rem;
  }

  .btn-month-nav {
    width: 30px;
    height: 30px;
  }

  .btn-month-nav i {
    width: 15px;
    height: 15px;
  }

  .month-label-wrap {
    font-size: 0.82rem;
    padding: 0.2rem 0.5rem;
  }

  .month-label-wrap i {
    width: 14px;
    height: 14px;
  }

  .btn-jump-current {
    font-size: 0.72rem;
    padding: 0.22rem 0.5rem;
  }

  /* Barra de Ações no Celular: Grade de 2 Colunas Perfeita */
  .toolbar-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .toolbar-actions .btn {
    padding: 0.48rem 0.2rem !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    height: 38px !important;
    min-width: 0 !important;
    border-radius: var(--radius-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
  }

  .toolbar-actions .btn i {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  .toolbar-actions .btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Grid de Dashboards / KPIs: 2x2 Elegante e Proporcional */
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .kpi-card {
    padding: 0.85rem 0.9rem;
    gap: 0.35rem;
    border-radius: var(--radius-md);
  }

  .kpi-header {
    gap: 0.4rem;
  }

  .kpi-title {
    font-size: 0.70rem;
    letter-spacing: 0.02em;
  }

  .kpi-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .kpi-icon-wrap i {
    width: 14px;
    height: 14px;
  }

  .kpi-value {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
  }

  .kpi-footer {
    margin-top: 0.15rem;
  }

  .kpi-subtext {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .kpi-badge {
    font-size: 0.66rem;
    padding: 0.12rem 0.4rem;
  }

  .kpi-badge i {
    width: 11px;
    height: 11px;
  }

  .progress-bar-wrap {
    height: 4px;
  }

  /* Abas de Navegação no Celular: Grade de 4 Colunas 100% Visíveis Sem Rolagem */
  .tabbed-header {
    padding: 0 !important;
    overflow: visible !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  .panel-tabs {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    width: 100% !important;
    gap: 0 !important;
    background: rgba(0, 0, 0, 0.1) !important;
  }

  .tab-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.65rem 0.15rem 0.55rem !important;
    gap: 0.25rem !important;
    width: 100% !important;
    border-bottom: 2.5px solid transparent !important;
    position: relative !important;
    transition: all var(--transition-fast) !important;
  }

  .tab-btn i {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
  }

  .tab-btn span:not(.tab-badge) {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .tab-btn.active {
    border-bottom-color: var(--color-primary) !important;
    background: rgba(139, 92, 246, 0.08) !important;
    color: var(--text-primary) !important;
  }

  .tab-badge {
    position: absolute !important;
    top: 4px !important;
    left: calc(50% + 4px) !important;
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    padding: 0.06rem 0.32rem !important;
    line-height: 1 !important;
    border-radius: var(--radius-full) !important;
    min-width: 15px !important;
    text-align: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  }

  [data-theme="light"] .panel-tabs {
    background: rgba(0, 0, 0, 0.03) !important;
  }

  [data-theme="light"] .tab-btn.active {
    background: rgba(139, 92, 246, 0.06) !important;
  }

  /* Toolbar de Filtros e Busca */
  .list-toolbar {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .toolbar-quick-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
    order: -1;
  }

  .toolbar-quick-actions .btn-compact-action {
    width: 100%;
    height: 34px;
    font-size: 0.8rem;
  }

  .search-box, .filter-select-wrap {
    width: 100%;
  }

  .search-box input {
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  }

  .search-box i {
    width: 15px;
    height: 15px;
  }

  .filter-select-wrap select {
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
  }

  /* Lista de Transações no Celular */
  .expense-list-scroll {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .expense-item {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .expense-item-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .expense-item-title {
    font-size: 0.86rem;
  }

  .expense-item-meta {
    font-size: 0.70rem;
    gap: 0.4rem;
  }

  .expense-item-amount {
    font-size: 0.95rem;
  }

  .expense-item-date {
    font-size: 0.69rem;
  }

  .btn-action {
    width: 28px;
    height: 28px;
  }

  .btn-action i {
    width: 14px;
    height: 14px;
  }

  .list-footer {
    padding: 0.75rem 0.9rem;
  }

  .list-footer-stats {
    font-size: 0.8rem;
  }

  .list-footer-stats strong {
    font-size: 0.95rem;
  }

  /* Dashboards Inferiores */
  .dash-bottom-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 0.65rem 0.65rem 2rem;
    gap: 0.85rem;
  }

  .kpi-grid {
    gap: 0.5rem;
  }

  .kpi-card {
    padding: 0.7rem 0.75rem;
    gap: 0.28rem;
  }

  .kpi-title {
    font-size: 0.64rem;
  }

  .kpi-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }

  .kpi-icon-wrap i {
    width: 13px;
    height: 13px;
  }

  .kpi-value {
    font-size: 1.08rem;
  }

  .kpi-subtext {
    font-size: 0.64rem;
  }

  .kpi-badge {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .brand-icon i {
    width: 16px;
    height: 16px;
  }

  .user-name {
    max-width: 60px;
    font-size: 0.72rem;
  }

  .tab-btn {
    padding: 0.55rem 0.1rem 0.45rem !important;
  }

  .tab-btn span:not(.tab-badge) {
    font-size: 0.64rem !important;
  }

  .tab-btn i {
    width: 16px !important;
    height: 16px !important;
  }

  .tab-badge {
    top: 3px !important;
    left: calc(50% + 3px) !important;
    font-size: 0.54rem !important;
    padding: 0.04rem 0.28rem !important;
  }
}

@media (max-width: 360px) {
  .toolbar-actions {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
  }
  .toolbar-actions .btn {
    height: 40px !important;
    font-size: 0.78rem !important;
  }
}

/* ==========================================================================
   Autenticação & Menu de Perfil de Usuário
   ========================================================================== */
.btn-admin-nav {
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.btn-admin-nav:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

[data-theme="light"] .btn-admin-nav {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.3);
  color: #b45309;
}

[data-theme="light"] .btn-admin-nav:hover {
  background: rgba(217, 119, 6, 0.2);
}

.user-profile-wrap {
  position: relative;
  z-index: 550;
  display: inline-flex;
  align-items: center;
}

.user-profile-wrap.is-open,
.user-profile-wrap.active {
  z-index: 600;
}

.user-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 50%;
  position: relative;
}

.user-profile-btn:hover {
  transform: scale(1.06);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.user-profile-btn:hover .user-avatar,
.user-profile-wrap.is-open .user-avatar {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-theme="light"] .user-avatar {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.badge-role-admin {
  color: #fbbf24;
}

.user-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.user-profile-wrap.is-open .user-chevron,
.user-profile-wrap.active .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.5), 0 10px 15px -5px rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 99999 !important;
  animation: fadeInDown 0.2s ease;
}

.user-profile-wrap.is-open .user-dropdown-menu,
.user-profile-wrap.active .user-dropdown-menu,
.user-dropdown-menu.is-open,
.user-dropdown-menu.active {
  display: flex !important;
}

[data-theme="light"] .user-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 0.65rem;
}

.dropdown-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
}

.dropdown-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-user-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dropdown-user-details strong {
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-provider {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-top: 0.15rem;
}

.badge-provider-google {
  background: rgba(66, 133, 244, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.badge-provider-local {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.3rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.dropdown-item i {
  width: 16px;
  height: 16px;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.dropdown-item.item-danger {
  color: var(--color-expense-light);
}

.dropdown-item.item-danger:hover {
  background: rgba(244, 63, 94, 0.12);
  color: var(--color-expense);
}

/* ==========================================================================
   Modal de Autenticação / Login / Cadastro
   ========================================================================== */
.auth-modal-card {
  max-width: 440px;
  width: 92%;
  padding: 2.2rem 2rem;
  text-align: center;
}

.auth-header {
  margin-bottom: 1.5rem;
}

.auth-brand-icon {
  margin: 0 auto 0.9rem;
  width: 52px;
  height: 52px;
}

.auth-google-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.google-signin-btn-container {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  margin-bottom: 1.25rem;
}

[data-theme="light"] .auth-tabs {
  background: rgba(0, 0, 0, 0.03);
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}

.admin-quick-login-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

.btn-admin-quick {
  font-size: 0.82rem;
  padding: 0.55rem;
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.btn-admin-quick:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #fbbf24;
}

[data-theme="light"] .btn-admin-quick {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.4);
}

/* ==========================================================================
   Painel de Gestão de Usuários (Administrador)
   ========================================================================== */
.admin-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-icon-shield {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.admin-icon-shield i {
  width: 24px;
  height: 24px;
}

.admin-title-wrap h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-admin-total::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.card-admin-google::before {
  background: linear-gradient(90deg, #ea4335, #f87171);
}

.card-admin-local::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.card-admin-records::before {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

.admin-table-panel {
  padding: 0;
}

.admin-table-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-table-container {
  overflow-x: auto;
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

[data-theme="light"] .admin-table th {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-secondary);
}

.admin-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .admin-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-cell-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}

.user-cell-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-cell-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-cell-name {
  font-weight: 700;
  color: var(--text-primary);
}

.user-cell-id {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-role-admin-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-role-user-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-blocked {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.admin-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.btn-table-action {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-table-action {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

[data-theme="light"] .btn-table-action:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.btn-table-action.action-delete:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--color-expense-light);
}

.btn-table-action i {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   Aba e Gerenciador de Categorias
   ========================================================================== */
.tab-icon-category {
  color: #8b5cf6;
}

.category-tab-badge {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.categories-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  gap: 1rem;
}

.categories-view-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.categories-view-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.category-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
}

.category-admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.category-admin-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-card-hover);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.category-card-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.category-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.category-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-card-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.category-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card-hover);
  transform: translateY(-1px);
}

.btn-icon-action.item-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .category-admin-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .category-admin-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .categories-view-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Relatórios View & Gráfico de Linha Histórico
   ========================================================================== */
.tab-icon-report {
  color: #8b5cf6;
}

/* Expansão natural para a aba de Relatórios sem limitação ou barra interna de rolagem */
.transaction-list-panel.is-reports {
  min-height: auto !important;
  height: auto !important;
}

.transaction-list-panel.is-reports .expense-list-scroll {
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
  padding: 0 0 1rem 0 !important;
}

#reportsView {
  padding: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.reports-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
}

.reports-view-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.reports-view-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.reports-header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.reports-select-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.report-select {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.report-select:focus {
  border-color: var(--color-primary);
}

/* Métricas Resumo do Relatório */
.report-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0 1.4rem;
}

.report-metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.report-metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.report-metric-card.metric-income::before { background: #10b981; }
.report-metric-card.metric-expense::before { background: #f43f5e; }
.report-metric-card.metric-balance::before { background: #8b5cf6; }
.report-metric-card.metric-rate::before { background: #a855f7; }

.report-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.report-metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-income .report-metric-value { color: #10b981; }
.metric-expense .report-metric-value { color: #f43f5e; }
.metric-balance .report-metric-value { color: #8b5cf6; }
.metric-rate .report-metric-value { color: #a855f7; }

.report-metric-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Dica Interativa */
.report-hint-box {
  margin: 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.report-hint-box i {
  width: 18px;
  height: 18px;
  color: #8b5cf6;
  flex-shrink: 0;
}

.report-hint-box em {
  color: #f43f5e;
  font-style: normal;
  font-weight: 700;
}

/* Container do Gráfico */
.report-chart-container {
  padding: 0 1.4rem 1.5rem;
  width: 100%;
  height: 480px;
  position: relative;
}

/* Tema Claro Overrides */
[data-theme="light"] .reports-view-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .report-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .report-metric-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .report-hint-box {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.18);
  color: #475569;
}

.report-section-divider {
  margin: 1.5rem 1.4rem 0.5rem;
  height: 1px;
  background: var(--border-subtle);
}

.reports-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.reports-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.reports-section-title-wrap i {
  width: 20px;
  height: 20px;
  color: #8b5cf6;
  flex-shrink: 0;
}

.reports-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

@media (max-width: 640px) {
  .reports-view-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .reports-header-controls {
    width: 100%;
    justify-content: space-between;
  }
  .reports-section-header {
    padding: 0 1rem;
  }
  .report-section-divider {
    margin: 1.25rem 1rem 0.25rem;
  }
  .report-metrics-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0 1rem;
  }
  .report-metric-value {
    font-size: 1.05rem;
  }
  .report-hint-box {
    margin: 0 1rem;
    font-size: 0.78rem;
  }
  .report-chart-container {
    height: 350px;
    padding: 0 0.8rem 1rem;
  }
}
/* ==========================================================================
   Landing Page Moderna (Estilo Kinvo / Fintech SaaS)
   ========================================================================== */

/* Brand Link */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

/* Landing Navigation in Header */
.landing-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0 auto;
}

.landing-nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 0.35rem 0.2rem;
  position: relative;
}

.landing-nav-link:hover {
  color: #0DCEE6;
}

.landing-nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: #0DCEE6;
  transition: width var(--transition-fast);
  border-radius: var(--radius-full);
}

.landing-nav-link:hover::after {
  width: 100%;
}

/* Landing Header Action Buttons */
.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.46rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: rgba(114, 63, 209, 0.16);
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-landing-login:hover {
  background: rgba(114, 63, 209, 0.32);
  border-color: #8b5cf6;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-landing-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.48rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0DCEE6 0%, #06b6d4 100%);
  border: none;
  color: #081826;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 206, 230, 0.35);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-landing-register:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #0DCEE6 100%);
  box-shadow: 0 6px 18px rgba(13, 206, 230, 0.5);
  transform: translateY(-1px);
  color: #000;
}

.btn-landing-login i,
.btn-landing-register i {
  width: 15px;
  height: 15px;
}

/* Botão Menu Mobile (3 Palitos - Hambúrguer Estilo Kinvo) */
.btn-mobile-menu {
  display: none; /* Oculto por padrão em Desktop */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mobile-menu:hover,
.btn-mobile-menu:active,
.btn-mobile-menu.active {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.5);
  color: #fff;
}

[data-theme="light"] .btn-mobile-menu {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

[data-theme="light"] .btn-mobile-menu:hover,
[data-theme="light"] .btn-mobile-menu.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: #8b5cf6;
}

.btn-mobile-menu.active .hamburger-lines {
  display: none !important;
}

.btn-mobile-menu.active .close-lines {
  display: block !important;
}

/* Drawer / Dropdown do Menu Mobile (Estilo Kinvo) */
.mobile-menu-drawer {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(19, 10, 39, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 92, 246, 0.25);
  padding: 1.25rem;
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

[data-theme="light"] .mobile-menu-drawer {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.mobile-menu-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 490;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Ações no Topo do Menu Mobile: Entrar e Criar Conta */
.mobile-menu-actions {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.btn-mobile-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.15);
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="light"] .btn-mobile-login {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
}

.btn-mobile-login:hover,
.btn-mobile-login:active {
  background: rgba(139, 92, 246, 0.3);
  border-color: #8b5cf6;
  color: #ffffff;
}

.btn-mobile-register {
  flex: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0DCEE6 0%, #06b6d4 100%);
  border: none;
  color: #081826;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 206, 230, 0.35);
  transition: all var(--transition-fast);
}

.btn-mobile-register:hover,
.btn-mobile-register:active {
  background: linear-gradient(135deg, #22d3ee 0%, #0DCEE6 100%);
  box-shadow: 0 6px 18px rgba(13, 206, 230, 0.5);
  color: #000;
}

.btn-mobile-login i,
.btn-mobile-register i {
  width: 16px;
  height: 16px;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: 0.75rem;
}

/* Links das Seções no Menu Mobile */
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
  background: rgba(255, 255, 255, 0.06);
  color: #0DCEE6;
  transform: translateX(3px);
}

[data-theme="light"] .mobile-menu-link:hover,
[data-theme="light"] .mobile-menu-link:active {
  background: rgba(0, 0, 0, 0.04);
  color: #7c3aed;
}

.mobile-link-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-link-text i {
  width: 18px;
  height: 18px;
  color: #a855f7;
}

.mobile-link-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.mobile-menu-link:hover .mobile-link-arrow {
  transform: translateX(2px);
  color: #0DCEE6;
}

/* Landing View Container */
.landing-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3.8rem;
  padding: 0.5rem 0 2rem;
}

/* 1. Hero Section */
.landing-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2.8rem;
  align-items: center;
  padding: 3.5rem 2.5rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 15% 25%, rgba(114, 63, 209, 0.28) 0%, rgba(13, 206, 230, 0.12) 50%, rgba(15, 7, 32, 0.4) 100%), #130a27;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(13, 206, 230, 0.14);
  border: 1px solid rgba(13, 206, 230, 0.35);
  color: #0DCEE6;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0DCEE6;
  box-shadow: 0 0 8px #0DCEE6;
}

.hero-title {
  font-size: 2.55rem;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin: 0;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #0DCEE6 0%, #a855f7 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #b8b3d6;
  max-width: 540px;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0DCEE6 0%, #0891b2 100%);
  color: #081826;
  font-weight: 800;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 22px rgba(13, 206, 230, 0.45);
  transition: all var(--transition-fast);
}

.btn-hero-primary:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #0DCEE6 100%);
  box-shadow: 0 8px 28px rgba(13, 206, 230, 0.6);
  transform: translateY(-2px);
  color: #000;
}

.btn-hero-primary i {
  width: 17px;
  height: 17px;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-hero-secondary i {
  width: 17px;
  height: 17px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9d94c9;
}

.hero-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-highlight-item i {
  width: 16px;
  height: 16px;
  color: #0DCEE6;
}

/* Hero Visual / Mockup */
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-mockup-card {
  background: rgba(21, 12, 42, 0.85);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.mockup-header-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot.red { background: #f43f5e; }
.mockup-dot.yellow { background: #eab308; }
.mockup-dot.green { background: #10b981; }

.mockup-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  margin-left: 0.35rem;
}

.mockup-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.mockup-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.mockup-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mockup-kpi .kpi-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #9d94c9;
}

.mockup-kpi .kpi-val {
  font-size: 0.96rem;
  font-weight: 800;
  white-space: nowrap;
}

.mockup-kpi .kpi-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.kpi-green .kpi-val { color: #10b981; }
.kpi-rose .kpi-val { color: #f43f5e; }
.kpi-purple .kpi-val { color: #a855f7; }

.mockup-chart-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mockup-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b0a8d6;
}

.chart-growth-tag {
  color: #0DCEE6;
  font-weight: 700;
}

.mockup-svg-chart {
  width: 100%;
  height: 65px;
  overflow: visible;
}

.mockup-transactions-preview {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mockup-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tx-icon-pill {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08);
}

.tx-item-left strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
}

.tx-badge {
  font-size: 0.65rem;
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #b8b2db;
}

.badge-income {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.tx-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.tx-amount {
  font-size: 0.86rem;
  font-weight: 800;
}

.tx-minus { color: #f43f5e; }
.tx-plus { color: #10b981; }

.tx-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* 2. Espaço de Publicidade / Anúncio */
.landing-ad-container {
  width: 100%;
}

.ad-slot {
  background: linear-gradient(135deg, rgba(114, 63, 209, 0.08) 0%, rgba(13, 206, 230, 0.06) 100%);
  border: 1.5px dashed rgba(13, 206, 230, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.ad-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0DCEE6;
}

.ad-tag i {
  width: 14px;
  height: 14px;
}

.ad-content-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ad-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.ad-info p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 680px;
}

.btn-ad-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(13, 206, 230, 0.15);
  border: 1.5px solid rgba(13, 206, 230, 0.45);
  color: #0DCEE6;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-ad-action:hover {
  background: #0DCEE6;
  color: #071926;
  border-color: #0DCEE6;
  transform: translateY(-1px);
}

.btn-ad-action i {
  width: 15px;
  height: 15px;
}

/* 3. Seção de Recursos (Cards) */
.section-header-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.section-pill-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(114, 63, 209, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-main-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
}

.section-main-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 206, 230, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.feature-icon-box i {
  width: 24px;
  height: 24px;
}

.icon-gradient-1 { background: linear-gradient(135deg, #0DCEE6 0%, #0284c7 100%); }
.icon-gradient-2 { background: linear-gradient(135deg, #723FD1 0%, #4338ca 100%); }
.icon-gradient-3 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.icon-gradient-4 { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }
.icon-gradient-5 { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.icon-gradient-6 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* 4. Como Funciona (Steps) */
.steps-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.step-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  text-align: left;
}

.step-number {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0DCEE6 0%, #723FD1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.step-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.step-divider-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-divider-arrow i {
  width: 28px;
  height: 28px;
}

/* 5. Comparativo */
.landing-comparison {
  width: 100%;
}

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comparison-header {
  text-align: center;
}

.comparison-header h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.comparison-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.comparison-col {
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.col-finapp {
  background: rgba(13, 206, 230, 0.05);
  border: 1.5px solid rgba(13, 206, 230, 0.35);
}

.col-sheets {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
}

.col-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.icon-good { color: #10b981; }
.icon-bad { color: #f43f5e; }

.comparison-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.comparison-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.col-finapp .comparison-list li i {
  color: #10b981;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.col-sheets .comparison-list li i {
  color: #f43f5e;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* 7. CTA Final Banner */
.landing-cta-banner {
  background: linear-gradient(135deg, #1b0a3d 0%, #4b1fa8 60%, #0891b2 100%);
  padding: 4rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.cta-banner-content {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(13, 206, 230, 0.2);
  border: 1px solid rgba(13, 206, 230, 0.4);
  color: #0DCEE6;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cta-banner-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: #ffffff;
}

.cta-banner-content p {
  font-size: 1rem;
  line-height: 1.55;
  color: #d8d3f2;
  margin: 0;
}

.cta-banner-buttons {
  margin-top: 0.5rem;
}

/* 8. Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.landing-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-brand .brand-icon {
  width: 40px;
  height: 40px;
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.footer-links-grid {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
}

.footer-link-col a,
.footer-link-col span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link-col a:hover {
  color: #0DCEE6;
}

.landing-footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Light Theme Overrides for Landing Page */
[data-theme="light"] .landing-hero {
  background: radial-gradient(circle at 15% 25%, rgba(114, 63, 209, 0.12) 0%, rgba(13, 206, 230, 0.15) 50%, #f1f5f9 100%), #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero-title {
  color: #0f172a;
}

[data-theme="light"] .hero-subtitle {
  color: #475569;
}

[data-theme="light"] .btn-hero-secondary {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

[data-theme="light"] .hero-highlights {
  color: #64748b;
}

[data-theme="light"] .hero-mockup-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .mockup-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mockup-title {
  color: #0f172a;
}

[data-theme="light"] .mockup-kpi {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .mockup-kpi .kpi-label {
  color: #64748b;
}

[data-theme="light"] .mockup-chart-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .mockup-chart-header {
  color: #475569;
}

[data-theme="light"] .mockup-tx-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .tx-item-left strong {
  color: #0f172a;
}

[data-theme="light"] .tx-badge {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

[data-theme="light"] .btn-landing-login {
  background: rgba(114, 63, 209, 0.08);
  border-color: rgba(114, 63, 209, 0.3);
  color: #6d28d9;
}

[data-theme="light"] .btn-landing-login:hover {
  background: #6d28d9;
  color: #ffffff;
}

[data-theme="light"] .col-sheets {
  background: #f8fafc;
}

/* Responsive Rules for Landing Page */
@media (max-width: 1024px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.8rem;
    gap: 2.2rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 860px) {
  .landing-nav {
    display: none !important;
  }
  .landing-header-actions {
    display: none !important; /* No mobile, ações ficam exclusivamente dentro do menu 3 palitos */
  }
  /* Exibe o botão 3 palitos apenas quando o usuário NÃO estiver logado */
  body:not(.user-logged-in) .btn-mobile-menu {
    display: inline-flex !important;
  }
  body.user-logged-in .btn-mobile-menu,
  .user-profile-wrap:not([style*="display: none"]) ~ .btn-mobile-menu,
  .btn-mobile-menu.hidden-logged-in {
    display: none !important;
  }
  .steps-container {
    flex-direction: column;
  }
  .step-divider-arrow {
    transform: rotate(90deg);
    margin: -0.5rem 0;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 0.92rem;
  }
  .landing-hero {
    padding: 2rem 1.2rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
  }
  .mockup-kpis {
    grid-template-columns: 1fr;
  }
  .cta-banner-content h2 {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   Tela de Login Restrita do Administrador (/adm)
   ========================================================================== */
.admin-login-view {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  animation: fadeInModal 0.25s ease-out;
}

.admin-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.admin-login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-login-shield-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

.admin-login-shield-badge i {
  width: 32px;
  height: 32px;
}

.admin-login-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.admin-login-header .subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.admin-login-form .form-group {
  margin-bottom: 1.25rem;
}

.admin-login-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-login-form .input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-login-form .input-with-icon .field-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.admin-login-form .input-with-icon input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.admin-login-form .input-with-icon input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.adm-login-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  text-align: center;
}

.btn-adm-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  cursor: pointer;
}

.btn-adm-submit i {
  width: 18px;
  height: 18px;
}

.admin-login-footer {
  margin-top: 1.75rem;
  text-align: center;
}

.admin-login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.admin-login-back-link:hover {
  color: var(--text-primary);
}

.admin-login-back-link i {
  width: 14px;
  height: 14px;
}

/* Indicadores de Login na Tabela Administrativa */
.admin-login-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.admin-login-time i {
  color: #3b82f6;
  width: 13px;
  height: 13px;
}

.admin-login-empty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}

.admin-login-empty i {
  width: 12px;
  height: 12px;
}

.badge-logins-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-logins-count i {
  width: 12px;
  height: 12px;
}

[data-theme="light"] .badge-logins-count {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.25);
}

.btn-action-block {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.btn-action-block:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #ffffff !important;
}

.btn-action-unblock {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
}

.btn-action-unblock:hover {
  background: rgba(16, 185, 129, 0.28) !important;
  color: #ffffff !important;
}

.btn-admin-logout {
  color: var(--text-secondary);
}

.btn-admin-logout:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-reset-password {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

.btn-reset-password:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  color: #ffffff !important;
}

[data-theme="light"] .btn-reset-password {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #b45309 !important;
}

[data-theme="light"] .btn-reset-password:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Gráfico de Acessos Diários (Painel Administrativo)
   ========================================================================== */
.admin-chart-panel {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

[data-theme="light"] .admin-chart-panel {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.admin-daily-chart-container {
  position: relative;
  height: 290px;
  width: 100%;
}

@media (max-width: 640px) {
  .admin-daily-chart-container {
    height: 240px;
  }
}





/* Visão Mensal dos Relatórios (barras laterais de TAGs e Categorias) */
.report-month-section {
  padding-top: 1.2rem;
}
.report-month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.5rem 1.4rem 0.8rem;
}
.report-month-card {
  min-width: 0;
  padding: 0.6rem 0.8rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
[data-theme="light"] .report-month-card {
  border-color: rgba(0, 0, 0, 0.08);
}
.report-month-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.report-month-chart {
  position: relative;
  width: 100%;
}
.report-month-empty {
  text-align: center;
  opacity: 0.7;
  padding: 2rem 0;
}
@media (max-width: 800px) {
  .report-month-grid {
    grid-template-columns: 1fr;
    padding: 0.6rem 0.8rem 1rem;
  }
}
