/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove outline azul de seleção em TODOS os elementos */
*,
*:focus,
*:active,
*:hover,
button,
button:focus,
button:active,
button:hover,
input,
input:focus,
input:active,
textarea,
textarea:focus,
textarea:active,
select,
select:focus,
select:active,
a,
a:focus,
a:active,
div:focus,
div:active,
.nav-item:focus,
.nav-item:active,
.period-item:focus,
.period-item:active,
.focus-button:focus,
.focus-button:active,
.settings-card:focus,
.settings-card:active,
.select-button:focus,
.select-button:active,
.modal-close:focus,
.modal-close:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

/* Adiciona transições suaves para elementos interativos */
.card,
.settings-card,
.nav-item,
.period-item,
.fab-button,
.focus-button {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* Remove barras de rolagem em todos os navegadores */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

*::-webkit-scrollbar {
    display: none; /* WebKit browsers (Chrome, Safari, Edge) */
    width: 0px;
    height: 0px;
    background: transparent;
}

*::-webkit-scrollbar-track {
    display: none;
}

*::-webkit-scrollbar-thumb {
    display: none;
}

*::-webkit-scrollbar-corner {
    display: none;
}

/* Garante que o conteúdo ainda seja rolável */
html,
body,
.app-container,
.settings-content,
.modal-content,
.sheet-content {
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Remove seleção de texto */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

:root {
    /* Cores de acento - podem ser alteradas dinamicamente */
    --accent-indigo: #6366f1;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    
    /* Cores principais - baseadas no acento selecionado */
    --primary-color: var(--accent-indigo);
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    
    /* Cores de estado */
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    
    /* Cores neutras - tema claro por padrão */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --background-primary: #ffffff;
    --background-secondary: #f9fafb;
    --background-tertiary: #f3f4f6;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Bordas */
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 20px;
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Espaçamentos padronizados */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    
    /* Fontes */
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    --font-size-4xl: 28px;
    --font-size-5xl: 32px;
    
    /* Font weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Gradientes comuns */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    
    /* Efeitos de glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Tema escuro aplicado automaticamente */
.theme-dark,
body.theme-dark {
    --text-primary: #e6e7eb;
    --text-secondary: #a8b0bb;
    --text-muted: #8b949e;
    --background-primary: #0f1420;
    --background-secondary: #0b101a;
    --background-tertiary: #1a2232;
}

/* ===== CLASSES UTILITÁRIAS ===== */

/* Layout e Espaçamento */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

/* Animações Utilitárias */
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-slide-up { animation: slideInUp 0.5s ease-out forwards; }
.animate-bounce-in { animation: bounceIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* Sombras Utilitárias */
.shadow-card { box-shadow: var(--shadow-md); }
.shadow-hover { box-shadow: var(--shadow-lg); }

/* Efeitos de Hover Utilitários */
.hover-lift { transform: translateY(-2px); }
.hover-lift-lg { transform: translateY(-4px) scale(1.02); }

/* Breakpoints Utilitários */
@media (max-width: 480px) {
    .mobile-hidden { display: none !important; }
    .mobile-full { width: 100% !important; }
    .mobile-center { text-align: center !important; }
}

/* Bordas e Cantos */
.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }

/* Cores de Fundo */
.bg-primary { background: var(--background-primary); }
.bg-secondary { background: var(--background-secondary); }
.bg-tertiary { background: var(--background-tertiary); }

/* Tipografia */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ===== CLASSES BASE PARA COMPONENTES ===== */

/* Card com gradiente base */
.card-gradient-base {
    border-radius: var(--border-radius-lg);
    padding: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.card-gradient-base::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.card-gradient-base::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* Header padrão para cards com gradiente */
.card-gradient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-gradient-title {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.card-gradient-icon {
    opacity: 0.8;
}

/* Amount padrão para cards com gradiente */
.card-gradient-amount {
    margin-bottom: 20px;
    text-align: center;
}

.card-gradient-currency {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.8;
    margin-right: 6px;
}

.card-gradient-amount-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

/* ===== FIM DAS CLASSES BASE ===== */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: auto;
}

html {
    scroll-behavior: auto;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100dvh;
    padding-bottom: 80px; /* Espaço para a navbar fixa */
}

/* Navbar */
/* Accent Color Sheet */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.sheet-content {
    background: var(--background-primary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sheet-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sheet-close:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.sheet-body {
    padding: 20px;
}

.accent-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
}

.accent-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.accent-option:hover {
    transform: translateY(-2px);
    background: var(--background-tertiary);
}

.accent-option.selected {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.1);
}

.accent-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.accent-name {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Accent Color Grid for Appearance Modal */
.accent-color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.accent-color-grid .accent-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--background-tertiary);
}

.accent-color-grid .accent-option:hover {
    transform: translateY(-2px);
    background: var(--background-secondary);
}

.accent-color-grid .accent-option.selected {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.1);
}

.accent-color-grid .accent-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.accent-color-grid .accent-name {
    font-size: 12px;
    text-align: center;
}

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

/* Bottom Navigation */
.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Indicador animado da aba ativa */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 25%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.navbar[data-active="home"]::before { transform: translateX(0); }
.navbar[data-active="transactions"]::before { transform: translateX(100%); }
.navbar[data-active="reports"]::before { transform: translateX(200%); }
.navbar[data-active="settings"]::before { transform: translateX(300%); }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.1;
    z-index: -1;
}

.nav-item:hover::before {
    width: 60px;
    height: 60px;
}

.nav-item.active::before {
    width: 80px;
    height: 80px;
    opacity: 0.15;
}

.nav-item:hover {
    transform: translateY(-2px);
    background: var(--background-tertiary);
}

.nav-item.active {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.nav-item.active .nav-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.nav-item.active .nav-text {
    color: var(--accent-color);
    font-weight: 600;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: 0;
    overflow: visible;
}

.greeting-text {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-name {
    color: var(--text-primary);
}

/* Alinhamento do avatar com a saudação */
.greeting {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Foto do usuário no header */
.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-secondary);
    border: 2px solid var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-secondary);
}

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

.focus-button {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    min-width: 40px;
    min-height: 40px;
    overflow: visible;
}

.focus-button:hover {
    background: var(--background-tertiary);
    transform: scale(1.1);
}

.focus-button:active {
    transform: scale(0.95);
}

.eye-icon {
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.eye-icon.closed {
    display: none;
}

.focus-button.focused .eye-icon.open {
    display: none;
}

.focus-button.focused .eye-icon.closed {
    display: block;
}

/* Filtro de Período */
.period-filter {
    margin-bottom: var(--spacing-md);
}

.period-carousel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 6px;
    box-shadow: var(--shadow-sm);
}

.period-item {
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    width: 120px;
    text-align: center;
    overflow: hidden;
}

.period-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.period-item:hover::before {
    left: 100%;
}

.period-item:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.period-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
    transform: scale(1.05) translateY(-2px);
}

