/* Shared visual polish for the authenticated application shell. */
:root {
    --bc-ink: #263b52;
    --bc-muted: #60758a;
    --bc-line: #dbe4ec;
    --bc-blue: #0064a9;
    --bc-blue-soft: #eaf4fa;
}

body *,
body *::before,
body *::after {
    box-shadow: none !important;
    text-shadow: none !important;
}

body .layout-page,
body .content-wrapper {
    min-width: 0;
    background: #f6f8fa;
}

.ui-navigation-status {
    position: fixed;
    z-index: 3000;
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    right: 0.75rem;
    display: none;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd8e3;
    border-radius: 0.55rem;
    background: #fff;
    color: #28465e;
    font-size: 0.85rem;
    font-weight: 600;
}

.ui-navigation-status__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d9e7ef;
    border-top-color: var(--bc-blue);
    border-radius: 50%;
    animation: ui-loading-spin 0.75s linear infinite;
}

html.ui-navigation-loading .ui-navigation-status {
    display: flex;
}

html.ui-navigation-loading body::before {
    position: fixed;
    z-index: 2999;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--bc-blue);
    content: '';
    animation: ui-navigation-progress 1.2s ease-in-out infinite;
}

@keyframes ui-navigation-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#layout-menu {
    background: #fff !important;
    border-right: 1px solid var(--bc-line);
    box-shadow: none !important;
}

#layout-menu .app-brand.demo {
    min-height: 5.5rem;
    padding: 1.1rem 1.15rem 0.7rem;
}

#layout-menu .app-brand-logo.demo {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

#layout-menu .app-brand-logo.demo img {
    display: block;
    width: min(100%, 11.75rem) !important;
    height: auto;
    object-fit: contain;
}

#layout-menu > .d-flex.flex-column {
    margin: 0.1rem 0 0.85rem;
}

#layout-menu .btn-group.dropend > .btn {
    min-height: 2.75rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.65rem !important;
    font-weight: 600;
    box-shadow: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

#layout-menu .menu-inner {
    padding-top: 0.25rem !important;
    scrollbar-width: thin;
    scrollbar-color: #c7d4df transparent;
}

#layout-menu .menu-inner > hr.dropdown-divider {
    display: none;
}

#layout-menu .menu-inner > .menu-header {
    width: 100%;
    height: auto;
    margin: 0.85rem 0 0.15rem;
    padding: 0.6rem 1.45rem 0.35rem;
    color: var(--bc-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

#layout-menu .menu-inner > .menu-header::before {
    display: none;
}

#layout-menu .menu-inner > .menu-item {
    width: 100%;
    margin: 0.12rem 0;
}

#layout-menu .menu-inner > .menu-item .menu-link {
    min-height: 2.75rem;
    margin: 0 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    color: #526581;
    transition: background-color 150ms ease, color 150ms ease;
}

#layout-menu .menu-inner .menu-link > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

#layout-menu .menu-inner > .menu-item > .menu-link > div {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

#layout-menu .ui-menu-attention-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

#layout-menu .menu-inner .menu-link .menu-icon {
    flex: 0 0 1.35rem;
    width: 1.35rem;
    font-size: 1.18rem;
    color: #60758d;
}

#layout-menu .menu-inner > .menu-item > .menu-link:hover,
#layout-menu .menu-inner .menu-sub .menu-link:hover {
    background: #edf5fb !important;
    color: #00568f;
}

#layout-menu .menu-inner > .menu-item.active::before {
    display: none;
}

#layout-menu .menu-inner > .menu-item.active > .menu-link {
    background: var(--bc-blue-soft) !important;
    color: var(--bc-blue) !important;
    font-weight: 650;
    box-shadow: none !important;
}

#layout-menu .menu-inner > .menu-item.active > .menu-link .menu-icon {
    color: var(--bc-blue) !important;
}

#layout-menu .menu-inner > .menu-item.open > .menu-toggle {
    color: #00568f;
    background: var(--bc-blue-soft);
}

#layout-menu .menu-inner .menu-sub .menu-link {
    min-height: 2.35rem;
    padding-block: 0.5rem;
}

/* The theme draws a bullet at the same x position as our compact submenu
   labels. Remove that decoration so it never sits on top of a letter. */
#layout-menu .menu-inner .menu-sub > .menu-item > .menu-link::before {
    display: none !important;
}

#layout-menu .menu-inner .menu-sub > .menu-item > .menu-link {
    margin-right: 0.75rem;
    padding-left: 1rem;
    padding-right: 0.75rem;
}

#layout-menu .menu-inner .menu-sub > .menu-item > .menu-link > div {
    line-height: 1.35;
}

#layout-menu .menu-inner .ui-settings-submenu {
    max-height: min(62vh, 36rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

#layout-menu .menu-inner .menu-sub > .menu-item.active > .menu-link {
    color: #00568f !important;
    background: var(--bc-blue-soft) !important;
    font-weight: 600;
}

#layout-menu .menu-link:focus-visible,
#layout-menu .btn:focus-visible {
    outline: 2px solid var(--bc-blue);
    outline-offset: 2px;
}

#layout-navbar {
    border: 1px solid var(--bc-line);
    border-radius: 0.7rem;
    box-shadow: none !important;
}

#layout-navbar .navbar-search-trigger {
    min-width: 0;
    color: var(--bc-muted);
}

#layout-navbar .navbar-search-trigger > .bx {
    font-size: 1.2rem;
}

#layout-navbar .navbar-search-trigger #global-search {
    color: var(--bc-muted);
    text-align: left;
    white-space: nowrap;
}

#layout-navbar .navbar-search-trigger #global-search:hover,
#layout-navbar .navbar-search-trigger #global-search:focus-visible {
    color: var(--bc-blue);
}

#layout-navbar .navbar-nav .nav-link:hover {
    color: var(--bc-blue);
}

body .layout-page .card {
    border: 1px solid var(--bc-line);
    border-radius: 0.7rem;
    box-shadow: none !important;
}

body .layout-page .card-header {
    border-bottom-color: var(--bc-line);
    border-radius: 0.7rem 0.7rem 0 0;
}

body .layout-page .card-footer {
    border-top-color: var(--bc-line);
    border-radius: 0 0 0.7rem 0.7rem;
}

body .layout-page .card-header :is(h4, h5, h6) {
    color: var(--bc-ink);
    line-height: 1.35;
}

