/* ===== FinançasPro v4.2 - Dark Premium Design ===== */
/* Paleta: Dark Navy + Teal Neon - Anti-genérico */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Paleta Premium Fintech - High Contrast & Vibrance */
    --bg-base:        #050810; /* Pitch Black Navy */
    --bg-card:        rgba(15, 23, 42, 0.45); /* Glassy Abyssal */
    --bg-card-hover:  rgba(30, 41, 59, 0.6);
    --bg-input:       rgba(15, 23, 42, 0.8);
    --border:         rgba(255, 255, 255, 0.06);
    --border-strong:  rgba(255, 255, 255, 0.12);
    --glass-blur:     blur(20px);

    /* Acentos Neon de Alta Performance */
    --primary:        #3B82F6; /* Azure Blue */
    --primary-glow:   rgba(59, 130, 246, 0.35);
    --accent:         #10B981; /* Emerald Neon */
    --accent-glow:    rgba(16, 185, 129, 0.35);
    
    /* Semânticas Premium */
    --income:         #34D399; /* Mint Neon */
    --income-bg:      rgba(52, 211, 153, 0.15);
    --expense:        #F43F5E; /* Rose Neon */
    --expense-bg:     rgba(244, 63, 94, 0.15);
    --warning:        #FBBF24; /* Amber Gold */
    --warning-bg:     rgba(251, 191, 36, 0.15);

    /* Tipografia Profissional */
    --text-primary:   #F1F5F9; /* Off White */
    --text-secondary: #94A3B8; /* Slate Blue */
    --text-muted:     #475569;
    --font-heading:   'Space Grotesk', sans-serif;
    --font-body:      'Inter', sans-serif;

    /* Spacing & Radii */
    --radius-sm:  10px;
    --radius-md:  14px;
    --radius-lg:  20px;
    --radius-xl:  30px;

    /* Transitions & Animations */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

