:root {
    --cae-orange: #e56a00;
    --cae-orange-dark: #b64900;
    --cae-menu-blue: #183a59;
    --cae-amber: #f5a623;
    --cae-navy: #1f2c3d;
    --cae-navy-soft: #334862;
    --cae-text: #1e2b3c;
    --cae-muted: #5f6f84;
    --cae-surface: #ffffff;
    --cae-surface-soft: #f8fbff;
    --cae-border: #d5deea;
    --cae-sidebar-bg: #f6f8fb;
    --navbar-height: 50px;
    --page-head-height: 44px;
    --sidebar-select-color: rgba(201, 88, 0, 0.1);
    --primary: #3d2800;
    --primary-color: #3d2800;
    --text-on-orange: #ffffff;
}

[data-theme="dark"] {
    --cae-text: #ecf2fb;
    --cae-muted: #a4b1c3;
    --cae-surface: #1c2533;
    --cae-surface-soft: #232e3f;
    --cae-border: #2f3c50;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 124, 152, 0.45) transparent;
}

*::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

*::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, #6c819d, #4f637f);
}

body {
    color: var(--cae-text);
    font-family: "Segoe UI", "Inter", "Helvetica Neue", sans-serif;
}

.page-container {
    background:
    radial-gradient(1050px 360px at 95% -20%, rgba(229, 106, 0, 0.24), transparent 56%),
    radial-gradient(700px 260px at 8% 8%, rgba(245, 166, 35, 0.14), transparent 60%),
    linear-gradient(180deg, #fff7ef 0%, #f7efe6 42%, #f2efe9 100%);
}

body,
[data-theme="light"],
[data-theme="dark"] {
    --sidebar-select-color: rgba(208, 94, 3, 0.16) !important;
    --primary: #3d2800 !important;
    --primary-color: #3d2800 !important;
}

a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--cae-orange-dark);
}

a:not(.btn):not(.nav-link):not(.dropdown-item):hover,
a:not(.btn):not(.nav-link):not(.dropdown-item):focus {
    color: var(--cae-orange);
}

.layout-main a,
.form-page a,
.page-content a,
.widget a,
.comment-content a,
.ql-editor a {
    color: var(--cae-orange-dark) !important;
}

.layout-main a:hover,
.form-page a:hover,
.page-content a:hover,
.widget a:hover,
.comment-content a:hover,
.ql-editor a:hover {
    color: var(--cae-orange) !important;
}

.navbar,
.navbar-expand,
.navbar-light,
.navbar-primary,
.navbar.bg-dark {
    height: var(--navbar-height);
    border: 0 !important;
    background: linear-gradient(98deg, #7b3100 0%, #a94700 44%, #cf5b00 76%, #ee8a2e 100%) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 35, 0.32);
}

.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
}

.navbar .navbar-nav a.nav-link,
.navbar-light .navbar-nav .nav-link,
.navbar-primary .nav-item .nav-link,
#navbar-breadcrumbs a,
#navbar-breadcrumbs > li > a::before,
span.notifications-seen use,
symbol#icon-small-down {
    color: #fff;
    fill: #fff;
}

.page-head,
.page-head .page-head-content {
    height: var(--page-head-height);
}

.page-head {
    top: var(--navbar-height);
    background: color-mix(in srgb, var(--cae-surface) 93%, transparent);
    border-bottom: 1px solid rgba(141, 161, 187, 0.45);
    backdrop-filter: blur(6px);
}

.layout-side-section .desk-sidebar,
.layout-side-section .standard-sidebar,
.layout-side-section .list-sidebar {
    border-radius: 8px;
    border: 1px solid #c9d4e2 !important;
    background: #f6f9fd !important;
    box-shadow: none;
}

.desk-sidebar,
.standard-sidebar,
.list-sidebar,
.workspace-sidebar,
.workspace-sidebar .standard-sidebar-section {
    border-radius: 8px !important;
    border: 1px solid #d4dde8 !important;
    background: var(--cae-sidebar-bg) !important;
    box-shadow: none !important;
}

.layout-side-section .desk-sidebar::before,
.layout-side-section .standard-sidebar::before,
.layout-side-section .list-sidebar::before {
    content: none;
}