body .layout-page .card-header :is(.bx, .bi, .fas, .fa) {
    vertical-align: -0.1em;
}

body .layout-page .btn,
body .layout-page .form-control,
body .layout-page .form-select {
    border-radius: 0.55rem;
}

body .layout-page .form-control,
body .layout-page .form-select {
    border-color: #d5e0eb;
}

body .layout-page .form-control:focus,
body .layout-page .form-select:focus {
    border-color: #5aa4d2;
    box-shadow: none !important;
    outline: 2px solid #72aed0;
    outline-offset: 1px;
}

body .layout-page .dropdown-menu {
    border: 1px solid var(--bc-line);
    border-radius: 0.55rem;
    box-shadow: none !important;
}

body .layout-page .dropdown-item {
    border-radius: 0.35rem;
}

body .layout-page .dropdown-item:focus-visible,
body .layout-page .btn:focus-visible {
    outline: 2px solid var(--bc-blue);
    outline-offset: 2px;
}

body .layout-page .table > thead > tr > th {
    background: #f3f7fb;
    color: #526581;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

body .layout-page .table > tbody > tr:hover {
    background-color: #f9fbfe;
}

body .layout-page .breadcrumb {
    color: var(--bc-muted);
}

body .layout-page .breadcrumb-item.active {
    color: #40566e;
    font-weight: 600;
}

.modal-content {
    border: 1px solid var(--bc-line);
    border-radius: 0.7rem;
    box-shadow: none !important;
}

/* Flat surfaces across the shared shell and all authenticated pages. */
#layout-menu,
#layout-menu *,
#layout-navbar,
#layout-navbar *,
body .layout-page *,
body .modal *,
body .offcanvas *,
body .authentication-wrapper *,
body .select2-container *,
body .daterangepicker,
body .popover,
body .toast,
body .swal2-popup,
body .apexcharts-tooltip,
body > .biocheck-floating-columns-menu {
    box-shadow: none !important;
}

body .authentication-wrapper .card {
    border: 1px solid var(--bc-line);
    border-radius: 0.7rem;
    box-shadow: none !important;
}

body .authentication-wrapper .form-control:focus {
    box-shadow: none !important;
    border-color: #5aa4d2;
    outline: 2px solid #72aed0;
    outline-offset: 1px;
}

body .select2-container .select2-selection,
body .select2-container .select2-dropdown,
body .daterangepicker,
body .popover,
body .toast {
    border-color: var(--bc-line);
    box-shadow: none !important;
}

body .layout-page .card[class*="card-border-shadow-"]::after,
body .layout-page .card[class*="card-border-shadow-"]:hover::after {
    box-shadow: none !important;
}

body .layout-page .progress,
body .layout-page .progress-bar {
    box-shadow: none !important;
}

body .layout-page .btn {
    font-weight: 600;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

body .layout-page .btn > :is(.bx, .bi, .fas, .fa) {
    vertical-align: -0.1em;
}

body .layout-page .btn-outline-primary:hover,
body .layout-page .btn-outline-secondary:hover {
    box-shadow: none !important;
}

body .layout-page .badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

body .layout-page .table-responsive,
body .layout-page .fixed-table-body {
    max-width: 100%;
    scrollbar-width: thin;
}

body .layout-page .card,
body .layout-page .card-body,
body .layout-page .row > * {
    min-width: 0;
}

body .layout-page .table > tbody > tr > :is(th, td) {
    border-bottom-color: #e8edf2;
}

body .layout-page .nav-tabs {
    border-bottom-color: var(--bc-line);
}

body .layout-page .nav-tabs .nav-link {
    border-radius: 0.4rem 0.4rem 0 0;
}

body .layout-page .alert {
    border: 1px solid var(--bc-line);
    border-radius: 0.55rem;
}

body .layout-page :is(a, button, input, select, textarea, [tabindex]):focus-visible,
body .modal :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #72aed0;
    outline-offset: 2px;
}

body .content-footer {
    border-top: 1px solid var(--bc-line);
    box-shadow: none !important;
}

body .timer-img,
body .chat-img {
    border: 1px solid var(--bc-line);
    box-shadow: none !important;
}

body .timer-img:hover,
body .chat-img:hover {
    transform: none;
}

/* Page-level design language shared by workspace and superadmin screens. */
body .layout-page .container-fluid {
    min-width: 0;
}

body .layout-page .content-wrapper > .container-fluid,
body .layout-page .content-wrapper > .container-xxl {
    padding-block: 0.35rem 1.5rem;
}

body .layout-page .breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

body .layout-page .breadcrumb a {
    color: var(--bc-muted);
    text-decoration: none;
}

body .layout-page .breadcrumb a:hover {
    color: var(--bc-blue);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

body .layout-page .card {
    overflow-wrap: anywhere;
    background: #fff;
}

body .layout-page .card-header {
    padding: 1rem 1.2rem;
    background: #fff;
}

body .layout-page .card-header :is(h4, h5, h6),
body .layout-page .card-title {
    margin-bottom: 0;
    font-weight: 650;
    letter-spacing: -0.015em;
}

body .layout-page .card-body {
    padding: 1.15rem 1.2rem;
}

body .layout-page .card-footer {
    background: #fff;
}

body .layout-page .card[class*="card-border-shadow-"] {
    border-bottom: 1px solid var(--bc-line);
    border-top: 3px solid var(--bc-blue);
    z-index: auto;
}

body .layout-page .card[class*="card-border-shadow-"]::after {
    display: none;
}

body .layout-page .card.card-border-shadow-warning { border-top-color: #cc8700; }
body .layout-page .card.card-border-shadow-success { border-top-color: #16835d; }
body .layout-page .card.card-border-shadow-danger { border-top-color: #c64747; }
body .layout-page .card.card-border-shadow-info { border-top-color: #1683a2; }
body .layout-page .card.card-border-shadow-secondary { border-top-color: #65778b; }

body .layout-page .avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem !important;
}

body .layout-page .avatar-initial > :is(i, .bx) {
    font-size: 1.15rem;
}

body .layout-page .btn {
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background-image: none !important;
}

body .layout-page .btn-primary {
    color: #fff;
    background-color: var(--bc-blue);
    border-color: var(--bc-blue);
}

body .layout-page .btn-primary:hover,
body .layout-page .btn-primary:focus-visible {
    background-color: #00568f;
    border-color: #00568f;
}

body .layout-page .btn-outline-secondary {
    color: #4e657a;
    border-color: #bdcbd7;
}

body .layout-page .btn-outline-secondary:hover {
    color: #1f3850;
    background-color: #eef3f6;
    border-color: #a9bbc9;
}

body .layout-page .form-label,
body .layout-page label.form-label {
    color: #385066;
    font-weight: 600;
    font-size: 0.82rem;
}

body .layout-page :is(.form-control, .form-select, .select2-selection, .input-group-text) {
    min-height: 2.5rem;
    background-color: #fff;
    border-color: #cedbe5;
}

body .layout-page :is(.form-control, .form-select)::placeholder {
    color: #90a0af;
}

body .layout-page .form-text {
    color: var(--bc-muted);
    line-height: 1.5;
}

body .layout-page .table {
    margin-bottom: 0;
    border-color: #e6edf2;
}

body .layout-page .table > thead > tr > th {
    padding: 0.75rem 0.85rem;
    background: #f1f5f8;
    color: #3c5369;
    white-space: nowrap;
}

body .layout-page .table > tbody > tr > :is(th, td) {
    padding: 0.78rem 0.85rem;
    vertical-align: middle;
}

body .layout-page .table > tbody > tr:last-child > :is(th, td) {
    border-bottom: 0;
}

body .layout-page .fixed-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

body .layout-page .fixed-table-toolbar :is(.search, .columns, .bs-bars) {
    float: none !important;
    margin: 0 !important;
}

body .layout-page .fixed-table-toolbar .search input {
    min-width: min(16rem, 100%);
}

body .layout-page .fixed-table-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    color: var(--bc-muted);
}

body .layout-page .pagination .page-link {
    min-width: 2rem;
    text-align: center;
    border-color: var(--bc-line);
    box-shadow: none !important;
}

body .layout-page .pagination .active .page-link {
    background: var(--bc-blue);
    border-color: var(--bc-blue);
}

body .layout-page .nav-tabs .nav-link {
    color: #60758a;
    font-weight: 600;
}

body .layout-page .nav-tabs .nav-link.active {
    color: var(--bc-blue);
    border-color: var(--bc-line) var(--bc-line) #fff;
}

body .layout-page .ui-usage-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    max-width: 100%;
    margin: 0;
    padding: 0.25rem;
    border: 1px solid #d9e5ed;
    border-radius: 0.65rem;
    background: #f3f7fa;
}

body .layout-page .ui-usage-tabs .nav-link {
    min-height: 2.4rem;
    padding: 0.5rem 0.85rem;
    border: 0 !important;
    border-radius: 0.42rem;
    background: transparent !important;
    color: #536b80;
    white-space: nowrap;
}

body .layout-page .ui-usage-tabs .nav-link:hover:not(.active) {
    background: #e3edf4 !important;
    color: #00568f;
}

body .layout-page .ui-usage-tabs .nav-link.active {
    background: var(--bc-blue) !important;
    color: #fff !important;
    box-shadow: none !important;
}

body .layout-page .ui-usage-tabs .nav-link:focus-visible {
    outline-offset: 1px;
}

body .layout-page .accordion-item {
    border-color: var(--bc-line);
    box-shadow: none !important;
}

body .layout-page .accordion-button {
    color: var(--bc-ink);
    background: #fff;
    box-shadow: none !important;
}

body .layout-page .accordion-button:not(.collapsed) {
    color: var(--bc-blue);
    background: var(--bc-blue-soft);
}

body .layout-page .progress {
    background: #e9eff3;
}

body .layout-page .progress-bar {
    background-image: none !important;
}

body .modal .modal-header,
body .modal .modal-footer {
    border-color: var(--bc-line);
}

body .modal .modal-title {
    color: var(--bc-ink);
    font-weight: 650;
}

body .modal .modal-content {
    overflow: hidden;
}

body .select2-container .select2-selection,
body .daterangepicker,
body .flatpickr-calendar {
    border-radius: 0.55rem;
}

body .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--bc-blue);
}

body .dropdown-menu .dropdown-item:hover,
body .dropdown-menu .dropdown-item:focus-visible {
    background: var(--bc-blue-soft);
    color: #00568f;
}

/* Loading surfaces share one quiet, non-glowing skeleton language. */
.ui-page-skeleton {
    display: none;
}

html:is(.ui-page-loading, .ui-navigation-loading) .layout-page {
    position: relative;
}

html:is(.ui-page-loading, .ui-navigation-loading) .layout-page .content-wrapper {
    visibility: hidden;
}

html:is(.ui-page-loading, .ui-navigation-loading) .layout-page .ui-page-skeleton {
    position: absolute;
    z-index: 25;
    inset: 5.5rem 0 0;
    display: block;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    padding: 1.3rem 1.5rem;
    background: #f6f8fa;
    overflow: hidden;
    pointer-events: none;
}

/* The fixed desktop menu occupies the layout-page's left padding. Absolute
   children start at its outer edge, so keep the loading surface in the content area. */
@media (min-width: 1200px) {
    html.layout-menu-fixed:not(.layout-menu-collapsed):is(.ui-page-loading, .ui-navigation-loading)
    .layout-content-navbar .layout-page .ui-page-skeleton {
        left: 16.25rem;
    }
}

#loadingState,
.ui-dashboard-skeleton,
.ui-page-skeleton__grid,
.ui-dashboard-skeleton__metrics,
.ui-dashboard-skeleton__charts {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

#loadingState,
.ui-dashboard-skeleton {
    width: 100%;
    overflow: hidden;
}

.ui-skeleton-block {
    border-radius: 0.35rem;
    background: #e7edf2;
    animation: ui-skeleton-pulse 1.45s ease-in-out infinite;
}

.ui-page-skeleton__heading {
    width: min(15rem, 60%);
    height: 1.25rem;
    margin-bottom: 1.25rem;
}

.ui-page-skeleton__grid,
.ui-dashboard-skeleton__metrics,
.ui-dashboard-skeleton__charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 1rem;
}

.ui-skeleton-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 1.2rem;
    border: 1px solid var(--bc-line);
    border-radius: 0.7rem;
    background: #fff;
}

.ui-skeleton-line {
    width: 58%;
    height: 0.75rem;
    margin-bottom: 1rem;
}

.ui-skeleton-value {
    width: 38%;
    height: 1.6rem;
}

.ui-skeleton-row {
    width: 100%;
    height: 0.9rem;
    margin-top: 1.15rem;
}

.ui-skeleton-row:last-child {
    width: 72%;
}

.ui-page-skeleton__panel {
    margin-top: 1rem;
    min-height: 13rem;
}

.ui-dashboard-skeleton__charts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    margin-top: 1rem;
}

