/*.page-shell {*/
/*    display: flex*/
/*}*/
.page-shell {
    display: flex;
    gap: 1rem;
}

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

/* content fills remaining space */
.content1 {
    flex: 1;
    overflow-y: auto;
    height: 80vh
}

@media (min-width: 768px) {
    .content1 {
        padding-left: 24px;
    }
}

@media (max-width: 767px) {
    .content1 {
        padding-left: 0;
    }
}


/* container */
.sidebar-inner {
    position: relative;
}

/* sticky filter */
.sidebar-filter {
    position: sticky;
    top: 0;
    background: #fff; /* prevents overlap */
    z-index: 5;
}

/* spacing */
.sidebar-list {
    padding: 5px;
}


/* sticky sidebar */
/*.sidebar {*/
/*    position: sticky;*/
/*    top: 20px; !* adjust to match header + nav height *!*/
/*    height: calc(100vh - 220px);*/
/*    overflow-y: auto;*/
/*    width: 300px;*/
/*    flex-shrink: 0;*/
/*    background: #fff;*/
/*}*/

.sidebar {
    background: #fff;
    overflow-y: auto;
}

/* Desktop behavior */
@media (min-width: 768px) {
    .sidebar {
        position: sticky;
        top: 20px;
        max-height: 80vh;
        width: 300px;
        flex-shrink: 0;
    }
}

/* Mobile behavior */
@media (max-width: 767px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
}

/* main content scrolls with page */
.content {
    flex: 1;
    padding: 24px;
}

.layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1rem;
}

.menu {
    border: 1px solid #ddd;
    border-radius: .5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-header {
    padding: .75rem .9rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    font-weight: 600;
}

.menu-search {
    padding: .5rem .9rem;
    border-bottom: 1px solid #f0f0f0;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    max-height: calc(100vh - 220px);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    border-bottom: 1px solid #f6f6f6;
    cursor: pointer;
}

.menu-item:hover {
    background: #f6f9ff;
}

.menu-item.active {
    background: #e9f2ff;
}

.menu-item .code {
    font-size: .78rem;
    color: #666;
}

.detail {
    border: 1px solid #ddd;
    border-radius: .5rem;
    padding: 1rem;
    background: #fff;
    min-height: 60vh;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .menu-list {
        max-height: none;
    }
}

.modal.fade {
    opacity: 0;
    transition: opacity .15s linear;
}

.modal.show {
    opacity: 1;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

    .status-dot.active {
        background-color: #198754;
    }

    .status-dot.inactive {
        background-color: #dc3545;
    }

.status-item {
    position: relative;
    padding-left: 14px;
    cursor: pointer;
}

.status-bar {
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
}

    .status-bar.active {
        background-color: #198754; /* green */
    }

    .status-bar.inactive {
        background-color: #dc3545; /* red */
    }

    .status-bar.empty {
        background-color: #adb5bd; /* gray */
    }

.category-list {
    max-height: 250px;
    overflow-y: auto;
}

.category-option {
    padding: 6px 10px;
    cursor: pointer;
}

    .category-option:hover {
        background: #f1f1f1;
    }

    .category-option.active {
        background: #0d6efd;
        color: white;
    }

.category-sidebar-banner {
    color: #16405f;
    background: #eef7fc;
}

.preference-switch {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 1.5rem;
    padding-left: 0;
}

.preference-switch .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}

.preference-switch .form-check-label {
    margin: 0;
}

.preference-experiment {
    padding: 1rem;
    border: 1px solid #b9d8f2;
    border-radius: 10px;
    background: #f2f8fe;
}

.training-feature-banner {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.25rem;
    padding: .9rem 1rem;
    border: 1px solid #8ac7a4;
    border-left: 4px solid #198754;
    border-radius: 10px;
    color: #184c32;
    background: linear-gradient(100deg, #d9f2e3 0%, #effbf3 100%);
}

.training-feature-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    color: #17663e;
    background: #c3e8d2;
    font-size: 1.25rem;
}

.training-feature-banner-yellow {
    border-color: #f0cf6b;
    border-left-color: #e0a800;
    color: #5c4300;
    background: linear-gradient(100deg, #fff1c2 0%, #fffaeb 100%);
}

.training-feature-banner-yellow .training-feature-banner-icon {
    color: #8a6200;
    background: #ffe28a;
}

.training-feature-banner-copy {
    flex: 1 1 auto;
    font-size: .9rem;
}

.category-page-shell {
    width: 100%;
}

.category-page-shell-with-sidebar {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.category-page-shell-sidebar-collapsed {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .75rem;
}

.category-content-panel {
    min-width: 0;
}

.category-sidebar-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(20, 39, 62, 0.08);
}

.category-sidebar-panel.collapsed {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    overflow: visible;
}

.category-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #e8eef4;
    background: #f8fafc;
}

.category-sidebar-search {
    padding: .65rem .75rem;
    border-bottom: 1px solid #e8eef4;
    background: #fff;
}

.category-sidebar-search .input-group-text {
    color: #607284;
    background: #f8fafc;
}

.category-sidebar-search-status {
    margin-top: .35rem;
    color: #6c757d;
    font-size: .78rem;
}

.category-sidebar-title {
    font-weight: 700;
    line-height: 1.2;
    color: #25364a;
}

.category-sidebar-subtitle {
    margin-top: .2rem;
    font-size: .82rem;
    color: #66788a;
}

.category-sidebar-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid #d3dde7;
    border-radius: 6px;
    color: #31516d;
    text-decoration: none;
    background: #fff;
}

