/* ==========================================================
   GUIDANCE FOLLOW-UPS
========================================================== */

* {
    box-sizing: border-box;
}


body {
    margin: 0;
}


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

.followups-container {

    width: 100%;

    max-width: none;

    padding: 28px 32px 40px;

}


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

.page-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;

}


.page-header h1 {

    margin: 0 0 6px;

    font-size: 28px;

    font-weight: 700;

}


.page-header p {

    margin: 0;

    color: #64748b;

    font-size: 14px;

}


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

.btn-primary {

    border: none;

    background: #2563eb;

    color: #fff;

    padding: 11px 18px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    transition:
        .2s ease;

}


.btn-primary:hover {

    background: #1d4ed8;

}


.btn-secondary {

    border: 1px solid #cbd5e1;

    background: #fff;

    color: #334155;

    padding: 10px 18px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

}


.btn-secondary:hover {

    background: #f8fafc;

}


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

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 22px;

}


.stat-card {

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow:
        0 2px 8px
        rgba(15, 23, 42, .04);

}


.stat-icon {

    width: 46px;

    height: 46px;

    min-width: 46px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 19px;

}


.stat-icon.blue {

    background: #dbeafe;

    color: #2563eb;

}


.stat-icon.orange {

    background: #ffedd5;

    color: #ea580c;

}


.stat-icon.green {

    background: #dcfce7;

    color: #16a34a;

}


.stat-icon.red {

    background: #fee2e2;

    color: #dc2626;

}


.stat-label {

    color: #64748b;

    font-size: 13px;

    margin-bottom: 4px;

}


.stat-number {

    color: #0f172a;

    font-size: 25px;

    font-weight: 700;

}


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

.filter-card {

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    padding: 18px;

    margin-bottom: 20px;

    box-shadow:
        0 2px 8px
        rgba(15, 23, 42, .04);

}


.filter-form {

    display: grid;

    grid-template-columns:
        minmax(260px, 1.5fr)
        minmax(170px, .7fr)
        minmax(200px, .9fr)
        auto;

    align-items: end;

    gap: 15px;

}


.filter-group {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.filter-group label {

    font-size: 12px;

    font-weight: 600;

    color: #475569;

}


.search-box {

    position: relative;

}


.search-box i {

    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

}


.search-box input {

    padding-left: 38px !important;

}


.filter-group input,
.filter-group select,
.form-group input,
.form-group select,
.form-group textarea {

    width: 100%;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    background: #fff;

    color: #0f172a;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

}


.filter-group input,
.filter-group select,
.form-group input,
.form-group select {

    height: 42px;

    padding: 0 12px;

}


.form-group textarea {

    padding: 11px 12px;

    resize: vertical;

    min-height: 100px;

}


.filter-group input:focus,
.filter-group select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, .10);

}


.filter-actions {

    display: flex;

    align-items: center;

    gap: 8px;

}


.btn-filter {

    height: 42px;

    border: none;

    background: #2563eb;

    color: #fff;

    padding: 0 17px;

    border-radius: 8px;

    font-weight: 600;

    cursor: pointer;

}


.btn-reset {

    height: 42px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0 15px;

    border-radius: 8px;

    border: 1px solid #cbd5e1;

    color: #475569;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

}


.btn-reset:hover {

    background: #f8fafc;

}


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

.table-card {

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 2px 8px
        rgba(15, 23, 42, .04);

}


.table-header {

    padding: 18px 20px;

    border-bottom: 1px solid #e2e8f0;

}


.table-header h2 {

    margin: 0 0 4px;

    font-size: 17px;

    color: #0f172a;

}


.table-header span {

    color: #64748b;

    font-size: 13px;

}


.table-container {

    width: 100%;

    overflow-x: auto;

}


.followups-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 1100px;

}


.followups-table th {

    background: #f8fafc;

    color: #475569;

    text-align: left;

    font-size: 12px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .02em;

    padding: 13px 15px;

    border-bottom: 1px solid #e2e8f0;

    white-space: nowrap;

}


.followups-table td {

    padding: 14px 15px;

    border-bottom: 1px solid #eef2f7;

    color: #334155;

    font-size: 13px;

    vertical-align: middle;

}


.followups-table tbody tr:hover {

    background: #f8fafc;

}


