:root {
    /* UX-1: LogicHub EAM brand (logo navy + orange). Orange marks and highlights; navy carries primary actions,
       because white text on orange is below 4.5:1. */
    --lh-accent: #FF5A0A;
    --lh-accent-dark: #c2410c;
    --lh-accent-soft: rgba(255, 90, 10, 0.16);
    --lh-accent-on-dark: #ff8a4c;
    --lh-navy: #05213a;
    --lh-navy-hover: #0b3354;
    --lh-sidebar-bg: #05213a;
    --lh-sidebar-bg-alt: #0b3354;
    --lh-body-bg: #f6f7f9;
    --lh-surface: #ffffff;
    --lh-surface-soft: #f8fafc;
    --lh-border: #e2e8f0;
    --lh-border-strong: #cbd5e1;
    --lh-text: #1e293b;
    --lh-text-muted: #64748b;
    --lh-text-soft: #94a3b8;
    --lh-shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.06);
    --lh-shadow-md: 0 14px 36px rgba(15, 23, 42, 0.08);
    --lh-sidebar-width: 264px;
    --lh-sidebar-collapsed-width: 92px;
    --lh-topbar-height: 76px;
    --lh-radius-lg: 22px;
    --lh-radius-md: 18px;
    --lh-radius-sm: 12px;
    --lh-transition: 220ms ease;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--lh-body-bg);
    color: var(--lh-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

a {
    color: inherit;
}

.lh-app-shell {
    min-height: 100vh;
}

.lh-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--lh-transition), visibility var(--lh-transition);
    z-index: 1035;
}

.lh-shell-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--lh-sidebar-width);
    height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 107, 0, 0.18), transparent 26%),
        linear-gradient(180deg, #171a1e 0%, #111315 100%);
    color: #fff;
    z-index: 1040;
    box-shadow: 14px 0 40px rgba(15, 23, 42, 0.18);
    transition: width var(--lh-transition), transform var(--lh-transition);
}

.lh-sidebar-inner {
    height: 100%;
    padding: 1.35rem 1rem 1rem;
    overflow-y: auto;
}

.lh-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.2rem 0.45rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lh-sidebar-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    flex: 0 0 auto;
}

.lh-sidebar-brand-mark img {
    display: block;
    width: 34px;
    height: 34px;
}

/* BRAND-1: "LogicHub EAM" wordmark, EAM in the brand orange. */
.lh-sidebar-title-accent {
    color: var(--lh-accent);
    letter-spacing: 0.04em;
}

.lh-sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lh-sidebar-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.56);
    margin-top: 0.15rem;
}

.lh-sidebar-user {
    margin: 1rem 0 0.5rem;
    padding: 0.95rem 0.95rem 1rem;
    border-radius: var(--lh-radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lh-sidebar-user-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.lh-sidebar-user-name {
    font-size: 0.98rem;
    font-weight: 700;
}

.lh-sidebar-user-role {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.lh-sidebar-nav {
    margin-top: 0.4rem;
}

.lh-sidebar-section {
    padding: 1rem 0.7rem 0.45rem;
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.lh-sidebar-section-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.lh-sidebar-section-toggle:hover,
.lh-sidebar-section-toggle:focus-visible {
    color: rgba(255, 255, 255, 0.78);
}

.lh-sidebar-section-toggle .bi {
    transition: transform 0.15s ease;
}

.lh-sidebar-section-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

.lh-nav-group[hidden] {
    display: none;
}

/* The narrow (icon) sidebar has no section titles to click, so every group stays visible there. */
body.lh-sidebar-collapsed .lh-nav-group[hidden] {
    display: block;
}

.lh-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.78rem 0.9rem;
    margin: 0.16rem 0.15rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-weight: 600;
    transition: background-color var(--lh-transition), color var(--lh-transition), transform var(--lh-transition);
}

.lh-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateX(1px);
}

.lh-nav-link.active {
    background: rgba(255, 107, 0, 0.14);
    color: var(--lh-accent);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.18);
}

.lh-nav-link-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    flex: 0 0 auto;
}

