/* =========================================================
   Root variables + global overflow
========================================================= */
:root {
    --sidebar-width: 205px;
    --footer-height: 5px;
    overflow-x: hidden;
    overflow-y: hidden;
    /* Sidebar palette */
    --sb-bg: #FFFFFF;
    --sb-surface: rgba(255, 255, 255, 0.65);
    --sb-border: rgba(204, 204, 206, 1);
    --sb-text: #1F2937;
    --sb-muted: #64748B;
    --sb-hover-bg: #EAF6E6;
    --sb-active-bg: #DDEED8;
    --sb-active-text: #1F4D2E;
    --sb-active-border: rgba(51, 102, 204, 0.35);
    /* Scrollbars */
    --cm3-scrollbar-size: 8px;
    --cm3-scrollbar-thumb: rgba(100, 116, 139, 0.55);
    --cm3-scrollbar-thumb-hover: rgba(100, 116, 139, 0.8);
    --cm3-scrollbar-track: transparent;
    /* Tabs */
    --cm3-tab-bg: rgba(248, 250, 252, 0.75);
    --cm3-tab-bg-hover: rgba(248, 250, 252, 1);
    --cm3-tab-active-bg: #FFF;
    --cm3-tab-text: #475569;
    --cm3-tab-text-hover: #1F2937;
    --cm3-tab-active-text: #1E40AF;
    --cm3-tab-border: rgba(15, 23, 42, 0.10);
    --cm3-tab-border-strong: rgba(15, 23, 42, 0.16);
    --cm3-tab-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --cm3-tab-shadow-active: 0 2px 10px rgba(15, 23, 42, 0.08);
    /* Fall-backs */
    --cm3-header-guess: 64px;
    --cm3-actionbar-guess: 52px;
    --cm3-spacing-guess: 72px;
}

html.cm3-auth-gate body {
    visibility: hidden !important;
}

/* =========================================================
   Scrollbars
========================================================= */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--cm3-scrollbar-thumb) var(--cm3-scrollbar-track);
}

*::-webkit-scrollbar {
    width: var(--cm3-scrollbar-size);
    height: var(--cm3-scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--cm3-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--cm3-scrollbar-thumb);
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: var(--cm3-scrollbar-thumb-hover);
}

/* =========================================================
   Focus handling
========================================================= */
:focus {
    border-color: #86B7FE !important;
    outline: 0 !important;
    box-shadow: 0px 0px 1px 0.05rem rgba(13, 110, 253, 0.25) !important;
}

:focus-visible {
    outline: none;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    color: #212529;
    background-color: #FFF;
    border-color: #86B7FE;
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.btn:focus, .btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.nav-link:focus, .nav-link:focus-visible {
    outline: 0;
    box-shadow: none;
}

.btn:focus,
.btn:active:focus,
.nav-link:focus {
    outline: none;
    box-shadow: none;
}

/* =========================================================
   Base document + background + typography
========================================================= */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background: radial-gradient(circle at 22% 58%, rgba(255, 228, 238, 0.05) 0%, rgba(255, 228, 238, 0) 20%), radial-gradient(circle at 74% 36%, rgba(186, 240, 250, 0.05) 0%, rgba(186, 240, 250, 0) 18%), radial-gradient(circle at 48% 74%, rgba(205, 210, 245, 0.04) 0%, rgba(205, 210, 245, 0) 18%), linear-gradient(135deg, #FEFEFF 0%, #FCFDFF 50%, #FFFEFD 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #FFFFFF;
    color: #333;
    font: 13px "roboto", sans-serif, "helvetica", sans-serif, "arial", sans-serif;
    font-family: "Arial", sans-serif;
    padding: 0 !important;
    padding-top: var(--header-height);
}

h1,
label {
    font-weight: 600;
}

h1 {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    color: #2970C0;
}

h4 {
    font-size: 18px;
    color: #555;
}

label {
    display: block;
}

a {
    color: #145A8D;
    text-decoration: none;
}

a:hover {
    color: #2A7FC1;
    cursor: pointer;
}

a[href],
button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
label[for],
select,
.btn,
.nav-link,
.dropdown-item,
.actionLink,
.resetPassword {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
.btn.disabled,
.disabled,
[aria-disabled="true"] {
    cursor: not-allowed;
}

ol,
ul {
    padding-left: 0.5rem;
}

.surface {
    background: #FFF;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
}

/* =========================================================
   CM3 Toasts
========================================================= */
#cm3-toast-container {
    top: 0.85rem !important;
    right: 0.85rem !important;
    width: min(92vw, 420px);
    z-index: 1080;
}

#cm3-toast-container .toast {
    margin-bottom: 0.75rem;
}

.cm3-toast-enhanced {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16), 0 2px 10px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.95rem;
}

.cm3-toast-enhanced .toast-body {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.95rem 1rem 0.55rem;
    line-height: 1.4;
}

.cm3-toast-enhanced .cm3-toast-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    min-width: 1.35rem;
    margin-top: 0.12rem;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.98;
    /* aligns icon with first line of text */
}

.cm3-toast-enhanced .cm3-toast-content {
    flex: 1 1 auto;
    min-width: 0;
}