.case-cell,
.student-cell,
.date-cell {

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.case-cell strong,
.student-cell strong,
.date-cell strong {

    color: #0f172a;

    font-size: 13px;

}


.case-cell span,
.student-cell span,
.date-cell span {

    color: #64748b;

    font-size: 11px;

}


.type-badge {

    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border-radius: 20px;

    background: #eff6ff;

    color: #1d4ed8;

    font-size: 11px;

    font-weight: 600;

    white-space: nowrap;

}


.status-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 700;

    white-space: nowrap;

}


.status-pending {

    background: #fef3c7;

    color: #92400e;

}


.status-completed {

    background: #dcfce7;

    color: #166534;

}


.status-overdue {

    background: #fee2e2;

    color: #991b1b;

}


.status-cancelled {

    background: #e2e8f0;

    color: #475569;

}


.outcome-text {

    display: block;

    max-width: 220px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.muted {

    color: #94a3b8;

    font-size: 12px;

}


.action-buttons {

    display: flex;

    align-items: center;

    gap: 5px;

}


.action-btn {

    width: 32px;

    height: 32px;

    border-radius: 7px;

    border: 1px solid #e2e8f0;

    background: #fff;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

}


.view-btn {

    color: #2563eb;

}


.edit-btn {

    color: #d97706;

}


.delete-btn {

    color: #dc2626;

}


.action-btn:hover {

    background: #f8fafc;

}


.empty-table {

    padding: 55px 20px !important;

    text-align: center;

}


.empty-table i {

    display: block;

    color: #94a3b8;

    font-size: 35px;

    margin-bottom: 12px;

}


.empty-table strong {

    display: block;

    color: #475569;

    margin-bottom: 5px;

}


.empty-table span {

    display: block;

    color: #94a3b8;

    font-size: 13px;

}


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

.modal {

    position: fixed;

    inset: 0;

    z-index: 9999;

    background:
        rgba(15, 23, 42, .55);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

}


.modal.active {

    display: flex;

}


body.modal-open {

    overflow: hidden;

}


.modal-dialog {

    width: min(
        850px,
        100%
    );

    max-height: 92vh;

    background: #fff;

    border-radius: 14px;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    box-shadow:
        0 25px 70px
        rgba(15, 23, 42, .25);

}


.view-dialog {

    width: min(
        760px,
        100%
    );

}


.modal-header {

    padding: 20px 22px;

    border-bottom: 1px solid #e2e8f0;

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 15px;

}


.modal-header h2 {

    margin: 0 0 5px;

    font-size: 19px;

    color: #0f172a;

}


.modal-header p {

    margin: 0;

    color: #64748b;

    font-size: 13px;

}


.modal-close {

    width: 36px;

    height: 36px;

    border: none;

    border-radius: 8px;

    background: #f1f5f9;

    color: #475569;

    cursor: pointer;

    font-size: 16px;

}


.modal-close:hover {

    background: #e2e8f0;

}


.modal-body {

    padding: 22px;

    overflow-y: auto;

}


.form-section-title {

    display: flex;

    align-items: center;

    gap: 8px;

    color: #1e3a8a;

    font-size: 14px;

    font-weight: 700;

    margin-bottom: 15px;

}


.form-grid {

    display: grid;

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

    gap: 17px;

}


.form-group {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.form-group.full {

    grid-column: 1 / -1;

}


.form-group label {

    color: #475569;

    font-size: 12px;

    font-weight: 700;

}


.form-group label span {

    color: #dc2626;

}


.form-group input[readonly] {

    background: #f8fafc;

    color: #64748b;

}


.modal-footer {

    padding: 15px 22px;

    border-top: 1px solid #e2e8f0;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 9px;

}


/* ==========================================================
   VIEW DETAILS
========================================================== */

.detail-grid {

    display: grid;

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

    gap: 15px;

}


.detail-item {

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 9px;

    padding: 13px;

    display: flex;

    flex-direction: column;

    gap: 5px;

}


.detail-full {

    grid-column: 1 / -1;

}


.detail-label {

    color: #64748b;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

}


.detail-item strong {

    color: #0f172a;

    font-size: 14px;

}


.detail-text {

    color: #334155;

    font-size: 13px;

    line-height: 1.6;

    white-space: pre-wrap;

}


/* ==========================================================
   RESPONSIVE
========================================================== */

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

    .filter-form {

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

    }

    .filter-actions {

        grid-column: 1 / -1;

    }

}


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

    .followups-container {

        width: 100% !important;

        max-width: 100% !important;

        margin-left: 0 !important;

        padding: 22px 18px 35px;

    }


    .stats-grid {

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

    }


    .page-header {

        align-items: flex-start;

    }

}


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

    .page-header {

        flex-direction: column;

    }


    .page-header .btn-primary {

        width: 100%;

    }


    .stats-grid {

        grid-template-columns: 1fr;

    }


    .filter-form {

        grid-template-columns: 1fr;

    }


    .filter-actions {

        grid-column: auto;

        width: 100%;

    }


    .btn-filter,
    .btn-reset {

        flex: 1;

    }


    .form-grid {

        grid-template-columns: 1fr;

    }


    .form-group.full {

        grid-column: auto;

    }


    .detail-grid {

        grid-template-columns: 1fr;

    }


    .detail-full {

        grid-column: auto;

    }


    .modal {

        padding: 10px;

    }


    .modal-dialog {

        max-height: 96vh;

    }

}