.period-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Cards Financeiros */
.financial-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* Card de Balanço do Mês */
.month-balance-card {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--background-tertiary);
    margin-bottom: 16px;
    text-align: center;
}

.month-balance-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.month-balance-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.month-balance-insight {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    padding: 8px 12px;
    background: var(--background-tertiary);
    border-radius: var(--border-radius-sm);
}

.card {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--background-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
}

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

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: var(--background-tertiary);
}

.income-card .card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.expense-card .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-amount {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

/* Card de Saldo */
.balance-card {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.balance-title {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.balance-icon {
    opacity: 0.8;
}

.balance-amount {
    margin-bottom: 20px;
    text-align: center;
}

.currency {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.8;
    margin-right: 6px;
}

.amount {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.balance-insights {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
    text-align: center;
}

.insight-text {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.4;
    text-align: center;
}

/* Modo Foco (Ocultar Valores) - Apenas na tela inicial */
.app-container.home-view.focus-mode .income-amount,
.app-container.home-view.focus-mode .expense-amount,
.app-container.home-view.focus-mode .amount,
.app-container.home-view.focus-mode .total-amount,
.app-container.home-view.focus-mode .total-currency,
.app-container.home-view.focus-mode .credit-amount,
.app-container.home-view.focus-mode .bank-account-balance,
.app-container.home-view.focus-mode .credit-card-balance,
.app-container.home-view.focus-mode .credit-usage,
.app-container.home-view.focus-mode .month-balance-amount,
.app-container.home-view.focus-mode .month-balance-insight {
    filter: blur(8px);
    user-select: none;
}

.app-container.home-view.focus-mode .balance-insights {
    opacity: 0.3;
}

/* Card de Contas Bancárias */
.bank-accounts-card {
    background: var(--gradient-blue);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.bank-accounts-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.bank-accounts-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.bank-accounts-title {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.bank-accounts-icon {
    opacity: 0.8;
}

.bank-accounts-total {
    margin-bottom: 20px;
    text-align: center;
}

.total-currency {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.8;
    margin-right: 6px;
}

.total-amount {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.bank-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bank-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
}

.bank-account-name {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.bank-account-balance {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

/* Card de Cartões de Crédito */
.credit-cards-card {
    background: var(--gradient-purple);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.credit-cards-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.credit-cards-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.credit-cards-title {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.credit-cards-icon {
    opacity: 0.8;
}

.credit-cards-summary {
    margin-bottom: 20px;
    text-align: center;
}

.credit-limit {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 8px;
}

.credit-amount {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.credit-usage {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

.credit-cards-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credit-card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
}

.credit-card-name {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.credit-card-info {
    text-align: right;
}

.credit-card-balance {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 2px;
}

.credit-card-due {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

/* Responsividade */
@media (max-width: 480px) {
    .app-container {
        padding: 16px;
        padding-bottom: 80px;
    }
    
    .greeting-text {
        font-size: 24px;
    }
    
    .focus-button {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    .financial-cards {
        gap: 10px;
    }
    
    .card {
        padding: 14px;
        min-height: 100px;
    }
    
    .card-amount {
        font-size: 18px;
    }
    
    .amount {
        font-size: 28px;
    }
    
    .period-item {
        min-width: 90px;
        padding: 8px 10px;
    }
    
    .period-text {
        font-size: 10px;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    .nav-item {
        min-width: 50px;
        padding: 6px 8px;
    }
}

/* Animações Avançadas */
/* Keyframes para Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Novas animações com física */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    70% {
        transform: scale(0.98) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes slideInRight {
    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 shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animações dos elementos principais - PADRONIZADAS
   Nota: Animações agora são aplicadas via JavaScript para maior controle */
.app-header {
    opacity: 0;
    transform: translateY(20px);
}

.period-filter {
    opacity: 0;
    transform: translateY(20px);
}

.financial-cards {
    opacity: 0;
    transform: translateY(20px);
}

.month-balance-card {
    opacity: 0;
    transform: translateY(20px);
}

.bank-accounts-card {
    opacity: 0;
    transform: translateY(20px);
}

.credit-cards-card {
    opacity: 0;
    transform: translateY(20px);
}

.fab-button {
    opacity: 0;
    transform: translateY(20px);
}

/* Animações específicas da aba de Transações */
.transactions-toolbar {
    opacity: 0;
    transform: translateY(20px);
}

.transactions-summary-card {
    opacity: 0;
    transform: translateY(20px);
}

.transactions-message {
    opacity: 0;
    transform: translateY(20px);
}

/* Animações específicas da aba de Ajustes */
.settings-header {
    opacity: 0;
    transform: translateY(20px);
}

.settings-card {
    opacity: 0;
    transform: translateY(20px);
}

/* Navbar sem animação para evitar flicker em refresh e trocas de aba */
.navbar {
    opacity: 1;
}

/* Cards individuais com animação suave - CORRIGIDOS para evitar scroll */
.card {
    animation: fadeIn 0.4s ease-out both;
    opacity: 0;
    animation-fill-mode: forwards;
}

.card:nth-child(1) {
    animation-delay: 0.2s;
}

.card:nth-child(2) {
    animation-delay: 0.25s;
}

/* Animações de hover avançadas com física */
.card,
.month-balance-card,
.bank-accounts-card,
.credit-cards-card,
.settings-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    position: relative;
    overflow: hidden;
}

.card::before,
.month-balance-card::before,
.bank-accounts-card::before,
.credit-cards-card::before,
.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
    pointer-events: none;
}

.card:hover,
.month-balance-card:hover,
.bank-accounts-card:hover,
.credit-cards-card:hover,
.settings-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card:hover::before,
.month-balance-card:hover::before,
.bank-accounts-card:hover::before,
.credit-cards-card:hover::before,
.settings-card:hover::before {
    left: 100%;
}

.card:active,
.month-balance-card:active,
.bank-accounts-card:active,
.credit-cards-card:active,
.settings-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transições suaves para elementos específicos */
.card,
.month-balance-card,
.bank-accounts-card,
.credit-cards-card,
.nav-item,
.focus-button,
.period-item {
    transition: all 0.2s ease-out;
}

/* Remove transições conflitantes */
.app-header,
.period-filter,
.financial-cards {
    transition: none;
}

/* Previne animações durante o carregamento inicial */
.app-container.loading * {
    animation: none !important;
}

/* Animações responsivas */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== ESTILOS DA ABA DE AJUSTES ===== */

/* Container principal dos ajustes */
.settings-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 100px; /* Espaço para navbar */
}

/* Header dos ajustes */
.settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0;
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
    opacity: 0;
    animation-fill-mode: forwards;
}

.settings-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

/* Seções dos ajustes */
.settings-section {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--background-tertiary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

/* Cards de categorias na tela de Ajustes */
.settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--background-primary);
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 12px;
}

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

.settings-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--background-secondary);
    border: 1px solid var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-right: 12px;
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-card-description {
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-card-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start; /* alinhado à esquerda */
    margin-left: 12px; /* 12px após o ícone */
}

.settings-card-action {
    color: var(--text-secondary);
}

/* Sheet full-screen */
.sheet-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center; /* centro vertical para modal menor */
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    animation: fadeIn 0.2s ease-out;
}

.sheet-content {
    width: 92%;
    max-width: 420px; /* menor e mais compacto */
    background: var(--background-primary);
    border-radius: var(--border-radius-lg); /* raio em todos os cantos */
    box-shadow: var(--shadow-lg);
    max-height: 85vh;
    overflow-y: auto;
    animation: fadeIn 0.25s ease-out;
}

.sheet-header {
    position: sticky;
    top: 0;
    background: var(--background-primary);
    border-bottom: 1px solid var(--background-tertiary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.sheet-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.sheet-close {
    position: absolute;
    right: 12px; /* botão à direita */
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--background-secondary);
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sheet-body {
    padding: 16px 16px 32px 16px;
}

.settings-section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Seção de perfil */
.profile-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--background-secondary);
    border: 3px solid var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-secondary);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.change-photo-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.change-photo-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.profile-info {
    width: 100%;
}

/* Grupos de input */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius-sm);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Botões de seleção */
.select-button {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius-sm);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.select-button:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-value {
    flex: 1;
}

/* Modais */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1300; /* acima do sheet */
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    /* Sem animação para abertura/fechamento do modal de seleção de tema */
}

/* Esconde a navbar quando qualquer modal estiver aberto */
.modal-open .navbar {
    display: none !important;
}

.modal-content {
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(1);
    transition: none;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--background-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-option {
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--background-tertiary);
}

.modal-option:last-child {
    border-bottom: none;
}

.modal-option:hover {
    background: var(--background-secondary);
}

.modal-option:active {
    background: var(--background-tertiary);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.option-text {
    flex: 1;
}

.option-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.option-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Responsividade dos ajustes */
@media (max-width: 480px) {
    .settings-container {
        padding: 0 12px;
    }
    
    .settings-section {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .profile-photo {
        width: 60px;
        height: 60px;
    }
}

/* Card de Resumo Financeiro das Transações */
.transactions-summary-card {
    display: flex;
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--background-tertiary);
    gap: 16px;
    max-width: 100%;
}

.summary-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    border-radius: var(--border-radius);
    background: var(--background-secondary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.summary-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.summary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
    pointer-events: none;
}

.summary-section:hover::before {
    left: 100%;
}

.summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: var(--background-tertiary);
    color: var(--text-secondary);
    transition: var(--transition);
}

.income-section .summary-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.expense-section .summary-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.balance-section .summary-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.summary-content {
    width: 100%;
}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

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

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

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

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

.balance-amount {
    color: var(--text-primary);
}

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

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

@media (max-width: 768px) {
    .transactions-summary-card {
        gap: 12px;
        padding: 12px;
    }
    
    .summary-section {
        padding: 8px;
        min-height: 60px;
    }
    
    .summary-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
    }
    
    .summary-title {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .summary-amount {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .transactions-summary-card {
        padding: 10px;
        gap: 8px;
    }
    
    .summary-section {
        padding: 6px;
        min-height: 50px;
    }
    
    .summary-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }
    
    .summary-title {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .summary-amount {
        font-size: 14px;
    }
}

/* Barra de ferramentas das transações */
.transactions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--spacing-md);
    padding: 0 4px;
}

.search-container {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    min-width: 100px;
    justify-content: center;
}

.action-button:hover {
    background: var(--background-secondary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.button-text {
    font-weight: 600;
    white-space: nowrap;
}

/* Responsividade da barra de ferramentas */
@media (max-width: 768px) {
    .transactions-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-container {
        max-width: none;
    }
    
    .toolbar-actions {
        justify-content: center;
    }
    
    .action-button {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .action-button .button-text {
        display: none;
    }
    
    .action-button {
        min-width: 48px;
        padding: 12px;
    }
}

/* ===== BOTÃO FAB (FLOATING ACTION BUTTON) ===== */

.fab-button {
    position: fixed;
    bottom: 100px; /* Acima da navbar */
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    display: none; /* Oculto por padrão */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001; /* Acima da navbar */
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    opacity: 1; /* Opacidade total no hover */
}

.fab-button:active {
    transform: scale(0.95);
}

.fab-button svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Responsividade do FAB */
@media (max-width: 480px) {
    .fab-button {
        bottom: 90px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
    
    .fab-button svg {
        width: 20px;
        height: 20px;
    }
}

/* Mostrar FAB apenas nas views home e transactions */
.app-container.home-view .fab-button,
.app-container.transactions-view .fab-button {
    display: flex;
}

/* Comportamento de scroll do FAB */
.fab-button.fab-scroll-hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

/* ===== MODAL DE ADICIONAR TRANSAÇÃO ===== */

.add-transaction-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.add-transaction-sheet {
    background: var(--background-primary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.add-transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--background-tertiary);
}

.add-transaction-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.add-transaction-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.add-transaction-close:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.add-transaction-body {
    padding: 20px;
}

.transaction-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: 14px 16px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.amount-input {
    font-size: 18px;
    font-weight: 600;
}

.transaction-type-selector {
    display: flex;
    gap: 12px;
}

.type-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.type-option:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.type-option.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.category-selector {
    position: relative;
}

.category-button {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.category-button:hover {
    border-color: var(--primary-color);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-primary);
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.category-dropdown.show {
    display: block;
}

.category-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--background-tertiary);
}

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

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

.category-item.selected {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.add-transaction-footer {
    padding: 20px;
    border-top: 1px solid var(--background-tertiary);
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--background-tertiary);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--background-secondary);
}

.btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Responsividade do modal */
@media (max-width: 480px) {
    .add-transaction-sheet {
        border-radius: 16px 16px 0 0;
    }
    
    .add-transaction-header,
    .add-transaction-body,
    .add-transaction-footer {
        padding: 16px;
    }
    
    .transaction-type-selector {
        gap: 8px;
    }
    
    .type-option {
        padding: 12px;
        font-size: 14px;
    }
}