/* Source stylesheet. Publish or copy to public_html/CMT_PBLC/assets/css/app.css for runtime use. */
:root {
    --cmt-orange: #f36f21;
    --cmt-orange-deep: #cf5d1d;
    --cmt-charcoal: #161616;
    --cmt-grey: #5f5f5f;
    --cmt-grey-soft: #eef0f3;
    --cmt-grey-50: #f8f9fa;
    --cmt-grey-100: #f1f3f5;
    --cmt-grey-200: #e5e7eb;
    --cmt-grey-500: #6b7280;
    --cmt-grey-700: #374151;
    --cmt-draft-grey: #6b7280;
    --cmt-bg: #ffffff;
    --cmt-black: #111111;
    --cmt-body: #4b5563;
    --cmt-body-strong: #20242a;
    --cmt-warm-border: #e7e2da;
    --cmt-warm-bg: #f7f3ed;
}

body {
    background: #ffffff;
    color: #1f1f1f;
}

.app-navbar {
    background: linear-gradient(90deg, var(--cmt-black) 0%, #252525 72%, #3f3f46 100%);
}

.admin-navbar {
    background: linear-gradient(90deg, var(--cmt-black) 0%, #252525 72%, #3f3f46 100%) !important;
    border-bottom: 0 !important;
    box-shadow: inset 0 -1px rgba(255, 255, 255, 0.08);
}

.app-shell-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: min(calc(100% - 2rem), 112rem);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 1 24rem;
    min-width: 12rem;
}

.app-brand > div {
    min-width: 0;
}

.app-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    background: var(--cmt-orange);
    color: #fff;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.app-brand__mark:hover {
    color: #fff;
    background: var(--cmt-orange-deep);
}

.app-brand__mark--image {
    padding: 0;
    overflow: hidden;
    background: var(--cmt-black);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.app-brand__mark--image:hover {
    background: var(--cmt-black);
}

.app-brand__mark--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-brand__mark--admin-image {
    background: var(--cmt-black);
    border-color: rgba(255, 255, 255, 0.18);
}

.app-brand__mark--admin-image:hover {
    background: var(--cmt-black);
}

.app-brand__name {
    display: inline-block;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.15;
    text-decoration: none;
}

.app-brand__name:hover {
    color: #fff;
}

.app-brand__meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    line-height: 1.3;
}

.admin-navbar .app-brand__name {
    color: #ffffff;
}

.admin-navbar .app-brand__name:hover {
    color: #ffffff;
}

.admin-navbar .app-brand__meta {
    color: rgba(255, 255, 255, 0.72);
}

.app-nav-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.app-nav-links,
.app-nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.app-nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-decoration: none;
}

.app-nav-link:hover {
    color: #ffffff;
}