/* ==========================================================
   FOLLOW-UP MODALS — FINAL LAYOUT FIX
   ========================================================== */

/*
   IMPORTANT:
   The modal itself is the full-screen overlay.
   The modal-dialog is the actual white window.
*/

#followupModal,
#viewFollowupModal {
    position: fixed !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    padding: 24px !important;

    display: none;

    align-items: center !important;
    justify-content: center !important;

    background: rgba(15, 23, 42, 0.58) !important;

    overflow: hidden !important;

    z-index: 9999 !important;

    box-sizing: border-box !important;
}


/*
   When JavaScript opens the modal.
*/

#followupModal.show,
#viewFollowupModal.show {
    display: flex !important;
}


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

#followupModal .modal-dialog,
#viewFollowupModal .modal-dialog {

    width: min(
        960px,
        calc(100vw - 48px)
    ) !important;

    max-width: 960px !important;

    height: min(
        88vh,
        850px
    ) !important;

    max-height: 88vh !important;

    min-height: 0 !important;

    display: flex !important;

    flex-direction: column !important;

    padding: 0 !important;

    margin: 0 !important;

    background: #ffffff !important;

    border-radius: 18px !important;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.25),
        0 8px 25px rgba(15, 23, 42, 0.12) !important;

    overflow: hidden !important;

    box-sizing: border-box !important;
}


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

#viewFollowupModal .view-dialog {

    width: min(
        960px,
        calc(100vw - 48px)
    ) !important;

    max-width: 960px !important;

    height: min(
        88vh,
        850px
    ) !important;

    max-height: 88vh !important;
}


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

#followupModal .modal-header,
#viewFollowupModal .modal-header {

    flex: 0 0 auto !important;

    width: 100% !important;

    min-height: 92px !important;

    display: flex !important;

    align-items: center !important;

    justify-content: space-between !important;

    gap: 20px !important;

    padding: 22px 28px !important;

    background: #ffffff !important;

    border-bottom: 1px solid #e5e7eb !important;

    box-sizing: border-box !important;
}


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

#followupModal .modal-header h2,
#viewFollowupModal .modal-header h2 {

    margin: 0 !important;

    color: #172033 !important;

    font-size: 25px !important;

    line-height: 1.25 !important;

    font-weight: 800 !important;

    letter-spacing: -0.3px !important;
}


#followupModal .modal-header p,
#viewFollowupModal .modal-header p {

    margin: 6px 0 0 !important;

    color: #64748b !important;

    font-size: 14px !important;

    line-height: 1.45 !important;
}


/* ==========================================================
   CLOSE BUTTON
========================================================== */

#followupModal .modal-close,
#viewFollowupModal .modal-close {

    width: 44px !important;

    height: 44px !important;

    min-width: 44px !important;

    flex: 0 0 44px !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    padding: 0 !important;

    border: 0 !important;

    border-radius: 11px !important;

    background: #f1f5f9 !important;

    color: #475569 !important;

    font-size: 19px !important;

    cursor: pointer !important;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease !important;
}


#followupModal .modal-close:hover,
#viewFollowupModal .modal-close:hover {

    background: #e2e8f0 !important;

    color: #0f172a !important;

    transform: rotate(3deg) !important;
}


/* ==========================================================
   EDIT / ADD FORM
========================================================== */

/*
   THIS IS THE IMPORTANT PART FOR THE EDIT SCROLLBAR.
*/

#followupModal #followupForm {

    flex: 1 1 auto !important;

    min-height: 0 !important;

    height: auto !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    margin: 0 !important;

    padding: 0 !important;
}


