/* Grid command column: let action buttons flow inline and wrap to multiple
   rows of multiple buttons each, instead of one button per row.
   The cell MUST stay a table-cell — giving it `display: flex` takes it out of
   the table formatting context, so the browser wraps it in an anonymous cell:
   the row's bottom border stops at the Actions column (broken divider lines)
   and the buttons top-align instead of matching the row. Spacing between
   buttons therefore comes from margins, not `gap`. */
.k-grid td.k-command-cell {
    white-space: normal;
    vertical-align: middle;
    text-align: right;
    line-height: 1;
}

/* Uniform 36px height for every action button (text or icon-only) so the
   row reads as one toolbar instead of a mix of sizes. The descendant
   selector + !important is needed because Telerik can wrap buttons in
   .k-grid-actions-wrapper and applies its own height via CSS variables. */
.k-grid td.k-command-cell .k-button,
.k-grid td.k-command-cell > .k-button {
    margin: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Inline-flow spacing for the standard Actions cell, replacing the `gap: 4px`
   that only worked while the cell was a flex box. The SDS Library grid is
   excluded — it sets its own `display: flex` + `gap` and sizes buttons by
   percentage, so extra margins there would break its two-row layout. */
.k-grid:not(.sds-list-grid) td.k-command-cell .k-button {
    margin: 2px 0 !important;
}

/* The theme gives buttons `padding-inline: 1.5rem` (24px a side), which in a
   320px Actions column wastes ~48px per button and forces an extra wrapped
   row. 12px keeps the label readable and fits the same buttons per line the
   old flex layout did. Icon-only buttons keep their own square padding. */
.k-grid:not(.sds-list-grid) td.k-command-cell .k-button:not(.k-icon-button) {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Horizontal space only BETWEEN siblings — a blanket `margin-left` would also
   indent the first button, making every line 4px wider and wrapping a button
   that used to fit. The second selector covers buttons that share a wrapper
   element (component-rendered actions), which `> * + *` can't reach. */
.k-grid:not(.sds-list-grid) td.k-command-cell > * + *,
.k-grid:not(.sds-list-grid) td.k-command-cell .k-button + .k-button {
    margin-left: 4px !important;
}

/* Telerik renders the SVG icon inside .k-button-icon — keep it vertically
   centered in the 36px button regardless of the icon glyph's intrinsic size. */
.k-grid td.k-command-cell .k-button .k-button-icon,
.k-grid td.k-command-cell .k-button .k-icon,
.k-grid td.k-command-cell .k-button .k-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* SDS Risk Ratings column: three small outlined boxes (H / S / E), styled
   like SDS Manager — thick severity-colored border, white interior, bold
   severity-colored text. Combined letter+number ("H3"). */
.sds-risk-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sds-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.sds-risk-0 {
    border-color: #adb5bd;
    color: #6c757d;
}

.sds-risk-1 {
    border-color: #28a745;
    color: #1e7e34;
}

.sds-risk-2 {
    border-color: #84c441;
    color: #5a8f29;
}

.sds-risk-3 {
    border-color: #f4c724;
    color: #8a6d00;
}

.sds-risk-4 {
    border-color: #f17828;
    color: #b95208;
}

.sds-risk-5 {
    border-color: #d9362e;
    color: #b21f17;
}

/* GHS Signal Word pill — "Danger" (red) or "Warning" (orange). Thick colored
   border, white interior, bold colored text. */
.sds-signal-word {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border: 2px solid;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.sds-signal-danger {
    border-color: #d9362e;
    color: #d9362e;
}

.sds-signal-warning {
    border-color: #f17828;
    color: #f17828;
}

/* SDS section command buttons in the Actions column: icon-only, compact,
   PNG image (first aid / firefighting / accidental release) + an Eye icon
   for opening the PDF in a new tab. */
.sds-section-cmd.k-button {
    padding: 2px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* SDS Actions column layout: two equal-height rows that share the cell width.
   Row 1 = View / Edit / Delete (Telerik command buttons appear as direct
   children of the flex cell — each gets ~33% width).
   Row 2 = Eye + 3 SDS section icons (wrapped in .sds-actions-row-2 with
   flex-basis 100%, forcing the line break in the parent flex layout). */
.sds-list-grid td.k-command-cell {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    align-content: flex-start;
    padding: 6px 8px;
}

.sds-list-grid td.k-command-cell > .k-button {
    flex: 1 1 calc(33.33% - 4px);
    min-width: 0;
    margin: 0;
}

.sds-list-grid td.k-command-cell > .sds-actions-row-2 {
    flex: 0 0 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 2px;
}

.sds-list-grid td.k-command-cell > .sds-actions-row-2 > .sds-section-cmd.k-button {
    flex: 1 1 calc(25% - 4px);
    width: auto !important;
    min-width: 0 !important;
}

.sds-section-cmd.k-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* SDS / Products list empty-state — shows a single "Add Product / Web Lookup"
   CTA that opens the SDS add form on the Web Lookup tab (the lookup flow
   auto-creates the product along the way). */
.sds-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
}

.sds-empty-state p {
    margin: 0;
    color: #6c757d;
}

.no-data-message .k-button {
    margin-top: 8px;
}

/* SDS Manager list grids (SDS / Products / Manufacturers / Chemicals) can carry
   very long cell values — e.g. a Product Code that is a long semicolon-separated
   list, or a hazard/precautionary statement. Clamp each data cell to a few lines
   with an ellipsis so one row can't stretch the whole grid; the full value is
   shown on hover (title) and on the View/Edit screens. Capped width keeps the
   column from growing huge to fit a single long token. */
.sds-clamp-cell {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 360px;
    word-break: break-word;
}

.sds-section-cmd.k-button[disabled],
.sds-section-cmd.k-button.k-disabled {
    opacity: 0.45;
    background: transparent;
}

.sds-section-cmd.k-button img {
    width: 26px;
    height: 26px;
    display: block;
    object-fit: contain;
}

.sds-section-cmd.k-button .k-svg-icon,
.sds-section-cmd.k-button .k-icon {
    width: 22px;
    height: 22px;
    font-size: 22px;
    margin: 0;
}

/* SDS Library page only: enlarge the section-icon buttons for the read-only, browse-focused view
   (the feedback asked for bigger icons there). The management "Safety Data Sheets" page keeps the
   original smaller icons above. Scoped via the .sds-library-page wrapper on SdsLibrary.razor. */
.sds-library-page .sds-section-cmd.k-button {
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
}

.sds-library-page .sds-list-grid td.k-command-cell > .sds-actions-row-2 > .sds-section-cmd.k-button {
    flex: 1 1 calc(20% - 4px);
}

.sds-library-page .sds-section-cmd.k-button img {
    width: 34px;
    height: 34px;
}

.sds-library-page .sds-section-cmd.k-button .k-svg-icon,
.sds-library-page .sds-section-cmd.k-button .k-icon {
    width: 30px;
    height: 30px;
    font-size: 30px;
}

/* Near-miss row indicator on the Work Observations list grid.
   Renders a yellow warning triangle next to the row's other action buttons
   to flag near-miss observations at a glance. */
.near-miss-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    background: #fff8e1;
    border: 1px solid #f5b400;
    color: #8a6d00;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
}

.near-miss-indicator .k-svg-icon {
    color: #f5b400;
}

.near-miss-indicator-text {
    white-space: nowrap;
}

/* Date/DateTime/Time picker popup: fixed at bottom of viewport
   (CSS-only) so it's always visible and scrollable;
   horizontal position stays default (aligned to input) */
.k-animation-container:has(.k-datetimepicker-popup),
.k-animation-container:has(.k-datepicker-popup),
.k-animation-container:has(.k-timepicker-popup) {
    position: fixed !important;
    top: auto !important;
    bottom: 16px !important;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    z-index: 10010;
}

:root {
    --kendo-dialog-titlebar-border: #b7b6b6;
    --kendo-dialog-titlebar-bg: #e8e8e8d4;
    --kendo-dialog-content-bg: #e8e8e8d4;
}

html, body, * {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.text-h3 {
    font-size: 32px
}

.text-lg {
    font-size: 18px;
}

.text-md {
    font-size: 16px;
}

.text-sm {
    font-size: 14px;
}

.text-xsm {
    font-size: 12px;
}

.text-xxsm {
    font-size: 10px;
}

.fw-600 {
    font-weight: 600;
}

.fw-500 {
    font-weight: 500;
}

.k-button{
    width:fit-content !important;
}

a, .btn-link {
    color: var(--kendo-color-primary);
}

.btn-primary {
    color: var(--kendo-color-primary);
    background-color: var(--kendo-color-app-surface);
    border-color: var(--kendo-color-primary);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--kendo-color-app-surface, white), 0 0 0 0.25rem var(--kendo-color-primary, #258cfb);
}

.content {
    padding-top: 1.1rem;
}
@media (max-width: 1024px) {
    .content {
        padding-top: 0rem !important;
    }
    .px-4 {
        padding-right: 0rem !important;
        padding-left: 0rem !important;
    }
    .mt-3 {
        padding: 0rem !important;
    }
    .p-2 {
        padding: 0rem !important;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e51680;
}

.validation-message {
    color: #e51680;
}

#blazor-error-ui {
    background: linear-gradient(to bottom, #fee, #fdd);
    border-top: 2px solid #dc3545;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(220, 53, 69, 0.2);
    display: none;
    left: 0;
    position: fixed;
    width: 100%;
    z-index: 10000;
}

.blazor-error-ui {
    padding: 0.875rem 1.5rem;
}

.error-ui-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.error-ui-icon {
    flex-shrink: 0;
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.error-ui-icon svg {
    width: 24px;
    height: 24px;
}

.error-ui-message {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.error-ui-message strong {
    color: #c82333;
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.error-ui-message span {
    color: #a71e2a;
    font-size: 0.875rem;
    opacity: 0.9;
    white-space: nowrap;
}

.error-ui-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

#blazor-error-ui .reload {
    background-color: #dc3545;
    border: 1px solid #c82333;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

#blazor-error-ui .reload:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
}

#blazor-error-ui .reload:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.2);
}

#blazor-error-ui .reload:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

#blazor-error-ui .dismiss {
    background: transparent;
    border: 1px solid transparent;
    color: #a71e2a;
    cursor: pointer;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#blazor-error-ui .dismiss:hover {
    background-color: rgba(167, 30, 42, 0.1);
    border-color: rgba(167, 30, 42, 0.2);
    color: #c82333;
}

#blazor-error-ui .dismiss:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .blazor-error-ui {
        padding: 0.75rem 1rem;
    }

    .error-ui-content {
        gap: 0.75rem;
    }

    .error-ui-message {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .error-ui-message strong,
    .error-ui-message span {
        white-space: normal;
    }

    .error-ui-actions {
        gap: 0.5rem;
    }

    #blazor-error-ui .reload {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
        color: var(--kendo-color-primary);
    }
}
    
/* left side navigation */
.nav-link .active {
    color: var(--kendo-color-primary);
}

.nav-link {
    color: var(--kendo-color-primary);
    border-color: transparent;
}

button .nav-link {
    color: var(--kendo-color-primary);
    border-color: transparent;
}
    
.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    color: var(--kendo-color-primary);
}

    .nav-item a {
        color: var(--kendo-color-primary);
    }

        .nav-item a.active {
            color: var(--kendo-color-primary);
        }


    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

.bi {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;  
    top: -1px;
    background-size: cover;
}

.icon-size {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}

.bi-person-badge-nav-menu {
    color: var(--kendo-color-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' class='bi bi-person-badge' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0z'/%3E%3Cpath d='M4.5 0A2.5 2.5 0 0 0 2 2.5V14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2.5A2.5 2.5 0 0 0 11.5 0h-7zM3 2.5A1.5 1.5 0 0 1 4.5 1h7A1.5 1.5 0 0 1 13 2.5v10.795a4.2 4.2 0 0 0-.776-.492C11.392 12.387 10.063 12 8 12s-3.392.387-4.224.803a4.2 4.2 0 0 0-.776.492V2.5z'/%3E%3C/svg%3E");
}

.bi-arrow-bar-left-nav-menu {
    color: var(--kendo-color-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' class='bi bi-arrow-bar-left' viewBox='0 0 16 16'%3E%3Cpath d='M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5ZM10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5Z'/%3E%3C/svg%3E");
}

.k-dialog-titlebar {
    background: var(--kendo-dialog-titlebar-bg);
    border-bottom: 1px solid var(--kendo-dialog-titlebar-border) !important;
}

.k-window-content.k-dialog-content {
    background: var(--kendo-color-surface-alt);
}

.map-summary-window {
    max-height: 70vh;
}

.map-summary-window .k-window-content {
    width: auto;
    min-width: 0;
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .gm-style-iw.gm-style-iw-c {
        max-width: 230px !important;
    }
    
    .bm-wrap {
        height: 400px !important;
        width: 100% !important;
    }
    
    .bm-wrap #map {
        height: 400px !important;
        width: 100% !important;
    }
}

.grid-min-width .k-table {
    min-width: 150px;
}


.card-body-scrollable {
    overflow-y: auto;
    flex-grow: 1;
    padding: 15px;
}

.badge.severity-red {
    background-color: var(--bs-red);
    color: white;
}

.badge.severity-orange {
    background-color: var(--bs-orange);
    color: white;
}

.badge.severity-yellow {
    background-color: var(--bs-yellow);
    color: white;
}

.badge.severity-info {
    background-color: var(--bs-info);
    color: white;
}

.badge.severity-secondary {
    background-color: var(--bs-secondary);
    color: white;
}



.list-card-item {
    border: 1px solid var(--kendo-color-border, #dee2e6);
    border-radius: 8px;
    padding: 1rem;
    background: var(--kendo-color-surface, #ffffff);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Allow the card to shrink to its grid track. Without this, a no-wrap subtitle
       (e.g. a long Work Observation name) forces the card's min-content width wide,
       overflowing the row. min-width:0 lets the subtitle ellipsize as intended. */
    min-width: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

    .list-card-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    .list-card-item.selected {
        border-color: var(--kendo-color-primary, #0078d4);
        box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
    }

.card-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 1rem;
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--kendo-color-on-app-surface, #323130);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
    color: var(--kendo-color-subtle, #605e5c);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--kendo-color-subtle, #605e5c);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-field-value {
    font-size: 0.875rem;
    color: var(--kendo-color-on-app-surface, #323130);
    word-break: break-word;
}

.card-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--kendo-color-border, #edebe9);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .list-card-item {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-subtitle {
        font-size: 0.8rem;
    }

    .card-field-label {
        font-size: 0.7rem;
    }

    .card-field-value {
        font-size: 0.8rem;
    }
}

.list-card-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-toolbar {
    background: var(--kendo-color-surface, #ffffff);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--kendo-color-border, #dee2e6);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

@media (max-width: 767px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1440px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.no-data-message {
    text-align: center;
    padding: 3rem;
    color: var(--kendo-color-subtle, #605e5c);
}

.not-authorized-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 200px;
}

.not-authorized-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    border-radius: 8px;
    background-color: var(--kendo-color-app-surface);
    border: 1px solid var(--kendo-color-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.not-authorized-icon {
    margin-bottom: 1rem;
}

    .not-authorized-icon i {
        font-size: 3rem;
        color: var(--kendo-color-warning);
    }

.not-authorized-message h5 {
    margin-bottom: 0.5rem;
    color: var(--kendo-color-primary);
    font-weight: 600;
}

.not-authorized-message p {
    margin-bottom: 0.5rem;
    color: var(--kendo-color-text);
}

.custom-message {
    font-style: italic;
    color: var(--kendo-color-text-secondary);
    font-size: 0.9rem;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────
   Thin, always-visible scrollbar. The thumb sits flush against the
   container edge because there are no borders or padding – the 6 px
   gutter IS the thumb width.
   ─────────────────────────────────────────────────────────────────── */

/* Webkit / Blink  (Chrome, Edge, Safari, Opera) ─────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.18);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.40);
}

::-webkit-scrollbar-thumb:active {
    background-color: rgba(0, 0, 0, 0.55);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox  ──────────────────────────────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.customized-loader-container.k-loader-container {
    position: fixed;
}

/* Main page loader - full viewport overlay for initial page load */
.main-page-loader.k-loader-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--kendo-color-app-surface, rgba(255, 255, 255, 0.95));
    z-index: 1000;
}

.main-page-loader .k-loader-container-inner,
.main-page-loader .k-loader-container-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Ensure nested tile loaders don't get the fixed positioning */
.k-tilelayout .k-loader-container {
    position: relative;
    min-height: 200px;
}

/* Scrollbar styling handled by the VS-Style block above */

/*.k-date-tab {
    display: flex;
    flex-wrap: wrap;
}
.k-datetime-buttongroup {
    order: 1;
    padding: 0.75rem;
    flex: 0 0 50%;
}
.k-datetime-selector {
    order: 3;
}
.k-actions {
    order: 2;
    padding: 0.75rem;
    flex: 0 0 50%;
}*/

/* Grid actions column: children that are components (Map / Near Misses /
   Add Voyage wrappers) render as divs — make them inline so they flow on the
   same line as the command buttons instead of forcing a break. Right-alignment
   and the cell's table-cell display are set at the top of this file. */
.k-grid td.k-command-cell > * {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    vertical-align: middle;
    gap: 4px;
}

/* Grid filter icon: hidden until column header is hovered */
.k-grid .k-cell-inner > .k-link {
    flex: 1 1 0%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-grid .k-cell-inner > :not(.k-link):not(.k-sort-icon):not(.k-sort-order) {
    opacity: 0;
    pointer-events: none;
    flex: 0 0 0px !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-width: 0 !important;
    overflow: hidden !important;
    transition: opacity 0.15s ease;
}

.k-grid .k-grid-header th:hover .k-cell-inner > :not(.k-link):not(.k-sort-icon):not(.k-sort-order),
.k-grid .k-grid-header th:focus-within .k-cell-inner > :not(.k-link):not(.k-sort-icon):not(.k-sort-order),
.k-grid .k-cell-inner > .k-active {
    opacity: 1;
    pointer-events: auto;
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: auto !important;
    padding: calc(var(--kendo-spacing-1, 0.25rem)) !important;
    overflow: visible !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Guide Page — global styles (used inside TelerikTabStrip content,
   which lives outside Blazor CSS isolation scope)
   ═══════════════════════════════════════════════════════════════════ */

.guide-section-content {
    padding: 24px 32px 48px;
    overflow-x: hidden;
}

.guide-body h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--kendo-color-border, #dee2e6);
    scroll-margin-top: 16px;
}

.guide-body h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 28px 0 12px;
    scroll-margin-top: 16px;
}

.guide-body h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 8px;
}

.guide-body p {
    margin: 0 0 12px;
    line-height: 1.65;
    font-size: 16px;
}

.guide-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 16px;
}

.guide-body table th {
    background: var(--kendo-color-surface, #f8f9fa);
    text-align: left;
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid var(--kendo-color-border, #dee2e6);
}

.guide-body table td {
    padding: 8px 12px;
    border: 1px solid var(--kendo-color-border, #dee2e6);
    vertical-align: top;
}

.guide-body table tr:nth-child(even) {
    background: var(--kendo-color-surface-alt, #fafbfc);
}

.guide-body .guide-tip,
.guide-body .guide-note,
.guide-body .guide-warning {
    padding: 12px 16px;
    margin: 12px 0 20px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
}

.guide-body .guide-tip {
    border-left: 4px solid #2e7d32;
}

.guide-body .guide-note {
    border-left: 4px solid #1565c0;
}

.guide-body .guide-warning {
    border-left: 4px solid #ef6c00;
}

.guide-body code {
    background: var(--kendo-color-surface, #f8f9fa);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 15px;
}

.guide-body pre {
    background: var(--kendo-color-surface, #f5f5f5);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.5;
    margin: 12px 0 20px;
}

.guide-body ul,
.guide-body ol {
    padding-left: 24px;
    margin: 8px 0 16px;
}

.guide-body li {
    margin-bottom: 4px;
    line-height: 1.6;
    font-size: 16px;
}

.guide-body img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--kendo-color-border, #dee2e6);
    border-radius: 6px;
    margin: 12px 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.guide-body .screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--kendo-color-surface, #f8f9fa);
    border: 2px dashed var(--kendo-color-border, #dee2e6);
    border-radius: 6px;
    margin: 12px 0 20px;
    color: var(--kendo-color-subtle, #6c757d);
    font-size: 13px;
    font-style: italic;
}

.guide-body .lifecycle-diagram {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 16px 0 24px;
}

.lifecycle-diagram .status-box {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    background: var(--kendo-color-surface, #e3e8ee);
}

.lifecycle-diagram .status-arrow {
    font-size: 18px;
    color: var(--kendo-color-subtle, #6c757d);
}

.guide-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--kendo-color-border, #dee2e6);
    font-size: 13px;
    color: var(--kendo-color-subtle, #6c757d);
}

/*
 * Print frame — fixed off-screen so the browser ALWAYS has the full layout
 * pre-computed (display:none prevents layout, causing partial print output).
 * opacity:0 + pointer-events:none make it invisible and non-interactive on screen.
 * In @media print it becomes position:static so the browser paginates the full
 * content height correctly across multiple pages.
 */
#guide-print-frame {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

@media print {
    /* When a guide print frame exists, hide everything else on the page.
       The :has() selector scopes this so non-guide pages print normally. */
    body:has(#guide-print-frame) * { visibility: hidden; }

    /* ...except the print frame and all its descendants */
    #guide-print-frame,
    #guide-print-frame * { visibility: visible; }

    /* position:static puts the frame in normal flow so multi-page content
       is paginated correctly — absolute/fixed elements don't drive page count */
    #guide-print-frame {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: auto !important;
        padding: 36px 52px;
        background: #fff;
        color: #212529;
        font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 16px;
        line-height: 1.6;
    }

    .guide-print-page-title {
        font-size: 26px;
        font-weight: 700;
        border-bottom: 2px solid #dee2e6;
        padding-bottom: 12px;
        margin-bottom: 32px;
    }

    .guide-print-section-heading {
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #dee2e6;
        page-break-before: always;
    }

    .guide-print-section-heading:first-child {
        page-break-before: avoid;
    }

    /* Sections excluded from the current print job */
    .guide-print-exclude { display: none !important; }

    .guide-body h2 { page-break-after: avoid; }
    .guide-body table { page-break-inside: avoid; }
    .guide-section-content { padding: 0 !important; }
}

/* ─── Print Support ─── */
@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; color: #212529 !important; }

    /* Bootstrap legacy (keep for any remaining pages) */
    .card { border: 1px solid #dee2e6 !important; background: #fff !important; color: #212529 !important; }
    .card-header { background: #f8f9fa !important; color: #212529 !important; }
    .badge { border: 1px solid #999 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .table { color: #212529 !important; }
    .table thead th { background: #f8f9fa !important; color: #212529 !important; }
    .progress { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .progress-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .alert { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

    /* Telerik components */
    .k-card { border: 1px solid #dee2e6 !important; background: #fff !important; color: #212529 !important; box-shadow: none !important; }
    .k-card-header { background: #f8f9fa !important; color: #212529 !important; }
    .k-card-body { color: #212529 !important; }
    .k-badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; border: 1px solid #999 !important; }
    .k-grid { color: #212529 !important; overflow: visible !important; }
    .k-grid .k-table { color: #212529 !important; }
    .k-grid .k-grid-header { background: #f8f9fa !important; }
    .k-grid .k-grid-header th { background: #f8f9fa !important; color: #212529 !important; border-color: #dee2e6 !important; }
    .k-grid .k-table-row td { color: #212529 !important; border-color: #dee2e6 !important; }
    .k-grid .k-pager { display: none !important; }
    .k-grid .k-grid-content { overflow: visible !important; max-height: none !important; height: auto !important; }
    .k-progressbar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .k-progressbar .k-selected { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .k-loader { display: none !important; }

    /* Hide navigation chrome */
    .k-drawer { display: none !important; }
    .k-appbar { display: none !important; }
}