.ui-dashboard-skeleton__charts .ui-skeleton-card {
    min-height: 13rem;
}

.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.open {
    top: 0;
    min-height: 10rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--bc-line);
}

.bootstrap-table .fixed-table-loading .loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: var(--bc-muted);
    font-size: 0.82rem;
}

.bootstrap-table .fixed-table-loading .loading-wrap::before {
    content: '';
    width: 2rem;
    height: 2rem;
    border: 2px solid #dce7ef;
    border-top-color: var(--bc-blue);
    border-radius: 50%;
    animation: ui-loading-spin 0.75s linear infinite;
}

.bootstrap-table .fixed-table-loading .loading-wrap .bx-loader-alt,
.bootstrap-table .fixed-table-loading .loading-wrap .animation-wrap {
    display: none;
}

.bootstrap-table .fixed-table-loading.open:not(:has(.loading-wrap)) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--bc-muted);
}

.bootstrap-table .fixed-table-loading.open:not(:has(.loading-wrap))::after {
    content: 'Loading…';
    font-size: 0.82rem;
}

@keyframes ui-skeleton-pulse {
    50% { opacity: 0.52; }
}

@keyframes ui-loading-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1199.98px) {
    #layout-menu .app-brand.demo {
        padding-right: 3.5rem !important;
    }

    #layout-menu {
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .ui-page-skeleton__grid,
    .ui-dashboard-skeleton__metrics {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    }

    .ui-dashboard-skeleton__charts {
        grid-template-columns: 1fr;
    }

    body .layout-page .card-header {
        align-items: flex-start !important;
        gap: 0.7rem;
    }

    body .layout-page .fixed-table-toolbar .search {
        flex: 1 1 100%;
        width: 100%;
    }

    body .layout-page .fixed-table-toolbar .search input {
        width: 100%;
    }

    body .layout-page .fixed-table-pagination {
        align-items: flex-start;
    }

    body .layout-page .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    body .layout-page .nav-tabs .nav-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 575.98px) {
    #layout-navbar {
        min-height: 3.6rem;
        padding-inline: 0.45rem !important;
    }

    #layout-navbar .layout-menu-toggle {
        margin-right: 0.15rem !important;
    }

    #layout-navbar .navbar-nav-right {
        min-width: 0;
    }

    #layout-navbar :is(.layout-menu-toggle .nav-link, .navbar-notifications .nav-link, .navbar-announcements .nav-link, .navbar-user .nav-link) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.5rem;
        min-height: 2.5rem;
    }

    #layout-navbar .navbar-search-trigger {
        flex: 0 0 2.4rem;
        justify-content: center;
    }

    #layout-navbar .navbar-search-trigger #global-search {
        font-size: 0;
        margin: 0 !important;
    }

    #layout-navbar .navbar-language .btn {
        min-width: 2.5rem;
        min-height: 2.5rem;
        padding: 0.4rem !important;
    }

    #layout-navbar .navbar-nav .nav-link .bx,
    #layout-navbar .navbar-search-trigger > .bx {
        font-size: 1.3rem;
    }

    html:is(.ui-page-loading, .ui-navigation-loading) .layout-page .ui-page-skeleton {
        padding: 1rem;
    }

    .ui-page-skeleton__grid,
    .ui-dashboard-skeleton__metrics {
        gap: 0.65rem;
    }

    .ui-skeleton-card {
        padding: 0.85rem;
    }

    #layout-menu .menu-inner > .menu-header {
        margin-top: 0.65rem;
    }

    body .layout-page .card {
        border-radius: 0.75rem;
    }

    body .layout-page .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    body .layout-page .breadcrumb {
        flex-wrap: wrap;
        row-gap: 0.2rem;
    }

    body .layout-page .card-header,
    body .layout-page .card-body,
    body .layout-page .card-footer {
        padding: 0.9rem;
    }

    body .layout-page .btn {
        min-height: 2.4rem;
    }

    body .layout-page .table-responsive {
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    body .modal .modal-dialog {
        margin: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #layout-menu .menu-link,
    body .layout-page .btn,
    .ui-skeleton-block {
        animation: none !important;
        transition: none !important;
    }
}

/* Common controls: the same quiet surfaces across workspace, tracker and admin forms. */
body .layout-page :is(.form-control, .form-select),
body .modal :is(.form-control, .form-select) {
    min-width: 0;
    min-height: 2.75rem;
    color: var(--bc-ink);
    border: 1px solid #cbd8e3;
    border-radius: 0.55rem;
    background-color: #fff;
    font-size: 0.94rem;
    line-height: 1.4;
    transition: border-color 150ms ease, background-color 150ms ease;
}

body :is(.layout-page, .modal) :is(.form-control, .form-select):hover:not(:disabled) {
    border-color: #95aec2;
}

body :is(.layout-page, .modal) :is(.form-control, .form-select):focus {
    border-color: var(--bc-blue);
    outline: 2px solid #c5e0ef;
    outline-offset: 1px;
    box-shadow: none !important;
}

body :is(.layout-page, .modal) :is(.form-control, .form-select):disabled {
    background-color: #f1f5f8;
    color: #8797a6;
}

body :is(.layout-page, .modal) textarea.form-control {
    min-height: 7rem;
    resize: vertical;
}

body :is(.layout-page, .modal) .form-label {
    margin-bottom: 0.45rem;
    color: #3d5269;
    font-size: 0.85rem;
    font-weight: 650;
}

body :is(.layout-page, .modal) .form-label > :is(.bx, .bi) {
    color: var(--bc-blue);
    font-size: 1rem;
    vertical-align: -0.13em;
}

body :is(.layout-page, .modal) .form-check-input {
    border-color: #a7bacb;
    box-shadow: none !important;
}

body :is(.layout-page, .modal) .form-check-input:checked {
    background-color: var(--bc-blue);
    border-color: var(--bc-blue);
}

body :is(.layout-page, .modal) .input-group-text {
    color: #536c80;
    border-color: #cbd8e3;
    background: #f4f8fb;
}

body .select2-container {
    max-width: 100%;
    font-size: 0.94rem;
}

/* Keep the legacy theme's outer Select2 wrapper transparent: one border belongs
   on the actual selection control. */
body .select2.select2-container.select2-container--default:not(#global-search + .select2-container) {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 0.94rem !important;
    line-height: normal !important;
}

body .select2-container .select2-selection--single,
body .select2-container .select2-selection--multiple {
    min-height: 2.75rem;
    border: 1px solid #cbd8e3 !important;
    border-radius: 0.55rem !important;
    background: #fff !important;
    transition: border-color 150ms ease;
}

/* custom.css has an unusually specific border:0 rule on multi-selects. */
body .select2-container--default .select2-selection--multiple:not(#global-search + .select2-container .select2-selection--single) {
    border: 1px solid #cbd8e3 !important;
}

body .select2-container .select2-selection--single:hover,
body .select2-container .select2-selection--multiple:hover {
    border-color: #95aec2 !important;
}

body .select2-container--focus .select2-selection,
body .select2-container--open .select2-selection {
    border-color: var(--bc-blue) !important;
    outline: 2px solid #c5e0ef;
    outline-offset: 1px;
}

body .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0.85rem;
    padding-right: 2.2rem;
    color: var(--bc-ink);
    line-height: 2.55rem;
}