/* ==========================================================
   EDIT / ADD MODAL BODY
========================================================== */

#followupModal #followupForm .modal-body {

    flex: 1 1 auto !important;

    min-height: 0 !important;

    height: auto !important;

    width: 100% !important;

    display: block !important;

    overflow-y: auto !important;

    overflow-x: hidden !important;

    padding: 26px 30px !important;

    background: #ffffff !important;

    box-sizing: border-box !important;

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


/* ==========================================================
   VIEW MODAL BODY
========================================================== */

#viewFollowupModal #viewFollowupBody {

    flex: 1 1 auto !important;

    min-height: 0 !important;

    height: auto !important;

    width: 100% !important;

    display: block !important;

    overflow-y: auto !important;

    overflow-x: hidden !important;

    padding: 26px 28px 30px !important;

    background: #ffffff !important;

    box-sizing: border-box !important;

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


/* ==========================================================
   SCROLLBAR
========================================================== */

#followupModal #followupForm .modal-body::-webkit-scrollbar,
#viewFollowupModal #viewFollowupBody::-webkit-scrollbar {

    width: 9px !important;
}


#followupModal #followupForm .modal-body::-webkit-scrollbar-track,
#viewFollowupModal #viewFollowupBody::-webkit-scrollbar-track {

    background: #f1f5f9 !important;

    border-radius: 10px !important;
}


#followupModal #followupForm .modal-body::-webkit-scrollbar-thumb,
#viewFollowupModal #viewFollowupBody::-webkit-scrollbar-thumb {

    background: #94a3b8 !important;

    border-radius: 10px !important;

    border: 2px solid #f1f5f9 !important;
}


#followupModal #followupForm .modal-body::-webkit-scrollbar-thumb:hover,
#viewFollowupModal #viewFollowupBody::-webkit-scrollbar-thumb:hover {

    background: #64748b !important;
}


/* Firefox */

#followupModal #followupForm .modal-body,
#viewFollowupModal #viewFollowupBody {

    scrollbar-width: thin;

    scrollbar-color:
        #94a3b8
        #f1f5f9;
}


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

#followupModal .form-section-title {

    margin:
        0 0 18px !important;

    padding-bottom: 11px !important;

    border-bottom:
        1px solid #e5e7eb !important;

    color: #172033 !important;

    font-size: 17px !important;

    font-weight: 800 !important;
}


#followupModal .form-grid {

    width: 100% !important;

    min-width: 0 !important;

    box-sizing: border-box !important;
}


#followupModal .form-group {

    min-width: 0 !important;
}


#followupModal input,
#followupModal select,
#followupModal textarea {

    box-sizing: border-box !important;

    max-width: 100% !important;
}


#followupModal textarea {

    resize: vertical !important;

    min-height: 110px !important;
}


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

#followupModal .modal-footer,
#viewFollowupModal .modal-footer {

    flex: 0 0 auto !important;

    min-height: 76px !important;

    width: 100% !important;

    display: flex !important;

    align-items: center !important;

    justify-content: flex-end !important;

    gap: 10px !important;

    padding: 15px 28px !important;

    background: #ffffff !important;

    border-top: 1px solid #e5e7eb !important;

    box-sizing: border-box !important;
}


/* ==========================================================
   VIEW DETAILS
========================================================== */

#viewFollowupBody .view-details {

    width: 100% !important;

    max-width: 100% !important;

    box-sizing: border-box !important;
}


/* ==========================================================
   VIEW SECTIONS
========================================================== */

#viewFollowupBody .detail-section {

    width: 100% !important;

    margin: 0 0 25px !important;

    padding: 0 !important;

    box-sizing: border-box !important;
}


#viewFollowupBody .detail-section:last-child {

    margin-bottom: 0 !important;
}


/* ==========================================================
   VIEW SECTION TITLE
========================================================== */

#viewFollowupBody .detail-section h3 {

    display: flex !important;

    align-items: center !important;

    gap: 9px !important;

    margin: 0 0 11px !important;

    color: #172033 !important;

    font-size: 18px !important;

    line-height: 1.3 !important;

    font-weight: 800 !important;
}


#viewFollowupBody .detail-section h3 i {

    width: 27px !important;

    height: 27px !important;

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    border-radius: 7px !important;

    background: #eff6ff !important;

    color: #2563eb !important;

    font-size: 14px !important;
}


/* ==========================================================
   VIEW DETAIL GRID
========================================================== */