.category-sidebar-home:hover,
.category-sidebar-home.active {
    color: #0d6efd;
    border-color: #9ec5fe;
    background: #edf5ff;
}

.category-sidebar-collapse,
.category-sidebar-rail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #d3dde7;
    border-radius: 6px;
    color: #31516d;
    background: #fff;
}

.category-sidebar-collapse:hover,
.category-sidebar-rail-button:hover {
    color: #0d6efd;
    border-color: #9ec5fe;
    background: #edf5ff;
}

.category-sidebar-rail-button {
    margin: .4rem 0;
}

.category-sidebar-list {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    padding: .45rem;
}

.category-sidebar-item {
    --category-sidebar-depth: 0;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    min-height: 38px;
    padding: .45rem .55rem .45rem calc(.55rem + (var(--category-sidebar-depth) * 1rem));
    border-radius: 6px;
    color: #2b3a4a;
    text-decoration: none;
}

.category-sidebar-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-sidebar-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.category-sidebar-result-name,
.category-sidebar-result-path {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-sidebar-result-path {
    margin-top: .15rem;
    color: #7a8a9a;
    font-size: .74rem;
    font-weight: 400;
}

.category-sidebar-item:hover {
    color: #0d6efd;
    background: #f1f7ff;
}

.category-sidebar-item.active {
    color: #0b4da2;
    background: #e8f2ff;
    font-weight: 700;
}

.category-sidebar-item.sop {
    font-size: .92rem;
    color: #43566b;
}

.category-sidebar-count {
    min-width: 1.5rem;
    padding: .1rem .35rem;
    border-radius: 999px;
    color: #607284;
    background: #eef2f6;
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
}

.category-sidebar-empty {
    padding: .75rem;
    color: #6c757d;
}

@media (max-width: 991.98px) {
    .category-page-shell-with-sidebar {
        grid-template-columns: 1fr;
    }

    .category-page-shell-sidebar-collapsed {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .category-sidebar-panel {
        position: static;
        max-height: none;
    }

    .category-sidebar-list {
        max-height: 45vh;
    }
}

html, body {
    height: 100%;
    overflow: auto;
}

@media (max-width: 767px) {

    html, body {
        overflow:auto;
    }
}

.card-img-top {
    height: 150px;
    object-fit: contain;
}

.card-image-container {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

    .card-image-container img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

.sop-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .sop-thumbnail:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    }

@media (max-width: 768px) {
    .sop-thumbnail {
        width: 100px;
        height: 100px;
    }
}

.image-caption {
    min-height: 28px;
}

.sop-document-shell {
    min-width: 0;
}

.sop-screen-header {
    margin-bottom: 1rem;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(27, 54, 85, 0.07);
}

.sop-screen-header > .card-body {
    padding: 1.35rem 1.5rem 1rem;
}

.sop-breadcrumb {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .8rem;
    color: #6c7d8f;
    font-size: .82rem;
}

.sop-breadcrumb a {
    color: #506579;
    text-decoration: none;
}

.sop-breadcrumb a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.sop-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.sop-heading-copy {
    min-width: 0;
}

.sop-document-label {
    color: #64788b;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.sop-screen-header h1 {
    margin: 0;
    color: #20364b;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.sop-heading-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .55rem;
    color: #6b7c8d;
    font-size: .88rem;
}

.sop-primary-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.sop-primary-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    white-space: nowrap;
}

.sop-action-menu {
    position: relative;
}

.sop-action-menu > summary {
    list-style: none;
    cursor: pointer;
}

.sop-action-menu > summary::-webkit-details-marker,
.sop-metadata-disclosure > summary::-webkit-details-marker {
    display: none;
}

.sop-action-menu-panel {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 215px;
    padding: .4rem;
    border: 1px solid #d9e2eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 45, 68, 0.16);
}

.sop-action-menu-panel button {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .58rem .65rem;
    border: 0;
    border-radius: 6px;
    color: #2f4356;
    background: transparent;
    text-align: left;
}

.sop-action-menu-panel button:hover,
.sop-action-menu-panel button:focus-visible {
    color: #0b58b0;
    background: #eef6ff;
    outline: none;
}

.sop-header-utilities {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.15rem;
    padding-top: .85rem;
    border-top: 1px solid #e7edf3;
}

.sop-metadata-disclosure {
    min-width: 0;
    flex: 1 1 auto;
}

.sop-metadata-disclosure > summary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #4c6378;
    font-size: .86rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.sop-metadata-disclosure > summary::after {
    content: "\F0140";
    font-family: "Material Design Icons";
    transition: transform .15s ease;
}

.sop-metadata-disclosure[open] > summary::after {
    transform: rotate(180deg);
}

.sop-screen-metadata {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: .8rem 1.25rem;
    margin: 1rem 0 .2rem;
}

.sop-screen-metadata dt {
    margin-bottom: .2rem;
    color: #718193;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sop-screen-metadata dd {
    margin: 0;
    color: #2c4053;
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.sop-view-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
}

.sop-view-controls > span {
    margin-right: .15rem;
    color: #718193;
    font-size: .78rem;
    font-weight: 600;
}

.sop-view-controls .btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.sop-edit-toolbar {
    position: sticky;
    top: .75rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .7rem .8rem;
    border: 1px solid #bad5f4;
    border-radius: 10px;
    background: rgba(245, 250, 255, .97);
    box-shadow: 0 8px 20px rgba(26, 68, 112, .1);
    backdrop-filter: blur(8px);
}

.sop-edit-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #49647c;
    font-size: .86rem;
    font-weight: 600;
}

