/*
 * HRMS responsive density helpers.
 *
 * This file is loaded after all framework and tenant styles. Bootstrap
 * breakpoints continue to control layout; these desktop bands control density.
 */

/*
 * Desktop density bands. Metronic already handles widths below 992px; these
 * declarations only graduate the desktop root and must override the loaded
 * bundles' !important root declarations.
 */
@media (min-width: 992px) and (max-width: 1399.98px) {
    html,
    body {
        font-size: 12px !important;
    }
}

@media (min-width: 1400px) {
    html,
    body {
        font-size: 13px !important;
    }
}

/*
 * KPI scoring workflow stepper.
 *
 * The scoring page once declared generic .stepper-* selectors in its Blade
 * partial. Those fixed 40px utilities and large vertical margins caused the
 * fifth stage to wrap at laptop widths. Scope the component here so other
 * Metronic steppers remain untouched. The base rules reproduce the current
 * desktop treatment; only the 992–1399.98px bands compact the workflow.
 */
.dsi-scoring-stepper .dsi-scoring-stepper__nav {
    display: flex;
    flex-wrap: wrap !important;
    justify-content: center;
    margin-bottom: 10px;
}

.dsi-scoring-stepper .stepper-item {
    align-items: center;
    display: flex;
    margin: 0 2px 4px;
}

.dsi-scoring-stepper .stepper-line {
    background-color: #ebedf2;
    flex-grow: 1;
    height: 2px;
}

.dsi-scoring-stepper .stepper-icon {
    align-items: center;
    background-color: #ebedf2;
    border-radius: 50%;
    display: flex;
    height: 30px;
    justify-content: center;
    position: relative;
    width: 30px;
}

.dsi-scoring-stepper .stepper-check {
    color: #ffffff;
    font-size: 18px;
    position: absolute;
}