#viewFollowupBody .detail-grid {

    width: 100% !important;

    display: grid !important;

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

    gap: 12px !important;

    box-sizing: border-box !important;
}


/* ==========================================================
   VIEW DETAIL CARD
========================================================== */

#viewFollowupBody .detail-item {

    min-width: 0 !important;

    padding: 15px 16px !important;

    border:
        1px solid #dbe4ef !important;

    border-radius: 11px !important;

    background: #f8fafc !important;

    box-sizing: border-box !important;
}


#viewFollowupBody .detail-label {

    display: block !important;

    margin-bottom: 6px !important;

    color: #64748b !important;

    font-size: 12px !important;

    line-height: 1.3 !important;

    font-weight: 800 !important;

    text-transform: uppercase !important;

    letter-spacing: .35px !important;
}


#viewFollowupBody .detail-value {

    display: block !important;

    color: #1e293b !important;

    font-size: 15px !important;

    line-height: 1.45 !important;

    font-weight: 500 !important;

    overflow-wrap: anywhere !important;
}


/* ==========================================================
   NOTES / OUTCOME
========================================================== */

#viewFollowupBody .detail-text {

    width: 100% !important;

    min-height: 70px !important;

    padding: 15px 17px !important;

    border:
        1px solid #dbe4ef !important;

    border-radius: 11px !important;

    background: #f8fafc !important;

    color: #334155 !important;

    font-size: 14px !important;

    line-height: 1.65 !important;

    overflow-wrap: anywhere !important;

    box-sizing: border-box !important;
}


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

#viewFollowupBody .loading-state,
#viewFollowupBody .error-state {

    min-height: 260px !important;

    display: flex !important;

    flex-direction: column !important;

    align-items: center !important;

    justify-content: center !important;

    gap: 10px !important;

    color: #64748b !important;

    text-align: center !important;
}


#viewFollowupBody .loading-state i {

    font-size: 28px !important;

    color: #2563eb !important;
}


#viewFollowupBody .error-state i {

    font-size: 30px !important;

    color: #dc2626 !important;
}


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

@media (max-width: 768px) {

    #followupModal,
    #viewFollowupModal {

        padding: 10px !important;
    }


    #followupModal .modal-dialog,
    #viewFollowupModal .modal-dialog,
    #viewFollowupModal .view-dialog {

        width: 100% !important;

        max-width: 100% !important;

        height: 94vh !important;

        max-height: 94vh !important;

        border-radius: 14px !important;
    }


    #followupModal .modal-header,
    #viewFollowupModal .modal-header {

        min-height: 76px !important;

        padding:
            17px
            18px !important;
    }


    #followupModal .modal-header h2,
    #viewFollowupModal .modal-header h2 {

        font-size: 20px !important;
    }


    #followupModal .modal-header p,
    #viewFollowupModal .modal-header p {

        font-size: 12px !important;
    }


    #followupModal #followupForm .modal-body,
    #viewFollowupModal #viewFollowupBody {

        padding:
            20px 17px 24px !important;
    }


    #followupModal .modal-footer,
    #viewFollowupModal .modal-footer {

        padding:
            12px 17px !important;
    }


    #viewFollowupBody .detail-grid {

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


    #viewFollowupBody .detail-section h3 {

        font-size: 17px !important;
    }

}


/* ==========================================================
   VERY SMALL SCREEN
========================================================== */

@media (max-width: 480px) {

    #followupModal,
    #viewFollowupModal {

        padding: 0 !important;
    }


    #followupModal .modal-dialog,
    #viewFollowupModal .modal-dialog,
    #viewFollowupModal .view-dialog {

        width: 100% !important;

        height: 100dvh !important;

        max-height: 100dvh !important;

        border-radius: 0 !important;
    }

}

/* ==========================================================
   SEARCHABLE GUIDANCE CASE FIELD
========================================================== */

.case-search-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.case-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.case-search-help {
    display: block;
    margin-top: -2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

#guidanceCaseId option[hidden] {
    display: none;
}


/* Live case suggestions: display matching choices from the first typed letter. */
.case-search-results {
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    margin: 8px 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

.case-search-results[hidden] { display: none !important; }

.case-search-result {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    color: #1e293b;
    text-align: left;
    font: inherit;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.case-search-result:last-of-type { border-bottom: 0; }
.case-search-result:hover,
.case-search-result:focus {
    outline: none;
    background: #eff6ff;
    color: #1d4ed8;
}

.case-search-empty {
    padding: 12px 13px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}