.cm3-toast-enhanced .cm3-toast-title {
    margin: 0 0 0.18rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.cm3-toast-enhanced .cm3-toast-msg {
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.cm3-toast-enhanced .btn-close {
    flex: 0 0 auto;
    margin: 0.9rem 0.85rem 0 0 !important;
    opacity: 0.9;
}

.cm3-toast-enhanced .btn-close:hover {
    opacity: 1;
}

.cm3-toast-bar {
    width: 100%;
    height: 4px;
    opacity: 0.45;
    transform-origin: left center;
    will-change: transform;
}

.cm3-user-picker-open {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.2rem;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1.2;
    text-decoration: none;
}

.cm3-user-picker-open:hover,
.cm3-user-picker-open:focus {
    text-decoration: underline;
}

.cm3-user-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.cm3-user-picker-results {
    display: grid;
    gap: 0.4rem;
}

.cm3-user-picker-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid #CED4DA;
    border-radius: 6px;
    background: #FFF;
    color: #111827;
    text-align: left;
}

.cm3-user-picker-result:hover,
.cm3-user-picker-result:focus {
    border-color: #007ACC;
    background: #F4FAFF;
}

.cm3-user-picker-name {
    font-weight: 700;
}

.cm3-user-picker-meta {
    color: #6C757D;
    font-size: 0.86rem;
}

@media (max-width: 575.98px) {
    .cm3-user-picker-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Colour tuning
========================================================= */
.cm3-toast-enhanced.text-bg-success {
    background: linear-gradient(180deg, #198754 0%, #157347 100%) !important;
    color: #FFF !important;
}

.cm3-toast-enhanced.text-bg-danger {
    background: linear-gradient(180deg, #DC3545 0%, #B02A37 100%) !important;
    color: #FFF !important;
}

.cm3-toast-enhanced.text-bg-warning {
    background: linear-gradient(180deg, #F0AD00 0%, #D69200 100%) !important;
    color: #1F2937 !important;
}

.cm3-toast-enhanced.text-bg-warning .btn-close {
    filter: none;
}

.cm3-toast-enhanced.text-bg-info {
    background: linear-gradient(180deg, #0DCAF0 0%, #0AA2C0 100%) !important;
    color: #082F49 !important;
}

.cm3-toast-enhanced.text-bg-secondary {
    background: linear-gradient(180deg, #6C757D 0%, #565E64 100%) !important;
    color: #FFF !important;
}

/* =========================================================
   Small screens
========================================================= */
@media (max-width: 576px) {
    #cm3-toast-container {
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto;
    }
    
    .cm3-toast-enhanced {
        border-radius: 14px;
    }
    
    .cm3-toast-enhanced .toast-body {
        gap: 0.75rem;
        padding: 0.9rem 0.95rem;
    }
}

/* =========================================================
   Cards / login page
========================================================= */
.card,
.datatable-container {
    background-color: #FFF;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cm3-login-card {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    border-radius: 8px;
}

.cm3-login-card::before {
    content: "";
    display: block;
    height: 3px;
}

.cm3-login-card h1 {
    font-weight: 600;
}

.cm3-login-card img {
    opacity: 0.95;
}

.cm3-login-wrap {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - var(--header-height, 0px));
    padding: 3rem 1rem 2rem;
    background-color: #4B4B4B;
}

@media (min-width: 992px) {
    .cm3-login-wrap {
        padding-right: 1rem;
    }
}

/* =========================================================
   Scroll containers
========================================================= */
.preferences-form-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.settings-form-container {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.25em;
    background-color: #FFF;
}

.settings-form-container .dt-container {
    box-sizing: border-box;
    margin: 0;
}

.settings-form-container table {
    width: max-content;
}

/* =========================================================
   Split button (Raise)
========================================================= */
.btn-split {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-split .btn-main,
.btn-split .btn-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #C53030;
    border: 1px solid #B42318;
    color: #FFF;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.btn-split .btn-main {
    min-width: 137px;
    padding: 11px 10px 11px 8px;
    gap: 6px;
    border-radius: 3px;
    text-align: left;
}

.btn-split .btn-toggle {
    margin-left: 2px;
    padding: 0 10px;
    border-radius: 3px;
}

.btn-split .btn-main:hover,
.btn-split .btn-toggle:hover {
    background-color: #B42318;
    border: 1px solid #9B1C1C;
}

/* preserved as-is */
.btn-split .btn-split:active,
.btn-split .btn-toggle:active {
    background-color: #7A1E1E !important;
    border-color: #7A1E1E !important;
}

/* preserved as-is */
.btn-split .btn-split:focus,
.btn-split .btn-toggle:focus {
    outline: 2px solid rgba(197, 48, 48, 0.35);
    outline-offset: 0;
}

.btn-split .btn-main-icon {
    width: 15px;
    height: 15px;
}

/* Raise dropdown */
#raiseButton .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    min-width: 160px;
    margin-top: 4px;
    z-index: 10;
    background: #FFF;
    border: 1px solid #CCC;
    border-radius: 0;
    box-shadow: -7px 7px 10px #111;
}

#raiseButton .dropdown-menu a {
    display: block;
    margin: 0 0 5px;
    padding: 5px 0 5px 12px;
    color: #000;
    border-left: 2px solid #FFF;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

#raiseButton .dropdown-menu a:hover {
    background-color: #BEE4FF;
    border-left: 2px solid #0070C0;
}

#raiseButton.show .dropdown-menu {
    display: block;
}

/* Dropdown item hover chevron */
.dropdown-menu .dropdown-item {
    position: relative;
    padding-left: 2rem;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #EAF6E6 !important;
    color: #1F4D2E;
}

.dropdown-menu .dropdown-item::after {
    content: "\f285";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    font-family: "bootstrap-icons";
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dropdown-menu .dropdown-item:hover::after,
.dropdown-menu .dropdown-item:focus::after {
    opacity: 0.6;
    transform: translate(2px, -50%);
}

/* =========================================================
   Mobile nav overlay / toggle
========================================================= */
#sidebarToggleBtn {
    display: none;
    background-color: #B5D9FF;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 998;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   Form cell borders
========================================================= */
.form-control,
.form-select {
    border: 1px solid #ABABAB;
}

/* =========================================================
   Filters dropdown
========================================================= */
.filters-dropdown {
    flex: 0 0 auto;
    margin-bottom: 8px;
    border: 1px solid #DEE2E6;
    border-radius: 2px;
    background-color: #F8F9FA;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    background: #1400ff8a;
    color: #FFF;
    border: 1px solid #7D72FD;
    border-radius: 3px 3px 0 0;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.filters-arrow {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    transition: transform 0.25s ease;
}

.filters-collapsed {
    display: none !important;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    overflow: hidden;
    padding: 10px;
    background-color: #F8F9FA;
    border: 1px solid #CCC;
    border-top: none;
    border-radius: 0 0 6px 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#filtersToggleBtn[aria-expanded="false"] + .cm3-filter-actions {
    display: none !important;
}

#filtersToggleBtn[aria-expanded="true"] + .cm3-filter-actions {
    animation: cm3FadeIn 0.15s ease-in;
}

@keyframes cm3FadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-box label {
    display: block;
    margin: 5px 0;
}

.filter-box-title {
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #CCC;
    color: #333;
    font-weight: 700;
}

.filter-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.filter-actions input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #CCC;
    border-radius: 4px;
}

#main-filters {
    flex: 0 0 auto;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

#main-filters:not(.filters-collapsed) {
    max-height: 2000px;
    opacity: 1;
}

.filters-rotated {
    transform: rotate(90deg);
}

#filters-arrow {
    transition: transform 180ms ease;
}

#filters-arrow.filters-rotated {
    transform: rotate(-90deg);
}

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

/* =========================================================
   Navbar
========================================================= */
.navbar {
    position: sticky !important;
}

.navbarwithpadding {
    margin-top: 0;
    padding: 0;
}

.navbar-nav {
    margin-left: auto;
    padding-top: 0;
}

.navbar-nav2 {
    margin-left: 945px;
}

.navbar-nav .nav-link {
    color: #0B3A5A;
    padding: 2px 10px 2px 15px !important;
    min-height: 20px;
}

.navbar-brand img {
    height: 30px;
}

.actionLink,
.bookmark-this,
.resetPassword {
    padding-left: 18px !important;
}

.cm3-login-card a[href],
.cm3-login-card a[href] *,
.cm3-login-card .actionLink,
.cm3-login-card .actionLink *,
.cm3-login-card .bookmark-this,
.cm3-login-card .bookmark-this *,
.cm3-login-card .resetPassword,
.cm3-login-card .resetPassword * {
    cursor: pointer !important;
}

.cm3-login-card .actionLink,
.cm3-login-card .bookmark-this,
.cm3-login-card .resetPassword {
    display: inline-flex;
    align-items: center;
}

#tacCaution {
    font-size: 12px;
}

/* =========================================================
   Misc legacy bits
========================================================= */
.minitable {
    width: 230px;
    font-size: 10px;
}

.text-blue {
    margin: 0;
    padding: 50px 0 1px;
    font-size: 21px;
    color: #0070C0;
}

.guide,
.help,
.logout {
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

.guide,
.help {
    margin-right: 0;
    background-image: url(/img/guide_icon.svg);
}

.help {
    background-image: url(/img/Support_icon.svg);
}

.logout {
    margin-right: 1px;
    background-image: url(/img/log_out.svg);
}

.logout::after,
.logout::before {
    margin-right: 20px !important;
}

input[type="password"],
input[type="text"] {
    box-sizing: border-box;
    max-width: 300px;
    padding: 5px;
    /*border: 1px solid #4B5563;*/
    border-radius: 3px;
    font-size: 16px;
}

.cm3-clickable-row,
.cm3-clickable-cell {
    cursor: pointer;
}

.cm3-legal-footer {
    clear: both;
    width: 100%;
    padding: 12px 16px;
    color: #6c757d;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: center;
}

.cm3-legal-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 3px;
}

.cm3-legal-footer a {
    color: #495057;
    text-decoration: none;
}

.cm3-legal-footer a:hover,
.cm3-legal-footer a:focus {
    color: #0d6efd;
    text-decoration: underline;
}

