<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tanidot Commerce</title>
<link rel="icon" type="image/x-icon" href="icon.png">

<style>
:root {
    --tanidot-green: #0a7a3b;
    --tanidot-light: #1db954;
    --bg-glass: rgba(255,255,255,0.16);
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --success: #16a34a;
    --error: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(135deg, var(--tanidot-green), var(--tanidot-light));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SINGLE CARD LAYOUT */
.container {
    padding: 24px;
    width: 100%;
    max-width: 460px;
}

/* CARD */
.card {
    background: var(--card);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 25px 45px rgba(0,0,0,0.25);
    text-align: center;
    animation: floatIn .6s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* BRAND */
.brand {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--tanidot-green);
    text-transform: uppercase;
}

.logo img {
    width: 150px;
    margin: 8px 0 6px;
}

.card h2 {
    margin: 8px 0 4px;
    color: var(--tanidot-green);
    font-size: 22px;
}

.subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.merchant {
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
}

/* STATUS */
.status {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.status.success { background:#ecfdf5; color:var(--success); }
.status.error { background:#fef2f2; color:var(--error); }

/* FORM */
label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    text-align: left;
    margin: 14px 0 6px 6px;
}

input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: var(--tanidot-green);
}

/* PAY BUTTON */
.card button[type="submit"] {
    margin-top: 22px;
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, var(--tanidot-green), var(--tanidot-light));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* BACK */
.back img {
    width: 80px;
    margin-top: 18px;
}

/* FOOTER */
footer {
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
}
</style>
</head>

<body>

<div class="container">

    <!-- PAYMENT FORM -->
    <form action="express-stk.php" method="POST" class="card">

        <div class="brand">Tanidot Secure Payments</div>

        <div class="logo">
            <img src="mpesa.png" alt="Mpesa">
        </div>

        <h2>M-Pesa Checkout</h2>
        <div class="subtitle">Fast • Secure • Reliable</div>

        <div class="merchant">Tanidot Venture</div>
        
        <input type="hidden" name="entity" value="Tanidot">

        <label>Amount (KES)</label>
        <input type="number" name="amount" placeholder="Enter amount" required>

        <label>Phone Number</label>
        <input type="number" name="phone" placeholder="07XXXXXXXX" required>

        <button type="submit">Pay with M-Pesa</button>

        <div class="back">
            <a href="/pay">
                <img src="back.png" alt="Back">
            </a>
        </div>

        <footer>
            © <?php echo date("Y"); ?> Tanidot • Powered by Tanidot Venture
        </footer>

    </form>

</div>

</body>
</html>
