/* --- Base Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================= */
/* --- TOP NAVIGATION BAR (Shared) --- */
/* ========================================= */
.top-nav {
    background-color: #D71E28;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    color: white;
    z-index: 10;
    position: relative;
    border-bottom: 4px solid #FFCD41; 
}

.top-nav .logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 14px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Rounded Sign Off Button */
.sign-off-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.sign-off-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.sign-off-btn svg {
    width: 16px;
    height: 16px;
}

/* Hide hamburger on desktop */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}
.hamburger-btn svg {
    width: 30px;
    height: 30px;
}

.search-box input {
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 14px;
    width: 200px;
}

/* ========================================= */
/* --- LOGIN & SIGNUP PAGES --- */
/* ========================================= */
.main-content {
    flex: 1;
    background: url('bg.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    min-height: calc(100vh - 70px);
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.2); 
    z-index: 1;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 600px;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.login-card h1 {
    font-family: Georgia, serif;
    text-align: center;
    font-size: 36px;
    font-weight: 400;
    color: #141414;
    margin-bottom: 30px;
}

.input-container { position: relative; margin-bottom: 20px; }
.input-container input { width: 100%; padding: 20px 20px; padding-left: 55px; font-size: 18px; border: 1px solid #ccc; border-radius: 10px; outline: none; background-color: #fff; }
.input-container input:focus { border-color: #005A8C; }
.input-icon-left { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; }
.show-text { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); cursor: pointer; display: flex; align-items: center; justify-content: center; }

.checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; }
.checkbox-group label { font-size: 16px; color: #141414; cursor: pointer; }
.security-text, .passkey-text { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 30px; }

.btn-sign-on { width: 100%; padding: 15px; background-color: #D71E28; color: white; border: none; border-radius: 25px; font-size: 18px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-sign-on:hover { background-color: #b01620; }
.or-divider { text-align: center; margin: 20px 0; font-size: 16px; color: #141414; }
.btn-passkey { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 15px; background-color: white; color: #141414; border: 2px solid #141414; border-radius: 25px; font-size: 18px; font-weight: 600; cursor: pointer; }
.btn-passkey:hover { background-color: #f5f5f5; }
.forgot-link { text-align: center; margin-top: 30px; }
.forgot-link a { color: #005A8C; font-size: 16px; font-weight: 600; text-decoration: none; }
.forgot-link a:hover { text-decoration: underline; }
.message-alert { text-align: center; margin-top: 15px; font-weight: bold; font-size: 16px; }

.legal-box { border: 1px solid #ccc; padding: 20px; margin-top: 40px; border-radius: 4px; background-color: #fff; }
.legal-box h3 { font-size: 18px; color: #141414; margin-bottom: 15px; font-weight: 600; }
.legal-box ul { padding-left: 20px; color: #141414; font-size: 15px; line-height: 1.6; }
.legal-box li { margin-bottom: 10px; font-weight: 600; }
.deposit-text { margin-top: 20px; font-size: 16px; color: #141414; }

/* ========================================= */
/* --- SHARED FOOTER --- */
/* ========================================= */
.site-footer { background-color: #f4f4f4; padding: 30px 40px; border-top: 1px solid #ddd; font-size: 14px; color: #333; }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; color: #999; }
.footer-links a { color: #333; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin-top: 15px; font-size: 14px; color: #333; }

/* ========================================= */
/* --- DASHBOARD SPECIFIC STYLES --- */
/* ========================================= */
.dashboard-body { background: #f5f5f5; display: flex; flex-direction: column; }
.main-dashboard { flex: 1; width: 100%; background: linear-gradient(to bottom, #c5b9d6 0%, #fdf4f0 30%, #fff 100%); display: flex; flex-direction: column; }
.app-container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 30px 40px 100px 40px; position: relative; flex: 1; }

.greeting { padding: 0 0 20px 0; }
.greeting h1 { font-size: 32px; font-weight: 300; color: #141414; }
.user-name { font-size: 20px; font-weight: 600; color: #141414; margin-top: 5px; }
.rewards-link { display: flex; align-items: center; gap: 5px; padding: 0 0 20px 0; font-size: 15px; color: #141414; text-decoration: none; font-weight: 600; }

.accounts-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.account-card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.account-card h2 { font-size: 13px; font-weight: 800; color: #141414; letter-spacing: 0.5px; margin-bottom: 8px; }
.account-card .balance { font-size: 32px; font-weight: 300; color: #141414; margin-bottom: 6px; }
.account-card .label { font-size: 12px; color: #555; }

.action-container { display: flex; justify-content: flex-start; margin: 30px 0; }
.btn-outline { background: #fff; border: 1px solid #333; border-radius: 25px; padding: 14px 40px; font-size: 16px; font-weight: 600; color: #141414; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-decoration: none; }
.btn-outline:hover { background: #f9f9f9; }

.credit-banner { background: #fff; padding: 20px; border-radius: 12px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); width: 100%; }
.credit-banner .icon { background: #f0f0f0; padding: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.credit-banner .icon svg { width: 24px; height: 24px; stroke: #555; }
.credit-banner p { font-size: 14px; line-height: 1.4; color: #333; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; display: flex; justify-content: space-around; padding: 15px 0; border-top: 1px solid #eee; z-index: 100; }
.bottom-nav a { text-decoration: none; color: #666; font-size: 11px; font-weight: 600; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bottom-nav a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.bottom-nav a.active { color: #D71E28; font-weight: bold; }
.bottom-nav a:hover { color: #D71E28; }

/* ========================================= */
/* --- MOBILE RESPONSIVENESS --- */
/* ========================================= */
@media (max-width: 768px) {
    
    /* Top Nav */
    .top-nav { 
        flex-direction: row; 
        height: 60px; 
        padding: 0 20px; 
        gap: 0;
        justify-content: space-between;
        position: relative;
    }
    
    /* Show Hamburger */
    .hamburger-btn {
        display: block; 
    }

    /* Hide the links by default on mobile, style them as a dropdown */
    .nav-links { 
        display: none; 
        position: absolute;
        top: 64px; /* Below the red bar */
        left: 0;
        width: 100%;
        background-color: #D71E28;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    /* When this class is added by JS, show the menu */
    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        display: block;
        font-size: 16px;
    }

    .sign-off-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 14px;
    }
    
    /* Dashboard Mobile */
    .app-container { padding: 15px 20px 100px 20px; }
    .accounts-list { grid-template-columns: 1fr; }
    .action-container { justify-content: center; }
    
    /* Footer */
    .site-footer { padding: 20px; }
    .footer-links { flex-direction: column; gap: 10px; color: transparent; }
}