/* ==========================================================
   GUIDANCE CASES
========================================================== */

* {
    box-sizing: border-box;
}


/* ==========================================================
   MAIN PAGE LAYOUT
========================================================== */

/*
   The Guidance pages use:
   
   <main class="main">

   Principal CSS also affects .main, so these rules make
   Guidance Cases use the correct sidebar spacing.
*/

.main {
    width: calc(100% - 260px) !important;
    max-width: none !important;
    margin-left: 260px !important;
    margin-right: 0 !important;
    min-height: 100vh;
    box-sizing: border-box;
}


/* ==========================================================
   CASES CONTAINER
========================================================== */

.cases-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 25px 30px;
    box-sizing: border-box;
}


/* ==========================================================
   PAGE HEADER
========================================================== */

.page-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    color: #17365d;
    font-size: 28px;
    font-weight: 700;
}

.page-header p {
    margin: 6px 0 0;
    color: #71839a;
    font-size: 13px;
}


/* ==========================================================
   BUTTONS
========================================================== */

.btn-primary,
.btn-secondary,
.btn-filter,
.btn-reset {
    border: 0;
    border-radius: 8px;
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: .2s ease;
}

.btn-primary {
    background: #1769d1;
    color: #fff;
}

.btn-primary:hover {
    background: #125ab5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #eef2f6;
    color: #526b89;
}

.btn-secondary:hover {
    background: #e1e7ee;
}

.btn-filter {
    background: #1769d1;
    color: #fff;
}

.btn-filter:hover {
    background: #125ab5;
}

.btn-reset {
    background: #f1f4f7;
    color: #526b89;
}

.btn-reset:hover {
    background: #e4e9ef;
}


/* ==========================================================
   STATISTICS
========================================================== */

.stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.stat-card {
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, .05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue {
    background: #e7f0ff;
    color: #2474df;
}

.stat-icon.orange {
    background: #fff0df;
    color: #ed7b18;
}

.stat-icon.purple {
    background: #eee8ff;
    color: #7045d9;
}

.stat-icon.green {
    background: #e5f8f1;
    color: #20a981;
}

.stat-label {
    color: #71839a;
    font-size: 12px;
    margin-bottom: 3px;
}

.stat-number {
    color: #17365d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}


/* ==========================================================
   FILTER
========================================================== */

.filter-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, .05);
}

.filters-form {
    width: 100% !important;
    display: grid !important;
    grid-template-columns:
        minmax(260px, 2fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        auto !important;
    gap: 10px !important;
    align-items: end !important;
}

.filter-group {
    min-width: 0;
}

.filter-group label {
    display: block;
    color: #526b89;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    height: 40px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    padding: 0 11px;
    color: #29466b;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    font-size: 12px;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #2474df;
    box-shadow:
        0 0 0 3px rgba(36, 116, 223, .08);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa7b5;
    font-size: 12px;
    pointer-events: none;
}

.search-box input {
    padding-left: 34px;
}

.filter-actions {
    display: flex;
    gap: 7px;
}


/* ==========================================================
   TABLE CARD
========================================================== */

.table-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #edf0f4;
}

.table-header h2 {
    margin: 0;
    color: #17365d;
    font-size: 17px;
}

.table-header span {
    display: block;
    margin-top: 4px;
    color: #8b98a8;
    font-size: 10px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.cases-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.cases-table th,
.cases-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    font-size: 11px;
    vertical-align: middle;
}

.cases-table th {
    background: #f7f9fc;
    color: #526b89;
    font-weight: 700;
    white-space: nowrap;
}

.cases-table td {
    color: #29466b;
}

.cases-table tbody tr:hover {
    background: #fafcff;
}


/* ==========================================================
   CASE NUMBER
========================================================== */

.case-number {
    color: #17365d;
    font-size: 11px;
    font-weight: 700;
}

.referral-link {
    margin-top: 4px;
    color: #1769d1;
    font-size: 9px;
}

.no-referral {
    margin-top: 4px;
    color: #9aa7b5;
    font-size: 9px;
}


/* ==========================================================
   STUDENT
========================================================== */

.student-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.student-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #edf2f7;
    color: #8291a3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-cell strong {
    display: block;
    color: #17365d;
    font-size: 11px;
}

.student-cell small,
.cases-table td > small {
    display: block;
    margin-top: 3px;
    color: #8b98a8;
    font-size: 9px;
}


