:root {
    --klt-ai-footer-height: 4.25rem;
}

.klt-help-page {
    display: grid;
    gap: 1.5rem;
}

.klt-help-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 0.5rem;
    background: #f7fbfc;
    border: 1px solid rgba(23, 162, 184, 0.12);
}

.klt-help-eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #0c5460;
}

.klt-help-hero h1 {
    margin-bottom: 0.75rem;
}

.klt-help-lead {
    max-width: 52rem;
    margin-bottom: 0;
    color: #4f5f68;
    font-size: 1.05rem;
}

.klt-help-badges {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem;
}

.klt-help-directory {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.1rem;
}

.klt-help-directory-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 7.25rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.klt-help-directory-card:hover,
.klt-help-directory-card:focus-visible {
    border-color: rgba(13, 110, 253, 0.55);
    color: inherit;
    box-shadow: 0 0.35rem 1rem rgba(13, 110, 253, 0.11);
}

.klt-help-directory-card strong {
    font-size: 0.98rem;
}

.klt-help-directory-card span {
    color: #58656d;
    font-size: 0.9rem;
    line-height: 1.35;
}

.klt-help-list {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.klt-help-list li + li {
    margin-top: 0.55rem;
}

.klt-help-flow {
    display: grid;
    gap: 1rem;
}

.klt-help-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.klt-help-step:first-child {
    padding-top: 0.25rem;
    border-top: 0;
}

.klt-help-step h3 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.klt-help-step p {
    margin-bottom: 0;
    color: #58656d;
}

.klt-help-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
}

.klt-help-table th {
    white-space: nowrap;
}

.klt-help-table td {
    min-width: 16rem;
}

.klt-help-compact-table td,
.klt-help-compact-table th {
    min-width: 11rem;
    vertical-align: top;
}

.klt-help-reference-grid,
.klt-help-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.klt-help-reference-grid > div,
.klt-help-code-grid > div {
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: #fff;
}

.klt-help-code {
    margin-bottom: 0;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    border-radius: 0.5rem;
    background: #111827;
    color: #f8fafc;
    font-size: 0.88rem;
    line-height: 1.5;
}

.klt-help-code code {
    color: inherit;
    white-space: pre-wrap;
}

.klt-help-note {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 0.5rem;
    background: #f5f8e8;
    border: 1px solid #dbe7aa;
    color: #42512c;
}

@media (max-width: 1199.98px) {
    .klt-help-directory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .klt-help-hero {
        flex-direction: column;
        padding: 1.5rem;
    }

    .klt-help-reference-grid,
    .klt-help-code-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .klt-help-directory {
        grid-template-columns: 1fr;
    }

    .klt-help-directory-card {
        min-height: auto;
    }
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    padding-bottom: var(--klt-ai-footer-height);
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

article.content > *,
article.content .card,
article.content .table-responsive {
    max-width: 100%;
    min-width: 0;
}

article.content .table-responsive {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.klt-icon-button {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    vertical-align: middle;
}

.klt-icon-button + .klt-icon-button {
    margin-left: 0.35rem;
}

.klt-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.klt-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
}

.klt-row-actions .klt-icon-button + .klt-icon-button {
    margin-left: 0;
}

.klt-icon {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.klt-sticky-save-bar,
.modal-content form > .modal-footer {
    position: sticky;
    bottom: var(--klt-ai-footer-height);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #d8dee9;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -0.5rem 1rem rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
}

.modal-content form > .modal-footer {
    bottom: 0;
}

.klt-sticky-save-status {
    margin-right: auto;
    color: #64748b;
    font-size: 0.875rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIge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SA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.klt-ph-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.klt-ph-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.6rem;
    background-color: #f8f9fa;
}

.klt-ph-subtitle {
    margin-bottom: 0;
    color: #6c757d;
}

.klt-ph-meta {
    display: flex;
    gap: 0.4rem;
}

.klt-ph-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: end;
}

.klt-ph-list {
    margin: 0;
    padding-left: 1.1rem;
}

.klt-ph-pill {
    display: inline-block;
    width: 100%;
    max-width: 6rem;
    height: 0.7rem;
    border-radius: 999px;
    background-color: #e9ecef;
}

.klt-clickable-row {
    cursor: pointer;
}

.klt-clickable-row:hover {
    background-color: rgba(13, 110, 253, 0.08);
}

.klt-drag-handle-cell {
    text-align: center;
}

.klt-drag-handle {
    display: inline-block;
    cursor: grab;
    user-select: none;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1;
}

.klt-drop-insert-after > td {
    border-bottom: 3px solid rgba(13, 110, 253, 0.75);
}

.klt-grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}

.klt-grid-search {
    flex: 1 1 18rem;
    min-width: 16rem;
}

.klt-grid-summary {
    color: #6c757d;
    font-size: 0.95rem;
}

.klt-grid-table {
    min-width: 100%;
}

.table-responsive > .klt-grid-table > thead > tr > :last-child,
.table-responsive > .klt-grid-table > tbody > tr > :last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: max-content;
    background-color: var(--bs-table-bg, var(--bs-body-bg));
    box-shadow: -0.45rem 0 0.65rem -0.65rem rgba(15, 23, 42, 0.65);
}

