/* � CONTROLE FINANCEIRO - Design System Moderno 2026 */
/* Design: Glassmorphism Premium + Neumorphism Suave + Micro-interações */

/* ============================================================================
   1. VARIÁVEIS DE TEMA DINÂMICO
   ============================================================================ */

/* Tema Claro - Moderno e Alegre */
:root {
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-solid: #FFFFFF;
  --bg-elevated: #E2E8F0;
  --bg-input: #F8FAFC;
  
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-placeholder: #94A3B8;
  
  /* Cores principais - Gradiente moderno */
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --primary-rgb: 99, 102, 241;
  
  --success: #10B981;
  --success-light: #34D399;
  --success-rgb: 16, 185, 129;
  
  --danger: #EF4444;
  --danger-light: #F87171;
  --danger-rgb: 239, 68, 68;
  
  --warning: #F59E0B;
  --warning-light: #FBBF24;
  --warning-rgb: 245, 158, 11;
  
  --accent-gold: #F59E0B;
  --accent-gold-rgb: 245, 158, 11;
  
  --accent-pink: #EC4899;
  --accent-cyan: #06B6D4;
  --accent-purple: #8B5CF6;
  
  /* Sombras modernas */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-colored: 0 10px 30px -5px rgba(var(--primary-rgb), 0.3);
  
  /* Bordas */
  --border-color: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.04);
  
  /* Tailwind mappings */
  --text-gray-50: #0F172A;
  --text-gray-100: #1E293B;
  --text-gray-200: #334155;
  --text-gray-300: #475569;
  --text-gray-400: #64748B;
  --text-gray-500: #94A3B8;
  --text-gray-600: #CBD5E1;
  --text-gray-700: #E2E8F0;
  
  --border-gray-800: rgba(0, 0, 0, 0.08);
  --border-gray-900: rgba(0, 0, 0, 0.04);
  --border-gray-800-40: rgba(0, 0, 0, 0.04);
  --border-gray-800-60: rgba(0, 0, 0, 0.06);
  --border-gray-800-80: rgba(0, 0, 0, 0.08);
  
  /* Animações */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Tema Escuro - OLED Premium */
[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.95);
  --bg-card-solid: #1E293B;
  --bg-elevated: #334155;
  --bg-input: #0F172A;
  
  --text-primary: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --text-placeholder: #64748B;
  
  --primary: #818CF8;
  --primary-light: #A5B4FC;
  --primary-dark: #6366F1;
  --primary-rgb: 129, 140, 248;
  
  --success: #34D399;
  --success-light: #6EE7B7;
  --success-rgb: 52, 211, 153;
  
  --danger: #F87171;
  --danger-light: #FCA5A5;
  --danger-rgb: 248, 113, 113;
  
  --warning: #FBBF24;
  --warning-light: #FCD34D;
  --warning-rgb: 251, 191, 36;
  
  --accent-gold: #FBBF24;
  --accent-gold-rgb: 251, 191, 36;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-colored: 0 10px 30px -5px rgba(var(--primary-rgb), 0.4);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.05);
  
  --text-gray-50: #F8FAFC;
  --text-gray-100: #F1F5F9;
  --text-gray-200: #E2E8F0;
  --text-gray-300: #CBD5E1;
  --text-gray-400: #94A3B8;
  --text-gray-500: #64748B;
  --text-gray-600: #475569;
  --text-gray-700: #334155;
  
  --border-gray-800: rgba(255, 255, 255, 0.1);
  --border-gray-900: rgba(255, 255, 255, 0.05);
  --border-gray-800-40: rgba(255, 255, 255, 0.04);
  --border-gray-800-60: rgba(255, 255, 255, 0.06);
  --border-gray-800-80: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: rgba(30, 41, 59, 0.95);
    --bg-card-solid: #1E293B;
    --bg-elevated: #334155;
    --bg-input: #0F172A;
    
    --text-primary: #F8FAFC;
    --text-secondary: #E2E8F0;
    --text-muted: #94A3B8;
    --text-placeholder: #64748B;
    
    --primary: #818CF8;
    --primary-light: #A5B4FC;
    --primary-dark: #6366F1;
    --primary-rgb: 129, 140, 248;
    
    --success: #34D399;
    --success-light: #6EE7B7;
    --success-rgb: 52, 211, 153;
    
    --danger: #F87171;
    --danger-light: #FCA5A5;
    --danger-rgb: 248, 113, 113;
    
    --warning: #FBBF24;
    --warning-light: #FCD34D;
    --warning-rgb: 251, 191, 36;
    
    --accent-gold: #FBBF24;
    --accent-gold-rgb: 251, 191, 36;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --shadow-colored: 0 10px 30px -5px rgba(var(--primary-rgb), 0.4);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.05);
    
    --text-gray-50: #F8FAFC;
    --text-gray-100: #F1F5F9;
    --text-gray-200: #E2E8F0;
    --text-gray-300: #CBD5E1;
    --text-gray-400: #94A3B8;
    --text-gray-500: #64748B;
    --text-gray-600: #475569;
    --text-gray-700: #334155;
    
    --border-gray-800: rgba(255, 255, 255, 0.1);
    --border-gray-900: rgba(255, 255, 255, 0.05);
    --border-gray-800-40: rgba(255, 255, 255, 0.04);
    --border-gray-800-60: rgba(255, 255, 255, 0.06);
    --border-gray-800-80: rgba(255, 255, 255, 0.08);
  }
}