body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.55rem;
    right: 0.6rem;
}

body .select2-container--default .select2-selection--multiple {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    column-gap: 0.125rem;
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0.3rem 0.65rem;
    overflow: hidden;
}

body .select2-container--default .select2-selection--multiple.select2-selection--clearable {
    padding-right: 3rem;
}

body .select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    float: none;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%);
    border: 1px solid #d3e0e9;
    border-radius: 0.4rem;
    background: #f7fafc;
    color: #526b80;
    font-size: 1.15rem;
    line-height: 1;
}

body .select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
    border-color: #aabfce;
    background: #eaf4fa;
    color: #00568f;
}

body .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8cad7 transparent;
    white-space: nowrap;
}

body .select2-container--default .select2-selection--multiple .select2-selection__rendered:empty {
    display: none;
}

body .select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    height: 0.25rem;
}

body .select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-thumb {
    border-radius: 1rem;
    background: #b8cad7;
}

/* Select2's inline search is a floated list item. Center its containing row
   inside the control while retaining the left-to-right chip and search order. */
body .select2-container--default .select2-selection--multiple .select2-search--inline {
    vertical-align: middle;
}

body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    float: none;
    max-width: min(18rem, 90%);
    margin: 0.13rem 0.125rem 0.13rem 0;
    padding: 0.22rem 0.35rem 0.22rem 0.55rem;
    color: #145884;
    border: 1px solid #cde3f0;
    border-radius: 0.35rem;
    background: #eaf5fb;
    font-size: 0.88rem;
    line-height: 1.3;
}