.sop-edit-status.is-dirty {
    color: #9a5b05;
}

.sop-page-navigation {
    margin-bottom: 1rem;
    border-color: #dbe4ee;
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(27, 54, 85, .06);
}

.sop-page-navigation .card-body {
    padding: 1rem;
}

.sop-navigation-title {
    margin-bottom: .65rem;
    color: #263c50;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.sop-navigation-links {
    display: grid;
    gap: .2rem;
    max-height: min(48vh, 430px);
    overflow-y: auto;
    padding-right: .2rem;
}

.sop-navigation-link {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
    min-height: 34px;
    padding: .35rem .45rem;
    border: 0;
    border-radius: 6px;
    color: #43586c;
    background: transparent;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.sop-navigation-link:hover,
.sop-navigation-link:focus-visible {
    color: #0b58b0;
    background: #edf5ff;
    outline: none;
}

.sop-navigation-link > i {
    text-align: center;
}

.sop-navigation-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #476177;
    background: #edf1f5;
    font-size: .72rem;
    font-weight: 700;
}

.sop-navigation-link span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sop-back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .8rem;
    padding-top: .7rem;
    border-top: 1px solid #e7edf3;
    color: #526b81;
    font-size: .82rem;
    text-decoration: none;
}

.sop-back-link:hover {
    color: #0d6efd;
}

.sop-note-list {
    display: grid;
    gap: 1rem;
}

.sop-overview-scroll {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-right: .4rem;
    scrollbar-gutter: stable;
}

#sop-overview,
#sop-notes,
[id^="sop-step-"] {
    scroll-margin-top: 5.5rem;
}

@media (max-width: 1199.98px) {
    .sop-screen-metadata {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .sop-heading-row,
    .sop-header-utilities {
        flex-direction: column;
    }

    .sop-primary-actions {
        justify-content: flex-start;
    }

    .sop-page-navigation {
        position: static;
    }

    .sop-overview-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .sop-navigation-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 260px;
    }
}

@media (max-width: 575.98px) {
    .sop-screen-header > .card-body {
        padding: 1rem;
    }

    .sop-primary-actions,
    .sop-primary-actions > .btn,
    .sop-primary-actions > .sop-action-menu,
    .sop-primary-actions > .sop-action-menu > summary {
        width: 100%;
    }

    .sop-action-menu-panel {
        right: auto;
        left: 0;
        width: 100%;
    }

    .sop-view-controls {
        flex-wrap: wrap;
    }

    .sop-screen-metadata,
    .sop-navigation-links {
        grid-template-columns: 1fr;
    }

    .sop-edit-toolbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .training-feature-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .training-feature-banner .btn {
        width: 100%;
    }
}