[data-theme="light"] {
    --bg-base:        #F0F4F8;
    --bg-card:        rgba(255, 255, 255, 0.6);
    --bg-card-hover:  rgba(255, 255, 255, 0.8);
    --bg-input:       rgba(255, 255, 255, 0.9);
    --border:         rgba(0, 0, 0, 0.05);
    --border-strong:  rgba(0, 0, 0, 0.1);

    --text-primary:   #0F172A;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;

    --bg-glass:       rgba(255, 255, 255, 0.7);
    --bg-nav:         rgba(255, 255, 255, 0.8);
    --hero-bg:        linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg-glass:       rgba(15, 23, 42, 0.5);
    --bg-nav:         rgba(15, 23, 42, 0.85);
    --hero-bg:        linear-gradient(135deg, #0F172A 0%, #020617 100%);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ===== MESH GRADIENT BACKGROUND ===== */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.05) 0%, transparent 50%);
    z-index: -1;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.bg-blob {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blob-float 20s infinite alternate ease-in-out;
}

.blob-1 { top: -100px; left: -100px; background: var(--primary-glow); }
.blob-2 { bottom: -100px; right: -100px; background: var(--accent-glow); animation-delay: -5s; }

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon { font-size: 1.5rem; }

.logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Seletor de Mês */
.month-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.month-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.month-btn:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.btn-logout:hover {
    border-color: var(--expense);
    color: var(--expense);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== HERO BALANCE CARD ===== */
@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.balance-hero {
    background: linear-gradient(-45deg, #1E4ED8, #3B82F6, #10B981, #064E3B);
    background-size: 400% 400%;
    animation: gradient-move 15s ease infinite;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.balance-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.balance-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.balance-value {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 28px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

/* Mini stats dentro do hero */
.balance-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.balance-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.stat-value.income { color: #A7F3D0; }
.stat-value.expense { color: #FECDD3; }

.stat-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ===== PROGRESS BAR (Orçamento) ===== */
.budget-bar {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

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

.budget-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.budget-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-track {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.8s var(--ease-out);
}

.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--expense); }

/* ===== GRÁFICO ===== */
.chart-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== HISTÓRICO ===== */
.history-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

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

.btn-trash {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-trash:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

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

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

/* Ícone da categoria */
.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tx-icon.income-icon { background: var(--income-bg); }
.tx-icon.expense-icon { background: var(--expense-bg); }

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

.tx-desc {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

.tx-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

.tx-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* Valor */
.tx-amount {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

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

/* Ações agora com opacidade contínua para Mobile */
.tx-actions {
    display: flex;
    gap: 4px;
    opacity: 1; /* Removido o hover obrigatorio (Anti-pattern no Mobile) */
    transition: opacity 0.15s;
}

/* Reduzir levemente a opacidade se não estiver sendo manuseado (opcional para focar nos valores) */
.transaction-item:hover .tx-actions { opacity: 1; }

.tx-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    color: var(--text-muted);
}

.tx-btn:hover { background: var(--bg-input); }
.tx-btn.delete:hover { color: var(--expense); }

/* Empty State */
.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Versão */
.version-badge {
    padding: 12px 20px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ===== FAB ===== */
.fab {
    position: fixed;
    bottom: 80px;
    right: 50%;
    transform: translateX(50%);
    width: 64px;
    height: 64px;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 10px 25px var(--primary-glow);
    transition: all 0.3s var(--ease-spring);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: translateX(50%) scale(1.08);
    box-shadow: 0 0 24px var(--accent-glow);
}

.fab:active { transform: translateX(50%) scale(0.96); }

/* ===== BOTTOM NAV ===== */
/* ===== ADMIN DASHBOARD ===== */
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.user-card:hover { background: var(--bg-card-hover); border-color: var(--primary-glow); }

.user-info h4 { font-size: 0.9rem; color: var(--text-primary); margin-bottom: 2px; }
.user-info p { font-size: 0.75rem; color: var(--text-secondary); }

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

.btn-admin-action {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-admin-action.block { color: var(--expense); border-color: var(--expense-bg); }
.btn-admin-action.unblock { color: var(--income); border-color: var(--income-bg); }
.btn-admin-action.impersonate { color: var(--primary); border-color: var(--primary-glow); }

/* ===== LGPD PAGES ===== */
.lgpd-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lgpd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.lgpd-card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.lgpd-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 20px 40px;
    animation: slideUp 0.35s var(--ease-out);
}

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

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

.modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: var(--bg-input);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* Type Selector */
.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-md);
}

.type-btn {
    background: none;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}

.type-btn .type-icon { font-size: 1rem; }

.type-btn.active[data-type="Receita"] {
    background: var(--income-bg);
    color: var(--income);
    box-shadow: inset 0 0 0 1px rgba(0,200,150,0.3);
}

.type-btn.active[data-type="Despesa"] {
    background: var(--expense-bg);
    color: var(--expense);
    box-shadow: inset 0 0 0 1px rgba(255,90,90,0.3);
}

/* Form */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

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

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s var(--ease-spring);
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== MODAL HISTÓRICO ===== */
#modalHistorico {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: flex-end;
    justify-content: center;
}

#modalHistorico.active { display: flex; }

.historico-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* ===== MODAL CONFIRMAÇÃO (UI DIALOG) ===== */
.modal-sm {
    max-width: 400px;
    padding: 24px 24px 32px;
    border-radius: var(--radius-xl);
    text-align: center;
    align-self: center; /* Centraliza no Desktop mas pode ficar embaixo em Telas Pequenas */
    margin: 0 16px;
}

.modal-sm .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-sm .modal-msg {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn-outline {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.modal-actions .btn-outline:hover { background: var(--bg-card-hover); }

.modal-actions .btn-danger {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--expense);
    color: #fff;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(230, 69, 69, 0.25);
}

.modal-actions .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 69, 69, 0.35);
}

.modal-actions .btn-danger:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
    .main-content { padding: 24px 24px 100px; }
    .balance-value { font-size: 3.2rem; }
    
    /* Centralizado para telas médias tipo tablet */
    .header-content, .main-content { max-width: 600px; }
    
    .fab {
        bottom: 24px;
        right: 50%;
        transform: translateX(300px);
    }
    .fab:hover { transform: translateX(300px) scale(1.08); }
    .fab:active { transform: translateX(300px) scale(0.96); }
}

@media (min-width: 1024px) {
    /* MODO DESKTOP / TELA INTEIRA */
    .header-content {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .main-content {
        max-width: 1400px;
        padding: 40px 40px 100px;
        display: grid;
        grid-template-columns: 1fr 1.3fr;
        grid-template-areas:
            "hero   chart"
            "budget chart"
            "history chart";
        gap: 32px;
        align-items: start;
    }

    .balance-hero { grid-area: hero; margin-bottom: 0px; }
    .budget-bar { grid-area: budget; }
    .chart-section { 
        grid-area: chart; 
        position: sticky; 
        top: 100px; 
        height: auto;
    }
    .chart-container { height: 350px; }
    .history-section { grid-area: history; }
    
    .bottom-nav {
        max-width: 1400px;
        margin: 0 auto;
        border-radius: 24px 24px 0 0;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        justify-content: center;
        gap: 80px;
        background: rgba(10, 12, 20, 0.7);
    }

    .fab {
        right: unset;
        left: calc(50% + 580px);
        bottom: 32px;
        transform: none;
    }
    .fab:hover { transform: scale(1.08); }
    .fab:active { transform: scale(0.96); }
    
    .toast { max-width: 500px; }
}


/* ===== ANIMAÇÕES DE ENTRADA ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.balance-hero  { animation: fadeUp 0.5s var(--ease-out) both; }
.budget-bar    { animation: fadeUp 0.5s 0.08s var(--ease-out) both; }
.chart-section { animation: fadeUp 0.5s 0.14s var(--ease-out) both; }
.history-section { animation: fadeUp 0.5s 0.2s var(--ease-out) both; }

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: rgba(0,200,150,0.4); color: var(--income); }
.toast.error   { border-color: rgba(255,90,90,0.4); color: var(--expense); }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }