/* Summary Bar Component */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: var(--font-sans);
    --tblr-font-sans-serif: var(--font-sans);
    --tblr-body-font-family: var(--font-sans);
    --tblr-btn-font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading) !important;
}

html,
body {
    font-family: var(--font-sans) !important;
}

body :where(p, span, div, td, th, li, a, button, input, select, textarea, label, small, strong, em, code):not([class*="fa-"]):not([class*="bi-"]):not(.fa):not(.bi) {
    font-family: inherit !important;
}

body :where(span):not([class*="fa-"]):not([class*="bi-"]):not(.fa):not(.bi) {
    line-height: normal !important;
}

.navbar,
.nav-link,
.btn,
.card-title,
.card-text,
.dropdown-item,
.form-control,
.form-select,
.form-label,
.form-check-label,
.badge,
.label,
.tag,
.alert,
.toast,
.notification,
.footer,
.footer-attribution,
.modal-content,
.modal-header,
.modal-body,
.modal-footer,
.card,
.card-header,
.card-body,
.card-footer,
.pagination,
.page-link,
.page-item,
.breadcrumb,
.breadcrumb-item,
table,
.table {
    font-family: var(--font-sans) !important;
}

[class*="fa-"],
.fa,
[class*="bi-"],
.bi {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Bootstrap Icons", inherit !important;
    font-weight: 900 !important;
}

.summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bs-card-bg);
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 1.5rem;
    border-radius: 2px;box-shadow: var(--glass-shadow);
}

@media (max-width: 991.98px) {
    .summary-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.summary-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--bs-primary);
}

.summary-bar .subtitle {
    font-size: 0.875rem;
    color: var(--bs-body-color);
    opacity: 0.7;
}

/* Glass Card Component */
.glass-card {
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;box-shadow: var(--glass-shadow);
    transition: box-shadow 0.2s ease-in-out;
}

[data-bs-theme="dark"] .glass-card {
    box-shadow: var(--neon-glow);
}

/* Tables Styling */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--bs-border-color);
}

.table thead th {
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    border-right: 1px solid var(--bs-border-color); /* Added column border */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 0.75rem;
}

.table thead th:last-child {
    border-right: none;
}

.table tbody td {
    vertical-align: middle;
    border-right: 1px solid var(--bs-border-color); /* Added column border */
}

.table tbody td:last-child {
    border-right: none;
}