/* ============================================================================
   2. RESET E ESTILOS BASE
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  height: 100vh;
  height: -webkit-fill-available;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Redefinição semântica das classes cinzas do Tailwind */
.text-gray-100 { color: var(--text-gray-100) !important; }
.text-gray-200 { color: var(--text-gray-200) !important; }
.text-gray-300 { color: var(--text-gray-300) !important; }
.text-gray-400 { color: var(--text-gray-400) !important; }
.text-gray-500 { color: var(--text-gray-500) !important; }
.text-gray-600 { color: var(--text-gray-600) !important; }
.text-gray-700 { color: var(--text-gray-700) !important; }

.border-gray-800 { border-color: var(--border-gray-800) !important; }
.border-gray-900 { border-color: var(--border-gray-900) !important; }
.border-gray-800\/40 { border-color: var(--border-gray-800-40) !important; }
.border-gray-800\/60 { border-color: var(--border-gray-800-60) !important; }
.border-gray-800\/80 { border-color: var(--border-gray-800-80) !important; }

/* Suporte a áreas seguras do iPhone */
.safe-top {
  padding-top: max(16px, env(safe-area-inset-top));
}
.safe-bottom {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Scroll com física nativa do iOS na main */
main {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   3. ANIMAÇÕES E KEYFRAMES
   ============================================================================ */

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

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes progress-fill {
  from { width: 0; }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.4s ease-out; }
.animate-fade-in-scale { animation: fadeInScale 0.3s ease-out; }
.animate-slide-right { animation: slideInRight 0.3s ease-out; }
.animate-slide-left { animation: slideInLeft 0.3s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-bounce { animation: bounce 1s ease-in-out; }
.animate-spin { animation: spin 1s linear infinite; }

/* ============================================================================
   4. FEEDBACK TÁTIL E MICRO-INTERAÇÕES
   ============================================================================ */

button, 
.nav-item, 
.active-scale,
a, 
.card-interactive,
.list-item {
  transition: transform var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
}

button:active, 
.nav-item:active, 
.active-scale:active,
a:active,
.card-interactive:active,
.list-item:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ============================================================================
   5. COMPONENTES BASE - CARDS E PAINÉIS
   ============================================================================ */

/* Glassmorphism Premium */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.glass-panel-elevated {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* Cards Modernos */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-interactive:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-gradient {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}

/* Header */
header.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Cores de texto com gradiente */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--warning-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background: rgba(var(--success-rgb), 0.15);
  color: var(--success);
}

.badge-danger {
  background: rgba(var(--danger-rgb), 0.15);
  color: var(--danger);
}

.badge-warning {
  background: rgba(var(--warning-rgb), 0.15);
  color: var(--warning);
}

.badge-primary {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
}

/* ============================================================================
   6. NAVEGAÇÃO SPA E BARRA INFERIOR
   ============================================================================ */

.page-view {
  transition: opacity var(--transition-base), transform var(--transition-base);
  will-change: opacity, transform;
}

.page-exit-left {
  opacity: 0;
  transform: translateX(-30px);
}

.page-enter-right {
  opacity: 0;
  transform: translateX(30px);
}

.page-exit-right {
  opacity: 0;
  transform: translateX(30px);
}

.page-enter-left {
  opacity: 0;
  transform: translateX(-30px);
}

.page-active {
  opacity: 1;
  transform: translateX(0);
}

/* Barra de Navegação Inferior Moderna */
nav.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
  position: relative;
  transition: all var(--transition-fast);
}

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

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

/* Botão de ação rápida central */
#quick-add-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
  transition: all var(--transition-fast);
}

#quick-add-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
}

/* ============================================================================
   7. MODAIS E BOTTOM SHEETS
   ============================================================================ */

/* Overlay de fundo */
.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity var(--transition-base);
}

/* Bottom Sheet Moderno */
.bottom-sheet {
  background: var(--bg-card-solid);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--text-placeholder);
  border-radius: 2px;
  margin: 8px auto 16px;
  opacity: 0.5;
}

.bottom-sheet-active {
  transform: translateY(0);
}

