body .modal .modal-header.c9-partner-modal-header {
    display: flex;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex: 0 0 auto;
    gap: 10px;
    min-height: 68px;
    padding: 9px 17px !important;
    border-bottom: 1px solid #007477;
    background: linear-gradient(90deg, #008689 0%, #65d6d7 100%) !important;
    color: #fff !important;
    text-align: left !important;
}

body .modal .c9-partner-modal-header::before,
body .modal .c9-partner-modal-header::after,
body .modal .c9-partner-modal-header .modal-title::before,
body .modal .c9-partner-modal-header .modal-title::after,
body .modal .c9-partner-modal-header .modal-title > .bi {
    display: none !important;
}

body .modal .c9-partner-modal-header__icon {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
    color: #fff;
    font-size: 23px;
    line-height: 1;
}

body .modal .c9-partner-modal-header__copy {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    text-align: left;
}

body .modal .c9-partner-modal-header .modal-title {
    display: block;
    margin: 0;
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.12;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

body .modal .c9-partner-modal-header__subtitle {
    margin: 3px 0 2px;
    color: rgba(255, 255, 255, .84);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

body .modal .c9-partner-modal-header .btn-close {
    box-sizing: border-box;
    flex: 0 0 51px;
    width: 51px;
    height: 51px;
    margin: 0 0 0 auto;
    padding: 8px;
    border-radius: 7px;
    background-color: rgba(255, 255, 255, .72);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='%23092b67' stroke-linecap='round' stroke-width='2' d='M2 2l12 12M14 2L2 14'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    filter: none !important;
    opacity: 1;
}

body .modal .c9-partner-modal-header .btn-close::before,
body .modal .c9-partner-modal-header .btn-close::after {
    display: none;
}

body .modal .c9-partner-modal-header .btn-close:hover {
    background-color: rgba(255, 255, 255, .9);
}

body .modal .c9-partner-modal-header .btn-close:focus-visible {
    outline: 2px solid #092b67;
    outline-offset: 2px;
}

/* The report editor has a long, scrollable form. Its header deliberately uses
   the same visual language, but takes less vertical space than a create form. */
body #editTaskModal .modal-header.c9-report-edit-modal-header {
    align-items: center !important;
    min-height: 54px;
    padding: 7px 14px !important;
}

body #editTaskModal .c9-report-edit-modal-header .c9-partner-modal-header__icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 19px;
}

body #editTaskModal .c9-report-edit-modal-header .modal-title {
    font-size: 19px !important;
    line-height: 1.1;
}

body #editTaskModal .c9-report-edit-modal-header .c9-partner-modal-header__subtitle {
    display: none;
}

body #editTaskModal .c9-report-edit-modal-header .btn-close {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
}

/* Compact read-only report summary: it should leave the edit workflow above
   the fold, even with a long site name or description. */
#editTaskModal .edit-report-base-summary {
    padding: .55rem .7rem !important;
}

#editTaskModal .edit-report-base-summary #editReportBaseDataTitle {
    font-size: .88rem;
}

#editTaskModal .edit-report-base-summary .small {
    margin-bottom: .05rem;
    font-size: .63rem;
    letter-spacing: .025em;
    line-height: 1.1;
}

#editTaskModal .edit-report-base-summary .fw-semibold:not(.small) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    font-size: .82rem;
    line-height: 1.2;
}

#editTaskModal .edit-report-base-summary #EditDescriptionDisplay {
    -webkit-line-clamp: 2;
}

/* Closed reports are deliberately presented as a single read-only ticket
   followed by its history, instead of a compressed edit form with a sidebar. */
#editTaskModal.is-closed-report #EditTaskMainColumn > .p-4 {
    padding: 1.25rem !important;
}

#editTaskModal.is-closed-report .edit-report-base-summary {
    padding: 1rem 1.1rem !important;
    border-color: rgba(25, 135, 84, .28) !important;
    background: linear-gradient(135deg, #f5fbf7, #f8fafc) !important;
    box-shadow: 0 .35rem .9rem rgba(15, 23, 42, .06);
}

#editTaskModal.is-closed-report .edit-report-base-summary .small {
    font-size: .68rem;
}

#editTaskModal.is-closed-report .edit-report-base-summary .fw-semibold:not(.small) {
    font-size: .94rem;
}

#editTaskModal.is-closed-report .edit-report-base-summary #EditDescriptionDisplay {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    white-space: pre-wrap;
}

#editTaskModal.is-closed-report .closed-report-history {
    overflow: hidden;
    border-color: rgba(25, 135, 84, .2) !important;
    box-shadow: 0 .35rem .9rem rgba(15, 23, 42, .06);
}

#editTaskModal.is-closed-report .closed-report-history > .p-4 {
    height: auto !important;
    min-height: 0;
    padding: 1rem !important;
}

#editTaskModal.is-closed-report #editHistoryList {
    overflow: visible !important;
    flex: none !important;
}

#editTaskModal.is-closed-report .closed-report-history {
    max-height: none !important;
}

#editTaskModal.is-closed-report .edit-report-base-summary .fw-semibold,
#editTaskModal #editHistoryList {
    overflow-wrap: anywhere;
}
