/* ==========================================================
   STUDENTS – TABLE ALIGNMENT & INTERACTION
   ========================================================== */

/* Matricule */
#studentTable th:nth-child(1),
#studentTable td:nth-child(1) {
    text-align: left;
}

/* Name */
#studentTable th:nth-child(2),
#studentTable td:nth-child(2) {
    text-align: left;
}

/* Federation, School, Class, School year, Status */
#studentTable th:nth-child(3),
#studentTable td:nth-child(3),
#studentTable th:nth-child(4),
#studentTable td:nth-child(4),
#studentTable th:nth-child(5),
#studentTable td:nth-child(5),
#studentTable th:nth-child(6),
#studentTable td:nth-child(6),
#studentTable th:nth-child(7),
#studentTable td:nth-child(7) {
    text-align: center;
}

/* Status cell is interactive (toggle) */
#studentTable td:nth-child(7) {
    cursor: pointer;
}

/* ==========================================================
   STUDENTS – SORT INDICATORS
   ========================================================== */

#studentTable th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px; /* space for arrow */
}

#studentTable th.sorted-asc::after,
#studentTable th.sorted-desc::after {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.7;
}

#studentTable th.sorted-asc::after {
    content: "▲";
}

#studentTable th.sorted-desc::after {
    content: "▼";
}

/* ==========================================================
   STUDENTS – COLUMN VISUAL HIERARCHY
   ========================================================== */

/* Table headers */
#studentTable th {
    font-size: 12.5px;
    font-weight: 600;
}

/* Name: primary scanning column */
#studentTable td:nth-child(2) {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
}

/* Matricule: secondary identifier */
#studentTable td:nth-child(1) {
    font-size: 13px;
    color: #555;
}

/* Compact informational columns (codes & short labels) */
#studentTable td:nth-child(3),
#studentTable td:nth-child(4),
#studentTable td:nth-child(5),
#studentTable td:nth-child(6) {
    font-size: 12.5px;
    letter-spacing: 0.2px;
    color: #333;
}

/* Status column remains readable */
#studentTable td:nth-child(7) {
    font-size: 12.5px;
}

/* ==========================================================
   STUDENTS – FILTER BAR & SPACING
   ========================================================== */

.students-filter-bar {
    margin-bottom: 6px;
}

/* When advanced filters are closed, remove vertical footprint */
#studentAdvancedFilters.hidden {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Tighten spacing between filters and table */
.page-container .table-wrapper {
    margin-top: 4px;
}

/* ==========================================================
   STUDENTS – ADVANCED FILTERS GRID
   ========================================================== */

#studentAdvancedFilters {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 16px;
}

#studentAdvancedFilters .filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#studentAdvancedFilters select {
    min-height: 34px;
}

/* Footer (Reset filters button) */
#studentAdvancedFilters .advanced-filters-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================
   STUDENTS – CLASS FILTER INPUT
   ========================================================== */

.class-search-input {
    width: 100%;
    height: 34px;

    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;

    background: #ffffff;
    color: #2f2f2f;
}

/* ==========================================================
   STUDENTS – LIST META (PAGINATION)
   ========================================================== */

.list-meta {
    margin-top: 14px;
}