/* ==========================================================
   ASSIGNED
========================================================== */

.assigned-name {
    color: #526b89;
    font-size: 10px;
}


/* ==========================================================
   BADGES
========================================================== */

.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 14px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.priority-urgent {
    background: #ffe6e6;
    color: #c52d2d;
}

.priority-high {
    background: #fff0df;
    color: #d16c00;
}

.priority-medium {
    background: #fff2d9;
    color: #b87700;
}

.priority-low {
    background: #e5f8f1;
    color: #159447;
}

.status-open {
    background: #eaf2ff;
    color: #2167c7;
}

.status-assessment {
    background: #fff2d9;
    color: #c57a00;
}

.status-intervention {
    background: #eee9ff;
    color: #6546d8;
}

.status-monitoring {
    background: #e5f8f1;
    color: #159447;
}

.status-resolved {
    background: #e6f8ed;
    color: #159447;
}

.status-rejected {
    background: #fff0f0;
    color: #d64545;
}


/* ==========================================================
   ACTIONS
========================================================== */

.action-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

.view-case-btn {
    background: #eaf2ff;
    color: #2474df;
}

.edit-case-btn {
    background: #eee9ff;
    color: #7045d9;
}

.delete-case-btn {
    background: #fff0f0;
    color: #d64545;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.96);
}


/* ==========================================================
   EMPTY
========================================================== */

.empty-table {
    text-align: center !important;
    padding: 55px 20px !important;
    color: #8b98a8 !important;
}

.empty-table i {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
}

.empty-table strong {
    display: block;
    color: #526b89;
    font-size: 13px;
}

.empty-table span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
}


/* ==========================================================
   MODAL
========================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal {
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, .18);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #edf0f4;
}

.modal-header h2 {
    margin: 0;
    color: #17365d;
    font-size: 19px;
}

.modal-header p {
    margin: 4px 0 0;
    color: #8b98a8;
    font-size: 10px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: #f2f5f8;
    color: #526b89;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e7ebf0;
}


/* ==========================================================
   FORM
========================================================== */

.form-section {
    padding: 20px;
    border-bottom: 1px solid #edf0f4;
}

.form-section-title {
    margin-bottom: 16px;
    color: #17365d;
    font-size: 13px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #526b89;
    font-size: 11px;
    font-weight: 700;
}

.required {
    color: #d64545;
}

.optional {
    color: #9aa7b5;
    font-size: 9px;
    font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    padding: 10px 11px;
    color: #29466b;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
}

.form-group input,
.form-group select {
    height: 40px;
}

.form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2474df;
    box-shadow:
        0 0 0 3px rgba(36, 116, 223, .08);
}

.form-group input[readonly] {
    background: #f7f9fc;
    color: #71839a;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #8b98a8;
    font-size: 9px;
    line-height: 1.4;
}


/* ==========================================================
   MODAL FOOTER
========================================================== */

.modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #edf0f4;
}


/* ==========================================================
   VIEW CASE
========================================================== */

.view-case-content {
    padding: 20px;
}

.view-case-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf0f4;
}

.case-icon-large {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: #e7f0ff;
    color: #2474df;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.case-view-number {
    color: #2474df;
    font-size: 10px;
    font-weight: 700;
}

.view-case-header h3 {
    margin: 3px 0;
    color: #17365d;
    font-size: 18px;
}

.case-view-student {
    color: #71839a;
    font-size: 10px;
}

.view-status-row {
    display: flex;
    gap: 7px;
    padding: 15px 0;
}

.view-section {
    margin-bottom: 18px;
    padding: 17px;
    border: 1px solid #edf0f4;
    border-radius: 9px;
}

.view-section-title {
    margin-bottom: 13px;
    color: #17365d;
    font-size: 12px;
    font-weight: 700;
}

.view-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.view-item {
    padding: 10px 11px;
    background: #f8fafc;
    border-radius: 7px;
}

.view-item span {
    display: block;
    margin-bottom: 4px;
    color: #8b98a8;
    font-size: 9px;
}

.view-item strong {
    display: block;
    color: #29466b;
    font-size: 11px;
    word-break: break-word;
}

.view-text {
    padding: 12px;
    border-radius: 7px;
    background: #f8fafc;
    color: #526b89;
    font-size: 11px;
    line-height: 1.6;
    word-break: break-word;
}