.action-col {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

/* Responsive Table Enhancements */
@media (max-width: 767.98px) {
    .table-responsive {
        border-radius: 2px;overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Global mobile list behavior: keep columns readable without over-fixing widths. */
    .table-responsive > .table {
        min-width: 720px;
        font-size: 0.82rem;
    }

    .table-responsive > .table .action-col,
    .table-responsive > .table .action-col * {
        white-space: nowrap;
    }

    .project-list-table {
        table-layout: fixed !important;
    }

    .table-responsive::after {
        content: "";
        position: sticky;
        right: 0;
        top: 0;
        width: 18px;
        height: 100%;
        pointer-events: none;
        background: linear-gradient(to left, color-mix(in srgb, var(--bs-body-bg) 92%, transparent), transparent);
        z-index: 2;
    }

    /* Premium COMPACT buttons for mobile tables */
    .btn-group .btn,
    .action-col .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
        gap: 0.25rem !important;
    }

    .action-col {
        position: sticky;
        right: 0;
        background: var(--bs-card-bg) !important;
        border-left: 1px solid var(--bs-border-color);
        box-shadow: -4px 0 8px rgba(0,0,0,0.05);
        z-index: 10;
    }
}

/* Ensure table-responsive doesn't crop dropdowns if possible, but keep scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
}

.table-responsive > .table {
    min-width: 760px;
}

/* Global sharp chips/badges (no rounded corners) */
.badge,
.chip,
.status-pill {
    border-radius: 0 !important;
}

.project-list-table thead th {
    white-space: nowrap;
    padding: 0.6rem 0.45rem;
    background: transparent !important;
    text-transform: none;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.readiness-report-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.74rem;
    min-width: 1180px;
}

.readiness-report-table .readiness-col-project {
    width: 17%;
}

.readiness-report-table .readiness-col-classification {
    width: 14%;
}

.readiness-report-table .readiness-col-status {
    width: 6.4%;
}

.readiness-report-table .readiness-col-overall {
    width: 9%;
}

.readiness-report-table th.action-col,
.readiness-report-table td.action-col {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

.readiness-report-table td:nth-child(3),
.readiness-report-table td:nth-child(4),
.readiness-report-table td:nth-child(5),
.readiness-report-table td:nth-child(6),
.readiness-report-table td:nth-child(7),
.readiness-report-table td:nth-child(8),
.readiness-report-table td:nth-child(9) {
    text-align: center;
}

.readiness-report-table th,
.readiness-report-table td {
    padding: 0.34rem 0.24rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.readiness-report-table .readiness-status-badge {
    max-width: 100%;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.22;
    padding: 0.24rem 0.4rem;
    border-radius: 0 !important;
    cursor: default;
    color: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Improve info chip contrast in light mode */
[data-bs-theme="light"] .readiness-report-table .readiness-status-badge.bg-info-subtle.text-info {
    color: #055160 !important;
    background-color: #cff4fc !important;
}
[data-bs-theme="light"] .readiness-report-table .readiness-status-badge.bg-info-subtle.text-info .readiness-chip-info-icon {
    color: #055160 !important;
}

.readiness-report-table .readiness-chip-marquee .readiness-chip-track {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    display: block;
}

.readiness-report-table .readiness-chip-marquee .readiness-chip-text {
    display: inline-block;
    min-width: 0;
    white-space: nowrap;
    max-width: 100%;
}

.readiness-report-table .readiness-chip-marquee .readiness-chip-info-icon {
    flex: 0 0 auto;
    font-size: 0.72rem;
    line-height: 1;
    margin-left: 0.1rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

.readiness-report-table .readiness-chip-marquee.is-overflowing .readiness-chip-text {
    animation: readiness-chip-marquee var(--readiness-chip-duration, 8.5s) linear infinite;
    will-change: transform;
}

.readiness-report-table .readiness-chip-marquee.is-overflowing:hover .readiness-chip-text,
.readiness-report-table .readiness-chip-marquee.is-overflowing:focus-within .readiness-chip-text {
    animation-play-state: paused;
}

.readiness-report-table .readiness-detail {
    line-height: 1.2;
}

.readiness-report-table .readiness-marquee-wrap {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
    cursor: default;
}

.readiness-report-table .readiness-marquee {
    display: inline-block;
    white-space: nowrap;
}

.readiness-report-table .form-tooltip-icon {
    font-size: 0.64rem;
}

.tooltip.readiness-tooltip-wide {
    --bs-tooltip-max-width: min(860px, 96vw);
}

.tooltip.readiness-tooltip-wide .tooltip-inner {
    max-width: min(860px, 96vw);
    text-align: left;
    line-height: 1.45;
    white-space: normal;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.7rem;
    font-size: 0.78rem;
    max-height: min(72vh, 620px);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
}

.tooltip.readiness-tooltip-wide .tooltip-inner::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.tooltip.readiness-tooltip-wide .tooltip-inner::-webkit-scrollbar-track {
    background: transparent;
}

.tooltip.readiness-tooltip-wide .tooltip-inner::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.65);
    border-radius: 999px;
}

.tooltip.readiness-tooltip-wide .rtip-shell {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tooltip.readiness-tooltip-wide .rtip-head {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.tooltip.readiness-tooltip-wide .rtip-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.55rem;
    padding: 0.48rem 0.56rem;
    background: rgba(15, 23, 42, 0.14);
}

.tooltip.readiness-tooltip-wide .rtip-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.26rem;
}

.tooltip.readiness-tooltip-wide .rtip-body {
    font-size: 0.74rem;
    line-height: 1.4;
}

.tooltip.readiness-tooltip-wide .rtip-list {
    margin: 0;
    padding-left: 1rem;
}

.tooltip.readiness-tooltip-wide .rtip-list li + li {
    margin-top: 0.2rem;
}

.readiness-report-table .readiness-action-btn {
    width: 32px;
    height: 28px;
    min-width: 32px;
    min-height: 28px;
    padding: 0;
    font-size: 0.68rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.readiness-report-table .readiness-action-btn i {
    font-size: 0.72rem;
}

/* Filled status chips with white text */
.readiness-report-table .badge.bg-success-subtle {
    background: var(--readiness-chip-success-bg, color-mix(in srgb, #2f9e44 72%, #ffffff 28%)) !important;
    color: var(--readiness-chip-text, #fff) !important;
}

.readiness-report-table .badge.bg-danger-subtle {
    background: var(--readiness-chip-danger-bg, color-mix(in srgb, #dc4c64 72%, #ffffff 28%)) !important;
    color: var(--readiness-chip-text, #fff) !important;
}

.readiness-report-table .badge.bg-warning-subtle {
    background: var(--readiness-chip-warning-bg, color-mix(in srgb, #d18a09 72%, #ffffff 28%)) !important;
    color: var(--readiness-chip-text, #fff) !important;
}

.readiness-report-table .badge.bg-secondary-subtle,
.readiness-report-table .badge.bg-light {
    background: var(--readiness-chip-info-bg, color-mix(in srgb, #64748b 72%, #ffffff 28%)) !important;
    color: var(--readiness-chip-text, #fff) !important;
}

.readiness-report-table .readiness-marquee-wrap.is-overflowing .readiness-marquee {
    animation: readiness-cell-marquee var(--readiness-marquee-duration, 8s) linear infinite;
    animation-direction: normal;
    will-change: transform;
}

.readiness-report-table .readiness-marquee-wrap.is-overflowing:hover .readiness-marquee {
    animation-play-state: paused;
}

@keyframes readiness-cell-marquee {
    0% { transform: translateX(0); }
    49% { transform: translateX(calc(-1 * var(--readiness-marquee-shift, 0px))); }
    50% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

.readiness-report-table .readiness-th-label-marquee-wrap {
    display: inline-block;
    max-width: calc(100% - 1.35rem);
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    cursor: default;
}

.readiness-report-table .readiness-th-label-marquee {
    display: inline-block;
    white-space: nowrap;
}

.readiness-report-table .readiness-th-label-marquee-wrap.is-overflowing .readiness-th-label-marquee {
    animation: readiness-th-marquee var(--readiness-th-marquee-duration, 6.5s) linear infinite;
    animation-direction: normal;
    will-change: transform;
}

.readiness-report-table .form-tooltip-icon {
    display: inline-block;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: 0.2rem !important;
}

.readiness-report-table th {
    white-space: nowrap;
}

.readiness-report-table .readiness-th-label-marquee-wrap.is-overflowing:hover .readiness-th-label-marquee {
    animation-play-state: paused;
}

@keyframes readiness-th-marquee {
    0% { transform: translateX(0); }
    49% { transform: translateX(calc(-1 * var(--readiness-th-marquee-shift, 0px))); }
    50% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

@keyframes readiness-chip-marquee {
    0% { transform: translateX(0); }
    48% { transform: translateX(calc(-1 * var(--readiness-chip-shift, 0px))); }
    52% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

[data-bs-theme="dark"] .readiness-report-table .badge.bg-success-subtle {
    background: color-mix(in srgb, #2f9e44 68%, #1b2433 32%) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .readiness-report-table .badge.bg-danger-subtle {
    background: color-mix(in srgb, #c2415b 68%, #1b2433 32%) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .readiness-report-table .badge.bg-warning-subtle {
    background: color-mix(in srgb, #b7791f 68%, #1b2433 32%) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .readiness-report-table .badge.bg-secondary-subtle {
    background: color-mix(in srgb, #55657c 68%, #1b2433 32%) !important;
    color: #fff !important;
}

.readiness-table-shell {
    overflow-x: auto;
    overflow-y: visible;
}

.readiness-filter-form > div {
    min-width: 10rem;
}

.readiness-filter-form .d-flex.gap-2 {
    min-width: auto;
}

@media (max-width: 1199.98px) {
    .readiness-filter-form > div {
        min-width: 100%;
    }
}

.readiness-toolbar-scope .readiness-list-controls-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.6rem;
    justify-content: start;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: 0 !important;
}

@media (min-width: 769px) {
    .readiness-toolbar-scope .readiness-list-controls-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 0.5rem !important;
        padding: 0 !important;
        align-items: end !important;
    }
}

.readiness-toolbar-scope .readiness-unified-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) repeat(4, minmax(128px, 0.9fr)) auto;
    gap: 0.9rem;
    align-items: end;
    width: 100%;
    margin: 0;
}

.readiness-toolbar-scope .readiness-filter-compact {
    gap: 0.55rem !important;
}

.readiness-toolbar-scope .readiness-filter-compact .form-label {
    font-size: 0.68rem;
    margin-bottom: 0.2rem !important;
    line-height: 1.15;
}

.readiness-toolbar-scope .readiness-filter-compact .form-select,
.readiness-toolbar-scope .readiness-filter-compact .form-control,
.readiness-toolbar-scope .readiness-list-controls-grid .search-wrapper .form-control,
.readiness-toolbar-scope .readiness-filter-compact .btn {
    height: 36px;
    min-height: 36px;
    font-size: 0.78rem;
    line-height: 1.2;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
}

.readiness-search-form .input-group-text,
.readiness-search-form .form-control,
.readiness-search-form .readiness-search-submit {
    height: 34px;
    min-height: 34px;
    font-size: 0.8125rem;
}

.readiness-toolbar-scope .readiness-search-wrap {
    width: 100%;
    max-width: 100%;
}

.readiness-toolbar-scope .readiness-search-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}

.readiness-toolbar-scope .readiness-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    color: #9ca3af;
    pointer-events: none;
    z-index: 2;
}

.readiness-toolbar-scope .readiness-search-form .readiness-search-input {
    width: 100%;
    height: 36px;
    min-height: 36px;
    padding: 0 0.75rem;
    font-size: 0.74rem;
    border: 1px solid #d1d5db;
    border-radius: 6px 0 0 6px !important;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form,
.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .input-group.input-group-search {
    margin: 0 !important;
    align-items: end !important;
}

.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form-control,
.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form-submit,
.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .input-group-text {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.74rem !important;
}

.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form-control {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form-submit {
    padding-inline: 0.55rem !important;
}

.readiness-toolbar-scope .search-wrapper.readiness-search-wrap .search-form-submit .btn-label {
    font-size: 0.72rem !important;
}

.readiness-toolbar-scope .readiness-search-submit-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 6px 6px 0;
    margin-left: -1px;
}

.readiness-toolbar-scope .readiness-search-submit-btn i {
    margin: 0 !important;
    font-size: 0.8rem;
}

.readiness-toolbar-scope .readiness-search-form .readiness-search-input:hover {
    border-color: #9ca3af;
}

.readiness-toolbar-scope .readiness-search-form .readiness-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-bs-theme="dark"] .readiness-toolbar-scope .readiness-search-form .readiness-search-input {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .readiness-toolbar-scope .readiness-search-icon {
    color: #9ca3af;
}

[data-bs-theme="dark"] .readiness-toolbar-scope .readiness-search-form .readiness-search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.readiness-toolbar-scope .readiness-filter-compact .btn {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.readiness-toolbar-scope .readiness-filter-compact > div {
    min-width: 0;
}

.readiness-toolbar-scope .readiness-filter-compact > .d-flex.gap-2 {
    align-self: flex-end;
    margin-bottom: 0.02rem;
}

.readiness-toolbar-scope .readiness-filter-actions-primary {
    grid-column: auto;
    justify-content: flex-end;
    align-items: flex-end;
}

.readiness-toolbar-scope .readiness-filter-actions-secondary {
    grid-column: 1 / -1;
    justify-content: flex-end;
    align-items: flex-end;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.readiness-toolbar-scope .readiness-icon-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.readiness-toolbar-scope .readiness-icon-btn .btn-label {
    display: none !important;
}

.readiness-toolbar-scope .readiness-icon-btn i {
    margin: 0 !important;
    font-size: 0.82rem;
}

.readiness-toolbar-scope .readiness-excel-btn {
    height: 36px;
    min-height: 36px;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem !important;
}

.readiness-toolbar-scope .readiness-excel-btn i {
    margin-right: 0.3rem !important;
}

.readiness-toolbar-scope .readiness-zero-detail-btn {
    height: 36px;
    min-height: 36px;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem !important;
}

.readiness-toolbar-scope .readiness-zero-detail-btn i {
    margin-right: 0.3rem !important;
}

.readiness-toolbar-scope .readiness-list-controls-grid .action-btn-group {
    margin-left: 0 !important;
    padding-left: 0 !important;
    align-self: end;
}

.readiness-pagination-host,
.readiness-pagination-host .list-pagination-toolbar,
.readiness-pagination-host .list-page-size-form {
    overflow: visible !important;
    position: relative;
    z-index: 8;
}

.readiness-pagination-host .list-page-size-select {
    position: relative;
    z-index: 10;
    min-width: 5.5rem;
}

.readiness-pagination-host .list-page-size-form,
.readiness-pagination-host .list-pagination-toolbar {
    margin-bottom: 0;
}

.readiness-pagination-host .list-pagination-controls-row {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr);
    gap: 0.75rem;
    align-items: center;
    overflow: visible !important;
    position: relative;
    z-index: 11;
}

.readiness-pagination-host .list-pagination-shell {
    margin-top: 0;
    justify-content: flex-start;
    overflow: visible !important;
}

.readiness-pagination-host .list-pagination-toolbar {
    justify-content: flex-end;
    overflow: visible !important;
}

.readiness-pagination-host .list-page-size-select {
    overflow: visible !important;
    position: relative;
    z-index: 30;
}

.readiness-page-meta-row {
    overflow: visible;
}

.readiness-page-meta-row > .small {
    flex: 1 1 70%;
    min-width: 320px;
}

.readiness-inline-page-size-form {
    margin-left: auto;
    justify-content: flex-end;
    z-index: 20;
}

@media (max-width: 1399.98px) {
    .readiness-toolbar-scope .readiness-list-controls-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .readiness-toolbar-scope .readiness-list-controls-grid .action-btn-group {
        justify-self: start;
    }

    .readiness-toolbar-scope .readiness-unified-form {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
        gap: 0.8rem;
    }

    .readiness-toolbar-scope .readiness-filter-actions-primary { grid-column: 1 / -1; justify-content: flex-start; }
    .readiness-toolbar-scope .readiness-filter-actions-secondary { grid-column: 1 / -1; }
}

@media (max-width: 1199.98px) {
    .readiness-toolbar-scope .readiness-unified-form {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        gap: 0.75rem;
    }

    .readiness-toolbar-scope .readiness-filter-compact .form-label {
        font-size: 0.66rem;
    }
}

@media (max-width: 991.98px) {
    .readiness-toolbar-scope .readiness-list-controls-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .readiness-toolbar-scope .readiness-list-controls-grid .action-btn-group {
        justify-self: start;
    }

    .readiness-toolbar-scope .readiness-unified-form {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .readiness-toolbar-scope .readiness-filter-actions-secondary {
        justify-content: flex-start;
    }

    .readiness-toolbar-scope .readiness-filter-compact > .d-flex.gap-2 {
        margin-bottom: 0;
    }

    .readiness-table-shell {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    .readiness-report-table {
        table-layout: auto !important;
        width: max-content !important;
        min-width: 1200px;
    }

    .readiness-report-table colgroup col {
        width: auto !important;
    }

    .readiness-report-table th,
    .readiness-report-table td {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: break-word;
        vertical-align: top;
        padding: 0.42rem 0.38rem;
    }

    .readiness-report-table .readiness-status-badge {
        width: auto;
        min-width: 6.3rem;
        max-width: 100%;
    }

    .readiness-toolbar-scope .readiness-search-wrap {
        width: 100%;
        max-width: 100%;
    }

    .readiness-toolbar-scope .readiness-filter-compact .form-select,
    .readiness-toolbar-scope .readiness-filter-compact .form-control,
    .readiness-toolbar-scope .readiness-filter-compact .btn {
        height: 36px;
        min-height: 36px;
        font-size: 0.76rem;
    }

    .readiness-pagination-host .list-pagination-controls-row {
        grid-template-columns: 1fr;
    }

    .readiness-pagination-host .list-pagination-shell,
    .readiness-pagination-host .list-pagination-toolbar {
        justify-content: flex-start;
    }

    .readiness-page-meta-row > .small {
        min-width: 100%;
    }

    .readiness-inline-page-size-form {
        margin-left: 0;
        width: auto;
    }
}

@media (max-width: 767.98px) {
    .readiness-toolbar-scope .readiness-unified-form { grid-template-columns: 1fr; }

    .readiness-toolbar-scope .readiness-toolbar-row {
        gap: 0.6rem !important;
    }

    .readiness-toolbar-scope .readiness-filter-compact .d-flex.gap-2 {
        width: 100%;
    }

    .readiness-toolbar-scope .readiness-filter-compact .d-flex.gap-2 .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .readiness-toolbar-scope .readiness-filter-compact .btn .btn-label {
        display: none !important;
    }

    .readiness-toolbar-scope .readiness-filter-compact .btn i {
        margin-right: 0 !important;
    }

    .readiness-toolbar-scope .readiness-filter-compact .form-label {
        font-size: 0.64rem;
    }

    .readiness-toolbar-scope .readiness-filter-compact .form-select,
    .readiness-toolbar-scope .readiness-filter-compact .form-control {
        font-size: 0.75rem;
    }

    .readiness-toolbar-scope .readiness-excel-btn {
        width: 100%;
        justify-content: center;
    }

    .readiness-toolbar-scope .readiness-zero-detail-btn {
        width: 100%;
        justify-content: center;
    }

    .readiness-report-table th.action-col,
    .readiness-report-table td.action-col {
        position: static !important;
        right: auto !important;
        min-width: 64px !important;
        max-width: 64px !important;
        width: 64px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-left: 0 !important;
    }

    .readiness-report-table .readiness-action-btn {
        width: 30px;
        height: 26px;
        min-width: 30px;
        min-height: 26px;
    }

    .readiness-report-table {
        min-width: 1260px;
    }

    .readiness-report-table th,
    .readiness-report-table td {
        font-size: 0.76rem !important;
        line-height: 1.28;
    }
}

.readiness-report-table .readiness-reason-col {
    max-width: 140px;
}

.readiness-report-table .readiness-reason-badge {
    display: inline-block;
    width: 100%;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.readiness-report-table .readiness-chip-marquee {
    position: relative;
}

.readiness-report-table .readiness-chip-marquee.has-chip-info-icon {
    padding-right: 0.9rem;
}

.readiness-report-table .readiness-chip-marquee.has-chip-info-icon .readiness-chip-track {
    max-width: calc(100% - 0.9rem);
}

.readiness-report-table .readiness-chip-marquee.has-chip-info-icon .readiness-chip-info-icon {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0 !important;
}

/* Zero progress detail modal */
.readiness-zero-modal-dialog {
    max-width: min(96vw, 1440px);
}

.readiness-zero-modal-content {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.6rem;
    overflow: hidden;
}

.readiness-zero-modal-header {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.readiness-zero-modal-kicker {
    color: #3b82f6;
    letter-spacing: 0.04em;
}

.readiness-zero-modal-body {
    background: #ffffff;
    padding: 1rem 1rem 1.1rem;
}

.readiness-zero-summary {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 0.75rem;
}

.readiness-zero-summary-item {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.7rem 0.8rem;
}

.readiness-zero-summary-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.readiness-zero-summary-value {
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.readiness-zero-summary-value-sm {
    font-size: 0.84rem;
    color: #1f2937;
    line-height: 1.35;
    font-weight: 500;
}

.readiness-zero-section {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    overflow: hidden;
}

.readiness-zero-section-head {
    padding: 0.62rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.readiness-zero-table-wrap {
    max-height: min(62vh, 680px);
}

.readiness-zero-table {
    min-width: 920px;
}

.readiness-zero-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eff6ff;
    color: #1e3a8a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.readiness-zero-table td,
.readiness-zero-table th {
    padding: 0.55rem 0.62rem;
    vertical-align: top;
}

.readiness-zero-table tbody tr + tr td {
    border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.readiness-zero-project-code {
    color: #0f172a;
}

.readiness-zero-project-name {
    margin-top: 0.15rem;
    line-height: 1.35;
}

.readiness-zero-project-link {
    display: block;
}

.readiness-zero-project-link:hover .readiness-zero-project-code,
.readiness-zero-project-link:focus .readiness-zero-project-code {
    color: #1d4ed8;
    text-decoration: underline;
}

.readiness-zero-modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    background: #f8fafc;
}

[data-bs-theme="dark"] .readiness-zero-modal-content {
    border-color: rgba(148, 163, 184, 0.4);
    background: #0f172a;
}

[data-bs-theme="dark"] .readiness-zero-modal-header {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-bottom-color: rgba(148, 163, 184, 0.45);
}

[data-bs-theme="dark"] .readiness-zero-modal-header .modal-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .readiness-zero-modal-body,
[data-bs-theme="dark"] .readiness-zero-modal-footer {
    background: #0f172a;
}

[data-bs-theme="dark"] .readiness-zero-summary-item,
[data-bs-theme="dark"] .readiness-zero-section {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.4);
}

[data-bs-theme="dark"] .readiness-zero-section-head,
[data-bs-theme="dark"] .readiness-zero-table thead th {
    background: rgba(30, 58, 138, 0.35);
    color: #dbeafe;
    border-bottom-color: rgba(148, 163, 184, 0.45);
}

[data-bs-theme="dark"] .readiness-zero-summary-value,
[data-bs-theme="dark"] .readiness-zero-project-code {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .readiness-zero-summary-value-sm,
[data-bs-theme="dark"] .readiness-zero-project-name,
[data-bs-theme="dark"] .readiness-zero-table td {
    color: #cbd5e1;
}

@media (max-width: 991.98px) {
    .readiness-zero-modal-dialog {
        max-width: 98vw;
        margin: 0.55rem auto;
    }

    .readiness-zero-summary {
        grid-template-columns: 1fr;
    }

    .readiness-zero-table {
        min-width: 760px;
    }
}

@media (max-width: 575.98px) {
    .readiness-toolbar-scope {
        padding-inline: 0.1rem !important;
    }

    .readiness-toolbar-scope .readiness-unified-form {
        gap: 0.62rem;
    }

    .readiness-toolbar-scope .readiness-search-form .readiness-search-input {
        font-size: 0.74rem;
    }
}

.project-list-table thead,
.project-list-table thead tr {
    background: transparent !important;
}

.project-list-table tbody td {
    padding: 0.55rem 0.45rem;
    text-align: center;
}

.project-list-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .project-list-table {
        font-size: 0.76rem;
    }

    .project-list-table thead th {
        font-size: 0.72rem;
        padding: 0.5rem 0.38rem;
    }

    .project-list-table tbody td {
        padding: 0.45rem 0.38rem;
    }

    .project-list-table td .badge {
        font-size: 0.7rem;
        padding: 0.16rem 0.32rem !important;
        line-height: 1.1;
    }
}

.project-list-table th,
.project-list-table td {
    overflow: visible;
    text-overflow: clip;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.project-list-table th {
    overflow: visible;
}

.project-list-table .th-label-marquee-wrap {
    display: inline-block;
    width: calc(100% - 1.2rem);
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
}

.project-list-table .th-label-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: none;
}

.project-list-table .th-label-marquee-wrap.is-overflowing .th-label-marquee {
    animation: project-list-th-marquee var(--project-list-th-marquee-duration, 8s) linear infinite;
    animation-direction: normal;
    will-change: transform;
}

.project-list-table .th-label-marquee-wrap.is-overflowing:hover .th-label-marquee {
    animation-play-state: paused;
}

.project-list-table thead .form-tooltip-icon {
    font-size: 0.78rem;
    opacity: 1;
    color: var(--bs-info) !important;
    vertical-align: middle;
}

@keyframes project-list-th-marquee {
    0% { transform: translateX(0); }
    49% { transform: translateX(calc(-1 * var(--project-list-th-marquee-shift, 0px))); }
    51% { transform: translateX(calc(-1 * var(--project-list-th-marquee-shift, 0px))); }
    100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .project-list-table .th-label-marquee {
        animation: none;
    }
}

.project-list-table th:first-child,
.project-list-table td:first-child {
    width: auto;
}

.project-list-table th.action-col,
.project-list-table td.action-col {
    width: 1%;
    position: static !important;
    right: auto !important;
    box-shadow: none !important;
    border-left: 0 !important;
    background: transparent !important;
    z-index: auto !important;
    white-space: nowrap;
}

.project-list-table th.c-timeline,
.project-list-table td.c-timeline {
    min-width: 10.5rem;
}

.project-list-table th.c-phys,
.project-list-table td.c-phys,
.project-list-table th.c-ev,
.project-list-table td.c-ev,
.project-list-table th.c-ac,
.project-list-table td.c-ac {
    width: 6.2rem;
    min-width: 6.2rem;
}

.project-list-table td.c-phys .badge,
.project-list-table td.c-ev .badge,
.project-list-table td.c-ac .badge {
    padding: 0.16rem 0.42rem !important;
    min-width: 4.6rem;
}

.project-list-table td.c-timeline .timeline-eot-block {
    border-color: var(--bs-border-color-translucent) !important;
}

.project-list-table-wrap .action-col .btn-group {
    flex-wrap: nowrap;
}

.project-list-table-wrap .action-col .btn {
    padding: 0.2rem 0.34rem;
    min-width: 1.9rem;
}

.project-list-table td.c-title .fw-bold a {
    display: inline-block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
}

.project-list-table td.c-code .fw-bold,
.project-list-table td.c-title .fw-bold,
.project-list-table td.c-title .fw-bold a {
    font-size: 0.86rem !important;
    line-height: 1.2;
    font-weight: 600 !important;
}

.project-list-table thead th:nth-child(2),
.project-list-table thead th:nth-child(3) {
    font-size: 0.7rem !important;
}

.project-list-table td.c-title .small.text-muted {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.project-list-table th .th-label-marquee-wrap {
    max-width: calc(100% - 1.05rem);
}

.project-list-table th.action-col,
.project-list-table td.action-col {
    text-align: center;
}

.project-list-table thead th.action-col {
    background: var(--bs-body-bg) !important;
}

.project-list-table td.c-title .fw-bold a:hover {
    animation: none !important;
    transform: none !important;
}

.project-list-table td.c-vertical .badge,
.project-list-table td.c-value .badge {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

[data-bs-theme="dark"] .project-list-table td.c-ev .badge,
[data-bs-theme="dark"] .project-list-table td.c-ac .badge {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.42) !important;
}

.project-list-table td.c-schedule .schedule-chip-wrap {
    display: inline-flex;
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    align-items: center;
    line-height: 1.15;
}

.project-list-table td.c-schedule .schedule-chip-text {
    display: inline;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

.project-list-table td.c-schedule .schedule-chip-wrap.is-overflowing:hover .schedule-chip-text {
    animation: project-list-cell-marquee 8s linear infinite;
}

.project-list-table td.c-schedule .schedule-chip-wrap.is-overflowing .schedule-chip-text {
    animation: none;
}

@media (max-width: 767.98px) {
    .project-list-table-wrap {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .project-list-table-wrap .project-list-table {
        table-layout: auto !important;
        min-width: 920px !important;
        width: 100%;
        font-size: 0.84rem !important;
    }

    .project-list-table-wrap .project-list-table th,
    .project-list-table-wrap .project-list-table td {
        padding: 0.5rem 0.55rem !important;
        vertical-align: top;
        white-space: normal !important;
    }

    .project-list-table-wrap .project-list-table td.c-title,
    .project-list-table-wrap .project-list-table td.c-title .small.text-muted {
        white-space: normal !important;
    }

    .project-list-table-wrap .project-list-table td.c-title .small.text-muted {
        line-height: 1.2;
        display: block;
        overflow: visible;
    }

    .project-list-table-wrap .project-list-table td.c-schedule .schedule-chip-wrap,
    .project-list-table-wrap .project-list-table td.c-schedule .schedule-chip-text {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    .project-list-table-wrap .project-list-table td.c-vertical .badge,
    .project-list-table-wrap .project-list-table td.c-value .badge,
    .project-list-table-wrap .project-list-table td.c-phys .badge,
    .project-list-table-wrap .project-list-table td.c-ev .badge,
    .project-list-table-wrap .project-list-table td.c-ac .badge,
    .project-list-table-wrap .project-list-table td.c-schedule .badge {
        font-size: 0.76rem !important;
        padding: 0.2rem 0.38rem !important;
        line-height: 1.15;
    }

    .project-list-table-wrap .action-col {
        min-width: 96px !important;
        max-width: 110px !important;
        background: var(--bs-card-bg) !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .project-list-table-wrap {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .project-list-table-wrap .project-list-table {
        min-width: 980px !important;
        width: 100%;
        table-layout: auto !important;
    }

    .project-list-table-wrap .project-list-table th,
    .project-list-table-wrap .project-list-table td {
        white-space: normal !important;
    }

    .project-list-table-wrap .project-list-table td.c-title,
    .project-list-table-wrap .project-list-table td.c-title .small.text-muted {
        white-space: normal !important;
    }
}

@keyframes project-list-cell-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-45%); }
}

/* Allow dropdown menus to escape vertically in specific tables */
.table-responsive.dropdown-visible {
    overflow-y: visible;
}

/* Modal table responsive - ensure full width and proper scrolling */
.modal .table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 65vh;
    width: 100%;
    margin: 0;
    border: 0;
}

/* Modal table styling improvements */
.modal .table {
    font-size: 0.85rem;
    width: 100%;
}

.modal .table th,
.modal .table td {
    padding: 0.5rem 0.6rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* Allow long content to wrap in description columns */
.modal .table td:nth-child(3),
.modal .table td:nth-child(7) {
    white-space: normal;
    min-width: 180px;
    max-width: 300px;
}

/* Ensure select elements in tables don't get constrained */
.modal .table .form-select {
    min-width: 120px;
    white-space: normal;
}

/* Allow searchable dropdowns to escape on requisition form */
.ims-requisition-form,
.ims-requisition-form .premium-form-section {
    overflow: visible;
}

/* Allow modals with tables to have proper overflow for scrolling */
.modal .premium-form-section,
.modal-body .premium-form-section {
    overflow-x: visible;
    overflow-y: visible;
}

/* Premium List Controls Grid */
.list-controls-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bs-light-subtle);
    border-bottom: 1px solid var(--bs-border-color);
}

.search-wrapper {
    width: 100%;
    max-width: 400px;
}

.fms-report-shell .glass-card,
.fms-report-shell .glass-card.overflow-hidden,
.fms-report-shell .premium-form-section,
.fms-report-shell .fms-report-filter-form,
.fms-report-shell .fms-report-filter-form .row,
.fms-report-shell .fms-report-filter-form [class*='col-'] {
    overflow: visible !important;
}

.fms-report-filter-form > .row > [class*='col-'] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fms-report-filter-form .form-control,
.fms-report-filter-form .form-select,
.fms-report-filter-form .form-control-premium,
.fms-report-filter-form .form-select-premium,
.fms-report-filter-form .searchable-select,
.fms-report-filter-form .tpgc-searchable-select {
    width: 100%;
}

.fms-report-filter-form .searchable-select,
.fms-report-filter-form .tpgc-searchable-select {
    z-index: 20;
}

.fms-report-filter-form .searchable-select .dropdown-menu,
.fms-report-filter-form .tpgc-searchable-select .dropdown-menu,
.fms-report-filter-form .ss-portal-menu {
    max-width: min(36rem, calc(100vw - 2rem)) !important;
    z-index: 2100 !important;
}

.fms-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.fms-report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.fms-report-meta-card {
    background: var(--bs-light-subtle);
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    padding: 1rem;
}

.fms-report-note {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
}

.fms-report-tree-label {
    display: inline-block;
}

.report-indent-0 { margin-left: 0; }
.report-indent-1 { margin-left: 1rem; }
.report-indent-2 { margin-left: 2rem; }
.report-indent-3 { margin-left: 3rem; }
.report-indent-4 { margin-left: 4rem; }
.report-indent-5 { margin-left: 5rem; }
.report-indent-6 { margin-left: 6rem; }

.fms-report-pre {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    background: var(--bs-body-bg);
    max-height: 28rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.finance-report {
    --finance-bg-subtle: var(--bs-tertiary-bg);
    --finance-surface: var(--bs-body-bg);
    --finance-surface-alt: var(--bs-light-bg-subtle);
    --finance-border: var(--bs-border-color);
    --finance-text: var(--bs-body-color);
    --finance-text-muted: var(--bs-secondary-color);
    --finance-primary: var(--bs-primary);
    --finance-primary-soft: color-mix(in srgb, var(--bs-primary) 12%, transparent);
    --finance-danger: var(--bs-danger);
    --finance-danger-soft: color-mix(in srgb, var(--bs-danger) 14%, transparent);
    --finance-warning: var(--bs-warning);
    --finance-warning-soft: rgba(255, 193, 7, 0.16);
    --finance-success: var(--bs-success);
    --finance-success-soft: color-mix(in srgb, var(--bs-success) 14%, transparent);
    --finance-chip-bg: color-mix(in srgb, var(--bs-primary) 14%, transparent);
    --finance-chip-border: color-mix(in srgb, var(--bs-primary) 42%, var(--bs-border-color));
    --finance-chip-text: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color));
    --finance-success-text: color-mix(in srgb, var(--bs-success) 72%, #102715);
    --finance-warning-text: color-mix(in srgb, var(--bs-warning) 64%, #2e2000);
    --finance-danger-text: color-mix(in srgb, var(--bs-danger) 72%, #2f0a0d);
    --finance-table-head: color-mix(in srgb, var(--bs-body-color) 6%, var(--bs-body-bg));
    --finance-table-hover: color-mix(in srgb, var(--bs-primary) 7%, transparent);
    --finance-focus-ring: 0 0 0 .14rem color-mix(in srgb, var(--bs-primary) 28%, transparent);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-bs-theme="dark"] .finance-report {
    --finance-warning-soft: rgba(255, 193, 7, 0.18);
    --finance-table-head: color-mix(in srgb, var(--bs-body-color) 14%, var(--bs-body-bg));
    --finance-table-hover: color-mix(in srgb, var(--bs-primary) 18%, transparent);
    --finance-chip-bg: color-mix(in srgb, var(--bs-primary) 20%, transparent);
    --finance-chip-border: color-mix(in srgb, var(--bs-primary) 60%, var(--bs-border-color));
    --finance-chip-text: color-mix(in srgb, var(--bs-primary) 56%, #f8f9fa);
    --finance-success-text: color-mix(in srgb, var(--bs-success) 60%, #f8f9fa);
    --finance-warning-text: color-mix(in srgb, var(--bs-warning) 58%, #f8f9fa);
    --finance-danger-text: color-mix(in srgb, var(--bs-danger) 58%, #f8f9fa);
}

.finance-report-card {
    border: 1px solid var(--finance-border);
    background: var(--finance-surface);
    overflow: visible !important;
}

.finance-filter-toolbar {
    background: var(--finance-surface);
    position: static;
    top: auto;
    z-index: 1;
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 8%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 8%, transparent);
}

.finance-filter-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.finance-filter-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.015em;
}

.finance-help-icon {
    font-size: 0.75rem;
    color: var(--finance-text-muted);
    cursor: help;
    vertical-align: text-top;
    margin-inline-start: 0.3rem;
}

.finance-filter-subtitle {
    font-size: 0.74rem;
    color: var(--finance-text-muted);
    margin-top: 0.2rem;
}

.finance-filter-form .form-label-premium {
    font-size: 0.69rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--finance-text-muted);
}

.finance-filter-form .form-control,
.finance-filter-form .form-select,
.finance-filter-form .form-control-premium,
.finance-filter-form .form-select-premium {
    min-height: 2.15rem;
    font-size: 0.81rem;
}

.finance-filter-form .form-control:focus,
.finance-filter-form .form-select:focus,
.finance-filter-form .form-control-premium:focus,
.finance-filter-form .form-select-premium:focus {
    box-shadow: var(--finance-focus-ring);
}

.finance-filter-advanced {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--finance-border);
}

.finance-active-filters {
    margin-top: 0.75rem;
    padding: 0.58rem;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 8%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 78%, var(--bs-body-bg));
}

.finance-report.has-active-filters .finance-active-filters {
    border-color: color-mix(in srgb, var(--finance-primary) 34%, var(--finance-border));
}

.finance-active-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.finance-active-filters-title {
    font-size: 0.69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--finance-text-muted);
}

.finance-active-filters-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: var(--finance-primary);
    color: var(--bs-light);
    font-size: 0.62rem;
    font-weight: 700;
}

.finance-filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.finance-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    max-width: min(100%, 20rem);
    padding: 0.14rem 0.32rem 0.14rem 0.4rem;
    border: 1px solid var(--finance-chip-border);
    background: var(--finance-chip-bg);
    border-radius: 999px;
    font-size: 0.64rem;
    line-height: 1.2;
    color: var(--finance-chip-text);
}

.finance-filter-chip-label {
    font-weight: 600;
}

.finance-filter-chip-value {
    min-width: 0;
    max-width: 11rem;
}

.finance-filter-chip-remove {
    width: 0.95rem;
    height: 0.95rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--finance-primary) 28%, transparent);
    color: var(--finance-chip-text);
    font-size: 0.76rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}

.finance-filter-chip-remove:hover,
.finance-filter-chip-remove:focus-visible {
    background: color-mix(in srgb, var(--finance-primary) 40%, transparent);
    transform: scale(1.02);
    outline: none;
}

.finance-control-strip {
    border-top: 1px solid var(--finance-border);
    border-bottom: 1px solid var(--finance-border);
    background: var(--finance-surface);
}

.finance-control-cards {
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.finance-metric-card {
    padding: 0.62rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--finance-border);
    background: var(--finance-surface);
}

.finance-metric-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--finance-text-muted);
    line-height: 1.25;
}

.finance-metric-value {
    margin-top: 0.3rem;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.finance-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.finance-status-chip--success {
    background: color-mix(in srgb, var(--finance-success) 18%, transparent);
    border-color: color-mix(in srgb, var(--finance-success) 55%, var(--finance-border));
    color: var(--finance-success-text);
}

.finance-status-chip--warning {
    background: color-mix(in srgb, var(--finance-warning) 20%, transparent);
    border-color: color-mix(in srgb, var(--finance-warning) 56%, var(--finance-border));
    color: var(--finance-warning-text);
}

.finance-status-chip--danger {
    background: color-mix(in srgb, var(--finance-danger) 20%, transparent);
    border-color: color-mix(in srgb, var(--finance-danger) 56%, var(--finance-border));
    color: var(--finance-danger-text);
}

.finance-status-chip--info {
    background: color-mix(in srgb, var(--finance-primary) 16%, transparent);
    border-color: color-mix(in srgb, var(--finance-primary) 46%, var(--finance-border));
    color: var(--finance-chip-text);
}

.finance-hard-failure-strip {
    border-top: 1px solid var(--finance-border);
}

.finance-hard-failure-banner {
    border: 1px solid color-mix(in srgb, var(--finance-danger) 35%, var(--finance-border));
    background: var(--finance-surface);
    border-radius: 8px;
    padding: 0.72rem 0.86rem;
}

.finance-hard-failure-banner--warning {
    border-color: color-mix(in srgb, var(--finance-warning) 35%, var(--finance-border));
    background: var(--finance-surface);
}

.finance-hard-failure-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.18rem;
    letter-spacing: 0.04em;
}

.finance-hard-failure-text {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--finance-text);
}

.finance-table-wrap {
    position: relative;
    overflow: visible;
}

.finance-report-table {
    font-size: 0.8rem;
    color: var(--finance-text);
    line-height: 1.25;
}

.finance-report-table thead th {
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--finance-table-head) !important;
    color: var(--finance-text-muted);
    box-shadow: inset 0 -1px 0 var(--finance-border);
}

.finance-col-code {
    width: 9.5rem;
}

.finance-col-name {
    min-width: 20rem;
}

.finance-col-amount {
    width: 10rem;
}

.finance-report-table .finance-amt {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-weight: 600;
    white-space: nowrap;
}

.finance-report-table td.text-end,
.finance-report-table th.text-end {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.finance-report-table td,
.finance-report-table th {
    padding-top: .44rem;
    padding-bottom: .44rem;
    vertical-align: middle;
}

.finance-name-cell {
    max-width: 0;
}

.finance-name-cell .finance-account-link,
.finance-name-cell .fms-report-tree-label,
.finance-name-cell .finance-group-label {
    display: inline-block;
    max-width: min(44rem, 100%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.finance-report-table .finance-amt-neg {
    color: var(--finance-danger);
}

.finance-report-table .finance-amt-pos {
    color: var(--finance-success);
}

.account-statement-page .form-control-premium,
.account-statement-page .form-select-premium,
.account-statement-page .searchable-select .ss-trigger,
.account-statement-page .tpgc-searchable-select .ss-trigger {
    min-height: 2.02rem;
    font-size: 0.8rem;
}

.account-statement-page .statement-filter-actions-row {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    margin-top: 0.15rem;
    padding-top: 0.7rem;
}

.account-statement-page .statement-status-strip {
    background: color-mix(in srgb, var(--bs-tertiary-bg) 74%, var(--bs-body-bg));
}

.account-statement-page .statement-status-badge {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    padding: 0.18rem 0.46rem;
}

.account-statement-page .finance-label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
}

.account-statement-page .finance-metric-card--info {
    border-color: color-mix(in srgb, var(--finance-primary) 34%, var(--finance-border));
    background: color-mix(in srgb, var(--finance-primary) 8%, var(--finance-surface));
}

.account-statement-page .finance-metric-card--success {
    border-color: color-mix(in srgb, var(--finance-success) 34%, var(--finance-border));
    background: color-mix(in srgb, var(--finance-success) 10%, var(--finance-surface));
}

.account-statement-page .finance-metric-card--warning {
    border-color: color-mix(in srgb, var(--finance-warning) 42%, var(--finance-border));
    background: color-mix(in srgb, var(--finance-warning) 12%, var(--finance-surface));
}

.account-statement-page .finance-metric-card--danger {
    border-color: color-mix(in srgb, var(--finance-danger) 40%, var(--finance-border));
    background: color-mix(in srgb, var(--finance-danger) 12%, var(--finance-surface));
}

.account-statement-page .statement-section-divider {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
}

.journal-list-page .journal-control-overview,
.journal-detail-page .journal-control-overview {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    background: var(--finance-surface);
}

.journal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}

.journal-kpi-card {
    border: 1px solid var(--finance-border);
    border-radius: 8px;
    background: var(--finance-surface);
    padding: 0.56rem 0.66rem;
}

.journal-kpi-label {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--finance-text-muted);
}

.journal-kpi-value {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--finance-text);
    font-variant-numeric: tabular-nums;
}

.journal-kpi-sub {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    color: var(--finance-text-muted);
}

.journal-chip-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.journal-list-page .journal-table,
.journal-detail-page .journal-table,
.journal-detail-page .journal-audit-table {
    font-size: 0.8rem;
}

.journal-list-page .journal-table thead th,
.journal-detail-page .journal-table thead th,
.journal-detail-page .journal-audit-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--finance-table-head) !important;
}

.journal-table-head {
    background: color-mix(in srgb, var(--bs-tertiary-bg) 76%, var(--bs-body-bg));
}

.journal-memo-cell {
    max-width: 24rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journal-memo-block {
    border: 1px solid var(--finance-border);
    background: color-mix(in srgb, var(--bs-tertiary-bg) 64%, var(--bs-body-bg));
    color: var(--finance-text);
}

.journal-diff-chip {
    font-size: 0.78rem;
    font-weight: 700;
}

[data-bs-theme="dark"] .journal-table-head {
    background: color-mix(in srgb, var(--bs-secondary-bg) 74%, var(--bs-body-bg));
}

[data-bs-theme="dark"] .journal-memo-block {
    background: color-mix(in srgb, var(--bs-body-bg) 84%, var(--bs-secondary-bg));
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .journal-kpi-card {
    background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-secondary-bg));
}

.payment-list-page .payment-control-overview,
.payment-detail-page .payment-control-overview {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    background: var(--finance-surface);
}

.payment-list-page .payment-table,
.payment-detail-page .payment-table,
.payment-detail-page .payment-audit-table {
    font-size: 0.8rem;
}

.payment-list-page .payment-table thead th,
.payment-detail-page .payment-table thead th,
.payment-detail-page .payment-audit-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--finance-table-head) !important;
}

.payment-table-head {
    background: color-mix(in srgb, var(--bs-tertiary-bg) 76%, var(--bs-body-bg));
}

[data-bs-theme="dark"] .payment-table-head {
    background: color-mix(in srgb, var(--bs-secondary-bg) 74%, var(--bs-body-bg));
}

.voucher-list-page .voucher-control-overview,
.voucher-detail-page .voucher-control-overview,
.voucher-form-page .voucher-control-overview {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    background: var(--finance-surface);
}

.voucher-list-page .voucher-table,
.voucher-detail-page .voucher-table,
.voucher-form-page .voucher-table {
    font-size: 0.8rem;
}

.voucher-list-page .voucher-table thead th,
.voucher-detail-page .voucher-table thead th,
.voucher-form-page .voucher-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--finance-table-head) !important;
}

.voucher-form-page .voucher-table td,
.voucher-form-page .voucher-table th,
.voucher-list-page .voucher-table td,
.voucher-list-page .voucher-table th {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.voucher-form-page .voucher-table {
    table-layout: fixed;
}

.voucher-form-page .voucher-col-ledger { width: 27%; }
.voucher-form-page .voucher-col-description { width: 13%; }
.voucher-form-page .voucher-col-cost-center { width: 18%; }
.voucher-form-page .voucher-col-debit { width: 14%; }
.voucher-form-page .voucher-col-credit { width: 14%; }
.voucher-form-page .voucher-col-actions { width: 8%; }

.voucher-form-page .voucher-table [name$="-description"] {
    min-width: 8rem;
    max-width: 100%;
}

.voucher-form-page .voucher-table [name$="-debit"],
.voucher-form-page .voucher-table [name$="-credit"] {
    width: 100%;
    min-width: 9.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 991.98px) {
    .voucher-form-page .voucher-table {
        min-width: 74rem;
    }
}

.voucher-detail-page .detail-grid .label {
    color: var(--bs-secondary-color);
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.voucher-detail-page .detail-grid .value {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .voucher-list-page .voucher-control-overview,
[data-bs-theme="dark"] .voucher-detail-page .voucher-control-overview,
[data-bs-theme="dark"] .voucher-form-page .voucher-control-overview {
    background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-secondary-bg));
}

[data-bs-theme="dark"] .voucher-form-page .form-control-premium,
[data-bs-theme="dark"] .voucher-form-page .form-select-premium,
[data-bs-theme="dark"] .voucher-form-page .searchable-select .ss-trigger,
[data-bs-theme="dark"] .voucher-form-page .tpgc-searchable-select .ss-trigger {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.finance-code-link,
.finance-account-link {
    color: color-mix(in srgb, var(--finance-primary) 86%, var(--finance-text));
    cursor: pointer;
}

.is-drill-nav-pending {
    opacity: 0.72;
}

body.fms-drill-nav-loading::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bs-primary);
    z-index: 1080;
}

.finance-code-link:hover,
.finance-account-link:hover {
    color: var(--finance-primary);
    text-decoration: underline !important;
}

.finance-code-link:focus-visible,
.finance-account-link:focus-visible {
    outline: none;
    box-shadow: var(--finance-focus-ring);
    border-radius: 4px;
}

.finance-row-anomaly {
    background: color-mix(in srgb, var(--finance-warning) 12%, transparent);
}

.finance-row-section td {
    font-weight: 700;
    background: color-mix(in srgb, var(--finance-primary) 7%, transparent);
}

.finance-row-subsection td {
    font-weight: 600;
    background: color-mix(in srgb, var(--finance-primary) 4%, transparent);
}

.finance-group-label {
    color: var(--finance-text);
}

.finance-tfoot th,
.finance-tfoot td {
    background: color-mix(in srgb, var(--finance-primary) 10%, transparent) !important;
    border-top: 2px solid color-mix(in srgb, var(--finance-primary) 28%, var(--finance-border));
}

.finance-empty-state {
    max-width: 32rem;
    margin: 0 auto;
}

.finance-empty-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--finance-text);
}

.finance-empty-copy {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--finance-text-muted);
}

.finance-table-skeleton {
    display: none;
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--finance-surface) 80%, transparent);
    backdrop-filter: blur(1.3px);
    padding: 0.75rem;
    z-index: 4;
}

.finance-skeleton-line {
    height: 1.7rem;
    border-radius: 6px;
    margin-bottom: 0.42rem;
    background: linear-gradient(90deg, color-mix(in srgb, var(--finance-border) 68%, transparent) 25%, color-mix(in srgb, var(--finance-surface-alt) 85%, transparent) 40%, color-mix(in srgb, var(--finance-border) 68%, transparent) 60%);
    background-size: 220% 100%;
    animation: financeSkeletonPulse 1.2s infinite;
}

@keyframes financeSkeletonPulse {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.finance-report.is-loading .finance-table-skeleton {
    display: block;
}

.finance-report.is-loading .finance-table-wrap table {
    opacity: 0.35;
}

.finance-report .table-responsive {
    border-color: var(--finance-border);
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}

.finance-report .table-responsive .table {
    min-width: 100%;
}

.finance-report .table tbody tr {
    transition: background-color .15s ease, box-shadow .15s ease;
}

.finance-report .table tbody tr:hover {
    background: var(--finance-table-hover);
}

.finance-report .table thead th {
    transition: box-shadow .18s ease;
}

.finance-report .table-responsive:hover thead th {
    box-shadow: inset 0 -1px 0 var(--finance-border), 0 3px 0 color-mix(in srgb, var(--finance-primary) 15%, transparent);
}

[data-bs-theme="dark"] .account-statement-page .finance-filter-toolbar,
[data-bs-theme="dark"] .account-statement-page .finance-control-strip,
[data-bs-theme="dark"] .account-statement-page .statement-status-strip {
    background: color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-tertiary-bg));
}

[data-bs-theme="dark"] .account-statement-page .form-control-premium,
[data-bs-theme="dark"] .account-statement-page .form-select-premium,
[data-bs-theme="dark"] .account-statement-page .searchable-select .ss-trigger,
[data-bs-theme="dark"] .account-statement-page .tpgc-searchable-select .ss-trigger {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .account-statement-page .form-control-premium::placeholder {
    color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .account-statement-page .finance-report-table tr.table-secondary > * {
    background: color-mix(in srgb, var(--bs-secondary-bg) 70%, var(--bs-body-bg));
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .account-statement-page .finance-report-table tr.table-light > * {
    background: color-mix(in srgb, var(--bs-tertiary-bg) 72%, var(--bs-body-bg));
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .account-statement-page .finance-metric-card--info {
    background: color-mix(in srgb, var(--finance-primary) 16%, var(--finance-surface));
}

[data-bs-theme="dark"] .account-statement-page .finance-metric-card--success {
    background: color-mix(in srgb, var(--finance-success) 17%, var(--finance-surface));
}

[data-bs-theme="dark"] .account-statement-page .finance-metric-card--warning {
    background: color-mix(in srgb, var(--finance-warning) 18%, var(--finance-surface));
}

[data-bs-theme="dark"] .account-statement-page .finance-metric-card--danger {
    background: color-mix(in srgb, var(--finance-danger) 18%, var(--finance-surface));
}

[data-bs-theme="dark"] .fms-ui-upgraded .form-label,
[data-bs-theme="dark"] .fms-ui-upgraded .form-label-premium {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .fms-ui-upgraded .searchable-select .ss-empty,
[data-bs-theme="dark"] .fms-ui-upgraded .tpgc-searchable-select .ss-empty,
[data-bs-theme="dark"] .fms-ui-upgraded .dropdown-menu.ss-menu-panel .ss-empty,
[data-bs-theme="dark"] .fms-ui-upgraded .ss-portal-menu .ss-empty {
    background: color-mix(in srgb, var(--bs-warning) 15%, var(--bs-body-bg));
    border-color: color-mix(in srgb, var(--bs-warning) 35%, var(--bs-border-color));
    color: var(--bs-body-color) !important;
}

.finance-report [data-bs-toggle="tooltip"] {
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .finance-filter-header {
        align-items: stretch;
    }

    .finance-filter-actions {
        width: 100%;
    }

    .finance-filter-actions .btn {
        flex: 1 1 auto;
    }

    .finance-col-name {
        min-width: 15rem;
    }
}

.action-btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-form {
    width: 100%;
}

.input-group-search {
    flex-wrap: nowrap;
}

.search-form-control {
    min-width: 0;
}

.search-form-submit {
    min-width: 110px;
}

.table-search-hidden {
    display: none !important;
}

.fms-ui-upgraded .table-responsive {
    border-radius: 6px;
    border: 1px solid var(--bs-border-color);
    max-width: 100%;
}

.fms-ui-upgraded .table {
    margin-bottom: 0;
}

.fms-ui-upgraded .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bs-light-bg-subtle, #f8f9fa);
    border-bottom: 1px solid var(--bs-border-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.fms-ui-upgraded .table tbody td {
    font-size: 0.875rem;
}

.fms-ui-upgraded .table tbody tr {
    transition: background-color 0.12s ease;
}

.fms-ui-upgraded .table tbody tr:hover {
    background: rgba(var(--bs-primary-rgb, 31, 111, 120), 0.045);
}

.fms-ui-upgraded .table .action-col {
    white-space: nowrap;
    text-align: right;
}

.fms-ui-upgraded .table .action-col .btn-group {
    flex-wrap: nowrap;
}

.fms-ui-upgraded .ss-loading .ss-trigger {
    cursor: progress;
}

.fms-ui-upgraded .ss-loading .ss-trigger::after {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fms-lookup-spin 0.65s linear infinite;
}

@keyframes fms-lookup-spin {
    to {
        transform: rotate(360deg);
    }
}

.fms-ui-upgraded .container-fluid,
.fms-ui-upgraded .row,
.fms-ui-upgraded [class*="col-"],
.fms-ui-upgraded .card,
.fms-ui-upgraded .card-body,
.fms-ui-upgraded .card-header,
.fms-ui-upgraded .glass-card,
.fms-ui-upgraded .premium-form-section,
.fms-ui-upgraded .table-responsive {
    font-family: var(--font-sans) !important;
    overflow: visible;
}

.fms-ui-upgraded .bg-light.rounded,
.fms-ui-upgraded .glass-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--glass-shadow);
}

.fms-ui-upgraded .card.shadow-sm,
.fms-ui-upgraded .card.border-0.bg-light {
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    box-shadow: var(--glass-shadow) !important;
}

.fms-ui-upgraded .card.border-0.bg-light,
.fms-ui-upgraded .card-header.bg-light {
    background: var(--bs-light-subtle) !important;
}

.fms-ui-upgraded .card-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.fms-ui-upgraded .card-body,
.fms-ui-upgraded .card-header {
    padding: 1rem 1.25rem;
}

.fms-ui-upgraded .bg-light.rounded {
    border-radius: 2px;
}

.fms-ui-upgraded .btn.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    min-height: 48px;
}

.fms-ui-upgraded .icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    min-height: 3.5rem;
}

.fms-ui-upgraded .form-control-sm,
.fms-ui-upgraded .form-select-sm {
    min-height: calc(2.5rem + 2px);
    font-size: 0.95rem;
}

.fms-ui-upgraded form.row.g-3,
.fms-ui-upgraded .premium-form-section > .row.g-3,
.fms-ui-upgraded .premium-form-section > .row.g-4 {
    align-items: flex-start;
}

.fms-ui-upgraded .card-body form .row.g-3,
.fms-ui-upgraded .card-body form .row.g-4,
.fms-ui-upgraded .container-fluid.px-0 form .row.g-3,
.fms-ui-upgraded .container-fluid.px-0 form .row.g-4 {
    align-items: flex-start;
}

.fms-ui-upgraded form.row.g-3 > [class*='col-'],
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'],
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fms-ui-upgraded .card-body form .row.g-3 > [class*='col-'],
.fms-ui-upgraded .card-body form .row.g-4 > [class*='col-'],
.fms-ui-upgraded .container-fluid.px-0 form .row.g-3 > [class*='col-'],
.fms-ui-upgraded .container-fluid.px-0 form .row.g-4 > [class*='col-'] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .form-control,
.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .form-select,
.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .form-control-premium,
.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .form-select-premium,
.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .searchable-select,
.fms-ui-upgraded form.row.g-3 > [class*='col-'] > .tpgc-searchable-select,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .form-control,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .form-select,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .form-control-premium,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .form-select-premium,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .searchable-select,
.fms-ui-upgraded .premium-form-section > .row.g-3 > [class*='col-'] > .tpgc-searchable-select,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .form-control,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .form-select,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .form-control-premium,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .form-select-premium,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .searchable-select,
.fms-ui-upgraded .premium-form-section > .row.g-4 > [class*='col-'] > .tpgc-searchable-select {
    width: 100%;
}

.fms-ui-upgraded .card-body form .form-control,
.fms-ui-upgraded .card-body form .form-select,
.fms-ui-upgraded .card-body form .form-control-premium,
.fms-ui-upgraded .card-body form .form-select-premium,
.fms-ui-upgraded .card-body form .searchable-select,
.fms-ui-upgraded .card-body form .tpgc-searchable-select,
.fms-ui-upgraded .container-fluid.px-0 form .form-control,
.fms-ui-upgraded .container-fluid.px-0 form .form-select,
.fms-ui-upgraded .container-fluid.px-0 form .form-control-premium,
.fms-ui-upgraded .container-fluid.px-0 form .form-select-premium,
.fms-ui-upgraded .container-fluid.px-0 form .searchable-select,
.fms-ui-upgraded .container-fluid.px-0 form .tpgc-searchable-select {
    width: 100%;
}

.fms-ui-upgraded .fms-form-shell,
.fms-ui-upgraded .fms-form-shell .row,
.fms-ui-upgraded .fms-form-shell [class*='col-'],
.fms-ui-upgraded .list-controls-grid,
.fms-ui-upgraded .list-controls-grid .search-wrapper,
.fms-ui-upgraded .premium-form-section,
.fms-ui-upgraded .glass-card,
.fms-ui-upgraded .glass-card.overflow-hidden,
.fms-ui-upgraded .input-group,
.fms-ui-upgraded .input-group-search {
    overflow: visible;
}

.fms-ui-upgraded .searchable-select,
.fms-ui-upgraded .tpgc-searchable-select {
    position: relative;
    overflow: visible !important;
    width: 100%;
    z-index: 40;
}

.fms-ui-upgraded .searchable-select .dropdown-menu,
.fms-ui-upgraded .tpgc-searchable-select .dropdown-menu,
.fms-ui-upgraded .ss-portal-menu {
    min-width: max(100%, 18rem) !important;
    max-width: min(36rem, calc(100vw - 2rem)) !important;
    z-index: 2200 !important;
}

.fms-ui-upgraded .searchable-select .ss-empty,
.fms-ui-upgraded .tpgc-searchable-select .ss-empty,
.fms-ui-upgraded .dropdown-menu.ss-menu-panel .ss-empty,
.fms-ui-upgraded .ss-portal-menu .ss-empty {
    background: rgba(255, 243, 205, 0.72);
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 8px;
    color: #664d03 !important;
    font-family: var(--font-sans) !important;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    line-height: 1.24 !important;
    margin: 0.35rem !important;
    padding: 0.35rem 0.45rem !important;
    text-align: left !important;
}

.fms-ui-upgraded .searchable-select.is-invalid .ss-trigger,
.fms-ui-upgraded .tpgc-searchable-select.is-invalid .ss-trigger {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.12rem rgba(220, 53, 69, 0.12) !important;
}

.fms-ui-upgraded .list-controls-grid {
    gap: 1rem;
    align-items: center;
}

.fms-ui-upgraded .action-btn-group {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fms-ui-upgraded .premium-form-section .d-flex.gap-2,
.fms-ui-upgraded .premium-form-section .d-flex.gap-3,
.fms-ui-upgraded .glass-card .border-top .d-flex.gap-2,
.fms-ui-upgraded .glass-card .border-top .d-flex.gap-3 {
    flex-wrap: wrap;
}

.fms-ui-upgraded .search-wrapper,
.fms-ui-upgraded .search-form {
    width: 100%;
}

.fms-ui-upgraded .container-fluid.px-0 > .glass-card,
.fms-ui-upgraded .container-fluid.px-0 > .card,
.fms-ui-upgraded .container-fluid.px-0 > .row,
.fms-ui-upgraded .container-fluid.px-0 > .alert {
    margin-bottom: 1.5rem;
}

.fms-ui-upgraded .container-fluid.px-0 > :last-child {
    margin-bottom: 0;
}

.fms-ui-upgraded .form-label,
.fms-ui-upgraded .form-label-premium {
    font-weight: 600;
    color: #34495e;
}

.fms-ui-upgraded .form-control,
.fms-ui-upgraded .form-select,
.fms-ui-upgraded .form-control-premium,
.fms-ui-upgraded .form-select-premium,
.fms-ui-upgraded .searchable-select .ss-trigger,
.fms-ui-upgraded .tpgc-searchable-select .ss-trigger {
    min-height: 42px;
}

.fms-ui-upgraded textarea.form-control,
.fms-ui-upgraded textarea.form-control-premium {
    min-height: 96px;
}

.fms-ui-upgraded .fms-form-shell .row.g-4,
.fms-ui-upgraded .fms-form-shell .row.g-3 {
    align-items: flex-start;
}

.fms-ui-upgraded .fms-card-header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fms-ui-upgraded .fms-card-header-bar .btn,
.fms-ui-upgraded .fms-card-header-bar .action-btn-group {
    flex-shrink: 0;
}

.fms-ui-upgraded .fms-form-footer-bar {
    display: flex;
    justify-content: center;
}

.fms-ui-upgraded .fms-form-footer-bar .btn {
    min-width: min(100%, 18rem);
}

.fms-ui-upgraded .fms-check-col,
.fms-ui-upgraded .premium-form-section [class*='col-'].d-flex.align-items-end,
.fms-ui-upgraded .card-body form [class*='col-'].d-flex.align-items-end,
.fms-ui-upgraded .container-fluid.px-0 form [class*='col-'].d-flex.align-items-end {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-bottom: 0 !important;
}

.fms-ui-upgraded .fms-check-stack {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    margin-bottom: 0;
}

.fms-ui-upgraded .fms-check-stack .form-check-input {
    margin-top: 0;
    flex: 0 0 auto;
}

.fms-ui-upgraded .fms-check-stack .form-check-label {
    margin-bottom: 0;
}

.fms-ui-upgraded .table td code,
.fms-ui-upgraded .table th code {
    white-space: nowrap;
}

.fms-ui-upgraded .table td .badge,
.fms-ui-upgraded .table th .badge {
    white-space: normal;
}

.fms-ui-upgraded .fms-invoice-table {
    width: 100%;
    table-layout: fixed;
}

.fms-ui-upgraded .required-star {
    color: #dc3545;
    font-weight: 800;
    margin-left: 0.18rem;
}

.fms-ui-upgraded .invoice-filter-card {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    background: var(--finance-surface, var(--bs-body-bg));
}

.fms-ui-upgraded .invoice-filter-summary {
    align-items: center;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 78%, var(--bs-body-bg));
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.15rem;
}

.fms-ui-upgraded .invoice-filter-title {
    min-width: 0;
}

.fms-ui-upgraded .invoice-filter-title .fw-semibold {
    color: var(--bs-body-color);
    font-size: 1rem;
    line-height: 1.25;
}

.fms-ui-upgraded .invoice-filter-toggle {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    min-width: 10.75rem;
    justify-content: center;
}

.fms-ui-upgraded .invoice-filter-toggle .fa-chevron-down {
    transition: transform 0.16s ease;
}

.fms-ui-upgraded .invoice-filter-toggle:not(.collapsed) .fa-chevron-down {
    transform: rotate(180deg);
}

.fms-ui-upgraded .invoice-active-filters {
    align-items: center;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 70%, var(--bs-body-bg));
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem 1.15rem;
}

.fms-ui-upgraded .invoice-active-label {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fms-ui-upgraded .invoice-filter-panel {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    padding: 0;
}

.fms-ui-upgraded .invoice-filter-panel .form-label {
    color: var(--bs-secondary-color);
    margin-bottom: 0.35rem;
}

.fms-ui-upgraded .invoice-filter-panel .form-control,
.fms-ui-upgraded .invoice-filter-panel .form-select {
    min-height: 2.25rem;
}

.fms-ui-upgraded .invoice-filter-panel .form-control:focus,
.fms-ui-upgraded .invoice-filter-panel .form-select:focus {
    box-shadow: 0 0 0 0.16rem rgba(13, 110, 253, 0.14);
}

.fms-ui-upgraded .invoice-filter-group {
    padding: 1rem 1.15rem 1.15rem;
}

.fms-ui-upgraded .invoice-filter-group + .invoice-filter-group,
.fms-ui-upgraded .invoice-filter-actions {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
}

.fms-ui-upgraded .invoice-filter-group-title {
    color: var(--bs-body-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.fms-ui-upgraded .invoice-filter-actions {
    align-items: end;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 74%, var(--bs-body-bg));
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(16rem, 24rem) minmax(12rem, auto);
    justify-content: space-between;
    padding: 1rem 1.15rem;
}

.fms-ui-upgraded .invoice-filter-sort {
    min-width: 0;
}

.fms-ui-upgraded .invoice-filter-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.fms-ui-upgraded .invoice-filter-buttons .btn {
    min-width: 7rem;
}

.fms-ui-upgraded .invoice-table-wrap {
    overflow-x: visible;
}

.invoice-list-page .invoice-control-overview,
.invoice-detail-page .invoice-control-overview {
    border-top: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    background: var(--finance-surface);
}

.invoice-list-page .invoice-table,
.invoice-detail-page .invoice-table {
    font-size: 0.8rem;
}

.invoice-list-page .invoice-table thead th,
.invoice-detail-page .invoice-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--finance-table-head) !important;
}

.invoice-list-page .invoice-table td,
.invoice-list-page .invoice-table th {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.invoice-list-page .invoice-table .btn-group .btn {
    min-width: 2rem;
}

.invoice-detail-page .detail-grid .label {
    color: var(--bs-secondary-color);
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-detail-page .detail-grid .value {
    color: var(--bs-body-color);
}

.invoice-detail-page #grand-total-amt,
.invoice-detail-page #settlement-total-amt {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

[data-bs-theme="dark"] .invoice-list-page .invoice-control-overview,
[data-bs-theme="dark"] .invoice-detail-page .invoice-control-overview {
    background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-secondary-bg));
}

[data-bs-theme="dark"] .invoice-list-page .invoice-filter-summary,
[data-bs-theme="dark"] .invoice-list-page .invoice-filter-actions,
[data-bs-theme="dark"] .invoice-list-page .invoice-active-filters {
    background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-tertiary-bg));
}

.fms-ui-upgraded .fms-invoice-table th,
.fms-ui-upgraded .fms-invoice-table td {
    vertical-align: middle;
}

.fms-ui-upgraded .fms-invoice-table .invoice-col-select { width: 4%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-stream { width: 6%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-reference { width: 18%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-party { width: 19%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-date { width: 9%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-status { width: 10%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-amount { width: 11%; }
.fms-ui-upgraded .fms-invoice-table .invoice-col-actions { width: 10%; }

.fms-ui-upgraded .fms-table-reference,
.fms-ui-upgraded .fms-table-party {
    min-width: 0;
}

.fms-ui-upgraded .fms-table-reference [data-marquee-auto],
.fms-ui-upgraded .fms-table-party [data-marquee-auto] {
    display: block;
    max-width: 100%;
}

.fms-ui-upgraded .fms-options-loading .searchable-select .ss-trigger,
.fms-ui-upgraded .fms-options-loading .tpgc-searchable-select .ss-trigger,
.fms-ui-upgraded .fms-options-loading select {
    cursor: progress;
}

.fms-ui-upgraded .fms-invoice-form-page .form-text {
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1.35;
}

.fms-ui-upgraded .invoice-client-error {
    color: #b02a37;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0.35rem;
}

.fms-ui-upgraded .invoice-client-note {
    color: #8a6d1d;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0.35rem;
}

.fms-ui-upgraded .invoice-validation-summary {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.22);
    border-radius: 8px;
    color: #842029;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
}

.fms-ui-upgraded .invoice-async-banner {
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.32);
    border-radius: 8px;
    color: #664d03;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
}

.fms-ui-upgraded .invoice-async-banner__body {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.fms-ui-upgraded .invoice-async-banner__text {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .fms-ui-upgraded .fms-invoice-table th,
    .fms-ui-upgraded .fms-invoice-table td {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .fms-ui-upgraded .fms-invoice-table .invoice-col-reference,
    .fms-ui-upgraded .fms-invoice-table .invoice-col-party {
        width: auto;
    }
}

@media (max-width: 767.98px) {
    .fms-ui-upgraded .invoice-filter-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .fms-ui-upgraded .invoice-filter-toggle {
        width: 100%;
    }

    .fms-ui-upgraded .invoice-filter-actions {
        grid-template-columns: 1fr;
    }

    .fms-ui-upgraded .invoice-filter-buttons {
        justify-content: stretch;
    }

    .fms-ui-upgraded .invoice-filter-buttons .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .fms-ui-upgraded .invoice-table-wrap {
        overflow: visible;
    }

    .fms-ui-upgraded .fms-invoice-table,
    .fms-ui-upgraded .fms-invoice-table tbody,
    .fms-ui-upgraded .fms-invoice-table tr,
    .fms-ui-upgraded .fms-invoice-table td {
        display: block;
        width: 100%;
    }

    .fms-ui-upgraded .fms-invoice-table colgroup,
    .fms-ui-upgraded .fms-invoice-table thead {
        display: none;
    }

    .fms-ui-upgraded .fms-invoice-table tbody tr {
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 8px;
        margin: 0.75rem;
        padding: 0.45rem 0;
        background: var(--bs-body-bg, #fff);
    }

    .fms-ui-upgraded .fms-invoice-table tbody td {
        border: 0;
        display: grid;
        grid-template-columns: 7.5rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: center;
        padding: 0.4rem 0.85rem;
        text-align: left !important;
    }

    .fms-ui-upgraded .fms-invoice-table tbody td::before {
        content: attr(data-label);
        color: var(--bs-secondary-color, #6c757d);
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .fms-ui-upgraded .fms-invoice-table .invoice-empty-row td {
        display: block;
        text-align: center !important;
    }

    .fms-ui-upgraded .fms-invoice-table .invoice-empty-row td::before {
        content: none;
    }

    .fms-ui-upgraded .fms-invoice-table .btn-group {
        justify-content: flex-start;
    }
}

.fms-ui-upgraded form[enctype='multipart/form-data'] input[type='file'] {
    width: 100%;
}

.fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-input-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

.fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 42px;
}

.fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-trigger {
    flex: 0 0 auto;
}

.fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-name {
    min-width: 0;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.875rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cutover-tools-page .card.shadow-sm {
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    box-shadow: var(--glass-shadow);
}

.cutover-tools-page,
.cutover-tools-page .row,
.cutover-tools-page [class*="col-"] {
    overflow: visible;
}

.cutover-tools-page .card.shadow-sm > .card-body {
    padding: 1rem;
}

.cutover-toolbar-row,
.cutover-workspace {
    align-items: stretch;
}

.cutover-kpi-grid > [class*="col-"] {
    display: flex;
}

.cutover-kpi-grid .card.shadow-sm {
    width: 100%;
}

.cutover-section-card,
.cutover-import-column > .card.shadow-sm,
.cutover-readiness-card {
    overflow: visible;
}

.cutover-tools-page .card.shadow-sm h5,
.cutover-tools-page .card.shadow-sm h6 {
    color: var(--bs-primary);
}

.cutover-tools-page .card.shadow-sm form label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.35rem;
}

.cutover-tools-page .table-sm th,
.cutover-tools-page .table-sm td {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.cutover-tools-page .premium-form-section,
.cutover-tools-page form[enctype='multipart/form-data'],
.cutover-tools-page form[enctype='multipart/form-data'] .row,
.cutover-tools-page form[enctype='multipart/form-data'] [class*='col-'],
.cutover-tools-page .card-body {
    overflow: visible;
}

.cutover-tools-page form[enctype='multipart/form-data'] {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 0.25rem;
}

.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cutover-tools-page form[enctype='multipart/form-data'] > .d-flex.align-items-end,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'].d-flex.align-items-end {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.cutover-tools-page form[enctype='multipart/form-data'] > .cutover-dry-run-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    align-self: flex-start;
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    text-align: left;
}

.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-']:has(input[type='checkbox']) {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left;
}

.cutover-tools-page form[enctype='multipart/form-data'] > .d-flex.align-items-end > div,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'].d-flex.align-items-end > div,
.cutover-tools-page form[enctype='multipart/form-data'] > .cutover-dry-run-col > div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    max-width: 100%;
    text-align: left;
}

.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .form-control,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .form-select,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .form-control-premium,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .form-select-premium,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .searchable-select,
.cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] > .tpgc-searchable-select {
    width: 100%;
}

.cutover-tools-page form[enctype='multipart/form-data'] .searchable-select,
.cutover-tools-page form[enctype='multipart/form-data'] .tpgc-searchable-select {
    z-index: 20;
}

.cutover-tools-page form[enctype='multipart/form-data'] .searchable-select .dropdown-menu,
.cutover-tools-page form[enctype='multipart/form-data'] .tpgc-searchable-select .dropdown-menu,
.cutover-tools-page form[enctype='multipart/form-data'] .ss-portal-menu {
    max-width: min(36rem, calc(100vw - 2rem)) !important;
    z-index: 2100 !important;
}

.cutover-tools-page form[enctype='multipart/form-data'] .btn.form-select,
.cutover-tools-page form[enctype='multipart/form-data'] .ss-trigger {
    min-height: 42px !important;
    width: 100% !important;
}

.cutover-tools-page form[enctype='multipart/form-data'] .form-check {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.cutover-tools-page form[enctype='multipart/form-data'] .form-check label {
    margin-bottom: 0;
}

.cutover-tools-page .cutover-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-height: 42px;
    width: auto;
    max-width: 100%;
}

.cutover-tools-page form[enctype='multipart/form-data'] .cutover-checkbox-col {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left;
}

.cutover-tools-page .cutover-checkbox-input {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin: 0;
    pointer-events: auto;
}

.cutover-tools-page .cutover-checkbox-label {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.cutover-import-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-content: start;
}

.cutover-import-column > .card.shadow-sm {
    width: 100%;
}

.cutover-import-column > .glass-card:first-child {
    width: 100%;
}

.cutover-import-column > .card.shadow-sm .card-body > .d-flex {
    flex-wrap: wrap;
}

.cutover-import-column > .card.shadow-sm .btn-outline-secondary {
    flex-shrink: 0;
}

.cutover-readiness-card .card-body {
    padding: 1rem;
}

.cutover-tools-page {
    display: block;
}

.cutover-workspace-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cutover-launcher-card {
    position: relative;
    top: auto;
    z-index: 1;
    overflow: visible;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    background: var(--cutover-surface-strong);
}

.cutover-launcher-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.cutover-launcher-eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.cutover-tools-page {
    --cutover-surface: var(--bs-body-bg);
    --cutover-surface-alt: var(--bs-tertiary-bg);
    --cutover-surface-strong: var(--bs-body-bg);
    --cutover-border: var(--bs-border-color);
    --cutover-text: var(--bs-body-color);
    --cutover-text-muted: var(--bs-secondary-color);
    --cutover-shadow: 0 4px 14px rgba(15, 23, 42, 0.045);
    --cutover-primary-solid: var(--bs-primary);
    --cutover-primary-solid-hover: color-mix(in srgb, var(--bs-primary) 88%, black);
    --cutover-primary-soft: rgba(var(--bs-primary-rgb), 0.12);
    --cutover-primary-soft-border: rgba(var(--bs-primary-rgb), 0.28);
    --cutover-danger-soft: rgba(var(--bs-danger-rgb), 0.11);
    --cutover-danger-border: rgba(var(--bs-danger-rgb), 0.34);
    --cutover-warning-soft: rgba(var(--bs-warning-rgb), 0.16);
    --cutover-warning-border: rgba(var(--bs-warning-rgb), 0.42);
    --cutover-success-soft: rgba(var(--bs-success-rgb), 0.11);
    --cutover-success-border: rgba(var(--bs-success-rgb), 0.3);
    --cutover-info-soft: rgba(var(--bs-info-rgb), 0.12);
    --cutover-info-border: rgba(var(--bs-info-rgb), 0.32);
}

[data-bs-theme="dark"] .cutover-tools-page {
    --cutover-surface: var(--bs-body-bg);
    --cutover-surface-alt: rgba(255, 255, 255, 0.035);
    --cutover-surface-strong: rgba(255, 255, 255, 0.045);
    --cutover-border: rgba(255, 255, 255, 0.12);
    --cutover-text: var(--bs-body-color);
    --cutover-text-muted: rgba(255, 255, 255, 0.64);
    --cutover-shadow: none;
    --cutover-primary-soft: rgba(var(--bs-primary-rgb), 0.18);
    --cutover-primary-soft-border: rgba(var(--bs-primary-rgb), 0.36);
    --cutover-danger-soft: rgba(var(--bs-danger-rgb), 0.16);
    --cutover-danger-border: rgba(var(--bs-danger-rgb), 0.38);
    --cutover-warning-soft: rgba(var(--bs-warning-rgb), 0.18);
    --cutover-warning-border: rgba(var(--bs-warning-rgb), 0.42);
    --cutover-success-soft: rgba(var(--bs-success-rgb), 0.16);
    --cutover-success-border: rgba(var(--bs-success-rgb), 0.36);
    --cutover-info-soft: rgba(var(--bs-info-rgb), 0.16);
    --cutover-info-border: rgba(var(--bs-info-rgb), 0.36);
}

.cutover-launcher-statuses,
.cutover-chip-bar,
.cutover-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cutover-launcher-body {
    margin-top: 0;
}

.cutover-launcher-control {
    height: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--cutover-border);
    border-radius: 1rem;
    background: var(--cutover-surface-strong);
}

.cutover-launcher-control-head {
    margin-bottom: 0.65rem;
}

.cutover-launcher-unified-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 0.9rem;
    align-items: stretch;
}

.cutover-launcher-field-group {
    min-width: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.9rem;
    background: var(--cutover-surface);
}

.cutover-launcher-field-group-focus {
    display: flex;
}

.cutover-launcher-field-group-focus .cutover-active-panel {
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.cutover-launcher-field-head {
    margin-bottom: 0.55rem;
}

.cutover-launcher-field-title {
    margin-bottom: 0.18rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cutover-text);
}

.cutover-launcher-field-text {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--cutover-text-muted);
}

.cutover-launcher-control-title {
    margin-bottom: 0.2rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cutover-text);
}

.cutover-launcher-control-text {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--cutover-text-muted);
}

.cutover-launcher-filter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: stretch;
}

.cutover-launcher-actions {
    min-width: 260px;
}

.cutover-picker {
    position: relative;
}

.cutover-picker-input-wrap {
    position: relative;
}

.cutover-picker-input-wrap .form-control {
    padding-right: 3rem;
}

.cutover-picker-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    min-width: 2.2rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.8rem;
}

.cutover-picker-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 14;
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--cutover-border);
    border-radius: 1rem;
    background: var(--cutover-surface-strong);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