.markdown-body {
    max-width: 100%;
    overflow-x: auto;
}

.markdown-body table,
.tiptap-host .tiptap table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.markdown-body th,
.markdown-body td,
.tiptap-host .tiptap th,
.tiptap-host .tiptap td {
    min-width: 1.5rem;
    padding: .5rem;
    border: 1px solid var(--vz-border-color, #dee2e6);
    vertical-align: top;
}

.markdown-body th,
.tiptap-host .tiptap th {
    font-weight: 600;
    background: var(--vz-tertiary-bg, #f8f9fa);
}

.tiptap ul[data-type="taskList"] {
    list-style: none;
    padding-left: 0;
}

.tiptap ul[data-type="taskList"] li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}

.tiptap ul[data-type="taskList"] li > label {
    flex: 0 0 auto;
    margin-top: .25rem;
}

.tiptap ul[data-type="taskList"] li > div {
    flex: 1 1 auto;
    min-width: 0;
}

.tiptap ul[data-type="taskList"] ul[data-type="taskList"] {
    margin-left: 1.5rem;
}

.markdown-body .task-list-item {
    list-style: none;
}

.markdown-body .task-list-item input[type="checkbox"] {
    margin-right: .5rem;
}

.tiptap img,
.markdown-body img {
    max-width: 100%;
    height: auto;
}

.tiptap th,
.tiptap td {
    position: relative;
}

.tiptap .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--vz-primary, #0d6efd);
    pointer-events: none;
}

.tiptap.resize-cursor,
.tiptap.resize-cursor * {
    cursor: col-resize !important;
}

.sop-print-header,
.sop-print-footer {
    display: none;
}