.cm3-overdue-ok:disabled {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #ced4da;
    opacity: 1;
    cursor: not-allowed;
}

.cm3-overdue-ok:disabled:hover,
.cm3-overdue-ok:disabled:focus {
    cursor: no-drop;
}

.cm3-kpi-good {
    color: #709b08;
}

.cm3-kpi-alert {
    color: #e12b34;
}

input[type="password"] {
    margin-bottom: 20px;
}

/* =========================================================
   Drop down
========================================================= */
.dropdown-text {
    font-size: small;
    -moz-box-shadow: 1px 1px 6px #8AB2E5;
    -webkit-box-shadow: 1px 1px 6px #8AB2E5;
    box-shadow: 1px 1px 6px #8AB2E5;
}

/* =========================================================
   Sidebar text links
========================================================= */
.navtext,
.navtext a {
    display: inline-block;
    padding: 7px 0 7px 10px;
    color: #041E49;
    font-size: small;
    text-decoration: none;
    transition: all 0.4s ease;
}

.navtext:hover,
.navtext a:hover {
    cursor: pointer !important;
    background: var(--sb-hover-bg);
    color: var(--sb-text);
}

.navtext.active,
.navtext a.active {
    background: var(--sb-active-bg);
    color: var(--sb-active-text);
    box-shadow: inset 3px 0 0 var(--sb-active-border);
}

.raise-main > span {
    display: inline-flex;
    align-items: baseline;
}

.raise-main .bi {
    line-height: 1;
    transform: translateY(1px);
}

.rightBar {
    border-right: 1px solid #D1D5DB;
    padding-right: 10px;
}

/* =========================================================
   Name + dropdown button
========================================================= */
.dd-button:after,
.nameMessage {
    right: 22px;
    margin-left: auto;
    z-index: 5;
}

.placecenter {
    margin: 0 auto;
    max-width: 1200px;
}

#resetheading {
    display: inline-block;
    margin: 10px 0 4px;
    font-size: 18px;
    line-height: 1.1;
    color: #555;
}

.dd-button {
    display: inline-block;
    padding: 10px 30px 10px 7px;
    border: 1px solid #FD3C43;
    border-radius: 4px;
    white-space: nowrap;
    color: #F4F4F4;
    font-size: 12px;
    background-color: #FD3C43;
    cursor: pointer;
}

.dd-button:hover {
    background-color: #FD3C43;
}

.dd-button:after {
    content: "";
    top: 50%;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #FFF;
}

.dd-input,
.dd-input + .dd-menu {
    display: none;
}

.dd-menu {
    position: absolute;
    top: 100%;
    margin: 2px 0 0;
    padding: 0;
    list-style-type: none;
    background-color: #FFF;
    border: 1px solid #CCC;
    border-radius: 4px;
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);
}

.dd-input:checked + .dd-menu {
    display: block;
}

.dd-menu li {
    content: " »";
    padding: 10px 20px;
    white-space: nowrap;
    cursor: pointer;
}

.dd-menu li:hover {
    background-color: #0070C0;
    color: #F4F4F4;
}

.dd-menu li a {
    display: block;
    padding: 10px 20px;
    border: 0;
    color: #000;
    text-decoration: none;
}

.dd-menu li a:hover {
    border: 0;
    color: #F4F4F4;
}

.dd-menu li a::before {
    content: " >>";
    position: absolute;
    left: 0;
    color: #F4F4F4;
    pointer-events: none;
    text-decoration: none;
}

.dd-menu li.divider {
    padding: 0;
    border-bottom: 1px solid #CCC;
}

/* =========================================================
   Sticky sidebar container
========================================================= */
.mobNav {
    position: sticky;
    top: var(--header-height);
    width: var(--sidebar-width);
    min-height: 400px;
}

/* =========================================================
   Collapsible tool sections
========================================================= */
.tool-collapse-btn {
    color: inherit;
}

.tool-collapse-btn:hover {
    opacity: 0.9;
}

.tool-collapse-btn:focus,
.tool-collapse-btn:focus-visible,
.tool-collapse-btn:active:focus {
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.tool-collapse-btn:focus-visible {
    background-color: rgba(45, 81, 107, 0.06);
}

.tool-collapse-btn .collapse-chevron {
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 180ms ease;
    line-height: 1;
    font-size: 1.1em;
}

.tool-collapse-btn.collapsed .collapse-chevron {
    transform: rotate(-90deg);
}

.risks .collapse {
    transition: height 220ms ease;
}

/* =========================================================
   Detail tabs (CM3)
========================================================= */
.cm3-detail-tabbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 4px;
}

.cm3-tab-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 34px;
    margin-top: 0.3em;
    border: 1px solid var(--cm3-tab-border);
    border-radius: 6px;
    background: #F8FAFC;
    color: #1F4E79;
    line-height: 1;
}

.cm3-tab-step:hover:not(:disabled) {
    background: #EEF5FB;
    color: #123D63;
}

.cm3-tab-step:focus,
.cm3-tab-step:focus-visible {
    outline: 0 !important;
    box-shadow: 0 0 0 0.12rem rgba(31, 78, 121, 0.18) !important;
}

.cm3-tab-step:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.action-sort-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: top;
}

.action-sort-heading-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.action-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.action-sort-btn:focus,
.action-sort-btn:focus-visible {
    outline: 0 !important;
    box-shadow: 0 0 0 0.12rem rgba(31, 78, 121, 0.18) !important;
}

.cm3-detail-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cm3-detail-tabs .nav-link {
    padding: 0.45rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.45rem 0.45rem 0 0;
    background: rgba(248, 249, 250, 0.6);
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    margin-top: 0.3em;
}

.cm3-detail-tabs .nav-link:not(.active):hover {
    background: rgba(248, 249, 250, 0.95);
    color: #212529;
}

.cm3-detail-tabs .nav-link.active {
    position: relative;
    z-index: 2;
    background: #FFF;
    color: #1E40AF;
    border-color: rgba(0, 0, 0, 0.15);
    border-bottom-color: #1E40AE;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.cm3-detail-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.cm3-detail-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0%;
    right: 0%;
    bottom: 0px;
    height: 2px;
    background: #1E40AF;
    border-radius: 2px;
}

.cm3-detail-tabs .nav-link:not(.active) {
    opacity: 0.85;
}

/* =========================================================
   Detail tabs (specific ID strip)
========================================================= */
#detailTabsNav.cm3-detail-tabs {
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    /*padding-bottom: 4px;*/
    border-bottom: 1px solid var(--cm3-tab-border);
    background-color: #FFFFFF;
}

#detailTabsNav.cm3-detail-tabs .nav-link {
    padding: 0.45rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 0.55rem 0.55rem 0 0;
    background: var(--cm3-tab-bg);
    color: #444746;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.92;
    box-shadow: var(--cm3-tab-shadow);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#detailTabsNav.cm3-detail-tabs .nav-link:not(.active):hover {
    background: var(--cm3-tab-bg-hover);
    color: var(--cm3-tab-text-hover);
    border-color: var(--cm3-tab-border);
    opacity: 0.95;
}

#detailTabsNav.cm3-detail-tabs .nav-link.active {
    position: relative;
    z-index: 2;
    background: var(--cm3-tab-active-bg);
    color: var(--cm3-tab-active-text);
    border-color: var(--cm3-tab-border-strong);
    /*border-bottom-color: #FFF;*/
    opacity: 1;
}

#detailTabsNav.cm3-detail-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.20), var(--cm3-tab-shadow-active);
}

@media (min-width: 768px) {
    #detailTabsNav.cm3-detail-tabs {
        overflow: visible;
    }
}