body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: static;
    order: 2;
    display: inline-grid;
    flex: 0 0 1.25rem;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #4f7792;
    font-size: 1rem;
    line-height: 1;
}

body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: #d4e9f5;
    color: #00568f;
}

body .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    order: 1;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .select2-container--default .select2-search--inline {
    float: none;
    display: block;
    flex: 1 1 8rem;
    min-width: min(8rem, 100%);
    margin: 0;
}

body .select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline {
    position: absolute;
    left: 0.65rem;
    bottom: 0.3rem;
    flex: 0 0 1px;
    min-width: 1px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

body .select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline:focus-within,
body .select2-container--default.select2-container--open .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline {
    position: static;
    flex: 1 1 8rem;
    min-width: min(8rem, 100%);
    width: auto;
    height: auto;
    overflow: visible;
    opacity: 1;
}

body .select2-container--default .select2-search--inline .select2-search__field {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    height: 1.65rem !important;
    min-height: 1.65rem;
    margin: 0 !important;
    padding: 0.1rem 0.2rem;
    border: 0 !important;
    outline: 0 !important;
    color: var(--bc-ink);
    font: inherit;
    white-space: nowrap;
    overflow: hidden;
}

body .select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-search__field {
    width: 1px !important;
    min-width: 1px;
    padding: 0 !important;
}

body .select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline:focus-within .select2-search__field,
body .select2-container--default.select2-container--open .select2-selection--multiple:has(.select2-selection__choice) .select2-search__field {
    width: 100% !important;
    min-width: 0;
    padding: 0.1rem 0.2rem !important;
}

body .select2-container--default .select2-selection__placeholder,
body .select2-container .select2-search__field::placeholder {
    color: #91a2b1 !important;
}

/* A report filter can contain many people. Keep its trigger concise and put
   the complete selection in the searchable list and the count below it. */
body .tt-user-filter-compact .select2-selection--multiple {
    min-height: 2.75rem;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
}

body .tt-user-filter-compact .select2-selection--multiple::after {
    content: '';
    flex: 0 0 0.48rem;
    width: 0.48rem;
    height: 0.48rem;
    margin: -0.25rem 0.1rem 0 0.55rem;
    transform: rotate(45deg);
    border-right: 1.5px solid #607b91;
    border-bottom: 1.5px solid #607b91;
}

body .tt-user-filter-compact.select2-container--open .select2-selection--multiple::after {
    margin-top: 0.2rem;
    transform: rotate(225deg);
}

body .tt-user-filter-compact .select2-selection__rendered {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

body .select2-container--default.tt-user-filter-compact .select2-selection--multiple .select2-selection__choice {
    display: none;
}

body .tt-user-filter-compact.select2-container--open .select2-selection__rendered {
    position: static;
    flex: 1 1 auto;
    width: auto;
    height: auto;
    min-width: 0;
    overflow: visible;
    clip-path: none;
    pointer-events: auto;
}

body .tt-user-filter-compact .tt-user-filter-summary {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--bc-ink);
    font-size: 0.94rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

body .tt-user-filter-compact .select2-search--inline {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

body .tt-user-filter-compact.select2-container--open .tt-user-filter-summary {
    display: none;
}

body .tt-user-filter-compact.select2-container--open .select2-search--inline {
    position: static !important;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
}

body .tt-user-filter-compact.select2-container--open .select2-selection--multiple .select2-search--inline .select2-search__field {
    width: 100% !important;
    min-width: 0;
    padding: 0.1rem 0.2rem !important;
    font-size: 0.94rem;
}

/* The dashboard shows complete summary pills instead of scrolling Select2
   choices inside a control. The dropdown remains the place to edit the list. */
body .tt-user-filter-compact .tt-user-filter-summary--pills {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    overflow: hidden;
}

body .tt-user-filter-compact .tt-user-filter-pill {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(42%, 11rem);
    padding: 0.2rem 0.45rem;
    overflow: hidden;
    border: 1px solid #cde3f0;
    border-radius: 0.35rem;
    background: #eaf5fb;
    color: #145884;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .tt-user-filter-compact .tt-user-filter-pill--more {
    flex: 0 0 auto;
    max-width: none;
    background: #f1f5f8;
    color: #526581;
}

body .tt-user-filter-dropdown .select2-results__option {
    position: relative;
    padding: 0.65rem 2.25rem 0.65rem 0.8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

body .tt-user-filter-dropdown .select2-results__option--selected::after {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    content: '✓';
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 700;
}

/* Dashboard team filter: keep selected names in a fixed trigger while the
   searchable, scrollable list opens underneath. */
body .tt-team-picker {
    position: relative;
    width: 100%;
    min-width: 0;
}

body .tt-team-picker__native {
    display: none;
}

body .tt-team-picker__toggle {
    display: flex;
    align-items: center;
    width: 100%;
    height: 2.75rem;
    min-width: 0;
    padding: 0.25rem 0.75rem;
    border: 1px solid #c9d9e8;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--bc-ink);
    text-align: left;
    cursor: pointer;
}

body .tt-team-picker__toggle:hover {
    border-color: #83b4d3;
}

body .tt-team-picker__toggle:focus-within,
body .tt-team-picker.is-open .tt-team-picker__toggle {
    outline: 2px solid #b9dff4;
    outline-offset: 1px;
    border-color: #0b6eae;
}

body .tt-team-picker__summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #92aabd #edf3f7;
    white-space: nowrap;
}

body .tt-team-picker__summary::-webkit-scrollbar {
    height: 6px;
}

body .tt-team-picker__summary::-webkit-scrollbar-track {
    border-radius: 6px;
    background: #edf3f7;
}

body .tt-team-picker__summary::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: #92aabd;
}

body .tt-team-picker__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    padding: 0.12rem 0.2rem 0.12rem 0.45rem;
    border: 1px solid #cde3f0;
    border-radius: 0.35rem;
    background: #eaf5fb;
    color: #145884;
    font-size: 0.82rem;
    white-space: nowrap;
}

body .tt-team-picker__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #426f8d;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

body .tt-team-picker__remove:hover,
body .tt-team-picker__remove:focus-visible {
    outline: 1px solid #8bb8d4;
    background: #d5eaf6;
    color: #064f80;
}

body .tt-team-picker__chevron-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex: 0 0 1.75rem;
    width: 1.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

body .tt-team-picker__chevron {
    flex: 0 0 auto;
    color: #647d93;
    font-size: 1.25rem;
    transition: transform 0.15s ease;
}

body .tt-team-picker.is-open .tt-team-picker__chevron {
    transform: rotate(180deg);
}

body .tt-team-picker__menu:not([hidden]) {
    position: absolute;
    z-index: 4000;
    top: calc(100% + 0.25rem);
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-height: min(22rem, 55vh);
    overflow: hidden;
    border: 1px solid #bfd1e2;
    border-radius: 0.5rem;
    background: #fff !important;
    box-shadow: 0 0.7rem 1.7rem rgba(34, 58, 83, 0.18);
    isolation: isolate;
}

body .tt-team-picker__menu[hidden] {
    display: none !important;
}

body .tt-team-picker__search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e3ebf1;
    color: #6d8093;
}

