<div class="min-vh-100 d-flex align-items-center justify-content-center bg-light">
    <div class="card shadow border-0" style="width: 400px;">
        <div class="card-body p-4">
            <div class="text-center mb-4">
                <h4 class="fw-bold text-danger mb-1"><i class="fas fa-shield-haltered me-2"></i>SuperAdmin</h4>
                <p class="text-muted small mb-0">OrchView System Management</p>
            </div>

            <?php if (!empty($error)): ?>
                <div class="alert alert-danger py-2 small"><?= e($error) ?></div>
            <?php endif; ?>
            <?php if (!empty($msg)): ?>
                <div class="alert alert-info py-2 small"><?= e($msg) ?></div>
            <?php endif; ?>

            <form method="post" action="<?= url('/SuperLogin/authenticate') ?>">
                <input type="hidden" name="_csrf" value="<?= e($csrf) ?>">
                <div class="mb-3">
                    <label class="form-label small">Username</label>
                    <input type="text" name="username" class="form-control" placeholder="superadmin" required autofocus>
                </div>
                <div class="mb-3">
                    <label class="form-label small">Password</label>
                    <input type="password" name="password" class="form-control" placeholder="••••••••" required>
                </div>
                <button type="submit" class="btn btn-danger w-100">Sign In</button>
            </form>

            <div class="text-center mt-3">
                <a href="<?= url('/Login') ?>" class="small text-muted">&larr; Tenant Login</a>
            </div>
        </div>
    </div>
</div>