/* =========================================================
   Tables (CM3)
========================================================= */
table.cm3-table thead th,
table.cm3-table tbody td {
    padding: 0.35rem;
}

table.cm3-table thead th {
    padding-left: 0.45rem;
    padding-right: 1.7rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.25);
    white-space: nowrap;
}

table.cm3-table tbody tr {
    transition: background-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}

table.cm3-table tbody tr:hover > * {
    background-color: rgba(120, 180, 120, 0.06);
    box-shadow: inset 0 0 0 9999px rgba(45, 81, 107, 0.02);
    cursor: pointer;
}

.history-table-wrap {
    position: relative;
}

.history-hash-lock {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    line-height: 1;
    opacity: 0.75;
    z-index: 10;
}

/* =========================================================
   Sortable tabs
========================================================= */
.user-select-none {
    user-select: none;
}

.ui-sortable-helper {
    cursor: grabbing;
}

.cm3-tab-placeholder {
    visibility: visible !important;
    border: 1px dashed #9AA6B2;
    background: rgba(0, 0, 0, 0.03);
}

.cm3-sorting .ui-tabs-nav a {
    pointer-events: none;
}

/* =========================================================
   Small icons / badges
========================================================= */
.followLedActive,
.greenLedActive {
    width: 15px;
    height: 45px;
    margin-left: 10px;
}

.reportimg {
    width: 15px;
    height: 15px;
}

/* =========================================================
   Notices / tables
========================================================= */
.notice {
    padding: 1px 6px;
    background-color: #FFF;
    border: 1px solid #B5BCC7;
    border-radius: 10px;
    color: #555;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
}

.verticaldetail-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.verticaldetail-table td,
.verticaldetail-table th {
    padding: 8px;
    border: 1px solid #DEE2E6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.verticaldetail-table th {
    white-space: nowrap;
    background-color: #F1F5F9;
    color: #334155;
    font-weight: 600;
}

.tabFirstDiv {
    margin-top: 13px;
    margin-bottom: 10px;
}

.common_fixed_table_class {
    border: 1px solid #007ACC;
}

/* Signature */
.sigTrue {
    padding-right: 20px !important;
    background-color: rgba(0, 188, 136, 0.103);
    background-image: url("/img/checkmark-security-lock-icon.svg");
    background-repeat: no-repeat;
    background-size: 10px 10px;
    background-position: right 6px top 4px;
    font-size: larger;
    font-weight: 500;
}

.sigUnkeyed {
    padding-right: 8px;
    background-color: rgba(255, 255, 255, 0.103);
    font-size: larger;
    font-weight: 500;
}

.sigFalse {
    padding-right: 16px !important;
    text-decoration: line-through;
    background-color: rgba(253, 32, 32, 0.125);
    background-image: url("/img/warning-icon.svg");
    background-repeat: no-repeat;
    background-size: 10px 10px;
    background-position: right 6px top 4px;
    font-size: larger;
    font-weight: normal;
}

/* =========================================================
   Legacy tabs
========================================================= */
.tab .tab__heads {
    float: left;
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid #CCC;
}

.tab .tab__heads li {
    float: left;
    height: 32px;
    margin: 6px 1px 0 0;
    padding: 0 17px;
    background-color: #E5E5E5;
    border-bottom: 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: #333;
    line-height: 31px;
    cursor: pointer;
}

.tab .tab__heads li:hover {
    background-color: #DAE9F7;
    color: #2F93F0;
}

.tab .tab__heads li.active {
    display: block;
    background-color: #CFE5FA;
    background-position: 0 -102px;
    border: 1px solid #CCC;
    border-bottom: 1px solid #FFF;
    color: #000;
}

.ui-buttonr:hover,
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button {
    cursor: pointer !important;
}

/* =========================================================
   Header + sidebar
========================================================= */
.header {
    padding-top: 0;
    padding-bottom: 0;
    background-color: #FFFFFF !important;
}

.navSection {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    overflow-y: hidden;
    padding-top: 10px;
    border-right: 1px solid #E6EAEE;
    background: linear-gradient(to bottom, #F7F8FA, #F3F5F7);
}

.dropdown {
    margin-left: -35px;
}

.page_title {
    margin-left: 0;
    color: #0070C0 !important;
    font-size: 22px;
}

img.logo {
    height: 42px;
}

.issue_raise_container {
    margin-top: 77px;
}

/*=========================================================
  Modal
========================================================= */
.width-modal {
    max-width: 1400px;
    width: 95%;
}

/*=========================================================
   Forms
========================================================= */
textarea {
    resize: vertical;
}

.section-header {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row > .form-group {
    flex: 1;
}

.notes-section,
.optional-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #F9F9F9;
    border: 1px solid #CCC;
    border-radius: 8px;
}

.notes-section h4,
.optional-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #F0F0F0;
    color: #333;
    border: 1px solid #CCC;
}

.notes-text {
    font-size: 12px;
    color: #666;
}

.radio-group label {
    display: inline-block;
    margin-right: 15px;
    color: #666;
}

input[type="radio"] {
    margin-right: 8px;
}

.submit-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4A90E2;
    border: 0;
    border-radius: 5px;
    color: #FFF;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #357AB8;
}

.abandon-button {
    margin-top: 20px;
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #F8F9FA;
    border: 1px solid #DDD;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.abandon-button:hover {
    background-color: #E2E6EA;
}

.note {
    margin-bottom: 15px;
    font-size: 13px;
    color: #555;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border: 1px solid #DDD;
}

.info-table tr:nth-child(even) {
    background-color: #F5F5F5;
}

.info-table th {
    width: 40%;
    padding: 8px 15px;
    color: #666;
    font-weight: 400;
    text-align: right;
}

.info-table td {
    padding: 8px 15px;
    color: #333;
    text-align: left;
}

.btn-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-back,
.btn-remove {
    background-color: #FFF;
    color: #333;
    border: 1px solid #DDD;
}

.btn-back {
    background-color: #F5F5F5;
}

.error {
    color: red;
}

.updatepswdbutton {
    border: 1px solid #FF6F6F;
    background-color: #FFF7F2;
}

.authenticatordiv {
    margin: 25px 0 4px;
    font-size: 18px !important;
    color: #555;
}

.form-check-label {
    display: inline-block;
    margin-bottom: 0;
    padding-top: 2px;
    color: #145A8D;
    font-weight: 700;
}

.form-check-input:checked {
    background-color: #145A8D;
    border-color: #145A8D;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding-left: 30px;
}

.search-container .search-icon {
    position: absolute;
    left: 10px;
    top: 30%;
    transform: translateY(-50%);
    color: #AAA;
    pointer-events: none;
    font-size: 16px;
}

.form-heading {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.form-subtext {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.summary-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.summary-table td,
.summary-table th {
    padding: 8px;
    border: 1px solid #DDD;
    text-align: left;
}

.summary-table th {
    background-color: #F7F7F7;
    color: #333;
    font-weight: 700;
}

.summary-table td {
    background-color: #FFF;
}

.vertical-table td,
.vertical-table th {
    padding: 8px;
    border: 1px solid #DEE2E6;
}

.vertical-table th {
    background-color: #F0F0F0;
}

.tab-content {
    background-color: #FFFFFF;
}

/* =========================================================
   Settings pills
========================================================= */
.nav-pills {
    --bs-nav-pills-border-radius: 0.5rem;
}

.nav-pills .nav-link {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--bs-nav-pills-border-radius);
    color: rgba(71, 85, 105, 0.914);
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-pills .nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-pills .nav-link.active {
    background: rgba(37, 156, 204, 0.10);
    border: 1px solid rgba(37, 156, 204, 0.30);
    color: #259CCC !important;
    font-weight: 600;
}

/* =========================================================
   Todo tabs layout (BS5 tabs)
========================================================= */
#todoTabsNav.nav-pills .nav-link {
    padding: 0.35rem 0.55rem;
    background: rgba(45, 81, 107, 0.06);
    border: 1px solid rgba(45, 81, 107, 0.16);
    border-radius: 999px;
    box-shadow: none;
    color: #2D516B;
    line-height: 1.1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

#todoTabsNav.nav-pills .nav-link img {
    opacity: 0.9;
}

#todoTabsNav.nav-pills .nav-link:hover {
    background: rgba(45, 81, 107, 0.10);
    border-color: rgba(45, 81, 107, 0.24);
    color: #1F3F56;
}