.cutover-picker-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0.75rem 0.8rem;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    text-align: left;
    color: inherit;
}

.cutover-picker-option:hover {
    background: var(--cutover-primary-soft);
}

.cutover-picker-option-title {
    font-weight: 700;
    color: var(--cutover-text);
}

.cutover-picker-option-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--cutover-text-muted);
}

.cutover-picker-empty {
    padding: 0.85rem;
    border-radius: 0.85rem;
    background: var(--cutover-surface);
    color: var(--cutover-text-muted);
    font-size: 0.88rem;
}

.cutover-active-panel {
    height: 100%;
    min-height: 100px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--cutover-border);
    border-radius: 1rem;
    background: var(--cutover-surface-strong);
}

.cutover-active-panel-label {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cutover-text-muted);
}

.cutover-active-panel-title {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cutover-text);
}

.cutover-active-panel .small.text-muted {
    line-height: 1.45;
}

.cutover-dashboard-card {
    height: 100%;
    border: 1px solid var(--cutover-border);
    background: var(--cutover-surface-strong);
    box-shadow: none;
}

.cutover-control-center-card {
    border: 1px solid var(--cutover-border);
    background: var(--cutover-surface-strong);
    border-radius: 0.625rem;
    box-shadow: var(--cutover-shadow);
}