@media print {
    @page {
        size: auto;
        margin: 14mm 13mm 16mm;
    }

    html:has(.sop-print-layout),
    body:has(.sop-print-layout) {
        height: auto !important;
        overflow: visible !important;
    }

    body:has(.sop-print-layout) {
        color: #17222d;
        background: #fff !important;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10pt;
        line-height: 1.45;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sop-print-layout .sop-overview-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    body:has(.sop-print-layout) .navbar-header,
    body:has(.sop-print-layout) #layout-wrapper > nav,
    body:has(.sop-print-layout) .category-sidebar-banner,
    body:has(.sop-print-layout) .toast-container,
    body:has(.sop-print-layout) .rz-dialog-wrapper,
    body:has(.sop-print-layout) .modal,
    body:has(.sop-print-layout) .modal-backdrop,
    body:has(.sop-print-layout) #components-reconnect-modal,
    .sop-print-layout .category-sidebar-panel,
    .sop-print-layout .sop-summary-card,
    .sop-print-layout .sop-screen-header,
    .sop-print-layout .sop-edit-toolbar,
    .sop-print-layout .sop-page-navigation,
    .sop-print-layout .card-footer,
    .sop-print-layout .btn,
    .sop-print-layout .tooltip,
    .sop-print-layout .alert-border-left {
        display: none !important;
    }

    body:has(.sop-print-layout) #layout-wrapper {
        min-height: 0 !important;
    }

    body:has(.sop-print-layout) #layout-wrapper > .container-fluid,
    body:has(.sop-print-layout) .page-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 !important;
    }

    .sop-print-layout,
    .sop-print-layout.category-page-shell-with-sidebar,
    .sop-print-layout.category-page-shell-sidebar-collapsed {
        display: block;
        width: 100%;
    }

    .sop-print-layout .category-content-panel {
        width: 100%;
    }

    .sop-print-header {
        display: block;
        margin: 0 0 8mm;
        padding: 0 0 6mm;
        border-bottom: 2px solid #315f88;
    }

    .sop-print-brand {
        display: flex;
        align-items: center;
        gap: 3mm;
        margin-bottom: 5mm;
        color: #315f88;
    }

    .sop-print-brand img {
        width: 9mm;
        height: 9mm;
        object-fit: contain;
    }

    .sop-print-brand-name {
        font-size: 12pt;
        font-weight: 700;
        letter-spacing: .08em;
    }

    .sop-print-document-type {
        color: #5e6b77;
        font-size: 8pt;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sop-print-header h1 {
        margin: 0 0 5mm;
        color: #162b3d;
        font-size: 24pt;
        font-weight: 700;
        line-height: 1.15;
    }

    .sop-print-metadata {
        display: grid;
        grid-template-columns: .7fr 1.2fr 1.2fr .55fr;
        gap: 3mm 7mm;
        margin: 0;
    }

    .sop-print-metadata > div {
        min-width: 0;
    }

    .sop-print-metadata dt {
        margin: 0 0 1mm;
        color: #667481;
        font-size: 7.5pt;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sop-print-metadata dd {
        margin: 0;
        color: #17222d;
        font-size: 9.5pt;
        font-weight: 600;
        overflow-wrap: anywhere;
    }

    .sop-print-content-row,
    .sop-steps-list {
        display: block !important;
        margin: 0 !important;
    }

    .sop-overview-column,
    .sop-steps-column,
    .sop-step-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .sop-overview-column,
    .sop-steps-column {
        flex: none !important;
    }

    .sop-step-card {
        margin: 0 0 5mm;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .sop-steps-list {
        counter-reset: sop-print-step;
    }

    .sop-steps-list .sop-step-step {
        counter-increment: sop-print-step;
    }

    .sop-print-layout .card {
        height: auto !important;
        margin: 0;
        border: 1px solid #cbd5df;
        border-left: 3px solid #467aa6;
        border-radius: 3px;
        background: #fff !important;
        box-shadow: none !important;
    }

    .sop-print-layout .sop-step-description .card {
        border-left-color: #27869a;
        background: #f3fafb !important;
    }

    .sop-print-layout .sop-step-note .card {
        border-left-color: #d28a21;
        background: #fff9ed !important;
    }

    .sop-print-layout .card-body {
        padding: 4mm 4.5mm;
    }

    .sop-print-layout .card-title {
        margin: 0 0 3mm;
        color: #1e3447;
        font-size: 12pt;
        font-weight: 700;
        line-height: 1.3;
    }

    .sop-steps-list .sop-step-step .card-title::before,
    .sop-overview-column .sop-step-description .card-title::before,
    .sop-overview-column .sop-step-note .card-title::before {
        display: block;
        margin-bottom: 1mm;
        color: #52708a;
        font-size: 7.5pt;
        font-weight: 700;
        letter-spacing: .08em;
    }

    .sop-steps-list .sop-step-step .card-title::before {
        content: "STEP " counter(sop-print-step);
    }

    .sop-overview-column .sop-step-description .card-title::before {
        content: "OVERVIEW";
    }

    .sop-overview-column .sop-step-note .card-title::before {
        content: "NOTE";
        color: #9b651c;
    }

    .sop-print-layout .markdown-body > :first-child {
        margin-top: 0;
    }

    .sop-print-layout .markdown-body > :last-child {
        margin-bottom: 0;
    }

    .sop-print-layout .markdown-body h1,
    .sop-print-layout .markdown-body h2,
    .sop-print-layout .markdown-body h3,
    .sop-print-layout .markdown-body h4,
    .sop-print-layout .markdown-body h5,
    .sop-print-layout .markdown-body h6 {
        break-after: avoid-page;
        page-break-after: avoid;
    }

    .sop-print-layout .markdown-body p,
    .sop-print-layout .markdown-body li {
        orphans: 3;
        widows: 3;
    }

    .sop-print-layout .markdown-body table {
        width: 100%;
        border-collapse: collapse;
    }

    .sop-print-layout .markdown-body th,
    .sop-print-layout .markdown-body td {
        padding: 2mm;
        border: 1px solid #bfc9d3;
    }

    .sop-print-layout .markdown-body pre,
    .sop-print-layout .markdown-body code {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .sop-print-layout a {
        color: inherit !important;
        text-decoration: none !important;
    }

    .sop-print-layout img {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .sop-print-layout .sop-thumbnail {
        width: auto !important;
        height: auto !important;
        max-width: 46mm;
        max-height: 58mm;
        border: 1px solid #cbd5df;
        object-fit: contain;
    }

    .sop-print-layout .sop-big-image {
        width: auto;
        max-width: 100%;
        max-height: 95mm;
        border: 1px solid #cbd5df;
        object-fit: contain;
    }

    .sop-print-layout .text-muted {
        color: #56636f !important;
    }

    .sop-print-footer {
        display: flex;
        justify-content: space-between;
        gap: 8mm;
        margin-top: 7mm;
        padding-top: 3mm;
        border-top: 1px solid #cbd5df;
        color: #687580;
        font-size: 7.5pt;
    }

    .sop-print-footer span:last-child {
        text-align: right;
    }
}

.draggable {
    cursor: grab;
}

    .draggable:active {
        cursor: grabbing;
    }