body .tt-team-picker__search {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bc-ink);
    font: inherit;
}

body .tt-team-picker__options {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #92aabd #edf3f7;
}

body .tt-team-picker__options::-webkit-scrollbar {
    width: 7px;
}

body .tt-team-picker__options::-webkit-scrollbar-track {
    background: #edf3f7;
}

body .tt-team-picker__options::-webkit-scrollbar-thumb {
    border-radius: 7px;
    background: #92aabd;
}

body .tt-team-picker__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.55rem;
    padding: 0.55rem 0.8rem;
    border: 0;
    background: #fff;
    color: #385574;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

body .tt-team-picker__option:hover,
body .tt-team-picker__option:focus-visible {
    outline: 0;
    background: #eaf4fb;
    color: #065f9c;
}

body .tt-team-picker__option.is-selected {
    background: #f0f6fa;
}

body .tt-team-picker__option-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

body .tt-team-picker__check {
    flex: 0 0 auto;
    font-size: 1.1rem;
    font-weight: 700;
    visibility: hidden;
}

body .tt-team-picker__option.is-selected .tt-team-picker__check {
    visibility: visible;
}

body .tt-team-picker__option[hidden],
body .tt-team-picker__empty[hidden] {
    display: none !important;
}

body .tt-team-picker__empty {
    padding: 0.8rem;
    color: #73869b;
    font-size: 0.9rem;
}

body .tt-user-filter-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
}

body .tt-user-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

body .tt-user-filter-actions .btn {
    min-height: 1.75rem !important;
    padding: 0.12rem 0.35rem;
    font-size: 0.78rem;
    text-decoration: none;
}

body .select2-dropdown {
    z-index: 1100;
    overflow: hidden;
    border: 1px solid #cbd8e3 !important;
    border-radius: 0.55rem !important;
    background: #fff;
}

body .select2-search--dropdown {
    padding: 0.55rem;
    border-bottom: 1px solid #e6edf2;
}

body .select2-search--dropdown .select2-search__field {
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #cbd8e3 !important;
    border-radius: 0.4rem;
    outline: none;
}

body .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--bc-blue) !important;
    outline: 2px solid #c5e0ef;
}

body .select2-results__options {
    max-height: min(17rem, 40vh) !important;
    scrollbar-width: thin;
}

body .select2-results__option {
    padding: 0.6rem 0.8rem;
    color: #455e76;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

body .select2-container--default .select2-results__option[aria-selected=true] {
    color: #135b8e;
    background: #eaf4fa;
}

body .select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #fff;
    background: var(--bc-blue);
}