.cutover-control-is-loading .cutover-control-center-card {
    cursor: progress;
}

.cutover-control-is-loading .cutover-control-center-card .btn,
.cutover-control-is-loading .cutover-control-center-card .form-control,
.cutover-control-is-loading .cutover-control-center-card .form-select {
    opacity: 0.72;
}

.cutover-control-center-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cutover-border);
}

.cutover-control-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.cutover-control-kpi-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-height: 9.25rem;
    padding: 0.82rem 0.86rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.58rem;
    background: var(--cutover-surface);
    color: var(--cutover-text);
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cutover-control-kpi-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.32rem;
    content: "";
    background: var(--bs-primary);
}

.cutover-control-kpi-card:hover {
    color: var(--cutover-text);
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    transform: translateY(-1px);
    box-shadow: var(--cutover-shadow);
}

.cutover-control-kpi-card.is-active,
.cutover-action-bucket.is-active {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.cutover-control-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.cutover-control-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    color: var(--bs-primary);
    background: var(--cutover-primary-soft);
}

.cutover-control-kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cutover-text-muted);
}

.cutover-control-kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--cutover-text);
}

.cutover-control-kpi-text,
.cutover-control-kpi-link {
    font-size: 0.82rem;
    line-height: 1.45;
}

.cutover-control-kpi-text {
    color: var(--cutover-text-muted);
}