.lh-nav-link.active .lh-nav-link-dot {
    background: var(--lh-accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.14);
}

/* BUG-13: menu item icons (alone in the narrow sidebar, with a native tooltip from the link title). */
.lh-nav-link-icon {
    width: 1.25rem;
    flex: 0 0 auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--lh-transition);
}

.lh-nav-link:hover .lh-nav-link-icon {
    color: #fff;
}

.lh-nav-link.active .lh-nav-link-icon {
    color: var(--lh-accent);
}

.lh-sidebar-guest-alert {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--lh-radius-md);
}

.lh-sidebar-footer {
    padding: 1rem 0.2rem 0.1rem;
}

.lh-shell-main {
    min-height: 100vh;
    margin-left: var(--lh-sidebar-width);
    transition: margin-left var(--lh-transition);
}

.lh-topbar {
    position: sticky;
    top: 0;
    z-index: 1025;
    height: var(--lh-topbar-height);
    padding: 1rem 1.4rem 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.lh-topbar-left,
.lh-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lh-topbar-title-wrap {
    min-width: 0;
}

.lh-topbar-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lh-text-soft);
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.lh-topbar-title {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--lh-text);
}

.lh-language-form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
}

.lh-topbar-select {
    min-width: 132px;
}

.lh-user-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 999px;
    border: 1px solid var(--lh-border);
    box-shadow: var(--lh-shadow-sm);
}

.lh-user-chip-name {
    font-weight: 700;
    color: var(--lh-text);
    line-height: 1.1;
}

.lh-user-chip-role {
    color: var(--lh-text-muted);
    font-size: 0.78rem;
    line-height: 1.1;
}

.lh-shell-content {
    padding: 1.6rem;
}

.lh-alert {
    border-radius: var(--lh-radius-sm);
    box-shadow: var(--lh-shadow-sm);
    border: none;
}

.lh-page-header,
.lh-card,
.lh-filter-panel,
.lh-data-card,
.lh-kpi-card,
.card,
.modal-content,
.accordion-item {
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius-lg);
    background: var(--lh-surface);
    box-shadow: var(--lh-shadow-sm);
}

.lh-card,
.lh-filter-panel,
.lh-data-card,
.lh-kpi-card {
    padding: 1.35rem;
}

.lh-page-header {
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.25rem;
}

.lh-filter-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.lh-kpi-card {
    position: relative;
    overflow: hidden;
}

.lh-kpi-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--lh-accent);
}

.lh-empty-state {
    border: 1px dashed var(--lh-border-strong);
    border-radius: var(--lh-radius-md);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--lh-text-muted);
}

.lh-status-pill,
.badge,
.rounded-pill.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lh-severity-warning {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.lh-severity-critical {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.lh-btn-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--lh-border);
    color: var(--lh-text);
    box-shadow: var(--lh-shadow-sm);
}

.lh-btn-icon:hover,
.lh-btn-icon:focus {
    background: var(--lh-accent);
    border-color: var(--lh-accent);
    color: #fff;
}

.lh-btn-outline-light {
    border-radius: 14px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 700;
}

.lh-btn-outline-light:hover,
.lh-btn-outline-light:focus {
    background: rgba(255, 107, 0, 0.14);
    border-color: rgba(255, 107, 0, 0.4);
    color: #fff;
}

.btn-primary {
    --bs-btn-bg: var(--lh-accent);
    --bs-btn-border-color: var(--lh-accent);
    --bs-btn-hover-bg: var(--lh-accent-dark);
    --bs-btn-hover-border-color: var(--lh-accent-dark);
    --bs-btn-active-bg: var(--lh-accent-dark);
    --bs-btn-active-border-color: var(--lh-accent-dark);
    --bs-btn-disabled-bg: var(--lh-accent);
    --bs-btn-disabled-border-color: var(--lh-accent);
}

.btn-outline-primary {
    --bs-btn-color: var(--lh-accent);
    --bs-btn-border-color: rgba(255, 107, 0, 0.35);
    --bs-btn-hover-bg: var(--lh-accent);
    --bs-btn-hover-border-color: var(--lh-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--lh-accent);
    --bs-btn-active-border-color: var(--lh-accent);
}