.table-responsive > .klt-grid-table > thead > tr > :last-child {
    z-index: 3;
}

.table-responsive > .klt-grid-table > tbody > tr > :last-child .klt-row-actions,
.table-responsive > .klt-grid-table > tbody > tr > :last-child.text-end {
    white-space: nowrap;
}

.klt-grid-sort {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.klt-grid-sort:hover {
    color: #0d6efd;
}

.klt-grid-sort-indicator {
    min-width: 2.75rem;
    color: #6c757d;
    font-size: 0.8rem;
    text-align: right;
}

.klt-grid-filter-row th {
    background-color: #f8f9fa;
    vertical-align: top;
}

.klt-grid-filter-row .form-control,
.klt-grid-filter-row .form-select {
    min-width: 8rem;
}
.klt-editable-image .klt-edit-image-button {
    opacity: 0;
    transition: opacity .15s ease-in-out;
}

.klt-editable-image:hover .klt-edit-image-button,
.klt-editable-image:focus-within .klt-edit-image-button {
    opacity: 1;
}

.klt-work-instruction-image-preview {
    background: #fff;
    max-width: 100%;
    object-fit: contain;
}

.klt-work-instruction-image-preview-bordered {
    border: 2px solid #444;
    padding: .25rem;
}

.klt-ppe-option {
    align-items: center;
    display: flex;
    min-height: 2rem;
}

.klt-ppe-symbol {
    height: 2rem;
    margin-right: .35rem;
    vertical-align: middle;
    width: 2rem;
}

.klt-operational-register-mobile-list {
    display: none;
}

.klt-sort-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.klt-sort-header:hover,
.klt-sort-header:focus-visible {
    color: #0d6efd;
    text-decoration: underline;
}

.klt-sort-header.is-active {
    color: #0d6efd;
}

.klt-sort-indicator {
    min-width: 0.75rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1;
}

.klt-operational-register-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid #d8dee9;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.05);
}

.klt-operational-register-card + .klt-operational-register-card {
    margin-top: 0.75rem;
}

.klt-operational-register-card h2 {
    margin: 0.1rem 0 0;
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.klt-operational-register-number {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.klt-operational-register-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    color: #475569;
    font-size: 0.875rem;
}

.klt-operational-register-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.klt-operational-register-card-actions .klt-icon-button + .klt-icon-button {
    margin-left: 0;
}

@media (max-width: 640.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    h2,
    .h2 {
        font-size: 1.2rem;
    }

    .content {
        padding-top: 0.85rem;
    }

    .container,
    .container-fluid,
    article.content {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .btn {
        white-space: normal;
    }

    .d-flex.gap-2,
    .d-flex.gap-3,
    .klt-grid-toolbar,
    .klt-ph-actions {
        min-width: 0;
    }

    .klt-grid-toolbar > *,
    .klt-ph-actions > * {
        flex: 1 1 100%;
    }

    .klt-grid-search {
        min-width: 0;
        flex-basis: 100%;
    }

    .klt-row-actions,
    .text-end .btn,
    td.text-end .btn {
        white-space: normal;
    }

    td.text-end {
        min-width: 8rem;
    }

    .table-responsive {
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
    }

    .table-responsive > .table {
        margin-bottom: 0;
        font-size: 0.875rem;
    }

    .table-responsive .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.78rem;
    }

    .modal {
        padding-right: 0 !important;
    }

    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    .modal-content {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer,
    .card-body,
    .card-header,
    .card-footer {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .modal-footer,
    .card-footer {
        gap: 0.5rem;
    }

    .klt-sticky-save-bar,
    .modal-content form > .modal-footer {
        align-items: stretch;
    }

    .klt-sticky-save-status {
        flex-basis: 100%;
    }

    .modal-footer .btn,
    .card-footer .btn {
        flex: 1 1 auto;
    }

    .klt-operational-register-table {
        display: none;
    }

    .klt-operational-register-mobile-list {
        display: grid;
    }
}
.klt-controlled-revision-snapshot {
    position: relative;
    overflow: hidden;
    min-height: 20rem;
}

.klt-controlled-revision-snapshot.is-superseded > :not(.klt-controlled-revision-watermark) {
    opacity: .72;
}

.klt-controlled-revision-watermark {
    position: absolute;
    z-index: 20;
    top: 35%;
    left: 2.5%;
    width: 95%;
    box-sizing: border-box;
    padding: .15em .1em;
    color: rgba(170, 0, 0, .18);
    border: .5rem solid rgba(170, 0, 0, .18);
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transform: rotate(-24deg);
    pointer-events: none;
}

.klt-controlled-document-editor {
    max-height: calc(100dvh - 2rem);
}

.klt-controlled-document-editor .modal-content {
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.klt-controlled-document-editor .modal-content > form,
.klt-controlled-document-editor form:has(> .modal-body) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.klt-controlled-document-editor .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.klt-controlled-document-actions {
    flex: 0 0 auto;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}