body .daterangepicker {
    z-index: 1100;
    max-width: calc(100vw - 1rem);
    padding: 0.55rem;
    border: 1px solid #cbd8e3 !important;
    border-radius: 0.7rem !important;
    background: #fff;
    color: var(--bc-ink);
    font-size: 0.82rem;
}

body .daterangepicker .ranges {
    margin: 0;
}

body .daterangepicker .ranges li {
    margin: 0.1rem 0;
    padding: 0.5rem 0.7rem;
    border-radius: 0.4rem;
    color: #455e76;
}

body .daterangepicker .ranges li:hover,
body .daterangepicker .ranges li.active {
    color: #075c94;
    background: #eaf4fa;
}

body .daterangepicker .calendar-table {
    border: 0;
}

body .daterangepicker td.active,
body .daterangepicker td.active:hover {
    background: var(--bc-blue);
}

body .daterangepicker td.in-range:not(.active) {
    color: #135b8e;
    background: #eaf4fa;
}

body .daterangepicker .drp-buttons {
    border-top: 1px solid var(--bc-line);
}

body .daterangepicker .drp-buttons .btn {
    min-height: 2rem;
    border-radius: 0.4rem;
}

body .daterangepicker .drp-buttons .applyBtn {
    border-color: var(--bc-blue);
    background: var(--bc-blue);
    color: #fff;
}

body .daterangepicker .drp-buttons .cancelBtn {
    border-color: #cbd8e3;
    background: #fff;
    color: #415d74;
}

body .flatpickr-calendar {
    border: 1px solid #cbd8e3;
    border-radius: 0.65rem;
    box-shadow: none !important;
}

body .flatpickr-day.selected,
body .flatpickr-day.selected:hover {
    background: var(--bc-blue);
    border-color: var(--bc-blue);
}

body .ui-filter-card .card-body {
    padding: 1.15rem 1.3rem;
}

body .ui-filter-card .row {
    align-items: end;
}

body .ui-gallery-extra-filters {
    padding-top: 0.15rem;
}

body .ui-gallery-filter-note {
    margin: 0.7rem 0 0;
    color: #61788d;
    font-size: 0.82rem;
    line-height: 1.45;
}

body .ui-gallery-results-summary {
    margin: 0.25rem 0 1rem;
    color: #425d75;
    font-size: 0.9rem;
    font-weight: 600;
}

body .ui-filter-card .filter-control-wrapper {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body .ui-filter-card .filter-control-wrapper:has(input[id*="date" i]) {
    position: relative;
}

body .ui-filter-card .filter-control-wrapper:has(input[id*="date" i])::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 1.06rem;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid #607d96;
    border-bottom: 1.5px solid #607d96;
    transform: rotate(45deg);
    pointer-events: none;
}

body .ui-filter-card :is(#dateRange, #daterange) {
    padding-right: 2.5rem;
    cursor: pointer;
}

body .ui-filter-presets {
    padding-top: 0.85rem;
    border-top: 1px solid #e7eef4;
}

body .ui-filter-presets .filter-chip {
    min-height: 2.1rem;
    padding: 0.35rem 0.7rem;
    border-color: #cbd9e4;
    background: #f8fbfd;
    color: #3e5b74;
    font-size: 0.78rem;
}

body .ui-filter-presets .filter-chip:hover,
body .ui-filter-presets .filter-chip.active {
    border-color: var(--bc-blue);
    background: #eaf4fa;
    color: var(--bc-blue);
}

body .dashboard-quick-select {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
    padding: 0.75rem 0.75rem 0;
    border-top: 1px solid #e7eef4;
}

body .dashboard-quick-select__label {
    margin-right: 0.2rem;
    color: #637c92;
    font-size: 0.78rem;
    white-space: nowrap;
}

body .dashboard-quick-select .quick-date-btn.filter-chip {
    margin: 0;
    white-space: nowrap;
}

body .dashboard-filter-grid .filter-control-wrapper {
    padding: 0;
    border: 0;
    background: transparent;
}

body .dashboard-filter-action {
    padding-top: 1.65rem;
}

body :is(.ui-filter-card, .dashboard-filter-grid) .btn {
    min-height: 2.75rem;
}

body .ui-workspaces-card .avatar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    white-space: normal;
}

body .ui-workspaces-card .avatar-group .avatar-sm {
    flex: 0 0 2.15rem;
    width: 2.15rem;
    height: 2.15rem;
    margin-left: 0 !important;
}

body .ui-workspaces-card .avatar-group .avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #d6e2ea;
}

body .ui-workspaces-card .avatar-group .pull-up:hover {
    box-shadow: none !important;
}

body #dashboardMetrics .tt-metrics-intro {
    margin-bottom: 0.7rem;
    color: #5c7287;
    font-size: 0.87rem;
    line-height: 1.5;
}

body #dashboardMetrics .tt-metric-card__value {
    margin: 0 0 0.3rem;
    color: #203d56;
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

body #dashboardMetrics .tt-metric-card__description {
    min-height: 2.5em;
    margin: 0 0 0.75rem;
    color: #63798c;
    font-size: 0.79rem;
    line-height: 1.35;
}

body #dashboardMetrics .tt-metric-card__previous {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e6edf2;
    color: #60758a;
    font-size: 0.8rem;
}

body #dashboardMetrics .tt-metric-card__previous strong {
    color: #3d5368;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    body .dashboard-filter-action {
        padding-top: 0;
    }
}

@media (max-width: 767.98px) {
    body .dashboard-quick-select,
    body .ui-filter-card .ui-filter-presets {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    body .dashboard-quick-select__label {
        grid-column: 1 / -1;
    }

    body .dashboard-quick-select .quick-date-btn.filter-chip,
    body .ui-filter-card .ui-filter-presets .filter-chip {
        justify-content: center;
        width: 100%;
        margin: 0;
    }

    body .dashboard-quick-select .quick-date-btn.filter-chip:last-child,
    body .ui-filter-card .ui-filter-presets .filter-chip:last-child {
        grid-column: 1 / -1;
    }
}

body .ui-form-card {
    max-width: 64rem;
    margin-inline: auto;
}

body .ui-form-card__header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

body .ui-form-card__icon {
    display: inline-flex;
    flex: 0 0 2.6rem;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #c9e1ef;
    border-radius: 0.55rem;
    background: #eaf4fa;
    color: var(--bc-blue);
    font-size: 1.35rem;
}

body .ui-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bc-line);
}

