/* ── Page Header ─────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h3 {
    margin-bottom: 0.4rem;
}

/* ── Filter Row ───────────────────────────────────── */
.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-row .form-control {
    min-width: 150px;
    flex: 1;
}

/* ── Sortable Table Headers ───────────────────────── */
.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable:hover {
    text-decoration: underline;
}

/* ── Alternate Row Colors ─────────────────────────── */
.table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.table tbody tr:hover {
    background-color: #e8f4f8 !important;
    cursor: pointer;
}

/* ── Mobile Applicant Card ────────────────────────── */
.applicant-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.applicant-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Empty State ──────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* ── Checkbox Label ───────────────────────────────── */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .page-header h3 {
        font-size: 1.2rem;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row .form-control {
        width: 100%;
    }

    .card-body .row > [class*="col-md"] {
        margin-bottom: 0.75rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
    }

    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header {
        flex-direction: column;
    }

    .page-header .btn {
        width: 100%;
    }
}

/* ── Setup Hub Cards ──────────────────────────────── */
.setup-card {
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s;
}

.setup-card:hover {
    border-color: #1e3a5f;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.15);
    transform: translateY(-2px);
}

.setup-icon {
    font-size: 2.5rem;
}

/* ── Curriculum Mobile ────────────────────────────── */
@media (max-width: 768px) {
    /* Curriculum subject table — scroll horizontally */
    .curriculum-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Semester header */
    .sem-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    /* Subject card on mobile */
    .subject-mobile-card {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .subject-mobile-card .badge {
        font-size: 0.7rem;
    }
}

/* ── Lookup / Typeahead ───────────────────────────── */
.lookup-wrapper {
    position: relative;
}

.lookup-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 280px;
    overflow-y: auto;
}

.lookup-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.lookup-item:hover,
.lookup-item.active {
    background-color: #e8f4f8;
}

.lookup-item:last-child {
    border-bottom: none;
}