.btn-outline-secondary,
.btn-light,
.btn-outline-light {
    box-shadow: none;
}

.btn,
.form-control,
.form-select,
.input-group-text,
.page-link {
    border-radius: 12px;
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--lh-border);
    min-height: 42px;
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.page-link:focus,
.form-check-input:focus {
    border-color: rgba(255, 107, 0, 0.45);
    box-shadow: 0 0 0 0.22rem rgba(255, 107, 0, 0.14);
}

.form-label {
    font-weight: 600;
    color: var(--lh-text);
}

.text-muted {
    color: var(--lh-text-muted) !important;
}

.table-responsive,
.dataTables_wrapper {
    width: 100%;
}

.lh-table,
table.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #edf2f7;
    margin-bottom: 0;
}

table.table thead th {
    background: #f8fafc;
    color: var(--lh-text-muted);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
    padding: 1rem 1rem;
    white-space: nowrap;
}

table.table tbody td {
    padding: 1rem 1rem;
    vertical-align: middle;
}

table.table tbody tr:hover {
    --bs-table-accent-bg: rgba(255, 107, 0, 0.04);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: var(--lh-text-muted);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    margin-left: 0.4rem;
    border: 1px solid var(--lh-border);
    border-radius: 12px;
    min-height: 38px;
    padding: 0.4rem 0.8rem;
    background: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0 !important;
    margin-left: 0.35rem !important;
    border: none !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button .page-link {
    border-radius: 12px;
    border-color: var(--lh-border);
    color: var(--lh-text);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current .page-link,
.page-item.active .page-link {
    background: var(--lh-accent);
    border-color: var(--lh-accent);
    color: #fff;
}

.dataTables_wrapper .dataTables_info {
    color: var(--lh-text-muted);
    padding-top: 1rem;
}

.navbar,
.border-bottom {
    border-color: var(--lh-border) !important;
}

.nav-tabs {
    border-bottom-color: var(--lh-border);
}

.nav-tabs .nav-link {
    color: var(--lh-text-muted);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    color: var(--lh-accent);
    border-color: transparent transparent var(--lh-accent) transparent;
    background: transparent;
}

.modal-content {
    overflow: hidden;
}

.accordion-button:not(.collapsed) {
    color: var(--lh-accent);
    background: #fff7ed;
}

.accordion-button:focus {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.14);
}

.list-group-item {
    border-color: #edf2f7;
}

body.lh-sidebar-collapsed .lh-shell-main {
    margin-left: var(--lh-sidebar-collapsed-width);
}

body.lh-sidebar-collapsed .lh-shell-sidebar {
    width: var(--lh-sidebar-collapsed-width);
}

body.lh-sidebar-collapsed .lh-sidebar-brand-copy,
body.lh-sidebar-collapsed .lh-sidebar-user,
body.lh-sidebar-collapsed .lh-sidebar-section,
body.lh-sidebar-collapsed .lh-nav-link span:last-child,
body.lh-sidebar-collapsed .lh-sidebar-footer {
    display: none;
}

body.lh-sidebar-collapsed .lh-sidebar-brand {
    justify-content: center;
}

body.lh-sidebar-collapsed .lh-nav-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.lh-sidebar-collapsed .lh-nav-link-dot {
    width: 10px;
    height: 10px;
}

body.lh-sidebar-collapsed .lh-nav-link-icon {
    font-size: 1.2rem;
}

/* Section titles are hidden in the narrow sidebar: a divider keeps the groups apart. */
body.lh-sidebar-collapsed .lh-nav-group + .lh-sidebar-section + .lh-nav-group,
body.lh-sidebar-collapsed .lh-nav-group + .lh-sidebar-section-toggle + .lh-nav-group {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 991.98px) {
    .lh-shell-sidebar {
        transform: translateX(-100%);
        width: min(86vw, 290px);
    }

    .lh-shell-main {
        margin-left: 0;
    }

    .lh-topbar {
        height: auto;
        min-height: var(--lh-topbar-height);
        padding: 1rem;
        flex-wrap: wrap;
    }

    .lh-topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    body.lh-sidebar-open .lh-shell-sidebar {
        transform: translateX(0);
    }

    body.lh-sidebar-open .lh-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 767.98px) {
    .lh-shell-content {
        padding: 1rem;
    }

    .lh-language-form {
        width: 100%;
        justify-content: space-between;
    }

    .lh-topbar-select {
        min-width: 112px;
        max-width: 168px;
    }

    .lh-user-chip {
        padding: 0.6rem 0.85rem;
    }

    .lh-topbar-title {
        font-size: 1.15rem;
    }
}

/* ---------------------------------------------------------------------------------------------------------------
   UX-1 (approved prototype, 19.11.2026): navy sidebar, one top bar (search, report failure, profile menu),
   navy primary buttons, request badge. Only looks change here: every element keeps its classes and behaviour.
   --------------------------------------------------------------------------------------------------------------- */
.lh-shell-sidebar {
    background: var(--lh-navy);
    box-shadow: none;
}

.lh-sidebar-brand-mark {
    box-shadow: none;
}

.lh-sidebar-title-accent {
    color: var(--lh-accent-on-dark);
}

.lh-sidebar-section {
    color: #8fa1b5;
}

.lh-nav-link {
    color: #c7d2de;
    font-weight: 500;
    padding: 0.62rem 0.8rem;
    border-radius: 10px;
}

.lh-nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: none;
    box-shadow: none;
}