.dsi-scoring-stepper .stepper-number {
    color: #ffffff;
    font-size: large;
    font-weight: bolder;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.dsi-scoring-stepper .stepper-label {
    margin-left: 8px;
}

.dsi-scoring-stepper .stepper-title {
    font-size: 14px;
    margin: 0;
}

.dsi-scoring-stepper .stepper-desc {
    color: #6c757d;
    font-size: 12px;
}

.dsi-scoring-stepper .current .stepper-check,
.dsi-scoring-stepper .pending .stepper-check {
    display: none;
}

.dsi-scoring-stepper .current .stepper-icon {
    background-color: #fac002;
}

.dsi-scoring-stepper .completed .stepper-icon {
    background-color: green;
}

.dsi-scoring-stepper .completed .stepper-number {
    display: none;
}

.dsi-scoring-stepper .pending .stepper-number {
    color: var(--dsi-scoring-tenant-primary, #006341);
}

.dsi-scoring-stepper .pending .stepper-icon {
    background-color: #ffffff;
    border: 1px solid var(--dsi-scoring-tenant-primary, #006341);
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .dsi-scoring-stepper .card-body {
        padding-block: 1rem;
        padding-inline: 1.25rem;
    }

    .dsi-scoring-stepper .dsi-scoring-stepper__nav {
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        justify-content: space-between;
        margin-bottom: 0;
        width: 100%;
    }

    .dsi-scoring-stepper .stepper-item {
        align-items: flex-start;
        flex: 1 1 0;
        margin: 0 !important;
        min-width: 0;
    }

    .dsi-scoring-stepper .stepper-line {
        flex: 0 1 1.5rem;
        margin-top: calc((2.75rem - 2px) / 2);
        min-width: 1rem;
        width: auto !important;
    }

    .dsi-scoring-stepper .stepper-icon {
        flex: 0 0 2.75rem;
        height: 2.75rem !important;
        width: 2.75rem !important;
    }

    .dsi-scoring-stepper .stepper-label {
        flex: 1 1 auto;
        margin-left: 0.5rem;
        min-width: 0;
    }

    .dsi-scoring-stepper .stepper-title {
        font-size: 1rem;
        line-height: 1.15;
        white-space: nowrap;
    }

    .dsi-scoring-stepper .stepper-desc {
        font-size: 0.875rem;
        line-height: 1.2;
        overflow-wrap: break-word;
        white-space: normal;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .dsi-scoring-stepper .card-body {
        padding-block: 0.75rem;
        padding-inline: 0.75rem;
    }

    .dsi-scoring-stepper .dsi-scoring-stepper__nav {
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        justify-content: space-between;
        margin-bottom: 0;
        width: 100%;
    }

    .dsi-scoring-stepper .stepper-item {
        align-items: flex-start;
        flex: 1 1 0;
        margin: 0 !important;
        min-width: 0;
    }

    .dsi-scoring-stepper .stepper-line {
        flex: 0 1 0.9rem;
        margin-top: calc((2.35rem - 2px) / 2);
        min-width: 0.6rem;
        width: auto !important;
    }

    .dsi-scoring-stepper .stepper-icon {
        flex: 0 0 2.35rem;
        height: 2.35rem !important;
        width: 2.35rem !important;
    }

    .dsi-scoring-stepper .stepper-label {
        flex: 1 1 auto;
        margin-left: 0.35rem;
        min-width: 0;
    }

    .dsi-scoring-stepper .stepper-title {
        font-size: 0.9167rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .dsi-scoring-stepper .stepper-desc {
        font-size: 0.84rem;
        line-height: 1.15;
        overflow-wrap: break-word;
        white-space: normal;
    }
}

/*
 * Graduated expanded sidebar.
 *
 * Metronic fixes the desktop aside, aside menu, wrapper offset, and header
 * offset at 265px. That width occupies a disproportionate share of a laptop
 * viewport (and of a zoomed-in desktop's reduced CSS viewport). Keep the full
 * navigation visible, but compact the whole shell only below Bootstrap's xxl
 * breakpoint. Wide screens fall back to Metronic's original 265px sidebar and
 * its normal menu proportions. All four geometry values must move together to
 * prevent overlap.
 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    body.aside-enabled {
        --dsi-aside-width: 210px;
        --dsi-aside-logo-height: 11rem;
        --dsi-aside-logo-max-height: 8.5rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    body.aside-enabled {
        --dsi-aside-width: 220px;
        --dsi-aside-logo-height: 12rem;
        --dsi-aside-logo-max-height: 9.5rem;
    }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside,
    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside .aside-menu {
        width: var(--dsi-aside-width);
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_wrapper {
        padding-left: var(--dsi-aside-width);
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_header {
        left: var(--dsi-aside-width);
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside_logo {
        height: var(--dsi-aside-logo-height) !important;
        padding-inline: 1rem;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside_logo > a {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside_logo .default-logo {
        width: 100% !important;
        height: auto !important;
        max-height: var(--dsi-aside-logo-max-height);
        object-fit: contain;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside_logo .aside-toggle {
        flex: 0 0 auto;
        margin-left: 0.35rem;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside > .fw-bolder {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.9rem;
        line-height: 1.35;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside_menu_wrapper {
        margin-block: 0.75rem !important;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside .aside-menu .menu > .menu-item > .menu-link {
        padding: 0.55rem 1rem;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside .aside-menu .menu-link .menu-icon {
        width: 1.75rem;
        margin-right: 0.55rem;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside .aside-menu .menu-link .menu-icon i {
        font-size: 1.35rem !important;
    }

    body.aside-enabled:not([data-kt-aside-minimize=on]) #kt_aside .aside-menu .menu-link .menu-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }
}

/*
 * Collapsed sidebar (icon rail) logo switching.
 *
 * The rail is activated by assets/js/dsi-responsive.js, which sets
 * Metronic's own [data-kt-aside-minimize=on] on <body> at small-laptop
 * widths. The aside also carries .aside-hoverable, so Metronic expands it
 * back to 265px on hover; rules are scoped with :not(:hover) so the full
 * sidebar returns untouched while hovered.
 *
 * NOTE for future work: target the [data-kt-aside-minimize=on] ATTRIBUTE,
 * not a ".aside-minimize" class. No such class is ever applied - keying off
 * it is why the logo previously vanished (clipped, not swapped) in
 * collapsed mode.
 */

/* Show the full logo by default; swap to the compact mark only in the rail. */
.aside-logo .minimize-logo {
    display: none;
}

[data-kt-aside-minimize=on] .aside:not(:hover) .aside-logo .default-logo {
    display: none;
}

[data-kt-aside-minimize=on] .aside:not(:hover) .aside-logo .minimize-logo {
    display: block;
    height: auto !important;
    max-height: 2.6rem;
    max-width: 100%;
    object-fit: contain;
}

/*
 * The brand block carries a tall inline height for the expanded sidebar.
 * Collapse it in the rail so the logo is centred and visible rather than
 * clipped by the 75px column. !important is required to beat the inline style.
 */
[data-kt-aside-minimize=on] .aside:not(:hover) .aside-logo {
    height: auto !important;
    min-height: 3.8rem;
    padding: 0.5rem 0.25rem;
    justify-content: center;
}

.dsi-icon-chip {
    width: 3.076923rem;
    height: 3.076923rem;
    flex: 0 0 3.076923rem;
    flex-shrink: 0;
    background-color: color-mix(in srgb, var(--tenant-dashboard-title-color) 10%, transparent);
    color: var(--tenant-dashboard-title-color);
}

.dsi-icon-chip > i,
.dsi-icon-chip .bi {
    color: inherit !important;
}

/*
 * Responsive data-table shell.
 *
 * Use this opt-in wrapper for data tables that can exceed their card width.
 * Scrolling stays inside the table region instead of widening the document.
 * Column visibility and table-cell behavior remain owned by the page.
 */
.dsi-responsive-table {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.dsi-responsive-table > .table {
    min-width: 100%;
    margin-bottom: 0;
}

/*
 * Strategic objectives has eight information-dense columns. At laptop
 * widths, preserve readable column measures and contain horizontal scrolling
 * inside the table region instead of compressing text character by character.
 * The desktop presentation at 1400px and above remains unchanged.
 */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .strategic-objectives-table-wrap > .strategic-objectives-table {
        min-width: 100rem;
    }

    .strategic-objectives-table > :not(caption) > * > * {
        word-break: normal;
        overflow-wrap: break-word;
    }
}

/*
 * Metronic's semantic symbol utilities are pixel-fixed. These rem equivalents
 * compute to their original 40px/50px dimensions at the current 13px root and
 * will track the laptop density tiers when those tiers are activated.
 */
@media (min-width: 992px) and (max-width: 1799.98px) {
    .symbol.symbol-40px > img {
        width: 3.076923rem !important;
        height: 3.076923rem !important;
    }

    .symbol.symbol-40px .symbol-label {
        width: 3.076923rem !important;
        height: 3.076923rem !important;
    }

    .symbol.symbol-40px.symbol-fixed .symbol-label {
        width: 3.076923rem !important;
        height: 3.076923rem !important;
    }

    .symbol.symbol-40px.symbol-fixed > img {
        width: 3.076923rem !important;
        height: 3.076923rem !important;
        max-width: none !important;
    }

    .symbol.symbol-40px.symbol-2by3 .symbol-label {
        width: 4.615385rem !important;
        height: 3.076923rem !important;
    }

    .symbol.symbol-40px.symbol-2by3 > img {
        width: 4.615385rem !important;
        height: 3.076923rem !important;
        max-width: none !important;
    }

    .symbol.symbol-50px > img {
        width: 3.846154rem !important;
        height: 3.846154rem !important;
    }

    .symbol.symbol-50px .symbol-label {
        width: 3.846154rem !important;
        height: 3.846154rem !important;
    }

    .symbol.symbol-50px.symbol-fixed .symbol-label {
        width: 3.846154rem !important;
        height: 3.846154rem !important;
    }

    .symbol.symbol-50px.symbol-fixed > img {
        width: 3.846154rem !important;
        height: 3.846154rem !important;
        max-width: none !important;
    }

    .symbol.symbol-50px.symbol-2by3 .symbol-label {
        width: 5.769231rem !important;
        height: 3.846154rem !important;
    }

    .symbol.symbol-50px.symbol-2by3 > img {
        width: 5.769231rem !important;
        height: 3.846154rem !important;
        max-width: none !important;
    }
}

/*
 * Dashboard quick-nav subnav (small screens only).
 *
 * Markup: resources/views/layouts/module_subnavs/dashboard.blade.php. It
 * reuses the same .module-subnav / .module-subnav__* classes (defined in
 * app.blade.php's shared <style> block) as every other module subnav - same
 * horizontal link row + dropdown look. The only thing specific to this one
 * is visibility: every other module subnav is visible at all widths, but
 * this one is small-screen only (the sidebar is still usable above
 * 1399.98px). The extra "dashboard-subnav-bar" class on its <nav> is what
 * lets this rule target only this instance of .module-subnav.
 */
.dashboard-subnav-bar {
    display: none;
}

@media (max-width: 1399.98px) {
    .dashboard-subnav-bar {
        display: block;
    }
}

/* ==========================================================================
 * PMS MODULE SUBNAV - PHONES
 *
 * Markup: resources/views/layouts/module_subnavs/performance-management.blade.php.
 * app.blade.php sets this subnav's .module-subnav__primary to
 * overflow: visible (so the Dashboard split-button menu is not clipped) and
 * .module-subnav__actions to flex-shrink: 0. Below 768px the two rows cannot
 * fit side by side, so the primary links spilled over the dropdown buttons
 * and pushed the page ~39px wider than a 390px phone. Here the links and the
 * dropdown buttons wrap onto full-width rows instead - every destination
 * stays visible, nothing scrolls sideways and no dropdown is clipped.
 * Scoped to the PMS subnav only; tablet and desktop are unchanged.
 * ========================================================================== */
@media (max-width: 767.98px) {
    [data-testid="performance-management-module-subnav"] .module-subnav__links,
    [data-testid="performance-management-module-subnav"] .module-subnav__primary,
    [data-testid="performance-management-module-subnav"] .module-subnav__actions {
        flex-wrap: wrap;
    }

    [data-testid="performance-management-module-subnav"] .module-subnav__links {
        gap: 0.35rem;
    }

    [data-testid="performance-management-module-subnav"] .module-subnav__primary,
    [data-testid="performance-management-module-subnav"] .module-subnav__actions {
        flex: 1 1 100%;
        gap: 0.35rem;
    }

    [data-testid="performance-management-module-subnav"] .module-subnav__link {
        font-size: 1.1rem;
        min-height: 44px;
    }

    [data-testid="performance-management-module-subnav"] .module-subnav__menu {
        max-width: calc(100vw - 2rem);
    }

    [data-testid="performance-management-module-subnav"] .module-subnav__menu .dropdown-item {
        font-size: 1.1rem;
        min-height: 44px;
        white-space: normal;
        display: flex;
        align-items: center;
    }
}

/* ==========================================================================
 * DASHBOARD SURFACES
 *
 * Reusable, fluid dashboard components. Any dashboard page can opt in by
 * adding `.dsi-dashboard` to its content container - no page-specific CSS,
 * no inline styles, no <style> blocks in Blade.
 *
 * DESIGN INTENT (read before changing the numbers):
 * Standard Bootstrap columns solve narrow screens by REARRANGING - a 4-up
 * row becomes 2-up then 1-up, so the composition a user learned on a large
 * monitor is gone by the time they reach a laptop. These components instead
 * SCALE: every size below is a clamp() that interpolates smoothly with the
 * viewport, so cards, numbers, icons and padding shrink together and hold
 * the large-screen layout much further down before any reflow happens.
 *
 * The clamp() bounds are expressed in rem on purpose. The desktop density
 * bands at the top of this file move the root font-size (12 / 13px),
 * so rem-based bounds inherit that density work rather than fighting it.
 *
 * Colour comes from the tenant tokens defined in layouts/app.blade.php
 * (--tenant-dashboard-header-bg, --tenant-dashboard-title-color), so the
 * existing grey/navy design system is preserved and stays themeable.
 * ========================================================================== */

.dsi-dashboard {
    /* Single source of truth for this page's rhythm. Override on a child to
       retune one section without touching the rest. */
    --dsi-gap: clamp(0.75rem, 0.55rem + 0.55vw, 1.5rem);
    --dsi-card-pad: clamp(0.85rem, 0.6rem + 0.7vw, 1.6rem);
    --dsi-radius: 0.75rem;
    --dsi-accent: var(--tenant-dashboard-title-color, #193660);
    --dsi-hairline: #e9edf3;
}

/* Vertical rhythm between the page's major cards. */
.dsi-dashboard .dsi-section + .dsi-section {
    margin-top: var(--dsi-gap);
}

/* --------------------------------------------------------------------------
 * Page header
 * ------------------------------------------------------------------------ */

.dsi-page-head__title {
    color: var(--dsi-accent);
    font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.dsi-page-head__meta {
    color: #7e8299;
    font-size: clamp(0.7rem, 0.66rem + 0.15vw, 0.85rem);
    margin: 0.25rem 0 0;
}

/* --------------------------------------------------------------------------
 * Panels (cards)
 *
 * .dsi-panel__head pairs with Metronic's .card-header and the shared
 * .tenant-dashboard-header/.tenant-dashboard-title classes, adding fluid
 * padding so the header shrinks with everything else instead of keeping a
 * fixed 70px block on a small screen.
 * ------------------------------------------------------------------------ */

.dsi-panel {
    border: 1px solid var(--dsi-hairline);
    border-radius: var(--dsi-radius);
    overflow: hidden;
}

.dsi-dashboard .dsi-panel__head {
    align-items: center;
    column-gap: var(--dsi-gap);
    flex-wrap: wrap;
    min-height: 0;
    padding: clamp(0.65rem, 0.45rem + 0.5vw, 1.15rem) var(--dsi-card-pad);
    row-gap: 0.4rem;
}

.dsi-dashboard .dsi-panel__body {
    padding: var(--dsi-card-pad);
}

/* --------------------------------------------------------------------------
 * Scroll panel
 *
 * Replaces inline `max-height: 300px; overflow-y: auto`. The height is
 * viewport-relative and clamped, so tall screens show more rows and short
 * screens don't get a panel taller than the space available.
 * ------------------------------------------------------------------------ */

.dsi-scroll-panel {
    max-height: clamp(13rem, 32vh, 24rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* --------------------------------------------------------------------------
 * List rows (notifications, checklists)
 * ------------------------------------------------------------------------ */

.dsi-list-row {
    align-items: center;
    border-radius: 0.55rem;
    display: flex;
    gap: clamp(0.5rem, 0.4rem + 0.3vw, 0.9rem);
    padding: clamp(0.45rem, 0.35rem + 0.25vw, 0.7rem);
    transition: background-color 0.15s ease;
}

.dsi-list-row:hover {
    background: #f7f9fc;
}

.dsi-list-row + .dsi-list-row {
    margin-top: 0.15rem;
}

/* Accent bar. currentColor-free so it can be recoloured per row. */
.dsi-list-row__marker {
    align-self: stretch;
    background: var(--dsi-accent);
    border-radius: 999px;
    flex: 0 0 auto;
    min-height: 1.9rem;
    opacity: 0.75;
    width: 0.2rem;
}

.dsi-list-row--danger .dsi-list-row__marker { background: #f85f53; }

.dsi-list-row__body {
    flex: 1 1 auto;
    min-width: 0;
}

.dsi-list-row__title {
    color: #3f4254;
    display: block;
    font-size: clamp(0.76rem, 0.7rem + 0.2vw, 0.95rem);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

a.dsi-list-row__title:hover {
    color: var(--dsi-accent);
}

.dsi-list-row__meta {
    color: #a1a5b7;
    display: block;
    font-size: clamp(0.66rem, 0.62rem + 0.15vw, 0.8rem);
    line-height: 1.35;
    margin-top: 0.1rem;
}

/* --------------------------------------------------------------------------
 * Empty states
 * ------------------------------------------------------------------------ */

.dsi-empty {
    align-items: center;
    color: #a1a5b7;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: clamp(1.25rem, 1rem + 1.2vw, 2.75rem) 1rem;
    text-align: center;
}

.dsi-empty > i {
    font-size: clamp(1.4rem, 1rem + 1.2vw, 2.4rem);
    opacity: 0.55;
}

.dsi-empty__text {
    font-size: clamp(0.76rem, 0.7rem + 0.2vw, 0.95rem);
}

/* --------------------------------------------------------------------------
 * Data tables
 *
 * Only typography/density is touched here. Layout, sorting and the
 * horizontal scroll of .table-responsive are left to Bootstrap/DataTables.
 * ------------------------------------------------------------------------ */

.dsi-dashboard .dsi-table {
    font-size: clamp(0.72rem, 0.66rem + 0.2vw, 0.9rem);
}

.dsi-dashboard .dsi-table > thead > tr > th {
    background: #f7f9fc;
    color: #7e8299;
    font-size: clamp(0.65rem, 0.61rem + 0.15vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dsi-dashboard .dsi-table > tbody > tr > td {
    vertical-align: middle;
}

/* One-line workplan activity preview (opt-in via $clampActivityLines on the
 * shared activity cell). Wrapping is still allowed so the column does not
 * widen to fit the text; the box simply stops after the first line. The full
 * name is in the title attribute and in the View All modal. */
.dsi-activity-line {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
 * Tabs
 * ------------------------------------------------------------------------ */

.dsi-dashboard .dsi-tabs {
    flex-wrap: nowrap;
    gap: 0.15rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    white-space: nowrap;
}

.dsi-dashboard .dsi-tabs::-webkit-scrollbar {
    display: none;
}

.dsi-dashboard .dsi-tabs .nav-link {
    font-size: clamp(0.74rem, 0.68rem + 0.2vw, 0.92rem);
    padding: 0.55rem 0.8rem;
}

/* --------------------------------------------------------------------------
 * Context drawers
 *
 * Shared, Metronic-backed side panels. Pages provide their own authorised
 * content through x-ui.side-drawer; positioning, accessibility affordances,
 * tenant colour tokens and responsive presentation remain central here.
 * ------------------------------------------------------------------------ */

.dsi-side-drawer-shell {
    display: contents;
}

.dsi-side-drawer {
    box-shadow: -0.5rem 0 1.75rem rgba(25, 54, 96, 0.16);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dsi-side-drawer__header {
    align-items: center;
    background: var(--tenant-dashboard-header-bg, #e7eaef);
    border-bottom: 1px solid var(--dsi-hairline, #e9edf3);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: clamp(1rem, 0.8rem + 0.7vw, 1.5rem);
}

.dsi-side-drawer__icon {
    align-items: center;
    background: color-mix(in srgb, var(--tenant-dashboard-title-color, #193660) 10%, transparent);
    border-radius: 50%;
    color: var(--tenant-dashboard-title-color, #193660);
    display: inline-flex;
    flex: 0 0 auto;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.dsi-side-drawer__icon > i {
    font-size: 1.25rem;
}

.dsi-side-drawer__title {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.35rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.dsi-side-drawer__subtitle {
    color: #7e8299;
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0.2rem 0 0;
}

.dsi-side-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
}

.dsi-side-drawer__tabs {
    flex-wrap: nowrap;
    gap: 0.2rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    white-space: nowrap;
}

.dsi-side-drawer__tabs .nav-link {
    color: #7e8299;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.7rem 0.45rem;
}

.dsi-side-drawer__tabs .nav-link.active {
    color: var(--tenant-dashboard-title-color, #193660);
}

.dsi-side-drawer__section-heading {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.dsi-side-drawer__trigger {
    align-items: center;
    background: var(--tenant-dashboard-title-color, #193660);
    border: 0;
    border-radius: 0.6rem 0 0 0.6rem;
    box-shadow: -0.2rem 0 0.8rem rgba(25, 54, 96, 0.18);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: center;
    min-height: 10.5rem;
    padding: 0.8rem 0.55rem;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    z-index: 1030;
}

/* Keep KPI approval modals on the shared grey dashboard-header surface. */
.dsi-kpi-approval-modal__header {
    background-color: var(--tenant-dashboard-header-bg, #e7eaef) !important;
}

.dsi-side-drawer__trigger:hover,
.dsi-side-drawer__trigger:focus-visible {
    background: var(--tenant-primary, #006341);
    box-shadow: -0.3rem 0 1rem rgba(25, 54, 96, 0.28);
    color: #fff;
    outline: 0;
}

.dsi-side-drawer__trigger:focus-visible {
    outline: 0.2rem solid #fff;
    outline-offset: -0.35rem;
}

.dsi-side-drawer__trigger > i {
    font-size: 1.05rem;
}

.dsi-side-drawer__trigger-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    writing-mode: vertical-rl;
}

.dsi-side-drawer__trigger-count {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: var(--tenant-dashboard-title-color, #193660);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 700;
    height: 1.25rem;
    justify-content: center;
    min-width: 1.25rem;
}

@media (max-width: 767.98px) {
    .dsi-side-drawer__trigger {
        border-radius: 0.55rem 0 0 0.55rem;
        gap: 0.4rem;
        min-height: 0;
        padding: 0.6rem 0.45rem;
        top: auto;
        transform: none;
        bottom: 1rem;
    }

    .dsi-side-drawer__trigger-label {
        font-size: 0.7rem;
    }

    .dsi-side-drawer__header {
        padding: 1rem;
    }
}

/* --------------------------------------------------------------------------
 * Workplan item review panel
 *
 * work-plan/scoring/partials/view-item-modal (Unit and Department scorecards).
 * A labelled context panel says what the item is, the comparison and activity
 * tables line values up, and the budget and dates sit in three fact tiles.
 * Everything stacks to one column below sm.
 * ------------------------------------------------------------------------ */

.dsi-review-title {
    color: var(--tenant-dashboard-title-color, #193660);
}

.dsi-review-title__icon {
    color: var(--tenant-primary, #006341);
}

.dsi-review-label {
    color: var(--bs-gray-600);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dsi-review-heading {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

/* Keeps the line breaks people type into targets and results. */
.dsi-review-text {
    display: block;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.dsi-review-missing {
    color: var(--bs-gray-600);
    font-style: italic;
}

/* The outline keeps light band colours (the default "Good" is #FFFF00) visible on white. */
.dsi-review-dot {
    background-color: var(--bs-gray-400);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    display: inline-block;
    flex-shrink: 0;
    height: 0.6rem;
    width: 0.6rem;
}

/* Context: measure, perspective, objective, scoring period */
.dsi-review-context {
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-left: 3px solid var(--tenant-primary, #006341);
    border-radius: 0.65rem;
    padding: 1rem 1.25rem;
}

.dsi-review-context__measure {
    border-bottom: 1px solid var(--bs-gray-200);
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
}

.dsi-review-context__measure-value {
    color: var(--tenant-dashboard-title-color, #193660);
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dsi-review-context__grid {
    row-gap: 0.75rem;
}

.dsi-review-context__grid > div {
    padding-right: 1rem;
}

.dsi-review-context__value {
    color: var(--bs-gray-900);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

/* Tables */
.dsi-review-table-wrap {
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.65rem;
    overflow: hidden;
}

.dsi-review-table {
    font-size: 0.9rem;
}

/* .table.dsi-review-table outranks Metronic's .table td:first-child / :last-child
 * rules, which drop the outer cell padding to 0. */
.table.dsi-review-table > :not(caption) > * > *,
.table.dsi-review-table > :not(caption) > * > :first-child,
.table.dsi-review-table > :not(caption) > * > :last-child {
    border-bottom: 1px solid var(--bs-gray-200);
    padding: 0.8rem 1rem;
    vertical-align: top;
}

.table.dsi-review-table > tbody > tr:last-child > * {
    border-bottom: 0;
}

.table.dsi-review-table > thead > tr > th {
    background: var(--bs-gray-100);
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding-bottom: 0.6rem;
    padding-top: 0.6rem;
    text-transform: uppercase;
}

.dsi-review-compare {
    table-layout: fixed;
}

.dsi-review-compare > :not(caption) > tr > * + * {
    border-left: 1px solid var(--bs-gray-200);
}

.dsi-review-activities__number {
    color: var(--bs-gray-500);
    font-weight: 600;
    width: 2.5rem;
}

/* Budget and date tiles */
.dsi-review-fact {
    align-items: center;
    background: #fff;
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.65rem;
    display: flex;
    gap: 0.75rem;
    height: 100%;
    padding: 0.75rem 0.9rem;
}

.dsi-review-fact__icon {
    align-items: center;
    background: rgba(0, 99, 65, 0.1);
    background: color-mix(in srgb, var(--tenant-primary, #006341) 12%, #fff);
    border-radius: 0.55rem;
    color: var(--tenant-primary, #006341);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.1rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.dsi-review-fact__value {
    color: var(--bs-gray-900);
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .dsi-review-main {
        border-right: 1px solid var(--bs-gray-200);
    }
}

/* One column on phones: the comparison cells carry their own labels. */
@media (max-width: 575.98px) {
    .dsi-review-compare thead {
        display: none;
    }

    .dsi-review-compare,
    .dsi-review-compare tbody,
    .dsi-review-compare tr,
    .dsi-review-compare td {
        display: block;
        width: 100%;
    }

    .dsi-review-compare > :not(caption) > tr > * + * {
        border-left: 0;
    }

    .dsi-review-compare > tbody > tr:not(:last-child) > td,
    .dsi-review-compare > tbody > tr:last-child > td:not(:last-child) {
        border-bottom: 1px solid var(--bs-gray-200);
    }

    .dsi-review-context__grid > div {
        padding-right: 0;
    }
}

/* ==========================================================================
 * FINAL SCORECARD REPORT
 *
 * Read-only report page (Livewire view livewire/modules/performance-management/
 * work-plan/scoring/unit-scorecard-report). Scoped to `.unit-scorecard-report`;
 * cards, tables, badges and buttons are the standard DESIGN.md components.
 * Palette follows the scorecard pages: #F5F8FA canvas, white cards.
 * ========================================================================== */
.unit-scorecard-report {
    max-width: 1600px;
}

.unit-scorecard-report .report-logo {
    max-height: 40px;
    max-width: 160px;
}

.unit-scorecard-report .band-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.unit-scorecard-report .score-donut {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: relative;
}

.unit-scorecard-report .score-donut-hole {
    position: absolute;
    inset: 37px;
    background: var(--bs-white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px var(--bs-gray-200);
}

.unit-scorecard-report .report-legend {
    flex: 1 1 180px;
    max-width: 300px;
}

.unit-scorecard-report .report-mix-table td,
.unit-scorecard-report .report-mix-table th {
    border-color: rgba(255, 255, 255, 0.35);
}

.unit-scorecard-report .report-table td {
    vertical-align: top;
}

.unit-scorecard-report .report-table .prose {
    overflow-wrap: break-word;
}

.unit-scorecard-report .report-table thead .report-group {
    border-left: 1px solid var(--bs-gray-300);
    letter-spacing: 0.04em;
}

/* A thin rule where each group (strategy, plan, delivery, assurance) begins. */
.unit-scorecard-report .report-table .report-group-start {
    border-left: 1px solid var(--bs-gray-200);
}

.unit-scorecard-report .report-table .report-col-serial {
    width: 3rem;
    min-width: 3rem;
    max-width: 3rem;
}

/* Long strategic objectives and focus areas: the preview is a button that shows the full text. */
.unit-scorecard-report .report-expand {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.unit-scorecard-report .report-expand:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.unit-scorecard-report .report-expand:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Activities column: a numbered list, each activity with its target on the same line. */
.unit-scorecard-report .report-activity-list {
    margin: 0;
    padding-left: 1.1rem;
}

.unit-scorecard-report .report-activity-list li + li,
.unit-scorecard-report .report-activity-list + .report-activity-list {
    margin-top: 0.35rem;
}

/* Actual result and owner comment: three lines, the full text in the tooltip and the printout. */
.unit-scorecard-report .report-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    overflow-wrap: break-word;
}

/* Desktop: # and the performance measure stay in view while the rest of the row scrolls. */
@media (min-width: 992px) {
    .unit-scorecard-report .report-table .report-sticky {
        position: sticky;
        z-index: 2;
        background-color: var(--bs-white);
    }

    .unit-scorecard-report .report-table thead .report-sticky {
        z-index: 3;
        background-color: var(--bs-light);
    }

    .unit-scorecard-report .report-table .report-col-serial {
        left: 0;
    }

    .unit-scorecard-report .report-table .report-col-measure {
        left: 3rem;
    }

    .unit-scorecard-report .report-table .report-col-measure::after {
        content: "";
        position: absolute;
        top: 0;
        right: -8px;
        bottom: 0;
        width: 8px;
        pointer-events: none;
        background: linear-gradient(to right, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0));
    }
}

.unit-scorecard-report .report-evidence {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Score Mix chart: the CSS donut shows until ECharts replaces it. */
.unit-scorecard-report .report-score-mix-chart.is-chart {
    width: 160px;
    height: 160px;
}

.unit-scorecard-report .report-search {
    min-width: 260px;
    max-width: 480px;
}

.unit-scorecard-report .report-perspective {
    border-left: 4px solid transparent;
    border-radius: 0.3rem;
    padding: 0.45rem 0.65rem;
}

/* "More columns" cue over the top-right of the items table while columns are off-screen. */
.unit-scorecard-report .report-scroll-hint {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    z-index: 4;
}

/* Covers the items table while filters, search or paging update it. */
.unit-scorecard-report .report-loading {
    display: none;
    z-index: 5;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.475rem;
}

@media print {
    @page {
        size: landscape;
        margin: 1cm;
    }

    body.report-body {
        background: #fff !important;
    }

    .unit-scorecard-report {
        max-width: none;
        padding: 0 !important;
    }

    .unit-scorecard-report .no-print {
        display: none !important;
    }

    .unit-scorecard-report .card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .unit-scorecard-report .report-table tr {
        break-inside: avoid;
    }

    /* A printout carries the details, history and full measures, not the previews. */
    .unit-scorecard-report .report-print-show {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .unit-scorecard-report .report-print-hide {
        display: none !important;
    }

    .unit-scorecard-report .table-responsive {
        overflow: visible !important;
    }

    .unit-scorecard-report .report-table .report-sticky {
        position: static !important;
    }

    .unit-scorecard-report .report-table .report-col-measure::after {
        display: none;
    }

    .unit-scorecard-report .report-clamp {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: none;
        overflow: visible;
    }
}

/* ==========================================================================
 * PMS WORKPLAN TABS (shared)
 *
 * Every tab row on the PMS workplan pages: the Directorate, Unit and Corporate
 * workplan lists (partials/workplan-list-tabs, department-workplan-list), the
 * Unit, Directorate/Department and Corporate workplan pages (Workplan /
 * Scorecard toggle and section tabs), the department-led workplan preview and
 * the corporate workplan dashboard. A segmented track rather than a row of
 * buttons or underline tabs. Inactive tabs are plain grey text; the
 * active tab (`.is-active`) is a white raised chip with text in
 * `--tenant-btn-primary`. On phones the track fills the width and wraps, so
 * every tab stays visible.
 * ========================================================================== */
.workplan-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.25rem;
    background-color: #F1F3F6;
    border-radius: 0.75rem;
}

.workplan-tab {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #5E6278;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.workplan-tab i {
    color: inherit;
    font-size: 1.05rem;
}

.workplan-tab:hover {
    color: var(--tenant-btn-primary);
    background-color: rgba(255, 255, 255, 0.55);
}

.workplan-tab.is-active {
    background-color: #FFFFFF;
    color: var(--tenant-btn-primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.06);
}

.workplan-tab:focus-visible {
    outline: 2px solid var(--tenant-btn-primary);
    outline-offset: 1px;
}

@media (max-width: 575.98px) {
    .workplan-tabs {
        display: flex;
    }

    .workplan-tab {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workplan-tab {
        transition: none;
    }
}

/* ==========================================================================
 * WORKPLAN REPORTS
 *
 * The Reports page reuses the M&E dashboard markup in reports mode
 * (`.workplan-report` on its root). Directors aged 60-70 read these, so the
 * dashboard's very small helper text (`fs-8`) is raised to a readable size
 * here only; the M&E dashboard itself is unchanged. Tenant colours only.
 * ========================================================================== */
.workplan-report .fs-8 {
    font-size: 0.95rem !important;
}

.workplan-report .form-label {
    font-size: 0.95rem;
}

.workplan-report-breadcrumb {
    align-items: center;
    color: var(--bs-gray-600);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.95rem;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.workplan-report-breadcrumb a,
.workplan-report-breadcrumb button {
    background: none;
    border: 0;
    color: var(--tenant-dashboard-title-color, #193660);
    padding: 0;
    text-decoration: none;
}

.workplan-report-breadcrumb a:hover,
.workplan-report-breadcrumb button:hover {
    text-decoration: underline;
}

.workplan-report-breadcrumb :is(a, button):focus-visible,
.workplan-risk-card-action:focus-visible {
    outline: 2px solid var(--tenant-btn-primary, #193660);
    outline-offset: 2px;
}

.workplan-report-picker {
    max-width: 26rem;
}

.workplan-risk-drill-context {
    align-items: center;
    background-color: var(--bs-gray-100);
    border-radius: 0.5rem;
    color: var(--bs-gray-700);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.85rem;
}

.workplan-report-context {
    color: var(--bs-gray-700);
    font-size: 1rem;
    font-weight: 600;
}

.workplan-report-empty {
    background-color: var(--bs-gray-100);
    border: 1px dashed var(--bs-gray-400);
    border-radius: 0.625rem;
    color: var(--bs-gray-800);
    font-size: 1rem;
    padding: 1rem 1.25rem;
}

.workplan-report-hint {
    color: var(--bs-gray-700);
    font-size: 0.95rem;
}

.workplan-report [role="img"] canvas {
    cursor: pointer;
}

/* Excel / PDF downloads of the open report: comfortable 44px targets. */
.workplan-report-downloads .btn {
    min-height: 44px;
}

/*
 * Print: this audience reviews on paper. A4 landscape (a named page, so other pages keep
 * their own @page), only the report: no menu, header, filters, buttons or pagers; charts
 * scaled to the page; tables printed in full with rows kept whole and headings repeated.
 */
.workplan-report {
    page: workplan-report;
}

@page workplan-report {
    size: A4 landscape;
    margin: 1cm;
}

@media print {
    .workplan-report [data-workplan-report-switcher],
    .workplan-report .form-check,
    .workplan-report .card-toolbar,
    .workplan-report-hint,
    .workplan-report-downloads,
    .workplan-report .me-dashboard-filters,
    .workplan-report .btn,
    .workplan-report .nav,
    .workplan-report .form-select,
    .workplan-report .form-control,
    .workplan-report .form-label,
    .workplan-report [data-testid="measures-report"] .card-body > .row:first-child,
    body:has(.workplan-report) #kt_aside,
    body:has(.workplan-report) #kt_header,
    body:has(.workplan-report) .module-subnav,
    body:has(.workplan-report) .toolbar,
    body:has(.workplan-report) .footer,
    body:has(.workplan-report) .scrolltop,
    body:has(.workplan-report) .skip-link {
        display: none !important;
    }

    body:has(.workplan-report),
    body:has(.workplan-report) #kt_wrapper {
        background: #fff !important;
        padding: 0 !important;
    }

    .workplan-report {
        max-width: none;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .workplan-report .card {
        border: 1px solid #E4E6EF;
        box-shadow: none !important;
    }

    /* The printable width is below Bootstrap's lg; keep the headline cards six to a row. */
    .workplan-report .row > .col-lg-2 {
        flex: 0 0 auto;
        width: 16.6667%;
    }

    /* The Metric View switch has no buttons on paper; the chart titles name the view. */
    .workplan-report div:has(> button[wire\:click*="metricView"]) {
        display: none !important;
    }

    .workplan-report .card .card-body.text-center,
    .workplan-report .workplan-report-empty {
        break-inside: avoid;
    }

    .workplan-report [wire\:ignore],
    .workplan-report [wire\:ignore] canvas {
        break-inside: avoid;
        max-width: 100% !important;
    }

    .workplan-report [wire\:ignore] canvas {
        height: auto !important;
    }

    .workplan-report .table-responsive {
        overflow: visible !important;
    }

    .workplan-report .table-responsive[class*="table-wrap"] {
        max-height: none !important;
    }

    .workplan-report thead {
        display: table-header-group;
    }

    .workplan-report tr {
        break-inside: avoid;
    }
}

/* Workplan Reports: report cards and planned-share bars (same header band as the M&E cards). */
.card .card-header.workplan-report-card-header {
    background-color: var(--tenant-dashboard-header-bg, #E7EAEF);
    min-height: 70px;
}

.card .card-header .card-title.workplan-report-card-title {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 1.35rem;
    font-weight: 700;
}

.workplan-report-bar {
    accent-color: var(--tenant-btn-primary);
    flex: 1 1 auto;
    height: 0.75rem;
    min-width: 5rem;
}

/*
 * Performance Comparison (reports/comparison.blade.php): headline cards with the change
 * in points (arrow and words, never colour alone), two charts and the period table. The
 * table scrolls inside its card on narrow screens; figures never wrap mid-number.
 */
.workplan-comparison-kpi-label {
    color: var(--bs-gray-700);
    font-size: 1rem;
    font-weight: 600;
}

.workplan-comparison-kpi-value {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.workplan-comparison-kpi-value.is-muted {
    color: var(--bs-gray-600);
    font-size: 1.35rem;
}

.workplan-comparison-kpi-note {
    color: var(--bs-gray-700);
    font-size: 0.95rem;
}

.workplan-comparison-change {
    font-size: 0.95rem;
    white-space: nowrap;
}

.workplan-comparison-chart {
    height: 380px;
    width: 100%;
}

/* These charts are not clickable, unlike the perspective chart drill-down. */
.workplan-report .workplan-comparison-chart[role="img"] canvas {
    cursor: default;
}

.workplan-comparison-table td,
.workplan-comparison-table th {
    white-space: nowrap;
}

.workplan-comparison-table .workplan-comparison-bar-cell {
    min-width: 11rem;
}

@media (max-width: 575.98px) {
    .workplan-comparison-chart {
        height: 320px;
    }

    .workplan-comparison-kpi-value {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
 * WORKPLAN RISK REPORTS
 *
 * Risk & Exception reports on the Workplan Reports page
 * (reports/risk/*.blade.php): Risk Overview cards and charts, the register,
 * chronic, data-quality and process tables. Directors aged 60-70 read these:
 * readable sizes, 44px controls, severity always shown as a text badge.
 * Tables scroll inside their card on narrow screens. Tenant and Bootstrap
 * variables only.
 * ========================================================================== */
.workplan-risk-rule {
    background-color: var(--bs-gray-100);
    border-left: 4px solid var(--tenant-btn-primary, var(--bs-primary));
    border-radius: 0.475rem;
    color: var(--bs-gray-800);
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.workplan-risk-kpi-label {
    color: var(--bs-gray-700);
    font-size: 1rem;
    font-weight: 600;
}

.workplan-risk-kpi-value {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.workplan-risk-kpi-note {
    color: var(--bs-gray-700);
    font-size: 0.95rem;
}

.workplan-risk-card-action {
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workplan-risk-card-action:hover {
    border-color: var(--bs-gray-400) !important;
    box-shadow: 0 0.25rem 0.65rem rgba(15, 23, 42, 0.08) !important;
}

.workplan-risk-register-panel {
    box-shadow: none;
}

.workplan-risk-count,
.workplan-risk-severity {
    font-size: 0.95rem;
    white-space: nowrap;
}

.workplan-risk-count {
    padding: 0.65rem 0.9rem;
}

.workplan-risk-chart {
    height: 360px;
    width: 100%;
}

.workplan-risk-filters .form-select,
.workplan-risk-clear,
.workplan-risk-open,
.workplan-risk-pager .btn {
    min-height: 44px;
}

.workplan-risk-table {
    font-size: 1rem;
}

.workplan-risk-table .workplan-risk-number {
    white-space: nowrap;
}

.workplan-risk-table .workplan-risk-measure {
    min-width: 16rem;
}

.workplan-risk-table .workplan-risk-text {
    min-width: 12rem;
}

@media (max-width: 575.98px) {
    .workplan-risk-chart {
        height: 300px;
    }

    .workplan-risk-kpi-value {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
 * WORKPLAN SCORECARD ROW ACTIONS
 *
 * The Actions menu on the Directorate and Department Scorecards tabs
 * (View approved scorecard · Report). Readers include directors aged 60-70,
 * so the button is a 44px target and each entry a compact 40px row with
 * readable text. The menu floats above the table (Popper `fixed` strategy, set
 * in the markup) so the table's scroll container cannot clip it. Scoped to
 * `.workplan-row-actions`; other menus unchanged.
 * ========================================================================== */
.workplan-row-actions > .btn {
    min-height: 44px;
}

.workplan-row-actions .dropdown-menu {
    padding-bottom: 0.35rem;
    padding-top: 0.35rem;
}

.workplan-row-actions .dropdown-item {
    align-items: center;
    display: flex;
    font-size: 1rem;
    min-height: 40px;
    padding-bottom: 0.4rem;
    padding-top: 0.4rem;
}

/* ==========================================================================
 * WORKPLAN REPORTS HUB
 *
 * resources/views/modules/performance-management/workplan/reports/hub.blade.php:
 * the Reports landing page, one card per report (WorkplanReportCatalogue::cards()),
 * in the same card pattern as the Leave Reports hub. Semantic tones come from the
 * Bootstrap/Metronic colour variables; the page header uses the tenant variables.
 * ========================================================================== */
.card .card-header.workplan-reports-hub__header {
    background-color: var(--tenant-dashboard-header-bg, #E7EAEF);
    min-height: 0;
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.workplan-reports-hub__heading {
    align-items: baseline;
    column-gap: 0.75rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.workplan-reports-hub__title {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.workplan-reports-hub__subtitle {
    color: var(--bs-gray-700);
    font-size: 1rem;
    font-weight: 600;
}

.card .card-body.workplan-reports-hub__body {
    padding-top: 1.5rem;
}

.workplan-reports-hub__filters {
    display: flex;
    border-bottom: 1px solid var(--bs-gray-300);
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.workplan-reports-hub__filter {
    background-color: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--bs-gray-700);
    flex: 0 0 auto;
    font-size: 1rem;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
}

.workplan-reports-hub__filter:hover {
    background-color: var(--bs-gray-100);
    color: var(--tenant-dashboard-title-color, #193660);
}

.workplan-reports-hub__filter.is-active {
    border-color: var(--tenant-btn-primary, #193660);
    color: var(--tenant-dashboard-title-color, #193660);
    font-weight: 700;
}

.workplan-reports-hub__filter:focus-visible {
    outline: 2px solid var(--tenant-btn-primary, #193660);
    outline-offset: 2px;
}

.workplan-reports-hub__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workplan-report-tile {
    background-color: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.85rem;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.workplan-report-tile:hover {
    border-color: var(--bs-gray-300);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.06);
    color: inherit;
    transform: translateY(-2px);
}

.workplan-report-tile:focus-visible {
    outline: 2px solid var(--tenant-btn-primary, #193660);
    outline-offset: 2px;
}

.workplan-report-tile__top {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.workplan-report-tile__icon {
    align-items: center;
    border-radius: 0.75rem;
    display: inline-flex;
    font-size: 1.4rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.workplan-report-tile__icon .bi {
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
}

.workplan-report-tile__icon--primary { background-color: var(--bs-light-primary); color: var(--bs-primary); }
.workplan-report-tile__icon--info { background-color: var(--bs-light-info); color: var(--bs-info); }
.workplan-report-tile__icon--success { background-color: var(--bs-light-success); color: var(--bs-success); }
.workplan-report-tile__icon--warning { background-color: var(--bs-light-warning); color: var(--bs-warning); }
.workplan-report-tile__icon--danger { background-color: var(--bs-light-danger); color: var(--bs-danger); }
.workplan-report-tile__icon--teal { background-color: color-mix(in srgb, var(--bs-teal, #20c997) 14%, transparent); color: color-mix(in srgb, var(--bs-teal, #20c997) 80%, #000); }

.workplan-report-tile__category {
    background-color: var(--tenant-dashboard-title-color, #193660);
    border-radius: 0.4rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.6rem;
}

.workplan-report-tile__title {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 1.15rem;
    font-weight: 700;
}

.workplan-report-tile__description {
    color: var(--bs-gray-700);
    flex: 1 1 auto;
    font-size: 1rem;
    line-height: 1.5;
}

.workplan-report-tile__link {
    color: var(--tenant-dashboard-title-color, #193660);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

@media (max-width: 1199.98px) {
    .workplan-reports-hub__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .workplan-reports-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .workplan-reports-hub__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
 * CEO MONITORING DASHBOARD
 *
 * executive/ceo-monitoring.blade.php and its partials: the T3 bar (Planned,
 * Done, Not done, Remaining) beside employee performance, warnings, drill
 * tables, top performers and quick links. Read by directors aged 60-70:
 * 16px body text, 44px controls, status always shown as text as well as
 * colour. Scorecard palette: white cards, #E7EAEF headers, tenant navy titles.
 * The bar is an SVG sized by attributes; band colours come from the
 * configured performance key scale as SVG fills.
 * ========================================================================== */
.ceo-monitor {
    --ceo-done: #0f7b55;
    --ceo-not-done: #d69e2e;
    --ceo-remaining: var(--bs-gray-300, #dbdfe9);
    --ceo-title: var(--tenant-dashboard-title-color, #193660);
    --ceo-head-bg: var(--tenant-dashboard-header-bg, #E7EAEF);
    color: var(--bs-gray-800);
    font-size: 1rem;
}

.ceo-monitor__panel {
    background: #fff;
    border: 1px solid var(--dsi-hairline, #e9edf3);
    border-radius: var(--dsi-radius, 0.75rem);
    box-shadow: none;
    overflow: hidden;
}

.ceo-monitor .card .card-header.ceo-monitor__panel-head {
    align-items: center;
    background: var(--ceo-head-bg);
    border-bottom: 0;
    column-gap: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 3.75rem;
    padding: 0.75rem var(--dsi-card-pad, 1.25rem);
    row-gap: 0.5rem;
}

.ceo-monitor__panel-title {
    align-items: center;
    color: var(--ceo-title);
    display: flex;
    flex-wrap: wrap;
    font-size: 1.15rem;
    font-weight: 700;
    gap: 0.55rem;
    margin: 0;
}

.ceo-monitor__panel-meta {
    color: var(--bs-gray-700);
    font-size: 0.95rem;
    font-weight: 600;
}

.ceo-monitor .card-body.ceo-monitor__panel-body,
.ceo-monitor .card-body.ceo-monitor__head {
    padding: var(--dsi-card-pad, 1.25rem);
}

.ceo-monitor__title-row {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.ceo-monitor__title {
    color: var(--ceo-title);
    font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.75rem);
    font-weight: 700;
    margin: 0;
}

.ceo-monitor__subtitle {
    color: var(--bs-gray-700);
    font-size: 1rem;
    margin: 0.25rem 0 0;
}

.ceo-monitor__back,
.ceo-monitor__apply {
    min-height: 44px;
}

.ceo-monitor__filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    margin-top: 1.25rem;
}

.ceo-monitor__filter .form-label {
    color: var(--bs-gray-800);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.ceo-monitor__filter .form-select {
    font-size: 1rem;
    min-height: 44px;
}

.ceo-monitor__breadcrumb {
    align-items: center;
    color: var(--bs-gray-600);
    display: flex;
    flex-wrap: wrap;
    font-size: 1rem;
    gap: 0.55rem;
    margin-top: 1rem;
}

.ceo-monitor__breadcrumb a,
.ceo-monitor__link {
    align-items: center;
    color: var(--ceo-title);
    display: inline-flex;
    font-weight: 600;
    min-height: 44px;
    text-decoration: none;
}

/* No underline at rest (compact tables); it shows on hover and keyboard focus so the link is still clear. */
.ceo-monitor__breadcrumb a:hover,
.ceo-monitor__breadcrumb a:focus-visible,
.ceo-monitor__link:hover,
.ceo-monitor__link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.ceo-monitor__list-filters {
    align-items: end;
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    margin-bottom: 1.25rem;
}

.ceo-monitor__list-actions {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-height: 44px;
}

.ceo-monitor__row-action {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
    white-space: nowrap;
}

.ceo-monitor__breadcrumb [aria-current="page"] {
    color: var(--bs-gray-900);
    font-weight: 700;
}

.ceo-monitor__headline {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin-bottom: 1rem;
}

.ceo-monitor__headline-value {
    color: var(--ceo-title);
    font-size: clamp(2.25rem, 1.9rem + 0.9vw, 2.75rem);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
}

.ceo-monitor__headline-label {
    color: var(--bs-gray-700);
    font-size: 1rem;
}

.ceo-monitor__status {
    font-size: 0.95rem;
    padding: 0.45rem 0.7rem;
}

.ceo-monitor__bar-track { fill: var(--bs-gray-200); }
.ceo-monitor__bar-done { fill: var(--ceo-done); }
.ceo-monitor__bar-not-done { fill: var(--ceo-not-done); }
.ceo-monitor__bar-remaining { fill: var(--ceo-remaining); }

.ceo-monitor__expected {
    align-items: center;
    color: var(--bs-gray-800);
    display: flex;
    font-size: 1rem;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.ceo-monitor__note,
.ceo-monitor__hint {
    color: var(--bs-gray-700);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.ceo-monitor__empty {
    background: var(--bs-gray-100);
    border-radius: 0.5rem;
    color: var(--bs-gray-800);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}

.ceo-monitor__band {
    align-items: center;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 0.4rem;
}

.ceo-monitor__band-dot {
    flex: 0 0 auto;
    height: 0.8rem;
    width: 0.8rem;
}

.ceo-monitor__chart {
    min-height: 220px;
    width: 100%;
}

.ceo-monitor__chart--donut {
    height: 240px;
}

.ceo-monitor__bands {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}

.ceo-monitor__band-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ceo-monitor__band-list li {
    align-items: center;
    border-bottom: 1px solid var(--bs-gray-200);
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 0.5rem 0;
}

.ceo-monitor__band-range {
    color: var(--bs-gray-600);
    font-size: 0.9rem;
}

.ceo-monitor__band-count {
    font-weight: 700;
    min-width: 4.5rem;
    text-align: right;
}

.ceo-monitor__band-count small {
    color: var(--bs-gray-600);
    font-weight: 600;
}

.ceo-monitor__table {
    font-size: 1rem;
    margin-bottom: 0;
}

.ceo-monitor__table thead th {
    background: var(--bs-gray-100);
    color: var(--bs-gray-800);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.ceo-monitor__table th,
.ceo-monitor__table td {
    padding: 0.4rem 0.6rem;
}

/* Links inside table rows size to their text (plus a little padding) so rows stay compact. */
.ceo-monitor__table .ceo-monitor__link {
    min-height: 0;
    padding-block: 0.2rem;
}

.ceo-monitor__person,
.ceo-monitor__activity {
    color: var(--bs-gray-900);
    display: block;
    font-weight: 600;
}

.ceo-monitor__person-meta {
    color: var(--bs-gray-600);
    display: block;
    font-size: 0.9rem;
}

.ceo-monitor__top-groups {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.ceo-monitor__top-group {
    background: var(--bs-gray-100);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
}

.ceo-monitor__top-group-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.ceo-monitor__top-list {
    font-size: 0.95rem;
    margin: 0;
    padding-left: 1.2rem;
}

.ceo-monitor__top-list li {
    padding: 0.2rem 0;
}

.ceo-monitor__top-list li span:last-child {
    color: var(--bs-gray-700);
    float: right;
    font-weight: 700;
}

.ceo-monitor__toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ceo-monitor__toggle-option {
    align-items: center;
    background: #fff;
    border: 1px solid var(--bs-gray-300);
    border-radius: 999px;
    color: var(--bs-gray-800);
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 44px;
    padding: 0 1rem;
}

.ceo-monitor__toggle-option.is-active {
    background: var(--ceo-title);
    border-color: var(--ceo-title);
    color: #fff;
}

.ceo-monitor__pager {
    align-items: center;
    color: var(--bs-gray-700);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.ceo-monitor__pager .pagination {
    margin: 0;
}

.ceo-monitor__links-title {
    color: var(--ceo-title);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.ceo-monitor__links {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.ceo-monitor__quick-link {
    align-items: flex-start;
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.5rem;
    color: var(--bs-gray-900);
    display: flex;
    gap: 0.7rem;
    height: 100%;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
}

.ceo-monitor__quick-link:hover,
.ceo-monitor__quick-link:focus-visible {
    background: var(--bs-gray-100);
    border-color: var(--ceo-title);
    color: var(--bs-gray-900);
}

.ceo-monitor__quick-link .bi {
    color: var(--ceo-title);
    font-size: 1.2rem;
}

.ceo-monitor__quick-link-label {
    display: block;
    font-weight: 700;
}

.ceo-monitor__quick-link-description {
    color: var(--bs-gray-600);
    display: block;
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.ceo-monitor__panel-kind {
    background: #fff;
    border: 1px solid var(--bs-gray-300);
    border-radius: 999px;
    color: var(--bs-gray-700);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
    padding: 0.15rem 0.6rem;
    white-space: nowrap;
}

.ceo-monitor__filter-alert {
    margin-top: var(--dsi-gap, 1.25rem);
    border: 1px solid var(--bs-gray-300);
    border-left: 4px solid var(--ceo-title);
    color: var(--bs-gray-800);
    font-size: 1rem;
}

.ceo-monitor__filter-alert-icon {
    color: var(--ceo-title);
}

.ceo-monitor__filter-alert-title {
    color: var(--ceo-title);
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.ceo-monitor__filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ceo-monitor__filter-label {
    color: var(--bs-gray-600);
    font-weight: 600;
}

.ceo-monitor__tabs .workplan-tab {
    min-height: 44px;
}

.ceo-monitor__chart--years {
    height: 300px;
}

.ceo-monitor__row--selected td {
    background: var(--bs-gray-100);
    font-weight: 600;
}

/* Space between the filter notice, the tabs and each tab's content. */
.ceo-monitor__tab-panel {
    padding-top: 0.5rem;
}

.ceo-monitor__chart--average {
    height: 340px;
}

/* Compact tables (Average performance): tighter rows, no tall link targets inside the row. */
.ceo-monitor .card .card-header.ceo-monitor__panel-head--compact {
    min-height: 3.25rem;
    padding-bottom: 0.6rem;
    padding-top: 0.6rem;
}

.ceo-monitor .card-body.ceo-monitor__panel-body--compact {
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
}



.ceo-monitor__overall {
    color: var(--bs-gray-700);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.95rem;
    gap: 0.25rem 1.25rem;
    margin-bottom: 0.5rem;
}

.ceo-monitor__overall-label {
    color: var(--bs-gray-600);
    font-weight: 600;
}

.ceo-monitor__overall strong {
    color: var(--ceo-title);
}

.ceo-monitor__list-chart-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

.ceo-monitor__list-chart-key .ceo-monitor__t3-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ceo-monitor__swatch {
    margin-right: 0.4rem;
}

.ceo-monitor__divider {
    border-top: 1px solid var(--bs-gray-300);
    margin: 1.5rem 0;
    opacity: 1;
}

/* Overview key-indicator panels (premium UI/UX review): one accent per meaning, colour only on the data. */
.ceo-monitor .card-body.ceo-monitor__panel-body--summary {
    display: flex;
    flex-direction: column;
}

.ceo-monitor__bar {
    border-radius: 999px;
    display: block;
    height: 1.25rem;
    overflow: hidden;
    width: 100%;
}

.ceo-monitor__bar-expected {
    stroke: var(--ceo-title);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.ceo-monitor__expected-mark {
    background: var(--ceo-title);
    border-radius: 1px;
    display: inline-block;
    height: 1rem;
    width: 2px;
}

.ceo-monitor__t3-grid {
    display: grid;
    gap: 0.75rem;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 1rem;
}

.ceo-monitor__t3-item {
    background: var(--bs-gray-100);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem 0.875rem;
}

.ceo-monitor__t3-item dt {
    align-items: center;
    color: var(--bs-gray-700);
    display: flex;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ceo-monitor__t3-item dd {
    color: var(--bs-gray-900);
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.ceo-monitor__t3-item dd.ceo-monitor__t3-caption {
    color: var(--bs-gray-600);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: normal;
}

.ceo-monitor__swatch {
    border-radius: 2px;
    display: inline-block;
    flex: 0 0 auto;
    height: 0.625rem;
    width: 0.625rem;
}

.ceo-monitor__swatch--done { background: var(--ceo-done); }
.ceo-monitor__swatch--not-done { background: var(--ceo-not-done); }
.ceo-monitor__swatch--remaining { background: var(--ceo-remaining); border: 1px solid var(--bs-gray-400); }

/* "Needs attention": a quiet list at the bottom of each panel; the row is the link. */
.ceo-monitor__attention {
    border-top: 1px solid var(--dsi-hairline, #e9edf3);
    margin-top: auto;
    padding-top: 0.75rem;
}

.ceo-monitor__attention-title {
    align-items: center;
    color: var(--bs-gray-700);
    display: flex;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
}

.ceo-monitor__attention-count {
    background: var(--bs-gray-200);
    border-radius: 999px;
    color: var(--bs-gray-800);
    font-size: 0.8rem;
    padding: 0.05rem 0.5rem;
}

.ceo-monitor__alerts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ceo-monitor__alert + .ceo-monitor__alert {
    border-top: 1px solid var(--dsi-hairline, #e9edf3);
}

.ceo-monitor__alert-row {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 0 0.375rem 0.375rem 0;
    color: var(--bs-gray-800);
    display: flex;
    font-size: 1rem;
    gap: 0.625rem;
    min-height: 44px;
    padding: 0.5rem 0.25rem;
}

a.ceo-monitor__alert-row:hover {
    background: var(--bs-gray-100);
    color: var(--ceo-title);
}

a.ceo-monitor__alert-row:focus-visible {
    outline: 2px solid var(--ceo-title);
    outline-offset: 1px;
}

.ceo-monitor__alert-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* Serious items carry a solid red bar and icon; items to watch an amber one. */
.ceo-monitor__alert--danger .ceo-monitor__alert-row { border-left-color: var(--bs-danger); padding-left: 0.625rem; }
.ceo-monitor__alert--warning .ceo-monitor__alert-row { border-left-color: #d69e2e; padding-left: 0.625rem; }
.ceo-monitor__alert--danger .ceo-monitor__alert-icon { color: var(--bs-danger); font-size: 1.1rem; }
.ceo-monitor__alert--warning .ceo-monitor__alert-icon { color: #b7791f; font-size: 1.1rem; }
.ceo-monitor__alert--danger .ceo-monitor__alert-text { color: var(--bs-gray-900); font-weight: 600; }

.ceo-monitor__attention-title .bi { color: var(--bs-danger); }

.ceo-monitor__attention-count--danger {
    background: var(--bs-danger);
    color: #fff;
}

.ceo-monitor__alert-chevron {
    color: var(--bs-gray-500);
}

.ceo-monitor__attention-more summary {
    color: var(--ceo-title);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 44px;
    padding: 0.6rem 0.25rem;
}

.ceo-monitor__attention-more summary:focus-visible {
    outline: 2px solid var(--ceo-title);
    outline-offset: 1px;
}

/* Performing best / Needs support rows. */
.ceo-monitor__extremes {
    margin: 0 0 1rem;
}

.ceo-monitor__extremes-row {
    align-items: center;
    border-top: 1px solid var(--dsi-hairline, #e9edf3);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 9rem minmax(0, 1fr) auto;
    min-height: 44px;
}

.ceo-monitor__extremes-row dt {
    color: var(--bs-gray-700);
    font-weight: 500;
}

.ceo-monitor__extremes-row dd {
    margin: 0;
}

.ceo-monitor__extremes-score {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .ceo-monitor__t3-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ceo-monitor__extremes-row {
        grid-template-columns: 7rem minmax(0, 1fr) auto;
    }
}

@media (max-width: 767.98px) {
    .ceo-monitor__t3-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ceo-monitor__bands {
        grid-template-columns: 1fr;
    }
}