#todoTabsNav.nav-pills .nav-link.active,
#todoTabsNav.nav-pills .show > .nav-link {
    background: rgba(45, 81, 107, 0.18);
    border-color: rgba(45, 81, 107, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 1px 2px rgba(15, 23, 42, 0.08);
    color: #1F3F56;
}

#todoTabsNav.nav-pills .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(45, 81, 107, 0.18);
}

#todoTabsNav.nav-pills .nav-link span {
    white-space: nowrap;
    color: #041E49;
}

#todoTabsNav .cm3-pill-count {
    padding: 1px 7px;
    background: rgba(45, 81, 107, 0.14);
    border: 1px solid rgba(45, 81, 107, 0.18);
    border-radius: 999px;
    color: #2D516B;
    font-size: 0.78em;
}

#todoTabsNav .nav-link.active .cm3-pill-count {
    background: rgba(45, 81, 107, 0.20);
    border-color: rgba(45, 81, 107, 0.28);
    color: #1F3F56;
}

#todoTabsNav.nav-pills .nav-link:not(.active) {
    background: rgba(45, 81, 107, 0.04);
    border-color: rgba(45, 81, 107, 0.12);
    color: rgba(45, 81, 107, 0.85);
}

#todoTabsNav.nav-pills .nav-link:not(.active) img {
    opacity: 0.75;
}

#todoTabsNav.nav-pills .nav-link:not(.active):hover {
    background: rgba(45, 81, 107, 0.09);
    border-color: rgba(45, 81, 107, 0.22);
    color: #1F3F56;
}

/* =========================================================
   Main wrappers + sections
========================================================= */
.setting-section,
.to-do-section,
.todo-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.setting-section {
    width: calc(100vw - var(--sidebar-width));
}

.to-do-section {
    width: calc(100vw - var(--sidebar-width));
    height: calc(100vh - var(--header-height, 0.5em));
}

.todo-panel {
    min-width: 0;
    height: calc(100vh - var(--header-height, 0px));
}

#todoTabs {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

#todoTabsNav {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}

#todoTabsContent {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 1px;
    scrollbar-gutter: stable;
    background-color: #FFF;
}

#todoTabsContent .tab-pane {
    height: 100%;
}

#todoTabsContent .tab-pane.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#todoTabsContent .tab-pane.active .settings-form-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

#settingsTabs {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#settingsTabsNav {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}

#settingsTabsNav.nav-tabs .nav-link,
#settingsTabsNav.nav-tabs .nav-link:hover,
#settingsTabsNav.nav-tabs .nav-link:focus,
#settingsTabsNav.nav-tabs .nav-link.active {
    border-radius: 0.45rem 0.45rem 0 0;
}

#settingsTabs .nav-pills .nav-link,
#settingsTabs .nav-pills .nav-link:hover,
#settingsTabs .nav-pills .nav-link:focus,
#settingsTabs .nav-pills .nav-link.active,
#settingsTabs .nav-pills .show > .nav-link {
    border-radius: 0.5rem;
}

#settingsTabs .tab__container,
#settingsMainTabContent,
#settingsTabs .tab-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#settingsTabs .tab-content > .tab-pane.show.active {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#settingsTabs .settings-form-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.main-explorer-wrapper,
.main-todo-wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.setting-sidebar {
    margin-top: 115px;
}

.charts-section,
.storage-section {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: calc(100vh - var(--header-height));
}

.storage-section {
    width: calc(100vw - var(--sidebar-width));
    padding: 0 0 5px;
}

.charts-section {
    width: calc(100vw - var(--sidebar-width) - 10px);
    padding: 0 0.5rem 5px 0.4rem;
}

.footer {
    height: var(--footer-height);
    border-top: 1px solid #007ACC;
}

/* =========================================================
   Shared flex form scrolling fix
========================================================= */
.row,
.row > [class*="col-"],
.row.g-1,
.row.g-1 > [class*="col-"] {
    min-height: 0;
}

.setting-section,
.to-do-section,
.todo-panel,
.storage-section,
.charts-section,
.main-explorer-wrapper,
.main-todo-wrapper,
.main-account-wrapper,
.capa-wrapper,
.form-container,
.settings-form-container {
    min-height: 0;
}

.capa-wrapper,
.form-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: calc(100vh - var(--header-height, 0px));
    overflow: hidden;
}

.capa-wrapper {
    border: 1px solid #007ACC;
}

.capa-wrapper > form,
.form-container > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.issue-raise-scroll,
.preferences-form-container,
.settings-form-container,
#editsummary,
#teamForm {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.issue-raise-scroll {
    overflow-x: hidden;
    padding-right: 0.35rem;
}

.issue-raise-footer {
    flex: 0 0 auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFF;
}

#editsummary,
#teamForm {
    overflow-y: auto;
}

.main-account-wrapper {
    min-height: calc(100vh - var(--header-height));
}

.chnage_password,
.create-tag,
.edit-function,
.edit-tag,
.edit-user-details,
.my-account,
.user-details,
add-function {
    min-height: 0;
    height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* =========================================================
   Progress
========================================================= */
.progress-bar {
    position: relative;
    transition: width 0.6s ease;
}

.progress-bar i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.progress_description_div {
    margin-top: 50px;
}

td.goBtnCell {
    vertical-align: bottom !important;
}

/* =========================================================
   Datatable / misc containers
========================================================= */
.doughnut_chart,
div#rootcausetab {
    max-height: 750px;
    overflow-y: scroll;
}

.create_action_div {
    width: 75%;
    margin-top: 40px;
    padding: 5px;
    border: 1px solid #B5BCC7;
}

a.btn.btn-primary.report_btn {
    margin-bottom: 10px;
}

.userlist {
    margin-top: 23px;
}

.eye_img {
    min-width: 50px;
}

div.dt-container div.dt-length label {
    padding-top: 5px;
    padding-left: 5px;
    font-size: 10px;
    text-transform: capitalize;
}

div.dt-container div.dt-length select {
    margin-left: 4px !important;
}

div.dt-container div.dt-search label {
    padding-left: 8px;
    font-size: 12px;
}

