<?php
// O365-style Chameleon Login Page for Roundcube
$roundcube_url = "https://webmail.yourdomain.com/?_task=login"; // Change to your actual domain
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sign in to your account</title>
    <style>
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f3f2f1; margin:0; padding:0; }
        .container { max-width: 440px; margin: 80px auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 40px; }
        .logo { text-align: center; margin-bottom: 30px; }
        .logo img { width: 108px; }
        h1 { font-size: 24px; margin: 0 0 10px; color: #1b1b1b; }
        .subtitle { color: #605e5c; margin-bottom: 30px; }
        input[type="email"], input[type="password"] {
            width: 100%; padding: 12px; margin: 8px 0; border: 1px solid #605e5c; border-radius: 4px; font-size: 16px;
        }
        .btn {
            background: #0078d4; color: white; border: none; padding: 12px 24px; width: 100%; font-size: 16px;
            border-radius: 4px; cursor: pointer; margin-top: 20px;
        }
        .btn:hover { background: #005a9e; }
        .footer { text-align: center; margin-top: 30px; font-size: 13px; color: #605e5c; }
    </style>
</head>
<body>
    <div class="container">
        <div class="logo">
            <img src="https://img.icons8.com/color/96/microsoft-outlook-2019.png" alt="Microsoft">
        </div>
        <h1>Sign in</h1>
        <p class="subtitle">to continue to Webmail</p>

        <form action="<?= $roundcube_url ?>" method="get">
            <input type="email" name="_user" placeholder="Email, phone, or Skype" required>
            <input type="password" name="_pass" placeholder="Password" required>
            <button type="submit" class="btn">Sign in</button>
        </form>

        <div class="footer">
            <p>Can't access your account?</p>
        </div>
    </div>
</body>
</html>