.cutover-control-kpi-link {
    color: var(--bs-primary);
    font-weight: 600;
}

.cutover-control-panel {
    padding: 0.9rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.625rem;
    background: var(--cutover-surface);
}

.cutover-control-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.cutover-control-panel-head h6,
.cutover-control-center-head h5 {
    color: var(--cutover-text);
}

.cutover-action-queue {
    display: grid;
    gap: 0.7rem;
}

.cutover-action-bucket {
    position: relative;
    overflow: hidden;
    padding: 0.78rem 0.85rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.58rem;
    background: var(--cutover-surface-strong);
}

.cutover-action-bucket::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.28rem;
    content: "";
    background: var(--bs-primary);
}

.cutover-action-bucket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.cutover-action-bucket-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--cutover-text);
}

.cutover-action-bucket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.cutover-action-bucket-text {
    font-size: 0.88rem;
    color: var(--cutover-text);
    line-height: 1.45;
}

.cutover-action-bucket-note,
.cutover-filter-summary,
.cutover-governance-note {
    margin-top: 0.5rem;
    margin-bottom: 0.65rem;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.5rem;
    background: var(--cutover-surface-alt);
    color: var(--cutover-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.cutover-governance-note {
    margin: 0 0 0.85rem;
    border-color: var(--cutover-info-border);
    background: var(--cutover-info-soft);
    color: var(--cutover-text);
}

.cutover-status-danger {
    border-color: var(--cutover-danger-border);
    background: var(--cutover-surface-strong);
}

.cutover-status-danger::before {
    background: var(--bs-danger);
}

.cutover-status-danger .cutover-control-kpi-icon {
    color: var(--bs-danger);
    background: var(--cutover-danger-soft);
}

.cutover-status-warning {
    border-color: var(--cutover-warning-border);
    background: var(--cutover-surface-strong);
}

.cutover-status-warning::before {
    background: var(--bs-warning);
}

.cutover-status-warning .cutover-control-kpi-icon {
    color: color-mix(in srgb, var(--bs-warning) 72%, black);
    background: var(--cutover-warning-soft);
}

.cutover-status-success {
    border-color: var(--cutover-success-border);
    background: var(--cutover-surface-strong);
}

.cutover-status-success::before {
    background: var(--bs-success);
}

.cutover-status-success .cutover-control-kpi-icon {
    color: var(--bs-success);
    background: var(--cutover-success-soft);
}

.cutover-status-info {
    border-color: var(--cutover-info-border);
    background: var(--cutover-surface-strong);
}

.cutover-status-info::before {
    background: var(--bs-info);
}

.cutover-dashboard-card.cutover-status-danger,
.cutover-dashboard-card.cutover-status-warning,
.cutover-dashboard-card.cutover-status-success,
.cutover-dashboard-card.cutover-status-info {
    position: relative;
    overflow: hidden;
}

.cutover-dashboard-card.cutover-status-danger::before,
.cutover-dashboard-card.cutover-status-warning::before,
.cutover-dashboard-card.cutover-status-success::before,
.cutover-dashboard-card.cutover-status-info::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.3rem;
    content: "";
}

.cutover-severity-pill,
.cutover-neutral-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    width: fit-content;
    padding: 0.26rem 0.55rem;
    border: 1px solid var(--cutover-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cutover-neutral-pill {
    background: var(--cutover-surface);
    color: var(--cutover-text-muted);
    text-transform: none;
    letter-spacing: 0;
}

.cutover-severity-danger {
    border-color: var(--cutover-danger-border);
    background: var(--cutover-danger-soft);
    color: var(--bs-danger);
}

.cutover-severity-warning {
    border-color: var(--cutover-warning-border);
    background: var(--cutover-warning-soft);
    color: color-mix(in srgb, var(--bs-warning) 68%, black);
}

.cutover-severity-success {
    border-color: var(--cutover-success-border);
    background: var(--cutover-success-soft);
    color: var(--bs-success);
}

.cutover-severity-info {
    border-color: var(--cutover-info-border);
    background: var(--cutover-info-soft);
    color: var(--bs-info-text-emphasis);
}

.cutover-command-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.72rem;
    margin-bottom: 0.85rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.58rem;
}

.cutover-command-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: var(--cutover-surface-strong);
}

.cutover-command-alert-title {
    margin-bottom: 0.18rem;
    font-weight: 800;
    color: var(--cutover-text);
}

.cutover-command-alert-text {
    color: var(--cutover-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.cutover-command-alert-danger {
    border-color: var(--cutover-danger-border);
    background: var(--cutover-danger-soft);
}

.cutover-command-alert-danger .cutover-command-alert-icon {
    color: var(--bs-danger);
}

.cutover-command-alert-warning {
    border-color: var(--cutover-warning-border);
    background: var(--cutover-warning-soft);
}

.cutover-command-alert-warning .cutover-command-alert-icon {
    color: color-mix(in srgb, var(--bs-warning) 72%, black);
}

.cutover-command-alert-success {
    border-color: var(--cutover-success-border);
    background: var(--cutover-success-soft);
}

.cutover-command-alert-success .cutover-command-alert-icon {
    color: var(--bs-success);
}

.cutover-command-alert-info {
    border-color: var(--cutover-info-border);
    background: var(--cutover-info-soft);
}

.cutover-command-alert-info .cutover-command-alert-icon {
    color: var(--bs-info);
}

.cutover-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--cutover-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.cutover-checkbox-row input {
    margin: 0;
}

.cutover-control-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
}

.cutover-control-table {
    border-collapse: separate;
    border-spacing: 0;
}

.cutover-control-table thead th {
    border-bottom: 1px solid var(--cutover-border);
    background: var(--cutover-surface-strong);
    color: var(--cutover-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cutover-control-table tbody tr {
    transition: background-color 0.14s ease;
}

.cutover-control-table tbody tr:hover {
    background: var(--cutover-primary-soft);
}

.cutover-focus-pulse > .cutover-control-panel,
.cutover-focus-pulse.cutover-control-panel {
    animation: cutoverFocusPulse 1.15s ease;
}

@keyframes cutoverFocusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.24);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(var(--bs-primary-rgb), 0);
    }
}

.cutover-empty-state-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--cutover-success-border);
    border-radius: 999px;
    background: var(--cutover-success-soft);
    color: var(--bs-success);
    font-weight: 700;
}

.cutover-action-button {
    box-shadow: none;
}

.cutover-governed-action-stack {
    display: grid;
    gap: 0.75rem;
}

.cutover-inline-form {
    margin: 0;
}

.cutover-governed-preview {
    padding: 0.85rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.625rem;
    background: var(--cutover-surface-strong);
}

.cutover-governed-preview-applied {
    border-color: var(--cutover-success-border);
}

.cutover-result-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding: 0.66rem 0.74rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.5rem;
    font-size: 0.84rem;
    line-height: 1.35;
}