/* Modal Center */
.modal-center {
  background: var(--bg-card-solid);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  animation: fadeInScale 0.3s ease-out;
}

/* ============================================================================
   8. FORMULÁRIOS E INPUTS
   ============================================================================ */

input[type="text"], 
input[type="number"], 
input[type="email"],
input[type="password"],
select,
textarea {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition-fast);
  width: 100%;
}

input:focus, 
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

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

/* Botões */
button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--success-rgb), 0.3);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--danger-rgb), 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* Botão flutuante IA */
#ai-chat-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.4);
  animation: float 3s ease-in-out infinite;
}

/* Progress Bars */
.progress-bar {
  background: var(--bg-elevated);
  border-radius: 9999px;
  overflow: hidden;
  height: 8px;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progress-fill 1s ease-out;
}

.progress-bar-success .progress-bar-fill {
  background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%);
}

.progress-bar-warning .progress-bar-fill {
  background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.progress-bar-danger .progress-bar-fill {
  background: linear-gradient(90deg, var(--danger) 0%, var(--danger-light) 100%);
}

/* ============================================================================
   9. MENU POPOVER E DROPDOWNS
   ============================================================================ */

.ios-popover {
  position: absolute;
  top: 60px;
  right: 16px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  width: 160px;
  z-index: 100;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transform-origin: top right;
  transition: all var(--transition-fast);
  pointer-events: none;
  overflow: hidden;
}

.ios-popover-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.ios-popover-item {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast);
}

.ios-popover-item:last-child {
  border-bottom: none;
}

.ios-popover-item:hover,
.ios-popover-item:active {
  background: var(--bg-elevated);
}

.ios-popover-item i {
  font-size: 16px;
}

/* ============================================================================
   10. SCROLLBARS E UTILITÁRIOS
   ============================================================================ */

/* Scrollbar Moderna */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-placeholder);
  border-radius: 10px;
  opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Safe Areas iOS */
.safe-top {
  padding-top: max(16px, env(safe-area-inset-top));
}

.safe-bottom {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.glass-effect {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ============================================================================
   11. CORES DE CATEGORIAS MODERNAS
   ============================================================================ */

.bg-cat-alimentacao { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); }
.bg-cat-transporte { background: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%); }
.bg-cat-moradia { background: linear-gradient(135deg, #6366F1 0%, #818CF8 100%); }
.bg-cat-filhos { background: linear-gradient(135deg, #EC4899 0%, #F472B6 100%); }
.bg-cat-lazer { background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%); }
.bg-cat-saude { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); }
.bg-cat-superfluos { background: linear-gradient(135deg, #EF4444 0%, #F87171 100%); }
.bg-cat-educacao { background: linear-gradient(135deg, #F59E0B 0%, #FCD34D 100%); }
.bg-cat-vestuario { background: linear-gradient(135deg, #14B8A6 0%, #2DD4BF 100%); }
.bg-cat-assinaturas { background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%); }
.bg-cat-dividas { background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%); }
.bg-cat-disney { background: linear-gradient(135deg, #8B5CF6 0%, #C084FC 100%); }
.bg-cat-outros { background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%); }

/* ============================================================================
   12. NOVOS COMPONENTES ESPECÍFICOS
   ============================================================================ */

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 9999px;
}

.stat-change.positive {
  background: rgba(var(--success-rgb), 0.15);
  color: var(--success);
}

.stat-change.negative {
  background: rgba(var(--danger-rgb), 0.15);
  color: var(--danger);
}

/* Transaction Item Moderno */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.tx-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

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

.tx-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

.tx-amount {
  font-weight: 700;
  font-size: 16px;
  text-align: right;
}

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

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

/* Caixinha Card */
.caixinha-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.caixinha-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-pink) 100%);
}

.caixinha-goal {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.caixinha-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.caixinha-progress {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 9999px;
  overflow: hidden;
}

.caixinha-progress-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* Achievement Card */
.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-fast);
}

.achievement-card.locked {
  opacity: 0.6;
}

.achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
}

.achievement-icon.locked {
  background: var(--bg-elevated);
}

.achievement-info {
  flex: 1;
}

.achievement-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

/* Sidebar de Notificações */
#notification-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
}

.notification-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  border-left: 3px solid var(--primary);
}

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

/* Listas */
.list-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  background: var(--bg-elevated);
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.segmented-control button {
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.segmented-control button.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* Toast Notification Moderno */
.toast {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
}

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

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-muted);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-secondary) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Cores Tailwind Override para novo tema */
.text-neoncyan { color: var(--primary); }
.text-neonpink { color: var(--accent-pink); }
.text-neongold { color: var(--accent-gold); }

.bg-neoncyan { background-color: var(--primary); }
.bg-neonpink { background-color: var(--accent-pink); }
.bg-neongold { background-color: var(--accent-gold); }
