<?php $bp = defined('BASE_PATH') ? BASE_PATH : '/gmind'; ?>
<!-- Practice Sets Management -->
<div class="admin-section">
    <?php if ($showAttempts ?? false): ?>
    <!-- MODE 4: Attempt Viewing -->
    <div class="admin-card" style="margin-bottom: 24px;">
        <div class="admin-card-header">
            <h2 class="admin-card-title">Attempts — <?= htmlspecialchars($editSet['title'] ?? '', ENT_QUOTES, 'UTF-8') ?></h2>
            <div class="admin-card-actions">
                <a href="<?= $bp ?>/admin/practice-sets" class="admin-btn admin-btn-sm admin-btn-secondary">Back to Practice Sets</a>
            </div>
        </div>
        <div class="admin-card-body">
            <?php if (!empty($attempts)): ?>
            <div class="admin-table-responsive">
                <table class="admin-table">
                    <thead>
                        <tr>
                            <th>Student Name</th>
                            <th>Email</th>
                            <th>Obtained</th>
                            <th>Total</th>
                            <th>Percentage</th>
                            <th>Status</th>
                            <th>Date</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($attempts as $attempt): ?>
                        <tr>
                            <td><strong><?= htmlspecialchars($attempt['student_name'] ?? '', ENT_QUOTES, 'UTF-8') ?></strong></td>
                            <td><?= htmlspecialchars($attempt['student_email'] ?? '—', ENT_QUOTES, 'UTF-8') ?></td>
                            <td><?= (int) ($attempt['total_obtained'] ?? 0) ?></td>
                            <td><?= (int) ($attempt['total_marks'] ?? 0) ?></td>
                            <td><?= number_format((float) ($attempt['percentage'] ?? 0), 1) ?>%</td>
                            <td>
                                <?php if (($attempt['status'] ?? '') === 'pass'): ?>
                                <span class="admin-badge admin-badge-success">Pass</span>
                                <?php else: ?>
                                <span class="admin-badge admin-badge-danger">Fail</span>
                                <?php endif; ?>
                            </td>
                            <td><?= htmlspecialchars(date('M j, Y g:i A', strtotime($attempt['created_at'] ?? 'now')), ENT_QUOTES, 'UTF-8') ?></td>
                            <td>
                                <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) ($editSet['id'] ?? 0) ?>/attempts/<?= (int) ($attempt['id'] ?? 0) ?>/delete" style="display:inline" onsubmit="return confirm('Delete this attempt?')">
                                    <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">
                                    <button type="submit" class="admin-btn admin-btn-sm admin-btn-danger" data-confirm-delete>Delete</button>
                                </form>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
            <?php else: ?>
            <div class="admin-empty-state">
                <p class="admin-empty-text">No attempts recorded for this practice set yet.</p>
            </div>
            <?php endif; ?>
        </div>
    </div>

    <?php elseif ($showQuestions ?? false): ?>
    <!-- MODE 3: Questions Management -->
    <div class="admin-card" style="margin-bottom: 24px;">
        <div class="admin-card-header">
            <h2 class="admin-card-title">Questions — <?= htmlspecialchars($editSet['title'] ?? '', ENT_QUOTES, 'UTF-8') ?></h2>
            <div class="admin-card-actions">
                <a href="<?= $bp ?>/admin/practice-sets" class="admin-btn admin-btn-sm admin-btn-secondary">Back to Practice Sets</a>
            </div>
        </div>
        <div class="admin-card-body">
            <!-- Add Question Form -->
            <div class="admin-form-section">
                <h3 class="admin-form-section-title">Add New Question</h3>
                <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) ($editSet['id'] ?? 0) ?>/questions" class="admin-form" novalidate>
                    <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">

                    <div class="admin-form-group">
                        <label for="question_text" class="admin-form-label">Question Text (English) <span class="admin-required">*</span></label>
                        <textarea id="question_text" name="question_text" class="admin-form-textarea" rows="3" required></textarea>
                    </div>

                    <div class="admin-form-group">
                        <label for="question_text_hindi" class="admin-form-label">Question Text (Hindi)</label>
                        <textarea id="question_text_hindi" name="question_text_hindi" class="admin-form-textarea" rows="3"></textarea>
                    </div>

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="option_a" class="admin-form-label">Option A (English) <span class="admin-required">*</span></label>
                            <input type="text" id="option_a" name="option_a" class="admin-form-input" required>
                        </div>
                        <div class="admin-form-group">
                            <label for="option_a_hindi" class="admin-form-label">Option A (Hindi)</label>
                            <input type="text" id="option_a_hindi" name="option_a_hindi" class="admin-form-input">
                        </div>
                    </div>

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="option_b" class="admin-form-label">Option B (English) <span class="admin-required">*</span></label>
                            <input type="text" id="option_b" name="option_b" class="admin-form-input" required>
                        </div>
                        <div class="admin-form-group">
                            <label for="option_b_hindi" class="admin-form-label">Option B (Hindi)</label>
                            <input type="text" id="option_b_hindi" name="option_b_hindi" class="admin-form-input">
                        </div>
                    </div>

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="option_c" class="admin-form-label">Option C (English)</label>
                            <input type="text" id="option_c" name="option_c" class="admin-form-input">
                        </div>
                        <div class="admin-form-group">
                            <label for="option_c_hindi" class="admin-form-label">Option C (Hindi)</label>
                            <input type="text" id="option_c_hindi" name="option_c_hindi" class="admin-form-input">
                        </div>
                    </div>

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="option_d" class="admin-form-label">Option D (English)</label>
                            <input type="text" id="option_d" name="option_d" class="admin-form-input">
                        </div>
                        <div class="admin-form-group">
                            <label for="option_d_hindi" class="admin-form-label">Option D (Hindi)</label>
                            <input type="text" id="option_d_hindi" name="option_d_hindi" class="admin-form-input">
                        </div>
                    </div>

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="correct_answer" class="admin-form-label">Correct Answer</label>
                            <select id="correct_answer" name="correct_answer" class="admin-form-select">
                                <option value="a">A</option>
                                <option value="b">B</option>
                                <option value="c">C</option>
                                <option value="d">D</option>
                            </select>
                        </div>
                        <div class="admin-form-group">
                            <label for="marks" class="admin-form-label">Marks</label>
                            <input type="number" id="marks" name="marks" class="admin-form-input" min="1" value="1">
                        </div>
                        <div class="admin-form-group">
                            <label for="sort_order" class="admin-form-label">Sort Order</label>
                            <input type="number" id="sort_order" name="sort_order" class="admin-form-input" min="0" value="<?= count($questions ?? []) + 1 ?>">
                        </div>
                    </div>

                    <div class="admin-form-actions">
                        <button type="submit" class="admin-btn admin-btn-primary">Add Question</button>
                    </div>
                </form>
            </div>

            <!-- CSV Import Section -->
            <div class="admin-form-section" style="margin-top: 24px;">
                <h3 class="admin-form-section-title">Import Questions from CSV</h3>
                <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) ($editSet['id'] ?? 0) ?>/import" class="admin-form" enctype="multipart/form-data" novalidate>
                    <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">

                    <div class="admin-form-row">
                        <div class="admin-form-group">
                            <label for="import_file" class="admin-form-label">CSV / Excel File</label>
                            <input type="file" id="import_file" name="import_file" class="admin-form-input" accept=".csv,.xlsx,.xls" required>
                        </div>
                        <div class="admin-form-group" style="display:flex;align-items:flex-end;">
                            <div>
                                <a href="<?= $bp ?>/admin/practice-sets/download-template" class="admin-btn admin-btn-sm admin-btn-secondary" style="margin-bottom:8px;">Download Template</a>
                            </div>
                        </div>
                    </div>

                    <div class="admin-form-actions">
                        <button type="submit" class="admin-btn admin-btn-primary">Import CSV</button>
                    </div>
                </form>
            </div>

            <!-- Questions List -->
            <?php if (!empty($questions)): ?>
            <h3 style="margin-top: 24px; margin-bottom: 12px;">Current Questions (<?= count($questions) ?>)</h3>
            <div class="admin-table-responsive">
                <table class="admin-table">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Question (English)</th>
                            <th>Question (Hindi)</th>
                            <th>Options</th>
                            <th>Correct</th>
                            <th>Marks</th>
                            <th>Sort</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($questions as $idx => $q): ?>
                        <tr>
                            <td><?= (int) ($idx + 1) ?></td>
                            <td><?= htmlspecialchars($q['question_text'] ?? '', ENT_QUOTES, 'UTF-8') ?></td>
                            <td><?= htmlspecialchars($q['question_text_hindi'] ?? '—', ENT_QUOTES, 'UTF-8') ?></td>
                            <td>
                                <small>
                                    A: <?= htmlspecialchars($q['option_a'] ?? '', ENT_QUOTES, 'UTF-8') ?><?php if (!empty($q['option_a_hindi'])): ?> (<?= htmlspecialchars($q['option_a_hindi'], ENT_QUOTES, 'UTF-8') ?>)<?php endif; ?><br>
                                    B: <?= htmlspecialchars($q['option_b'] ?? '', ENT_QUOTES, 'UTF-8') ?><?php if (!empty($q['option_b_hindi'])): ?> (<?= htmlspecialchars($q['option_b_hindi'], ENT_QUOTES, 'UTF-8') ?>)<?php endif; ?><br>
                                    C: <?= htmlspecialchars($q['option_c'] ?? '—', ENT_QUOTES, 'UTF-8') ?><?php if (!empty($q['option_c_hindi'])): ?> (<?= htmlspecialchars($q['option_c_hindi'], ENT_QUOTES, 'UTF-8') ?>)<?php endif; ?><br>
                                    D: <?= htmlspecialchars($q['option_d'] ?? '—', ENT_QUOTES, 'UTF-8') ?><?php if (!empty($q['option_d_hindi'])): ?> (<?= htmlspecialchars($q['option_d_hindi'], ENT_QUOTES, 'UTF-8') ?>)<?php endif; ?>
                                </small>
                            </td>
                            <td><span class="admin-badge admin-badge-success"><?= strtoupper($q['correct_answer'] ?? 'a') ?></span></td>
                            <td><?= (int) ($q['marks'] ?? 1) ?></td>
                            <td><?= (int) ($q['sort_order'] ?? 0) ?></td>
                            <td>
                                <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) ($editSet['id'] ?? 0) ?>/questions/<?= (int) ($q['id'] ?? 0) ?>/delete" style="display:inline" onsubmit="return confirm('Delete this question?')">
                                    <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">
                                    <button type="submit" class="admin-btn admin-btn-sm admin-btn-danger" data-confirm-delete>Remove</button>
                                </form>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
            <?php else: ?>
            <div class="admin-empty-state" style="margin-top: 16px;">
                <p class="admin-empty-text">No questions added yet. Use the form above to add questions or import from CSV.</p>
            </div>
            <?php endif; ?>
        </div>
    </div>

    <?php elseif ($showForm ?? false): ?>
    <!-- MODE 2: Create/Edit Practice Set Form -->
    <div class="admin-card" style="margin-bottom: 24px;">
        <div class="admin-card-header">
            <h2 class="admin-card-title"><?= $editSet ? 'Edit Practice Set' : 'Add New Practice Set' ?></h2>
            <div class="admin-card-actions">
                <a href="<?= $bp ?>/admin/practice-sets" class="admin-btn admin-btn-sm admin-btn-secondary">Cancel</a>
            </div>
        </div>
        <div class="admin-card-body">
            <form method="POST" action="<?= $editSet ? $bp . '/admin/practice-sets/' . (int)$editSet['id'] : $bp . '/admin/practice-sets' ?>" class="admin-form" novalidate>
                <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">

                <div class="admin-form-row">
                    <div class="admin-form-group">
                        <label for="title" class="admin-form-label">Title (English) <span class="admin-required">*</span></label>
                        <input type="text" id="title" name="title" class="admin-form-input" required
                               value="<?= htmlspecialchars($editSet['title'] ?? '', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                    <div class="admin-form-group">
                        <label for="title_hindi" class="admin-form-label">Title (Hindi)</label>
                        <input type="text" id="title_hindi" name="title_hindi" class="admin-form-input"
                               value="<?= htmlspecialchars($editSet['title_hindi'] ?? '', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                </div>

                <div class="admin-form-group">
                    <label for="course_id" class="admin-form-label">Course</label>
                    <select id="course_id" name="course_id" class="admin-form-select">
                        <option value="">Select Course</option>
                        <?php foreach ($courses ?? [] as $course): ?>
                        <option value="<?= (int) $course['id'] ?>" <?= ($editSet['course_id'] ?? '') == $course['id'] ? 'selected' : '' ?>>
                            <?= htmlspecialchars($course['name'], ENT_QUOTES, 'UTF-8') ?>
                        </option>
                        <?php endforeach; ?>
                    </select>
                </div>

                <div class="admin-form-group">
                    <label for="description" class="admin-form-label">Description (English)</label>
                    <textarea id="description" name="description" class="admin-form-textarea" rows="3"><?= htmlspecialchars($editSet['description'] ?? '', ENT_QUOTES, 'UTF-8') ?></textarea>
                </div>

                <div class="admin-form-group">
                    <label for="description_hindi" class="admin-form-label">Description (Hindi)</label>
                    <textarea id="description_hindi" name="description_hindi" class="admin-form-textarea" rows="3"><?= htmlspecialchars($editSet['description_hindi'] ?? '', ENT_QUOTES, 'UTF-8') ?></textarea>
                </div>

                <div class="admin-form-row">
                    <div class="admin-form-group">
                        <label for="duration_minutes" class="admin-form-label">Duration (minutes)</label>
                        <input type="number" id="duration_minutes" name="duration_minutes" class="admin-form-input" min="1"
                               value="<?= htmlspecialchars($editSet['duration_minutes'] ?? '60', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                    <div class="admin-form-group">
                        <label for="total_marks" class="admin-form-label">Total Marks</label>
                        <input type="number" id="total_marks" name="total_marks" class="admin-form-input" min="1"
                               value="<?= htmlspecialchars($editSet['total_marks'] ?? '100', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                    <div class="admin-form-group">
                        <label for="pass_marks" class="admin-form-label">Pass Marks</label>
                        <input type="number" id="pass_marks" name="pass_marks" class="admin-form-input" min="0"
                               value="<?= htmlspecialchars($editSet['pass_marks'] ?? '40', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                </div>

                <div class="admin-form-row">
                    <div class="admin-form-group">
                        <label for="negative_marks" class="admin-form-label">Negative Marks</label>
                        <input type="number" id="negative_marks" name="negative_marks" class="admin-form-input" min="0" step="0.5"
                               value="<?= htmlspecialchars($editSet['negative_marks'] ?? '0', ENT_QUOTES, 'UTF-8') ?>">
                    </div>
                    <div class="admin-form-group">
                        <label for="language_mode" class="admin-form-label">Language Mode</label>
                        <select id="language_mode" name="language_mode" class="admin-form-select">
                            <option value="both" <?= ($editSet['language_mode'] ?? 'both') === 'both' ? 'selected' : '' ?>>Both (Hindi &amp; English)</option>
                            <option value="hindi" <?= ($editSet['language_mode'] ?? '') === 'hindi' ? 'selected' : '' ?>>Hindi Only</option>
                            <option value="english" <?= ($editSet['language_mode'] ?? '') === 'english' ? 'selected' : '' ?>>English Only</option>
                        </select>
                    </div>
                    <div class="admin-form-group">
                        <label for="max_attempts" class="admin-form-label">Max Attempts</label>
                        <input type="number" id="max_attempts" name="max_attempts" class="admin-form-input" min="0"
                               value="<?= htmlspecialchars($editSet['max_attempts'] ?? '0', ENT_QUOTES, 'UTF-8') ?>">
                        <small class="admin-form-help">0 = unlimited</small>
                    </div>
                </div>

                <div class="admin-form-group">
                    <label class="admin-form-label">Options</label>
                    <label class="admin-toggle">
                        <input type="checkbox" name="is_published" value="1" <?= ($editSet['is_published'] ?? 0) ? 'checked' : '' ?>>
                        <span class="admin-toggle-slider"></span>
                        <span class="admin-toggle-label">Published</span>
                    </label>
                    <label class="admin-toggle" style="margin-top: 8px;">
                        <input type="checkbox" name="result_published" value="1" <?= ($editSet['result_published'] ?? 1) ? 'checked' : '' ?>>
                        <span class="admin-toggle-slider"></span>
                        <span class="admin-toggle-label">Result Published</span>
                    </label>
                    <small class="admin-form-help" style="display:block;margin-top:2px;">If disabled, students see only "Exam Submitted". Default is ON — turn off only for exam-mode tests where results are revealed later.</small>
                    <label class="admin-toggle" style="margin-top: 8px;">
                        <input type="checkbox" name="show_correct_answers" value="1" <?= ($editSet['show_correct_answers'] ?? 1) ? 'checked' : '' ?>>
                        <span class="admin-toggle-slider"></span>
                        <span class="admin-toggle-label">Show Correct Answers</span>
                    </label>
                    <small class="admin-form-help" style="display:block;margin-top:2px;">Show correct answers in result review</small>
                </div>

                <div class="admin-form-actions">
                    <button type="submit" class="admin-btn admin-btn-primary"><?= $editSet ? 'Update Practice Set' : 'Create Practice Set' ?></button>
                    <a href="<?= $bp ?>/admin/practice-sets" class="admin-btn admin-btn-secondary">Cancel</a>
                </div>
            </form>
        </div>
    </div>

    <?php else: ?>
    <!-- MODE 1: Practice Sets Listing -->
    <div class="admin-section-header">
        <a href="<?= $bp ?>/admin/practice-sets/create" class="admin-btn admin-btn-primary">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
            Add New Practice Set
        </a>
    </div>

    <?php if (!empty($sets)): ?>
    <div class="admin-card">
        <div class="admin-card-body">
            <div class="admin-table-responsive">
                <table class="admin-table" data-search="true">
                    <thead>
                        <tr>
                            <th>Title</th>
                            <th>Course</th>
                            <th>Duration</th>
                            <th>Total Marks</th>
                            <th>Pass Marks</th>
                            <th>Questions</th>
                            <th>Students</th>
                            <th>Attempts</th>
                            <th>Status</th>
                            <th>Result</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($sets as $set): ?>
                        <tr>
                            <td><strong><?= htmlspecialchars($set['title'] ?? '', ENT_QUOTES, 'UTF-8') ?></strong></td>
                            <td><?= htmlspecialchars($set['course_name'] ?? '—', ENT_QUOTES, 'UTF-8') ?></td>
                            <td><?= (int) ($set['duration_minutes'] ?? 0) ?> min</td>
                            <td><?= (int) ($set['total_marks'] ?? 0) ?></td>
                            <td><?= (int) ($set['pass_marks'] ?? 0) ?></td>
                            <td><?= (int) ($set['question_count'] ?? 0) ?></td>
                            <td>
                                <span style="font-weight:600;color:#1a4fa0;"><?= (int) ($set['unique_student_count'] ?? 0) ?></span>
                            </td>
                            <td>
                                <span style="font-weight:600;"><?= (int) ($set['attempt_count'] ?? 0) ?></span>
                            </td>
                            <td>
                                <?php if ($set['is_published'] ?? 0): ?>
                                <span class="admin-badge admin-badge-success">Published</span>
                                <?php else: ?>
                                <span class="admin-badge admin-badge-warning">Draft</span>
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if ($set['result_published'] ?? 0): ?>
                                <span class="admin-badge admin-badge-success">Published</span>
                                <?php else: ?>
                                <span class="admin-badge admin-badge-danger">Hidden</span>
                                <?php endif; ?>
                            </td>
                            <td>
                                <div class="admin-actions">
                                    <a href="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/edit" class="admin-btn admin-btn-sm admin-btn-secondary" title="Edit">Edit</a>
                                    <a href="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/questions" class="admin-btn admin-btn-sm admin-btn-secondary" title="Manage Questions">Questions</a>
                                    <a href="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/attempts" class="admin-btn admin-btn-sm admin-btn-secondary" title="View Attempts">Attempts</a>
                                    <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/toggle-publish" style="display:inline">
                                        <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">
                                        <button type="submit" class="admin-btn admin-btn-sm <?= ($set['is_published'] ?? 0) ? 'admin-btn-warning' : 'admin-btn-primary' ?>" title="Toggle Publish">
                                            <?= ($set['is_published'] ?? 0) ? 'Unpublish' : 'Publish' ?>
                                        </button>
                                    </form>
                                    <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/toggle-result" style="display:inline">
                                        <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">
                                        <button type="submit" class="admin-btn admin-btn-sm <?= ($set['result_published'] ?? 0) ? 'admin-btn-warning' : 'admin-btn-primary' ?>" title="Toggle Result">
                                            <?= ($set['result_published'] ?? 0) ? 'Hide Result' : 'Show Result' ?>
                                        </button>
                                    </form>
                                    <form method="POST" action="<?= $bp ?>/admin/practice-sets/<?= (int) $set['id'] ?>/delete" style="display:inline" onsubmit="return confirm('Delete this practice set and all its questions?')">
                                        <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken ?? '', ENT_QUOTES, 'UTF-8') ?>">
                                        <button type="submit" class="admin-btn admin-btn-sm admin-btn-danger" data-confirm-delete>Delete</button>
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <?php else: ?>
    <div class="admin-card">
        <div class="admin-card-body">
            <div class="admin-empty-state">
                <p class="admin-empty-text">No practice sets found. <a href="<?= $bp ?>/admin/practice-sets/create">Create your first practice set</a>.</p>
            </div>
        </div>
    </div>
    <?php endif; ?>
    <?php endif; ?>
</div>