body #layout-menu .workspace-switcher {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

body #layout-menu .workspace-switcher__icon {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

body #layout-menu .workspace-switcher__label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body #layout-menu .workspace-switcher::after {
    flex: 0 0 auto;
    margin-left: auto;
}

body .navbar-notifications .ui-notification-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 0.55rem;
}

body .navbar-notifications .ui-notification-trigger:hover {
    color: var(--bc-blue);
    background: #eaf4fa;
}

body .navbar-notifications .ui-notification-badge {
    position: absolute;
    top: 0;
    right: -0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.22rem;
    border: 2px solid #fff;
    font-size: 0.61rem;
    line-height: 1;
}

/* custom.css gives this ID a relative offset that puts the number across
   nearby text. Anchor it to the bell for every dashboard. */
body #layout-navbar #unreadNotificationsCount {
    position: absolute;
    top: 0;
    right: -0.15rem;
    left: auto;
    width: auto !important;
}

body .navbar-notifications .ui-notification-badge.d-none {
    display: none;
}

body .navbar-notifications .dropdown-menu {
    width: min(25rem, calc(100vw - 1rem)) !important;
    max-height: min(33rem, calc(100vh - 5rem));
    overflow-y: auto;
    border: 1px solid var(--bc-line);
    border-radius: 0.65rem;
    box-shadow: none !important;
}

body .navbar-notifications .dropdown-header {
    padding: 0.85rem 1rem;
    color: var(--bc-ink);
    font-weight: 650;
}

body .navbar-notifications #unreadNotificationsContainer .dropdown-item {
    padding: 0.8rem 1rem;
    white-space: normal;
}

body .navbar-notifications #unreadNotificationsContainer .dropdown-divider {
    margin: 0;
}

body .ui-gallery-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
    min-width: 0;
    max-width: 100%;
    gap: 1rem;
}

body .ui-gallery-skeleton__card {
    overflow: hidden;
    padding: 0 0 0.8rem;
    border: 1px solid var(--bc-line);
    border-radius: 0.65rem;
    background: #fff;
}

body .ui-gallery-skeleton__image {
    width: 100%;
    aspect-ratio: 1.2;
    border-radius: 0;
}

body .ui-gallery-skeleton__line {
    width: 72%;
    height: 0.7rem;
    margin: 0.8rem 0.7rem 0;
}

body .ui-gallery-skeleton__line--short {
    width: 48%;
    margin-top: 0.55rem;
}

body .ui-kpi-skeleton {
    min-height: 9rem;
}

body .ui-table-skeleton {
    display: grid;
    width: 100%;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid var(--bc-line);
    border-radius: 0.55rem;
    background: #fff;
}

body .ui-table-skeleton .ui-skeleton-block {
    width: 100%;
    height: 1.6rem;
}

body .ui-table-skeleton .ui-skeleton-block:nth-of-type(2) { width: 88%; }
body .ui-table-skeleton .ui-skeleton-block:nth-of-type(3) { width: 94%; }

/* Modal headers and close controls share a reliable hit area, including the
   search dialog, without positioning the X over a border or clipping it. */
body .modal .btn-close,
body .modal .btn-close:hover,
body .modal .btn-close:focus {
    transform: none !important;
}

body .modal .modal-header,
body .offcanvas .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.6rem;
    padding: 0.85rem 1.15rem;
}

body .modal .modal-header .modal-title,
body .offcanvas .offcanvas-header :is(h4, h5, h6) {
    min-width: 0;
    margin: 0;
    line-height: 1.35;
}

body .modal .modal-header .btn-close,
body .offcanvas .offcanvas-header .btn-close {
    position: static;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: 1px solid #d1dce5;
    border-radius: 0.45rem;
    opacity: 1;
    background-color: #f5f8fa;
    background-size: 0.7rem;
    background-position: center;
    transform: none !important;
    transition: background-color 150ms ease, border-color 150ms ease;
}

body .modal .modal-header .btn-close:hover,
body .offcanvas .offcanvas-header .btn-close:hover {
    border-color: #a8bfce;
    background-color: #eaf4fa;
    transform: none !important;
}

body .modal .modal-header .btn-close-white {
    border-color: rgba(255, 255, 255, 0.45);
    background-color: transparent;
}

body .modal .modal-header .btn-close:focus-visible,
body .offcanvas .offcanvas-header .btn-close:focus-visible {
    outline: 2px solid var(--bc-blue);
    outline-offset: 2px;
}

body #globalSearchModal .ui-search-modal-header {
    border-bottom: 1px solid var(--bc-line);
}

body #globalSearchModal .search-wrapper {
    min-width: 0;
    flex: 1 1 auto;
}

body #createUserModal .modal-dialog {
    max-width: min(64rem, calc(100vw - 2rem));
}

body #createUserModal .modal-content > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

body #createUserModal .modal-body {
    overflow-y: auto;
    min-height: 0;
    padding: 1.25rem;
}

body #createUserModal .modal-footer {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    body .ui-filter-card .card-body { padding: 1rem; }
    body .daterangepicker { left: 0.5rem !important; }
    body .daterangepicker .ranges { float: none; width: 100%; }
    body .daterangepicker .ranges ul { display: flex; flex-wrap: wrap; gap: 0.2rem; }
    body .daterangepicker .ranges li { margin: 0; }
    body .ui-form-card__header { align-items: flex-start; }
}

@media (max-width: 575.98px) {
    body .ui-gallery-skeleton { gap: 0.65rem; }
    body .ui-filter-presets .filter-chip { flex: 1 1 auto; }
    body .select2-dropdown { max-width: calc(100vw - 1rem); }
    body .daterangepicker .drp-calendar { max-width: 100%; float: none; }
    body .ui-form-actions > .btn { flex: 1 1 calc(50% - 0.55rem); margin-right: 0 !important; }
    body .navbar-notifications .dropdown-menu { right: -3rem !important; }
    body #createUserModal .modal-dialog { max-width: calc(100vw - 1rem); margin: 0.5rem; }
    body #createUserModal .modal-body { padding: 1rem; }
    body #createUserModal .modal-footer > .btn { flex: 1 1 calc(50% - 0.5rem); }
    body .modal .modal-header,
    body .offcanvas .offcanvas-header { padding: 0.75rem 0.9rem; }
}