/* =========================================================
   KPI / storage / checkbox helpers
========================================================= */
.kpi_table {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.kpi_table th,
.setting_table th,
td,
tr {
    border-left: 0 none #FFF !important;
    border-right: 0 none #FFF !important;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #000;
    transition: transform 0.2s ease;
}

.arrow-down {
    transform: rotate(90deg);
}

.arrow-right {
    transform: rotate(0deg);
}

.storage-parameters {
    flex: 0 0 auto;
    border-collapse: collapse;
    border: 1px solid #DDD;
    background-color: #FEFEFE;
}

.storage-parameters td,
.storage-parameters th {
    padding: 8px 12px;
    border: 1px solid #DDD;
    text-align: left;
}

.storage-parameters th {
    background-color: #F4F4F4;
    font-weight: 700;
}

.storage-params-table {
    width: 100%;
    max-width: 300px;
    margin-left: 0;
    margin-right: auto;
    font-size: 0.85rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.abandonLink {
    margin-left: 0 !important;
    background-color: #EFEFEF;
    background-size: 14px 14px;
    border: 1px solid #B5B5B5;
    color: #474749;
}

/* =========================================================
   Risks
========================================================= */
.risks td.risk-picked-initial {
    border: 2px dashed #1F51FF !important;
}

.risks td.risk-picked-final,
.risks td.risk-picked-initial.risk-picked-final {
    border: 2px solid #1F51FF !important;
}

.risks table,
.root-cause-table {
    width: 100%;
    border-collapse: collapse;
}

.risks table {
    table-layout: fixed !important;
}

.risks td,
.risks th {
    padding: 8px;
    border: 1px solid #CCC;
    vertical-align: middle;
    text-align: center;
    font-size: 13px;
    font-family: Arial, sans-serif;
}

.risks th {
    min-width: 125px;
    color: #036;
    font-weight: 700;
    white-space: normal;
    word-wrap: normal;
    background-color: #FFFFFF !important;
}

.risks tr {
    height: 50px;
}

.risks .side {
    width: 160px;
    background-color: #F5F5F5;
    font-weight: 700;
}

.risks .blank {
    border: 0 !important;
    background: 0 0 !important;
}

.risks .horizontal {
    padding-top: 8px;
    border: 0 !important;
    color: #1770B7;
    text-align: center;
}

.risks .risk-cell-label {
    display: inline-block;
    max-width: 100%;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.72);
    color: #1f1f1f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.verticalCell {
    width: 131px !important;
    height: 44px !important;
    border: 0 #FFF !important;
}

.verticalText {
    border: 0 #FFF !important;
    color: #1770B7 !important;
    transform: rotate(-90deg);
}

/* Heatmap colours */
.low-low {
    background-color: #3AF901;
}

.low-med {
    background-color: #87FA00;
}

.low-high {
    background-color: #CEFB02;
}

.med-low {
    background-color: #FEF001;
}

.med-med {
    background-color: #FFCE03;
}

.med-high {
    background-color: #FD9A01;
}

.high-low {
    background-color: #FD6104;
}

.high-med {
    background-color: #FF2C05;
}

.high-high {
    background-color: #F00505;
}

/* =========================================================
   Reports table
========================================================= */
.reports {
    width: 85%;
    margin: auto auto 20px;
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.reports td,
.reports th {
    padding: 10px;
    border: 1px solid #DDD;
    text-align: center;
}

.reports th {
    background-color: #F2F2F2;
    font-weight: 700;
}

.reports tr:nth-child(even) {
    background-color: #F9F9F9;
}

.reports tr:hover,
.strategiesdropdown-content a:hover {
    background-color: #F1F1F1;
}

.reports td strong {
    font-weight: 700;
}

#chart_container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-bottom: 15px;
}

/* =========================================================
   Strategies dropdown
========================================================= */
.strategiesdropdown {
    position: relative;
    display: inline-block;
}

.strategiesdropdown-button {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 30px 10px 7px;
    background-color: #FD3C43;
    border: 0;
    border-radius: 3px;
    box-shadow: 3px 3px 3px #B7B7B7;
    color: #FFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.strategiesdropdown-content {
    position: absolute;
    display: none;
    min-width: 200px;
    z-index: 1;
    background-color: #FFF;
    border: 1px solid #DDD;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.strategiesdropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
}

.strategiesdropdown:hover .strategiesdropdown-content {
    display: block;
}

.strategiesdropdown:hover .strategiesdropdown-button {
    background-color: #D32F2F;
}

/* =========================================================
   Todo list + status colours
========================================================= */
.buttonsdetail {
    list-style: none;
    background-color: #FFFFFF;
}

.top-button {
    display: inline-block;
}

.taskList td a {
    text-decoration: none;
}

.completed {
    color: green;
    text-decoration: line-through;
}

.not-completed {
    color: red;
}

.running {
    color: #000;
}

.completed a {
    color: green;
}

.not-completed a {
    color: red;
}

.running a {
    color: #000;
}

/* =========================================================
   Root cause + attachments
========================================================= */
.root-cause-table {
    box-sizing: border-box;
    border: 2px solid rgba(37, 156, 204, 0.25);
    outline: 0 solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease;
}

.root-cause-table:hover {
    outline: 2px solid rgba(37, 156, 204, 0.18);
    outline-offset: -2px;
    box-shadow: 3px 3px 5px 1px rgba(71, 71, 71, 0.060);
}

.root-cause-table th,
.root-cause-table td {
    padding: 10px;
    border: none;
}

.root-cause-table tbody tr + tr td {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.root-cause-table thead th {
    background-color: #F5F5F5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #333;
    font-weight: 600;
}

.root-cause-table thead tr:nth-child(2) th {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.root-cause-table input[type="checkbox"] {
    margin: 0;
}

.sixm-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    white-space: nowrap;
}

.sixm-heading {
    font-weight: 600;
}

.sixm-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

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

.sixm-grid .root-cause-table {
    max-width: none;
    margin-bottom: 0;
}

.sixm-card {
    position: relative;
}

.sixm-fish {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    font-size: 18px;
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(100%) brightness(1.1);
    transform: scaleX(-1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sixm-grid .sixm-fish {
    display: block;
}

.sixm-card:hover .sixm-fish {
    opacity: 0.45;
    transform: translateY(-1px);
}

.root-cause-table .sixm-header {
    padding-right: 48px;
}

.edit-causes,
.edit-five-why {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #007BFF;
    border: 0;
    border-radius: 5px;
    color: #FFF;
    cursor: pointer;
}

.edit-causes:hover,
.edit-five-why:hover {
    background-color: #0056B3;
}

.five-why-tabs-row {
    padding-left: 0.25rem;
    padding-right: 0.75rem;
}

.five-why-tabs {
    margin-left: 0;
}

.edit-btn {
    margin-left: 10px;
    background: 0 0;
    border: 0;
    color: #007BFF;
    font-size: 1rem;
    cursor: pointer;
}

.edit-btn:hover {
    text-decoration: underline;
}

#attachedFilesList .attached-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: 5px;
}

#attachedFilesList .attached-file a {
    color: #0D6EFD;
    text-decoration: none;
}

#attachedFilesList .attached-file .btn-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.capainfoLink img {
    width: 8px;
    height: 8px;
}

.attachment img {
    width: 15px;
    height: 15px;
}

.attached-file {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.attached-file.fade-out {
    opacity: 0;
    transform: translateX(8px);
}

/* =========================================================
   Explorer layout
========================================================= */
.cm3-filter-group {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.cm3-filter-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.9rem;
    font-weight: 700;
}

.cm3-filter-body {
    padding: 0.5rem 0.65rem;
}

.filter-scroll {
    max-height: 210px;
    overflow: auto;
}

.cm3-filter-footer {
    position: sticky;
    bottom: 0;
    padding: 0.6rem;
    background: #F7F7F7;
    border: 1px solid #CBCBCB;
    border-radius: 0.5rem;
    backdrop-filter: blur(6px);
}

.cm3-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cm3-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    background: #FFF;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    font-size: 0.78rem;
}

.cm3-chip button {
    padding: 0;
    background: transparent;
    border: 0;
    line-height: 1;
}

.cm3-filters .cm3-filters-body {
    max-height: calc(100vh - (var(--cm3-header-guess) + var(--cm3-actionbar-guess) + var(--cm3-spacing-guess)));
    overflow: auto;
    overscroll-behavior: contain;
}

.cm3-filters .cm3-filter-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.6rem;
    background: rgba(243, 246, 251, 0.95);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.5rem;
    backdrop-filter: blur(6px);
}