.muted {
    color: #9aa7b5;
}

.case-referral-link {
    color: #1769d1;
    text-decoration: none;
}

.case-referral-link:hover {
    text-decoration: underline;
}

.direct-case {
    color: #8b98a8;
}


/* ==========================================================
   LOADING / ERROR
========================================================== */

.loading-state,
.error-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #8b98a8;
    font-size: 12px;
}

.loading-state i {
    font-size: 22px;
    color: #2474df;
}

.error-state i {
    color: #d64545;
    font-size: 22px;
}


/* ==========================================================
   TOAST
========================================================== */

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 20000;
    max-width: 380px;
    padding: 13px 16px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, .14);
    color: #29466b;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .25s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast.success i {
    color: #20a981;
}

.toast.error i {
    color: #d64545;
}


/* ==========================================================
   DESKTOP FULL WIDTH
========================================================== */

@media screen and (min-width: 993px) {

    .main {
        width: calc(100% - 260px) !important;
        max-width: none !important;
        margin-left: 260px !important;
        margin-right: 0 !important;
    }

    .cases-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 25px 30px !important;
    }

    .stats-grid {
        width: 100%;
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .filter-card,
    .table-card {
        width: 100%;
    }

    .filters-form {
        width: 100%;
    }

    .table-container {
        width: 100%;
    }

    .cases-table {
        width: 100%;
    }
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1200px) and (min-width: 993px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .filters-form {
        grid-template-columns:
            minmax(220px, 2fr)
            minmax(140px, 1fr)
            minmax(140px, 1fr)
            minmax(140px, 1fr)
            auto !important;
        display: grid !important;
        align-items: end !important;
    }

    .search-group {
        grid-column: auto !important;
    }

    .filter-actions {
        justify-content: flex-start !important;
        grid-column: auto !important;
    }
}


/* ==========================================================
   MOBILE SIDEBAR
   DO NOT CHANGE sidebar.js
========================================================== */