.lh-nav-link.active {
    background: var(--lh-accent-soft);
    color: #fff;
    font-weight: 600;
    box-shadow: none;
}

.lh-nav-link.active .lh-nav-link-icon {
    color: var(--lh-accent-on-dark);
}

.lh-nav-badge {
    margin-left: auto;
    min-width: 1.5rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--lh-accent);
    color: #1a0a00;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

body.lh-sidebar-collapsed .lh-nav-link {
    position: relative;
}

body.lh-sidebar-collapsed .lh-nav-link span.lh-nav-badge {
    display: block;
    position: absolute;
    top: 2px;
    right: 14px;
    min-width: 1.1rem;
    padding: 0 0.3rem;
    font-size: 0.65rem;
}

.lh-topbar {
    background: #fff;
    backdrop-filter: none;
    border-bottom: 1px solid var(--lh-border);
}

.lh-topbar-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lh-topbar-right {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.lh-topbar-search {
    flex: 0 1 420px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    height: 42px;
    margin: 0 auto 0 1rem;
    padding: 0 0.6rem 0 0.85rem;
    border: 1px solid var(--lh-border);
    border-radius: 12px;
    background: var(--lh-body-bg);
    color: var(--lh-text-muted);
}

.lh-topbar-search:focus-within {
    border-color: var(--lh-navy);
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(5, 33, 58, 0.12);
}

.lh-topbar-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--lh-text);
    font: inherit;
    font-size: 0.92rem;
    outline: none;
}

.lh-topbar-search-key {
    font-size: 0.7rem;
    color: var(--lh-text-muted);
    background: #fff;
    border: 1px solid var(--lh-border-strong);
    border-radius: 6px;
    padding: 0.05rem 0.35rem;
}

.lh-topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 42px;
    white-space: nowrap;
    font-weight: 600;
}

.lh-profile-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 44px;
    padding: 0 0.6rem 0 0.25rem;
    border: 1px solid var(--lh-border);
    border-radius: 12px;
    background: #fff;
    color: var(--lh-text);
    text-align: left;
}

.lh-profile-toggle:hover,
.lh-profile-toggle[aria-expanded="true"] {
    border-color: var(--lh-border-strong);
    background: var(--lh-surface-soft);
}