.cutover-result-banner i {
    margin-top: 0.15rem;
}

.cutover-result-banner strong,
.cutover-result-banner span {
    display: block;
}

.cutover-result-success {
    border-color: var(--cutover-success-border);
    background: var(--cutover-success-soft);
    color: var(--bs-success);
}

.cutover-result-warning {
    border-color: var(--cutover-warning-border);
    background: var(--cutover-warning-soft);
    color: color-mix(in srgb, var(--bs-warning) 68%, black);
}

.cutover-result-info {
    border-color: var(--cutover-info-border);
    background: var(--cutover-info-soft);
    color: var(--bs-info-text-emphasis);
}

.cutover-governed-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.cutover-governed-preview-grid div {
    padding: 0.68rem 0.72rem;
    border: 1px solid var(--cutover-border);
    border-radius: 0.55rem;
    background: var(--cutover-surface-alt);
}

.cutover-governed-preview-grid span {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cutover-text-muted);
}

.cutover-governed-preview-grid strong {
    font-size: 1rem;
    color: var(--cutover-text);
}

.cutover-dashboard-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.cutover-dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.65rem;
    background: var(--cutover-surface-strong);
    border: 1px solid var(--cutover-border);
    font-size: 1rem;
}

.cutover-dashboard-metric {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--cutover-text);
    margin-bottom: 0.35rem;
}

.cutover-dashboard-metric-sm {
    font-size: 1.05rem;
    line-height: 1.35;
}

.cutover-chip-bar {
    align-items: center;
    margin-top: 0.15rem;
}

.cutover-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--cutover-border);
    border-radius: 999px;
    background: var(--cutover-surface);
    color: var(--cutover-text);
    font-weight: 600;
    box-shadow: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cutover-chip-counts {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.1rem;
}

.cutover-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
}

.cutover-chip-count-active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.2);
    color: #166534;
}

.cutover-chip-count-pending {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.2);
    color: #b45309;
}

[data-bs-theme="dark"] .cutover-chip-count-active {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

[data-bs-theme="dark"] .cutover-chip-count-pending {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.cutover-chip i {
    color: var(--bs-primary);
    transition: color 0.16s ease;
}

.cutover-chip:hover,
.cutover-chip.is-active {
    color: var(--bs-primary);
    background: var(--cutover-primary-soft);
    border-color: var(--cutover-primary-soft-border);
}

.cutover-chip.is-active,
.cutover-chip[aria-pressed="true"] {
    color: #ffffff;
    background: var(--cutover-primary-solid);
    border-color: var(--cutover-primary-solid);
    box-shadow: none;
}

.cutover-chip.is-active i,
.cutover-chip[aria-pressed="true"] i {
    color: #ffffff;
}

.cutover-chip.is-active .cutover-chip-count-active,
.cutover-chip[aria-pressed="true"] .cutover-chip-count-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.cutover-chip.is-active .cutover-chip-count-pending,
.cutover-chip[aria-pressed="true"] .cutover-chip-count-pending {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.cutover-chip.is-active:hover,
.cutover-chip[aria-pressed="true"]:hover {
    color: #ffffff;
    background: var(--cutover-primary-solid-hover);
    border-color: var(--cutover-primary-solid-hover);
    transform: translateY(-1px);
}

.cutover-filter-bar .btn {
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cutover-filter-bar .btn.active,
.cutover-filter-bar .btn[aria-pressed="true"] {
    color: var(--bs-white);
    background: var(--cutover-primary-solid);
    border-color: var(--cutover-primary-solid);
    box-shadow: none;
}

.cutover-filter-bar .btn.active:hover,
.cutover-filter-bar .btn[aria-pressed="true"]:hover {
    color: var(--bs-white);
    background: var(--cutover-primary-solid-hover);
    border-color: var(--cutover-primary-solid-hover);
    transform: translateY(-1px);
}

.cutover-section-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.cutover-section-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--cutover-border);
    border-radius: 1rem;
    background: var(--cutover-surface-strong);
    text-align: left;
    color: inherit;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cutover-section-summary-card:hover {
    border-color: var(--cutover-primary-soft-border);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.cutover-section-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.9rem;
    background: var(--cutover-primary-soft);
    color: var(--bs-primary);
    flex-shrink: 0;
}

.cutover-section-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.cutover-section-summary-title {
    font-weight: 700;
    color: var(--cutover-text);
}

.cutover-section-summary-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--cutover-text-muted);
}

.cutover-section-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cutover-badge-tooltip {
    position: relative;
    cursor: help;
}

.cutover-badge-tooltip::after {
    content: none;
}

.cutover-badge-tooltip::before {
    content: none;
}

.cutover-workspace {
    display: block;
}

.cutover-import-column {
    min-width: 0;
}

.cutover-readiness-card,
.cutover-section-card,
.cutover-launcher-card,
.cutover-dashboard-card,
.cutover-module-section,
.cutover-module {
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.cutover-section-card .card-body,
.cutover-readiness-card .card-body {
    padding: 1rem;
}

.cutover-toolbar-row .glass-card,
.cutover-dashboard-row .glass-card,
.cutover-toolbar-row .card.shadow-sm {
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.cutover-kpi-grid .card.shadow-sm .card-body {
    padding: 0.75rem 0.85rem;
}

.cutover-kpi-grid p {
    font-size: 0.74rem;
}

.cutover-section-card,
.cutover-readiness-card,
.cutover-control-center-card,
.cutover-launcher-card,
.cutover-dashboard-row,
.cutover-toolbar-row {
    scroll-margin-top: 5.5rem;
}

[data-bs-theme="dark"] .cutover-control-center-card,
[data-bs-theme="dark"] .cutover-control-panel,
[data-bs-theme="dark"] .cutover-control-kpi-card,
[data-bs-theme="dark"] .cutover-action-bucket,
[data-bs-theme="dark"] .cutover-governed-preview,
[data-bs-theme="dark"] .cutover-dashboard-card {
    background: var(--cutover-surface-strong);
    border-color: var(--cutover-border);
}

[data-bs-theme="dark"] .cutover-neutral-pill,
[data-bs-theme="dark"] .cutover-command-alert-icon,
[data-bs-theme="dark"] .cutover-dashboard-icon,
[data-bs-theme="dark"] .cutover-governed-preview-grid div,
[data-bs-theme="dark"] .cutover-action-bucket-note,
[data-bs-theme="dark"] .cutover-filter-summary,
[data-bs-theme="dark"] .cutover-governance-note {
    background: var(--cutover-surface-alt);
    border-color: var(--cutover-border);
}

[data-bs-theme="dark"] .cutover-control-table {
    color: var(--cutover-text);
}

[data-bs-theme="dark"] .cutover-control-table thead th {
    background: var(--cutover-surface-alt);
    border-color: var(--cutover-border);
    color: var(--cutover-text-muted);
}

[data-bs-theme="dark"] .cutover-control-table td,
[data-bs-theme="dark"] .cutover-control-table th {
    border-color: var(--cutover-border);
}

[data-bs-theme="dark"] .cutover-control-table tbody tr:hover {
    background: rgba(var(--bs-primary-rgb), 0.12);
}

[data-bs-theme="dark"] .cutover-launcher-statuses .badge.bg-light,
[data-bs-theme="dark"] .cutover-dashboard-card .badge.bg-light {
    background: var(--cutover-surface-alt) !important;
    border-color: var(--cutover-border) !important;
    color: var(--cutover-text) !important;
}

.cutover-section-groups {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
}

.cutover-workspace-ready .cutover-section-groups {
    display: flex;
}

.cutover-workspace-ready .cutover-module-staging {
    display: none;
}

.cutover-workspace-empty-state {
    border: 1px dashed rgba(148, 163, 184, 0.3);
    background: var(--cutover-surface-strong);
}

.cutover-empty-title {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cutover-text);
}

.cutover-module-section {
    overflow: hidden;
    align-items: start;
    scroll-margin-top: 5.5rem;
}

.cutover-module-section .premium-form-section {
    padding: 1rem;
}

.cutover-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.cutover-section-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

.cutover-section-isolated {
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.08);
}

.cutover-module {
    scroll-margin-top: 6rem;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cutover-module .card-body {
    padding: 0.85rem 0.9rem;
}

.cutover-module.is-current {
    border-color: rgba(var(--bs-primary-rgb), 0.22);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
}

.cutover-module-summary {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(52, 73, 94, 0.12);
}

.cutover-module-summary-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cutover-module-toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
}

.cutover-module-toggle-icon-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.8rem;
    background: var(--cutover-primary-soft);
    color: var(--bs-primary);
    flex-shrink: 0;
}

.cutover-module-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.cutover-module-toggle-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

.cutover-module-toggle-helper {
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
    line-height: 1.45;
}

.cutover-module-toggle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cutover-module-summary-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cutover-module-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid rgba(52, 73, 94, 0.14);
    border-radius: 999px;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.cutover-module.is-open .cutover-module-toggle-icon {
    transform: rotate(180deg);
}

.cutover-module-content {
    display: block;
}

.cutover-module:not(.is-open) .cutover-module-content {
    display: none;
}

.cutover-module-content .table-responsive {
    border: 1px solid rgba(52, 73, 94, 0.08);
    border-radius: 0.8rem;
}

.cutover-module-content table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
}

.cutover-module-content .alert {
    border-radius: 0.8rem;
}

.cutover-batch-error-details {
    min-width: 12rem;
}

.cutover-batch-error-details summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    list-style: none;
}

.cutover-batch-error-details summary::-webkit-details-marker {
    display: none;
}

.cutover-batch-error-details[open] summary {
    margin-bottom: 0.15rem;
}

.cutover-batch-error-details ul,
.cutover-batch-error-details div {
    color: var(--cutover-text);
}

.cutover-module.table-search-hidden {
    display: none;
}

@media (max-width: 767.98px) {
    .list-controls-grid {
        grid-template-columns: 1fr auto; /* Keep side-by-side where possible */
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .search-wrapper {
        max-width: none;
    }

    .cutover-chip-bar,
    .cutover-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .cutover-chip,
    .cutover-filter-bar .btn {
        white-space: nowrap;
    }

    .cutover-launcher-filter-layout {
        grid-template-columns: 1fr;
    }

    .cutover-control-pagination,
    .cutover-control-center-head,
    .cutover-action-bucket-head {
        flex-direction: column;
    }

    .cutover-launcher-actions {
        min-width: 0;
    }

    .cutover-launcher-head,
    .cutover-dashboard-card-head,
    .cutover-section-header,
    .cutover-module-summary-main,
    .cutover-module-toggle {
        flex-direction: column;
    }

    .cutover-picker-menu {
        position: static;
        margin-top: 0.45rem;
        max-height: 18rem;
    }

    .cutover-section-summary-grid {
        grid-template-columns: 1fr;
    }

    .cutover-module-summary-actions {
        width: 100%;
    }

    .cutover-launcher-unified-grid {
        grid-template-columns: 1fr;
    }

    .cutover-governed-preview-grid {
        grid-template-columns: 1fr;
    }

    .cutover-control-kpi-grid {
        grid-template-columns: 1fr;
    }

    .cutover-control-kpi-card {
        min-height: auto;
    }
}

@media (max-width: 1199.98px) {
    .cutover-control-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cutover-launcher-unified-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cutover-launcher-field-group-focus {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .list-controls-grid {
        grid-template-columns: 1fr; /* Stack on very small screens */
    }
    .action-btn-group {
        justify-content: flex-end;
    }
}

/* Premium compact buttons for mobile tables */
@media (max-width: 767.98px) {
    .action-col .btn {
        padding: 0.25rem 0.45rem !important;
        font-size: 0.75rem !important;
    }
}

/* Highlight Audit Animation */
@keyframes highlight-audit {
    0% { background-color: var(--bs-primary-bg-subtle); }
    100% { background-color: transparent; }
}

.highlight-audit {
    animation: highlight-audit 2s ease-out;
}

/* Form Section - Clean Bootstrap styling */
.premium-form-section {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.sop-entry-btn {
  min-height: 2.25rem;
  padding-inline: 0.95rem;
  border-width: 1px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sop-entry-btn:hover,
.sop-entry-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(46, 49, 146, 0.12);
}

.sop-entry-btn i {
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .sop-entry-btn {
    min-width: 2.1rem;
    min-height: 2.1rem;
    padding-inline: 0.5rem;
    gap: 0 !important;
    justify-content: center;
  }

  .sop-entry-btn .d-none.d-lg-inline,
  .sop-entry-btn span:not([class]) {
    display: none !important;
  }

  .sop-entry-btn i {
    margin: 0 !important;
    font-size: 0.95rem;
  }
}

.sop-modal-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2e3192;
  margin-bottom: 0.35rem;
}

.sop-sheet {
  --bs-offcanvas-width: min(680px, 100vw) !important;
  width: min(680px, 100vw) !important;
  max-width: 100vw !important;
  height: 100vh !important;
  border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #111827 !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.18) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, scroll-position;
  z-index: 1056 !important;
}

.sop-sheet-header {
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: linear-gradient(180deg, rgba(46, 49, 146, 0.06) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
}

.sop-sheet-heading-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sop-sheet-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(46, 49, 146, 0.12) 0%, rgba(46, 49, 146, 0.04) 100%);
  color: #2e3192;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(46, 49, 146, 0.08);
}

.sop-sheet-body {
  padding: 1.5rem !important;
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  display: block !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: translateZ(0);
}

.sop-sheet-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sop-sheet-intro-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.2rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
}

.sop-sheet-intro-item i {
  color: #2e3192;
}

.sop-sheet.offcanvas-end {
  right: 0 !important;
}

.sop-sheet.show,
.sop-sheet.showing,
.sop-sheet.hiding {
  visibility: visible !important;
}

.sop-sheet .btn-close {
  opacity: 1 !important;
}

.sop-panel {
  height: 100%;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.sop-panel-accent {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(46, 49, 146, 0.03) 100%);
}

.sop-panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #1f2937;
}

.sop-panel-list {
  display: grid;
  gap: 0.95rem;
}

.sop-panel-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.sop-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(46, 49, 146, 0.08);
  color: #2e3192;
  flex-shrink: 0;
}

.sop-panel-item-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.15rem;
}

.sop-panel-item-copy {
  font-size: 0.92rem;
  color: #6b7280;
  line-height: 1.55;
}

.sop-step-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #4b5563;
}

.sop-step-list li + li {
  margin-top: 0.8rem;
}

.sop-step-list li::marker {
  font-weight: 700;
  color: #2e3192;
}

.sop-doc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(46, 49, 146, 0.08);
  color: #2e3192;
  font-size: 0.82rem;
  font-weight: 700;
}

.sop-doc-card {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sop-doc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 49, 146, 0.18);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.sop-doc-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  padding: 1.25rem;
}

.sop-doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.sop-doc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(46, 49, 146, 0.08);
  color: #2e3192;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sop-doc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #f8fafc;
  color: #374151;
  font-size: 0.76rem;
  font-weight: 700;
}

.sop-doc-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.sop-doc-title {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.sop-doc-copy {
  margin-bottom: 0;
  color: #6b7280;
  line-height: 1.55;
}

.sop-doc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sop-doc-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 32rem;
}

.sop-doc-note i {
  color: #198754;
  margin-top: 0.1rem;
}

.sop-action-btn {
  min-width: 8.25rem;
  justify-content: center;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sop-action-btn:hover,
.sop-action-btn:focus-visible {
  transform: translateY(-1px);
}

.sop-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.sop-sheet .card,
.sop-sheet .sop-doc-card,
.sop-sheet .sop-panel {
  opacity: 1 !important;
}

@media (max-width: 767.98px) {
  .sop-sheet-header,
  .sop-sheet-body {
    padding-inline: 1rem;
  }

  .sop-sheet-heading-row {
    align-items: flex-start;
  }

  .sop-doc-card-body,
  .sop-panel {
    padding: 1rem;
  }

  .sop-doc-card-footer {
    align-items: stretch;
  }

  .sop-action-btn {
    width: 100%;
  }

  .sop-sheet-footer {
    align-items: stretch;
  }
}

.premium-form-section > .row {
    --bs-gutter-x: 1rem;
}

.premium-form-section .mb-3,
.premium-form-section .mb-2 {
    margin-bottom: 0.75rem !important;
}

.premium-form-section .form-label,
.premium-form-section .form-label-premium {
    margin-bottom: 0.35rem;
}

.premium-form-section:last-child {
    border-bottom: none;
}

/* Form Title - Standard Bootstrap heading */
.premium-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 1rem;
}

/* Form Labels - NOW in forms.css */
/* .form-label-premium moved to static/css/forms.css */

/* Form Controls - NOW in forms.css */
/* .form-control-premium moved to static/css/forms.css */

/* Operations Console log viewer: preserve traceback indentation and line breaks */
.log-message-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Detail View Enhancements */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.detail-item .label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bs-secondary);
    margin-bottom: 0.25rem;
}

.detail-item .value {
    font-weight: 600;
    color: var(--bs-body-color);
}

.list-filter-accordion,
.list-filter-accordion .list-filter-card,
.list-filter-accordion .accordion-collapse,
.list-filter-accordion .list-filter-body,
.list-filter-accordion .list-filter-form {
    overflow: visible !important;
}

/* Payroll employee profile filter dropdown layering fix */
.employee-profile-filter-shell {
    position: relative;
    z-index: 30;
    overflow: visible !important;
}

.employee-profile-filter-shell .list-filter-accordion,
.employee-profile-filter-shell .accordion-collapse,
.employee-profile-filter-shell .list-filter-body,
.employee-profile-filter-shell .searchable-select,
.employee-profile-filter-shell .searchable-select .dropdown-menu,
.employee-profile-filter-shell .ss-portal-menu {
    position: relative;
    z-index: 40;
    overflow: visible !important;
}

/* Modal/Confirm Delete Density */
.confirm-delete-card {
    max-width: 500px;
    margin: 2rem auto;
}

/* ============================================================================
   TPGC MOBILE ENHANCEMENTS
   Generated from template analysis
   Templates analyzed: 437
   Unique classes: 456
   ============================================================================ */

/* Found 10 buttons with icons that need mobile handling */

