/* =========================================================
   LEARNHIVE INSTRUCTOR
   Relies on core's student-dashboard.css for tokens and the
   shared .learnhive-* classes. Only instructor-specific
   additions live here.
   ========================================================= */

.learnhive-instructor-courses {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 70px;

    color: var(--lh-text);
    font-family: inherit;
}

.learnhive-instructor-courses *,
.learnhive-instructor-courses *::before,
.learnhive-instructor-courses *::after {
    box-sizing: border-box;
}

.learnhive-instructor-courses .learnhive-course-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Course cards lay their content out as a column so actions sit at the base. */
.learnhive-course-card .learnhive-course-content {
    display: flex;
    flex-direction: column;
}

/* Per-course metrics row */
.learnhive-course-metrics {
    display: flex;
    gap: 16px;

    margin: 12px 0 16px;

    color: var(--lh-muted);
    font-size: 13px;
}

.learnhive-metric strong {
    color: var(--lh-navy);
    font-weight: 750;
}

/* Action buttons */
.learnhive-course-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.learnhive-button-ghost {
    color: var(--lh-primary) !important;
    background: transparent;
    border: 1px solid var(--lh-border);
}

.learnhive-button-ghost:hover {
    color: var(--lh-primary-dark) !important;
    background: var(--lh-primary-light);
    box-shadow: none;
}


/* =========================================================
   MY STUDENTS (grouped by course)
   ========================================================= */

.learnhive-instructor-students {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 70px;

    color: var(--lh-text);
    font-family: inherit;
}

.learnhive-instructor-students *,
.learnhive-instructor-students *::before,
.learnhive-instructor-students *::after {
    box-sizing: border-box;
}

.learnhive-course-students {
    margin-bottom: 40px;
}

.learnhive-student-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.learnhive-student-row {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.9fr 1fr 1.6fr;
    gap: 16px;
    align-items: center;

    padding: 16px 18px;

    background: var(--lh-surface);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius-md);
    box-shadow: var(--lh-shadow-sm);
}

.lh-stu-name strong {
    display: block;
    color: var(--lh-navy);
    font-size: 14px;
    font-weight: 700;
}

.lh-stu-name span {
    color: var(--lh-muted);
    font-size: 12px;
}

/* Compact the shared progress bar inside a row. */
.learnhive-student-row .learnhive-progress {
    margin-top: 0;
}

.lh-stu-label {
    display: none; /* shown only on stacked mobile layout */
}

.lh-quiz-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lh-quiz-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;

    background: #f1f5f9;
    color: var(--lh-navy);
    border: 1px solid var(--lh-border);

    font-size: 11px;
    font-weight: 600;
}

.lh-quiz-chip.is-pass {
    color: var(--lh-success);
    background: var(--lh-success-bg);
    border-color: #bbf7d0;
}

.lh-quiz-chip.is-fail {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

@media (max-width: 820px) {

    .learnhive-student-row {
        grid-template-columns: 1fr 1fr;
    }

    .lh-stu-label {
        display: block;
        margin-bottom: 4px;
        color: var(--lh-muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

}

@media (max-width: 520px) {

    .learnhive-student-row {
        grid-template-columns: 1fr;
    }

}


/* Dashboard header action buttons (doors into the LearnPress builder). */
.learnhive-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}


/* Enrol-students panel */
.lh-instr-card {
    margin-bottom: 24px;
    padding: 26px;
    background: var(--lh-surface);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius-md);
    box-shadow: var(--lh-shadow-sm);
}

.lh-instr-card h2 {
    margin: 0 0 18px;
    color: var(--lh-navy);
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.lh-instr-card .learnhive-field select {
    width: 100%;
    padding: 11px 14px;
    color: var(--lh-text);
    background: #ffffff;
    border: 1px solid var(--lh-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
}

.lh-instr-card .learnhive-field select:focus {
    outline: none;
    border-color: var(--lh-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.lh-instr-enrol-row {
    grid-template-columns: 1fr auto;
}

.lh-btn-remove {
    padding: 7px 14px;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.lh-btn-remove:hover {
    background: #fecaca;
}
