<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - BRM Digital API Portal</title>
    <!-- Bootstrap 5 CSS & Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <style>
        :root {
            --bg-page: #080e1a;
            --bg-card: #0f172a;
            --border-line: #1e293b;
            --accent-cyan: #38bdf8;
            --accent-blue: #2563eb;
        }

        body {
            background-color: var(--bg-page);
            color: #f1f5f9;
            font-family: system-ui, -apple-system, sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .auth-card {
            background: var(--bg-card);
            border: 1px solid var(--border-line);
            border-radius: 16px;
            max-width: 440px;
            width: 100%;
            padding: 35px;
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
        }

        .form-label {
            color: #cbd5e1;
            font-weight: 600;
            font-size: 0.88rem;
            margin-bottom: 6px;
        }

        .form-control {
            background-color: #020617;
            border: 1px solid #334155;
            color: #ffffff;
            padding: 11px 14px;
            border-radius: 8px;
            font-size: 0.95rem;
        }

        .form-control:focus {
            background-color: #020617;
            color: #ffffff;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.15);
        }

        .input-group-text {
            background-color: #020617;
            border-color: #334155;
            color: #94a3b8;
        }

        .btn-submit {
            background-color: var(--accent-blue);
            border: none;
            color: #ffffff;
            font-weight: 600;
            padding: 12px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .btn-submit:hover {
            background-color: #1d4ed8;
            color: #ffffff;
        }
    </style>
</head>
<body class="p-3">

<div class="auth-card">
    <div class="text-center mb-4">
        <div class="rounded-circle bg-primary bg-opacity-10 text-primary p-3 d-inline-flex mb-3">
            <i class="bi bi-shield-lock-fill fs-2"></i>
        </div>
        <h4 class="fw-bold text-white mb-1">BRM Digital API</h4>
        <small class="text-light opacity-75">Sign in to your client developer account</small>
    </div>

    
    <form method="POST" autocomplete="off">
        <!-- Email or Mobile Input -->
        <div class="mb-3">
            <label class="form-label">Email or Mobile Number</label>
            <div class="input-group">
                <input type="text" name="identifier" class="form-control" placeholder="client@example.com or 9876543210" value="" required autofocus>
                <span class="input-group-text"><i class="bi bi-person"></i></span>
            </div>
        </div>

        <!-- Password Input with Toggle -->
        <div class="mb-4">
            <div class="d-flex justify-content-between align-items-center mb-1">
                <label class="form-label mb-0">Password</label>
                <a href="forgot_password.php" class="text-info text-decoration-none small">Forgot?</a>
            </div>
            <div class="input-group">
                <input type="password" name="password" id="passwordField" class="form-control" placeholder="Enter your password" required>
                <button class="btn input-group-text" type="button" onclick="togglePassword()">
                    <i class="bi bi-eye" id="toggleIcon"></i>
                </button>
            </div>
        </div>

        <button type="submit" class="btn btn-submit w-100 mb-3">
            Sign In <i class="bi bi-box-arrow-in-right ms-1"></i>
        </button>

        <div class="text-center pt-2 border-top border-secondary border-opacity-25 small">
            <span class="text-light opacity-75">Don't have an account?</span> 
            <a href="register.php" class="text-info text-decoration-none fw-semibold">Sign Up & Subscribe</a>
        </div>
    </form>
</div>

<script>
function togglePassword() {
    const field = document.getElementById('passwordField');
    const icon = document.getElementById('toggleIcon');
    if (field.type === 'password') {
        field.type = 'text';
        icon.classList.remove('bi-eye');
        icon.classList.add('bi-eye-slash');
    } else {
        field.type = 'password';
        icon.classList.remove('bi-eye-slash');
        icon.classList.add('bi-eye');
    }
}
</script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>