/* --- Mobile: Buttons with icons --- */
@media (max-width: 768px) {

  /* All buttons in action areas - icon only */
  .action-col .btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hide text in action buttons, keep icons */
  .action-col .btn {
    overflow: hidden !important;
  }

  .action-col .btn i,
  .action-col .btn .bi,
  .action-col .btn [class*="fa-"] {
    margin: 0 !important;
    font-size: 1rem !important;
  }

  /* --- Mobile: Tables --- */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Action column - sticky with solid background */
  .action-col {
    position: sticky !important;
    right: 0 !important;
    background: #ffffff !important;
    z-index: 10 !important;
    border-left: 1px solid #dee2e6 !important;
    min-width: 70px !important;
    max-width: 80px !important;
  }

  /* Table cells - single line */
  .table td,
  .table th {
    white-space: nowrap !important;
    font-size: 0.8125rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* --- Mobile: Form Toolbar Buttons (icon-only) --- */
  /* Square buttons with proper spacing - remove gap, me-*, ms-* from icons */
  .border-bottom .d-flex .btn,
  .card-header .d-flex .btn,
  .d-flex.align-items-center .btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0.35rem 0.35rem !important;
    border-radius: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Remove gap from button containers */
  .border-bottom .d-flex,
  .card-header .d-flex {
    gap: 0.5rem !important;
  }

  /* Hide text by setting font-size to 0 */
  .border-bottom .d-flex .btn,
  .card-header .d-flex .btn,
  .d-flex.align-items-center .btn {
    font-size: 0 !important;
  }

  /* Restore icon size and remove me-*, ms-* spacing */
  .border-bottom .d-flex .btn i,
  .border-bottom .d-flex .btn svg,
  .border-bottom .d-flex .btn .bi,
  .border-bottom .d-flex .btn [class*="fa-"],
  .border-bottom .d-flex .btn [class*="me-"],
  .border-bottom .d-flex .btn [class*="ms-"],
  .card-header .d-flex .btn i,
  .card-header .d-flex .btn svg,
  .card-header .d-flex .btn .bi,
  .card-header .d-flex .btn [class*="fa-"],
  .card-header .d-flex .btn [class*="me-"],
  .card-header .d-flex .btn [class*="ms-"],
  .d-flex.align-items-center .btn i,
  .d-flex.align-items-center .btn svg,
  .d-flex.align-items-center .btn .bi,
  .d-flex.align-items-center .btn [class*="fa-"],
  .d-flex.align-items-center .btn [class*="me-"],
  .d-flex.align-items-center .btn [class*="ms-"] {
    font-size: 1rem !important;
    margin: 0 !important;
    margin-inline-end: 0 !important;
    margin-inline-start: 0 !important;
    padding: 0 !important;
  }


      /* List controls - compact and proper on mobile */
  .list-controls-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    padding: 0.5rem !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  .list-controls-grid .input-group {
    font-size: 0.85rem !important;
  }

  .list-controls-grid .input-group-text {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.85rem !important;
    background: #fff !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .input-group-text i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .list-controls-grid .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .form-select {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
    border-radius: 2px !important;
  }

  .list-controls-grid .btn i {
    margin: 0 !important;
    font-size: 0.85rem !important;
  }

  .list-controls-grid .btn .btn-label {
    display: none !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid .search-wrapper .form-control {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.5rem !important;
  }

  .list-controls-grid .search-wrapper .input-group-text {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.85rem !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid .action-btn-group .btn {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .list-controls-grid .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .list-controls-grid .action-btn-group .btn .btn-label {
    display: none !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  /* Search + action bar - matches template pattern */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }

  /* Search form wrapper - compact */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .flex-grow-1 {
    flex: 1 1 auto !important;
    max-width: 100% !important;
    min-width: 200px !important;
  }

  /* Search form - compact */
  .p-3.border-bottom.d-flex.flex-wrap.just-content-between.align-items-center.gap-3 .flex-grow-1 form.d-flex {
    margin-bottom: 0 !important;
  }

  /* Search input */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
    height: auto !important;
  }

  /* Search button - icon only style */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-primary {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-primary i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  /* Action buttons container */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .d-flex.gap-2 {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  /* Action buttons */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn i {
    margin: 0 !important;
    font-size: 0.85rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-outline-danger,
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-outline-secondary {
    padding: 0.35rem 0.5rem !important;
  }
}
  /* Mobile Search Bar - compact and clean */
  .mobile-search-bar,
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.bg-light-subtle {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: #f8f9fa !important;
  }

  /* Search form wrapper - full width */
  .mobile-search-bar .flex-grow-1,
  .mobile-search-bar form.d-flex {
    flex: 1 1 auto !important;
    min-width: 150px !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
  }

  /* Search input - compact */
  .mobile-search-bar .form-control,
  .mobile-search-bar input[type="text"],
  .mobile-search-bar input[type="search"] {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
    border-radius: 2px !important;
    height: auto !important;
  }

  /* Search button - icon only, square */
  .mobile-search-bar .btn-primary,
  .mobile-search-bar button[type="submit"] {
    padding: 0.4rem !important;
    border-radius: 2px !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-search-bar .btn-primary i,
  .mobile-search-bar button[type="submit"] i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  /* Action buttons container */
  .mobile-search-bar .d-flex.gap-2,
  .mobile-search-bar .action-btn-group {
    display: flex !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
  }

  /* All action buttons - icon only, square, small */
  .mobile-search-bar .btn,
  .mobile-search-bar button {
    padding: 0.35rem 0.5rem !important;
    font-size: 0 !important;
    border-radius: 2px !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-search-bar .btn i,
  .mobile-search-bar button i {
    margin: 0 !important;
    font-size: 0.85rem !important;
  }

  /* Restore text for non-mobile */
  @media (min-width: 769px) {
    .mobile-search-bar .btn {
      font-size: 0.875rem !important;
      width: auto !important;
      height: auto !important;
      padding: 0.4rem 0.75rem !important;
    }

    .mobile-search-bar .btn i {
      margin-right: 0.35rem !important;
    }

    .mobile-search-bar .btn .btn-text {
      display: inline !important;
    }
  }


/* ============================================================================
   END TPGC MOBILE ENHANCEMENTS
   ============================================================================ */

/* Premium Responsive Buttons - Icon Only on Mobile */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-responsive .btn-label {
    display: inline;
}

/* Mobile: Icon only buttons */
@media (max-width: 767.98px) {
    .btn-responsive {
        min-width: 36px !important;
        width: auto !important;
        height: 36px !important;
        padding: 0.5rem !important;
        border-radius: 2px !important;
    }

    .btn-responsive .btn-label {
        display: none !important;
    }

    .btn-responsive i,
    .btn-responsive .bi,
    .btn-responsive [class*="fa-"] {
        margin: 0 !important;
        font-size: 1rem !important;
    }
}

/* Tablet and above: Show text */
@media (min-width: 768px) {
    .btn-responsive {
        padding: 0.5rem 1rem !important;
    }

    .btn-responsive .btn-label {
        display: inline !important;
    }
}

/* Summary Bar Mobile Optimization */
@media (max-width: 767.98px) {
    .summary-bar {
        padding: 1rem !important;
    }

    .summary-bar h1 {
        font-size: 1.25rem !important;
    }

    .summary-bar .subtitle {
        font-size: 0.8rem !important;
    }

    .summary-bar .action-btn-group {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-top: 0.5rem !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    .summary-bar .action-btn-group .btn {
        flex: 0 0 auto !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    .summary-bar .action-btn-group .btn i {
        margin: 0 !important;
        font-size: 0.9rem !important;
    }

    .summary-bar .action-btn-group .btn .btn-label {
        display: none !important;
    }
}

/* Glass Card Mobile Optimization */
@media (max-width: 767.98px) {
    .glass-card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* Detail Grid Mobile Optimization */
@media (max-width: 767.98px) {
    .detail-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
}

/* Premium Form Section Mobile */
@media (max-width: 767.98px) {
    .premium-form-section {
        padding: 1rem !important;
    }

    .premium-form-title {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 767.98px) {
    .fms-ui-upgraded .container-fluid.px-0 > .glass-card,
    .fms-ui-upgraded .container-fluid.px-0 > .card,
    .fms-ui-upgraded .container-fluid.px-0 > .row,
    .fms-ui-upgraded .container-fluid.px-0 > .alert {
        margin-bottom: 1rem;
    }

    .fms-ui-upgraded .list-controls-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .fms-ui-upgraded .list-controls-grid .search-wrapper,
    .fms-ui-upgraded .list-controls-grid form,
    .fms-ui-upgraded .list-controls-grid .search-form {
        width: 100%;
        max-width: none;
    }

    .fms-ui-upgraded .summary-bar .action-btn-group,
    .fms-ui-upgraded .list-controls-grid .action-btn-group,
    .fms-ui-upgraded .fms-card-header-bar .action-btn-group,
    .fms-ui-upgraded .fms-report-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
    }

    .fms-ui-upgraded .summary-bar .action-btn-group .btn,
    .fms-ui-upgraded .list-controls-grid .action-btn-group .btn,
    .fms-ui-upgraded .fms-card-header-bar .action-btn-group .btn,
    .fms-ui-upgraded .fms-report-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        width: auto !important;
        justify-content: center;
    }

    .fms-ui-upgraded .premium-form-section .d-flex.gap-2,
    .fms-ui-upgraded .premium-form-section .d-flex.gap-3,
    .fms-ui-upgraded .glass-card .border-top .d-flex.gap-2,
    .fms-ui-upgraded .glass-card .border-top .d-flex.gap-3 {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }

    .fms-ui-upgraded .premium-form-section .d-flex.gap-2 .btn,
    .fms-ui-upgraded .premium-form-section .d-flex.gap-3 .btn,
    .fms-ui-upgraded .glass-card .border-top .d-flex.gap-2 .btn,
    .fms-ui-upgraded .glass-card .border-top .d-flex.gap-3 .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        width: auto !important;
        justify-content: center;
    }

    .fms-ui-upgraded .glass-card > .border-bottom.d-flex {
        flex-wrap: wrap;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .fms-ui-upgraded .fms-card-header-bar {
        align-items: stretch !important;
    }

    .fms-ui-upgraded .glass-card > .border-bottom.d-flex .btn {
        width: 100%;
        justify-content: center;
    }

    .fms-ui-upgraded .fms-card-header-bar .btn,
    .fms-ui-upgraded .fms-form-footer-bar .btn {
        width: 100%;
        justify-content: center;
    }

    .fms-ui-upgraded .search-form-submit {
        min-width: 44px;
        padding-inline: 0.75rem;
    }

    .cutover-tools-page .card.shadow-sm > .card-body {
        padding: 0.85rem;
    }

    .fms-report-actions {
        width: 100%;
    }

    .fms-report-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .fms-report-meta {
        grid-template-columns: 1fr;
    }

    .cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'] {
        width: 100%;
    }

    .cutover-tools-page form[enctype='multipart/form-data'] > .cutover-dry-run-col {
        width: 100%;
        justify-content: flex-start;
    }

    .cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-']:has(input[type='checkbox']) {
        width: 100%;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .cutover-tools-page form[enctype='multipart/form-data'] > .d-flex.align-items-end > div,
    .cutover-tools-page form[enctype='multipart/form-data'] > [class*='col-'].d-flex.align-items-end > div,
    .cutover-tools-page form[enctype='multipart/form-data'] > .cutover-dry-run-col > div {
        width: auto;
    }

    .fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-control,
    .cutover-tools-page form[enctype='multipart/form-data'] .cutover-file-control {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .fms-ui-upgraded form[enctype='multipart/form-data'] .cutover-file-name,
    .cutover-tools-page form[enctype='multipart/form-data'] .cutover-file-name {
        white-space: normal;
        word-break: break-word;
    }

    .cutover-import-column > .card.shadow-sm .card-body > .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .cutover-tools-page form[enctype='multipart/form-data'] .cutover-checkbox-col {
        width: 100%;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .cutover-tools-page .cutover-checkbox-wrap {
        width: auto;
        justify-content: flex-start;
    }

    .cutover-import-column > .card.shadow-sm .card-body > .d-flex .btn.btn-outline-secondary {
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 0.375rem 0.75rem !important;
        font-size: 0.75rem !important;
        justify-content: center;
    }

    .cutover-readiness-card .table-responsive {
        overflow-x: auto;
    }

    .cutover-import-column > .card.shadow-sm .card-body > .d-flex .btn {
        width: 100%;
        justify-content: center;
    }

    .cutover-import-column > .card.shadow-sm .card-body > .d-flex .btn.btn-outline-secondary {
        width: auto !important;
        font-size: 0.75rem !important;
    }

    .cutover-tools-page .card.shadow-sm .d-flex.justify-content-between.align-items-center,
    .cutover-tools-page .card.shadow-sm .d-flex.flex-column.flex-md-row.justify-content-between.align-items-md-center {
        align-items: flex-start !important;
    }
}

.payroll-ui-upgraded {
    --payroll-surface: var(--bs-card-bg);
    --payroll-surface-alt: var(--bs-light-subtle);
    --payroll-border: var(--bs-border-color);
    --payroll-muted: var(--bs-secondary-color);
    --payroll-focus: 0 0 0 .14rem color-mix(in srgb, var(--bs-primary) 28%, transparent);
}

.payroll-shell,
.payroll-shell .glass-card,
.payroll-shell .premium-form-section,
.payroll-shell .row,
.payroll-shell [class*='col-'] {
    overflow: visible;
}

.payroll-shell {
    display: grid;
    gap: 1.25rem;
}

.payroll-card {
    border: 1px solid var(--payroll-border);
    background: var(--payroll-surface);
}

.payroll-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid color-mix(in srgb, var(--bs-body-color) 8%, transparent);
    background: color-mix(in srgb, var(--payroll-surface-alt) 86%, var(--bs-body-bg));
}

.payroll-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.payroll-card-subtitle,
.payroll-helper-text,
.payroll-note {
    color: var(--payroll-muted);
    font-size: 0.83rem;
    line-height: 1.45;
}

.payroll-card-body {
    padding: 1.25rem;
}

.payroll-kpi-grid,
.payroll-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.payroll-kpi-card,
.payroll-meta-card {
    min-height: 100%;
    padding: 1rem;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 78%, var(--bs-body-bg));
    border-radius: 2px;
}

.payroll-kpi-label,
.payroll-meta-label {
    margin-bottom: 0.35rem;
    color: var(--payroll-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.payroll-kpi-value,
.payroll-meta-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.payroll-kpi-sub,
.payroll-meta-sub {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--payroll-muted);
}

.payroll-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.payroll-status-chip--success {
    color: color-mix(in srgb, var(--bs-success) 74%, var(--bs-body-color));
    border-color: color-mix(in srgb, var(--bs-success) 34%, var(--payroll-border));
    background: color-mix(in srgb, var(--bs-success) 12%, transparent);
}

.payroll-status-chip--warning {
    color: color-mix(in srgb, var(--bs-warning) 68%, var(--bs-body-color));
    border-color: color-mix(in srgb, var(--bs-warning) 34%, var(--payroll-border));
    background: color-mix(in srgb, var(--bs-warning) 14%, transparent);
}

.payroll-status-chip--danger {
    color: color-mix(in srgb, var(--bs-danger) 74%, var(--bs-body-color));
    border-color: color-mix(in srgb, var(--bs-danger) 34%, var(--payroll-border));
    background: color-mix(in srgb, var(--bs-danger) 12%, transparent);
}

.payroll-status-chip--muted {
    color: var(--payroll-muted);
    background: color-mix(in srgb, var(--bs-body-color) 6%, transparent);
}

.payroll-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.payroll-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.payroll-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

.payroll-shell .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

.payroll-table-wrap > .table.payroll-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
}

.payroll-table {
    margin-bottom: 0;
}

.payroll-table th,
.payroll-table td {
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.payroll-table th.text-end,
.payroll-table td.text-end {
    white-space: nowrap;
}

.payroll-run-results-table {
    table-layout: auto !important;
}

.payroll-run-results-table th {
    white-space: nowrap;
}

.payroll-run-results-table .action-col {
    width: 1%;
    white-space: nowrap;
}

.payroll-run-list-table {
    table-layout: auto !important;
}

.payroll-run-list-table th {
    white-space: nowrap;
}

.payroll-run-list-table td.action-col,
.payroll-run-list-table th.action-col {
    width: 1%;
    white-space: nowrap;
}

.payroll-run-list-table td:nth-child(7) {
    min-width: 360px;
    white-space: normal;
}

.payroll-table .text-wrap {
    white-space: normal;
    word-break: break-word;
}

.payroll-table .action-col {
    vertical-align: middle;
}

.payroll-table .table-sortable-heading {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.4rem;
}

.payroll-table .table-sortable-heading::after {
    content: "↕";
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: var(--payroll-muted);
}

.payroll-table .table-sortable-heading[aria-sort="ascending"]::after {
    content: "↑";
    color: var(--bs-primary);
}

.payroll-table .table-sortable-heading[aria-sort="descending"]::after {
    content: "↓";
    color: var(--bs-primary);
}

.payroll-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.payroll-field-span-2 {
    grid-column: span 2;
}

.payroll-field-card {
    min-height: 100%;
    padding: 1rem;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 72%, var(--bs-body-bg));
    border-radius: 2px;
}

.payroll-field-card .form-text,
.payroll-field-card .helptext {
    display: block;
    margin-top: 0.4rem;
    color: var(--payroll-muted);
    font-size: 0.8rem;
}

.payroll-field-card .errorlist {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
    color: var(--bs-danger);
    font-size: 0.8rem;
}

.payroll-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.payroll-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--payroll-border);
    border-radius: 2px;
    background: var(--payroll-surface);
}

.payroll-check-item .form-check-input {
    margin-top: 0.15rem;
}

.payroll-note-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--payroll-muted);
}

.payroll-inline-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 70%, var(--bs-body-bg));
    font-size: 0.76rem;
}

.payroll-section-stack {
    display: grid;
    gap: 1rem;
}

.payroll-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--payroll-muted);
}

.payroll-marquee {
    display: block;
    max-width: 100%;
}

.payroll-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.payroll-report-banner {
    padding: 1rem 1.1rem;
    border: 1px solid var(--payroll-border);
    border-radius: 2px;
    background: color-mix(in srgb, var(--payroll-surface-alt) 72%, var(--bs-body-bg));
}

.payroll-report-banner + .payroll-report-banner {
    margin-top: 0.85rem;
}

.payroll-report-banner__title {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.payroll-section-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.payroll-section-panel {
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 78%, var(--bs-body-bg));
    border-radius: 2px;
    padding: 1rem 1.1rem;
}

.payroll-section-panel__title {
    margin: 0 0 0.3rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.payroll-section-panel__subtitle {
    color: var(--payroll-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.payroll-state-list {
    display: grid;
    gap: 0.7rem;
}

.payroll-state-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--payroll-border);
    background: var(--payroll-surface);
    border-radius: 2px;
}

.payroll-state-row strong {
    display: block;
    font-size: 0.84rem;
}

.payroll-state-row span {
    color: var(--payroll-muted);
    font-size: 0.78rem;
}

.payroll-blocker-panel {
    border: 1px solid var(--payroll-border);
    border-left-width: 4px;
    background: color-mix(in srgb, var(--payroll-surface-alt) 72%, var(--bs-body-bg));
    border-radius: 2px;
    padding: 1rem 1.1rem;
}

.payroll-blocker-panel--warning {
    border-left-color: var(--bs-warning);
}

.payroll-blocker-panel--danger {
    border-left-color: var(--bs-danger);
}

.payroll-blocker-panel__title {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.payroll-blocker-panel ul {
    margin: 0;
    padding-left: 1.15rem;
}

.payroll-link-grid {
    display: grid;
    gap: 0.9rem;
}

.payroll-link-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 78%, var(--bs-body-bg));
    color: inherit;
    text-decoration: none;
    border-radius: 2px;
}

.payroll-link-card:hover,
.payroll-link-card:focus {
    color: inherit;
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--payroll-border));
}