.lh-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--lh-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.lh-profile-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.lh-profile-menu {
    min-width: 260px;
    padding: 0.4rem;
    border: 1px solid var(--lh-border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(5, 33, 58, 0.18);
}

.lh-profile-menu-head {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.7rem 0.7rem;
    border-bottom: 1px solid var(--lh-border);
    font-size: 0.9rem;
}

.lh-profile-menu-head span {
    color: var(--lh-text-muted);
    font-size: 0.8rem;
}

.lh-profile-menu .lh-language-form {
    padding: 0.6rem 0.7rem;
    justify-content: space-between;
    border-bottom: 1px solid var(--lh-border);
}

.lh-profile-logout .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    color: #b91c1c;
    font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: var(--lh-navy);
    --bs-btn-border-color: var(--lh-navy);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--lh-navy-hover);
    --bs-btn-hover-border-color: var(--lh-navy-hover);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--lh-navy-hover);
    --bs-btn-active-border-color: var(--lh-navy-hover);
    --bs-btn-disabled-bg: var(--lh-navy);
    --bs-btn-disabled-border-color: var(--lh-navy);
}

.btn-outline-primary {
    --bs-btn-color: var(--lh-navy);
    --bs-btn-border-color: rgba(5, 33, 58, 0.35);
    --bs-btn-hover-bg: var(--lh-navy);
    --bs-btn-hover-border-color: var(--lh-navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--lh-navy);
    --bs-btn-active-border-color: var(--lh-navy);
    --bs-btn-active-color: #fff;
}

.lh-btn-icon:hover,
.lh-btn-icon:focus {
    background: var(--lh-navy);
    border-color: var(--lh-navy);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--lh-navy);
    border-color: var(--lh-navy);
}

/* Global search results (/ui/search) */
.lh-search-page {
    max-width: 960px;
}

.lh-search-page-form {
    display: flex;
    gap: 0.6rem;
}

.lh-search-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 1rem;
}

.lh-search-group {
    background: #fff;
    border: 1px solid var(--lh-border);
    border-radius: 16px;
    padding: 0.9rem 1rem;
}

.lh-search-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.lh-search-hit {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    text-decoration: none;
}

.lh-search-hit:hover {
    background: var(--lh-surface-soft);
}

.lh-search-hit-code {
    font-weight: 600;
    color: var(--lh-navy);
    white-space: nowrap;
}

.lh-search-hit-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lh-search-hit-detail {
    grid-column: 2;
    font-size: 0.82rem;
    color: var(--lh-text-muted);
}

.lh-search-empty {
    padding: 1rem;
    border: 1px dashed var(--lh-border-strong);
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 1199.98px) {
    .lh-topbar-search-key,
    .lh-profile-copy {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .lh-topbar-right {
        justify-content: flex-end;
    }

    .lh-topbar-search {
        flex: 1 1 100%;
        order: 10;
        margin: 0;
    }
}

@media (max-width: 575.98px) {
    .lh-topbar-cta span {
        display: none;
    }

    .lh-search-page-form {
        flex-direction: column;
    }
}

/* UX-1 sign-in page (_AuthLayout) */
.lh-auth-body {
    background: var(--lh-body-bg);
}

.lh-auth {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
}

.lh-auth-brand {
    flex: 1 1 480px;
    min-width: 0;
    background: var(--lh-navy);
    color: #fff;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
}

.lh-auth-logo,
.lh-auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lh-auth-logo-accent {
    color: var(--lh-accent-on-dark);
}

.lh-auth-pitch {
    max-width: 480px;
}

.lh-auth-pitch h1 {
    font-size: 2.4rem;
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.lh-auth-pitch p {
    color: #c7d2de;
    font-size: 1.05rem;
    line-height: 1.6;
}

.lh-auth-pitch ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    gap: 0.75rem;
    color: #e2e8f0;
}

.lh-auth-pitch li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.75rem;
    border-radius: 999px;
    background: var(--lh-accent);
    vertical-align: middle;
}

.lh-auth-foot {
    font-size: 0.82rem;
    color: #94a3b8;
}

.lh-auth-form-wrap {
    flex: 1 1 480px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.lh-auth-form {
    width: 100%;
    max-width: 420px;
}

.lh-auth-mobile-logo {
    display: none;
    color: var(--lh-navy);
    margin-bottom: 2rem;
}

.lh-auth-mobile-logo .lh-auth-logo-accent {
    color: var(--lh-accent-dark);
}

.lh-auth-tenant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--lh-border);
    border-radius: 12px;
    background: #fff;
}

