:root {
    /* Cores Principais (Tema Indigo & Emerald) */
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Estrutura & Texto */
    --bg-body: #f8fafc; /* Cinza azulado muito leve */
    --bg-card: #ffffff;
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --border: #e2e8f0;
    
    /* UI Elements */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    /* Header Mobile */
    --header-bg: #1e293b;
    --header-text: #ffffff;
}

/* Reset Básico Moderno */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding-bottom: 80px; /* Espaço para menu inferior */
}

/* Header (Mobile First) */
.app-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 2rem 1.5rem 3rem; /* Padding extra em baixo para o card sobrepor */
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -40px; /* Puxa o conteúdo pra cima */
}

.user-welcome h5 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.user-welcome span { opacity: 0.8; font-size: 0.9rem; }

/* Cards */
.card-stack { padding: 0 1.5rem; }

.balance-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.balance-label { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }
.balance-value { font-size: 2rem; font-weight: 800; color: var(--text-main); margin: 0.25rem 0 1rem; }

.balance-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stat-item { flex: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-val { font-weight: 600; font-size: 1rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Transações */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.transaction-list { padding: 0 1.5rem; }

.transaction-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.transaction-item:active { transform: scale(0.98); }

.t-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.t-info { flex: 1; overflow: hidden; }
.t-title { font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { font-size: 0.8rem; color: var(--text-muted); }

.t-amount { font-weight: 700; font-size: 1rem; white-space: nowrap; }

/* Menu Inferior (Floating) */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #1e293b; /* Escuro para contraste */
    backdrop-filter: blur(10px);
    border-radius: 3rem;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    z-index: 1000;
}

.nav-item {
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    padding: 0.5rem;
    transition: all 0.3s;
    text-decoration: none;
}
.nav-item.active { color: #fff; transform: translateY(-2px); }

/* FAB (Botão Flutuante Central) */
.fab-add {
    background: var(--primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: absolute;
    bottom: 25px; /* Ajuste para sair do menu */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    border: 4px solid var(--bg-body); /* Borda falsa para cortar o menu se precisar */
    text-decoration: none;
    z-index: 1001;
}

/* Helpers */
.badge-date {
    display: inline-block;
    padding: 4px 12px;
    background: #e2e8f0;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #475569;
}