.cm3-filters .filter-scroll {
    max-height: 210px;
    overflow: auto;
}

@media (max-width: 768px) {
    .cm3-filters .cm3-filters-body {
        max-height: calc(100vh - 260px);
    }
}

/* =========================================================
   6M layout
========================================================= */
.six-m-tool-section {
    margin-bottom: 10px;
    border: 1px solid #B5BCC7;
}

.six-m-tool-section .root-cause-table {
    width: 100%;
    max-width: 1100px;
    table-layout: fixed;
}

.sixm-header-cell {
    width: 250px;
    padding: 0 !important;
    border-bottom: 0;
}

.sixm-type-cell,
.root-cause-table .sixm-cause-label {
    width: 240px;
}

.sixm-cause-header-cell,
.root-cause-table .cause-cell {
    width: auto;
}

.sixm-actual-header-cell,
.root-cause-table .sixm-actual-cell {
    width: 120px;
}

.root-cause-table .cause-cell {
    min-width: 0;
}

.root-cause-table .cause-input {
    display: block;
    width: 100%;
    min-height: 3.25rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    resize: vertical;
    box-sizing: border-box;
}

.root-cause-table textarea.cause-input[readonly] {
    resize: none;
    overflow: hidden;
}

.sixm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 0.5rem;
    min-width: 0;
}

.sixm-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.sixm-type {
    display: block;
    max-width: 100%;
    font-size: clamp(1.2rem, 1.55vw, 1.75rem);
    font-weight: 700;
    line-height: 1.1;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}

.sixm-label {
    color: #64748B;
    font-size: 1rem;
    font-weight: 500;
}

.sixm-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================================
   5-Why layout
========================================================= */
.five-why-content {
    margin: 5px;
    padding: 5px;
    background: #FFF;
    border-top: none;
}

#five-why-content {
    border: 1px solid #B5BCC7;
}

.five-why-table {
    margin-top: 10px;
    border-collapse: collapse;
}

.five-why-table td,
.five-why-table th {
    /*border: 1px solid #CCC !important;*/
    text-align: left;
    border-bottom: 1px solid #F0F0F0;
}

.five-why-table th {
    background-color: #EAEAEA;
    color: #333;
    font-weight: 700;
}

.five-why-table td {
    background-color: #FFFFFF;
}

.five-why-table input[type="text"] {
    margin-bottom: 0;
}

.five-why-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .five-why-grid {
        grid-template-columns: 1fr;
    }
}

.five-why-card {
    position: relative;
    margin-bottom: 0.75rem;
    background: #FFF;
    border: 2px solid rgba(148, 255, 163, 0.655);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: 1100px;
    transition: box-shadow 0.15s ease;
}

.five-why-card:hover {
    box-shadow: 3px 3px 5px 1px rgba(71, 71, 71, 0.060);
}

.five-why-mark {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;
    font-size: 1.25rem;
    opacity: 0.18;
    pointer-events: none;
    user-select: none;
}

.five-why-card-header {
    position: relative;
    z-index: 2;
    padding: 0.6rem 0.75rem;
    background: #F5F5F5;
    border: 0px solid #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.five-why-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.five-why-card-title {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 220px;
}

.five-why-card-type {
    font-size: 1.05rem;
    font-weight: 800;
}

.five-why-card-sub {
    font-weight: 600;
    opacity: 0.75;
}

.five-why-actions {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
}

.five-why-card .five-why-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.five-why-card .five-why-table th,
.five-why-card .five-why-table td {
    padding: 0.6rem 0.75rem;
}

.five-why-card .five-why-table thead th {
    background: #FFF;
    font-weight: 700;
}

/* =========================================================
   Icon buttons
========================================================= */
.btn.btn-icon i {
    font-size: 1rem;
}

.btn.btn-icon:hover {
    background: rgba(37, 156, 204, 0.08);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #FFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-edit:hover {
    background: rgba(37, 156, 204, 0.12);
    border-color: rgba(37, 156, 204, 0.3);
}

.btn-save:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-stop:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

/* =========================================================
   Toggle switch
========================================================= */
.user-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.user-switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.user-slider {
    position: absolute;
    inset: 0;
    background-color: #CCC;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.4s;
}

.user-slider:before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: 0.4s;
}

.user-switch input:checked + .user-slider {
    background-color: #4CAF50;
}

.user-switch input:checked + .user-slider:before {
    transform: translateX(24px);
}

/* =========================================================
   Tool section headings
========================================================= */
.five-why-section h6,
.risks h6,
.tool-section h6 {
    min-height: 17px;
    padding: 4px 7px;
    background-color: #FFFFFF;
    background-repeat: repeat-x;
    border: 1px solid #B5BCC7;
    box-shadow: 1px 1px 2px 0px #B6B6B6;
    font-size: 15px;
}

.edituserbutton {
    margin: 10px;
    padding: 5px 10px;
    background-color: #FFF7F2;
    border: 1px solid #FFB460;
}

/* =========================================================
   Todo "more" dropdown + panel transitions
========================================================= */
#todoTabs .cm3-more-tab {
    position: relative;
    z-index: 999999 !important;
}

#todoTabs .cm3-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9999999 !important;
    display: none;
}

#todoTabs .cm3-more-tab.is-open > .cm3-more-menu {
    display: block !important;
}

#todoTabs .ui-tabs-panel {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 180ms ease, transform 180ms ease;
    will-change: opacity, transform;
}

#todoTabs .ui-tabs-panel.cm3-panel-active {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    #todoTabs .ui-tabs-panel {
        transition: none;
        transform: none;
    }
}

/* =========================================================
   Utility / small states
========================================================= */
.date-suffix {
    margin-left: 1px;
    font-size: 0.7em;
    vertical-align: 2px;
}

.field-hidden td:not(:last-child) {
    color: #6C757D;
}

.field-hidden .badge {
    opacity: 0.7;
}

/* =========================================================
   Ultra-wide media query
========================================================= */
@media only screen and (min-device-width: 1441px) and (max-device-width: 2560px) {
    ul.buttonsdetail {
        margin-top: 0;
        margin-left: 13px;
    }
    
    #follow-link {
        margin-left: 3px !important;
    }
    
    button.navbar-toggler {
        margin-right: 30px;
        margin-bottom: 7px;
        background: rgba(0, 0, 0, 0.55);
        border: 1px solid #000;
    }
    
    .cm3-toast-enhanced .toast-body {
        align-items: center;
    }
    
    .cm3-toast-enhanced .toast-body i.bi {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        line-height: 1;
    }
    
    .cm3-toast-enhanced .cm3-toast-msg {
        line-height: 1.35;
    }
    
    .todo-tab-cotinaer {
        margin-top: 90px !important;
    }
    
    .navbar-nav .nav-link {
        float: left !important;
        margin-left: 10px !important;
    }
    
    .minitable {
        margin-left: auto;
    }
    
    .minitable,
    .navbar-nav2 {
        position: absolute !important;
        right: 350px !important;
        float: right !important;
    }
    
    nav.navbar.navbar-expand-md.navbar-dark.mb-4.bg-white.fixed-top {
        padding: 20px;
    }
    
    .navbar-nav {
        position: relative !important;
    }
    
    .page_title {
        display: block !important;
        width: max-content !important;
        white-space: pre-wrap !important;
        word-break: break-word !important;
    }
    
    .fixed-top {
        position: relative !important;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1030;
    }
    
    .navbar-nav2 {
        margin-left: 0 !important;
    }
    
    .issue_raise_container {
        width: 80% !important;
        margin-top: 45px !important;
    }
    
    .user-details-wrapper {
        min-height: calc(100vh - var(--header-height, 20px));
    }
    
    .col-xs-6.col-md-10.chnage_password,
    .col-xs-6.col-md-10.manage_team_role_div {
        width: 82%;
    }
    
    a.btn.btn-primary.report_btn {
        margin-bottom: 0 !important;
    }
    
    .col-xs-6.col-md-10.manage_team_role_div {
        margin-top: 40px;
    }
    
    .progress-containment,
    .progress_description_div {
        width: 70%;
        margin-top: 50px;
    }
}