.lh-auth-tenant-label {
    display: block;
    font-size: 0.75rem;
    color: var(--lh-text-muted);
}

.lh-auth-password {
    position: relative;
}

.lh-auth-password .form-control {
    padding-right: 3.2rem;
}

.lh-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--lh-text-muted);
    border-radius: 10px;
}

.lh-auth-password-toggle:hover {
    color: var(--lh-navy);
    background: var(--lh-surface-soft);
}

@media (max-width: 767.98px) {
    .lh-auth-brand {
        display: none;
    }

    .lh-auth-mobile-logo {
        display: flex;
    }

    .lh-auth-form-wrap {
        align-items: flex-start;
        padding-top: 2.5rem;
    }
}

/* UX-1: the page never scrolls sideways; a wide table scrolls inside its own box. */
.lh-shell-main,
.lh-shell-content {
    min-width: 0;
}

.dataTables_wrapper .dt-row > .col-sm-12,
.lh-shell-content .table-responsive {
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center;
    }
}

/* UX-1 phase 3: list view tabs, status pills, priority dots, relative due dates, clickable rows. */
.lh-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0 0 1rem;
    border-bottom: 1px solid var(--lh-border);
}

.lh-view-tab {
    height: 42px;
    padding: 0 0.9rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--lh-text-muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.lh-view-tab:hover {
    color: var(--lh-text);
}

.lh-view-tab[aria-selected="true"] {
    color: var(--lh-text);
    font-weight: 600;
    border-bottom-color: var(--lh-accent);
}

.lh-view-count {
    margin-left: 0.25rem;
    color: var(--lh-text-muted);
    font-weight: 500;
}

.lh-view-count.is-alert:not(:empty) {
    color: #b91c1c;
    font-weight: 700;
}

.lh-status-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background: #eef1f4;
    color: #334155;
}

