
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                Login
            </div>
            <div class="card-body">
                <ul class="nav nav-tabs mb-3" id="loginTab" role="tablist">
                    <li class="nav-item" role="presentation">
                        <button class="nav-link active" id="student-tab" data-bs-toggle="tab" data-bs-target="#student" type="button" role="tab">Student Login</button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" id="admin-tab" data-bs-toggle="tab" data-bs-target="#admin" type="button" role="tab">Admin Login</button>
                    </li>
                </ul>
                
                <div class="tab-content" id="loginTabContent">
                    <div class="tab-pane fade show active" id="student" role="tabpanel">
                        <form method="post" action="">
                            <input type="hidden" name="action" value="login">
                            <input type="hidden" name="user_type" value="student">
                            
                            <div class="mb-3">
                                <label for="username" class="form-label">Email or Registration Number</label>
                                <input type="text" class="form-control" id="username" name="username" required>
                            </div>
                            
                            <div class="mb-3">
                                <label for="password" class="form-label">Password</label>
                                <input type="password" class="form-control" id="password" name="password" required>
                            </div>
                            
                            <div class="d-grid">
                                <button type="submit" class="btn btn-primary">Login</button>
                            </div>
                            
                            <div class="mt-3 text-center">
                                <p>Don't have an account? <a href="?page=register">Register here</a></p>
                                <p><a href="?page=forgot_password">Forgot Password?</a></p>
                            </div>
                        </form>
                    </div>
                    
                    <div class="tab-pane fade" id="admin" role="tabpanel">
                        <form method="post" action="">
                            <input type="hidden" name="action" value="login">
                            <input type="hidden" name="user_type" value="admin">
                            
                            <div class="mb-3">
                                <label for="admin_username" class="form-label">Username</label>
                                <input type="text" class="form-control" id="admin_username" name="username" required>
                            </div>
                            
                            <div class="mb-3">
                                <label for="admin_password" class="form-label">Password</label>
                                <input type="password" class="form-control" id="admin_password" name="password" required>
                            </div>
                            
                            <div class="d-grid">
                                <button type="submit" class="btn btn-primary">Login</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