.payroll-link-card__title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
}

.payroll-link-card__meta {
    display: block;
    margin-top: 0.2rem;
    color: var(--payroll-muted);
    font-size: 0.79rem;
}

.payroll-link-card__value {
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

.payroll-summary-strip {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.payroll-summary-strip__item {
    padding: 0.9rem 1rem;
    border: 1px solid var(--payroll-border);
    background: color-mix(in srgb, var(--payroll-surface-alt) 75%, var(--bs-body-bg));
    border-radius: 2px;
}

.payroll-summary-strip__label {
    color: var(--payroll-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.payroll-summary-strip__value {
    margin-top: 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.payroll-summary-strip__meta {
    margin-top: 0.25rem;
    color: var(--payroll-muted);
    font-size: 0.8rem;
}

.payroll-run-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.payroll-payslip-card {
    page-break-inside: avoid;
}

@media print {
    .payroll-print-hidden {
        display: none !important;
    }

    .payroll-payslip-card {
        page-break-after: always;
    }
}

@media (max-width: 991.98px) {
    .payroll-field-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .payroll-card-header,
    .payroll-card-body {
        padding: 1rem;
    }

    .payroll-toolbar,
    .payroll-toolbar-actions,
    .payroll-page-actions {
        width: 100%;
    }

    .payroll-toolbar-actions .btn,
    .payroll-page-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        min-width: 0;
    }

    .payroll-kpi-grid,
    .payroll-meta-grid,
    .payroll-run-summary,
    .payroll-field-grid,
    .payroll-section-grid,
    .payroll-summary-strip {
        grid-template-columns: 1fr;
    }
}

/* Shared list pagination */
.list-pagination-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.list-pagination-controls-row {
    grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr);
    align-items: center;
    gap: 0.9rem;
}

.list-page-size-form {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    position: relative;
    z-index: 5;
}

.list-page-size-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.list-page-size-select.form-select.form-select-sm {
    min-width: 4.25rem;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-color: var(--bs-border-color);
    background-color: var(--bs-body-bg);
    padding-right: 1.8rem;
    color: var(--bs-body-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4.47 6.97a.75.75 0 0 1 1.06 0L8 9.44l2.47-2.47a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 0.95rem;
    position: relative;
    z-index: 6;
}

.list-page-size-select.form-select.form-select-sm:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--bs-primary) 24%, transparent);
}

.list-pagination-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.35rem;
}

.list-pagination-nav.pagination {
    gap: 0.3rem;
}

.list-pagination-nav .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.list-pagination-nav .page-link {
    border-radius: 0.45rem;
    border: 1px solid var(--bs-border-color);
    min-width: 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    text-align: center;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

/* Override Bootstrap edge-specific corner rules to keep all buttons symmetric */
.list-pagination-nav .page-item:first-child .page-link,
.list-pagination-nav .page-item:last-child .page-link {
    border-radius: 0.45rem !important;
}

.list-pagination-nav .page-item:not(.disabled) .page-link:hover {
    background: color-mix(in srgb, var(--bs-primary) 11%, var(--bs-body-bg));
    border-color: color-mix(in srgb, var(--bs-primary) 34%, var(--bs-border-color));
    transform: translateY(-1px);
}

.list-pagination-nav .page-link i {
    font-size: 0.80rem;
    line-height: 0.5;
}

.list-pagination-status {
    font-weight: 600;
    letter-spacing: 0.01em;
    min-width: 10rem !important;
    width: auto !important;
    padding: 0 0.9rem !important;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 80%, var(--bs-body-bg)) !important;
}

.list-pagination-nav .page-item.disabled .page-link {
    opacity: 0.55;
    color: var(--bs-secondary-color);
    background: color-mix(in srgb, var(--bs-secondary-bg) 88%, var(--bs-body-bg));
    border-color: var(--bs-border-color);
}

.list-pagination-nav .page-item.active .page-link {
    color: #fff;
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .list-page-size-form {
    background: transparent;
    border-color: transparent;
}

[data-bs-theme="dark"] .list-pagination-nav .page-link {
    background: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-primary) 10%);
}

[data-bs-theme="dark"] .list-page-size-select.form-select.form-select-sm {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23cbd5e1' d='M4.47 6.97a.75.75 0 0 1 1.06 0L8 9.44l2.47-2.47a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
}

@media (max-width: 767.98px) {
    .list-pagination-controls-row {
        flex-direction: column;
        align-items: stretch;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .list-pagination-toolbar {
        justify-content: center;
    }

    .list-page-size-form {
        width: auto;
        max-width: 100%;
        justify-content: flex-end;
    }

    .list-page-size-select.form-select.form-select-sm {
        min-width: 4.8rem;
        width: auto;
    }

    .list-pagination-nav .page-link {
        min-width: 1.9rem;
        width: 1.9rem;
        height: 1.9rem;
        padding: 0;
    }

    .list-pagination-status {
        min-width: 8.4rem !important;
        font-size: 0.74rem;
    }
}

/* Readiness-specific overrides are defined near readiness block above */

.core-global-loader {
  background: color-mix(in srgb, var(--bs-body-bg) 62%, transparent);
  backdrop-filter: blur(8px) saturate(124%);
  -webkit-backdrop-filter: blur(8px) saturate(124%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.core-global-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.core-global-loader-spinner {
  width: 5rem;
  height: 5rem;
  border: none !important;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, transparent 70%, rgba(13, 110, 253, 0.2) 72%, transparent 76%),
    conic-gradient(
      from 0deg,
      rgba(13, 110, 253, 0.04) 0deg,
      rgba(13, 110, 253, 0.12) 110deg,
      rgba(13, 110, 253, 0.96) 170deg,
      rgba(13, 110, 253, 0.14) 245deg,
      rgba(13, 110, 253, 0.04) 360deg
    );
  box-shadow: 0 0 14px rgba(13, 110, 253, 0.2), 0 10px 28px rgba(13, 110, 253, 0.2);
  animation: core-loader-spin 0.95s linear infinite;
  will-change: transform;
}

.core-global-loader-logo {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.22));
}

html.app-boot body > :not(#spinner) {
  opacity: 0;
}

html.app-ready body > :not(#spinner) {
  opacity: 1;
}

html.app-boot .core-global-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.app-ready .core-global-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.app-ready .core-global-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

[data-bs-theme="dark"] .core-global-loader {
  background: color-mix(in srgb, #0b1220 68%, transparent);
  backdrop-filter: blur(9px) saturate(130%);
  -webkit-backdrop-filter: blur(9px) saturate(130%);
}

[data-bs-theme="dark"] .core-global-loader-spinner {
  background:
    radial-gradient(closest-side, transparent 70%, rgba(96, 165, 250, 0.24) 72%, transparent 76%),
    conic-gradient(
      from 0deg,
      rgba(96, 165, 250, 0.05) 0deg,
      rgba(96, 165, 250, 0.2) 110deg,
      rgba(147, 197, 253, 0.98) 170deg,
      rgba(96, 165, 250, 0.18) 245deg,
      rgba(96, 165, 250, 0.05) 360deg
    );
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.24), 0 12px 30px rgba(10, 18, 32, 0.44);
}

[data-bs-theme="dark"] .core-global-loader-logo {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

@keyframes core-loader-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.reports-kpi-card .card-body {
  padding: 0.85rem 1rem;
}

.reports-index-page .reports-kpi-card {
  position: relative;
  overflow: hidden;
}

.reports-index-page .reports-kpi-card .card-body {
  position: relative;
  padding: 1rem 1rem 0.95rem;
}

.reports-index-page .reports-kpi-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.reports-index-page .reports-kpi-card-primary {
  border-color: rgba(13, 110, 253, 0.28) !important;
  background: linear-gradient(145deg, rgba(13, 110, 253, 0.13), rgba(13, 110, 253, 0.04));
}

.reports-index-page .reports-kpi-card-primary .reports-kpi-icon {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.14);
  border-color: rgba(13, 110, 253, 0.24);
}

.reports-index-page .reports-kpi-card-danger {
  border-color: rgba(220, 53, 69, 0.32) !important;
  background: linear-gradient(145deg, rgba(220, 53, 69, 0.14), rgba(220, 53, 69, 0.04));
}

.reports-index-page .reports-kpi-card-danger .reports-kpi-icon {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.26);
}

.reports-index-page .reports-kpi-card-success {
  border-color: rgba(25, 135, 84, 0.32) !important;
  background: linear-gradient(145deg, rgba(25, 135, 84, 0.14), rgba(25, 135, 84, 0.04));
}

.reports-index-page .reports-kpi-card-success .reports-kpi-icon {
  color: #198754;
  background: rgba(25, 135, 84, 0.15);
  border-color: rgba(25, 135, 84, 0.26);
}

.reports-index-page .reports-guidance {
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(13, 110, 253, 0.06);
  color: var(--bs-body-color);
  border-radius: 0.65rem;
  padding: 0.62rem 0.72rem;
  font-size: 0.86rem;
}

.reports-group-details {
  border: 0;
}

.reports-group-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.reports-group-summary::-webkit-details-marker {
  display: none;
}

.reports-group-details[open] .reports-group-summary {
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 35%, transparent);
}

.report-card-shell {
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.report-card-link:hover .report-card-shell,
.report-card-link:focus .report-card-shell {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 8, 20, 0.08);
}

.reports-index-page .report-card-shell {
  border-color: color-mix(in srgb, var(--bs-border-color-translucent) 80%, transparent) !important;
}

[data-bs-theme="dark"] .reports-group-details[open] .reports-group-summary {
  background: color-mix(in srgb, var(--bs-primary) 22%, transparent);
}

[data-bs-theme="dark"] .reports-index-page .reports-kpi-card-primary {
  border-color: rgba(96, 165, 250, 0.34) !important;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.26), rgba(30, 58, 138, 0.22));
}

[data-bs-theme="dark"] .reports-index-page .reports-kpi-card-danger {
  border-color: rgba(248, 113, 113, 0.36) !important;
  background: linear-gradient(145deg, rgba(185, 28, 28, 0.28), rgba(127, 29, 29, 0.22));
}

[data-bs-theme="dark"] .reports-index-page .reports-kpi-card-success {
  border-color: rgba(52, 211, 153, 0.36) !important;
  background: linear-gradient(145deg, rgba(5, 150, 105, 0.28), rgba(6, 95, 70, 0.22));
}

[data-bs-theme="dark"] .reports-index-page .reports-kpi-card .small,
[data-bs-theme="dark"] .reports-index-page .reports-kpi-card .h4,
[data-bs-theme="dark"] .reports-index-page .reports-kpi-card .reports-kpi-icon {
  color: var(--app-text-strong) !important;
}

.project-list-report-page .project-list-report-hero {
  border-color: color-mix(in srgb, var(--bs-primary) 26%, var(--bs-border-color-translucent));
}

.project-list-report-page .project-list-report-guidance {
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(13, 110, 253, 0.06);
  color: var(--bs-body-color);
  border-radius: 0.65rem;
  padding: 0.62rem 0.72rem;
  font-size: 0.86rem;
}

.project-list-report-page .project-list-report-kpi {
  border-color: color-mix(in srgb, var(--bs-border-color-translucent) 84%, transparent) !important;
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 24%, transparent);
}

.project-list-report-page .project-list-report-kpi-primary {
  border-color: rgba(13, 110, 253, 0.28) !important;
  background: linear-gradient(145deg, rgba(13, 110, 253, 0.13), rgba(13, 110, 253, 0.04));
}

.project-list-report-page .project-list-report-kpi-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  font-size: 0.9rem;
}

.project-list-report-page .project-list-report-kpi-neutral {
  border-color: rgba(100, 116, 139, 0.3) !important;
  background: linear-gradient(145deg, rgba(100, 116, 139, 0.12), rgba(100, 116, 139, 0.04));
}

.project-list-report-page .project-list-report-kpi-success {
  border-color: rgba(22, 163, 74, 0.3) !important;
  background: linear-gradient(145deg, rgba(22, 163, 74, 0.13), rgba(22, 163, 74, 0.04));
}

.project-list-report-page .project-list-report-kpi-warning {
  border-color: rgba(217, 119, 6, 0.32) !important;
  background: linear-gradient(145deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.05));
}

.project-list-report-page .project-list-report-kpi-high {
  border-color: rgba(124, 58, 237, 0.3) !important;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.13), rgba(124, 58, 237, 0.04));
}

.project-list-report-page .project-list-report-kpi-info {
  border-color: rgba(2, 132, 199, 0.3) !important;
  background: linear-gradient(145deg, rgba(2, 132, 199, 0.13), rgba(2, 132, 199, 0.04));
}

.project-list-report-page .project-list-report-kpi-danger {
  border-color: rgba(220, 38, 38, 0.35) !important;
  background: linear-gradient(145deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.05));
}

.project-list-report-page .project-list-report-search-wrap {
  width: 100%;
  max-width: 360px;
}

@media (max-width: 991.98px) {
  .project-list-report-page .project-list-report-search-wrap {
    max-width: 100%;
  }
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-guidance {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(30, 58, 138, 0.34);
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi {
  border-color: var(--app-border-soft) !important;
  background: color-mix(in srgb, var(--app-surface-elevated) 84%, rgba(59, 130, 246, 0.2));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-neutral {
  background: linear-gradient(145deg, rgba(71, 85, 105, 0.34), rgba(30, 41, 59, 0.26));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-success {
  background: linear-gradient(145deg, rgba(21, 128, 61, 0.34), rgba(6, 78, 59, 0.26));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-warning {
  background: linear-gradient(145deg, rgba(180, 83, 9, 0.36), rgba(120, 53, 15, 0.28));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-high {
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.34), rgba(76, 29, 149, 0.28));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-info {
  background: linear-gradient(145deg, rgba(3, 105, 161, 0.34), rgba(12, 74, 110, 0.28));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-danger {
  background: linear-gradient(145deg, rgba(185, 28, 28, 0.36), rgba(127, 29, 29, 0.28));
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi-icon {
  color: var(--app-text-strong) !important;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(59, 130, 246, 0.28);
}

[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi .small,
[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi .h3,
[data-bs-theme="dark"] .project-list-report-page .project-list-report-kpi .display-6 {
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .reports-index-page .reports-guidance {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(30, 58, 138, 0.34);
  color: var(--app-text-strong) !important;
}

.office-wise-report-page .glass-card {
  border: 1px solid var(--bs-border-color-translucent);
}

.office-wise-report-page details > summary {
  cursor: pointer;
  list-style: none;
}

.office-wise-report-page details > summary::-webkit-details-marker {
  display: none;
}

.office-wise-report-page details > summary .badge {
  font-weight: 600;
}

.office-wise-report-page .office-wise-amount-table thead th {
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.office-wise-report-page .office-wise-amount-table tbody td {
  vertical-align: middle;
}

.office-wise-report-page .office-wise-amount-table tbody tr:hover > * {
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 42%, transparent);
}

.office-wise-report-page .btn-group .btn {
  min-width: 3.2rem;
}

@media (max-width: 767.98px) {
  .office-wise-report-page .summary-bar h1 {
    font-size: 1.18rem;
  }

  .office-wise-report-page .table-responsive {
    border-radius: 0.5rem;
  }

  .office-wise-report-page .office-wise-amount-table {
    font-size: 0.84rem;
  }
}

[data-bs-theme="dark"] .office-wise-report-page .glass-card,
[data-bs-theme="dark"] .office-wise-report-page .bg-light-subtle,
[data-bs-theme="dark"] .office-wise-report-page .table-responsive,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table,
[data-bs-theme="dark"] .office-wise-report-page details > summary {
  background: var(--app-surface-elevated) !important;
  color: var(--app-text-strong) !important;
  border-color: var(--app-border-soft) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .form-control-premium,
[data-bs-theme="dark"] .office-wise-report-page .form-select,
[data-bs-theme="dark"] .office-wise-report-page .form-select.form-control-premium,
[data-bs-theme="dark"] .office-wise-report-page input.form-control-premium {
  background-color: var(--app-surface-soft) !important;
  color: var(--app-text-strong) !important;
  border-color: var(--app-border-soft) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .form-control-premium:focus,
[data-bs-theme="dark"] .office-wise-report-page .form-select:focus,
[data-bs-theme="dark"] .office-wise-report-page input.form-control-premium:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.5) !important;
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table thead th,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table tbody td,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table a,
[data-bs-theme="dark"] .office-wise-report-page .small,
[data-bs-theme="dark"] .office-wise-report-page .text-muted {
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table tr,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table td,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table th {
  border-color: var(--app-border-soft) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table tbody tr:hover > * {
  background: rgba(var(--bs-primary-rgb), 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .table-primary > * {
  background: rgba(var(--bs-primary-rgb), 0.18) !important;
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .badge.bg-light {
  background: rgba(148, 163, 184, 0.18) !important;
  color: var(--app-text-strong) !important;
  border-color: var(--app-border-soft) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .btn-outline-secondary {
  color: var(--app-text-strong) !important;
  border-color: var(--app-border-soft) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .btn-outline-secondary:hover,
[data-bs-theme="dark"] .office-wise-report-page .btn-outline-secondary:focus-visible {
  background: rgba(var(--bs-primary-rgb), 0.16) !important;
  color: var(--app-text-strong) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.34) !important;
}

.office-wise-report-page .report-kpi-panel {
  border-left: 4px solid color-mix(in srgb, var(--bs-primary) 70%, transparent);
}

.office-wise-report-page .report-kpi-panel .h5 {
  letter-spacing: 0.01em;
}

.office-wise-report-page .form-label-premium {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.office-wise-report-page .glass-card > details > summary {
  border-radius: 0.5rem 0.5rem 0 0;
}

.office-wise-report-page .glass-card > details[open] > summary {
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 36%, transparent) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .report-kpi-panel {
  border-left-color: rgba(var(--bs-primary-rgb), 0.62);
}

[data-bs-theme="dark"] .office-wise-report-page .form-label-premium {
  color: var(--app-text-muted) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .glass-card > details[open] > summary {
  background: rgba(var(--bs-primary-rgb), 0.18) !important;
}