.lh-status-open { background: #e0e7ef; color: #05213a; }
.lh-status-assigned { background: #e0e7ef; color: #05213a; }
.lh-status-progress { background: #dbeafe; color: #1e3a8a; }
.lh-status-waiting { background: #ffedd5; color: #7c2d12; }
.lh-status-awaiting { background: #dcfce7; color: #14532d; }
.lh-status-closed { background: #f1f5f9; color: #475569; }
.lh-status-cancelled { background: #f1f5f9; color: #64748b; text-decoration: line-through; }

.lh-priority {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.lh-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8;
}

.lh-priority-critical .lh-priority-dot { background: #b91c1c; }
.lh-priority-high .lh-priority-dot { background: #c2410c; }
.lh-priority-medium .lh-priority-dot { background: #64748b; }
.lh-priority-low .lh-priority-dot { background: #94a3b8; }

.lh-due.is-overdue { color: #b91c1c; font-weight: 600; }
.lh-due.is-today { color: #c2410c; font-weight: 600; }

.lh-wo-no {
    color: var(--lh-navy);
    font-weight: 600;
    white-space: nowrap;
}

tr.lh-row-link {
    cursor: pointer;
}

/* UX-1 phase 3: work order summary header and workflow steps. */
.lh-wo-header {
    background: #fff;
    border: 1px solid var(--lh-border);
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    display: grid;
    gap: 1rem;
}

.lh-wo-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.lh-wo-header-title {
    margin: 0.45rem 0 0.2rem;
    font-size: 1.4rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.lh-wo-header-sub {
    color: var(--lh-text-muted);
    font-size: 0.9rem;
}

.lh-wo-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    font-size: 0.82rem;
}

.lh-wo-step {
    display: grid;
    gap: 0.35rem;
    color: var(--lh-text-muted);
    min-width: 0;
    overflow-wrap: anywhere;
}

.lh-wo-step-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--lh-border);
}

.lh-wo-step.is-done { color: var(--lh-text); font-weight: 600; }
.lh-wo-step.is-done .lh-wo-step-bar { background: var(--lh-navy); }
.lh-wo-step.is-current { color: var(--lh-text); font-weight: 700; }
.lh-wo-step.is-current .lh-wo-step-bar { background: var(--lh-accent); }

.lh-wo-cancelled {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .lh-wo-steps {
        grid-template-columns: 1fr;
    }
}

/* UX-1 phase 3: one title per page. A page with its own header (kicker, title, description, actions) shows that
   header as a plain page title and the top bar drops its duplicate; pages without one keep the top-bar title. */
.lh-shell-main:has(.lh-shell-content .lh-page-header) .lh-topbar-title-wrap {
    display: none;
}

.lh-page-header {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.25rem 0 0;
    margin-bottom: 1.1rem;
}

.lh-page-header h1,
.lh-page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--lh-text);
}

.lh-page-header .text-uppercase.small {
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.25rem !important;
}

/* QR-1 printable labels (A4). Small: 3 x 8 = 24 labels of 70 x 37 mm; large: 2 x 4 = 8 labels of 105 x 74 mm. */
.lh-labels-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--lh-border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.lh-labels-toolbar-copy {
    display: flex;
    flex-direction: column;
    margin-right: auto;
    line-height: 1.2;
}

.lh-labels-toolbar-copy span {
    font-size: 0.85rem;
    color: var(--lh-text-muted);
}

.lh-labels-hint,
.lh-labels-empty {
    max-width: 210mm;
    margin: 1rem auto;
    padding: 0 1rem;
    color: var(--lh-text-muted);
}

.lh-labels-empty {
    padding: 1.25rem;
    border: 1px dashed var(--lh-border-strong);
    border-radius: 12px;
    background: #fff;
}

.lh-labels-sheet {
    width: 210mm;
    max-width: 100%;
    margin: 0 auto 2rem;
    background: #fff;
    display: grid;
    box-sizing: border-box;
    padding: 0;
}

.lh-labels-small { grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37.125mm; }
.lh-labels-large { grid-template-columns: repeat(2, 105mm); grid-auto-rows: 74.25mm; }

.lh-label {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 2.5mm;
    padding: 2.5mm 3mm;
    border: 0.2mm dashed #cbd5e1;
    overflow: hidden;
    color: #000;
    page-break-inside: avoid;
    break-inside: avoid;
}

.lh-label-qr { flex: 0 0 auto; line-height: 0; }
.lh-label-qr svg { display: block; width: 100%; height: 100%; }
.lh-labels-small .lh-label-qr { width: 30mm; height: 30mm; }
.lh-labels-large .lh-label-qr { width: 56mm; height: 56mm; }

.lh-label-copy { min-width: 0; display: flex; flex-direction: column; gap: 0.6mm; }
.lh-label-brand { font-size: 6pt; font-weight: 700; letter-spacing: 0.06em; color: #05213a; }
.lh-label-brand span { color: #c2410c; }
.lh-label-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 9pt; overflow-wrap: anywhere; }
.lh-label-title { font-size: 7.5pt; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lh-label-line { font-size: 6.5pt; color: #333; overflow-wrap: anywhere; }
.lh-labels-large .lh-label-brand { font-size: 8pt; }
.lh-labels-large .lh-label-code { font-size: 13pt; }
.lh-labels-large .lh-label-title { font-size: 10pt; }
.lh-labels-large .lh-label-line { font-size: 9pt; }

@media print {
    @page { size: A4; margin: 0; }
    body { background: #fff !important; }
    .lh-labels-toolbar,
    .lh-labels-hint { display: none !important; }
    .lh-labels-sheet { margin: 0; width: 210mm; }
    .lh-label { border-color: #e5e7eb; }
}

@media screen and (max-width: 800px) {
    .lh-labels-sheet { transform-origin: top left; }
    .lh-labels-small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 70mm), 1fr)); }
    .lh-labels-large { grid-template-columns: minmax(0, 1fr); }
    .lh-labels-large .lh-label-qr { width: 40mm; height: 40mm; }
}