/* =========================================================
   Responsive sidebar toggle
========================================================= */
@media (max-width: 1290px) {
    #mobNav {
        position: fixed !important;
        top: calc(var(--header-height)) !important;
        left: 0 !important;
        display: block !important;
        z-index: 999 !important;
        overflow-y: hidden !important;
        transform: translateX(-100%) !important;
        transition: transform 0.25s ease-out !important;
    }
    
    #mobNav.is-open {
        transform: translateX(0) !important;
        -moz-box-shadow: 5px 5px 11px #494949;
        -webkit-box-shadow: 5px 5px 11px #494949;
        box-shadow: 5px 5px 11px #494949;
    }
    
    .setting-section,
    .to-do-section,
    .form-container,
    .explore_section {
        width: 100vw !important;
    }
    
    .setting-section,
    .to-do-section {
        left: 0 !important;
    }
    
    .navSection {
        position: fixed;
        top: 0;
        left: 0;
        display: none;
        z-index: 1000;
        overflow-y: hidden;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }
    
    .navSection.active {
        display: block !important;
        transform: translateX(0) !important;
    }
    
.sidebarToggleBtn {
    position: fixed;
    top: 0.5rem;
    left: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 50px;
    padding: 0;
    z-index: 1050;
    background: #FFF;
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    border-left: 1px solid transparent;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.sidebarToggleBtn .burger {
    position: relative;
    display: block;
    width: 16px;
    height: 3px;
    background-color: #1E5AA8;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.sidebarToggleBtn .burger::before,
.sidebarToggleBtn .burger::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 16px;
    height: 3px;
    background-color: #1E5AA8;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebarToggleBtn .burger::before {
    transform: translateY(-7px);
}

.sidebarToggleBtn .burger::after {
    transform: translateY(4px);
}

.sidebarToggleBtn[aria-expanded="true"] .burger {
    background-color: transparent;
}

.sidebarToggleBtn[aria-expanded="true"] .burger::before {
    transform: translateY(0) rotate(45deg);
}

.sidebarToggleBtn[aria-expanded="true"] .burger::after {
    transform: translateY(0) rotate(-45deg);
}
    
    .sidebarToggleBtn:active,
    .sidebarToggleBtn:focus {
        outline: 0;
    }
    
    .nav-overlay {
        position: fixed !important;
        inset: 0;
        display: none !important;
        z-index: 900 !important;
        background: rgba(0, 0, 0, 0.4) !important;
    }
    
    .nav-overlay.show {
        display: block !important;
    }
    
    .form-check-input:checked {
        background-color: #0D6EFD;
        border-color: #0D6EFD;
    }
    
    .cm3-login-wrap {
        margin-left: 0;
    }
    
    h1,
    h1 span {
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    
    #todoTabsNav.nav-pills .nav-link {
        padding-top: 0.20rem;
        padding-bottom: 0.20rem;
    }
    
    div.dt-container div.dt-length label,
    div.dt-container div.dt-length select {
        display: none !important;
    }
    
    div.dt-container div.dt-search input {
        float: left;
    }
    
    .navbar {
        padding-left: 20px;
    }
    
    @media (max-width: 575.98px) {
    }
}

/* =========================================================
   Header tidy-up: keep original structure
========================================================= */
#mainHeader .mainHeaderRow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

#mainHeader .navbar-brand {
    flex: 1 1 360px;
    min-width: 220px;
    max-width: min(42vw, 680px);
    margin-right: 1rem;
}

#mainHeader .headerBrand {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: flex-end !important;
    gap: 0.25rem 0.75rem;
    min-width: 0;
}

#mainHeader .navbar-collapse {
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

/* KPI table sits between brand and right stack */
#mainHeader .minitable {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    margin-left: clamp(0.5rem, 2vw, 2rem);
    margin-right: 1rem;
    order: 1;
}

#mainHeader .navbar-nav2 {
    margin-left: 0;
}

/* Fix old KPI flex rule just for header */
#mainHeader .kpi_table {
    display: table !important;
    width: auto;
    white-space: nowrap;
    font-size: 10px;
}

#mainHeader .kpi_table th,
#mainHeader .kpi_table td {
    padding: 2px 6px;
    vertical-align: middle;
}

/* Right side = name above buttons */
#mainHeader .headerRightStack {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    min-width: 0;
    max-width: min(58vw, 760px);
    margin-left: auto;
    order: 2;
    gap: 0.2rem;
}

/* User / org line */
#mainHeader #nameMessage {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    position: static;
    right: auto;
    margin: 0;
    text-align: right;
    white-space: nowrap;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
}

#mainHeader #nameMessage strong {
    display: inline-block;
    flex: 0 1 auto;
    font-weight: 700;
    max-width: min(42%, 18rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainHeader #nameMessage .headerOrganisationName span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainHeader #nameMessage .headerIdentitySeparator {
    flex: 0 0 auto;
    color: #6C757D;
    font-weight: 600;
}

#mainHeader #nameMessage a {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    max-width: none;
    min-width: 0;
    border-right: 0;
    padding-right: 0;
    text-decoration: none;
    overflow: hidden;
}

#mainHeader #nameMessage .headerUserName {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Buttons row */
#mainHeader .headerButtons {
    position: static;
    right: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    margin-left: 0;
    padding-top: 0;
}

#mainHeader .headerButtons .nav-item {
    margin: 0;
}

#mainHeader .headerButtons .nav-link {
    white-space: nowrap;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* Remove float interference from legacy button classes in header */
#mainHeader .guide,
#mainHeader .help,
#mainHeader .logout {
    float: none;
    margin-top: 0;
}

/* Keep the title strong */
#mainHeader h1 {
    margin: 0;
    font-size: 1.4rem;
}

#mainHeader .headerPageTitle {
    flex: 1 1 230px;
    min-width: 180px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainHeader .headerPageTitle .custom {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainHeader .cm3-title-with-private-icon {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    vertical-align: top;
}

#mainHeader .cm3-title-with-private-icon .custom {
    min-width: 0;
}

#mainHeader .cm3-private-title-icon {
    flex: 0 0 auto;
    height: 0.9em;
    width: auto;
    margin-left: 0.25rem;
}

/* Responsive order */
@media (max-width: 1200px) {
    #mainHeader .navbar-brand {
        flex-basis: 300px;
        max-width: 36vw;
    }
}

@media (max-width: 992px) {
    #mainHeader .navbar-brand {
        flex-basis: 240px;
        max-width: 32vw;
    }

    #mainHeader .headerPageTitle {
        flex-basis: 100%;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    #mainHeader #nameMessage {
        display: none;
    }
    
    #mainHeader.minitable {
        display: none !important;
    }
    
    .logo {
        display: none !important;
    }

    #mainHeader .navbar-brand {
        flex: 1 1 auto;
        max-width: calc(100vw - 120px);
    }

    #mainHeader .headerPageTitle {
        flex-basis: auto;
        min-width: 0;
        font-size: 1rem;
    }
    
    #mainHeader .headerButtons .nav-link span {
        display: none;
    }
    
    #mainHeader .headerButtons .nav-link {
        min-width: 28px;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

