:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --bg-body: #f5f7fa;
    --text-dark: #1e293b;
    --text-muted: #94a3b8;
    --card-radius: 20px;
    --nav-height: 70px;
}

body {
    background-color: var(--bg-body);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    padding-top: 80px; /* Space for Header */
    padding-bottom: 100px; /* Space for Footer */
    -webkit-tap-highlight-color: transparent; /* Remove blue tap box on mobile */
}

/* --- APP HEADER --- */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Glass effect */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.user-avatar-small {
    width: 42px; height: 42px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- BOTTOM NAVIGATION --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding-bottom: env(safe-area-inset-bottom); /* For iPhone Home Bar */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    width: 60px;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* --- FAB (Floating Button) --- */
.fab-wrapper {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.fab-btn {
    width: 64px; height: 64px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
    border: 4px solid var(--bg-body); /* Creates the "cutout" effect */
    cursor: pointer;
    transition: transform 0.1s;
}

.fab-btn:active { transform: scale(0.95); }

/* --- CARDS & LISTS --- */
.card-custom {
    background: white;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 15px;
    overflow: hidden;
}

.bank-card {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    min-height: 180px;
    position: relative;
    border-radius: 24px;
}

.list-item {
    background: white;
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s;
}
.list-item:active { background: #f8f9fa; }

/* --- LOGIN & AUTH PAGES --- */
.auth-body {
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    padding-bottom: 0; /* Override body padding */
    padding-top: 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    width: 80px; height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
    transform: rotate(-5deg);
}

.form-control-lg {
    background: #f8f9fa;
    border: none;
    border-radius: 16px;
    padding: 18px;
    font-size: 16px;
    margin-bottom: 15px;
}

.form-control-lg:focus {
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.btn-lg-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-weight: 700;
    width: 100%;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

/* --- PROFILE AVATARS --- */
.avatar-grid { 
    display: flex; gap: 15px; overflow-x: auto; 
    padding: 10px 5px; scrollbar-width: none; 
}
.avatar-option { 
    width: 60px; height: 60px; border-radius: 50%; border: 2px solid #f1f3f5; 
    background: white; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 28px; cursor: pointer; transition: all 0.2s;
}
.avatar-option.selected { 
    border-color: var(--primary); 
    background: #eef2ff; 
    transform: scale(1.1); 
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

/* --- EMOTIVE ANIMATIONS --- */

/* 1. Slide Up (For List Items) */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tx-item-anim {
    animation: slideUpFade 0.4s ease-out forwards;
    opacity: 0; /* Hidden by default until animation starts */
}

/* 2. Pop (For Income - Happy!) */
@keyframes popSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.anim-income { animation: popSuccess 0.3s ease-in-out; }

/* 3. Shake (For Expense - Ouch!) */
@keyframes shakeError {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
.anim-expense { animation: shakeError 0.4s ease-in-out; }

/* 4. Pulse (For Investment - Growing) */
@keyframes pulseGrow {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}
.anim-invest { animation: pulseGrow 2s infinite; }