.app-nav-link--admin {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.app-nav-link--admin:hover {
    color: #ffffff;
}

.admin-navbar .app-nav-group--admin {
    gap: 0.75rem;
}

.admin-navbar .app-nav-links {
    gap: 0.55rem;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.admin-navbar .app-nav-links::-webkit-scrollbar {
    display: none;
}

.admin-navbar .app-nav-link--admin {
    white-space: nowrap;
}

.admin-nav-compact {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.55rem;
    min-width: 0;
}

.admin-section-menu {
    position: relative;
}

.admin-section-menu[open] {
    z-index: 1040;
}

.admin-section-menu summary {
    list-style: none;
}

.admin-section-menu summary::-webkit-details-marker {
    display: none;
}

.admin-section-menu__trigger,
.admin-nav-return {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.admin-section-menu__trigger:hover,
.admin-section-menu[open] .admin-section-menu__trigger,
.admin-nav-return:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.admin-section-menu__panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    display: grid;
    gap: 0.12rem;
    width: min(17rem, calc(100vw - 2rem));
    padding: 0.55rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.55rem;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(22, 22, 22, 0.18);
}

.admin-section-menu__panel a {
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    color: #252525;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.admin-section-menu__panel a:hover {
    color: #000000;
    background: var(--cmt-grey-100);
}

.app-account-shell {
    position: relative;
}

.app-account-shell[open] {
    z-index: 1040;
}

.app-account-shell summary {
    list-style: none;
}

.app-account-shell summary::-webkit-details-marker {
    display: none;
}

.app-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 14rem;
    min-height: 2.2rem;
    padding: 0.25rem 0.55rem 0.25rem 0.25rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.app-account-trigger__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #fff;
    color: var(--cmt-charcoal);
    font-size: 0.78rem;
    font-weight: 800;
}

.app-account-trigger__text {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

.app-account-trigger__name,
.app-account-trigger__meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-trigger__name {
    font-size: 0.82rem;
    font-weight: 700;
}

.app-account-trigger__meta {
    font-size: 0.72rem;
    opacity: 0.75;
}

.app-navbar .app-account-trigger {
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.app-navbar .app-account-trigger:hover,
.app-navbar .app-account-shell[open] .app-account-trigger {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.admin-navbar .app-account-trigger {
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.admin-navbar .app-account-trigger:hover,
.admin-navbar .app-account-shell[open] .app-account-trigger {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.admin-navbar .app-account-trigger__avatar {
    background: #ffffff;
    color: var(--cmt-charcoal);
}

.app-account-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: min(18rem, calc(100vw - 2rem));
    padding: 0.85rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(22, 22, 22, 0.16);
}

.app-account-panel__identity {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--cmt-grey-200);
}

.app-account-panel__name {
    color: #1b1b1b;
    font-weight: 750;
    line-height: 1.25;
}

.app-account-panel__meta {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.app-account-panel__links {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.app-account-panel__links a {
    padding: 0.45rem 0.5rem;
    border-radius: 0.45rem;
    color: #242424;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.app-account-panel__links a:hover {
    background: var(--cmt-grey-100);
    color: #000;
}

.app-notification-shell {
    position: relative;
}

.app-notification-shell[open] {
    z-index: 1040;
}

.app-notification-shell summary {
    list-style: none;
}

.app-notification-shell summary::-webkit-details-marker {
    display: none;
}

.app-notification-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.app-notification-trigger__icon {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-notification-trigger__icon svg {
    width: 1rem;
    height: 1rem;
}

.app-notification-trigger__label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
}

.app-notification-trigger__count {
    min-width: 1.3rem;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    background: var(--cmt-orange);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.app-navbar .app-notification-trigger {
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.app-navbar .app-notification-trigger:hover,
.app-navbar .app-notification-shell[open] .app-notification-trigger {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.admin-navbar .app-notification-trigger {
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.admin-navbar .app-notification-trigger:hover,
.admin-navbar .app-notification-shell[open] .app-notification-trigger {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.app-notification-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: min(25rem, calc(100vw - 2rem));
    padding: 0.9rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(22, 22, 22, 0.16);
}

.app-notification-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.app-notification-panel__title {
    margin: 0;
    color: #161616;
    font-size: 0.95rem;
    font-weight: 700;
}

.app-notification-panel__meta {
    color: var(--cmt-grey);
    font-size: 0.78rem;
}

.app-notification-panel__empty {
    padding: 0.9rem 1rem;
    border: 1px dashed #cfd4dc;
    border-radius: 0.5rem;
    color: var(--cmt-grey);
    font-size: 0.84rem;
    line-height: 1.5;
    background: var(--cmt-grey-50);
}

.app-notification-list {
    display: grid;
    gap: 0.65rem;
    max-height: min(24rem, 68vh);
    overflow: auto;
}

.app-notification-item {
    display: block;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-notification-item:hover {
    border-color: #c9ced6;
    box-shadow: 0 8px 18px rgba(22, 22, 22, 0.08);
    transform: translateY(-1px);
    color: inherit;
}

.app-notification-item--unread {
    border-left: 4px solid var(--cmt-orange);
    padding-left: 0.75rem;
    background: #ffffff;
}

.app-notification-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.app-notification-item__title {
    color: #1c1c1c;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.app-notification-item__body {
    margin-top: 0.2rem;
    color: #555;
    font-size: 0.8rem;
    line-height: 1.45;
}

.app-notification-item__meta {
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #777;
    font-size: 0.73rem;
    line-height: 1.35;
}

.eyebrow {
    color: var(--cmt-orange);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* ============================================================
   PHASE 9 ACCESS-AWARE LANDING
   ============================================================ */

.landing-workspace {
    display: grid;
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.landing-workspace__rail,
.landing-workspace__main {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.06);
}

.landing-workspace__rail {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;
}

.landing-workspace__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    padding: 0.45rem 0.6rem;
    overflow: hidden;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.landing-workspace__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.landing-workspace__shortcuts {
    display: grid;
    gap: 0.35rem;
}

.landing-workspace__shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.1rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    color: var(--cmt-body-strong);
    font-size: 0.84rem;
    font-weight: 720;
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.landing-workspace__shortcut:hover {
    border-color: #c7ccd4;
    background: var(--cmt-grey-50);
    color: var(--cmt-black);
}

.landing-workspace__shortcut--primary {
    border-color: var(--cmt-orange);
    background: var(--cmt-orange);
    color: #ffffff;
}

.landing-workspace__shortcut--primary:hover {
    border-color: var(--cmt-orange-deep);
    background: var(--cmt-orange-deep);
    color: #ffffff;
}

.landing-workspace__access-note {
    display: grid;
    gap: 0.2rem;
    margin-top: auto;
    padding: 0.6rem;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.landing-workspace__access-note strong {
    color: #161616;
    font-size: 0.78rem;
}

.landing-workspace__access-note span {
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
    line-height: 1.45;
}

.landing-workspace__main {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
}

.landing-workspace__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.landing-workspace__identity {
    display: grid;
    justify-items: end;
    min-width: 12rem;
    color: var(--cmt-grey-500);
    font-size: 0.78rem;
    line-height: 1.25;
}

.landing-workspace__identity strong {
    max-width: 18rem;
    overflow: hidden;
    color: #161616;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-workspace__headline {
    max-width: 50rem;
}

.landing-workspace__eyebrow {
    margin-bottom: 0.4rem;
    color: var(--cmt-orange);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-workspace__headline h1 {
    margin: 0 0 0.35rem;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.16;
}

.landing-workspace__headline p {
    max-width: 42rem;
    margin: 0;
    color: var(--cmt-body);
    font-size: 0.9rem;
    line-height: 1.45;
}

.landing-workspace__summary-row {
    display: grid;
    grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1.35fr);
    gap: 0.65rem;
    align-items: stretch;
}

.landing-workspace__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--cmt-grey-200);
    border-left: 4px solid var(--cmt-orange);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.landing-workspace__summary > span {
    color: #161616;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.landing-workspace__summary strong,
.landing-workspace__summary small {
    display: block;
}

.landing-workspace__summary strong {
    color: var(--cmt-body-strong);
    font-size: 0.82rem;
    line-height: 1.25;
}

.landing-workspace__summary small {
    margin-top: 0.15rem;
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
    line-height: 1.35;
}

.landing-surface-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.landing-surface-chip {
    display: flex;
    min-height: 6.1rem;
    flex-direction: column;
    min-width: 0;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--cmt-grey-200);
    border-top: 3px solid var(--cmt-grey-500);
    border-radius: 0.5rem;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.landing-surface-chip:hover {
    border-color: #c7ccd4;
    color: inherit;
}

.landing-surface-chip--build,
.landing-surface-chip--exports {
    border-top-color: var(--cmt-orange);
}

.landing-surface-chip--review {
    border-top-color: var(--cmt-black);
}

.landing-surface-chip--portfolio {
    border-top-color: var(--cmt-grey-700);
}

.landing-surface-chip--disabled {
    background: var(--cmt-grey-50);
    color: #69707a;
    pointer-events: none;
}

.landing-surface-chip span,
.landing-surface-chip strong,
.landing-surface-chip small {
    display: block;
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.landing-surface-chip span {
    color: #161616;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.15;
    min-height: 1.75rem;
}

.landing-surface-chip strong {
    margin-top: 0.2rem;
    color: #161616;
    font-size: 1rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.landing-surface-chip small {
    margin-top: 0.1rem;
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
    font-weight: 700;
}

.landing-workspace__content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 0.8fr);
    gap: 0.75rem;
    align-items: start;
}

.landing-panel__header,
.landing-status-row__label {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.landing-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 17, 17, 0.05);
}

.landing-panel__header {
    align-items: center;
    margin-bottom: 1rem;
}

.landing-focus-list {
    display: grid;
    gap: 0.75rem;
}

.landing-focus-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.landing-focus-item__main {
    min-width: 0;
}

.landing-focus-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.landing-focus-item h3 {
    margin: 0 0 0.2rem;
    color: #161616;
    font-size: 0.95rem;
    font-weight: 760;
    line-height: 1.3;
}

.landing-focus-item p {
    margin: 0.35rem 0 0;
    color: var(--cmt-body);
    font-size: 0.83rem;
    line-height: 1.45;
}

.landing-focus-item__client,
.landing-focus-item__meta {
    color: var(--cmt-grey-500) !important;
    font-size: 0.76rem !important;
}

.landing-focus-item__actions {
    display: flex;
    align-content: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 10rem;
}

.landing-empty-state {
    padding: 1rem;
    border: 1px dashed #cfd4dc;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-500);
    font-size: 0.86rem;
}

.landing-status-list {
    display: grid;
    gap: 0.8rem;
}

.landing-status-row__label {
    align-items: baseline;
    margin-bottom: 0.35rem;
    color: #30343a;
    font-size: 0.82rem;
    font-weight: 700;
}

.landing-status-row__label strong {
    font-variant-numeric: tabular-nums;
}

.landing-status-row__track {
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.landing-status-row__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cmt-grey-500);
}

.landing-status-row--draft .landing-status-row__track span {
    background: var(--cmt-draft-grey);
}

.landing-status-row--ready .landing-status-row__track span,
.landing-status-row--rework .landing-status-row__track span {
    background: var(--cmt-orange);
}

.landing-status-row--review .landing-status-row__track span {
    background: var(--cmt-black);
}

.landing-status-row--approved .landing-status-row__track span {
    background: var(--cmt-grey-700);
}

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

    .landing-workspace__rail {
        display: grid;
        grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr);
        align-items: stretch;
    }

    .landing-workspace__shortcuts {
        align-content: start;
    }

    .landing-workspace__summary-row,
    .landing-workspace__content-grid {
        grid-template-columns: 1fr;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .landing-workspace__rail,
    .landing-workspace__main {
        padding: 0.85rem;
    }

    .landing-workspace__rail,
    .landing-workspace__main {
        grid-template-columns: 1fr;
    }

    .landing-workspace__header {
        flex-direction: column-reverse;
    }

    .landing-workspace__identity {
        justify-items: start;
        min-width: 0;
    }

    .landing-workspace__headline h1 {
        font-size: 1.35rem;
    }

    .landing-workspace__summary {
        width: 100%;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-focus-item {
        grid-template-columns: 1fr;
    }

    .landing-focus-item__actions {
        justify-content: flex-start;
        min-width: 0;
    }
}

.workflow-actions-shell {
    display: grid;
    gap: 1rem;
}

.workflow-actions-header {
    display: grid;
    gap: 0.125rem;
}

.workflow-stage-summary {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border: 1px solid #e6ded4;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fffdf9 0%, var(--cmt-warm-bg) 100%);
}

.workflow-stage-summary__item {
    min-width: 0;
}

.workflow-stage-summary__label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--cmt-grey);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-stage-summary__value {
    display: block;
    color: #202020;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.workflow-stage-summary__alert {
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(243, 111, 33, 0.18);
    border-radius: 0.65rem;
    background: #fff4e8;
    color: #8d4d10;
    font-size: 0.875rem;
    line-height: 1.45;
}

.workflow-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.workflow-action-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1rem 1rem 1.05rem;
    border: 1px solid var(--cmt-warm-border);
    border-top-width: 4px;
    border-radius: 0.85rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(22, 22, 22, 0.05);
}

.workflow-action-panel--review {
    border-top-color: #0d6efd;
}

.workflow-action-panel--rework {
    border-top-color: #f0ad00;
}

.workflow-action-panel--approve {
    border-top-color: #198754;
}

.workflow-action-panel--unlock {
    border-top-color: #dc3545;
}

.workflow-action-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.workflow-action-panel__eyebrow {
    color: var(--cmt-grey);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-action-panel__title {
    margin: 0.15rem 0 0;
    color: #1d1d1d;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.workflow-action-panel__copy {
    margin: 0;
    color: #5d5d5d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.workflow-action-panel textarea.form-control,
.workflow-action-panel .form-control,
.workflow-action-panel .form-select {
    max-width: 100%;
}

.workflow-action-panel textarea.form-control {
    min-height: 7rem;
}

.workflow-action-panel__footer {
    margin-top: auto;
    padding-top: 0.15rem;
}

/* ============================================================
   PHASE 7 DASHBOARD LAYER
   Shared visual language for the first portfolio and executive
   dashboard slice. These panels should feel operational and
   decision-ready rather than marketing-heavy.
   ============================================================ */

.dashboard-hero {
    padding: 0.95rem 1rem;
    border: 1px solid var(--cmt-warm-border);
    border-radius: 0.85rem;
    background:
        radial-gradient(circle at top right, rgba(243, 111, 33, 0.12), transparent 34%),
        linear-gradient(135deg, #fffdf9 0%, var(--cmt-warm-bg) 58%, #f1ece5 100%);
    box-shadow: 0 8px 28px rgba(22, 22, 22, 0.08);
}

.dashboard-hero__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.dashboard-hero__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dashboard-section .card-header {
    border-bottom-color: #ece3d8;
}

.dashboard-kpi-card {
    min-height: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid #e7e0d6;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 2px 6px rgba(22, 22, 22, 0.04);
}

.dashboard-kpi-card__label,
.dashboard-note-card__label {
    color: var(--cmt-grey);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-kpi-card__value,
.dashboard-note-card__value {
    margin-top: 0.35rem;
    color: #1f1f1f;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-kpi-card__suffix {
    color: var(--cmt-grey);
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-kpi-card__copy,
.dashboard-note-card__copy {
    margin-top: 0.4rem;
    color: #5b5b5b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.dashboard-note-card {
    min-height: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #ebe3d8;
    border-radius: 0.7rem;
    background: #fbf8f4;
}

.dashboard-note-card--tall {
    background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
}

.dashboard-spotlight {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e5ddd2;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #fff 0%, #faf6f1 100%);
    flex-wrap: wrap;
}

.dashboard-spotlight__main {
    min-width: min(28rem, 100%);
}

.dashboard-spotlight__meta {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.dashboard-subpanel {
    padding: 1rem 1.05rem;
    border: 1px solid #ebe2d7;
    border-radius: 0.75rem;
    background: #fff;
}

.dashboard-list-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f0e8de;
    font-size: 0.85rem;
}

.dashboard-list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-list-row:first-child {
    padding-top: 0;
}

.dashboard-list-row > :first-child {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 1rem;
}

.dashboard-list-row > :last-child {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dashboard-risk-item {
    padding: 0.7rem 0;
    border-bottom: 1px solid #eee4da;
}

.dashboard-risk-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-risk-item:first-child {
    padding-top: 0;
}

.dashboard-risk-item__meta {
    color: var(--cmt-grey);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-risk-item__statement {
    margin: 0.3rem 0 0.35rem;
    color: #222;
    font-size: 0.88rem;
    line-height: 1.45;
}

.dashboard-table-scroll {
    max-height: 20rem;
    overflow: auto;
    border: 1px solid #eee4da;
    border-radius: 0.75rem;
}

.dashboard-table-scroll--tall {
    max-height: 24rem;
}

.dashboard-table-scroll .table {
    margin-bottom: 0;
}

.dashboard-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.dashboard-heatmap-table th,
.dashboard-heatmap-table td {
    white-space: nowrap;
}

.dashboard-heatmap-cell {
    min-width: 5.4rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #eadfce;
    border-radius: 0.7rem;
    background: #fff;
    text-align: center;
}

.dashboard-heatmap-cell__value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dashboard-heatmap-cell__meta {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--cmt-grey);
    font-variant-numeric: tabular-nums;
}

.dashboard-heatmap-cell--none {
    background: #fbf8f4;
}

.dashboard-heatmap-cell--low {
    background: #fdf1df;
    border-color: #f0d7b1;
}

.dashboard-heatmap-cell--medium {
    background: #f9e1bf;
    border-color: #e9bd77;
}

.dashboard-heatmap-cell--high {
    background: #f5c98b;
    border-color: #d9871b;
}

/* ============================================================
   SHARED PAGE-SECTION PATTERNS
   Properties that are identical across portfolio, executive and
   commercial page sections. Defined once here; per-page blocks
   below only carry their unique overrides.
   ============================================================ */

/* Shared command hero: orange-accent flex header */
.portfolio-command,
.executive-command,
.commercial-command {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

/* Shared command + panel card shell */
.portfolio-command,
.portfolio-filters,
.portfolio-panel,
.portfolio-metric-strip,
.executive-command,
.executive-metric-strip,
.executive-guidance,
.executive-panel,
.commercial-command,
.commercial-guidance,
.commercial-metric-strip,
.commercial-panel {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

/* Shared metric card base */
.portfolio-metric-card,
.executive-metric-card,
.commercial-metric-card {
    min-width: 0;
    border-right: 1px solid var(--cmt-grey-200);
    background: #ffffff;
}

.portfolio-metric-card:last-child,
.executive-metric-card:last-child,
.commercial-metric-card:last-child {
    border-right: 0;
}

.portfolio-metric-card--finance,
.executive-metric-card--finance,
.commercial-metric-card--finance {
    background: var(--cmt-grey-50);
}

/* Metric card inner elements — shared typography */
.portfolio-metric-card span,
.portfolio-metric-card small,
.executive-metric-card span,
.executive-metric-card small,
.commercial-metric-card span,
.commercial-metric-card small {
    display: block;
}

.portfolio-metric-card__heading,
.executive-metric-card__heading,
.commercial-metric-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.portfolio-metric-card span,
.executive-metric-card span,
.commercial-metric-card span {
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 800;
}

.portfolio-metric-card em,
.executive-metric-card em,
.commercial-metric-card em {
    max-width: 8rem;
    overflow: hidden;
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-metric-card strong,
.executive-metric-card strong,
.commercial-metric-card strong {
    display: block;
    font-weight: 800;
    color: var(--cmt-black);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.portfolio-metric-card small,
.executive-metric-card small,
.commercial-metric-card small {
    color: var(--cmt-grey-500);
}

/* ============================================================
   PHASE 9 PORTFOLIO DASHBOARD REFRESH
   Presentation-only layer over the existing Phase 7 dashboard
   service payload. Keep this page dense, white, and operational.
   ============================================================ */

.portfolio-dashboard {
    display: grid;
    gap: 0.75rem;
}

.portfolio-dashboard .cmt-section {
    margin-bottom: 0;
}

/* .portfolio-command card-shell and flex base → shared block above */

.portfolio-command h1 {
    color: var(--cmt-black);
    font-weight: 760;
    line-height: 1.2;
}

.portfolio-command p {
    max-width: 50rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.portfolio-command__actions,
.portfolio-filter-bar__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.portfolio-filters {
    padding: 0.75rem;
}

.portfolio-saved-views {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cmt-grey-200);
}

.portfolio-saved-views__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.portfolio-saved-views__title h2 {
    color: var(--cmt-black);
    font-weight: 760;
}

.portfolio-saved-views__title p {
    font-size: 0.78rem;
    line-height: 1.35;
}

.portfolio-saved-views__status {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-700);
    border: 1px solid var(--cmt-grey-200);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.portfolio-saved-views__status[data-tone="success"] {
    background: #e8f5ee;
    border-color: #b7dbc6;
    color: #146c43;
}

.portfolio-saved-views__status[data-tone="danger"] {
    background: #fff0f0;
    border-color: #ffc9c9;
    color: #b42318;
}

.portfolio-saved-views__controls {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) repeat(3, max-content);
    gap: 0.45rem;
    align-items: center;
}

.portfolio-saved-views__controls .form-select {
    min-width: 0;
}

.portfolio-saved-view-dialog {
    width: min(43rem, calc(100vw - 2rem));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
}

.portfolio-saved-view-dialog::backdrop {
    background: rgba(17, 17, 17, 0.42);
}

.portfolio-saved-view-dialog__panel {
    overflow: hidden;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 1.1rem 3rem rgba(17, 24, 39, 0.18);
}

.portfolio-saved-view-dialog__body {
    padding: 1rem;
}

.portfolio-saved-view-dialog__readonly {
    min-height: 2.45rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-700);
    font-weight: 700;
}

.portfolio-saved-view-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin: 0.85rem 0 0;
    padding: 0.65rem 0 0;
    border: 0;
    border-top: 1px solid var(--cmt-grey-200);
}

.portfolio-saved-view-scope legend {
    float: none;
    width: 100%;
    margin-bottom: 0.25rem;
    color: var(--cmt-grey-700);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.portfolio-saved-view-scope label,
.portfolio-saved-view-default {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: var(--cmt-body-strong);
    font-weight: 700;
}

.portfolio-saved-view-default {
    margin-top: 0.65rem;
}

.portfolio-saved-view-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--cmt-grey-200);
    background: var(--cmt-grey-50);
}

.portfolio-filter-bar {
    display: grid;
    grid-template-columns: minmax(12rem, 1.1fr) minmax(10rem, 0.9fr) minmax(10rem, 0.9fr) minmax(12rem, 1.1fr) auto;
    gap: 0.6rem;
    align-items: end;
}

.portfolio-filter-bar .form-label {
    margin-bottom: 0.25rem;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 700;
}

.portfolio-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 0.85fr)) repeat(2, minmax(13rem, 1.3fr));
    gap: 0;
    overflow: hidden;
}

/* Base, :last-child, --finance, span/small, __heading, span label → shared block */
.portfolio-metric-card {
    padding: 0.75rem 0.85rem;
}

.portfolio-metric-card em {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 1.2;
}

.portfolio-metric-card strong {
    margin-top: 0.2rem;
    font-size: 1.25rem;
    line-height: 1.1;
}

.portfolio-metric-card--finance strong {
    font-size: 1.18rem;
}

.portfolio-metric-card small {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    gap: 0.75rem;
    align-items: start;
}

.portfolio-grid--primary {
    grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
}

.portfolio-panel {
    min-width: 0;
    padding: 0.95rem 1rem;
}

.portfolio-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.portfolio-panel__header h2 {
    color: var(--cmt-black);
    font-weight: 760;
    line-height: 1.25;
}

.portfolio-status-bars {
    display: grid;
    gap: 0.7rem;
}

.portfolio-status-bar__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.28rem;
    color: #30343a;
    font-size: 0.82rem;
    font-weight: 700;
}

.portfolio-status-bar__label strong {
    font-variant-numeric: tabular-nums;
}

.portfolio-status-bar__track {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.portfolio-status-bar__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cmt-black) 0%, #555555 100%);
}

.portfolio-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.9fr);
    gap: 0.9rem;
    align-items: start;
}

.portfolio-spotlight h3 {
    margin: 0.6rem 0 0.3rem;
    color: var(--cmt-black);
    font-size: 1.1rem;
    font-weight: 760;
    line-height: 1.25;
}

.portfolio-spotlight p {
    margin: 0;
    color: var(--cmt-body);
    font-size: 0.86rem;
    line-height: 1.45;
}

.portfolio-spotlight small {
    display: block;
    margin-top: 0.55rem;
    color: var(--cmt-grey-500);
    font-size: 0.76rem;
}

.portfolio-spotlight__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.portfolio-spotlight-metric {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.portfolio-spotlight-metric--finance {
    background: var(--cmt-grey-50);
}

.portfolio-spotlight-metric--count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    gap: 1rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.portfolio-spotlight-metric__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.portfolio-spotlight-metric__heading span {
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.portfolio-spotlight-metric__heading em {
    display: inline-flex;
    max-width: 8rem;
    overflow: hidden;
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-spotlight-metric strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--cmt-black);
    font-size: 1.08rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.portfolio-spotlight-metric--count strong {
    margin-top: 0;
    font-size: 1.2rem;
}

.portfolio-attention-list,
.portfolio-owner-list {
    display: grid;
    gap: 0.55rem;
}

.portfolio-attention-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.portfolio-attention-item__badges,
.portfolio-attention-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.portfolio-attention-item__actions {
    align-content: flex-start;
    justify-content: flex-end;
    min-width: 9rem;
}

.portfolio-attention-item h3 {
    margin: 0.45rem 0 0.18rem;
    color: var(--cmt-black);
    font-size: 0.92rem;
    font-weight: 760;
    line-height: 1.25;
}

.portfolio-attention-item p {
    margin: 0;
    color: var(--cmt-body);
    font-size: 0.82rem;
    line-height: 1.4;
}

.portfolio-attention-item small {
    display: block;
    margin-top: 0.35rem;
    color: var(--cmt-grey-500);
    font-size: 0.75rem;
    line-height: 1.35;
}

.portfolio-owner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.portfolio-owner-row strong,
.portfolio-owner-row span {
    display: block;
}

.portfolio-owner-row strong {
    color: var(--cmt-black);
    font-size: 0.86rem;
}

.portfolio-owner-row span {
    margin-top: 0.15rem;
    color: var(--cmt-grey-500);
    font-size: 0.74rem;
    line-height: 1.35;
}

.portfolio-owner-row em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: var(--cmt-black);
    color: #ffffff;
    font-style: normal;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.portfolio-table-shell {
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.portfolio-table-shell table {
    min-width: 54rem;
}

.portfolio-table-shell thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
}

.portfolio-empty-state {
    padding: 0.9rem;
    border: 1px dashed #cfd4dc;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-500);
    font-size: 0.86rem;
    line-height: 1.45;
}

/* ============================================================
   PHASE 11 CENTRAL INSIGHTS FOUNDATION
   Compact server-rendered chart cards over live dashboard payloads.
   ============================================================ */

.insights-dashboard {
    display: grid;
    gap: 0.65rem;
}

.insights-dashboard .cmt-section {
    margin-bottom: 0;
}

.insights-command,
.insights-filters,
.insights-panel,
.insights-chart-card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.insights-command {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.95rem;
    border-left: 4px solid var(--cmt-orange);
}

.insights-command h1 {
    color: var(--cmt-black);
    font-weight: 760;
    line-height: 1.2;
}

.insights-command p {
    max-width: 48rem;
    font-size: 0.88rem;
    line-height: 1.4;
}

.insights-command__actions,
.insights-filter-bar__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.insights-filters {
    padding: 0.65rem;
}

.insights-filter-bar {
    display: grid;
    grid-template-columns: minmax(11rem, 1.05fr) minmax(8.5rem, 0.72fr) minmax(8.5rem, 0.72fr) minmax(12rem, 1fr) minmax(12rem, 1fr) auto;
    gap: 0.55rem;
    align-items: end;
}

.insights-filter-bar .form-label {
    margin-bottom: 0.22rem;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 760;
}

.insights-workbench {
    display: grid;
    grid-template-columns: minmax(24rem, 0.9fr) minmax(34rem, 1.45fr);
    gap: 0.65rem;
    align-items: start;
}

.insights-panel {
    min-width: 0;
    padding: 0.75rem;
}

.insights-panel--comparison {
    border-left: 4px solid var(--cmt-orange);
}

.insights-panel__header,
.insights-chart-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.insights-panel__header {
    margin-bottom: 0.6rem;
}

.insights-panel__header h2,
.insights-chart-card__header h3 {
    color: var(--cmt-black);
    font-weight: 760;
    line-height: 1.25;
}

.insights-panel__header p {
    font-size: 0.8rem;
}

.insights-chart-grid {
    display: grid;
    gap: 0.6rem;
    align-items: start;
}

.insights-chart-grid--portfolio {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.insights-chart-grid--spotlight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insights-chart-grid--spotlight .insights-chart-card:first-child {
    grid-column: 1 / -1;
}

.insights-comparison-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(20rem, 0.88fr);
    gap: 0.55rem;
    align-items: start;
}

.insights-comparison-layout--single {
    grid-template-columns: 1fr;
}

.insights-comparison-column {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.insights-comparison-column--primary {
    --insights-delta-metric-col: minmax(8.5rem, 10.5rem);
    --insights-delta-badge-col: 6.25rem;
    --insights-delta-value-col: 9.25rem;
}

.insights-comparison-column--secondary {
    --insights-delta-metric-col: minmax(7rem, 8.75rem);
    --insights-delta-badge-col: 5.75rem;
    --insights-delta-value-col: 7.5rem;
}

.insights-chart-card {
    min-width: 0;
    padding: 0.7rem;
}

.insights-chart-card__header {
    margin-bottom: 0.55rem;
}

.insights-chart-card__header h3 {
    margin: 0;
    font-size: 0.94rem;
}

.insights-chart-card__header small {
    display: block;
    margin-top: 0.16rem;
    color: var(--cmt-grey-500);
    font-size: 0.7rem;
    font-weight: 700;
}

.insights-panel--comparison {
    padding: 0.6rem 0.7rem;
}

.insights-panel--comparison .insights-panel__header {
    margin-bottom: 0.45rem;
}

.insights-panel--comparison .insights-chart-card {
    padding: 0.55rem 0.65rem;
}

.insights-panel--comparison .insights-chart-card__header {
    margin-bottom: 0.32rem;
}

.insights-panel--comparison .insights-chart-card__header h3 {
    font-size: 0.88rem;
}

.insights-restricted-list,
.insights-bridge-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
}

.insights-restricted-list span,
.insights-bridge-notes span {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.14rem 0.45rem;
    border: 1px solid #ffd6a8;
    border-radius: 999px;
    background: #fff8ef;
    color: #7a4100;
    font-size: 0.7rem;
    font-weight: 800;
}

.insights-donut-layout {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
}

.insights-donut {
    position: relative;
    width: 7.25rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--cmt-grey-100);
    box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.insights-donut span {
    position: absolute;
    inset: 1.55rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--cmt-grey-200);
}

.insights-chart-legend {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.insights-chart-legend--inline {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    margin-top: 0.45rem;
}

.insights-chart-legend__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.38rem;
    align-items: center;
    min-width: 0;
    color: var(--cmt-grey-700);
    font-size: 0.74rem;
    font-weight: 720;
}

.insights-chart-legend__row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-chart-legend__row strong {
    color: var(--cmt-black);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insights-chart-swatch {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--cmt-black);
}

.insights-chart-swatch--1 {
    background: var(--cmt-orange);
}

.insights-chart-swatch--2 {
    background: #2f8f62;
}

.insights-chart-swatch--3 {
    background: #3d6fb6;
}

.insights-chart-swatch--4 {
    background: #89919a;
}

.insights-chart-swatch--5 {
    background: #0f766e;
}

.insights-stacked-chart {
    display: grid;
    gap: 0.55rem;
}

.insights-stacked-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}

.insights-stacked-row > span {
    min-width: 0;
    color: var(--cmt-grey-800);
    font-size: 0.74rem;
    font-weight: 820;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.insights-stacked-row > strong {
    color: var(--cmt-black);
    font-size: 0.72rem;
    font-weight: 840;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.insights-stacked-bar {
    display: flex;
    min-width: 0;
    height: 1.15rem;
    overflow: hidden;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.insights-stacked-segment {
    display: block;
    min-width: 0.35rem;
    height: 100%;
    background: var(--cmt-black);
}

.insights-stacked-segment--1 {
    background: var(--cmt-orange);
}

.insights-stacked-segment--2 {
    background: #2f8f62;
}

.insights-stacked-segment--3 {
    background: #3d6fb6;
}

.insights-stacked-segment--4 {
    background: #89919a;
}

.insights-stacked-segment--5 {
    background: #0f766e;
}

.insights-bridge-chart {
    display: grid;
    gap: 0.45rem;
}

.insights-bridge-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
    gap: 0.55rem;
    align-items: end;
    min-height: 8.5rem;
    padding: 0.25rem 0.1rem 0;
}

.insights-bridge-bar {
    display: grid;
    grid-template-rows: 7rem auto auto;
    gap: 0.24rem;
    align-items: end;
    min-width: 0;
    text-align: center;
}

.insights-bridge-bar > div {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 7rem;
}

.insights-bridge-bar > div span {
    display: block;
    width: min(4rem, 82%);
    height: var(--h);
    min-height: 0.45rem;
    border-radius: 0.35rem 0.35rem 0.14rem 0.14rem;
    background: linear-gradient(180deg, var(--cmt-orange) 0%, #c55d0b 100%);
}

.insights-bridge-bar:nth-child(2) > div span {
    background: linear-gradient(180deg, #3d6fb6 0%, #254f8c 100%);
}

.insights-bridge-bar:nth-child(3) > div span {
    background: linear-gradient(180deg, #2f8f62 0%, #1f6e48 100%);
}

.insights-bridge-bar--empty > div span {
    background: repeating-linear-gradient(135deg, var(--cmt-grey-200), var(--cmt-grey-200) 5px, var(--cmt-grey-100) 5px, var(--cmt-grey-100) 10px);
}

.insights-bridge-bar b,
.insights-bridge-bar small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-bridge-bar b {
    color: var(--cmt-grey-800);
    font-size: 0.72rem;
    font-weight: 820;
}

.insights-bridge-bar small {
    color: var(--cmt-grey-600);
    font-size: 0.68rem;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
}

.insights-delta-chart {
    display: grid;
    gap: 0;
}

.insights-delta-legend {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin: -0.1rem 0 0.18rem;
    color: var(--cmt-grey-500);
    font-size: 0.64rem;
    font-weight: 820;
    line-height: 1.2;
    text-transform: uppercase;
}

.insights-delta-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    white-space: nowrap;
}

.insights-delta-legend i {
    display: inline-block;
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 999px;
    background: #242424;
}

.insights-delta-legend__comparison {
    background: var(--cmt-orange) !important;
}

.insights-delta-row {
    display: grid;
    grid-template-columns: var(--insights-delta-metric-col, minmax(8rem, 10rem)) var(--insights-delta-badge-col, 6rem) minmax(0, 1fr) var(--insights-delta-value-col, 8rem);
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
    padding: 0.32rem 0;
    border: 0;
    border-top: 1px solid var(--cmt-grey-100);
    border-radius: 0;
    background: #ffffff;
}

.insights-delta-legend + .insights-delta-row {
    border-top: 0;
}

.insights-delta-row__metric {
    min-width: 0;
}

.insights-delta-row__label {
    min-width: 0;
    color: var(--cmt-black);
    font-size: 0.72rem;
    font-weight: 820;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-delta-badge {
    justify-self: end;
    max-width: 100%;
    padding: 0.08rem 0.34rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 999px;
    background: var(--cmt-grey-50);
    color: var(--cmt-black);
    font-size: 0.62rem;
    font-weight: 820;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insights-delta-row--positive .insights-delta-badge {
    border-color: #ffd6a8;
    background: #fff8ef;
    color: #7a4100;
}

.insights-delta-row--negative .insights-delta-badge {
    border-color: #f6c7c3;
    background: #fff4f2;
    color: #9f1f16;
}

.insights-delta-row--empty .insights-delta-badge {
    color: var(--cmt-grey-500);
}

.insights-delta-bars {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.insights-delta-bar {
    height: 0.42rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.insights-delta-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #161616 0%, #424242 100%);
}

.insights-delta-bar--comparison i {
    background: linear-gradient(90deg, var(--cmt-orange) 0%, #c55d0b 100%);
}

.insights-delta-row--empty .insights-delta-bar i {
    background: repeating-linear-gradient(135deg, var(--cmt-grey-200), var(--cmt-grey-200) 4px, var(--cmt-grey-100) 4px, var(--cmt-grey-100) 8px);
}

.insights-delta-values {
    display: grid;
    gap: 0.04rem;
    min-width: 0;
    width: 100%;
}

.insights-delta-values strong {
    min-width: 0;
    overflow: hidden;
    color: var(--cmt-black);
    font-size: 0.65rem;
    font-weight: 790;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insights-comparison-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.insights-comparison-status__tile {
    position: relative;
    min-width: 0;
    padding: 0.55rem 0.65rem 0.55rem 0.8rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
}

.insights-comparison-status__tile span,
.insights-comparison-status__tile b,
.insights-comparison-status__tile small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-comparison-status__tile span {
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
    font-weight: 820;
    text-transform: uppercase;
}

.insights-comparison-status__tile b {
    color: var(--cmt-black);
    font-size: 0.9rem;
    font-weight: 820;
}

.insights-comparison-status__tile small {
    color: var(--cmt-grey-600);
    font-size: 0.72rem;
    font-weight: 720;
}

.insights-comparison-status__tile i {
    position: absolute;
    top: 0.58rem;
    right: 0.6rem;
}

.insights-status-grid,
.insights-matrix-chart,
.insights-fallback-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.45rem;
}

.insights-matrix-chart {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.insights-status-tile,
.insights-matrix-cell,
.insights-fallback-list > div {
    min-width: 0;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
}

.insights-status-tile {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem;
}

.insights-status-tile > span {
    position: relative;
    width: 1.8rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--cmt-orange) var(--p), var(--cmt-grey-200) 0);
}

.insights-status-tile > span i {
    position: absolute;
    inset: 0.42rem;
    border-radius: inherit;
    background: #ffffff;
}

.insights-status-tile b,
.insights-status-tile small,
.insights-matrix-cell span,
.insights-matrix-cell strong,
.insights-fallback-list span,
.insights-fallback-list strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insights-status-tile b,
.insights-matrix-cell span,
.insights-fallback-list span {
    color: var(--cmt-grey-800);
    font-size: 0.72rem;
    font-weight: 820;
    white-space: nowrap;
}

.insights-status-tile small,
.insights-matrix-cell strong,
.insights-fallback-list strong {
    color: var(--cmt-grey-600);
    font-size: 0.7rem;
    font-weight: 780;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insights-matrix-cell,
.insights-fallback-list > div {
    padding: 0.45rem;
}

.insights-matrix-cell {
    min-height: 3.1rem;
    background: #f5f6f8;
}

.insights-matrix-cell span {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.2;
}

.insights-matrix-cell strong {
    overflow: visible;
    text-overflow: clip;
}

.insights-matrix-cell--2 {
    background: #eaf5ef;
}

.insights-matrix-cell--3 {
    background: #fff1df;
}

.insights-matrix-cell--4 {
    background: #ffe3cc;
}

.insights-rank-chart {
    display: grid;
    gap: 0.48rem;
}

.insights-rank-row {
    display: grid;
    grid-template-columns: minmax(6rem, 0.9fr) minmax(7rem, 1.5fr) auto;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}

.insights-rank-row span,
.insights-rank-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-rank-row span {
    color: #30343a;
    font-size: 0.75rem;
    font-weight: 760;
}

.insights-rank-row strong {
    color: var(--cmt-black);
    font-size: 0.72rem;
    font-weight: 820;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.insights-rank-row > div {
    height: 0.58rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.insights-rank-row > div i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cmt-black) 0%, #555555 100%);
}

.insights-rank-row--negative > div i {
    background: linear-gradient(90deg, #b42318 0%, #dc6803 100%);
}

.insights-line-chart svg {
    display: block;
    width: 100%;
    height: 9rem;
}

.insights-line-chart line {
    stroke: var(--cmt-grey-200);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.insights-line-chart__area {
    fill: rgba(17, 17, 17, 0.12);
    stroke: none;
}

.insights-line-chart__area--1 {
    fill: rgba(239, 125, 34, 0.18);
}

.insights-line-chart__area--2 {
    fill: rgba(47, 143, 98, 0.16);
}

.insights-line-chart__area--3 {
    fill: rgba(61, 111, 182, 0.16);
}

.insights-line-chart__series {
    fill: none;
    stroke: var(--cmt-black);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
    vector-effect: non-scaling-stroke;
}

.insights-line-chart__series--1 {
    stroke: var(--cmt-orange);
}

.insights-line-chart__series--2 {
    stroke: #2f8f62;
}

.insights-line-chart__series--3 {
    stroke: #3d6fb6;
}

.insights-line-chart__point {
    fill: var(--cmt-black);
    stroke: #ffffff;
    stroke-width: 1.6;
    cursor: help;
    vector-effect: non-scaling-stroke;
}

.insights-line-chart__point--1 {
    fill: var(--cmt-orange);
}

.insights-line-chart__point--2 {
    fill: #2f8f62;
}

.insights-line-chart__point--3 {
    fill: #3d6fb6;
}

.insights-line-chart__point:hover {
    r: 5;
    stroke-width: 2;
}

.insights-line-chart__periods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.2rem;
    color: var(--cmt-grey-600);
    font-size: 0.68rem;
    font-weight: 700;
}

.insights-line-chart__periods span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-line-chart__periods span:nth-child(2) {
    text-align: center;
}

.insights-line-chart__periods span:last-child {
    text-align: right;
}

/* ============================================================
   PHASE 9 EXECUTIVE DASHBOARD REFRESH
   Presentation-only layer over the existing version executive
   dashboard payload.
   ============================================================ */

.executive-dashboard {
    display: grid;
    gap: 0.75rem;
}

.executive-dashboard .cmt-section {
    margin-bottom: 0;
}

/* .executive-command card-shell and flex base → shared block above */

.executive-command__body {
    min-width: 0;
}

.executive-command__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.executive-command__title h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.executive-command__body p:not(.eyebrow) {
    margin: 0.45rem 0 0;
    color: var(--cmt-body);
    font-size: 0.9rem;
    line-height: 1.45;
}

.executive-command__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.executive-metric-strip {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) repeat(3, minmax(12rem, 1.12fr)) minmax(9rem, 0.75fr);
    overflow: hidden;
}

/* Base, :last-child, --finance, span/small, __heading, span label → shared block */
.executive-metric-card {
    padding: 0.75rem 0.85rem;
}

.executive-metric-card em {
    display: inline-flex;
    line-height: 1.2;
}

.executive-metric-card strong {
    margin-top: 0.24rem;
    font-size: 1.05rem;
    line-height: 1.15;
}

.executive-metric-card--finance strong,
.executive-metric-card--count strong {
    font-size: 1.18rem;
}

.executive-metric-card small {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

.executive-guidance {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-left: 4px solid var(--cmt-grey-500);
}

.executive-guidance--warning {
    border-left-color: var(--cmt-orange);
}

.executive-guidance--danger {
    border-left-color: #b42318;
}

.executive-guidance strong,
.executive-guidance span {
    display: block;
}

.executive-guidance strong {
    color: var(--cmt-black);
    font-size: 0.9rem;
}

.executive-guidance span {
    margin-top: 0.2rem;
    color: var(--cmt-body);
    font-size: 0.84rem;
    line-height: 1.4;
}

.executive-guidance__badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.executive-grid {
    display: grid;
    grid-template-columns: minmax(30rem, 1fr) minmax(0, 1.55fr);
    gap: 0.75rem;
    align-items: stretch;
}

.executive-grid--main {
    grid-template-columns: minmax(30rem, 1fr) minmax(0, 1.55fr);
}

.executive-column-stack {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-width: 0;
}

.executive-panel {
    min-width: 0;
    padding: 0.8rem 0.9rem;
}

.executive-panel--danger {
    border-left: 4px solid #b42318;
}

.executive-panel--warning {
    border-left: 4px solid var(--cmt-orange);
}

.executive-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.executive-panel__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.executive-readiness-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

.executive-readiness-grid div {
    min-width: 0;
    min-height: 3.15rem;
    padding: 0.48rem 0.55rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.executive-readiness-grid span,
.executive-readiness-grid strong {
    display: block;
}

.executive-readiness-grid span {
    color: var(--cmt-grey-700);
    font-size: 0.66rem;
    font-weight: 800;
}

.executive-readiness-grid strong {
    margin-top: 0.14rem;
    color: var(--cmt-black);
    font-size: 1.02rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.executive-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.executive-split h3 {
    margin: 0 0 0.45rem;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 800;
}

.executive-bar-list {
    display: grid;
    gap: 0.52rem;
}

.executive-bar-row__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.22rem;
    color: #30343a;
    font-size: 0.78rem;
    font-weight: 700;
}

.executive-bar-row__label strong {
    flex: 0 0 auto;
    color: var(--cmt-black);
    font-variant-numeric: tabular-nums;
}

.executive-bar-row__track {
    height: 0.42rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.executive-bar-row__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cmt-black) 0%, #555555 100%);
}

.executive-empty-state {
    padding: 0.9rem;
    border: 1px dashed #cfd4dc;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-500);
    font-size: 0.86rem;
    line-height: 1.45;
}

.executive-empty-state--success {
    border-color: #b7d6c2;
    background: #f6fbf7;
    color: #24573a;
}

.executive-risk-list {
    display: grid;
    gap: 0.4rem;
}

.executive-risk-item {
    display: grid;
    grid-template-columns: minmax(14.5rem, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.48rem 0.58rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.executive-risk-item__meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.executive-risk-item p {
    min-width: 0;
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.8rem;
    line-height: 1.3;
}

.executive-alert-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1rem;
    color: #30343a;
    font-size: 0.86rem;
    line-height: 1.45;
}

.executive-table-shell {
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.executive-table-shell table {
    min-width: 56rem;
}

.executive-table-shell thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
}

.executive-chart-section {
    display: grid;
    align-content: start;
    align-self: start;
    gap: 0.45rem;
}

.executive-chart-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.executive-chart-section__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.executive-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: start;
}

.executive-chart-grid--stacked {
    display: block;
    grid-template-columns: 1fr;
}

.executive-column-stack > .executive-chart-grid--stacked .insights-chart-card {
    width: 100%;
}

.executive-chart-grid .insights-chart-card {
    padding: 0.65rem 0.75rem;
}

.executive-chart-grid .insights-chart-card__header {
    margin-bottom: 0.32rem;
}

.executive-chart-grid .insights-chart-card__header h3 {
    font-size: 0.9rem;
}

.executive-chart-grid .insights-bridge-bars {
    min-height: 7.4rem;
}

.executive-chart-grid .insights-bridge-bar {
    grid-template-rows: 6rem auto auto;
}

.executive-chart-grid .insights-bridge-bar > div {
    height: 6rem;
}

.executive-chart-grid--stacked .insights-rank-row {
    grid-template-columns: minmax(9rem, 0.9fr) minmax(8rem, 1.15fr) minmax(6.75rem, auto);
}

.executive-chart-grid--stacked .insights-rank-row span {
    white-space: normal;
}

.executive-chart-grid--stacked .insights-rank-row strong {
    display: block;
}

/* ============================================================
   PHASE 9 COMMERCIAL DASHBOARD REFRESH
   Presentation-only layer over the existing version commercial
   dashboard payload.
   ============================================================ */

.commercial-dashboard {
    display: grid;
    gap: 0.75rem;
}

.commercial-dashboard .cmt-section {
    margin-bottom: 0;
}

/* .commercial-command card-shell and flex base → shared block above */

.commercial-command__body {
    min-width: 0;
}

.commercial-command__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.commercial-command__title h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.commercial-command__body p:not(.eyebrow) {
    margin: 0.45rem 0 0;
    color: var(--cmt-body);
    font-size: 0.9rem;
    line-height: 1.45;
}

.commercial-command__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.commercial-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--cmt-grey-100);
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.commercial-status-pill--success {
    background: #e8f5ec;
    color: #17663a;
}

.commercial-status-pill--warning {
    background: #fff2e8;
    color: #a24711;
}

.commercial-guidance {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border-left: 4px solid var(--cmt-grey-500);
}

.commercial-guidance--success {
    border-left-color: #2f855a;
}

.commercial-guidance--warning {
    border-left-color: var(--cmt-orange);
}

.commercial-guidance strong,
.commercial-guidance span {
    display: block;
}

.commercial-guidance strong {
    color: var(--cmt-black);
    font-size: 0.9rem;
}

.commercial-guidance span {
    margin-top: 0.18rem;
    color: var(--cmt-body);
    font-size: 0.82rem;
    line-height: 1.35;
}

.commercial-guidance__badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.commercial-metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(12rem, 1.12fr)) repeat(2, minmax(12rem, 1fr)) minmax(9rem, 0.75fr);
    overflow: hidden;
}

/* Base, :last-child, --finance, span/small, __heading, span label → shared block */
.commercial-metric-card {
    padding: 0.72rem 0.82rem;
}

.commercial-metric-card strong {
    margin-top: 0.24rem;
    font-size: 1.03rem;
    line-height: 1.15;
}

.commercial-metric-card--finance strong,
.commercial-metric-card--count strong {
    font-size: 1.15rem;
}

.commercial-metric-card small {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.32;
}

.commercial-grid {
    display: grid;
    grid-template-columns: minmax(30rem, 1fr) minmax(0, 1.55fr);
    gap: 0.75rem;
    align-items: stretch;
}

.commercial-grid--secondary {
    grid-template-columns: minmax(26rem, 0.95fr) minmax(0, 1.25fr);
}

.commercial-panel {
    min-width: 0;
    padding: 0.8rem 0.9rem;
}

.commercial-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.commercial-panel__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.commercial-readiness-grid,
.commercial-fx-summary,
.commercial-discount-summary {
    display: grid;
    gap: 0.4rem;
}

.commercial-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.commercial-fx-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

.commercial-discount-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

.commercial-readiness-grid div,
.commercial-fx-summary div,
.commercial-discount-summary div {
    min-width: 0;
    padding: 0.48rem 0.55rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.commercial-readiness-grid span,
.commercial-readiness-grid strong,
.commercial-fx-summary span,
.commercial-fx-summary strong,
.commercial-discount-summary span,
.commercial-discount-summary strong {
    display: block;
}

.commercial-readiness-grid span,
.commercial-fx-summary span,
.commercial-discount-summary span {
    color: var(--cmt-grey-700);
    font-size: 0.66rem;
    font-weight: 800;
}

.commercial-readiness-grid strong,
.commercial-fx-summary strong,
.commercial-discount-summary strong {
    margin-top: 0.12rem;
    color: var(--cmt-black);
    font-size: 0.96rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.commercial-owner-line {
    display: grid;
    grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) minmax(10rem, auto);
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.55rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.commercial-owner-line span,
.commercial-owner-line small {
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
}

.commercial-owner-line strong {
    color: var(--cmt-black);
    font-size: 0.82rem;
}

.commercial-scenario-list,
.commercial-coverage-list,
.commercial-rate-list,
.commercial-watchlist,
.commercial-fx-list,
.commercial-discount-list {
    display: grid;
    gap: 0.42rem;
}

.commercial-scenario-row,
.commercial-coverage-row,
.commercial-rate-row,
.commercial-watchlist-row,
.commercial-fx-list article,
.commercial-discount-row {
    min-width: 0;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.commercial-scenario-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.8rem, auto) minmax(4.8rem, auto) minmax(5rem, auto);
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
}

.commercial-scenario-row strong,
.commercial-scenario-row span,
.commercial-scenario-row small,
.commercial-coverage-row strong,
.commercial-coverage-row span,
.commercial-rate-row strong,
.commercial-rate-row span,
.commercial-watchlist-row strong,
.commercial-watchlist-row span,
.commercial-fx-list strong,
.commercial-fx-list span,
.commercial-discount-row strong,
.commercial-discount-row span,
.commercial-discount-row small {
    display: block;
}

.commercial-scenario-row strong,
.commercial-coverage-row strong,
.commercial-rate-row strong,
.commercial-watchlist-row strong,
.commercial-fx-list strong,
.commercial-discount-row strong {
    color: var(--cmt-black);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.25;
}

.commercial-scenario-row span,
.commercial-scenario-row small,
.commercial-coverage-row span,
.commercial-rate-row span,
.commercial-watchlist-row span,
.commercial-fx-list span,
.commercial-fx-list small,
.commercial-discount-row span,
.commercial-discount-row small {
    color: var(--cmt-grey-500);
    font-size: 0.7rem;
    line-height: 1.3;
}

.commercial-coverage-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1.1fr) minmax(10rem, 1fr) minmax(8rem, 0.85fr) minmax(13rem, 1.15fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
}

.commercial-coverage-row__badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.commercial-coverage-row__badges span {
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 999px;
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.66rem;
    font-weight: 800;
}

.commercial-rate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.42rem;
    padding: 0.52rem 0.6rem;
}

.commercial-rate-row__main,
.commercial-watchlist-row > div:first-child,
.commercial-watchlist-row > div:nth-child(2) {
    min-width: 0;
}

.commercial-rate-row__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.commercial-rate-row__metrics span {
    min-width: 0;
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
}

.commercial-rate-row__metrics strong {
    margin-top: 0.08rem;
    font-size: 0.74rem;
    overflow-wrap: anywhere;
}

.commercial-bar-track {
    height: 0.42rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--cmt-grey-100);
}

.commercial-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cmt-black) 0%, #555555 100%);
}

.commercial-watchlist-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, auto);
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding: 0.52rem 0.6rem;
}

.commercial-watchlist-row .commercial-bar-track {
    grid-column: 1 / -1;
}

.commercial-watchlist-row > div:nth-child(2) {
    text-align: right;
}

.commercial-fx-list article {
    display: grid;
    grid-template-columns: minmax(5rem, 0.28fr) minmax(0, 1fr) minmax(8rem, auto);
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
}

.commercial-fx-list small {
    min-width: 0;
}

.commercial-discount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.8rem, auto) minmax(4.5rem, auto) minmax(7rem, auto);
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
}

.commercial-discount-row small {
    text-align: right;
    color: var(--cmt-black);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.commercial-discount-posture {
    padding: 0.6rem 0.65rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.commercial-discount-posture strong,
.commercial-discount-posture span {
    display: block;
}

.commercial-discount-posture strong {
    color: var(--cmt-black);
    font-size: 0.82rem;
    line-height: 1.3;
}

.commercial-discount-posture span {
    margin-top: 0.18rem;
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
    line-height: 1.35;
}

.commercial-discount-posture + .commercial-discount-list {
    margin-top: 0.45rem;
}

.commercial-empty-state {
    padding: 0.85rem;
    border: 1px dashed #cfd4dc;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-500);
    font-size: 0.84rem;
    line-height: 1.4;
}

.commercial-empty-state--success {
    border-color: #b7d6c2;
    background: #f6fbf7;
    color: #24573a;
}

.commercial-chart-section {
    display: grid;
    gap: 0.5rem;
}

.commercial-chart-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.commercial-chart-section__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.commercial-chart-grid {
    display: grid;
    grid-template-columns: minmax(24rem, 1.15fr) repeat(2, minmax(17rem, 1fr));
    gap: 0.6rem;
    align-items: start;
}

.commercial-chart-grid .insights-chart-card {
    padding: 0.65rem 0.75rem;
}

.commercial-chart-grid .insights-chart-card__header {
    margin-bottom: 0.35rem;
}

.commercial-chart-grid .insights-chart-card__header h3 {
    font-size: 0.9rem;
}

.commercial-chart-grid .insights-bridge-bars {
    min-height: 7rem;
}

.commercial-chart-grid .insights-bridge-bar {
    grid-template-rows: 5.8rem auto auto;
}

.commercial-chart-grid .insights-bridge-bar > div {
    height: 5.8rem;
}

/* ============================================================
   PHASE 9 DELIVERY DASHBOARD REFRESH
   Scoped visual layer. Keeps the existing delivery dashboard
   sections, labels, KPIs, and permission logic intact.
   ============================================================ */

.delivery-dashboard {
    display: grid;
    gap: 0.75rem;
}

.delivery-dashboard > .mb-4,
.delivery-dashboard > .row,
.delivery-dashboard .dashboard-section {
    margin-bottom: 0 !important;
}

.delivery-dashboard .dashboard-hero,
.delivery-dashboard .dashboard-section,
.delivery-dashboard > .alert {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.delivery-dashboard .dashboard-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.delivery-dashboard .dashboard-hero__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.delivery-dashboard .dashboard-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.delivery-dashboard .dashboard-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.delivery-dashboard .dashboard-hero__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.delivery-dashboard > .alert {
    padding: 0.75rem 0.9rem;
}

.delivery-dashboard .dashboard-section {
    overflow: hidden;
}

.delivery-dashboard .dashboard-section > .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--cmt-grey-200);
}

.delivery-dashboard .dashboard-section > .card-header h2,
.delivery-dashboard .dashboard-section h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.delivery-dashboard .dashboard-section > .card-header p {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.delivery-dashboard .dashboard-section > .card-body {
    padding: 0.85rem 0.9rem;
}

.delivery-dashboard .dashboard-kpi-card,
.delivery-dashboard .dashboard-note-card,
.delivery-dashboard .dashboard-risk-item {
    height: 100%;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.delivery-dashboard .dashboard-kpi-card,
.delivery-dashboard .dashboard-note-card {
    padding: 0.65rem 0.7rem;
}

.delivery-dashboard .dashboard-kpi-card__label,
.delivery-dashboard .dashboard-note-card__label {
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.delivery-dashboard .dashboard-kpi-card__value,
.delivery-dashboard .dashboard-note-card__value {
    margin-top: 0.15rem;
    color: var(--cmt-black);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.delivery-dashboard .dashboard-kpi-card__copy,
.delivery-dashboard .dashboard-note-card__copy {
    margin-top: 0.25rem;
    color: var(--cmt-grey-500);
    font-size: 0.7rem;
    line-height: 1.32;
}

.delivery-dashboard .dashboard-subpanel {
    min-height: 0;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.delivery-dashboard .dashboard-approval-owner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.2rem 0.8rem;
    padding: 0.75rem 0.85rem;
    border-left: 4px solid var(--cmt-orange);
    background: #ffffff;
}

.delivery-dashboard .dashboard-approval-owner__label {
    grid-column: 1 / -1;
    color: var(--cmt-grey-700);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.delivery-dashboard .dashboard-approval-owner__stage {
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
}

.delivery-dashboard .dashboard-approval-owner__name {
    justify-self: end;
    color: var(--cmt-grey-600);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
}

.delivery-dashboard .dashboard-entry-points {
    background: #ffffff;
}

.delivery-dashboard .dashboard-risk-item {
    padding: 0.58rem 0.65rem;
}

.delivery-dashboard .dashboard-risk-item + .dashboard-risk-item {
    margin-top: 0.45rem;
}

.delivery-dashboard .dashboard-risk-item__meta {
    color: var(--cmt-grey-700);
    font-size: 0.68rem;
    font-weight: 800;
}

.delivery-dashboard .dashboard-risk-item__statement {
    margin-top: 0.18rem;
    color: var(--cmt-black);
    font-size: 0.82rem;
    line-height: 1.35;
}

.delivery-dashboard .dashboard-table-scroll {
    max-height: 24rem;
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.delivery-dashboard .dashboard-table-scroll--tall {
    max-height: 32rem;
}

.delivery-dashboard .table {
    margin-bottom: 0;
}

.delivery-dashboard .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.delivery-dashboard .table td {
    color: var(--cmt-black);
    font-size: 0.78rem;
    vertical-align: middle;
}

.delivery-dashboard .dashboard-heatmap-table {
    min-width: 58rem;
}

.delivery-dashboard .dashboard-heatmap-cell {
    min-width: 4.2rem;
    border-radius: 0.45rem;
}

.delivery-dashboard .dashboard-heatmap-cell__value {
    font-size: 0.8rem;
    font-weight: 800;
}

.delivery-dashboard .dashboard-heatmap-cell__meta {
    font-size: 0.68rem;
}

.delivery-chart-section {
    display: grid;
    gap: 0.5rem;
}

.delivery-chart-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.delivery-chart-section__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.delivery-chart-grid {
    display: grid;
    grid-template-columns: minmax(26rem, 1.35fr) minmax(17rem, 0.9fr) minmax(17rem, 0.9fr);
    gap: 0.6rem;
    align-items: stretch;
}

.delivery-chart-grid .insights-chart-card {
    min-height: 12rem;
    padding: 0.65rem 0.75rem;
}

.delivery-chart-grid .insights-chart-card__header {
    margin-bottom: 0.35rem;
}

.delivery-chart-grid .insights-chart-card__header h3 {
    font-size: 0.9rem;
}

.delivery-chart-grid .insights-line-chart svg {
    height: 7rem;
}

.delivery-chart-grid .insights-donut {
    width: 7.4rem;
}

/* ============================================================
   PHASE 9 ADMIN GOVERNANCE DASHBOARD REFRESH
   Scoped visual layer. Keeps the existing admin governance
   dashboard sections, labels, KPIs, routes, and permissions intact.
   ============================================================ */

.admin-governance-dashboard {
    display: grid;
    gap: 0.75rem;
}

.admin-governance-dashboard > .mb-4,
.admin-governance-dashboard > .row {
    margin-bottom: 0 !important;
}

.admin-governance-dashboard .dashboard-hero,
.admin-governance-dashboard .dashboard-section,
.admin-governance-dashboard > .alert {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.admin-governance-dashboard .dashboard-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.admin-governance-dashboard .dashboard-hero__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-governance-dashboard .dashboard-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.admin-governance-dashboard .dashboard-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.admin-governance-dashboard .dashboard-hero__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: min(35rem, 100%);
}

.admin-governance-dashboard > .alert {
    padding: 0.75rem 0.9rem;
}

.admin-governance-dashboard .dashboard-section {
    overflow: hidden;
}

.admin-governance-dashboard .dashboard-section > .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--cmt-grey-200);
}

.admin-governance-dashboard .dashboard-section > .card-header h2,
.admin-governance-dashboard .dashboard-section h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.admin-governance-dashboard .dashboard-section > .card-header p {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.admin-governance-dashboard .dashboard-section > .card-body {
    padding: 0.85rem 0.9rem;
}

.admin-governance-dashboard .dashboard-kpi-card,
.admin-governance-dashboard .dashboard-note-card {
    height: 100%;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.admin-governance-dashboard .dashboard-kpi-card__label,
.admin-governance-dashboard .dashboard-note-card__label {
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.admin-governance-dashboard .dashboard-kpi-card__value,
.admin-governance-dashboard .dashboard-note-card__value {
    margin-top: 0.15rem;
    color: var(--cmt-black);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.admin-governance-dashboard .dashboard-kpi-card__suffix {
    color: var(--cmt-grey-600);
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-governance-dashboard .dashboard-kpi-card__copy,
.admin-governance-dashboard .dashboard-note-card__copy {
    margin-top: 0.25rem;
    color: var(--cmt-grey-500);
    font-size: 0.7rem;
    line-height: 1.32;
}

.admin-governance-dashboard .dashboard-subpanel {
    min-height: 0;
    padding: 0.68rem 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: none;
}

.admin-governance-dashboard .dashboard-list-row {
    align-items: center;
    gap: 0.8rem;
    padding: 0.48rem 0;
    border-bottom: 1px solid var(--cmt-grey-200);
    font-size: 0.8rem;
}

.admin-governance-dashboard .dashboard-list-row > :first-child {
    min-width: 0;
}

.admin-governance-dashboard .dashboard-list-row > :last-child {
    color: var(--cmt-grey-700);
    font-weight: 700;
}

.admin-governance-dashboard .dashboard-risk-item {
    padding: 0.58rem 0.65rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.admin-governance-dashboard .dashboard-risk-item + .dashboard-risk-item {
    margin-top: 0.45rem;
}

.admin-governance-dashboard .dashboard-risk-item__meta {
    color: var(--cmt-grey-700);
    font-size: 0.68rem;
    font-weight: 800;
}

.admin-governance-dashboard .dashboard-risk-item__statement {
    margin-top: 0.18rem;
    color: var(--cmt-black);
    font-size: 0.82rem;
    line-height: 1.35;
}

.admin-governance-dashboard .dashboard-table-scroll {
    max-height: 24rem;
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.admin-governance-dashboard .dashboard-table-scroll--tall {
    max-height: 32rem;
}

.admin-governance-dashboard .table {
    margin-bottom: 0;
}

.admin-governance-dashboard .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-governance-dashboard .table td {
    color: var(--cmt-black);
    font-size: 0.78rem;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .admin-governance-dashboard .dashboard-hero__content {
        display: grid;
    }

    .admin-governance-dashboard .dashboard-hero__actions {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .admin-governance-dashboard .dashboard-hero h1 {
        font-size: 1.25rem;
    }

    .admin-governance-dashboard .dashboard-list-row {
        display: grid;
        justify-content: stretch;
    }

    .admin-governance-dashboard .dashboard-list-row > :last-child {
        margin-left: 0;
        text-align: left;
        white-space: normal;
    }
}

/* ============================================================
   PHASE 9 EXPORT CENTRE REFRESH
   Scoped visual layer. Keeps the existing export profiles,
   permissions, history, downloads, forms, and audit logic intact.
   ============================================================ */

.export-centre-dashboard {
    display: grid;
    gap: 0.75rem;
}

.export-centre-dashboard > .mb-4,
.export-centre-dashboard > .row,
.export-centre-dashboard > .dashboard-section {
    margin-bottom: 0 !important;
}

.export-centre-dashboard .dashboard-hero,
.export-centre-dashboard .dashboard-section,
.export-centre-dashboard > .alert {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.export-centre-dashboard .dashboard-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.export-centre-dashboard .dashboard-hero__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.export-centre-dashboard .dashboard-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.export-centre-dashboard .dashboard-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.export-centre-dashboard .dashboard-hero__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: min(36rem, 100%);
}

.export-centre-dashboard > .alert {
    padding: 0.75rem 0.9rem;
}

.export-centre-dashboard .dashboard-section {
    overflow: hidden;
}

.export-centre-dashboard .dashboard-section > .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--cmt-grey-200);
}

.export-centre-dashboard .dashboard-section > .card-header h2,
.export-centre-dashboard .dashboard-section h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.export-centre-dashboard .dashboard-section > .card-header p {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.export-centre-dashboard .dashboard-section > .card-body {
    padding: 0.85rem 0.9rem;
}

.export-centre-dashboard .dashboard-kpi-card,
.export-centre-dashboard .dashboard-note-card {
    height: 100%;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.export-centre-dashboard .dashboard-kpi-card__label,
.export-centre-dashboard .dashboard-note-card__label {
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.export-centre-dashboard .dashboard-kpi-card__value,
.export-centre-dashboard .dashboard-note-card__value {
    margin-top: 0.15rem;
    color: var(--cmt-black);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.export-centre-dashboard .dashboard-kpi-card__copy,
.export-centre-dashboard .dashboard-note-card__copy {
    margin-top: 0.25rem;
    color: var(--cmt-grey-500);
    font-size: 0.7rem;
    line-height: 1.32;
}

.export-centre-dashboard .form-label {
    margin-bottom: 0.3rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.export-centre-dashboard .form-select,
.export-centre-dashboard .form-check-input {
    border-color: var(--cmt-grey-300);
}

.export-centre-dashboard .form-text {
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
    line-height: 1.35;
}

.export-centre-dashboard #export-request .btn-primary {
    min-width: 10rem;
}

.export-centre-dashboard .dashboard-section .card.border-0.shadow-sm,
.export-centre-dashboard .dashboard-section .card.border-0.bg-light-subtle {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50) !important;
    box-shadow: none !important;
}

.export-centre-dashboard .dashboard-section .card.border-0.shadow-sm .card-body,
.export-centre-dashboard .dashboard-section .card.border-0.bg-light-subtle .card-body {
    padding: 0.8rem;
}

.export-centre-dashboard .dashboard-section h3,
.export-centre-dashboard .dashboard-section h4 {
    color: var(--cmt-black);
    font-weight: 800;
}

.export-centre-dashboard .dashboard-section code {
    color: var(--cmt-black);
    font-size: 0.74rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.export-centre-dashboard .border-top {
    border-top-color: var(--cmt-grey-200) !important;
}

.export-centre-dashboard .table-responsive {
    max-height: 32rem;
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.export-centre-dashboard .table {
    margin-bottom: 0;
}

.export-centre-dashboard .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.export-centre-dashboard .table td {
    color: var(--cmt-black);
    font-size: 0.78rem;
    vertical-align: middle;
}

.export-centre-dashboard .table td:nth-child(6) {
    max-width: 20rem;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .export-centre-dashboard .dashboard-hero__content {
        display: grid;
    }

    .export-centre-dashboard .dashboard-hero__actions {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .export-centre-dashboard .dashboard-hero h1 {
        font-size: 1.25rem;
    }
}

/* ============================================================
   PHASE 9 PROJECTS INDEX REFRESH
   Scoped visual layer for /projects. Keeps the existing list
   payload, workflow digest, permission-gated links, routes, and
   project setup logic intact.
   ============================================================ */

.projects-index-page {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.projects-index-page > .mb-4,
.projects-index-page > .row,
.projects-index-page > .card,
.projects-index-page > .alert {
    margin-bottom: 0 !important;
}

.projects-index-page > *,
.projects-index-page .card,
.projects-index-page .card-body,
.projects-index-page .card-header,
.projects-index-page .row,
.projects-index-page .row > [class*="col-"],
.projects-index-page .table-responsive {
    min-width: 0;
    max-width: 100%;
}

.projects-index-hero,
.projects-index-page > .card,
.projects-index-page > .alert,
.projects-index-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.projects-index-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.projects-index-hero > * {
    min-width: 0;
}

.projects-index-hero > div:first-child {
    flex: 1 1 34rem;
}

.projects-index-hero > .d-flex {
    flex: 1 1 18rem;
    justify-content: flex-end;
}

.projects-index-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.projects-index-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    max-width: 62rem;
    color: var(--cmt-grey-500) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.projects-index-hero .btn,
.projects-index-page .card-header .btn,
.projects-index-page .card-body .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.projects-index-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.projects-index-page > .row > [class*="col-"] > .card .card-body,
.projects-index-page > .card > .card-body > .row > [class*="col-"] > .card .card-body {
    padding: 0.68rem 0.75rem;
    background: var(--cmt-grey-50);
}

.projects-index-page .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
}

.projects-index-page .card-body {
    padding: 0.85rem 0.9rem;
}

.projects-index-page .card-header h2,
.projects-index-page .card h2,
.projects-index-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.projects-index-page .card-header h2,
.projects-index-page .card h2 {
    font-size: 1.05rem;
}

.projects-index-page .card h3 {
    font-size: 0.98rem;
}

.projects-index-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.projects-index-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.projects-index-page .card p {
    font-size: 0.82rem;
    line-height: 1.42;
}

.projects-index-kpis h2 {
    font-size: 1.35rem !important;
}

.projects-index-guide .card-body {
    border-left: 3px solid var(--cmt-orange);
}

.projects-index-page > .card > .card-body > .row > [class*="col-"] > .card,
.projects-index-page .list-group-item {
    border-color: var(--cmt-grey-200) !important;
}

.projects-index-page > .card > .card-body > .row > [class*="col-"] > .card {
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.projects-index-page .list-group-item {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.projects-index-page .list-group-item:first-child {
    padding-top: 0 !important;
}

.projects-index-page .list-group-item:last-child {
    padding-bottom: 0 !important;
}

.projects-index-page .table-responsive {
    max-height: min(68vh, 34rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.projects-index-page .table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
}

.projects-index-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.projects-index-page .table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
    vertical-align: middle;
}

.projects-index-page .table td:not(:first-child) {
    white-space: nowrap;
}

.projects-index-page .badge {
    font-weight: 750;
}

.projects-index-list .card-header .badge {
    align-self: center;
}

@media (max-width: 991.98px) {
    .projects-index-hero {
        display: grid !important;
    }

    .projects-index-hero > .d-flex {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .projects-index-hero h1 {
        font-size: 1.25rem;
    }

    .projects-index-page .card-body,
    .projects-index-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 OPERATIONAL WORKFLOW SURFACES REFRESH
   Scoped visual layer for Project Audit Explorer, Review Queue,
   and Notifications. Keeps filters, CSRF, notification actions,
   queue routes, audit payloads, and workflow services intact.
   ============================================================ */

.operational-page {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.operational-page > .mb-4,
.operational-page > .row,
.operational-page > .card,
.operational-page > .alert {
    margin-bottom: 0 !important;
}

.operational-page > *,
.operational-page .card,
.operational-page .card-body,
.operational-page .card-header,
.operational-page .row,
.operational-page .row > [class*="col-"],
.operational-page .table-responsive {
    min-width: 0;
    max-width: 100%;
}

.operational-hero,
.operational-card,
.operational-page > .card,
.operational-page > .alert,
.operational-kpi-row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.operational-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.operational-hero > div:first-child {
    flex: 1 1 34rem;
}

.operational-hero__actions {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.operational-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.operational-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    max-width: 62rem;
    color: var(--cmt-grey-500) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.operational-hero .btn,
.operational-filter-card .btn,
.operational-list-card .btn,
.operational-table-card .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.operational-page .card {
    overflow: hidden;
}

.operational-page .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
    background: #ffffff;
}

.operational-page .card-body {
    padding: 0.85rem 0.9rem;
}

.operational-page .card-header h2,
.operational-page .card h2,
.operational-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.operational-page .card h2,
.operational-page .card h3 {
    font-size: 1.05rem;
}

.operational-page .small.text-uppercase.text-muted,
.operational-page .eyebrow {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.operational-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.operational-page .card p,
.operational-page .alert {
    font-size: 0.82rem;
    line-height: 1.42;
}

.operational-kpi-row > [class*="col-"] > .card {
    height: 100%;
}

.operational-kpi-row .card-body {
    padding: 0.68rem 0.75rem;
    background: var(--cmt-grey-50);
}

.operational-kpi-row h2 {
    font-size: 1.35rem !important;
}

.operational-filter-card .form-label {
    margin-bottom: 0.28rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.operational-filter-card .form-control,
.operational-filter-card .form-select {
    min-height: 2.34rem;
    border-color: var(--cmt-grey-200);
    font-size: 0.86rem;
}

.operational-inline-control .form-select {
    width: auto;
    min-width: 14rem;
}

.operational-page .planning-table-shell {
    max-height: min(68vh, 34rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.operational-page .planning-data-table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
}

.operational-page .planning-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.operational-page .planning-data-table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
}

.operational-page--project-audit .planning-data-table th:nth-child(4),
.operational-page--project-audit .planning-data-table td:nth-child(4),
.operational-page--project-audit .planning-data-table th:nth-child(6),
.operational-page--project-audit .planning-data-table td:nth-child(6) {
    min-width: 18rem;
    white-space: normal;
}

.operational-page--review-queue .planning-data-table th:nth-child(1),
.operational-page--review-queue .planning-data-table td:nth-child(1),
.operational-page--review-queue .planning-data-table th:nth-child(2),
.operational-page--review-queue .planning-data-table td:nth-child(2) {
    min-width: 12rem;
    white-space: normal;
}

.operational-page--review-queue .planning-data-table th:nth-child(4),
.operational-page--review-queue .planning-data-table td:nth-child(4),
.operational-page--review-queue .planning-data-table th:nth-child(7),
.operational-page--review-queue .planning-data-table td:nth-child(7) {
    min-width: 15rem;
    white-space: normal;
}

.operational-page .badge {
    font-weight: 750;
}

.operational-page--notifications .notification-center__row {
    margin: 0.65rem;
    padding: 0.78rem 0.82rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.operational-page--notifications .notification-center__row + .notification-center__row {
    margin-top: 0;
}

.operational-page--notifications .notification-center__title {
    color: var(--cmt-black);
    font-size: 0.95rem;
    font-weight: 800;
}

.operational-page--notifications .notification-center__body {
    max-width: 68rem;
    color: var(--cmt-grey-500);
    font-size: 0.82rem;
    line-height: 1.45;
}

.operational-page--notifications .notification-center__meta {
    color: var(--cmt-grey-500);
}

@media (max-width: 991.98px) {
    .operational-hero {
        display: grid !important;
    }

    .operational-hero__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .operational-hero h1 {
        font-size: 1.25rem;
    }

    .operational-page .card-body,
    .operational-hero {
        padding: 0.75rem;
    }

    .operational-inline-control .form-select {
        width: 100%;
        min-width: 0;
    }

    .operational-page--notifications .notification-center__row {
        margin: 0.5rem;
    }
}

/* ============================================================
   PHASE 9 PROJECT MAINTENANCE FLOW REFRESH
   Scoped visual layer for project create/edit/copy and version copy.
   Keeps forms, CSRF, selectors, POST routes, validation payloads,
   governed copy semantics, and service contracts intact.
   ============================================================ */

.project-maintenance-page {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.project-maintenance-page > .mb-4,
.project-maintenance-page > .card,
.project-maintenance-page > .alert {
    margin-bottom: 0 !important;
}

.project-maintenance-page > *,
.project-maintenance-page .card,
.project-maintenance-page .card-body,
.project-maintenance-page .card-header,
.project-maintenance-page .row,
.project-maintenance-page .row > [class*="col-"] {
    min-width: 0;
    max-width: 100%;
}

.project-maintenance-hero,
.project-maintenance-card,
.project-maintenance-page > .alert {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.project-maintenance-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.project-maintenance-hero > div:first-child {
    flex: 1 1 34rem;
}

.project-maintenance-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.project-maintenance-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    max-width: 58rem;
    color: var(--cmt-grey-500) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.project-maintenance-hero .btn,
.project-maintenance-actions .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.project-maintenance-card {
    overflow: hidden;
}

.project-maintenance-card__header {
    padding: 0.78rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
    background: #ffffff;
}

.project-maintenance-card__header h2 {
    color: var(--cmt-black);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.project-maintenance-card__header .badge {
    border: 1px solid var(--cmt-grey-200);
    color: var(--cmt-grey-700);
    font-weight: 750;
}

.project-maintenance-card > .card-body {
    padding: 0.85rem 0.9rem;
}

.project-maintenance-form {
    display: grid;
    gap: 0.75rem;
}

.project-form-section {
    padding: 0.82rem 0.85rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.project-form-section__head {
    margin-bottom: 0.65rem;
}

.project-form-section__head h3 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
}

.project-form-section__head p {
    margin: 0.25rem 0 0;
    color: var(--cmt-grey-500);
    font-size: 0.8rem;
    line-height: 1.35;
}

.project-maintenance-form .form-label {
    margin-bottom: 0.28rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.project-maintenance-form .form-control,
.project-maintenance-form .form-select {
    min-height: 2.34rem;
    border-color: var(--cmt-grey-200);
    font-size: 0.86rem;
}

.project-maintenance-form .form-text,
.project-maintenance-form .text-muted {
    color: var(--cmt-grey-500) !important;
    font-size: 0.76rem;
    line-height: 1.35;
}

.project-maintenance-source-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
    padding: 0.75rem 0.82rem;
    border-color: var(--cmt-grey-200);
    border-left: 4px solid var(--cmt-orange);
    background: #ffffff;
    color: var(--cmt-black);
}

.project-maintenance-source-note strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-maintenance-source-note span {
    color: var(--cmt-grey-500);
    font-size: 0.78rem;
    font-weight: 750;
}

.project-maintenance-source-note p {
    grid-column: 1 / -1;
    color: var(--cmt-grey-500);
    font-size: 0.8rem;
    line-height: 1.38;
}

.project-maintenance-version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.6rem;
}

.project-maintenance-version-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    min-width: 0;
    min-height: 100%;
    padding: 0.68rem 0.72rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    cursor: pointer;
}

.project-maintenance-version-option:hover {
    border-color: var(--cmt-orange);
}

.project-maintenance-version-option__body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-maintenance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.project-maintenance-summary-item {
    min-width: 0;
    padding: 0.68rem 0.72rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.project-maintenance-summary-item span {
    display: block;
    color: var(--cmt-grey-500);
    font-size: 0.74rem;
    font-weight: 800;
}

.project-maintenance-summary-item strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--cmt-black);
    font-size: 1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.project-maintenance-actions {
    padding-top: 0.1rem;
}

@media (max-width: 991.98px) {
    .project-maintenance-hero {
        display: grid !important;
    }

    .project-maintenance-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .project-maintenance-hero h1 {
        font-size: 1.25rem;
    }

    .project-maintenance-hero,
    .project-maintenance-card > .card-body,
    .project-form-section {
        padding: 0.75rem;
    }

    .project-maintenance-source-note {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PHASE 9 PROJECT AND VERSION SUMMARY REFRESH
   Scoped visual layer. Keeps existing routes, forms, workflow
   actions, permissions, CSRF, tables, and project/version logic intact.
   ============================================================ */

.project-overview-page,
.version-summary-page {
    display: grid;
    gap: 0.75rem;
}

.project-overview-page > .mb-4,
.project-overview-page > .row,
.project-overview-page > .card,
.version-summary-page > .mb-4,
.version-summary-page > .row,
.version-summary-page > .card {
    margin-bottom: 0 !important;
}

.project-overview-hero,
.version-summary-hero,
.project-overview-page > .card,
.version-summary-page > .card,
.project-overview-page > .row > [class*="col-"] > .card,
.version-summary-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.project-overview-hero,
.version-summary-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.project-overview-hero h1,
.version-summary-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.project-overview-hero p:not(.eyebrow),
.version-summary-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.project-overview-hero .btn,
.version-summary-hero .btn,
.version-summary-page > .card:first-of-type .btn,
.version-summary-page > .card:last-child .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.project-overview-page > .row > [class*="col-"] > .card,
.version-summary-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.project-overview-page > .row > [class*="col-"] > .card .card-body,
.version-summary-page > .row > [class*="col-"] > .card .card-body {
    padding: 0.68rem 0.75rem;
    background: var(--cmt-grey-50);
}

.project-overview-page .card-body,
.version-summary-page .card-body {
    padding: 0.85rem 0.9rem;
}

.project-overview-page .card-header,
.version-summary-page .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
}

.project-overview-page .small.text-uppercase.text-muted,
.version-summary-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.project-overview-page h2,
.project-overview-page h3,
.version-summary-page h2,
.version-summary-page h3,
.version-summary-page h4 {
    color: var(--cmt-black);
    font-weight: 800;
}

.project-overview-page .card h2,
.project-overview-page .card h3,
.version-summary-page .card h2,
.version-summary-page .card h3,
.version-summary-page .card h4 {
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.project-overview-page .card h2,
.version-summary-page .card h2 {
    font-size: 1.05rem;
}

.project-overview-page .card h3,
.version-summary-page .card h3,
.version-summary-page .card h4 {
    font-size: 0.98rem;
}

.project-overview-page .text-muted,
.version-summary-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.project-overview-page .card p,
.version-summary-page .card p {
    font-size: 0.82rem;
    line-height: 1.42;
}

.project-overview-page > .card > .card-body > .row > [class*="col-"] > .card,
.version-summary-page #workflow-governance .row > [class*="col-"] > .card,
.version-summary-page #workflow-governance > .card-body > .card,
.version-summary-page #workflow-governance .border.rounded {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem;
    background: var(--cmt-grey-50) !important;
    box-shadow: none !important;
}

.project-overview-page > .card > .card-body > .row > [class*="col-"] > .card .card-body,
.version-summary-page #workflow-governance .row > [class*="col-"] > .card .card-body {
    padding: 0.65rem 0.7rem;
}

.version-summary-page #workflow-governance {
    overflow: hidden;
}

.version-summary-page #workflow-governance .mb-4 {
    margin-bottom: 0.75rem !important;
}

.version-summary-page #workflow-governance .alert {
    border-radius: 0.5rem;
}

.version-summary-page #workflow-governance .card + .card,
.version-summary-page #workflow-governance .alert + .card {
    margin-top: 0.75rem;
}

.version-summary-page #workflow-governance .workflow-action-panel {
    border-radius: 0.5rem;
}

.version-summary-page .form-label {
    margin-bottom: 0.3rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.project-overview-page .table-responsive,
.version-summary-page .table-responsive {
    max-height: 32rem;
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.project-overview-page .table,
.version-summary-page .table {
    margin-bottom: 0;
}

.project-overview-page .table thead th,
.version-summary-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.project-overview-page .table td,
.version-summary-page .table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
    vertical-align: middle;
}

.project-overview-page .badge,
.version-summary-page .badge {
    font-weight: 750;
}

@media (max-width: 991.98px) {
    .project-overview-hero,
    .version-summary-hero {
        display: grid !important;
    }
}

@media (max-width: 767.98px) {
    .project-overview-hero h1,
    .version-summary-hero h1 {
        font-size: 1.25rem;
    }

    .project-overview-page .card-body,
    .version-summary-page .card-body,
    .project-overview-hero,
    .version-summary-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 SHARED VERSION NAVIGATION PATTERN
   Central styling for the approved compact version header,
   version setup rail, and workstream planning sequence.
   ============================================================ */

.version-context-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
    gap: 1.35rem;
    align-items: start;
}

.version-context-header__body {
    min-width: 0;
}

.version-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.version-context-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.18rem 0.6rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 999px;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.version-context-actions {
    display: grid;
    gap: 0.5rem;
    align-self: start;
}

.version-context-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    width: 100%;
    padding: 0.36rem 0.72rem !important;
    border-radius: 0.48rem;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.version-context-actions__primary {
    min-height: 2.25rem !important;
}

.version-context-actions .ai-hub-entry-button {
    gap: 0.5rem;
    min-height: 2.5rem;
    border: 1.5px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(100deg, #5b4ce6 0%, #008f7a 100%) border-box;
    color: var(--cmt-body-strong);
    box-shadow: none;
}

.version-context-actions .ai-hub-entry-button:hover,
.version-context-actions .ai-hub-entry-button:focus {
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(100deg, #4f46e5 0%, #009f8a 100%) border-box;
    color: var(--cmt-black);
    transform: translateY(-1px);
}

.version-context-actions .ai-hub-entry-button:focus-visible {
    outline: 2px solid rgba(91, 76, 230, 0.32);
    outline-offset: 3px;
}

.ai-hub-entry-button__icon {
    display: inline-flex;
    width: 1.05rem;
    height: 1.05rem;
    color: #5b4ce6;
    flex: 0 0 auto;
}

.ai-hub-entry-button__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.version-context-actions__secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.version-context-actions__secondary .btn {
    min-height: 1.9rem;
    border-color: transparent;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-500);
    font-size: 0.78rem !important;
}

.version-context-actions__secondary .btn:hover {
    background: var(--cmt-grey-100);
    color: var(--cmt-black);
}

.version-setup-nav {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr) minmax(13rem, 15.75rem);
    align-items: stretch;
    margin-bottom: 0.9rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
    overflow: visible;
}

.version-setup-nav--no-more {
    grid-template-columns: 10.5rem minmax(0, 1fr);
}

.version-setup-nav__title {
    display: grid;
    align-content: center;
    gap: 0.08rem;
    min-width: 0;
    padding: 0.55rem 0.9rem;
    border-right: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem 0 0 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.version-setup-nav__title small {
    overflow: hidden;
    color: var(--cmt-grey-500);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: none;
}

.version-setup-nav__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-width: 0;
    overflow-x: auto;
    padding: 0.6rem 0.7rem;
    scrollbar-width: thin;
}

.version-setup-nav__chip,
.version-setup-nav__menu-item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.34rem 0.72rem;
    border: 1px solid #c6ced8;
    border-radius: 0.45rem;
    background: #ffffff;
    color: #4a5868;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.version-setup-nav__chip:hover,
.version-setup-nav__menu-item:hover {
    border-color: #8794a3;
    background: var(--cmt-grey-50);
    color: var(--cmt-black);
    text-decoration: none;
}

.version-setup-nav__chip.is-active,
.version-setup-nav__menu-item.is-active {
    border-color: var(--cmt-orange);
    background: var(--cmt-orange);
    color: #ffffff;
}

.version-setup-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    margin-left: 0.42rem;
    padding: 0 0.32rem;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.08);
    font-size: 0.68rem;
    font-weight: 900;
}

.version-setup-nav__chip.is-active .version-setup-nav__count {
    background: rgba(255, 255, 255, 0.35);
}

.version-setup-nav__more {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-left: 1px solid var(--cmt-grey-200);
}

.version-setup-nav__more summary {
    list-style: none;
}

.version-setup-nav__more summary::-webkit-details-marker {
    display: none;
}

.version-setup-nav__more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 2rem;
    width: 100%;
    padding: 0.34rem 0.72rem;
    border: 1px solid #c6ced8;
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
    color: #526171;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.version-setup-nav__more-button:hover,
.version-setup-nav__more.is-active .version-setup-nav__more-button {
    border-color: #8794a3;
    background: var(--cmt-grey-100);
    color: var(--cmt-black);
}

.version-setup-nav__caret {
    color: var(--cmt-grey-500);
    font-size: 0.68rem;
    font-weight: 900;
    transform: translateY(-0.05rem);
}

.version-setup-nav__menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0.7rem;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr));
    gap: 0.45rem;
    min-width: 23rem;
    padding: 0.7rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 24, 32, 0.16);
}

.version-setup-nav__more:not([open]) .version-setup-nav__menu {
    display: none;
}

.report-pack-menu {
    display: grid;
    gap: 0.7rem;
    margin: -0.2rem 0 0.95rem;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.04);
}

.report-pack-menu__header,
.report-pack-menu__pack summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.report-pack-menu__header h2 {
    margin: 0.1rem 0 0;
    font-size: 1rem;
}

.report-pack-menu__packs {
    display: grid;
    gap: 0.55rem;
}

.report-pack-menu__pack {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
    overflow: hidden;
}

.report-pack-menu__pack summary {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    color: var(--cmt-heading);
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.report-pack-menu__pack summary::-webkit-details-marker {
    display: none;
}

.report-pack-menu__pack summary small {
    display: block;
    margin-top: 0.08rem;
    color: var(--cmt-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.report-pack-menu__count {
    flex: 0 0 auto;
    color: var(--cmt-muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.report-pack-menu__groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0 0.65rem 0.65rem;
}

.report-pack-menu__group {
    min-width: 0;
}

.report-pack-menu__group h3 {
    margin: 0 0 0.35rem;
    color: var(--cmt-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.report-pack-menu__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.report-pack-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    max-width: 100%;
    padding: 0.32rem 0.6rem;
    border: 1px solid #c6ced8;
    border-radius: 0.4rem;
    background: #ffffff;
    color: var(--cmt-heading);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.15;
}

.report-pack-menu__link:hover {
    border-color: var(--cmt-orange);
    background: rgba(255, 102, 0, 0.06);
    color: var(--cmt-black);
    text-decoration: none;
}

.report-pack-menu__link small {
    color: var(--cmt-muted);
    font-size: 0.68rem;
    font-weight: 800;
}

.planning-flow-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 16.25rem);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 0.9rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.planning-flow-nav__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    min-width: 0;
}

.planning-flow-nav__step {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    min-height: 3.35rem;
    padding: 0.5rem 0.72rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    color: var(--cmt-body-strong);
}

.planning-flow-nav__step:hover {
    border-color: #c6ced8;
    background: var(--cmt-grey-100);
    color: var(--cmt-black);
    text-decoration: none;
}

.planning-flow-nav__step.is-active {
    border-color: var(--cmt-orange);
    background: #fff7f2;
    box-shadow: inset 0 3px 0 var(--cmt-orange);
}

.planning-flow-nav__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 50%;
    background: #ffffff;
    color: var(--cmt-black);
    font-size: 0.86rem;
    font-weight: 900;
}

.planning-flow-nav__step.is-done .planning-flow-nav__number {
    border-color: #198754;
    background: #198754;
    color: #ffffff;
}

.planning-flow-nav__step strong,
.planning-flow-nav__step small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-flow-nav__step strong {
    color: var(--cmt-grey-700);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.12;
}

.planning-flow-nav__step small {
    margin-top: 0.12rem;
    color: var(--cmt-grey-500);
    font-size: 0.76rem;
}

.planning-flow-nav__actions {
    display: grid;
    gap: 0.5rem;
    align-content: center;
}

.planning-flow-nav__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.36rem 0.72rem;
    border: 1px solid #9ca7b3;
    border-radius: 0.48rem;
    background: #ffffff;
    color: var(--cmt-black);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.planning-flow-nav__action:hover {
    background: var(--cmt-grey-50);
    color: var(--cmt-black);
    text-decoration: none;
}

@media (max-width: 1199.98px) {
    .version-context-header,
    .planning-flow-nav {
        grid-template-columns: 1fr;
    }

    .version-context-actions,
    .planning-flow-nav__actions {
        max-width: 21rem;
    }

    .version-setup-nav {
        grid-template-columns: 10.5rem minmax(0, 1fr);
    }

    .version-setup-nav__more {
        grid-column: 2;
        border-top: 1px solid var(--cmt-grey-200);
        border-left: 0;
        padding-top: 0.5rem;
    }

    .version-setup-nav__more-button {
        max-width: 15.75rem;
    }

    .version-setup-nav__menu {
        right: auto;
        left: 0.7rem;
        width: min(34rem, calc(100vw - 2rem));
    }

    .report-pack-menu__groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .planning-flow-nav__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .version-context-actions,
    .planning-flow-nav__actions {
        max-width: none;
    }

    .version-context-actions__secondary,
    .planning-flow-nav__steps {
        grid-template-columns: 1fr;
    }

    .version-setup-nav {
        grid-template-columns: 1fr;
    }

    .version-setup-nav__title,
    .version-setup-nav__more {
        grid-column: 1;
    }

    .version-setup-nav__title {
        min-height: 2.5rem;
        border-right: 0;
        border-bottom: 1px solid var(--cmt-grey-200);
        border-radius: 0.5rem 0.5rem 0 0;
    }

    .version-setup-nav__more {
        display: block;
        border-top: 1px solid var(--cmt-grey-200);
        border-left: 0;
    }

    .version-setup-nav__more-button {
        max-width: none;
    }

    .version-setup-nav__menu {
        position: static;
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
        margin-top: 0.5rem;
    }

    .report-pack-menu__header,
    .report-pack-menu__pack summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-pack-menu__groups {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PHASE 9 COMMERCIAL RATES WORKSPACE REFRESH
   Scoped visual layer. Keeps version-owned charge-card selection,
   charge-row forms, permissions, CSRF, filters, and coverage logic intact.
   ============================================================ */

.commercial-rates-page {
    display: grid;
    gap: 0.75rem;
}

.commercial-rates-page > .mb-4,
.commercial-rates-page > .row,
.commercial-rates-page > .card,
.commercial-rates-page > .alert {
    margin-bottom: 0 !important;
}

.commercial-rates-hero,
.commercial-rates-page > .card,
.commercial-rates-page > .alert,
.commercial-rates-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.commercial-rates-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.commercial-rates-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.commercial-rates-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.commercial-rates-hero .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.commercial-rates-page > .alert {
    padding: 0.75rem 0.9rem;
}

.commercial-rates-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.commercial-rates-page > .row > [class*="col-"] > .card .card-body {
    padding: 0.68rem 0.75rem;
    background: var(--cmt-grey-50);
}

.commercial-rates-page > .card {
    overflow: hidden;
}

.commercial-rates-page .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
}

.commercial-rates-page .card-body {
    padding: 0.85rem 0.9rem;
}

.commercial-rates-page .card-header h2,
.commercial-rates-page .card h2,
.commercial-rates-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.commercial-rates-page .card-header h2,
.commercial-rates-page .card h2 {
    font-size: 1.05rem;
}

.commercial-rates-page .card h3 {
    font-size: 0.98rem;
}

.commercial-rates-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.commercial-rates-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.commercial-rates-page .card p {
    font-size: 0.82rem;
    line-height: 1.42;
}

.commercial-rates-page .border.rounded {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem !important;
    background: var(--cmt-grey-50);
}

.commercial-rates-page .planning-filter-bar {
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.commercial-rates-page .planning-filter-bar .form-select,
.commercial-rates-page .planning-filter-bar .form-control {
    width: 100%;
    max-width: none;
}

.commercial-rates-page .form-label {
    margin-bottom: 0.3rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.commercial-rates-page .form-text {
    color: var(--cmt-grey-500);
    font-size: 0.72rem;
    line-height: 1.35;
}

.commercial-rates-page .table-responsive {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.commercial-rates-page #considered-commercial-coverage .table-responsive {
    max-height: min(68vh, 38rem);
}

.commercial-rates-page .table {
    margin-bottom: 0;
}

.commercial-rates-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.commercial-rates-page .table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
    vertical-align: middle;
}

.commercial-rates-page .table td .fw-semibold {
    overflow-wrap: anywhere;
}

.commercial-rates-page .badge {
    font-weight: 750;
}

.commercial-rates-page #project-charge-rates-panel[hidden] {
    display: none !important;
}

@media (max-width: 991.98px) {
    .commercial-rates-hero {
        display: grid !important;
    }
}

@media (max-width: 767.98px) {
    .commercial-rates-hero h1 {
        font-size: 1.25rem;
    }

    .commercial-rates-page .card-body,
    .commercial-rates-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 SETUP PLANNER REFRESH
   Scoped visual layer for Wave Planner and Phase Planner. Keeps
   governed add forms, current-records tables, CSRF, validation,
   delete/edit actions, and setup route behavior intact.
   ============================================================ */

.setup-planner-page {
    display: grid;
    gap: 0.75rem;
}

.setup-planner-page > .mb-4,
.setup-planner-page > .row,
.setup-planner-page > .card,
.setup-planner-page > .alert {
    margin-bottom: 0 !important;
}

.setup-planner-hero,
.setup-planner-page > .card,
.setup-planner-page > .alert,
.setup-planner-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.setup-planner-hero {
    padding: 0.95rem 1rem;
    border-left: 4px solid var(--cmt-orange);
}

.setup-planner-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.45rem;
    font-weight: 760;
    line-height: 1.18;
}

.setup-planner-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.setup-planner-hero .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.setup-planner-page > .alert {
    padding: 0.75rem 0.9rem;
}

.setup-planner-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.setup-planner-page > .row > [class*="col-"] > .card .card-body {
    padding: 0.68rem 0.75rem;
    background: var(--cmt-grey-50);
}

.setup-planner-page > .card {
    overflow: hidden;
}

.setup-planner-page .card-header {
    padding: 0.75rem 0.9rem;
    border-bottom-color: var(--cmt-grey-200);
}

.setup-planner-page .card-body {
    padding: 0.85rem 0.9rem;
}

.setup-planner-page .card-header h2,
.setup-planner-page .card h2,
.setup-planner-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.setup-planner-page .card-header h2,
.setup-planner-page .card h2 {
    font-size: 1.05rem;
}

.setup-planner-page .card h3 {
    font-size: 0.98rem;
}

.setup-planner-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.setup-planner-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.setup-planner-page .card p {
    font-size: 0.82rem;
    line-height: 1.42;
}

.setup-planner-page .border.rounded {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem !important;
    background: var(--cmt-grey-50) !important;
}

.setup-planner-page .form-label {
    margin-bottom: 0.3rem;
    color: var(--cmt-grey-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.setup-planner-page .form-check-label {
    color: var(--cmt-black);
    font-size: 0.82rem;
}

.setup-planner-page .table-responsive {
    max-height: min(62vh, 34rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
}

.setup-planner-page .table {
    margin-bottom: 0;
}

.setup-planner-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.setup-planner-page .table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
    vertical-align: middle;
}

.setup-planner-page .table td .fw-semibold {
    overflow-wrap: anywhere;
}

.setup-planner-page .badge {
    font-weight: 750;
}

@media (max-width: 991.98px) {
    .setup-planner-hero {
        display: grid !important;
    }
}

@media (max-width: 767.98px) {
    .setup-planner-hero h1 {
        font-size: 1.25rem;
    }

    .setup-planner-page .card-body,
    .setup-planner-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 PLANNING WORKSPACE REFRESH
   Scoped visual layer for the consolidated planning workspace.
   Keeps saved-batch/current-batch data, filters, actions, and
   financial-review separation intact.
   ============================================================ */

.planning-workspace-page {
    display: grid;
    gap: 0.8rem;
}

.planning-workspace-page > .mb-4,
.planning-workspace-page > .row,
.planning-workspace-page > .card,
.planning-workspace-page > .alert {
    margin-bottom: 0 !important;
}

.planning-workspace-hero,
.planning-workspace-page > .card,
.planning-workspace-page > .alert,
.planning-workspace-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.planning-workspace-hero {
    padding: 1rem 1.05rem;
    border-left: 4px solid var(--cmt-orange);
}

.planning-workspace-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.5rem;
    font-weight: 780;
    line-height: 1.16;
}

.planning-workspace-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.planning-workspace-hero .btn,
.planning-workspace-page .card-header .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.planning-workspace-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.planning-workspace-page > .row > [class*="col-"] > .card .card-body {
    padding: 0.72rem 0.8rem;
    background: var(--cmt-grey-50);
}

.planning-workspace-page > .card {
    overflow: hidden;
}

.planning-workspace-page .card-header {
    padding: 0.78rem 0.95rem;
    border-bottom-color: var(--cmt-grey-200);
}

.planning-workspace-page .card-body {
    padding: 0.9rem 0.95rem;
}

.planning-workspace-page .card-header h2,
.planning-workspace-page .card h2,
.planning-workspace-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.planning-workspace-page .card-header h2,
.planning-workspace-page .card h2 {
    font-size: 1.08rem;
}

.planning-workspace-page .card h3 {
    font-size: 0.98rem;
}

.planning-workspace-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.planning-workspace-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.planning-workspace-page .card p {
    font-size: 0.83rem;
    line-height: 1.42;
}

.planning-workspace-kpis h2,
.planning-workspace-summary-card h3 {
    font-size: 1.35rem !important;
}

.planning-workspace-actions .card-body {
    display: flex;
    flex-direction: column;
}

.planning-workspace-actions .card-body .btn {
    align-self: flex-start;
    margin-top: auto;
}

.planning-workspace-status-card .row {
    align-items: center;
}

.planning-workspace-status-card .alert,
.planning-workspace-focus-card .alert,
.planning-workspace-lines .alert {
    padding: 0.68rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.planning-workspace-summary-card .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
}

.planning-workspace-summary-card .row > [class*="col-"] > .card .card-body {
    padding: 0.72rem 0.8rem;
}

.planning-workspace-page .planning-filter-bar {
    align-items: end;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.planning-workspace-page .planning-filter-bar .form-label {
    margin-bottom: 0.25rem;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 800;
}

.planning-workspace-page .planning-filter-bar .form-select,
.planning-workspace-page .planning-filter-bar .form-control {
    max-width: none;
}

.planning-workspace-page .planning-table-shell {
    max-height: min(64vh, 34rem);
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.planning-workspace-page .planning-table-shell--tall {
    max-height: min(72vh, 42rem);
}

.planning-workspace-page .planning-data-table {
    margin-bottom: 0;
}

.planning-workspace-page .planning-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.planning-workspace-page .planning-data-table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
}

.planning-workspace-page .planning-data-table td .small {
    color: var(--cmt-grey-500);
    line-height: 1.45;
}

@media (max-width: 991.98px) {
    .planning-workspace-hero {
        display: grid !important;
    }
}

@media (max-width: 767.98px) {
    .planning-workspace-hero h1 {
        font-size: 1.28rem;
    }

    .planning-workspace-page .card-body,
    .planning-workspace-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 WORKSTREAM PLANNING REFRESH
   Scoped visual layer for the workstream Definition step. Keeps
   resource-slot save/delete forms, dynamic delivery rows, and
   planning-flow route behavior intact.
   ============================================================ */

.workstream-planning-page {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
    max-width: 100%;
}

.workstream-planning-page > .mb-4,
.workstream-planning-page > .row,
.workstream-planning-page > .card,
.workstream-planning-page > .alert {
    margin-bottom: 0 !important;
}

.workstream-planning-page > *,
.workstream-planning-page .card,
.workstream-planning-page .card-body,
.workstream-planning-page .table-responsive,
.workstream-planning-page > .row,
.workstream-planning-page > .row > [class*="col-"] {
    min-width: 0;
    max-width: 100%;
}

.workstream-planning-hero,
.workstream-planning-page > .card,
.workstream-planning-page > .alert,
.workstream-planning-page > .row > [class*="col-"] > .card {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.workstream-planning-hero {
    padding: 1rem 1.05rem;
    border-left: 4px solid var(--cmt-orange);
}

.workstream-planning-hero > * {
    min-width: 0;
}

.workstream-planning-hero > div:first-child {
    flex: 1 1 34rem;
}

.workstream-planning-hero > .d-flex {
    flex: 1 1 28rem;
    max-width: 100%;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.workstream-planning-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.5rem;
    font-weight: 780;
    line-height: 1.16;
}

.workstream-planning-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    max-width: 52rem;
    color: var(--cmt-body) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.workstream-planning-hero .btn,
.workstream-planning-page .card-header .btn,
.workstream-planning-page .card-body .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.workstream-planning-page > .row > [class*="col-"] > .card {
    height: 100%;
    overflow: hidden;
}

.workstream-planning-page > .row > [class*="col-"] > .card .card-body {
    padding: 0.72rem 0.8rem;
    background: var(--cmt-grey-50);
}

.workstream-planning-page > .card {
    overflow: hidden;
}

.workstream-planning-page .card-header {
    padding: 0.78rem 0.95rem;
    border-bottom-color: var(--cmt-grey-200);
    min-width: 0;
}

.workstream-planning-page .card-body {
    padding: 0.9rem 0.95rem;
}

.workstream-planning-page .card-header > div:first-child,
.workstream-planning-page .card-body > .d-flex > div:first-child {
    min-width: 0;
}

.workstream-planning-page .card-header > .d-flex,
.workstream-planning-page .card-body > .d-flex {
    min-width: 0;
    max-width: 100%;
}

.workstream-planning-page .card-header h2,
.workstream-planning-page .card h2,
.workstream-planning-page .card h3,
.workstream-planning-page .card h4 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.workstream-planning-page .card-header h2,
.workstream-planning-page .card h2 {
    font-size: 1.08rem;
}

.workstream-planning-page .card h3,
.workstream-planning-page .card h4 {
    font-size: 0.98rem;
}

.workstream-planning-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.workstream-planning-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.workstream-planning-page .card p {
    font-size: 0.83rem;
    line-height: 1.42;
}

.workstream-planning-kpis h2,
.workstream-planning-slot-summary h2 {
    font-size: 1.25rem !important;
}

.workstream-planning-state .card-body {
    display: grid;
    align-content: start;
    gap: 0.25rem;
}

.workstream-planning-state .card-body .mt-3 {
    margin-top: 0.55rem !important;
}

.workstream-planning-page .alert {
    padding: 0.68rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.workstream-planning-page .border.rounded {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem !important;
    background: var(--cmt-grey-50) !important;
}

.workstream-planning-page .form-label {
    margin-bottom: 0.28rem;
    color: var(--cmt-grey-700);
    font-size: 0.74rem;
    font-weight: 800;
}

.workstream-planning-page .form-text,
.workstream-planning-page .form-check-label {
    color: var(--cmt-grey-500);
    font-size: 0.8rem;
    line-height: 1.4;
}

.workstream-planning-page .planning-table-shell {
    width: 100%;
    max-width: 100%;
    max-height: min(64vh, 34rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.workstream-planning-page .planning-table-shell--tall {
    max-height: min(70vh, 40rem);
}

.workstream-planning-page .planning-data-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.workstream-planning-page .planning-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workstream-planning-page .planning-data-table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
}

.workstream-planning-page .planning-data-table td .small {
    color: var(--cmt-grey-500);
    line-height: 1.45;
}

.workstream-planning-entry .planning-slot-builder__rows {
    gap: 0.65rem !important;
}

.workstream-planning-entry .planning-slot-row {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem;
    background: #ffffff;
}

.workstream-planning-entry .planning-slot-row__body {
    padding: 0.78rem;
}

.workstream-planning-entry .planning-slot-row__source-bar {
    min-height: 100%;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.45rem;
    background: var(--cmt-grey-50);
}

@media (max-width: 991.98px) {
    .workstream-planning-hero {
        display: grid !important;
    }

    .workstream-planning-hero > .d-flex {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .workstream-planning-hero h1 {
        font-size: 1.28rem;
    }

    .workstream-planning-page .card-body,
    .workstream-planning-hero {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 WORKSTREAM FLOW REFRESH
   Scoped visual layer for Mapping Matrix, Generation Review,
   and Generated Batches. Keeps mapping inputs, generation
   forms, saved-batch lifecycle, allocation editors, mass-change
   hooks, and manual/exception rows intact.
   ============================================================ */

.workstream-flow-page {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
    max-width: 100%;
}

.workstream-flow-page > .mb-4,
.workstream-flow-page > .row,
.workstream-flow-page > .card,
.workstream-flow-page > .alert,
.workstream-flow-page > details.card,
.workstream-flow-review-heading {
    margin-bottom: 0 !important;
}

.workstream-flow-page > *,
.workstream-flow-page .card,
.workstream-flow-page .card-body,
.workstream-flow-page .card-header,
.workstream-flow-page .table-responsive,
.workstream-flow-page .row,
.workstream-flow-page .row > [class*="col-"],
.workstream-flow-page .d-flex {
    min-width: 0;
    max-width: 100%;
}

.workstream-flow-hero,
.workstream-flow-page > .card,
.workstream-flow-page > details.card,
.workstream-flow-page > .alert,
.workstream-flow-page > .row > [class*="col-"] > .card,
.workstream-flow-review-heading {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.workstream-flow-hero {
    padding: 1rem 1.05rem;
    border-left: 4px solid var(--cmt-orange);
}

.workstream-flow-hero > * {
    min-width: 0;
}

.workstream-flow-hero > div:first-child {
    flex: 1 1 34rem;
}

.workstream-flow-hero > .d-flex {
    flex: 1 1 34rem;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.workstream-flow-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.5rem;
    font-weight: 780;
    line-height: 1.16;
}

.workstream-flow-hero p:not(.eyebrow) {
    margin-top: 0.45rem;
    max-width: 58rem;
    color: var(--cmt-grey-500) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.workstream-flow-hero .btn,
.workstream-flow-page .card-header .btn,
.workstream-flow-page .card-body .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.workstream-flow-page .card {
    overflow: hidden;
}

.workstream-flow-page > .row > [class*="col-"] > .card {
    height: 100%;
    box-shadow: none;
}

.workstream-flow-page > .row > [class*="col-"] > .card .card-body,
.workstream-flow-page .card .card .card-body {
    padding: 0.72rem 0.8rem;
    background: var(--cmt-grey-50);
}

.workstream-flow-page .card-header {
    padding: 0.78rem 0.95rem;
    border-bottom-color: var(--cmt-grey-200);
}

.workstream-flow-page .card-body {
    padding: 0.9rem 0.95rem;
}

.workstream-flow-page .card-body.py-3.d-flex {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 0.65rem !important;
}

.workstream-flow-page .card-body.py-3.d-flex .btn,
.workstream-flow-page .card-body.py-3.d-flex .small {
    flex: 0 0 auto;
    white-space: nowrap;
}

.workstream-flow-page .card-body.py-3.d-flex .ms-auto {
    margin-left: 0 !important;
}

.workstream-flow-page .card-header > div:first-child,
.workstream-flow-page .card-body > .d-flex > div:first-child {
    min-width: 0;
}

.workstream-flow-page .card-header h2,
.workstream-flow-page .card h2,
.workstream-flow-page .card h3,
.workstream-flow-page .card h4,
.workstream-flow-review-heading h2 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.workstream-flow-page .card-header h2,
.workstream-flow-page .card h2,
.workstream-flow-review-heading h2 {
    font-size: 1.08rem;
}

.workstream-flow-page .card h3,
.workstream-flow-page .card h4 {
    font-size: 0.98rem;
}

.workstream-flow-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.workstream-flow-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.workstream-flow-page .card p,
.workstream-flow-page .form-text,
.workstream-flow-page .form-check-label {
    font-size: 0.83rem;
    line-height: 1.42;
}

.workstream-flow-kpis h2,
.workstream-flow-summary h2,
.workstream-flow-summary h3,
.workstream-flow-next h3 {
    font-size: 1.25rem !important;
}

.workstream-flow-guide .card-body {
    border-left: 3px solid var(--cmt-orange);
}

.workstream-flow-review-heading {
    padding: 0.8rem 0.95rem;
}

.workstream-flow-page .alert {
    padding: 0.68rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.workstream-flow-page details.card > summary.card-header {
    cursor: pointer;
    list-style: none;
}

.workstream-flow-page details.card > summary.card-header::-webkit-details-marker {
    display: none;
}

.workstream-flow-page details.card > summary.card-header::after {
    content: "Open";
    float: right;
    color: var(--cmt-grey-500);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workstream-flow-page details.card[open] > summary.card-header::after {
    content: "Close";
}

.workstream-flow-page .border.rounded {
    border: 1px solid var(--cmt-grey-200) !important;
    border-radius: 0.5rem !important;
    background: var(--cmt-grey-50) !important;
}

.workstream-flow-page .form-label {
    margin-bottom: 0.28rem;
    color: var(--cmt-grey-700);
    font-size: 0.74rem;
    font-weight: 800;
}

.workstream-flow-page .form-select,
.workstream-flow-page .form-control {
    max-width: none;
}

.workstream-flow-page .planning-table-shell,
.workstream-flow-page .planning-mapping-matrix {
    width: 100%;
    max-width: 100%;
    max-height: min(64vh, 36rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    scrollbar-gutter: stable both-edges;
}

.workstream-flow-page .planning-table-shell--tall {
    max-height: min(72vh, 44rem);
}

.workstream-flow-page .planning-data-table,
.workstream-flow-page .planning-mapping-matrix__table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.workstream-flow-page .planning-mapping-matrix__table {
    min-width: max(100%, 64rem);
}

.workstream-flow-page .planning-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workstream-flow-page .planning-mapping-matrix__table thead th {
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workstream-flow-page .planning-data-table th,
.workstream-flow-page .planning-data-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.workstream-flow-page .planning-data-table td,
.workstream-flow-page .planning-mapping-matrix__table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
}

.workstream-flow-page .planning-data-table td .small,
.workstream-flow-page .planning-mapping-matrix__table td .small {
    color: var(--cmt-grey-500);
    line-height: 1.45;
}

.workstream-flow-page .planning-mapping-matrix__table td {
    background: #ffffff;
}

.workstream-flow-page .planning-mapping-matrix__table .form-select-sm {
    min-width: 11rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table {
    table-layout: fixed;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table th,
.workstream-flow-page--mapping .planning-mapping-matrix__table td {
    padding: 0.45rem 0.55rem;
    line-height: 1.25;
    vertical-align: top;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table thead th {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table th:first-child,
.workstream-flow-page--mapping .planning-mapping-matrix__table td:first-child {
    width: 4.75rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table th:nth-child(2),
.workstream-flow-page--mapping .planning-mapping-matrix__table td:nth-child(2) {
    width: 8.5rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table th:nth-child(3),
.workstream-flow-page--mapping .planning-mapping-matrix__table td:nth-child(3) {
    width: 11rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table th:not(:nth-child(-n + 3)),
.workstream-flow-page--mapping .planning-mapping-matrix__table td:not(:nth-child(-n + 3)) {
    width: 14rem;
}

.workstream-flow-page--mapping .planning-mapping-matrix__table .form-check {
    margin-bottom: 0.35rem !important;
}

.workstream-flow-page--mapping .planning-mapping-matrix__implicit-source {
    min-height: 1.25rem;
    align-items: flex-start;
}

.workstream-flow-page--batches .workstream-flow-main .d-inline-flex {
    max-width: none;
}

.workstream-flow-page--batches .workstream-flow-lines .planning-filter-bar {
    align-items: end;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.workstream-flow-page--batches .workstream-flow-lines .planning-filter-bar .form-label {
    margin-bottom: 0.25rem;
}

.workstream-flow-page--batches .workstream-flow-editor .card-body {
    background: #ffffff;
}

@media (max-width: 991.98px) {
    .workstream-flow-hero {
        display: grid !important;
    }

    .workstream-flow-hero > .d-flex {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .workstream-flow-hero h1 {
        font-size: 1.28rem;
    }

    .workstream-flow-page .card-body,
    .workstream-flow-hero,
    .workstream-flow-review-heading {
        padding: 0.75rem;
    }
}

/* ============================================================
   PHASE 9 FINANCIAL REVIEW REFRESH
   Scoped visual layer for the dedicated Financial Review page.
   Keeps scope filters, recalculation, redaction, diagnostics, and
   saved-batch/current-batch financial behavior intact.
   ============================================================ */

.financial-review-page {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
    max-width: 100%;
}

.financial-review-page > .mb-4,
.financial-review-page > .card,
.financial-review-page > .alert {
    margin-bottom: 0 !important;
}

.financial-review-page > *,
.financial-review-page .card,
.financial-review-page .card-body,
.financial-review-page .table-responsive,
.financial-review-page .row,
.financial-review-page .row > [class*="col-"] {
    min-width: 0;
    max-width: 100%;
}

.financial-review-hero,
.financial-review-page > .card,
.financial-review-page > .alert {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(17, 17, 17, 0.05);
}

.financial-review-hero {
    padding: 1rem 1.05rem;
    border-left: 4px solid var(--cmt-orange);
}

.financial-review-hero > * {
    min-width: 0;
}

.financial-review-hero > div:first-child {
    flex: 1 1 28rem;
}

.financial-review-hero > .d-flex {
    flex: 1 1 34rem;
    max-width: 100%;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.financial-review-hero h1 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 1.5rem;
    font-weight: 780;
    line-height: 1.16;
}

.financial-review-hero p:not(.eyebrow) {
    color: var(--cmt-grey-500) !important;
    font-size: 0.9rem;
    line-height: 1.45;
}

.financial-review-hero .btn,
.financial-review-page .card-header .btn,
.financial-review-page .card-body .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.financial-review-page .card-header {
    padding: 0.78rem 0.95rem;
    border-bottom-color: var(--cmt-grey-200);
    min-width: 0;
}

.financial-review-page .card-body {
    padding: 0.9rem 0.95rem;
}

.financial-review-page .card-header > div:first-child,
.financial-review-page .card-body > .d-flex > div:first-child {
    min-width: 0;
}

.financial-review-page .card-header > .d-flex,
.financial-review-page .card-body > .d-flex {
    min-width: 0;
    max-width: 100%;
}

.financial-review-page .card-body.py-3.d-flex {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.65rem !important;
}

.financial-review-page .card-body.py-3.d-flex .btn {
    white-space: nowrap;
}

.financial-review-page .card-header h2,
.financial-review-page .card h2,
.financial-review-page .card h3 {
    color: var(--cmt-black);
    font-weight: 800;
    line-height: 1.2;
}

.financial-review-page .card-header h2,
.financial-review-page .card h2 {
    font-size: 1.08rem;
}

.financial-review-page .card h3 {
    font-size: 0.98rem;
}

.financial-review-page .small.text-uppercase.text-muted {
    color: var(--cmt-grey-700) !important;
    font-size: 0.7rem;
    font-weight: 800;
}

.financial-review-page .text-muted {
    color: var(--cmt-grey-500) !important;
}

.financial-review-page .card p {
    font-size: 0.83rem;
    line-height: 1.42;
}

.financial-review-guide-item {
    height: 100%;
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.financial-review-filter-bar {
    margin: 0;
    padding: 0.75rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
}

.financial-review-filter-bar .form-label {
    margin-bottom: 0.28rem;
    color: var(--cmt-grey-700);
    font-size: 0.74rem;
    font-weight: 800;
}

.financial-review-filter-bar .form-select,
.financial-review-filter-bar .form-control {
    max-width: none;
}

.financial-review-filter--saved-batch.is-hidden,
.financial-review-filter--timeline.is-hidden {
    display: none;
}

.financial-review-current-view,
.financial-review-page .alert {
    padding: 0.68rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.financial-review-metric-card {
    height: 100%;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: var(--cmt-grey-50);
    box-shadow: none;
    overflow: hidden;
}

.financial-review-metric-card .card-body {
    display: grid;
    align-content: start;
    gap: 0.2rem;
    padding: 0.78rem 0.8rem;
}

.financial-review-metric-card h3 {
    margin: 0;
    color: #000000;
    font-size: 1.18rem !important;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.financial-review-metric-card--money {
    border-top: 3px solid var(--cmt-orange);
}

.financial-review-page .planning-table-shell {
    width: 100%;
    max-width: 100%;
    max-height: min(70vh, 40rem);
    overflow: auto;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #ffffff;
}

.financial-review-page .planning-data-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.financial-review-page .planning-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--cmt-grey-200);
    background: #ffffff;
    color: var(--cmt-grey-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.financial-review-page .planning-data-table th,
.financial-review-page .planning-data-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.financial-review-page .planning-data-table td {
    color: var(--cmt-black);
    font-size: 0.8rem;
}

.financial-review-page .planning-data-table td .small {
    color: var(--cmt-grey-500);
    line-height: 1.45;
}

.financial-review-recon-panel {
    border-color: var(--cmt-grey-200) !important;
    border-radius: 0.5rem !important;
    background: var(--cmt-grey-50);
}

.financial-review-recon-panel .list-group-item {
    background: transparent;
}

.financial-review-recon-panel dt,
.financial-review-recon-panel dd {
    margin-bottom: 0.35rem;
}

.financial-review-chart-section {
    display: grid;
    gap: 0.55rem;
}

.financial-review-chart-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.financial-review-chart-section__header h2 {
    margin: 0;
    color: var(--cmt-black);
    font-size: 0.98rem;
    font-weight: 760;
    line-height: 1.25;
}

.financial-review-chart-section__header > span {
    max-width: 22rem;
    color: var(--cmt-grey-600);
    font-size: 0.76rem;
    font-weight: 720;
    line-height: 1.35;
    text-align: right;
}

.financial-review-chart-grid {
    display: grid;
    grid-template-columns: minmax(24rem, 1.28fr) minmax(17rem, 0.86fr) minmax(17rem, 0.86fr);
    gap: 0.6rem;
    align-items: stretch;
}

.financial-review-chart-grid .insights-chart-card {
    min-height: 12rem;
    padding: 0.65rem 0.75rem;
}

.financial-review-chart-grid .insights-chart-card:nth-child(1) {
    grid-column: 1 / -1;
    min-height: 18rem;
}

.financial-review-chart-grid .insights-chart-card:nth-child(3) {
    grid-column: span 2;
}

.financial-review-chart-grid .insights-chart-card__header {
    margin-bottom: 0.35rem;
}

.financial-review-chart-grid .insights-chart-card__header h3 {
    font-size: 0.9rem;
}

.financial-review-chart-grid .insights-line-chart svg {
    height: 8.5rem;
}

.financial-review-chart-grid .insights-chart-card:nth-child(1) .insights-line-chart svg {
    height: 13rem;
}

@media (max-width: 991.98px) {
    .financial-review-hero {
        display: grid !important;
    }

    .financial-review-hero > .d-flex {
        justify-content: flex-start;
    }

    .financial-review-chart-grid {
        grid-template-columns: 1fr;
    }

    .financial-review-chart-grid .insights-chart-card:nth-child(1),
    .financial-review-chart-grid .insights-chart-card:nth-child(3) {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .financial-review-hero h1 {
        font-size: 1.28rem;
    }

    .financial-review-page .card-body,
    .financial-review-hero {
        padding: 0.75rem;
    }

    .financial-review-chart-section__header {
        display: grid;
    }

    .financial-review-chart-section__header > span {
        max-width: none;
        text-align: left;
    }
}

@media (min-width: 992px) {
    .workflow-stage-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .workflow-stage-summary__alert {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1199.98px) {
    .portfolio-saved-views__controls {
        grid-template-columns: minmax(14rem, 1fr) repeat(3, max-content);
    }

    .portfolio-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insights-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-filter-bar__actions {
        justify-content: flex-start;
    }

    .insights-filter-bar__actions {
        justify-content: flex-start;
    }

    .portfolio-metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portfolio-metric-card {
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .insights-chart-grid--spotlight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insights-comparison-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.9fr);
    }

    .portfolio-metric-card:nth-child(3n) {
        border-right: 0;
    }

    .portfolio-metric-card:nth-last-child(-n + 3) {
        border-bottom: 0;
    }

    .executive-metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .executive-metric-card {
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .executive-metric-card:nth-child(3n) {
        border-right: 0;
    }

    .executive-metric-card:nth-last-child(-n + 3) {
        border-bottom: 0;
    }

    .commercial-metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .commercial-metric-card {
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .commercial-metric-card:nth-child(3n) {
        border-right: 0;
    }

    .commercial-metric-card:nth-last-child(-n + 3) {
        border-bottom: 0;
    }
}

@media (max-width: 991.98px) {
    .portfolio-command,
    .portfolio-grid,
    .portfolio-grid--primary,
    .portfolio-spotlight,
    .insights-workbench,
    .insights-chart-grid,
    .insights-chart-grid--spotlight,
    .insights-comparison-layout {
        grid-template-columns: 1fr;
    }

    .portfolio-command,
    .executive-command,
    .commercial-command,
    .insights-command {
        display: grid;
    }

    .portfolio-command__actions,
    .executive-command__actions,
    .commercial-command__actions,
    .insights-command__actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .executive-command,
    .executive-grid,
    .executive-grid--main,
    .executive-split,
    .executive-chart-grid {
        grid-template-columns: 1fr;
    }

    .commercial-command,
    .commercial-grid,
    .commercial-grid--main,
    .commercial-grid--secondary,
    .commercial-chart-grid {
        grid-template-columns: 1fr;
    }

    .delivery-chart-grid {
        grid-template-columns: 1fr;
    }

    .commercial-owner-line,
    .commercial-scenario-row,
    .commercial-coverage-row,
    .commercial-discount-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .commercial-coverage-row__badges {
        justify-content: flex-start;
    }

    .commercial-discount-row small {
        text-align: left;
    }

    .delivery-dashboard .dashboard-hero__content {
        display: grid;
    }

    .delivery-dashboard .dashboard-hero__actions {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        padding: 0.75rem 0.85rem;
    }

    .dashboard-kpi-card__value,
    .dashboard-note-card__value {
        font-size: 1.05rem;
    }

    .portfolio-filter-bar,
    .portfolio-metric-strip,
    .portfolio-spotlight__metrics,
    .insights-filter-bar {
        grid-template-columns: 1fr;
    }

    .portfolio-saved-views__title,
    .portfolio-saved-views__controls,
    .portfolio-saved-view-dialog__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portfolio-saved-views__status {
        justify-self: start;
    }

    .portfolio-saved-view-dialog__body {
        padding: 0.85rem;
    }

    .portfolio-saved-view-dialog__actions {
        padding: 0.75rem 0.85rem;
    }

    .portfolio-metric-card,
    .portfolio-metric-card:nth-child(3n),
    .portfolio-metric-card:nth-last-child(-n + 3) {
        border-right: 0;
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .portfolio-metric-card:last-child {
        border-bottom: 0;
    }

    .portfolio-attention-item {
        grid-template-columns: 1fr;
    }

    .insights-donut-layout,
    .insights-rank-row,
    .insights-comparison-status {
        grid-template-columns: 1fr;
    }

    .insights-delta-legend {
        justify-content: flex-start;
    }

    .insights-delta-row {
        grid-template-columns: 1fr;
        gap: 0.24rem;
        padding: 0.42rem 0;
    }

    .insights-delta-row__metric {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .insights-delta-row__label {
        white-space: normal;
    }

    .insights-delta-badge {
        justify-self: flex-start;
    }

    .insights-delta-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .insights-donut {
        width: min(9rem, 100%);
        justify-self: center;
    }

    .insights-rank-row strong,
    .insights-delta-values strong {
        text-align: left;
    }

    .portfolio-attention-item__actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .executive-metric-strip,
    .executive-readiness-grid {
        grid-template-columns: 1fr;
    }

    .executive-metric-card,
    .executive-metric-card:nth-child(3n),
    .executive-metric-card:nth-last-child(-n + 3) {
        border-right: 0;
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .executive-metric-card:last-child {
        border-bottom: 0;
    }

    .executive-guidance {
        display: grid;
    }

    .executive-guidance__badges {
        justify-content: flex-start;
    }

    .executive-risk-item {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 0.25rem;
    }

    .commercial-metric-strip,
    .commercial-readiness-grid,
    .commercial-fx-summary,
    .commercial-discount-summary,
    .commercial-rate-row__metrics {
        grid-template-columns: 1fr;
    }

    .commercial-metric-card,
    .commercial-metric-card:nth-child(3n),
    .commercial-metric-card:nth-last-child(-n + 3) {
        border-right: 0;
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .commercial-metric-card:last-child {
        border-bottom: 0;
    }

    .commercial-guidance {
        display: grid;
    }

    .commercial-guidance__badges {
        justify-content: flex-start;
    }

    .commercial-fx-list article,
    .commercial-watchlist-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .commercial-watchlist-row > div:nth-child(2) {
        text-align: left;
    }

    .executive-command__title h1 {
        font-size: 1.25rem;
    }

    .commercial-command__title h1 {
        font-size: 1.25rem;
    }

    .delivery-dashboard .dashboard-hero h1 {
        font-size: 1.25rem;
    }

    .delivery-dashboard .dashboard-approval-owner {
        grid-template-columns: 1fr;
    }

    .delivery-dashboard .dashboard-approval-owner__name {
        justify-self: start;
        text-align: left;
    }
}

/* ============================================================
   ENTERPRISE DENSITY LAYER
   Global overrides that tighten Bootstrap 5 defaults for
   enterprise / back-office use. These sit between Bootstrap
   and the feature-specific classes below so that individual
   page templates automatically inherit denser defaults without
   needing per-page markup changes.
   ============================================================ */

/* -- Layout constraint ------------------------------------ */
/* Container width left at Bootstrap default (fluid / responsive)
   to maximise screen real-estate on desktop monitors. */

/* Tighter row gutters - Bootstrap default is 1.5rem (24px);
   1rem (16px) is more appropriate for data-heavy screens. */
body.cmt-density .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.75rem;
}

/* -- Cards ------------------------------------------------ */
/* Smaller radius and padding keeps cards feeling like UI
   panels rather than marketing feature blocks. */
body.cmt-density .card {
    border: 1px solid var(--cmt-warm-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(22, 22, 22, 0.06);
}

body.cmt-density .card-body {
    padding: 1rem 1.25rem;
}

body.cmt-density .card-header {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* -- Typography tightening -------------------------------- */
body.cmt-density h1,
body.cmt-density .h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

body.cmt-density h2,
body.cmt-density .h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

body.cmt-density h3,
body.cmt-density .h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

body.cmt-density h4,
body.cmt-density .h4 {
    font-size: 1rem;
    font-weight: 700;
}

body.cmt-density h5,
body.cmt-density .h5 {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Reduce paragraph bottom margin for denser vertical flow */
body.cmt-density p,
body.cmt-density .card-text {
    margin-bottom: 0.5rem;
}

/* -- Tables ----------------------------------------------- */
/* Tighten all Bootstrap tables globally. Individual feature
   tables (planning-data-table, master-data-current-table)
   can still override these if they need something different. */
body.cmt-density .table {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

body.cmt-density .table > :not(caption) > * > * {
    padding: 0.4rem 0.625rem;
}

body.cmt-density .table thead th {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--cmt-grey);
    border-bottom-width: 2px;
    white-space: nowrap;
}

/* Subtle alternating-row tint for readability on dense tables */
body.cmt-density .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(236, 233, 228, 0.25);
}

/* -- Form controls ---------------------------------------- */
/* Bootstrap form controls default to 100% width and generous
   padding. These overrides constrain them for data-entry use. */
body.cmt-density .form-control,
body.cmt-density .form-select {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
}

/* Keep standalone form controls compact without constraining
   table editors or non-form widgets that rely on full width. */
body.cmt-density form .form-control:not([type="date"]):not(textarea),
body.cmt-density form .form-select {
    max-width: 28rem;
}

body.cmt-density form textarea.form-control {
    max-width: 36rem;
}

body.cmt-density .table .form-control,
body.cmt-density .table .form-select {
    max-width: 100%;
}

/* Tighter form labels */
body.cmt-density .form-label,
body.cmt-density label {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #3b3b3b;
}

/* Compact spacing helper for future opt-in use without
   redefining Bootstrap's stock spacing utilities. */
body.cmt-density .cmt-gap-3 {
    margin-bottom: 0.75rem !important;
}

/* -- Buttons ---------------------------------------------- */
/* Slightly smaller default buttons for enterprise density */
body.cmt-density .btn {
    font-size: 0.8125rem;
    padding: 0.35rem 0.85rem;
    border-radius: 0.375rem;
}

body.cmt-density .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

/* -- Modals ----------------------------------------------- */
body.cmt-density .modal-header {
    padding: 0.75rem 1rem;
}

body.cmt-density .modal-body {
    padding: 1rem;
}

body.cmt-density .modal-footer {
    padding: 0.625rem 1rem;
}

body.cmt-density .import-apply-dialog {
    width: min(30rem, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    box-shadow: 0 1.25rem 3rem rgba(17, 24, 39, 0.24);
}

body.cmt-density .import-apply-dialog::backdrop {
    background: rgba(17, 24, 39, 0.45);
}

body.cmt-density .import-apply-dialog__panel {
    overflow: hidden;
    border: 1px solid #dbe1e8;
    border-top: 4px solid #ff6600;
    border-radius: 0.5rem;
    background: #fff;
}

body.cmt-density .import-apply-dialog__body {
    padding: 1rem 1.125rem;
}

body.cmt-density .import-apply-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.125rem;
    border-top: 1px solid #edf0f3;
    background: #f8fafc;
}

/* -- Badges & pills --------------------------------------- */
body.cmt-density .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.55em;
    font-weight: 600;
}

/* -- Nav tabs / pills ------------------------------------- */
body.cmt-density .nav-tabs .nav-link,
body.cmt-density .nav-pills .nav-link {
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
}

.ai-usecase-tabs {
    gap: 0.5rem;
    align-items: flex-end;
    border-bottom: 1px solid var(--cmt-grey-200);
    margin-bottom: 1rem;
}

.ai-usecase-tabs .nav-link {
    border: 1px solid var(--cmt-grey-200);
    border-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    background: #fff;
    color: var(--cmt-body-strong);
    font-weight: 700;
}

.ai-usecase-tabs .nav-link:hover,
.ai-usecase-tabs .nav-link:focus {
    border-color: var(--cmt-orange);
    color: var(--cmt-orange);
}

.ai-usecase-tabs .nav-link.active {
    background: var(--cmt-orange);
    border-color: var(--cmt-orange);
    color: #fff;
}

.ai-usecase-tabs .nav-link.active:hover,
.ai-usecase-tabs .nav-link.active:focus {
    color: #fff;
}

.ai-usecase-subtabs {
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0.25rem;
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    background: #fff;
}

.ai-usecase-subtabs .nav-link {
    border-radius: 0.375rem;
    color: var(--cmt-muted);
    font-weight: 700;
}

.ai-usecase-subtabs .nav-link:hover,
.ai-usecase-subtabs .nav-link:focus {
    color: var(--cmt-orange);
}

.ai-usecase-subtabs .nav-link.active {
    background: var(--cmt-orange);
    color: #fff;
}

.ai-usecase-subtabs .nav-link.active:hover,
.ai-usecase-subtabs .nav-link.active:focus {
    color: #fff;
}

.ai-usecase-tab-panel > .card:last-child {
    margin-bottom: 0 !important;
}

.ai-explain-subtab-panel > .card:last-child {
    margin-bottom: 0 !important;
}

.ai-thread-list .list-group-item.active {
    background: #fff7f0;
    border-color: #ffd9c2;
    color: var(--cmt-charcoal);
    box-shadow: inset 3px 0 0 var(--cmt-orange);
}

.ai-thread-list .list-group-item {
    padding: 0.75rem;
}

.ai-thread-list-scroll {
    max-height: min(34rem, 58vh);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ai-thread-list-footer {
    background: #fff;
}

.ai-thread-list-footer .btn {
    font-weight: 700;
}

.ai-thread-list-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ai-thread-status {
    font-size: 0.6875rem;
    line-height: 1;
    white-space: nowrap;
}

.ai-thread-summary {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
}

.ai-thread-workspace {
    min-height: 100%;
}

.ai-thread-transcript {
    display: grid;
    gap: 0.75rem;
}

.ai-thread-turn {
    display: grid;
    gap: 0.5rem;
}

.ai-thread-bubble {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.ai-thread-bubble-user {
    background: #f8fafc;
    justify-self: end;
    max-width: 78%;
}

.ai-thread-bubble-assistant {
    background: #fff;
    border-left: 3px solid var(--cmt-orange);
    justify-self: start;
    max-width: 88%;
}

.ai-thread-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ai-thread-facts span {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 999px;
    padding: 0.25rem 0.625rem;
    background: #f8fafc;
    font-size: 0.8125rem;
}

.ai-thread-facts strong {
    margin-right: 0.35rem;
}

.ai-thread-notes {
    margin-top: 0.75rem;
    color: var(--cmt-muted);
}

.ai-thread-question {
    border: 1px solid #f6d98b;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff8db;
}

.ai-thread-technical-link {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
}

.ai-thread-composer {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
}

.ai-chart-preview-grid {
    grid-template-columns: minmax(0, 1fr);
}

.ai-chart-preview-grid .insights-rank-row {
    grid-template-columns: minmax(13rem, 1.25fr) minmax(9rem, 1.7fr) max-content;
}

.ai-chart-preview-grid .insights-rank-row span,
.ai-chart-preview-grid .insights-delta-row__label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.ai-chart-preview-grid .insights-delta-row {
    grid-template-columns: minmax(12rem, 1.05fr) minmax(5.5rem, 0.45fr) minmax(8rem, 1.45fr) minmax(8rem, 0.75fr);
}

.ai-chart-alternative-list {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.1rem;
}

.ai-chart-alternative-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
}

.ai-thread-start {
    border: 1px solid var(--cmt-grey-200);
    border-radius: 0.5rem;
    padding: 1rem;
    background: #fff;
}

.ai-simulation-options summary {
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .ai-thread-bubble-user,
    .ai-thread-bubble-assistant {
        max-width: 100%;
    }
}

/* -- Breadcrumbs ------------------------------------------ */
body.cmt-density .breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

/* -- Alerts ----------------------------------------------- */
body.cmt-density .alert {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
}

/* -- Section spacing -------------------------------------- */
/* A reusable class for consistent vertical rhythm between
   page sections. Use instead of ad-hoc mb-4 / mb-5 stacks. */
body.cmt-density .cmt-section {
    margin-bottom: 1.25rem;
}

body.cmt-density .cmt-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cmt-charcoal);
    margin-bottom: 0.5rem;
}

/* -- Filter / action bars --------------------------------- */
/* Standardised dense bar for table filters, search, and
   page-level action buttons. Pair with d-flex flex-wrap. */
body.cmt-density .cmt-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

body.cmt-density .cmt-action-bar .form-control,
body.cmt-density .cmt-action-bar .form-select {
    min-width: 9rem;
    max-width: 14rem;
}

/* ============================================================
   END ENTERPRISE DENSITY LAYER
   ============================================================ */

.btn-primary {
    background-color: var(--cmt-orange);
    border-color: var(--cmt-orange);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--cmt-orange-deep);
    border-color: var(--cmt-orange-deep);
}

.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(243, 111, 33, 0.16), transparent 28%),
        linear-gradient(180deg, #fffaf5 0%, #fbfbfb 100%);
}

.auth-brand__logo {
    width: min(15rem, 68vw);
    aspect-ratio: 2014 / 545;
    overflow: hidden;
    margin: 0 auto 0.45rem;
}

.auth-brand__logo img {
    display: block;
    width: 119.17%;
    height: auto;
    max-width: none;
    transform: translate(-7.42%, -30%);
}

.auth-brand .text-muted {
    color: #4b5563 !important;
    font-size: 1.05rem;
}

.auth-card {
    border: 1px solid rgba(17, 24, 39, 0.06) !important;
}

.auth-card .card-body {
    padding: 2.5rem !important;
}

.auth-card .form-control {
    max-width: none !important;
}

.auth-card .btn-primary {
    font-weight: 700;
}

/* Shared site footer */
body.has-site-footer {
    padding-bottom: 3.2rem;
}

.site-footer-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    display: grid;
    grid-template-columns: minmax(8rem, 0.72fr) minmax(18rem, 1fr) minmax(24rem, 1.25fr);
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    min-height: 3.2rem;
    padding: 0.45rem 1.75rem;
    border-top: 1px solid rgba(17, 24, 39, 0.1);
    background: #fff;
    box-shadow: 0 -0.25rem 0.7rem rgba(17, 24, 39, 0.04);
}

.site-footer-bar__logo {
    position: relative;
    display: block;
    width: 96px;
    height: 26px;
    overflow: hidden;
}

.site-footer-bar__logo img {
    position: absolute;
    top: -16px;
    left: 0;
    display: block;
    width: 96px;
    height: auto;
    max-width: none;
}

.site-footer-bar__tagline,
.site-footer-bar__copyright {
    margin: 0;
    color: #40506a;
    line-height: 1.2;
}

.site-footer-bar__tagline {
    justify-self: center;
    font-size: 0.70rem;
    text-align: center;
}

.site-footer-bar__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.8rem;
    min-width: 0;
}

.site-footer-bar__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-footer-bar__links a {
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.site-footer-bar__links a:hover {
    color: #ff5a1f;
}

.site-footer-bar__copyright {
    font-size: 0.65rem;
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    body.has-site-footer {
        padding-bottom: 5.35rem;
    }

    .site-footer-bar {
        grid-template-columns: auto minmax(16rem, 1fr);
        gap: 0.75rem 1rem;
        min-height: 5.35rem;
    }

    .site-footer-bar__tagline {
        justify-self: start;
        text-align: left;
    }

    .site-footer-bar__right {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    body.has-site-footer {
        padding-bottom: 8.25rem;
    }

    .site-footer-bar {
        grid-template-columns: 1fr;
        min-height: 8.25rem;
        padding: 0.75rem 1rem;
    }

    .site-footer-bar__right {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .site-footer-bar__copyright {
        white-space: normal;
    }
}

/* Support / Help / FAQ pages */
.support-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-hero,
.support-card,
.support-action,
.support-faq-nav,
.support-faq-item {
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(17, 24, 39, 0.05);
}

.support-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.support-hero h1 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    line-height: 1.2;
}

.support-hero p {
    max-width: 58rem;
    margin: 0;
    color: #4b5563;
}

.support-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 15rem;
}

.support-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
}

.support-action {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    color: #111827;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.support-action:hover {
    border-color: rgba(255, 90, 31, 0.45);
    box-shadow: 0 0.35rem 0.95rem rgba(17, 24, 39, 0.08);
    color: #111827;
    transform: translateY(-1px);
}

.support-action span,
.support-term strong {
    color: #ff5a1f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.support-action strong {
    font-size: 0.96rem;
    line-height: 1.25;
}

.support-action small {
    color: #6b7280;
    line-height: 1.35;
}

.support-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-section--split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.85fr);
    gap: 0.75rem;
}

.support-section__heading h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.support-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.75rem;
}

.support-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 0.5rem;
    background: #fff;
}

.support-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #fff1e8;
    color: #c2410c;
    font-weight: 800;
}

.support-step h3,
.support-card h3 {
    margin: 0 0 0.3rem;
    font-size: 0.98rem;
    line-height: 1.25;
}

.support-step p,
.support-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
}

.support-card {
    padding: 0.95rem;
}

.support-card--wide {
    min-width: 0;
}

.support-card-grid {
    display: grid;
    gap: 0.75rem;
}

.support-card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-card-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.support-table {
    font-size: 0.9rem;
}

.support-table thead th {
    border-bottom: 1px solid rgba(17, 24, 39, 0.14);
    color: #374151;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.support-table td,
.support-table th {
    padding: 0.55rem 0.6rem;
}

.support-checklist {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.support-checklist li {
    position: relative;
    padding-left: 1.1rem;
    color: #4b5563;
    line-height: 1.42;
}

.support-checklist li::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 0;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #ff5a1f;
}

.support-checklist--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.support-note {
    padding: 0.75rem 0.85rem;
    border-left: 0.2rem solid #ff5a1f;
    border-radius: 0.4rem;
    background: #fff7ed;
    color: #4b5563;
    line-height: 1.45;
}

.support-term-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.support-term {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem;
    border-radius: 0.45rem;
    background: #f9fafb;
}

.support-term span {
    color: #4b5563;
    line-height: 1.38;
}

.support-faq-layout {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.support-faq-nav {
    position: sticky;
    top: 4.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.8rem;
}

.support-faq-nav a {
    padding: 0.42rem 0.5rem;
    border-radius: 0.35rem;
    color: #374151;
    text-decoration: none;
}

.support-faq-nav a:hover {
    background: #fff1e8;
    color: #c2410c;
}

.support-faq-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.support-faq-list {
    display: grid;
    gap: 0.45rem;
}

.support-faq-item {
    overflow: hidden;
}

.support-faq-item summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.7rem;
    padding: 0.65rem 2.25rem 0.65rem 0.8rem;
    cursor: pointer;
    color: #111827;
    font-weight: 700;
    list-style: none;
}

.support-faq-item summary::-webkit-details-marker {
    display: none;
}

.support-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0.85rem;
    color: #ff5a1f;
    font-size: 1.1rem;
    line-height: 1;
}

.support-faq-item[open] summary {
    border-bottom: 1px solid rgba(17, 24, 39, 0.1);
    background: #fffaf7;
}

.support-faq-item[open] summary::after {
    content: "-";
}

.support-faq-item p {
    margin: 0;
    padding: 0.7rem 0.8rem 0.85rem;
    color: #4b5563;
    line-height: 1.48;
}

@media (max-width: 991.98px) {
    .support-section--split,
    .support-card-grid--three,
    .support-card-grid--four,
    .support-faq-layout {
        grid-template-columns: 1fr;
    }

    .support-faq-nav {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .support-hero {
        flex-direction: column;
        padding: 0.85rem;
    }

    .support-hero__actions {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .support-hero__actions .btn {
        flex: 1 1 auto;
    }

    .support-checklist--dense,
    .support-term-grid,
    .support-faq-nav {
        grid-template-columns: 1fr;
    }
}

.planning-slot-builder__project-firm {
    border-radius: 0.75rem;
}

.planning-slot-builder__rows {
    gap: 0.875rem !important;
}

.planning-slot-row {
    border-radius: 0.9rem;
}

.planning-slot-row__body {
    padding: 1rem;
}

.planning-slot-row__source-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd6cc;
    border-radius: 0.75rem;
    background: #f5f2ed;
    color: #3b3b3b;
}

.planning-slot-row__source-label {
    font-weight: 700;
}

.planning-slot-row__notes {
    min-height: 2.5rem;
    resize: vertical;
}

.planning-slot-row .form-select-sm,
.planning-slot-row .form-control-sm {
    border-radius: 0.7rem;
}

.planning-slot-row__flag-group .form-check {
    margin-bottom: 0;
}

.planning-mapping-matrix {
    max-height: min(68vh, 48rem);
    overflow: auto;
    scrollbar-gutter: stable both-edges;
}

.planning-mapping-matrix__table {
    min-width: max(100%, 78rem);
}

.planning-mapping-matrix__bulk-actions {
    gap: 0.5rem;
}

.planning-mapping-matrix__implicit-source {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
}

.master-data-current-table {
    width: max-content;
    min-width: 100%;
}

.master-data-current-table-shell {
    max-width: 100%;
    overflow-x: auto;
}

.master-data-current-table-shell--bounded {
    max-height: min(68vh, 36rem);
    overflow: auto;
    scrollbar-gutter: stable both-edges;
}

.master-data-current-table-shell--bounded .master-data-current-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #fff;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.project-template-setup-page .project-template-setup-grid {
    align-items: flex-start;
}

.project-template-setup-page .project-template-setup-card {
    height: auto;
}

.project-template-setup-page .card-body {
    padding: 1rem;
}

.project-template-setup-page .eyebrow {
    margin-bottom: 0.35rem !important;
}

.project-template-setup-page h2 {
    margin-bottom: 0.75rem !important;
}

.project-template-setup-page form.row,
.project-template-setup-page form.mb-3 {
    margin-bottom: 0.8rem !important;
}

.project-template-setup-page .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.86rem;
}

.project-template-setup-page .form-control,
.project-template-setup-page .form-select {
    min-height: 2.25rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.project-template-setup-page .btn {
    --bs-btn-padding-y: 0.4rem;
}

.project-template-setup-page .table {
    --bs-table-cell-padding-x: 0.75rem;
    --bs-table-cell-padding-y: 0.45rem;
}

.project-template-setup-page #phase-pack .master-data-current-table-shell--bounded:first-of-type {
    max-height: min(56vh, 30rem);
}

.project-template-setup-page .project-template-phase-editor {
    table-layout: fixed;
    min-width: 62rem;
}

.project-template-setup-page .project-template-phase-editor th:nth-child(1),
.project-template-setup-page .project-template-phase-editor td:nth-child(1) {
    width: 3.5rem;
}

.project-template-setup-page .project-template-phase-editor th:nth-child(2),
.project-template-setup-page .project-template-phase-editor td:nth-child(2) {
    width: 11rem;
}

.project-template-setup-page .project-template-phase-editor th:nth-child(3),
.project-template-setup-page .project-template-phase-editor td:nth-child(3),
.project-template-setup-page .project-template-phase-editor th:nth-child(4),
.project-template-setup-page .project-template-phase-editor td:nth-child(4) {
    width: 6.5rem;
}

.project-template-setup-page .project-template-phase-editor th:nth-child(6),
.project-template-setup-page .project-template-phase-editor td:nth-child(6) {
    width: 9rem;
}

.project-template-setup-page .project-template-phase-editor .form-control-sm,
.project-template-setup-page .project-template-phase-editor .form-select {
    min-height: 1.85rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.project-template-setup-page .project-template-phase-flags {
    gap: 0.25rem 0.65rem !important;
}

.project-template-setup-page .project-template-phase-flags .form-check {
    line-height: 1.2;
    min-height: 1.2rem;
    padding-left: 1.15rem;
    white-space: nowrap;
}

.project-template-setup-page .project-template-phase-flags .form-check-input {
    margin-left: -1.15rem;
    margin-top: 0.05rem;
}

.project-template-setup-page .project-template-summary-table {
    table-layout: fixed;
}

.project-template-setup-page .project-template-form-actions {
    align-self: end;
}

.project-template-setup-page .project-template-form-actions .btn {
    min-width: 7rem;
}

.project-template-setup-page .project-template-inline-form {
    row-gap: 0.55rem !important;
}

@media (min-width: 992px) {
    .project-template-setup-page .project-template-inline-form {
        display: grid;
        align-items: end;
        column-gap: 0.75rem;
        row-gap: 0.55rem;
        margin-right: 0;
        margin-left: 0;
    }

    .project-template-setup-page .project-template-inline-form > [class*="col-"] {
        width: auto;
        max-width: none;
        padding-right: 0;
        padding-left: 0;
    }

    .project-template-setup-page .project-template-inline-form--wave {
        grid-template-columns: minmax(14rem, 1.5fr) 5.5rem 8.5rem 8.5rem auto;
    }

    .project-template-setup-page .project-template-inline-form--wave-phase {
        grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) 8.5rem 8.5rem auto;
    }

    .project-template-setup-page .project-template-inline-form--scope {
        grid-template-columns: minmax(16rem, 1.4fr) 11rem 11rem minmax(14rem, 1fr) auto;
    }

    .project-template-setup-page .project-template-inline-form--workstream {
        grid-template-columns: minmax(18rem, 28rem) 8rem minmax(0, 1fr) auto;
    }

    .project-template-setup-page .project-template-inline-form--commercial {
        grid-template-columns: minmax(14rem, 1fr) minmax(14rem, 1fr) 7rem 7rem auto;
    }

    .project-template-setup-page .project-template-form-notes {
        grid-column: auto;
    }

    .project-template-setup-page .project-template-sub-workstream-panel {
        grid-column: 1 / -1;
    }

    .project-template-setup-page .project-template-form-actions {
        grid-column: auto;
        justify-content: flex-end !important;
    }

    .project-template-setup-page .project-template-inline-form--workstream .project-template-form-actions {
        grid-column: 1 / -1;
    }

    .project-template-setup-page .project-template-inline-form .btn.w-100 {
        width: auto !important;
    }
}

.template-sub-workstream-grid {
    max-height: min(46vh, 28rem);
    overflow: auto;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
}

.template-sub-workstream-option {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.4rem;
}

.template-sub-workstream-option.form-check {
    padding-left: 0;
}

.template-sub-workstream-option .form-check-input {
    float: none;
    margin-top: 0.2rem;
    margin-left: 0;
}

.template-sub-workstream-option:hover {
    background-color: rgba(255, 102, 0, 0.06);
}

.report-pack-current-items-card {
    align-self: flex-start;
}

.report-pack-items-list {
    display: grid;
    gap: 0.6rem;
    max-height: min(54vh, 34rem);
    overflow: auto;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
}

.report-pack-items-empty {
    border: 1px dashed var(--cmt-border);
    border-radius: var(--cmt-radius);
    color: var(--cmt-muted);
    padding: 1rem;
    background: var(--cmt-surface-soft);
}

.report-pack-item-row {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid var(--cmt-border);
    border-radius: var(--cmt-radius);
    background: #fff;
}

.report-pack-item-row__order {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--cmt-surface-soft);
    color: var(--cmt-heading);
    font-weight: 800;
}

.report-pack-item-row__body {
    min-width: 0;
}

.report-pack-item-row__title,
.report-pack-item-row__target,
.report-pack-item-row__meta,
.report-pack-item-row__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.report-pack-item-row__target {
    color: var(--cmt-muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.report-pack-item-row__target span::before {
    content: "· ";
}

.report-pack-item-row__actions {
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .report-pack-item-row {
        grid-template-columns: 2.25rem minmax(0, 1fr);
    }

    .report-pack-item-row__meta,
    .report-pack-item-row__actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

.import-preview-rows-shell {
    max-height: min(52vh, 28rem);
}

.master-data-current-table--dense-nowrap th,
.master-data-current-table--dense-nowrap td {
    white-space: nowrap;
}

.master-data-current-table__actions-heading,
.master-data-current-table__actions-cell {
    min-width: 15rem;
}

.master-data-editor-card__body {
    padding: 1rem;
}

.master-data-editor-card .form-label {
    font-size: 0.86rem;
    font-weight: 700;
}

.master-data-editor-card .form-text {
    margin-top: 0.2rem;
    font-size: 0.78rem;
}

.master-data-editor-form .master-data-form-field {
    margin-bottom: 0.15rem;
}

.master-data-boolean-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    margin-bottom: 0;
}

.master-data-boolean-field .form-check-input {
    margin-top: 0;
}

.master-data-audit-card .card-body {
    padding: 1rem 1.25rem;
}

.master-data-audit-list {
    display: grid;
    gap: 0.45rem;
    max-height: min(44vh, 24rem);
    overflow: auto;
    padding-right: 0.25rem;
    scrollbar-gutter: stable;
}

.master-data-audit-list__item {
    border: 1px solid #dee2e6;
    border-radius: 0.55rem;
    background: #f8f9fa;
    padding: 0.55rem 0.75rem;
}

.master-data-audit-list .min-w-0 {
    min-width: 0;
}

.master-data-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: max-content;
}

.master-data-row-actions__order {
    display: inline-flex;
    align-items: center;
    margin-right: 0.15rem;
}

.master-data-row-actions__note {
    white-space: nowrap;
}

.planning-filter-bar .form-select,
.planning-filter-bar .form-control {
    min-width: 9.5rem;
    max-width: 14rem;
}

.planning-table-shell {
    max-height: min(64vh, 32rem);
    overflow: auto;
    scrollbar-gutter: stable both-edges;
}

.planning-table-shell--tall {
    max-height: min(70vh, 40rem);
}

.planning-data-table {
    min-width: 100%;
    width: max-content;
}

.planning-data-table th,
.planning-data-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.planning-data-table .form-control,
.planning-data-table .form-select {
    width: auto;
    min-width: 6rem;
    max-width: 100%;
}

.planning-data-table input[type="date"] {
    min-width: 9rem;
}

.planning-data-table input[type="number"] {
    min-width: 6rem;
}

.planning-data-table textarea {
    min-width: 14rem;
}

.planning-data-table--dense th,
.planning-data-table--dense td {
    font-size: 0.875rem;
}

.notification-center__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.notification-center__content {
    min-width: 0;
    flex: 1 1 auto;
}

.notification-center__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.notification-center__title {
    color: #1b1b1b;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.notification-center__meta {
    margin-top: 0.2rem;
    color: #6d6d6d;
    font-size: 0.78rem;
    line-height: 1.4;
}

.notification-center__body {
    margin-top: 0.45rem;
    max-width: 56rem;
    color: #555;
    font-size: 0.86rem;
    line-height: 1.55;
}

.notification-center__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 0 auto;
}

@media (max-width: 991.98px) {
    .app-shell-nav .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-brand {
        min-width: 0;
    }

    .app-nav-group {
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
    }

    .app-nav-actions {
        align-items: flex-start;
    }

    .app-account-panel {
        right: auto;
        left: 0;
        width: min(18rem, calc(100vw - 2rem));
    }

    .app-notification-panel {
        right: auto;
        left: 0;
        width: min(23rem, calc(100vw - 2rem));
    }

    .planning-filter-bar .form-select,
    .planning-filter-bar .form-control {
        max-width: none;
    }

    .planning-table-shell,
    .planning-table-shell--tall {
        max-height: none;
    }

    .notification-center__row {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-center__actions {
        justify-content: flex-start;
    }
}

/* ============================================================
   P9X.3 RESPONSIVE ENHANCEMENTS — PRIORITY 1
   Mobile-first additions. All rules below are additive: they
   extend rather than override the existing breakpoint blocks
   unless explicitly noted.
   ============================================================ */

/* ---------- 992–1199px: iPad landscape + small desktop ----- */
/* The landing workspace content-grid (FOCUS STACK + VERSION
   SHAPE side-by-side) is too narrow at this range because the
   rail already consumes ~272px, leaving ~672px for the main.
   Stack them vertically and collapse the surface strip to 3
   columns so chip labels have room to breathe. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-shell-nav .container {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.75rem;
        max-width: 100%;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .app-brand {
        flex: 0 1 18rem;
        min-width: 12rem;
        gap: 0.55rem;
    }

    .app-brand__name {
        font-size: 0.96rem;
    }

    .app-brand__meta {
        font-size: 0.72rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-nav-group,
    .app-nav-links,
    .app-nav-actions {
        flex-wrap: nowrap;
    }

    .app-nav-group {
        gap: 0.55rem;
    }

    .app-nav-links,
    .app-nav-actions {
        gap: 0.45rem;
    }

    .app-nav-link {
        font-size: 0.88rem;
        white-space: nowrap;
    }

    .app-notification-trigger {
        padding-right: 0.55rem;
        padding-left: 0.55rem;
    }

    .app-account-trigger {
        max-width: 12.5rem;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-workspace__content-grid {
        grid-template-columns: 1fr;
    }

    .landing-workspace__summary-row {
        grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1.35fr);
    }
}

/* ---------- 768–991px: tablet navbar + layout -------------- */
/* The existing 991px block switches the navbar container to
   flex-direction: column which creates an excessively tall dark
   bar on tablets. Override it back to a compact single row.
   Nav links remain visible; account/notification text labels
   are hidden to keep everything on one line. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .app-shell-nav .container {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .app-brand {
        flex: 0 1 auto;
        min-width: 0;
    }

    .app-nav-group {
        align-items: center;
        justify-content: flex-end;
        width: auto;
        flex-wrap: nowrap;
    }

    .app-nav-actions {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .app-account-trigger__text {
        display: none;
    }

    .app-notification-trigger__label {
        display: none;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-workspace {
        grid-template-columns: minmax(12rem, 14rem) minmax(0, 1fr);
    }
}

/* ---------- 480–767px: 2-column metric strips -------------- */
@media (min-width: 480px) and (max-width: 767.98px) {
    .portfolio-metric-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-metric-card,
    .portfolio-metric-card:nth-child(3n),
    .portfolio-metric-card:nth-last-child(-n + 3) {
        border-right: 1px solid var(--cmt-grey-200);
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .portfolio-metric-card:nth-child(2n) {
        border-right: 0;
    }

    .portfolio-metric-card:last-child {
        border-bottom: 0;
    }

    .executive-metric-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .executive-metric-card,
    .executive-metric-card:nth-child(3n),
    .executive-metric-card:nth-last-child(-n + 3) {
        border-right: 1px solid var(--cmt-grey-200);
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .executive-metric-card:nth-child(2n) {
        border-right: 0;
    }

    .executive-metric-card:last-child {
        border-bottom: 0;
    }

    .commercial-metric-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .commercial-metric-card,
    .commercial-metric-card:nth-child(3n),
    .commercial-metric-card:nth-last-child(-n + 3) {
        border-right: 1px solid var(--cmt-grey-200);
        border-bottom: 1px solid var(--cmt-grey-200);
    }

    .commercial-metric-card:nth-child(2n) {
        border-right: 0;
    }

    .commercial-metric-card:last-child {
        border-bottom: 0;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- ≤767px: touch targets + compact navbar --------- */
/* Also overrides the 991px column-stacking for navbar on
   phones, keeping brand + icons on a single horizontal row. */
@media (max-width: 767.98px) {
    .app-shell-nav .container {
        flex-direction: row;
        align-items: center;
    }

    .app-nav-group {
        align-items: center;
        justify-content: flex-end;
        width: auto;
    }

    .app-nav-actions {
        align-items: center;
    }

    .app-nav-links {
        display: none;
    }

    .app-account-trigger__text {
        display: none;
    }

    .app-notification-trigger__label {
        display: none;
    }

    .app-account-trigger,
    .app-notification-trigger {
        min-height: 2.75rem;
    }

    .landing-workspace__shortcut {
        min-height: 2.75rem;
    }

    body.cmt-density .btn {
        min-height: 2.75rem;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    body.cmt-density .btn-sm {
        min-height: 2.25rem;
    }

    .auth-shell .card {
        max-width: 28rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- ≤479px: small-phone layout adjustments --------- */
@media (max-width: 479.98px) {
    .landing-workspace {
        grid-template-columns: 1fr;
    }

    .landing-surface-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-workspace__headline h1 {
        font-size: 1.1rem;
    }

    .landing-workspace__summary-row {
        grid-template-columns: 1fr;
    }

    body.cmt-density .card-body {
        padding: 0.6rem 0.75rem;
    }

    .dashboard-hero {
        padding: 0.65rem 0.75rem;
    }

    .auth-shell {
        padding: 1rem;
    }

    .auth-shell .card {
        max-width: 28rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================================
   HAMBURGER / OFF-CANVAS NAV  (≤ 767px phones only)
   Uses the native <details>/<summary> pattern already present
   in account and notification shells. On desktop/tablet the
   summary trigger is hidden and nav links are always visible.
   ============================================================ */

/* Desktop + tablet: hide the trigger, show links regardless
   of the details open/closed state */
.app-nav-shell {
    display: contents;
}

.app-nav-shell > .app-nav-trigger {
    display: none;
    list-style: none;
}

.app-nav-shell > .app-nav-trigger::-webkit-details-marker {
    display: none;
}

.app-nav-shell > .app-nav-links {
    display: flex !important;
}

/* Phone: show the hamburger, gate links behind it */
@media (max-width: 767.98px) {
    .app-nav-shell {
        display: block;
        position: relative;
    }

    .app-nav-shell > .app-nav-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        min-width: 2.75rem;
        border-radius: 0.45rem;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        transition: background-color 0.18s ease;
    }

    .app-nav-shell > .app-nav-trigger:hover,
    .app-nav-shell[open] > .app-nav-trigger {
        background: rgba(255, 255, 255, 0.16);
        color: #fff;
    }

    .app-nav-shell:not([open]) > .app-nav-links {
        display: none !important;
    }

    .app-nav-shell[open] > .app-nav-links {
        display: flex !important;
        flex-direction: column;
        gap: 0.2rem;
        position: fixed;
        top: 3.6rem;
        left: 0;
        right: 0;
        z-index: 1038;
        padding: 0.75rem 1rem 1rem;
        background: #1a1a1a;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

    .app-nav-shell[open] > .app-nav-links .app-nav-link {
        padding: 0.65rem 0.75rem;
        border-radius: 0.4rem;
        font-size: 0.95rem;
    }

    .app-nav-shell[open] > .app-nav-links .app-nav-link:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}