.layout-side-section .sidebar-label,
.layout-side-section .sidebar-label .icon {
    color: var(--cae-menu-blue);
    stroke: var(--cae-menu-blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    font-size: 11px;
}

.desk-sidebar .standard-sidebar-section,
.workspace-sidebar .standard-sidebar-section,
.desk-sidebar .sidebar-menu {
    background: var(--cae-sidebar-bg) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.workspace-sidebar .sidebar-item-container,
.desk-sidebar .sidebar-item-container,
.workspace-sidebar .standard-sidebar-section .section-body,
.layout-side-section .section-body {
    background: var(--cae-sidebar-bg) !important;
    box-shadow: none !important;
}

.desk-sidebar .standard-sidebar-item .item-anchor,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item .item-anchor {
    border-radius: 8px;
    min-height: 30px;
    font-weight: 700;
    color: var(--cae-menu-blue);
    transition: background 140ms ease, color 140ms ease;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item .item-anchor,
.workspace-sidebar .standard-sidebar-item .item-anchor,
.layout-side-section .sidebar-label,
.layout-side-section .sidebar-label .icon {
    color: #183a59 !important;
    stroke: #183a59 !important;
    font-weight: 700 !important;
}

.desk-sidebar .standard-sidebar-item,
.workspace-sidebar .standard-sidebar-item,
.desk-sidebar .sidebar-menu > li > a {
    border-radius: 6px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
}

.desk-sidebar .standard-sidebar-item:hover .item-anchor,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover .item-anchor {
    background: rgba(208, 94, 3, 0.16);
    color: #d05e03;
}

.desk-sidebar .standard-sidebar-item.selected .item-anchor,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item.selected .item-anchor,
.standard-sidebar .nav-item .nav-link.active,
.list-sidebar .list-filters a.active {
    background: rgba(201, 88, 0, 0.1);
    color: var(--cae-menu-blue);
    font-weight: 700;
    box-shadow: inset 2px 0 0 var(--cae-orange-dark);
}

.desk-sidebar .sidebar-menu > li > a:hover,
.desk-sidebar .sidebar-menu > li > a:focus,
.workspace-sidebar .standard-sidebar-item:hover,
.workspace-sidebar .standard-sidebar-item:focus {
    background: rgba(208, 94, 3, 0.14) !important;
    color: #d05e03 !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item:focus-within,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover .item-anchor,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item:focus-within .item-anchor,
.desk-sidebar .standard-sidebar-item:hover,
.desk-sidebar .standard-sidebar-item:hover .item-anchor {
    background: rgba(208, 94, 3, 0.18) !important;
    color: #d05e03 !important;
}

.workspace-sidebar .standard-sidebar-item:hover .item-anchor,
.workspace-sidebar .standard-sidebar-item:focus .item-anchor,
.desk-sidebar .sidebar-menu > li > a:hover,
.desk-sidebar .sidebar-menu > li > a:focus {
    color: #d05e03 !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover,
.workspace-sidebar .standard-sidebar-item:hover {
    background: rgba(208, 94, 3, 0.18) !important;
}

.desk-sidebar .sidebar-menu > li > a.active,
.workspace-sidebar .standard-sidebar-item.selected,
.workspace-sidebar .standard-sidebar-item.active {
    background: rgba(201, 88, 0, 0.1) !important;
    border-left: 2px solid var(--cae-orange-dark) !important;
}

.form-page .page-head {
    background: linear-gradient(95deg, #bb4f00 0%, var(--cae-orange-dark) 48%, var(--cae-orange) 100%) !important;
    border-bottom: 1px solid rgba(125, 43, 0, 0.5);
}

.page-title,
.page-title .title-area,
.page-title .title-text {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.form-page .page-head .page-title .title-text,
.form-page .page-head .title-area .title-text,
.form-page .page-head .title-text {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.form-page .page-head .page-title .title-subtitle,
.form-page .page-head .indicator,
.form-page .page-head .indicator-pill,
.form-page .page-head .breadcrumb,
.form-page .page-head .breadcrumb a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.layout-main-section,
.widget,
.form-section,
.report-wrapper,
.form-grid {
    border-radius: 8px;
    border: 1px solid var(--cae-border);
    background: var(--cae-surface);
    box-shadow: none;
}

.layout-main-section {
    padding: 10px;
}

.head-title,
.form-section .section-head,
.form-dashboard-section .section-head,
.comment-box .comment-input-header,
.control-label {
    color: #2b3b50;
    font-weight: 700;
}

.form-control,
.awesomplete .input-with-feedback,
.duration-picker .duration-input {
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid var(--cae-border);
    background: var(--cae-surface-soft);
}

.form-control:focus,
.awesomplete .input-with-feedback:focus,
.duration-picker .duration-input:focus {
    border-color: var(--cae-orange);
    box-shadow: 0 0 0 3px rgba(240, 122, 16, 0.14);
    background: #fff;
}

.btn,
.btn-primary,
.btn-secondary {
    border-radius: 8px !important;
    min-height: 32px;
    font-weight: 600;
}

.btn-primary {
    color: #fff !important;
    border: 1px solid var(--cae-orange-dark) !important;
    background: var(--cae-orange) !important;
}

.btn-secondary {
    color: #2c3d53 !important;
    border: 1px solid #c9d5e7 !important;
    background: #f6f9fd !important;
}

/* Child table: color-only, no visibility or interaction side-effects. */
.form-grid {
    overflow: visible !important;
}

.form-grid .grid-heading-row {
    background: #edf3fa;
    border-bottom: 1px solid #c8d6e8;
}

.form-grid .grid-row:hover,
.form-grid .grid-body .row:hover {
    background: rgba(240, 122, 16, 0.06);
}

.grid-row-open .form-in-grid {
    background: #fbfdff;
    border-top: 1px solid rgba(141, 161, 187, 0.4);
}

.grid-row-open .form-in-grid .form-control,
.grid-row-open .form-in-grid .awesomplete .input-with-feedback {
    background: #fff;
}

/* Prevent header distortion on workspace/dashboard pages by removing report-only action groups. */
.workspace-page .page-head .page-actions .menu-btn-group,
.workspace-page .page-head .page-actions .actions-btn-group,
.workspace-page .page-head .page-actions .custom-actions {
    display: none !important;
    visibility: hidden !important;
}

/* Requested: hide awesomplete dropdown items in list views. */
.list-view-container .awesomplete > ul,
.list-view-container .awesomplete ul {
    display: none !important;
    visibility: hidden !important;
}

.grid-static-col,
.editable-row,
.form-in-grid {
    filter: none !important;
    transform: none !important;
}

#freeze.grid-form,
#freeze.grid-form.in {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

.cae-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cae-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.cae-brand-text {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* Modern corporate refinement: logo-led palette and cleaner workspace hierarchy. */
:root {
    --cae-brand-orange: #de6800;
    --cae-brand-orange-deep: #9a3f00;
    --cae-brand-blue: #16344f;
    --cae-brand-blue-deep: #10293f;
    --cae-brand-steel: #5f7388;
}

.page-container {
    background:
        radial-gradient(900px 300px at 94% -18%, rgba(222, 104, 0, 0.2), transparent 58%),
        linear-gradient(180deg, #fff9f3 0%, #f7f4ef 100%) !important;
}

.navbar,
.navbar-expand,
.navbar-light,
.navbar-primary,
.navbar.bg-dark {
    background: linear-gradient(100deg, #8e3700 0%, #b84a00 45%, #d86100 74%, #f0983a 100%) !important;
    box-shadow: 0 10px 24px rgba(44, 21, 0, 0.28) !important;
}

.navbar::after {
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)) !important;
}

.layout-side-section .desk-sidebar,
.layout-side-section .standard-sidebar,
.layout-side-section .list-sidebar,
.desk-sidebar,
.standard-sidebar,
.list-sidebar,
.workspace-sidebar {
    border-radius: 14px !important;
    border: 1px solid #d4dde6 !important;
    background: linear-gradient(180deg, #f7f9fc 0%, #f2f6fb 100%) !important;
    box-shadow: 0 10px 24px rgba(20, 41, 64, 0.08) !important;
}

.desk-sidebar .sidebar-item-container,
.workspace-sidebar .sidebar-item-container {
    margin-left: 0 !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item,
.workspace-sidebar .standard-sidebar-item,
.standard-sidebar .standard-sidebar-item {
    margin: 2px 6px;
    border-radius: 10px !important;
}

.desk-sidebar .standard-sidebar-item .item-anchor,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item .item-anchor,
.workspace-sidebar .standard-sidebar-item .item-anchor,
.standard-sidebar .standard-sidebar-item .item-anchor {
    min-height: 36px;
    padding: 8px 11px !important;
    color: var(--cae-brand-blue) !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

.desk-sidebar .standard-sidebar-item .icon,
.desk-sidebar .standard-sidebar-item svg,
.workspace-sidebar .standard-sidebar-item .icon,
.workspace-sidebar .standard-sidebar-item svg,
.layout-side-section .sidebar-label,
.layout-side-section .sidebar-label .icon {
    color: var(--cae-brand-blue) !important;
    stroke: var(--cae-brand-blue) !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item:hover .item-anchor,
.workspace-sidebar .standard-sidebar-item:hover,
.workspace-sidebar .standard-sidebar-item:hover .item-anchor,
.standard-sidebar .standard-sidebar-item:hover,
.standard-sidebar .standard-sidebar-item:hover .item-anchor {
    background: linear-gradient(90deg, rgba(208, 94, 3, 0.18), rgba(229, 106, 0, 0.08)) !important;
    color: #d05e03 !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item.selected,
.desk-sidebar .desk-sidebar-item.standard-sidebar-item.selected .item-anchor,
.workspace-sidebar .standard-sidebar-item.selected,
.workspace-sidebar .standard-sidebar-item.selected .item-anchor,
.workspace-sidebar .standard-sidebar-item.active,
.workspace-sidebar .standard-sidebar-item.active .item-anchor,
.standard-sidebar .standard-sidebar-item.selected,
.standard-sidebar .standard-sidebar-item.selected .item-anchor {
    background: linear-gradient(90deg, rgba(208, 94, 3, 0.2), rgba(229, 106, 0, 0.09)) !important;
    color: var(--cae-brand-blue-deep) !important;
    box-shadow: inset 3px 0 0 #d05e03 !important;
}

.layout-main-section {
    border-radius: 14px !important;
    border: 1px solid #e4d8c8 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fdf8f1 100%) !important;
    box-shadow: 0 12px 30px rgba(61, 40, 0, 0.09) !important;
    padding: 14px !important;
}

.widget,
.form-section,
.report-wrapper,
.form-grid {
    border-radius: 12px !important;
    border: 1px solid #e6dccf !important;
    background: #ffffff !important;
    box-shadow: 0 6px 16px rgba(20, 41, 64, 0.06) !important;
}

.head-title,
.form-section .section-head,
.form-dashboard-section .section-head,
.comment-box .comment-input-header,
.control-label {
    color: var(--cae-brand-blue-deep) !important;
}

.workspace-footer .btn,
.workspace-footer .btn-default,
.workspace-footer .btn-secondary {
    border: 1px solid #dcc6ae !important;
    background: #fff5ea !important;
    color: #7d3a04 !important;
    font-weight: 600 !important;
}

/* Final cleanup: consistent rhythm for sidebar and list filters. */
.desk-sidebar,
.standard-sidebar,
.list-sidebar {
    padding: 8px 6px !important;
}

.standard-sidebar .standard-sidebar-section,
.desk-sidebar .standard-sidebar-section,
.list-sidebar .standard-sidebar-section {
    padding: 2px 0 !important;
}

.layout-side-section .sidebar-label,
.standard-sidebar .standard-sidebar-section .standard-sidebar-label {
    margin: 10px 8px 6px !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item,
.desk-sidebar .standard-sidebar-item,
.standard-sidebar .standard-sidebar-item,
.list-sidebar .standard-sidebar-item {
    margin: 3px 6px !important;
    border-radius: 9px !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item .item-anchor,
.desk-sidebar .standard-sidebar-item .item-anchor,
.standard-sidebar .standard-sidebar-item .item-anchor,
.list-sidebar .standard-sidebar-item .item-anchor,
.desk-sidebar .sidebar-menu > li > a,
.list-sidebar .list-filters a {
    min-height: 36px !important;
    padding: 8px 10px !important;
    gap: 9px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
}

.list-sidebar .sidebar-section,
.list-sidebar .list-filters,
.list-sidebar .list-sidebar-button {
    margin: 4px 6px !important;
}

.list-sidebar .form-control,
.list-sidebar input,
.list-sidebar .awesomplete .input-with-feedback {
    min-height: 36px !important;
    border-radius: 8px !important;
    background: #fff !important;
}

/* Sidebar alignment cleanup for workspace and list/filter side panels. */
.desk-sidebar .desk-sidebar-item.standard-sidebar-item,
.desk-sidebar .standard-sidebar-item,
.standard-sidebar .standard-sidebar-item,
.list-sidebar .standard-sidebar-item {
    min-height: 38px;
    margin: 2px 6px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item .item-anchor,
.desk-sidebar .standard-sidebar-item .item-anchor,
.standard-sidebar .standard-sidebar-item .item-anchor,
.list-sidebar .standard-sidebar-item .item-anchor,
.desk-sidebar .sidebar-menu > li > a {
    min-height: 38px !important;
    padding: 8px 10px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.desk-sidebar .desk-sidebar-item.standard-sidebar-item .sidebar-item-label,
.desk-sidebar .standard-sidebar-item .sidebar-item-label,
.standard-sidebar .standard-sidebar-item .sidebar-item-label,
.list-sidebar .standard-sidebar-item .sidebar-item-label,
.desk-sidebar .sidebar-menu > li > a {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    font-size: 15px !important;
}

.desk-sidebar .icon,
.desk-sidebar svg,
.standard-sidebar .icon,
.standard-sidebar svg,
.list-sidebar .icon,
.list-sidebar svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    margin: 0 !important;
}

.desk-sidebar .sidebar-item-control,
.standard-sidebar .sidebar-item-control,
.list-sidebar .sidebar-item-control {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

.desk-sidebar .sidebar-item-container,
.standard-sidebar .sidebar-item-container,
.list-sidebar .sidebar-item-container {
    margin-left: 0 !important;
}

.desk-sidebar .sidebar-item-container::before,
.standard-sidebar .sidebar-item-container::before,
.list-sidebar .sidebar-item-container::before {
    display: none !important;
}

.list-sidebar .list-filters a,
.standard-sidebar .standard-sidebar-item > a {
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.list-sidebar .list-sidebar-button,
.list-sidebar .form-control,
.list-sidebar input,
.list-sidebar .awesomplete .input-with-feedback {
    min-height: 36px;
    border-radius: 9px !important;
}

/* Final visual enforce block: filter alignment + golden links + dark dropdowns. */
.list-sidebar .list-filters a,
.list-sidebar .standard-sidebar-item .item-anchor {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    line-height: 1.2 !important;
}

.list-sidebar .list-filters a > span,
.list-sidebar .list-filters a > div,
.list-sidebar .list-filters a > svg,
.list-sidebar .standard-sidebar-item .item-anchor > span,
.list-sidebar .standard-sidebar-item .item-anchor > div,
.list-sidebar .standard-sidebar-item .item-anchor > svg {
    display: inline-flex !important;
    align-items: center !important;
}

.list-sidebar .list-filters a > :last-child,
.list-sidebar .standard-sidebar-item .item-anchor > :last-child {
    margin-left: auto !important;
}

.layout-main a,
.form-page a,
.page-content a,
.widget a,
.comment-content a,
.ql-editor a,
.list-sidebar a {
    color: #ca9800 !important;
    font-weight: 800 !important;
}

.layout-main a:hover,
.form-page a:hover,
.page-content a:hover,
.widget a:hover,
.comment-content a:hover,
.ql-editor a:hover,
.list-sidebar a:hover {
    color: #f0be29 !important;
}

.dropdown-menu,
.awesomplete > ul,
.ui-autocomplete,
.select2-dropdown {
    background: linear-gradient(180deg, #7e3200 0%, #b34a00 52%, #d86200 100%) !important;
    border: 1px solid #f2a24f !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 30px rgba(74, 26, 0, 0.42) !important;
}

.dropdown-menu .dropdown-item,
.awesomplete > ul > li,
.ui-menu-item-wrapper,
.select2-results__option {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.awesomplete > ul > li small,
.awesomplete > ul > li .small,
.awesomplete > ul > li .text-muted,
.awesomplete > ul > li a,
.awesomplete > ul > li a *,
.ui-menu-item-wrapper small,
.ui-menu-item-wrapper .small,
.ui-menu-item-wrapper .text-muted,
.select2-results__option small,
.select2-results__option .small,
.select2-results__option .text-muted,
.dropdown-menu .dropdown-item small,
.dropdown-menu .dropdown-item .small,
.dropdown-menu .dropdown-item .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 700 !important;
}

.awesomplete > ul > li a,
.awesomplete > ul > li a:hover,
.awesomplete > ul > li a:focus,
.awesomplete > ul > li [data-value],
.link-field .awesomplete > ul > li,
.form-control + .awesomplete > ul > li {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.awesomplete > ul > li[aria-selected="true"],
.awesomplete > ul > li:hover,
.ui-state-active,
.ui-menu-item-wrapper.ui-state-active,
.select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(90deg, rgba(208, 94, 3, 0.32), rgba(229, 106, 0, 0.2)) !important;
    color: #ffffff !important;
}

/* Exact list sidebar structure polish (group-by, tags, save filter). */
.list-sidebar .list-group-by-fields,
.list-sidebar .list-tags,
.list-sidebar .save-filter-section {
    display: block;
}

.list-sidebar .group-by-field.list-link,
.list-sidebar .list-stats.list-link,
.list-sidebar .list-filters.list-link,
.list-sidebar .list-link {
    margin: 6px 6px !important;
    padding: 0 !important;
    list-style: none;
}

.list-sidebar .list-sidebar-button,
.list-sidebar .group-by-field .list-sidebar-button,
.list-sidebar .list-stats .list-sidebar-button,
.list-sidebar .list-filters a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    border: 1px solid #d7dfea !important;
    background: #eef2f8 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.list-sidebar .list-sidebar-button .ellipsis,
.list-sidebar .group-by-field .list-sidebar-button .ellipsis,
.list-sidebar .list-tags .list-sidebar-button > span:first-child,
.list-sidebar .list-filters a,
.list-sidebar .sidebar-action a {
    color: #cf9d00 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
}

.list-sidebar .list-sidebar-button:hover,
.list-sidebar .list-sidebar-button:focus,
.list-sidebar .list-filters a:hover,
.list-sidebar .list-filters a:focus,
.list-sidebar .sidebar-action a:hover {
    color: #f3c542 !important;
    border-color: #cf9d00 !important;
    background: linear-gradient(90deg, rgba(208, 94, 3, 0.2), rgba(229, 106, 0, 0.1)) !important;
}

.list-sidebar .list-sidebar-button > span:last-child,
.list-sidebar .group-by-field .list-sidebar-button > span:last-child,
.list-sidebar .list-stats .list-sidebar-button > span:last-child {
    margin-left: auto;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px;
    height: 18px;
}

.list-sidebar .list-sidebar-button .icon,
.list-sidebar .list-sidebar-button svg {
    width: 14px !important;
    height: 14px !important;
}

.list-sidebar .sidebar-label {
    margin: 12px 6px 6px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f2f4a !important;
}

.list-sidebar .save-filter-section .list-filters .form-control,
.list-sidebar .save-filter-section .list-filters input,
.list-sidebar .save-filter-section .list-filters .awesomplete .input-with-feedback {
    min-height: 40px !important;
    border-radius: 10px !important;
    background: #eef2f8 !important;
    border: 1px solid #d2dbe7 !important;
    color: #1e3550 !important;
}

.list-sidebar .group-by-dropdown,
.list-sidebar .list-stats-dropdown,
.list-sidebar .group-by-dropdown.dropdown-menu,
.list-sidebar .list-stats-dropdown.dropdown-menu {
    background: linear-gradient(180deg, #7e3200 0%, #b34a00 52%, #d86200 100%) !important;
    border: 1px solid #f2a24f !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 32px rgba(74, 26, 0, 0.44) !important;
}

.list-sidebar .group-by-dropdown .dropdown-item,
.list-sidebar .list-stats-dropdown .dropdown-item,
.list-sidebar .group-by-dropdown .group-by-item,
.list-sidebar .list-stats-dropdown .stat-link {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.list-sidebar .group-by-dropdown .dropdown-item:hover,
.list-sidebar .group-by-dropdown .group-by-item:hover,
.list-sidebar .list-stats-dropdown .dropdown-item:hover,
.list-sidebar .list-stats-dropdown .stat-link:hover {
    background: linear-gradient(90deg, rgba(208, 94, 3, 0.34), rgba(229, 106, 0, 0.22)) !important;
    color: #fff !important;
}

    /* List view switcher dropdown: keep link labels and icons white. */
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item,
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item .menu-item-label,
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item .icon,
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item .es-icon,
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item svg,
    html body .custom-actions .custom-btn-group .dropdown-menu .dropdown-item use {
        color: #ffffff !important;
        fill: #ffffff !important;
        stroke: #ffffff !important;
        opacity: 1 !important;
    }

.modal-backdrop {
    background-color: rgba(18, 27, 40, 0.52) !important;
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 46px;
        --page-head-height: 40px;
    }

    .cae-brand img {
        width: 23px;
        height: 23px;
    }

    .cae-brand-text {
        font-size: 11px;
    }
}




/* ===== Consolidated v4 overrides ===== */
:root {
    --cae-orange-1: #7d3200;
    --cae-orange-2: #b84c00;
    --cae-orange-3: #de6800;
    --cae-orange-border: #f2a24f;
}

/* Force all menu dropdowns to dark orange with bold white text. */
.dropdown-menu,
.dropdown-menu.show,
.navbar .dropdown-menu,
.standard-sidebar .dropdown-menu,
.list-sidebar .dropdown-menu {
    background: linear-gradient(180deg, var(--cae-orange-1) 0%, var(--cae-orange-2) 50%, var(--cae-orange-3) 100%) !important;
    border: 1px solid var(--cae-orange-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 32px rgba(74, 26, 0, 0.46) !important;
}

.dropdown-menu,
.dropdown-menu.show {
    --bs-dropdown-link-color: #ffffff !important;
    --bs-dropdown-link-hover-color: #ffffff !important;
    --bs-dropdown-link-active-color: #ffffff !important;
}

.dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item a,
.dropdown-menu .dropdown-item span,
.dropdown-menu .dropdown-item div,
.dropdown-menu .dropdown-item small,
.dropdown-menu .dropdown-item .small,
.dropdown-menu .dropdown-item .text-muted {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

.dropdown-menu a,
.dropdown-menu li > a,
.dropdown-menu .grey-link,
.dropdown-menu a.grey-link,
.dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item:link,
.dropdown-menu .dropdown-item:visited,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.dropdown-menu .menu-item-label,
.dropdown-menu .menu-item-icon,
.dropdown-menu .menu-item-icon svg,
.dropdown-menu .menu-item-icon use {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.dropdown-menu kbd,
.dropdown-menu .dropdown-item kbd,
.dropdown-menu .dropdown-item .pull-right {
    color: #ffffff !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 999px !important;
    opacity: 1 !important;
}

.dropdown-menu kbd span,
.dropdown-menu .dropdown-item kbd span {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)) !important;
}

/* Linked-document / Link field suggestions (Awesomplete, jQuery UI, Select2). */
.awesomplete > ul,
.ui-autocomplete,
.select2-dropdown,
.select2-container .select2-dropdown,
.select2-results {
    background: linear-gradient(180deg, var(--cae-orange-1) 0%, var(--cae-orange-2) 50%, var(--cae-orange-3) 100%) !important;
    border: 1px solid var(--cae-orange-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 32px rgba(74, 26, 0, 0.46) !important;
}

.awesomplete > ul > li,
.awesomplete > ul > li a,
.awesomplete > ul > li [data-value],
.awesomplete > ul > li span,
.awesomplete > ul > li div,
.awesomplete > ul > li small,
.awesomplete > ul > li .small,
.awesomplete > ul > li .text-muted,
.ui-menu-item-wrapper,
.ui-menu-item-wrapper span,
.ui-menu-item-wrapper div,
.ui-menu-item-wrapper small,
.ui-menu-item-wrapper .small,
.ui-menu-item-wrapper .text-muted,
.select2-results__option,
.select2-results__option span,
.select2-results__option div,
.select2-results__option small,
.select2-results__option .small,
.select2-results__option .text-muted {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

.awesomplete > ul > li:hover,
.awesomplete > ul > li[aria-selected="true"],
.ui-state-active,
.ui-menu-item-wrapper.ui-state-active,
.select2-results__option--highlighted[aria-selected] {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)) !important;
}

/* Awesomebar search suggestions: keep white text bold and remove yellow match blocks. */
.navbar search [role="listbox"],
.navbar [role="listbox"] {
    background: linear-gradient(180deg, var(--cae-orange-1) 0%, var(--cae-orange-2) 50%, var(--cae-orange-3) 100%) !important;
    border: 1px solid var(--cae-orange-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 32px rgba(74, 26, 0, 0.46) !important;
}

.navbar search [role="listbox"] a,
.navbar search [role="listbox"] a *,
.navbar [role="listbox"] a,
.navbar [role="listbox"] a *,
.navbar search [role="option"],
.navbar [role="option"] {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

/* Awesomebar typed-match highlight: keep contrast without heavy rendering rules. */
.navbar search [role="listbox"] mark,
.navbar [role="listbox"] mark,
.navbar search [role="listbox"] strong,
.navbar [role="listbox"] strong,
.navbar search [role="listbox"] b,
.navbar [role="listbox"] b {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.24) !important;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 900 !important;
}

/* List sidebar group-by/stats dropdowns and list links remain readable. */
.list-sidebar .group-by-dropdown,
.list-sidebar .list-stats-dropdown,
.list-sidebar .group-by-dropdown.dropdown-menu,
.list-sidebar .list-stats-dropdown.dropdown-menu {
    background: linear-gradient(180deg, var(--cae-orange-1) 0%, var(--cae-orange-2) 50%, var(--cae-orange-3) 100%) !important;
    border: 1px solid var(--cae-orange-border) !important;
}

.list-sidebar .group-by-dropdown .dropdown-item,
.list-sidebar .list-stats-dropdown .dropdown-item,
.list-sidebar .group-by-dropdown .group-by-item,
.list-sidebar .list-stats-dropdown .stat-link {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Prevent muted detail text from turning invisible inside any orange popups. */
.dropdown-menu .text-muted,
.awesomplete .text-muted,
.ui-autocomplete .text-muted,
.select2-dropdown .text-muted,
.select2-results .text-muted,
.dropdown-menu .text-extra-muted,
.awesomplete .text-extra-muted,
.ui-autocomplete .text-extra-muted,
.select2-dropdown .text-extra-muted,
.select2-results .text-extra-muted {
    color: rgba(255, 255, 255, 0.92) !important;
    opacity: 1 !important;
}

/* Detail view title-area cleanup: keep document title and status visible on all doctypes. */
.form-page .page-title .title-area,
.form-page .page-title .title-area .title-text,
.form-page .page-title .title-area .sub-heading,
.form-page .page-title .title-area a,
.form-page .page-title .title-area .ellipsis,
.form-page .page-title .title-area .title-icon,
.form-page .page-title .title-area .title-icon svg,
.form-page .page-title .title-area .title-icon use {
    color: #16344f !important;
    fill: #16344f !important;
    stroke: #16344f !important;
    opacity: 1 !important;
}

.form-page .page-title .title-area .title-text,
.form-page .page-title .title-area .ellipsis {
    font-weight: 800 !important;
}

/* Detail form header colors: docname in white, document title in golden. */
.form-page .page-title .title-area .title-text,
.form-page .page-title .title-area .title-text.ellipsis,
.form-page .page-title .title-area h3 {
    color: #f4c542 !important;
    font-weight: 800 !important;
}

.form-page .page-title .title-area .sub-heading,
.form-page .page-title .title-area .sub-heading .ellipsis,
.form-page .page-title .title-area .sub-heading a {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Docname in top breadcrumbs (e.g. SAL-ORD-2026-00609) stays white and bold. */
#navbar-breadcrumbs li.disabled,
#navbar-breadcrumbs li.disabled a,
.navbar #navbar-breadcrumbs li.disabled,
.navbar #navbar-breadcrumbs li.disabled a {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Actual form detail-view nodes (Sales Order and similar): */
.form-page .page-head .page-title .title-area .title-text,
.form-page .page-head .page-title .title-area .title-text.ellipsis,
.form-page .page-head .page-title .title-area h3.title-text,
.form-page .page-head .page-title .title-area h3.title-text.ellipsis {
    color: #f4c542 !important;
    -webkit-text-fill-color: #f4c542 !important;
    font-weight: 800 !important;
}

.form-page .page-head .page-title .title-area .sub-heading,
.form-page .page-head .page-title .title-area .sub-heading .ellipsis,
.form-page .page-head .page-title .title-area .sub-heading a {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 800 !important;
}

.form-page #navbar-breadcrumbs li.disabled,
.form-page #navbar-breadcrumbs li.disabled a,
.form-page #navbar-breadcrumbs li.disabled span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 800 !important;
}

/* Keep generic title text readable where page-head theme is light. */
.page-title .title-area .title-text,
.page-title .title-area .title-text.ellipsis,
.title-area .title-text,
.title-area .title-text.ellipsis,
.title-area .ellipsis {
    opacity: 1 !important;
}

.form-page .page-title .title-area .indicator-pill,
.form-page .page-title .title-area .indicator-pill.no-indicator-dot,
.form-page .page-title .title-area .indicator-pill.orange,
.form-page .page-title .title-area .indicator-pill.no-indicator-dot.whitespace-nowrap.orange,
.page-title .title-area .indicator-pill.no-indicator-dot.whitespace-nowrap.orange,
.title-area .indicator-pill.no-indicator-dot.whitespace-nowrap.orange,
.form-page .page-title .title-area .indicator-pill.gray,
.form-page .page-title .title-area .indicator-pill.grey {
    color: #ffffff !important;
    font-weight: 800 !important;
    background: linear-gradient(180deg, #9a3d00 0%, #c95500 100%) !important;
    border: 1px solid #efb57a !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
}

.form-page .page-title .title-area .indicator-pill.no-indicator-dot.whitespace-nowrap.orange *,
.page-title .title-area .indicator-pill.no-indicator-dot.whitespace-nowrap.orange * {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Listbox dropdown visibility cleanup (awesomplete/select2/aria listbox variants). */
[role="listbox"],
.listbox,
.awesomplete > ul,
.ui-autocomplete,
.select2-results,
.select2-dropdown {
    background: linear-gradient(180deg, var(--cae-orange-1) 0%, var(--cae-orange-2) 50%, var(--cae-orange-3) 100%) !important;
    border: 1px solid var(--cae-orange-border) !important;
}

[role="listbox"] [role="option"],
[role="listbox"] li,
.listbox [role="option"],
.listbox li,
.awesomplete > ul > li,
.awesomplete > ul > li a,
.ui-autocomplete .ui-menu-item-wrapper,
.select2-results__option,
.select2-results__option * {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

[role="listbox"] [role="option"]:hover,
[role="listbox"] [role="option"][aria-selected="true"],
.awesomplete > ul > li:hover,
.awesomplete > ul > li[aria-selected="true"],
.ui-autocomplete .ui-state-active,
.select2-results__option--highlighted[aria-selected] {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)) !important;
}

/* Final fix: detail view document name is in page-head, not inside form-page. */
.page-head .page-title .title-area .title-text,
.page-head .page-title .title-area .title-text.ellipsis,
.page-head .page-title .title-area .ellipsis,
.page-head .page-title h3.title-text.ellipsis {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-fill-color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
}

/* Keep awesomebar matched text visibly highlighted and readable. */
.navbar [role="listbox"] [role="option"] mark,
.navbar [role="listbox"] [role="option"] strong,
.navbar [role="listbox"] [role="option"] b,
.navbar [role="listbox"] li mark,
.navbar [role="listbox"] li strong,
.navbar [role="listbox"] li b {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.24) !important;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 900 !important;
}

/* Final priority override for awesomebar match chips. */
.navbar .search-bar .awesomplete > ul[role="listbox"] > li > a > span > mark,
.navbar .search-bar .awesomplete > ul[role="listbox"] > li > a > span > strong,
.navbar .search-bar .awesomplete > ul[role="listbox"] > li > a > span > b {
    color: #ffe9c6 !important;
    -webkit-text-fill-color: #ffe9c6 !important;
    background-color: transparent !important;
    text-shadow: 0 0 0.01px #ffe9c6, 0 1px 0 rgba(0, 0, 0, 0.25) !important;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 900 !important;
}