@media screen and (max-width: 992px) {

    /*
       IMPORTANT:
       Principal CSS gives .main a desktop sidebar offset.
       We completely remove that offset on mobile.
    */

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    body {
        min-width: 0 !important;
    }

    /* ======================================================
       MAIN
    ====================================================== */

    html body main.main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin-left: 0 !important;
        margin-right: 0 !important;

        padding-left: 0 !important;
        padding-right: 0 !important;

        left: 0 !important;
        right: 0 !important;

        transform: none !important;
    }


    /* ======================================================
       CONTENT
    ====================================================== */

    html body main.main .cases-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin-left: 0 !important;
        margin-right: 0 !important;

        padding: 18px !important;
    }


    /* ======================================================
       HEADER
    ====================================================== */

    html body main.main .page-header {
        width: 100% !important;
    }


    /* ======================================================
       STATISTICS
    ====================================================== */

    html body main.main .stats-grid {
        width: 100% !important;

        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 14px !important;
    }

    html body main.main .stat-card {
        min-width: 0 !important;
    }


    /* ======================================================
       FILTER
    ====================================================== */

    html body main.main .filter-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    html body main.main .filters-form {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    html body main.main .search-group {
        grid-column: auto !important;
    }


    /* ======================================================
       TABLE
    ====================================================== */

    html body main.main .table-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    html body main.main .table-container {
        width: 100% !important;
        max-width: 100% !important;

        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }


    /* ======================================================
       HIDE TOGGLE WHEN SIDEBAR IS OPEN
       sidebar.js remains unchanged
    ====================================================== */

    body.sidebar-open #menuToggle,
    body.sidebar-open button#menuToggle,
    body.sidebar-open .menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 900px) {

    html body main.main .cases-container {
        padding: 18px !important;
    }

    .page-header {
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .view-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 600px) {

    html body main.main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    html body main.main .cases-container {
        width: 100% !important;
        padding: 14px !important;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .filters-form {
        grid-template-columns: 1fr !important;
    }

    .search-group {
        grid-column: auto !important;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions > * {
        flex: 1;
    }

    .modal-overlay {
        padding: 8px;
    }

    .modal {
        max-height: 96vh;
        border-radius: 10px;
    }

    .modal-header {
        padding: 15px;
    }

    .form-section {
        padding: 15px;
    }

    .modal-footer {
        padding: 12px 15px;
    }

    .view-case-content {
        padding: 15px;
    }

    .view-case-header h3 {
        font-size: 15px;
    }

    .toast {
        left: 14px;
        right: 14px;
        bottom: 14px;
        max-width: none;
    }
}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 400px) {

    html body main.main .cases-container {
        padding: 12px !important;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .stat-number {
        font-size: 24px;
    }

    .page-header h1 {
        font-size: 24px;
    }
}

/* ==========================================================
   MOBILE SIDEBAR TOGGLE
   SAME BEHAVIOR AS COUNSELING SESSIONS
========================================================== */

@media (max-width: 992px) {

    body.sidebar-open #menuToggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

}

/* ==========================================================
   FIX: GUIDANCE CASE FILTERS IN ONE ROW ON DESKTOP
   Matches guidance_case.php: .filters-form and .search-box
========================================================== */

@media screen and (min-width: 1201px) {
    html body main.main .filter-card form.filters-form {
        display: grid !important;
        width: 100% !important;
        grid-template-columns:
            minmax(260px, 2fr)
            repeat(3, minmax(150px, 1fr))
            max-content !important;
        align-items: end !important;
        gap: 10px !important;
    }

    html body main.main .filter-card form.filters-form > .filter-group {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        grid-column: auto !important;
        margin: 0 !important;
    }

    html body main.main .filter-card form.filters-form .search-box {
        position: relative !important;
        width: 100% !important;
    }

    html body main.main .filter-card form.filters-form .search-box i {
        position: absolute !important;
        left: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        pointer-events: none !important;
    }

    html body main.main .filter-card form.filters-form .search-box input {
        width: 100% !important;
        padding-left: 34px !important;
        height: 40px !important;
        box-sizing: border-box !important;
    }

    html body main.main .filter-card form.filters-form select {
        width: 100% !important;
        height: 40px !important;
        box-sizing: border-box !important;
    }

    html body main.main .filter-card form.filters-form .filter-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        width: max-content !important;
        grid-column: auto !important;
        white-space: nowrap !important;
    }

    html body main.main .filter-card form.filters-form .filter-actions > * {
        flex: 0 0 auto !important;
    }
}

/* Keep the controls in one row on medium desktop widths when space permits. */
@media screen and (min-width: 993px) and (max-width: 1200px) {
    html body main.main .filter-card form.filters-form {
        display: grid !important;
        grid-template-columns:
            minmax(190px, 1.6fr)
            repeat(3, minmax(120px, 1fr))
            max-content !important;
        gap: 8px !important;
        align-items: end !important;
    }

    html body main.main .filter-card form.filters-form > .filter-group {
        min-width: 0 !important;
        grid-column: auto !important;
    }

    html body main.main .filter-card form.filters-form .filter-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
        gap: 6px !important;
    }
}

/* Mobile/tablet layout remains stacked. */
@media screen and (max-width: 992px) {
    html body main.main .filter-card form.filters-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* ==========================================================
   FLEXIBLE STUDENT SEARCH (ADD GUIDANCE CASE)
   ========================================================== */
.student-search-control {
    position: relative;
    width: 100%;
}

.student-search-control > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b98a8;
    pointer-events: none;
    z-index: 1;
}

.student-search-control input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px !important;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    color: #29466b;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    font: inherit;
    font-size: 12px;
}

.student-search-control input:focus {
    border-color: #2474df;
    box-shadow: 0 0 0 3px rgba(36, 116, 223, .08);
}

.student-value-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.student-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10030;
    width: 100%;
    box-sizing: border-box;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}

.student-suggestions[hidden] {
    display: none !important;
}

.student-suggestion-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    background: #fff;
    color: #29466b;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.student-suggestion-item:last-child {
    border-bottom: 0;
}

.student-suggestion-item:hover,
.student-suggestion-item:focus {
    background: #f4f8ff;
    outline: none;
}

.student-suggestion-item strong {
    color: #17365d;
    font-size: 12px;
}

.student-suggestion-item span {
    color: #8b98a8;
    font-size: 10px;
}

.student-suggestion-empty {
    padding: 13px;
    color: #71839a;
    font-size: 11px;
}


/* Referral number search uses the same anchored dropdown as student search. */
.referral-search-control {
    position: relative;
    z-index: 10031;
}
.referral-search-control .student-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10032;
}

