:root {
    --cf-ink: #17212b;
    --cf-muted: #64707d;
    --cf-line: #d7dee6;
    --cf-bg: #f4f6f8;
    --cf-panel: #ffffff;
    --cf-primary: #176b4d;
    --cf-primary-dark: #0f4633;
    --cf-primary-mint: #e6f3ef;
    --cf-warning: #a15c1c;
    --cf-danger: #b42318;
    --cf-accent: #5f6f7d;
    --cf-success: #256f54;
    --cf-panel-shadow: 0 18px 44px rgba(23, 33, 43, 0.08);
    --cf-panel-shadow-soft: 0 10px 28px rgba(23, 33, 43, 0.055);
    --cf-focus: 0 0 0 3px rgba(23, 107, 77, 0.18);
}

.pipeline-price-upload,
.pipeline-quote-stage-form {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    flex-wrap: wrap;
}

.pipeline-price-upload > div,
.pipeline-quote-stage-form > input {
    min-width: 260px;
}

.pipeline-price-workspace {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.pipeline-price-sidebar {
    background: #123d2d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(23, 33, 43, 0.16);
    color: #ffffff;
    max-height: calc(100vh - 180px);
    overflow: auto;
    position: sticky;
    top: 1rem;
}

.pipeline-price-sidebar-heading {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    text-transform: uppercase;
}

.pipeline-price-sidebar-heading span {
    color: #f8fafc;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.pipeline-price-sidebar-heading small {
    color: #b8d3c8;
    display: block;
    font-size: 0.78rem;
    margin-top: 0.2rem;
    text-transform: none;
}

.pipeline-price-sidebar-add {
    background: rgba(242, 182, 50, 0.14);
    border-color: rgba(242, 182, 50, 0.48);
    color: #ffffff;
    height: 2rem;
    width: 2rem;
}

.pipeline-price-sidebar-add:hover,
.pipeline-price-sidebar-add:focus {
    background: #f2b632;
    border-color: #f2b632;
    color: #10281f;
}

.pipeline-price-category-list {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
}

.pipeline-price-category-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    color: #ffffff;
    display: block;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
}

.pipeline-price-category-link:hover,
.pipeline-price-category-link:focus,
.pipeline-price-category-link.is-active {
    background: #2f7b59;
    border-color: #f2b632;
    box-shadow: inset 4px 0 0 #f2b632;
    color: #ffffff;
}

.pipeline-price-category-link span {
    display: block;
    font-weight: 800;
}

.pipeline-price-category-link small {
    color: #d7efe6;
    display: block;
    font-size: 0.8rem;
    margin-top: 0.22rem;
}

.pipeline-price-main {
    min-width: 0;
}

.pipeline-price-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--cf-line);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.4fr);
    padding: 1rem;
}

.pipeline-price-title h2 {
    margin-bottom: 0.15rem;
}

.pipeline-price-tools {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
    min-width: 0;
}

.pipeline-price-search {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 20px minmax(240px, 1fr);
    max-width: 680px;
    width: 100%;
}

.pipeline-price-search > svg {
    color: var(--cf-muted);
    height: 20px;
    width: 20px;
}

.pipeline-price-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.pipeline-price-template-table td,
.pipeline-price-template-table th {
    vertical-align: top;
}

.pipeline-price-template-table td:first-child {
    min-width: 240px;
}

@media (max-width: 900px) {
    .pipeline-price-workspace {
        grid-template-columns: 1fr;
    }

    .pipeline-price-sidebar {
        max-height: none;
        position: static;
    }

    .pipeline-price-header {
        grid-template-columns: 1fr;
    }

    .pipeline-price-tools,
    .pipeline-price-actions {
        justify-items: stretch;
        justify-content: flex-start;
    }

    .pipeline-price-search {
        max-width: none;
    }
}

.pipeline-quote-stage-form {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.pipeline-quote-stage-form > input {
    min-width: 210px;
    width: 210px;
}

.pipeline-quote-panel {
    background: #eef3f1;
    border: 1px solid #d7e2de;
    box-shadow: 0 20px 44px rgba(23, 33, 43, 0.12);
    overflow: visible;
}

.app-shell.pipeline-quote-shell-active {
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
}

.pipeline-quote-workspace {
    margin-left: 0;
    margin-right: 0;
}

.pipeline-quote-workspace .pipeline-quote-panel {
    border-radius: 8px;
}

.pipeline-quote-toolbar {
    align-items: center;
    background: linear-gradient(135deg, #173126 0%, #1f4f3c 100%);
    border-bottom: 1px solid #2d6b52;
    box-shadow: 0 16px 34px rgba(15, 70, 51, 0.2);
    color: #f8fafc;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.95rem 1.25rem;
    position: static;
}

.pipeline-quote-toolbar h2 {
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
}

.pipeline-quote-title-row {
    align-items: baseline;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
}

.pipeline-quote-toolbar .muted-small {
    color: #d7eee5;
    white-space: nowrap;
}

.pipeline-quote-toolbar .form-control {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.pipeline-quote-toolbar .form-control::placeholder {
    color: #c8e0d7;
}

.pipeline-quote-toolbar .btn-primary {
    background: #e6ad3a;
    border-color: #e6ad3a;
    color: #182033;
    font-weight: 800;
}

.pipeline-quote-toolbar .btn-primary:hover,
.pipeline-quote-toolbar .btn-primary:focus {
    background: #f2bf55;
    border-color: #f2bf55;
    color: #0f172a;
}

.pipeline-quote-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.pipeline-quote-totals {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.pipeline-quote-totals span {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    color: #b8c7d8;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
}

.pipeline-quote-totals strong {
    color: #ffffff;
    transition: color 0.18s ease, transform 0.18s ease;
}

.quote-pulse {
    color: #e6ad3a !important;
    display: inline-block;
    transform: translateY(-1px) scale(1.04);
}

.pipeline-quote-stages {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem 1rem 1.25rem;
}

.pipeline-quote-stages.has-focused-category {
    align-content: start;
}

.pipeline-quote-stages.has-focused-stage {
    align-content: start;
}

.pipeline-quote-builder {
    align-items: start;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 680px;
}

.pipeline-quote-nav {
    align-self: start;
    background: #173126;
    border-right: 1px solid #2f684f;
    max-height: calc(100vh - 154px);
    overflow: auto;
    padding: 1rem;
    position: sticky;
    top: 154px;
}

.pipeline-quote-nav-heading {
    align-items: center;
    color: #c9dfd7;
    display: flex;
    font-size: 0.78rem;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.pipeline-quote-nav-heading strong {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #f8fafc;
    padding: 0.12rem 0.45rem;
}

.pipeline-quote-nav-stage {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.pipeline-quote-nav button {
    background: #143827;
    border: 1px solid #3a7158;
    border-radius: 6px;
    color: #f8fafc;
    display: grid;
    gap: 0.1rem;
    padding: 0.52rem 0.62rem;
    text-align: left;
    width: 100%;
}

.pipeline-quote-nav button:hover,
.pipeline-quote-nav button:focus,
.pipeline-quote-nav button.is-active {
    background: #24583f;
    border-color: #7dd7b6;
    box-shadow: 0 0 0 3px rgba(125, 215, 182, 0.18);
}

.pipeline-quote-nav button.is-active {
    box-shadow: inset 4px 0 0 #e6ad3a, 0 12px 24px rgba(0, 0, 0, 0.16);
}

.pipeline-quote-nav button span {
    color: #ffffff;
    font-weight: 750;
}

.pipeline-quote-nav button small {
    color: #c0d7cf;
}

.pipeline-quote-nav-category {
    background: #2a6a4c !important;
    border-color: #6eb897 !important;
    margin-left: 0.75rem;
    position: relative;
}

.pipeline-quote-nav-category span {
    font-size: 0.92rem;
}

.pipeline-quote-nav-category small {
    color: #d5f0e5 !important;
}

.pipeline-quote-nav-category small b {
    color: #ffe08a;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    margin-top: 0.08rem;
}

.pipeline-quote-nav-category:hover,
.pipeline-quote-nav-category:focus,
.pipeline-quote-nav-category.is-active {
    background: #33805d !important;
    border-color: #9be2c5 !important;
}

.pipeline-quote-nav-category::before {
    background: #e6ad3a;
    border-radius: 999px;
    content: "";
    height: calc(100% + 0.45rem);
    left: -0.55rem;
    opacity: 0.72;
    position: absolute;
    top: -0.22rem;
    width: 2px;
}

.pipeline-quote-stage,
.pipeline-quote-category {
    border: 1px solid #d6e1ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(7, 13, 24, 0.14);
    min-width: 0;
}

.pipeline-quote-stage {
    scroll-margin-top: 165px;
}

.pipeline-quote-stages.has-focused-category .pipeline-quote-stage:not(.is-focused-stage),
.pipeline-quote-stages.has-focused-stage .pipeline-quote-stage:not(.is-focused-stage) {
    display: none;
}

.pipeline-quote-stage-heading,
.pipeline-quote-category-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    scroll-margin-top: 160px;
    border-bottom: 1px solid #d6e1ee;
    background: #f7fbff;
}

.pipeline-quote-stage-heading {
    background: #173126;
    color: #f8fafc;
}

.pipeline-quote-stage-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.pipeline-quote-stage-heading h3 {
    color: #ffffff;
}

.pipeline-quote-stage-heading > div > span {
    color: #c9dfd7;
}

.pipeline-quote-stage-heading .pipeline-quote-totals span {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.pipeline-quote-category-modal {
    max-width: min(1180px, calc(100vw - 3rem));
}

.pipeline-quote-category-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-height: min(64vh, 640px);
    overflow: auto;
    padding: 0.1rem;
}

.pipeline-quote-category-choice {
    cursor: pointer;
    display: block;
    margin: 0;
    position: relative;
}

.pipeline-quote-category-choice input {
    opacity: 0;
    position: absolute;
}

.pipeline-quote-category-choice-body {
    background: linear-gradient(135deg, #f4fbf7 0%, #eef8f2 100%);
    border: 1px solid #c6ddd3;
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    min-height: 88px;
    padding: 0.95rem 1rem;
    position: relative;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pipeline-quote-category-choice-body::before {
    background: #d7a734;
    border-radius: 999px;
    bottom: 0.8rem;
    content: "";
    left: 0.75rem;
    position: absolute;
    top: 0.8rem;
    width: 3px;
}

.pipeline-quote-category-choice-body strong {
    color: #123528;
    font-size: 0.98rem;
    line-height: 1.18;
    padding-left: 0.55rem;
    padding-right: 1.6rem;
}

.pipeline-quote-category-choice-body small {
    color: #4f7d6d;
    font-weight: 700;
    padding-left: 0.55rem;
}

.pipeline-quote-category-choice:hover .pipeline-quote-category-choice-body,
.pipeline-quote-category-choice input:focus-visible + .pipeline-quote-category-choice-body {
    background: linear-gradient(135deg, #edfff7 0%, #ddf5e9 100%);
    border-color: #52b78a;
    box-shadow: 0 12px 24px rgba(23, 107, 77, 0.14);
    transform: translateY(-1px);
}

.pipeline-quote-category-choice input:checked + .pipeline-quote-category-choice-body {
    background: linear-gradient(135deg, #dff8eb 0%, #c8f1dd 100%);
    border-color: #087a55;
    box-shadow: inset 0 0 0 2px rgba(8, 122, 85, 0.1), 0 14px 28px rgba(23, 107, 77, 0.2);
}

.pipeline-quote-category-choice input:checked + .pipeline-quote-category-choice-body::before {
    background: #f2b633;
    width: 5px;
}

.pipeline-quote-category-choice input:checked + .pipeline-quote-category-choice-body::after {
    align-items: center;
    background: #176b4d;
    border-radius: 999px;
    color: #ffffff;
    content: "✓";
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 900;
    height: 1.35rem;
    justify-content: center;
    position: absolute;
    right: 0.7rem;
    top: 0.7rem;
    width: 1.35rem;
}

.pipeline-quote-category-heading h4 {
    color: #102033;
}

.pipeline-quote-category-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #102033;
    display: inline-flex;
    gap: 0.35rem;
    padding: 0;
    text-align: left;
}

.pipeline-quote-category-toggle i {
    color: #176b4d;
    height: 20px;
    transition: transform 0.16s ease;
    width: 20px;
}

.pipeline-quote-category-toggle:hover h4,
.pipeline-quote-category-toggle:focus h4 {
    color: #176b4d;
}

.pipeline-quote-category.is-open .pipeline-quote-category-toggle i {
    transform: rotate(90deg);
}

.pipeline-quote-category-heading .pipeline-quote-totals span {
    background: #ffffff;
    border-color: #d6e1ee;
    color: #64748b;
}

.pipeline-quote-category-heading .pipeline-quote-totals strong {
    color: #102033;
}

.pipeline-quote-stage-heading h3,
.pipeline-quote-category-heading h4 {
    margin: 0;
}

.pipeline-quote-stage-heading span,
.pipeline-quote-category-heading span {
    color: #64748b;
    font-size: 0.85rem;
}

.pipeline-quote-price-danger {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    margin-left: 0.4rem;
    padding: 0.12rem 0.42rem;
}

.pipeline-quote-price-danger {
    background: #ffe4e6;
    color: #9f1239;
}

.pipeline-quote-category {
    margin: 1rem;
    scroll-margin-top: 170px;
}

.pipeline-quote-stages.has-focused-category .pipeline-quote-category {
    display: none;
}

.pipeline-quote-stages.has-focused-category .pipeline-quote-category.is-focused-category {
    display: block;
    margin: 1rem;
}

.pipeline-quote-stages.has-focused-category .pipeline-quote-category.is-focused-category .pipeline-quote-lines-wrap {
    min-height: min(620px, calc(100vh - 405px));
}

.pipeline-quote-lines-placeholder {
    align-items: center;
    background: #f8fbfa;
    border-top: 1px solid #dce7f2;
    color: #475569;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 66px;
    padding: 0.75rem 1.1rem;
}

.pipeline-quote-lines-placeholder strong {
    color: #142033;
    display: block;
    font-size: 0.95rem;
}

.pipeline-quote-lines-placeholder span {
    color: #64748b;
    display: block;
    font-size: 0.84rem;
    margin-top: 0.12rem;
}

.pipeline-quote-lines-placeholder.is-loading {
    background: repeating-linear-gradient(
        110deg,
        #f8fbff 0,
        #f8fbff 16px,
        #eef7f2 16px,
        #eef7f2 32px
    );
}

.pipeline-quote-lines-wrap {
    background: #ffffff;
    border-top: 1px solid #dce7f2;
    display: block;
    max-height: calc(100vh - 392px);
    max-width: 100%;
    overflow: auto;
}

.pipeline-quote-lines-actions {
    align-items: center;
    background: #f8fbfa;
    border-bottom: 1px solid #dce7f2;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 980px;
    padding: 0.55rem 0.75rem;
}

.pipeline-quote-lines-actions span {
    color: #64748b;
    font-size: 0.82rem;
}

.pipeline-quote-lines-action-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.quote-manual-search-field {
    position: relative;
}

.quote-manual-search-results {
    background: #ffffff;
    border: 1px solid #cfe0dc;
    border-radius: 8px;
    box-shadow: 0 16px 32px rgba(7, 13, 24, 0.16);
    display: grid;
    gap: 0.35rem;
    margin-top: 0.4rem;
    max-height: 260px;
    overflow: auto;
    padding: 0.45rem;
    position: absolute;
    width: min(100%, 520px);
    z-index: 1085;
}

.quote-manual-search-option {
    background: #f7fbfa;
    border: 1px solid #d9e7e2;
    border-radius: 7px;
    color: #102033;
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
}

.quote-manual-search-option:hover,
.quote-manual-search-option:focus {
    background: #eaf8f1;
    border-color: #176b4d;
}

.quote-manual-search-option strong,
.quote-manual-search-option span,
.quote-manual-search-option small {
    display: block;
}

.quote-manual-search-option strong {
    font-size: 0.9rem;
}

.quote-manual-search-option span,
.quote-manual-search-option small {
    color: #64748b;
    font-size: 0.78rem;
}

.quote-manual-search-option b {
    color: #176b4d;
    font-size: 0.86rem;
}

.pipeline-quote-lines {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
    font-size: 0.8rem;
    margin-bottom: 0;
    table-layout: fixed;
}

.pipeline-quote-lines.table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #173126;
    color: #ffffff;
    border-bottom: 1px solid #2f684f;
    font-weight: 800;
    letter-spacing: 0;
    padding: 0.46rem 0.55rem;
    white-space: nowrap;
}

.pipeline-quote-lines.table > tbody > tr > td {
    border-color: #e3ebf4;
    padding: 0.3rem 0.35rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    vertical-align: middle;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(1),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(1) {
    width: 42px;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(2),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(2) {
    width: 21%;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(3),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(3) {
    width: 26%;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(4),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(4) {
    width: 20%;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(5),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(5) {
    width: 60px;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(6),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(6) {
    width: 76px;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(7),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(7) {
    width: 92px;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(8),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(8) {
    width: 92px;
}

.pipeline-quote-lines.table > thead > tr > th:nth-child(9),
.pipeline-quote-lines.table > tbody > tr > td:nth-child(9) {
    width: 54px;
}

.pipeline-quote-lines .form-control-sm {
    font-size: 0.78rem;
    min-height: 30px;
    padding: 0.22rem 0.35rem;
}

.pipeline-quote-vendor-fields {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(0, 1fr) minmax(70px, 0.55fr);
}

.pipeline-quote-lines.table > thead > tr > th:first-child,
.pipeline-quote-lines.table > tbody > tr > td:first-child {
    text-align: center;
    width: 46px;
}

.pipeline-quote-lines.table > tbody > tr:hover > td {
    background: #f7fbfa;
}

.pipeline-quote-lines.table > tbody > tr.is-included > td {
    background: #ecfff7;
    border-color: #b8ead8;
}

.pipeline-quote-lines.table > tbody > tr.is-missing-price > td {
    background: #fffdf2;
}

.pipeline-quote-lines.table > tbody > tr.is-included.is-missing-price > td {
    background: #fff8e6;
    border-color: #f4d28a;
}

.pipeline-quote-lines.table > tbody > tr.is-included > td:first-child {
    box-shadow: inset 4px 0 0 #21b883;
}

.pipeline-quote-lines.table > tbody > tr.is-dirty > td:first-child {
    box-shadow: inset 4px 0 0 #e6ad3a;
}

.pipeline-quote-lines [data-quote-save].btn-warning {
    background: #fff3cd;
    border-color: #e6ad3a;
    color: #5f4300;
}

.pipeline-quote-lines .form-check-input,
.quote-scope-check input[type="checkbox"] {
    appearance: none;
    background: #ffffff;
    border: 1.5px solid #9cb1a8;
    border-radius: 5px;
    box-shadow: inset 0 0 0 2px #ffffff;
    cursor: pointer;
    display: inline-grid;
    height: 18px;
    margin: 0;
    place-content: center;
    transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    width: 18px;
}

.pipeline-quote-lines .form-check-input::after,
.quote-scope-check input[type="checkbox"]::after {
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    content: "";
    height: 9px;
    opacity: 0;
    transform: rotate(45deg) translate(-1px, -1px);
    width: 5px;
}

.pipeline-quote-lines .form-check-input:hover,
.quote-scope-check input[type="checkbox"]:hover {
    border-color: #176b4d;
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 3px rgba(33, 184, 131, 0.12);
}

.pipeline-quote-lines .form-check-input:checked,
.quote-scope-check input[type="checkbox"]:checked {
    background: #176b4d;
    border-color: #176b4d;
}

.pipeline-quote-lines .form-check-input:checked::after,
.quote-scope-check input[type="checkbox"]:checked::after {
    opacity: 1;
}

.pipeline-quote-lines .form-check-input:focus,
.quote-scope-check input[type="checkbox"]:focus {
    outline: 0;
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 3px rgba(33, 184, 131, 0.2);
}

.pipeline-quote-lines .form-check-input:active,
.quote-scope-check input[type="checkbox"]:active {
    transform: scale(0.92);
}

.pipeline-quote-lines.table > tbody > tr.pipeline-quote-section-row > td {
    background: #d8e9f7;
    color: #102033;
    font-weight: 700;
    text-transform: uppercase;
}

.pipeline-quote-lines .form-control-sm {
    background: transparent;
    border-color: transparent;
    border-radius: 6px;
    box-shadow: none;
    min-height: 30px;
    min-width: 76px;
    padding: 0.24rem 0.38rem;
    font-size: 0.76rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pipeline-quote-lines .form-control-sm::placeholder {
    color: transparent;
}

.pipeline-quote-lines tr:hover .form-control-sm::placeholder,
.pipeline-quote-lines .form-control-sm:focus::placeholder {
    color: #8da0b3;
}

.pipeline-quote-lines tr:hover .form-control-sm {
    background: #ffffff;
    border-color: #d6e1ee;
}

.pipeline-quote-lines .form-control-sm:focus {
    background: #ffffff;
    border-color: #21b883;
    box-shadow: 0 0 0 3px rgba(33, 184, 131, 0.16);
}

.pipeline-quote-lines td:nth-child(3) .form-control-sm,
.pipeline-quote-lines td:nth-child(4) .form-control-sm {
    min-width: 240px;
}

.pipeline-quote-lines td:nth-child(5) .form-control-sm {
    min-width: 140px;
}

.pipeline-quote-row-warning {
    color: #9a5f00;
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    margin-top: 0.12rem;
}

.quote-scope-check {
    align-items: center;
    display: flex;
    gap: 0.28rem;
    white-space: nowrap;
    color: #475569;
}

.quote-pricing-suggestions {
    display: grid;
    gap: 0.5rem;
    max-height: 260px;
    overflow: auto;
}

.quote-pricing-option {
    align-items: center;
    background: #f8fbfa;
    border: 1px solid #d6e1ee;
    border-radius: 8px;
    color: #142033;
    display: grid;
    gap: 0.12rem 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.65rem 0.75rem;
    text-align: left;
}

.quote-pricing-option:hover,
.quote-pricing-option:focus {
    background: #ecfff7;
    border-color: #21b883;
    box-shadow: 0 0 0 3px rgba(33, 184, 131, 0.14);
}

.quote-pricing-option strong,
.quote-pricing-option span,
.quote-pricing-option small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-pricing-option span,
.quote-pricing-option small {
    color: #64748b;
    font-size: 0.8rem;
}

.quote-pricing-option b {
    color: #176b4d;
    grid-row: span 3;
}

body {
    background: #f4f6f8;
    color: var(--cf-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    min-height: 100vh;
}

a {
    color: var(--cf-primary-dark);
    text-decoration: none;
}

a:hover {
    color: var(--cf-primary);
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid #dfe5eb;
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 28px rgba(23, 33, 43, 0.06);
    min-height: 72px;
}

.navbar-brand {
    color: #111827 !important;
    font-weight: 850;
    letter-spacing: 0;
}

.navbar-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.navbar-project-search {
    flex: 0 1 410px;
    margin: 0 12px 0 18px;
    min-width: 250px;
}

.navbar-project-search-control {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 18px minmax(0, 1fr) 38px;
}

.navbar-project-search-control > svg {
    color: #64748b;
    height: 17px;
    width: 17px;
}

.navbar-project-search-control .form-control {
    background: #ffffff;
    border-color: #d7dee6;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.035);
    font-size: 0.9rem;
    min-height: 38px;
}

.navbar-project-search-control .btn {
    border-radius: 8px;
    height: 38px;
    width: 38px;
}

.brand-mark {
    align-items: center;
    background: #eef2f6;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    box-shadow: none;
    color: #26323f;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.brand-mark svg,
.nav-link svg,
.btn svg,
.alert svg {
    height: 17px;
    width: 17px;
}

.nav-link {
    align-items: center;
    border-radius: 8px;
    color: #364452;
    display: inline-flex;
    gap: 7px;
    margin-inline: 2px;
    min-height: 38px;
    padding-inline: 10px !important;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-link:hover,
.nav-link:focus {
    background: var(--cf-primary-mint);
    color: var(--cf-primary-dark);
}

.nav-link:focus-visible {
    box-shadow: var(--cf-focus);
}

.nav-link:active,
.nav-link.show,
.nav-link.dropdown-toggle.show {
    background: var(--cf-primary-dark);
    color: #ffffff !important;
}

.nav-link:active svg,
.nav-link.show svg,
.nav-link.dropdown-toggle.show svg {
    color: #ffffff;
}

.nav-link.active {
    background: var(--cf-primary-dark);
    border: 1px solid rgba(18, 70, 45, 0.2);
    box-shadow: 0 10px 22px rgba(15, 70, 51, 0.24);
    color: #ffffff !important;
    font-weight: 800;
}

.nav-link.active svg {
    color: #ffffff;
}

.dropdown-item {
    align-items: center;
    border-radius: 7px;
    color: #364452;
    display: flex;
    gap: 8px;
    margin: 2px 6px;
    width: calc(100% - 12px);
}

.dropdown-item svg {
    height: 16px;
    width: 16px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--cf-primary-mint);
    color: var(--cf-primary-dark);
}

.dropdown-item:active,
.dropdown-item.active {
    background: var(--cf-primary-dark);
    color: #ffffff;
    font-weight: 700;
}

.dropdown-item:active svg,
.dropdown-item.active svg {
    color: #ffffff;
}

@media (min-width: 1400px) {
    .app-topbar .container-fluid {
        flex-wrap: wrap;
    }

    .navbar-expand-xxl .navbar-collapse {
        flex-wrap: wrap;
        gap: 8px 0;
        min-width: 0;
    }

    .navbar-expand-xxl .navbar-nav {
        flex-wrap: wrap;
        min-width: 0;
    }

    .navbar-project-search {
        flex: 1 1 220px;
        margin-inline: 10px;
        max-width: 340px;
        min-width: 190px;
    }

    .navbar-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

.app-shell {
    margin: 0 auto;
    max-width: 1500px;
    padding: 32px;
}

.app-shell-full {
    max-width: none;
    padding: 12px;
    width: 100%;
}

.app-breadcrumbs {
    align-items: center;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(215, 222, 230, 0.86);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(23, 33, 43, 0.035);
    display: flex;
    margin: -14px 0 18px;
    min-height: 34px;
    overflow-x: auto;
    padding: 7px 10px;
}

.app-breadcrumbs ol {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.app-breadcrumbs li {
    align-items: center;
    color: var(--cf-muted);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.app-breadcrumbs li + li::before {
    color: #9aa5b1;
    content: "/";
    font-weight: 700;
    margin: 0 8px;
}

.app-breadcrumbs a {
    color: #4b5967;
    text-decoration: none;
}

.app-breadcrumbs a:hover,
.app-breadcrumbs a:focus {
    color: var(--cf-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-breadcrumbs [aria-current="page"] {
    color: var(--cf-ink);
    font-weight: 850;
}

.auth-shell {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(6, 18, 31, 0.92) 0%, rgba(7, 24, 39, 0.78) 34%, rgba(7, 24, 39, 0.16) 70%),
        url("../images/login-construction-bg.png") center center / cover no-repeat;
    display: flex;
    min-height: 100vh;
    justify-content: flex-start;
    padding: clamp(24px, 5vw, 72px);
}

.auth-panel {
    max-width: 430px;
    width: 100%;
}

.auth-panel-login {
    max-width: 460px;
}

.auth-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.auth-brand-login {
    color: #ffffff;
}

.auth-remember-note {
    color: var(--cf-muted);
    font-size: 0.82rem;
    margin: 4px 0 0 26px;
}

.auth-brand h1 {
    font-size: 2.45rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.auth-brand p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 520;
    line-height: 1.45;
    margin: 8px 0 0;
}

.auth-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
}

.page-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-heading h1 {
    font-size: 2rem;
    font-weight: 750;
    margin: 0;
}

.page-subtitle {
    color: var(--cf-muted);
    margin: 6px 0 0;
}

.dashboard-hero-row {
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: -2px 0 18px;
    padding-bottom: 18px;
}

.dashboard-hero-row h1 {
    font-size: 2.25rem;
    font-weight: 850;
    line-height: 1.05;
    margin: 0;
}

.dashboard-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.dashboard-help-modal .modal-header {
    border-bottom-color: var(--cf-line);
    padding: 18px 22px;
}

.dashboard-help-modal .modal-body {
    padding: 18px 22px 22px;
}

.dashboard-help-grid {
    display: grid;
    gap: 14px;
}

.dashboard-help-section {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 14px 16px;
}

.dashboard-help-section h3 {
    color: var(--cf-primary-dark);
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0 0 10px;
}

.dashboard-help-section dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.dashboard-help-section dl div {
    display: grid;
    gap: 2px;
}

.dashboard-help-section dt {
    color: var(--cf-text);
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-help-section dd {
    color: var(--cf-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
}

.eyebrow {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.heading-actions,
.form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-actions {
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    border-radius: 8px;
    font-weight: 650;
}

.btn-primary {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--cf-primary-dark);
    border-color: var(--cf-primary-dark);
}

.btn-icon-label {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    justify-content: center;
}

.btn[aria-busy="true"] {
    cursor: wait;
    opacity: 0.78;
}

.busy-submit-icon.is-spinning {
    animation: cashflow-spin 0.8s linear infinite;
}

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

.btn-icon {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.btn {
    border-radius: 8px;
    font-weight: 750;
    letter-spacing: 0;
}

.btn:focus,
.btn:active,
.form-control:focus,
.form-select:focus {
    box-shadow: var(--cf-focus);
}

.btn-primary {
    background: var(--cf-primary);
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(31, 107, 69, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--cf-primary-dark);
    border-color: transparent;
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: #aeb8c5;
    color: #334155;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: #f4f8fb;
    border-color: #7f8da0;
    color: #0f172a;
}

.form-control,
.form-select {
    border-color: #cfd8e3;
    border-radius: 8px;
}

.table {
    --bs-table-bg: transparent;
    border-color: rgba(148, 163, 184, 0.24);
}

.table thead th {
    background: #f3f6f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.btn-icon-only {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.panel,
.metric-card {
    background: var(--cf-panel);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: var(--cf-panel-shadow-soft);
}

.metric-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-bottom: 22px;
}

.dashboard-action-grid {
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-cash-warning {
    align-items: center;
    background: #7f1d1d;
    border: 1px solid #991b1b;
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(127, 29, 29, 0.18);
    color: #fff7ed;
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 22px;
    padding: 18px 20px;
}

.dashboard-cash-warning-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.dashboard-cash-warning-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-cash-warning-copy span,
.dashboard-cash-warning-copy small {
    color: #fee2e2;
}

.dashboard-cash-warning-copy span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-cash-warning-copy strong {
    color: #ffffff;
    font-size: 1.15rem;
    letter-spacing: 0;
}

.dashboard-cash-warning .btn {
    background: #ffffff;
    border-color: #ffffff;
    color: #7f1d1d;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .dashboard-cash-warning {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-cash-warning .btn {
        grid-column: 1 / -1;
        justify-content: center;
        white-space: normal;
    }
}

.metric-grid-compact {
    margin-bottom: 0;
}

.metric-card {
    padding: 18px;
    position: relative;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-card-feature {
    min-height: 174px;
    overflow: hidden;
    padding: 24px;
}

.metric-card-feature::before {
    border-radius: 8px;
    content: "";
    height: 76px;
    opacity: 0.14;
    position: absolute;
    right: -18px;
    top: -18px;
    transform: rotate(12deg);
    width: 118px;
}

.metric-card-feature strong {
    font-size: 2.15rem;
    letter-spacing: 0;
}

.metric-card-cash {
    background: #ffffff;
    border-color: #d7dee6;
    box-shadow: 0 18px 38px rgba(23, 33, 43, 0.07);
}

.metric-card-cash::before {
    background: #9eb6a5;
}

.metric-card-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.metric-card-link:hover {
    border-color: rgba(31, 107, 69, 0.32);
    box-shadow: 0 20px 44px rgba(31, 107, 69, 0.12);
    transform: translateY(-2px);
}

.metric-card span {
    color: var(--cf-muted);
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.metric-card strong {
    display: block;
    font-size: 1.55rem;
    letter-spacing: 0;
    line-height: 1.2;
}

.metric-card strong.text-danger {
    color: var(--cf-danger);
}

.metric-card strong.text-success {
    color: var(--cf-success);
}

.metric-card small {
    color: var(--cf-muted);
    display: block;
    margin-top: 8px;
    padding-right: 20px;
}

.metric-card-address {
    color: var(--cf-ink) !important;
    font-weight: 750;
}

.metric-card-project-list {
    color: var(--cf-ink);
    display: grid;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.25;
    list-style: none;
    margin: 12px 24px 0 0;
    padding: 0;
}

.metric-card-project-list li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card-missing-schedules {
    align-content: start;
    column-gap: 20px;
    display: grid;
    grid-template-areas:
        "label list"
        "count list"
        "summary list"
        "note note";
    grid-template-columns: minmax(120px, 0.72fr) minmax(170px, 1fr);
}

.metric-card-missing-schedules > span:first-child {
    grid-area: label;
}

.metric-card-missing-schedules > strong {
    grid-area: count;
}

.metric-card-missing-schedules > small {
    grid-area: summary;
}

.metric-card-missing-schedules .metric-card-project-list {
    grid-area: list;
    margin: 0 24px 0 0;
}

.metric-card-missing-schedules .metric-card-note {
    grid-area: note;
    justify-self: start;
}

.metric-card-missing-schedules .metric-help {
    grid-area: auto;
}

@media (max-width: 680px) {
    .metric-card-missing-schedules {
        grid-template-areas:
            "label"
            "count"
            "summary"
            "list"
            "note";
        grid-template-columns: 1fr;
    }

    .metric-card-missing-schedules .metric-card-project-list {
        margin-top: 12px;
    }
}

.metric-card-warning {
    background: #fff6e6;
    border-color: rgba(217, 119, 6, 0.34);
    box-shadow: 0 22px 46px rgba(180, 83, 9, 0.13);
}

.metric-card-warning::before {
    background: #f59e0b;
}

.detail-list {
    display: grid;
    gap: 10px 16px;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
    margin: 0;
}

.detail-list dt {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
    min-width: 0;
}

.stacked-options {
    display: grid;
    gap: 8px;
}

.metric-card-note {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 750;
    margin-top: 14px;
    padding: 5px 9px;
}

.metric-card-note-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.metric-help {
    align-items: center !important;
    background: #ffffff;
    border: 1px solid #cdd8e4;
    border-radius: 999px;
    bottom: 10px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
    color: var(--cf-muted) !important;
    cursor: help;
    display: inline-flex !important;
    height: 22px;
    justify-content: center;
    margin: 0 !important;
    position: absolute;
    right: 10px;
    width: 22px;
    z-index: 60;
}

.metric-help svg {
    height: 14px;
    width: 14px;
}

.metric-help:hover,
.metric-help:focus {
    background: #e8f3f1;
    border-color: #8fc7bd;
    color: var(--cf-primary-dark) !important;
    outline: none;
}

.metric-help::after {
    background: #101828;
    border-radius: 8px;
    bottom: 30px;
    box-shadow: 0 12px 30px rgba(24, 33, 47, 0.22);
    color: #ffffff;
    content: attr(title);
    display: none;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.45;
    max-width: calc(100vw - 48px);
    min-width: min(360px, calc(100vw - 48px));
    padding: 12px 14px;
    pointer-events: none;
    position: absolute;
    right: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
    width: 360px;
    z-index: 999;
}

.metric-help:hover::after,
.metric-help:focus::after {
    display: block;
}

.three-month-target-panel {
    background: var(--cf-panel);
    border-color: rgba(31, 107, 69, 0.2);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.1);
    margin-bottom: 22px;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.three-month-target-panel::before {
    background: var(--cf-primary);
    content: "";
    display: block;
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.dashboard-hero-row {
    align-items: center;
    background: #f7f9fb;
    border-bottom: 1px solid #dfe5eb;
    color: #1d252c;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 28px 28px 24px;
}

.dashboard-hero-row h1 {
    color: #1d252c;
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 900;
    line-height: 1.02;
    margin: 0;
    text-shadow: none;
}

.dashboard-hero-actions .heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-hero-row .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(31, 107, 69, 0.34);
    color: #12462d;
}

.dashboard-hero-row .btn-outline-secondary:hover,
.dashboard-hero-row .btn-outline-secondary:focus {
    background: #eef2f6;
    border-color: rgba(31, 107, 69, 0.58);
    color: #0d2f1f;
}

.three-month-health-header {
    display: flex;
    gap: 14px;
    margin: 24px 28px 18px;
}

.three-month-health-header h2 {
    color: #0b1f38;
    font-size: 1.48rem;
    font-weight: 900;
    margin: 0 0 5px;
}

.three-month-health-icon {
    align-items: center;
    background: var(--cf-primary);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(31, 107, 69, 0.24);
    color: #fff;
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    margin-top: 2px;
    width: 44px;
}

.three-month-health-icon svg {
    height: 24px;
    width: 24px;
}

.three-month-opportunity-note {
    color: var(--cf-muted);
    display: block;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0;
    max-width: 760px;
}

a.three-month-opportunity-note {
    text-decoration: none;
}

a.three-month-opportunity-note:hover {
    color: var(--cf-primary);
}

.three-month-target-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 28px;
}

.three-month-target-grid div {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.07);
    padding: 16px 16px 18px;
    position: relative;
}

.three-month-target-grid div::before {
    background: var(--cf-primary);
    border-radius: 8px 8px 0 0;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.three-month-target-grid span {
    color: var(--cf-muted);
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.three-month-target-grid strong {
    display: block;
    font-size: 1.22rem;
    letter-spacing: 0;
    line-height: 1.2;
}

.three-month-target-grid div > small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 6px;
}

.metric-mini-list {
    display: grid;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.metric-mini-list li {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.metric-mini-list li span {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    text-transform: uppercase;
}

.metric-mini-list li strong {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.15;
    text-align: right;
}

.three-month-target-grid .income-breakdown-split {
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 0.95fr) minmax(120px, 1fr);
    margin-right: 22px;
    min-height: 0;
    padding: 0;
}

.three-month-target-grid .income-breakdown-split::before {
    display: none;
}

.three-month-target-grid .income-breakdown-split > .metric-mini-list {
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    padding-left: 14px;
}

.three-month-target-grid .fixed-costs-split {
    align-items: end;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-right: 22px;
    min-height: 0;
    padding: 0;
}

.three-month-target-grid .fixed-costs-split::before {
    display: none;
}

.three-month-target-grid .fixed-costs-split > div {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
    padding: 0;
}

.three-month-target-grid .fixed-costs-split > div::before {
    display: none;
}

.three-month-target-grid .fixed-costs-percent {
    border-left: 1px solid rgba(148, 163, 184, 0.24) !important;
    min-width: 82px;
    padding-left: 14px !important;
    text-align: right;
}

.three-month-target-grid .fixed-costs-percent strong {
    color: var(--cf-primary-dark);
    font-size: 1.75rem;
}

.three-month-target-grid .fixed-costs-percent small {
    margin-top: 2px;
    padding-right: 0;
}

.three-month-target-grid .three-month-shortfall-card span {
    align-items: center;
    display: flex;
    gap: 7px;
}

.three-month-shortfall-card svg {
    height: 18px;
    width: 18px;
}

.three-month-shortfall-card small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 6px;
}

.three-month-target-grid .target-break-even {
    background: #ecfffb;
    border-color: rgba(20, 184, 166, 0.35);
}

.three-month-target-grid .target-break-even strong {
    color: var(--cf-primary-dark);
}

.three-month-target-grid .target-break-even::before {
    background: #14b8a6;
}

.target-break-even small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 6px;
}

.three-month-target-grid .target-shortfall {
    background: #fff1f3;
    border-color: rgba(244, 63, 94, 0.3);
}

.three-month-target-grid .target-shortfall strong {
    color: var(--cf-danger);
}

.three-month-target-grid .target-shortfall::before {
    background: #f43f5e;
}

.xero-invoice-history-row {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.055);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(190px, 1.2fr) repeat(4, minmax(0, 1fr));
    margin: 20px 28px 0;
    overflow: visible;
    padding: 0;
    position: relative;
    z-index: 30;
}

.xero-invoice-history-row > div {
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0;
    box-shadow: none;
    min-height: 96px;
    padding: 14px 36px 14px 14px;
    position: relative;
}

.xero-invoice-history-row > div:hover,
.xero-invoice-history-row > div:focus-within {
    z-index: 40;
}

.xero-invoice-history-row > div:first-child {
    background: #f4f8fb;
    border-left: 0;
}

.xero-invoice-history-row > .report-month-card {
    padding-right: 76px;
    position: relative;
}

.xero-invoice-history-row span,
.xero-invoice-history-row small {
    color: var(--cf-muted);
    display: block;
}

.xero-invoice-history-row span {
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.xero-invoice-history-row small {
    font-size: 0.68rem;
    line-height: 1.28;
    margin-top: 4px;
}

.xero-invoice-history-row strong {
    color: var(--cf-ink);
    display: block;
    font-size: 1rem;
    letter-spacing: 0;
    line-height: 1.2;
}

.xero-invoice-history-heading strong {
    font-size: 1rem;
}

.xero-invoice-history-row .target-shortfall {
    background: #fff8f1;
}

.xero-invoice-history-row .target-shortfall strong {
    color: #9a3412;
}

.report-download-link {
    align-items: center;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    color: var(--cf-primary-dark);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 10px;
    text-decoration: none;
    top: 10px;
    width: 28px;
}

.report-download-link:hover {
    background: #eef2f6;
    border-color: #c8d2dc;
    color: var(--cf-primary-dark);
}

.report-download-link svg {
    height: 13px;
    width: 13px;
}

.xero-invoice-history-row .metric-help,
.three-month-target-grid .metric-help,
.metric-card .metric-help {
    align-items: center !important;
    display: inline-flex !important;
    font-size: 0 !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.xero-invoice-history-row .metric-help::after {
    bottom: 30px;
    right: -10px;
    top: auto;
}

.xero-invoice-history-row .metric-help svg,
.three-month-target-grid .metric-help svg,
.metric-card .metric-help svg {
    height: 14px;
    width: 14px;
}

.dashboard-page-executive .three-month-target-panel {
    background:
        linear-gradient(135deg, rgba(6, 24, 39, 0.98) 0%, rgba(9, 45, 55, 0.96) 50%, rgba(15, 118, 110, 0.92) 100%);
    border-color: rgba(20, 184, 166, 0.42);
    box-shadow: 0 30px 70px rgba(6, 24, 39, 0.24);
}

.dashboard-page-executive .three-month-target-panel::before {
    background: linear-gradient(90deg, #2dd4bf 0%, #38bdf8 52%, #d97706 100%);
}

.dashboard-page-executive .dashboard-hero-row {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.dashboard-page-executive .dashboard-hero-row h1 {
    color: #ffffff;
    text-shadow: none;
}

.dashboard-page-executive .three-month-health-header .eyebrow,
.dashboard-page-executive .three-month-health-header h2 {
    color: #ffffff;
}

.dashboard-page-executive .three-month-opportunity-note {
    color: #ccfbf1;
}

.dashboard-page-executive a.three-month-opportunity-note:hover {
    color: #ffffff;
}

.dashboard-page-executive .three-month-health-icon {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.dashboard-page-executive .three-month-target-grid > div {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.12);
    color: #ffffff;
}

.dashboard-page-executive .three-month-target-grid > div::before {
    background: linear-gradient(90deg, #2dd4bf, #38bdf8);
}

.dashboard-page-executive .three-month-target-grid span,
.dashboard-page-executive .three-month-target-grid div > small,
.dashboard-page-executive .target-break-even small,
.dashboard-page-executive .metric-mini-list li span {
    color: rgba(226, 252, 247, 0.74);
}

.dashboard-page-executive .three-month-target-grid strong,
.dashboard-page-executive .metric-mini-list li strong,
.dashboard-page-executive .three-month-target-grid .target-break-even strong,
.dashboard-page-executive .three-month-target-grid .fixed-costs-percent strong {
    color: #ffffff;
}

.dashboard-page-executive .three-month-target-grid .target-shortfall {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(251, 113, 133, 0.42);
}

.dashboard-page-executive .three-month-target-grid .target-shortfall::before {
    background: #fb7185;
}

.dashboard-page-executive .three-month-target-grid .target-break-even {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.45);
}

.dashboard-page-executive .three-month-target-grid .income-breakdown-split,
.dashboard-page-executive .three-month-target-grid .fixed-costs-split,
.dashboard-page-executive .three-month-target-grid .fixed-costs-split > div {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.dashboard-page-executive .three-month-target-grid .income-breakdown-split > .metric-mini-list,
.dashboard-page-executive .three-month-target-grid .fixed-costs-percent {
    border-left-color: rgba(255, 255, 255, 0.22) !important;
}

.dashboard-page-executive .xero-invoice-history-row {
    background: rgba(4, 18, 32, 0.32);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.dashboard-page-executive .xero-invoice-history-row > div:first-child {
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-page-executive .xero-invoice-history-row > div {
    border-left-color: rgba(255, 255, 255, 0.14);
}

.dashboard-page-executive .xero-invoice-history-row span,
.dashboard-page-executive .xero-invoice-history-row small {
    color: rgba(226, 252, 247, 0.74);
}

.dashboard-page-executive .xero-invoice-history-row strong {
    color: #ffffff;
}

.dashboard-page-executive .xero-invoice-history-row .target-shortfall {
    background: rgba(251, 146, 60, 0.14);
}

.dashboard-page-executive .xero-invoice-history-row .target-shortfall strong {
    color: #fed7aa;
}

.dashboard-page-executive .report-download-link,
.dashboard-page-executive .xero-invoice-history-row .metric-help,
.dashboard-page-executive .three-month-target-grid .metric-help {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ccfbf1 !important;
}

.dashboard-page-executive .dashboard-action-grid .metric-card-feature,
.dashboard-page-executive .dashboard-grid > .panel,
.dashboard-page-executive .content-grid > .panel {
    border-color: rgba(15, 118, 110, 0.18);
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.1);
}

.dashboard-page-executive .dashboard-action-grid .metric-card-feature {
    background:
        linear-gradient(135deg, rgba(7, 24, 39, 0.98) 0%, rgba(13, 48, 58, 0.94) 100%);
    border-color: rgba(45, 212, 191, 0.22);
    border-top: 3px solid #14b8a6;
    box-shadow: 0 24px 58px rgba(6, 24, 39, 0.18);
}

.dashboard-page-executive .dashboard-action-grid .metric-card-warning {
    background:
        linear-gradient(135deg, rgba(39, 24, 7, 0.98) 0%, rgba(68, 43, 15, 0.94) 100%);
    border-color: rgba(251, 191, 36, 0.32);
    border-top-color: #d97706;
}

.dashboard-page-executive .dashboard-action-grid .metric-card-cash {
    background:
        linear-gradient(135deg, rgba(6, 24, 39, 0.98) 0%, rgba(12, 45, 73, 0.94) 100%);
    border-color: rgba(56, 189, 248, 0.3);
    border-top-color: #0ea5e9;
}

.dashboard-page-executive .dashboard-action-grid .metric-card span,
.dashboard-page-executive .dashboard-action-grid .metric-card small {
    color: rgba(226, 252, 247, 0.72);
}

.dashboard-page-executive .dashboard-action-grid .metric-card strong {
    color: #ffffff;
}

.dashboard-page-executive .dashboard-action-grid .metric-card strong.text-danger {
    color: #fb7185;
}

.dashboard-page-executive .dashboard-action-grid .metric-card-note-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.32);
    color: #fde68a;
}

.dashboard-page-executive .dashboard-action-grid .metric-card .metric-help {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ccfbf1 !important;
}

.dashboard-page-executive .dashboard-grid > .panel,
.dashboard-page-executive .content-grid > .panel {
    background:
        linear-gradient(180deg, rgba(7, 24, 39, 0.98) 0%, rgba(9, 33, 48, 0.96) 100%);
    border-color: rgba(45, 212, 191, 0.2);
    border-top: 3px solid rgba(15, 118, 110, 0.72);
    color: #e5f6f4;
}

.dashboard-page-executive .dashboard-grid .section-heading h2,
.dashboard-page-executive .content-grid .section-heading h2 {
    color: #ffffff;
    font-weight: 850;
}

.dashboard-page-executive .dashboard-grid .section-heading small,
.dashboard-page-executive .content-grid .section-heading small {
    color: rgba(226, 252, 247, 0.68);
}

.dashboard-page-executive .alert-row-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.28);
}

.dashboard-page-executive .alert-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dashboard-page-executive .alert-row-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dashboard-page-executive .alert-row strong {
    color: #ffffff;
}

.dashboard-page-executive .alert-row span {
    color: rgba(226, 252, 247, 0.7);
}

.dashboard-page-executive .alert-icon {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fde68a;
}

.dashboard-page-executive .forecast-break-even-status.is-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.32);
    color: #fde68a;
}

.dashboard-page-executive .forecast-break-even-status.is-good {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.32);
    color: #ccfbf1;
}

.dashboard-page-executive .dashboard-grid .metric-help,
.dashboard-page-executive .content-grid .metric-help {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ccfbf1 !important;
}

.dashboard-page-executive .content-grid .section-heading-padded {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dashboard-page-executive .content-grid .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e5f6f4;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    --bs-table-hover-color: #ffffff;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-striped-color: #e5f6f4;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5f6f4;
}

.dashboard-page-executive .content-grid .table thead th {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(226, 252, 247, 0.74);
}

.dashboard-page-executive .content-grid .table td,
.dashboard-page-executive .content-grid .table th {
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5f6f4;
}

.dashboard-page-executive .content-grid .table-hover > tbody > tr:hover > * {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.dashboard-page-executive .content-grid .table .fw-semibold,
.dashboard-page-executive .content-grid .table td.text-end:not(.text-success):not(.text-danger) {
    color: #ffffff !important;
}

.dashboard-page-executive .content-grid a {
    color: #67e8f9;
}

.dashboard-page-executive .content-grid .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.dashboard-page-executive .content-grid .text-success {
    color: #34d399 !important;
}

.dashboard-page-executive .content-grid .text-danger {
    color: #fb7185 !important;
}

.dashboard-page-executive .empty-state {
    color: rgba(226, 252, 247, 0.7);
}

.dashboard-grid,
.content-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
}

.dashboard-grid > *,
.content-grid > *,
.metric-grid > *,
.dashboard-action-grid > *,
.fixed-expense-preview-grid > *,
.settings-layout > *,
.settings-grid > *,
.settings-content,
.settings-tab-panel,
.system-deploy-status-grid > *,
.system-deploy-main-grid > *,
.panel,
.table-responsive {
    min-width: 0;
    max-width: 100%;
}

.table-responsive {
    width: 100%;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-heading-padded {
    border-bottom: 1px solid var(--cf-line);
    margin-bottom: 0;
    padding: 16px 18px;
}

.section-heading h2 {
    font-size: 1rem;
    font-weight: 750;
    margin: 0;
}

.section-heading small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 2px;
}

.forecast-break-even-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 750;
    margin-left: auto;
    padding: 5px 9px;
}

.forecast-break-even-status.is-good {
    background: #ecfdf3;
    border: 1px solid #b7e4c7;
    color: #087443;
}

.forecast-break-even-status.is-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.section-subtitle {
    color: var(--cf-muted);
    font-size: 0.86rem;
    margin: 4px 0 0;
}

.project-form-flow {
    display: grid;
    gap: 0;
}

.project-form-section {
    border-top: 1px solid var(--cf-line);
    padding: 22px 0;
}

.project-form-section:first-child {
    border-top: 0;
    padding-top: 0;
}

.project-form-section-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.project-form-section-header h2 {
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0;
}

.project-form-section-header p {
    color: var(--cf-muted);
    font-size: 0.86rem;
    margin: 4px 0 0;
}

.project-form-step {
    align-items: center;
    background: #eef2f6;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    color: var(--cf-primary-dark);
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 0.78rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
}

.pipeline-create-panel {
    border-top: 4px solid var(--cf-primary);
    overflow: hidden;
    padding: 0 !important;
}

.pipeline-create-panel .project-form-section {
    border-top: 0;
    padding: 0;
}

.pipeline-create-panel .project-form-section + .project-form-section {
    border-top: 1px solid #dfe7ee;
}

.pipeline-create-panel .project-form-section-header {
    align-items: center;
    background: #f1f8f5;
    border-bottom: 1px solid #cfe5dc;
    border-left: 0;
    border-right: 0;
    gap: 0;
    margin: 0;
    min-height: 0;
    padding: 18px 22px;
}

.pipeline-create-panel .project-form-section:nth-of-type(2) .project-form-section-header {
    background: #f3f7fb;
    border-bottom-color: #cddcea;
}

.pipeline-create-panel .project-form-section:nth-of-type(3) .project-form-section-header {
    background: #fff7ed;
    border-bottom-color: #f3d3ab;
}

.pipeline-create-panel .project-form-section-header h2 {
    font-size: 1.02rem;
}

.pipeline-create-panel .project-form-step {
    background: #ffffff;
    border-color: rgba(23, 107, 77, 0.24);
    box-shadow: 0 6px 16px rgba(23, 33, 43, 0.08);
}

.pipeline-create-panel .pipeline-validation-alert {
    border-radius: 0;
    border-width: 0 0 1px;
    margin: 0;
    padding: 14px 22px;
}

.pipeline-create-panel .is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.pipeline-create-panel .project-form-section > .row,
.pipeline-create-panel .pipeline-form-groups,
.pipeline-create-panel .project-form-section > .form-label,
.pipeline-create-panel .project-form-section > .form-control,
.pipeline-create-panel .pipeline-notes-body {
    margin-left: 22px;
    margin-right: 22px;
    max-width: 1040px;
}

.pipeline-create-panel .project-form-section > .row {
    padding-bottom: 20px;
    padding-top: 18px;
}

.pipeline-create-panel .pipeline-form-groups {
    display: grid;
    gap: 0;
    padding-bottom: 18px;
    padding-top: 16px;
}

.pipeline-create-panel .pipeline-form-group {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e5eaef;
    border-radius: 0;
    display: grid;
    gap: 18px;
    grid-template-columns: 145px minmax(0, 1fr);
    padding: 12px 0;
}

.pipeline-create-panel .pipeline-form-group:last-child {
    border-bottom: 0;
}

.pipeline-create-panel .pipeline-form-group-heading {
    align-items: flex-start;
    border-bottom: 0;
    display: flex;
    margin-bottom: 0;
    min-height: 0;
    padding-top: 30px;
}

.pipeline-create-panel .pipeline-form-group-heading h3 {
    color: #23313d;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    margin: 0;
}

.pipeline-create-panel .pipeline-followup-panel {
    background: #f8fbfa;
    border: 1px solid #cfe5dc;
    border-left: 4px solid var(--cf-primary);
    border-radius: 8px;
    padding: 14px;
}

.pipeline-create-panel .pipeline-followup-panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pipeline-create-panel .pipeline-followup-panel-heading h3 {
    font-size: 0.94rem;
    font-weight: 850;
    margin: 0;
}

.pipeline-create-panel .pipeline-followup-panel-heading p {
    color: var(--cf-muted);
    font-size: 0.82rem;
    margin: 3px 0 0;
}

.pipeline-create-panel .pipeline-notes-body {
    padding-bottom: 20px;
    padding-top: 18px;
}

.pipeline-create-panel .project-form-section > .form-label {
    margin: 22px 22px 0;
}

.pipeline-create-panel .project-form-section > textarea.form-control {
    margin: 8px 22px 0;
    width: calc(100% - 44px);
}

.pipeline-create-panel .form-actions {
    background: #f8fafb;
    border-top: 1px solid #dfe7ee;
    margin: 0;
    padding: 16px 22px;
}

@media (max-width: 900px) {
    .pipeline-create-panel .project-form-section {
        display: block;
    }

    .pipeline-create-panel .project-form-section-header {
        border-bottom: 1px solid #dce8e2;
        border-right: 0;
        min-height: 0;
    }

    .pipeline-create-panel .pipeline-form-groups,
    .pipeline-create-panel .project-form-section > .row,
    .pipeline-create-panel .pipeline-notes-body {
        padding: 16px;
    }
}

.project-owner-panel {
    background: #f7f9fb;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 14px;
}

.project-owner-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.project-owner-panel p {
    color: var(--cf-muted);
    margin: 3px 0 0;
}

.project-sections {
    margin-top: 14px;
}

.project-legacy-banner,
.project-hero {
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(23, 33, 43, 0.07);
    color: #17212b;
}

.project-hero {
    display: block;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.project-hero-main {
    background: #ffffff;
    border-left: 5px solid #176b4d;
    display: grid;
    gap: 10px;
    padding: 18px 22px;
}

.pipeline-hero .project-hero-main {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
}

.pipeline-hero-copy {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.pipeline-hero-notes {
    background: linear-gradient(135deg, #f8fafc 0%, #eef7f3 100%);
    border: 1px solid #d7e6df;
    border-left: 4px solid #176b4d;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 11px 13px;
}

.pipeline-hero-notes span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pipeline-hero-notes p {
    color: #17212b;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0;
    max-height: 86px;
    overflow: auto;
    white-space: pre-wrap;
}

.pipeline-hero-notes.is-empty p {
    color: #94a3b8;
    font-style: italic;
    font-weight: 650;
}

.project-hero-title-row {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.project-hero-title-row .eyebrow {
    margin-bottom: 5px;
}

.pipeline-hero-created {
    align-items: center;
    color: #526173;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 750;
    gap: 6px;
    margin-left: auto;
    white-space: nowrap;
}

.pipeline-hero-created i {
    color: #176b4d;
    height: 16px;
    width: 16px;
}

.project-hero-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-self: end;
    min-width: min(420px, 45vw);
}

.project-status-rail {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.project-status-rail .status-pill {
    min-height: 28px;
    padding: 6px 10px;
}

.status-pill-legacy {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    border-color: #92400e;
    box-shadow: 0 8px 18px rgba(146, 64, 14, 0.22);
    color: #ffffff;
}

.project-hero-contacts {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    max-width: 560px;
    width: 100%;
}

.project-hero-contacts span {
    background: #f8fafc;
    border: 1px solid #dfe5eb;
    border-radius: 8px;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 11px;
    text-align: right;
}

.project-hero-contacts small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-hero-contacts strong {
    color: #17212b;
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-hero h1 {
    color: #17212b;
    font-size: 1.38rem;
    font-weight: 850;
    line-height: 1.15;
    margin: 0;
}

.project-hero-title-mobile {
    display: none;
}

.project-hero-address {
    align-items: center;
    color: #475569;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.project-hero-address svg {
    color: var(--cf-primary);
    flex: 0 0 auto;
    height: 17px;
    width: 17px;
}

.project-hero-address strong {
    font-size: 0.96rem;
    font-weight: 800;
    min-width: 0;
}

.project-hero-warning-stack {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-hero-warning {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    text-decoration: none;
    width: fit-content;
}

.project-hero-warning:hover {
    background: #ffedd5;
    color: #7c2d12;
}

.project-hero-warning svg {
    flex: 0 0 auto;
    height: 16px;
    width: 16px;
}

.project-hero-warning span {
    font-size: 0.86rem;
    font-weight: 800;
}

.project-hero-warning strong {
    color: #7c2d12;
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.project-section-tabs {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(23, 33, 43, 0.055);
    gap: 6px;
    margin: 16px 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
}

.project-section-loading {
    opacity: 0.62;
    pointer-events: none;
    position: relative;
}

.project-section-loading::after {
    background: rgba(255, 255, 255, 0.68);
    border-radius: 8px;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.project-section-tabs .nav-item {
    margin-bottom: 0;
}

.project-section-tabs .pipeline-stage-tab-status {
    align-items: center;
    display: inline-flex;
    margin-left: auto;
    padding-right: 4px;
}

.project-section-tabs .nav-link {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    display: inline-flex;
    font-weight: 750;
    gap: 6px;
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
}

.project-section-tabs .nav-link svg {
    height: 15px;
    width: 15px;
}

.project-section-tabs .nav-link:hover,
.project-section-tabs .nav-link:focus {
    background: var(--cf-primary-mint);
    border-color: #c7e4d9;
    color: var(--cf-primary-dark);
}

.project-section-tabs .nav-link:active {
    background: var(--cf-primary-dark);
    border-color: var(--cf-primary-dark);
    color: #ffffff !important;
}

.project-section-tabs .nav-link:active svg {
    color: #ffffff;
}

.project-section-tabs .nav-link.active {
    background: var(--cf-primary-dark);
    border-color: var(--cf-primary-dark);
    box-shadow: 0 10px 20px rgba(15, 70, 51, 0.24);
    color: #ffffff !important;
    font-weight: 850;
}

.project-section-content {
    background: transparent;
}

.project-section-content > .tab-pane {
    outline: 0;
}

.project-tab-form {
    margin: 0;
}

.project-legacy-grid {
    display: grid;
    gap: 16px;
    padding: 0;
}

.project-legacy-grid-home,
.project-legacy-grid-contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-legacy-grid-billing,
.project-legacy-grid-budget,
.project-legacy-grid-costs {
    grid-template-columns: minmax(0, 1fr);
}

.project-legacy-panel {
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(23, 33, 43, 0.055);
    min-width: 0;
    overflow: hidden;
}

.project-progress-panel {
    max-width: 560px;
}

.project-legacy-panel h2 {
    background: #f7f9fb;
    border-bottom: 1px solid #dfe5eb;
    color: #17212b;
    font-size: 0.95rem;
    font-weight: 850;
    margin: 0;
    padding: 15px 18px 12px;
}

.project-legacy-panel-body {
    padding: 18px;
}

.project-field-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 126px minmax(0, 1fr);
    margin-bottom: 10px;
}

.project-field-row label {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.25;
    margin: 0;
}

.project-field-row .form-control,
.project-field-row .form-select {
    background-color: #ffffff;
    border-color: #d7dee6;
    border-radius: 7px;
    font-size: 0.9rem;
    min-height: 36px;
    padding: 6px 10px;
}

.project-field-row .form-control:focus,
.project-field-row .form-select:focus,
.project-notes-label + textarea:focus {
    border-color: var(--cf-primary);
    box-shadow: 0 0 0 3px rgba(31, 107, 69, 0.14);
}

.project-field-row .form-control[readonly] {
    background: #f1f3f5;
    color: #64748b;
}

.project-field-row-tall {
    align-items: start;
}

.project-field-row-tall textarea {
    min-height: 72px;
    resize: vertical;
}

.project-field-row-readonly .form-control {
    font-weight: 650;
}

.project-inline-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.project-tab-actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.project-save-strip {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.pipeline-tab-form {
    display: contents;
}

.pipeline-home-details {
    grid-column: 1;
}

.pipeline-home-notes {
    grid-column: 2 / span 2;
}

.pipeline-tab-save {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: -2px;
}

.pipeline-home-save {
    grid-column: 1 / -1;
}

.pipeline-convert-requirements {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.pipeline-convert-requirement-card {
    background: #f8faf9;
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 14px;
}

.pipeline-convert-requirement-card h3 {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0 0 10px;
}

.pipeline-convert-requirement-card ul {
    display: grid;
    gap: 7px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pipeline-convert-requirement-card li {
    align-items: flex-start;
    color: var(--muted);
    display: flex;
    font-size: 0.9rem;
    gap: 8px;
    line-height: 1.25;
}

.pipeline-convert-requirement-card li i {
    flex: 0 0 auto;
    height: 16px;
    margin-top: 1px;
    width: 16px;
}

.pipeline-convert-requirement-card li span {
    display: grid;
    gap: 2px;
}

.pipeline-convert-requirement-card li small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pipeline-convert-requirement-card li.is-ready {
    color: #0f6f50;
}

.pipeline-convert-requirement-card li.is-missing {
    color: #9a3412;
}

.pipeline-convert-requirement-card li.is-pending {
    color: #344256;
}

.pipeline-convert-actions {
    border-top: 1px solid var(--border);
    margin-top: 22px;
    padding-top: 18px;
}

.pipeline-convert-actions h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 12px;
}

.pipeline-danger-actions {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pipeline-danger-actions .btn {
    justify-content: center;
    min-width: 142px;
}

@media (max-width: 1100px) {
    .app-shell.pipeline-quote-shell-active {
        padding-left: 0;
        padding-right: 0;
    }

    .pipeline-quote-workspace {
        margin-left: 0;
        margin-right: 0;
    }

    .pipeline-quote-toolbar {
        align-items: stretch;
        flex-direction: column;
        position: static;
    }

    .pipeline-quote-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.15rem;
    }

    .pipeline-quote-toolbar .muted-small {
        white-space: normal;
    }

    .pipeline-quote-toolbar-actions {
        justify-content: flex-start;
    }

    .pipeline-quote-stage-form {
        flex-wrap: wrap;
    }

    .pipeline-quote-stage-form > input {
        min-width: 220px;
        width: min(100%, 320px);
    }

    .pipeline-quote-builder {
        grid-template-columns: 1fr;
    }

    .pipeline-quote-nav {
        border-bottom: 1px solid #d7dee8;
        border-right: 0;
        display: flex;
        gap: 0.5rem;
        max-height: none;
        overflow-x: auto;
        padding: 0.75rem;
        position: static;
    }

    .pipeline-quote-nav-heading {
        display: none;
    }

    .pipeline-quote-nav-stage {
        display: flex;
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .pipeline-quote-nav button {
        min-width: 190px;
    }

    .pipeline-quote-nav-category {
        margin-left: 0;
    }

    .pipeline-quote-stages {
        padding: 1rem;
    }

    .pipeline-quote-lines-placeholder {
        align-items: stretch;
        flex-direction: column;
    }

    .pipeline-quote-lines-placeholder .btn {
        justify-content: center;
    }

    .pipeline-convert-requirements {
        grid-template-columns: 1fr;
    }

    .project-legacy-grid-home,
    .project-legacy-grid-contact {
        grid-template-columns: 1fr;
    }

    .pipeline-home-details,
    .pipeline-home-notes,
    .pipeline-home-save,
    .pipeline-tab-save {
        grid-column: 1;
        grid-row: auto;
    }
}

.page-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.pipeline-dashboard-heading {
    align-items: end;
}

.pipeline-command-panel {
    align-items: center;
    background: linear-gradient(135deg, #0f5138 0%, #12604c 50%, #116466 100%);
    border: 1px solid rgba(13, 80, 62, 0.22);
    border-radius: 12px;
    box-shadow: 0 18px 38px rgba(15, 70, 51, 0.18);
    color: #ffffff;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 16px;
    overflow: hidden;
    padding: 22px;
}

.pipeline-command-title {
    display: grid;
    gap: 6px;
}

.pipeline-command-title p {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.5;
    margin: 0;
    text-transform: uppercase;
}

.pipeline-command-title h1 {
    color: #ffffff;
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    font-weight: 500;
    line-height: 1;
    margin: 0;
}

.pipeline-command-summary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    justify-items: end;
    min-width: 220px;
    padding: 12px 14px;
    text-align: right;
}

.pipeline-command-summary .pipeline-card-label-row {
    justify-content: flex-end;
    width: auto;
}

.pipeline-command-summary .pipeline-help-icon {
    margin-left: 6px;
}

.pipeline-card-label-row {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.pipeline-help-icon {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    flex: 0 0 auto;
    opacity: 0.8;
}

.pipeline-help-icon svg {
    height: 15px;
    stroke-width: 2.4;
    width: 15px;
}

.pipeline-command-panel .pipeline-help-icon {
    color: rgba(255, 255, 255, 0.84);
}

.pipeline-list-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #0f5138 0%, #12604c 54%, #116466 100%);
    border: 1px solid rgba(13, 80, 62, 0.22);
    border-radius: 12px;
    box-shadow: 0 18px 38px rgba(15, 70, 51, 0.18);
    color: #ffffff;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 0.85fr) minmax(520px, 1.5fr) auto;
    margin-bottom: 16px;
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.project-list-hero {
    grid-template-columns: minmax(0, 1fr) auto;
}

.pipeline-list-hero::after {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(255, 255, 255, 0));
    content: "";
    height: 170px;
    pointer-events: none;
    position: absolute;
    right: -58px;
    top: -72px;
    transform: rotate(12deg);
    width: 250px;
}

.pipeline-list-hero-main,
.pipeline-list-hero-stats,
.pipeline-list-hero-actions {
    position: relative;
    z-index: 1;
}

.pipeline-list-hero .eyebrow {
    color: rgba(255, 255, 255, 0.75);
}

.pipeline-list-hero h1 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1;
    margin: 0;
}

.pipeline-list-hero-main p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.94rem;
    font-weight: 650;
    margin: 12px 0 0;
    max-width: 520px;
}

.pipeline-list-hero-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-list-hero-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    min-height: 104px;
    padding: 14px;
}

.pipeline-list-hero-stat.is-gold {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.9));
    border-color: rgba(255, 255, 255, 0.28);
}

.pipeline-list-hero-stat span {
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pipeline-list-hero-stat strong {
    color: #ffffff;
    display: block;
    font-size: clamp(1.35rem, 2.5vw, 2.2rem);
    line-height: 1;
    margin-top: 11px;
}

.pipeline-list-hero-stat small {
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 0.76rem;
    font-weight: 760;
    margin-top: 8px;
}

.pipeline-list-hero-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pipeline-list-hero-actions .btn {
    justify-content: center;
    min-width: 172px;
}

.pipeline-row-note {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.2;
    margin-top: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-row-note span {
    color: #0f766e;
    font-weight: 900;
    margin-right: 4px;
}

.pipeline-heading-help {
    margin-left: 6px;
    vertical-align: -2px;
}

.pipeline-detail-trigger {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.pipeline-detail-trigger:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.38);
    outline-offset: 3px;
}

.pipeline-command-kicker,
.pipeline-command-summary span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pipeline-command-summary .pipeline-help-icon,
.pipeline-metric-card .pipeline-help-icon {
    letter-spacing: 0;
    text-transform: none;
}

.pipeline-command-summary strong {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 700;
    line-height: 1;
}

.pipeline-command-summary .pipeline-command-note {
    font-size: 0.78rem;
    letter-spacing: 0;
    text-align: right;
    text-transform: none;
}

.pipeline-command-summary.pipeline-detail-trigger {
    background: transparent;
    color: inherit;
    padding: 0;
}

.pipeline-metric-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.pipeline-metric-card {
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-left: 5px solid #0f766e;
    border-radius: 10px;
    box-shadow: 0 12px 26px rgba(23, 33, 43, 0.055);
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
}

.pipeline-metric-card:hover {
    box-shadow: 0 16px 32px rgba(23, 33, 43, 0.1);
    transform: translateY(-1px);
}

.pipeline-metric-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.pipeline-metric-card strong {
    color: #111827;
    font-size: 1.55rem;
    line-height: 1.1;
}

.pipeline-metric-card small {
    color: #64748b;
    font-weight: 650;
}

.pipeline-metric-card.is-green {
    border-left-color: #0f766e;
}

.pipeline-metric-card.is-teal {
    border-left-color: #0d9488;
}

.pipeline-metric-card.is-blue {
    border-left-color: #2563eb;
}

.pipeline-metric-card.is-amber {
    border-left-color: #d97706;
}

.pipeline-metric-card.is-rose {
    border-left-color: #be123c;
}

.pipeline-dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    margin-bottom: 16px;
}

.pipeline-dashboard-card {
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(23, 33, 43, 0.055);
    overflow: hidden;
}

.pipeline-contract-action-card {
    margin-bottom: 16px;
}

.pipeline-card-heading {
    align-items: start;
    border-bottom: 1px solid #e4e9ef;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px 18px;
}

.pipeline-card-heading h2 {
    color: #17212b;
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.pipeline-card-heading p,
.pipeline-card-heading span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
    margin: 3px 0 0;
}

.pipeline-stage-list,
.pipeline-schedule-list {
    display: grid;
}

.pipeline-stage-row,
.pipeline-schedule-row {
    align-items: center;
    color: inherit;
    display: grid;
    gap: 14px;
    padding: 13px 18px;
    text-decoration: none;
    width: 100%;
}

.pipeline-stage-row {
    background: #ffffff;
    border: 0;
    grid-template-columns: minmax(180px, 0.7fr) minmax(160px, 1fr) minmax(130px, 0.35fr);
}

.pipeline-schedule-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
}

.pipeline-stage-row + .pipeline-stage-row,
.pipeline-schedule-row + .pipeline-schedule-row {
    border-top: 1px solid #edf0f4;
}

.pipeline-stage-row:hover,
.pipeline-schedule-row:hover {
    background: #f8fafc;
}

.pipeline-stage-main,
.pipeline-stage-money,
.pipeline-schedule-row div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pipeline-stage-main strong,
.pipeline-schedule-row strong {
    color: #123f32;
    font-weight: 850;
}

.pipeline-stage-main span,
.pipeline-stage-money span,
.pipeline-schedule-row span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 650;
}

.pipeline-stage-bar {
    background: #e7edf1;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.pipeline-stage-bar span {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.pipeline-stage-money {
    text-align: right;
}

.pipeline-schedule-row time {
    background: #eefbf6;
    border: 1px solid #bcebd8;
    border-radius: 9px;
    color: #0f5138;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 8px 4px;
    text-align: center;
}

.pipeline-schedule-row b {
    color: #17212b;
    font-weight: 850;
}

.pipeline-forecast-card {
    margin-bottom: 16px;
}

.pipeline-forecast-chart {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-height: 260px;
    padding: 18px;
}

.pipeline-forecast-legend {
    align-items: center;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 0 18px 14px;
}

.pipeline-forecast-legend span {
    align-items: center;
    color: #475569;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 7px;
}

.pipeline-forecast-legend i {
    border-radius: 4px;
    display: inline-block;
    height: 12px;
    width: 18px;
}

.pipeline-forecast-legend .is-scheduled {
    background: #d99a17;
}

.pipeline-forecast-legend .is-pipeline {
    background: #0f766e;
}

.pipeline-forecast-column {
    display: grid;
    gap: 10px;
    grid-template-rows: minmax(150px, 1fr) auto;
    min-width: 0;
}

.pipeline-forecast-column-button {
    background: transparent;
    color: inherit;
    padding: 0;
}

.pipeline-forecast-column-button:hover .pipeline-forecast-bar-wrap {
    border-color: #99f6e4;
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.22);
}

.pipeline-forecast-bar-wrap {
    align-items: end;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    min-height: 150px;
    overflow: hidden;
    padding: 6px;
}

.pipeline-forecast-stack {
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    width: 100%;
}

.pipeline-forecast-bar {
    border-radius: 7px;
    display: block;
    min-height: 4px;
    width: 100%;
}

.pipeline-forecast-bar.is-scheduled {
    background: linear-gradient(180deg, #f4c95d 0%, #d99a17 100%);
    box-shadow: 0 10px 20px rgba(217, 154, 23, 0.16);
}

.pipeline-forecast-bar.is-pipeline {
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.pipeline-forecast-bar + .pipeline-forecast-bar {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.pipeline-forecast-bar:first-child:not(:last-child) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.pipeline-forecast-label {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: center;
}

.pipeline-forecast-label strong {
    color: #17212b;
    font-size: 0.88rem;
    font-weight: 900;
}

.pipeline-forecast-label span {
    color: #123f32;
    font-size: 0.72rem;
    font-weight: 850;
}

.pipeline-forecast-label small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 650;
}

.pipeline-billing-estimate-form {
    align-items: end;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(130px, 1fr);
}

.pipeline-billing-estimate-form label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.pipeline-billing-estimate-control {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(120px, 1fr) 34px;
}

.pipeline-billing-estimate-control .btn {
    min-height: 32px;
}

.pipeline-focus-table th {
    white-space: nowrap;
}

.pipeline-contract-action-card .pipeline-focus-table {
    table-layout: fixed;
    width: 100%;
}

.pipeline-contract-action-card .pipeline-focus-table th:first-child,
.pipeline-contract-action-card .pipeline-focus-table td:first-child {
    overflow: hidden;
    width: 32%;
}

.pipeline-contract-action-card .pipeline-focus-table th:nth-child(2),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(2) {
    width: 11%;
}

.pipeline-contract-action-card .pipeline-focus-table th:nth-child(3),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(3) {
    width: 10%;
}

.pipeline-contract-action-card .pipeline-focus-table th:nth-child(4),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(4),
.pipeline-contract-action-card .pipeline-focus-table th:nth-child(5),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(5),
.pipeline-contract-action-card .pipeline-focus-table th:nth-child(7),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(7) {
    width: 11%;
}

.pipeline-contract-action-card .pipeline-focus-table th:nth-child(6),
.pipeline-contract-action-card .pipeline-focus-table td:nth-child(6) {
    width: 14%;
}

.pipeline-warning-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pipeline-warning-pills span {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #9a3412;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 8px;
    white-space: nowrap;
}

.pipeline-detail-modal .modal-header {
    align-items: flex-start;
    background: #f8fafc;
}

.pipeline-detail-total {
    align-items: center;
    background: #eefbf6;
    border: 1px solid #bcebd8;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px 14px;
}

.pipeline-detail-total span {
    color: #0f5138;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.pipeline-detail-total strong {
    color: #0f5138;
    font-size: 1.15rem;
    font-weight: 900;
}

.pipeline-detail-list {
    display: grid;
    gap: 8px;
}

.pipeline-detail-row {
    align-items: center;
    border: 1px solid #e4e9ef;
    border-radius: 9px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px 12px;
}

.pipeline-detail-row.is-scheduled {
    background: #fff8e6;
    border-color: #f2d58c;
    border-left: 5px solid #d99a17;
}

.pipeline-detail-row.is-pipeline {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-left: 5px solid #0f766e;
}

.pipeline-detail-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pipeline-detail-main strong {
    color: #123f32;
    font-weight: 850;
}

.pipeline-detail-main em {
    align-self: start;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pipeline-detail-row.is-scheduled .pipeline-detail-main em {
    color: #92400e;
}

.pipeline-detail-row.is-pipeline .pipeline-detail-main em {
    color: #0f766e;
}

.pipeline-detail-main span,
.pipeline-detail-facts span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 650;
}

.pipeline-detail-facts {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pipeline-detail-facts b {
    color: #17212b;
    font-weight: 900;
}

@media (max-width: 1100px) {
    .pipeline-list-hero {
        grid-template-columns: 1fr;
    }

    .pipeline-list-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pipeline-list-hero-actions {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pipeline-list-hero-actions .btn {
        flex: 1 1 180px;
    }

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

    .pipeline-forecast-chart {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 680px) {
    .pipeline-list-hero {
        border-radius: 10px;
        gap: 8px;
        padding: 14px 16px;
    }

    .pipeline-list-hero h1 {
        font-size: 1.85rem;
    }

    .pipeline-list-hero-main p:not(.eyebrow) {
        font-size: 0.86rem;
        margin-top: 8px;
    }

    .pipeline-list-hero-stats {
        display: none;
    }

    .pipeline-list-hero-actions {
        display: none;
    }

    .pipeline-list-panel .project-list-toolbar {
        padding: 12px 14px;
    }

    .pipeline-list-panel .project-search-control {
        gap: 8px;
    }

    .pipeline-list-panel .project-search-control .form-control,
    .pipeline-list-panel .project-search-control .form-select,
    .pipeline-list-panel .project-search-control input[type="date"] {
        flex: 0 0 auto;
        height: 42px;
        min-height: 42px;
    }

    .pipeline-list-panel .project-search-control .btn {
        min-height: 42px;
    }

    .page-heading-actions {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .page-heading-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .pipeline-command-panel {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .pipeline-command-summary {
        justify-items: start;
        min-width: 0;
        text-align: left;
    }

    .pipeline-metric-grid,
    .pipeline-forecast-chart {
        grid-template-columns: 1fr;
    }

    .pipeline-forecast-column {
        grid-template-columns: 90px minmax(0, 1fr);
        grid-template-rows: auto;
    }

    .pipeline-forecast-bar-wrap {
        min-height: 74px;
    }

    .pipeline-forecast-label {
        align-content: center;
        text-align: left;
    }

    .pipeline-stage-row,
    .pipeline-schedule-row {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .pipeline-stage-money {
        text-align: left;
    }

    .pipeline-detail-row {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .pipeline-detail-facts {
        justify-content: flex-start;
    }

    .pipeline-row-note {
        display: none;
    }
}

.project-save-strip .btn {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(23, 107, 77, 0.16);
    font-weight: 850;
    min-height: 36px;
    padding-inline: 14px;
}

.project-save-status {
    color: var(--cf-muted);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 750;
    min-height: 20px;
}

.project-save-status.is-saving {
    color: #475569;
}

.project-save-status.is-success {
    color: #047857;
}

.project-save-status.is-error {
    color: #be123c;
}

.project-tab-form.is-saving,
.project-cost-budget-form.is-saving,
.project-cost-category-select.is-saving {
    cursor: progress;
}

.project-field-error {
    display: block;
}

.project-inline-error {
    margin: 0 0 12px;
}

.project-option-list {
    display: grid;
    gap: 8px;
    margin: 4px 0 12px;
}

.project-option-list label {
    align-items: center;
    color: #334155;
    display: flex;
    font-size: 0.88rem;
    gap: 8px;
    font-weight: 650;
    margin: 0;
}

.project-option-list input[type="checkbox"] {
    accent-color: #0f8a28;
    height: 17px;
    width: 17px;
}

.project-notes-label {
    color: #526158;
    display: block;
    font-size: 0.82rem;
    font-weight: 750;
    margin-bottom: 8px;
}

.project-notes-label + textarea {
    background-color: #fbfdff;
    border-color: #d8dfd8;
    border-radius: 8px;
    font-size: 0.9rem;
    min-height: 142px;
    padding: 10px 12px;
}

.project-billing-schedule-panel,
.project-cost-categories-panel,
.project-wip-panel,
.project-cost-sales-panel {
    overflow: hidden;
}

.project-billing-schedule-heading,
.project-budget-heading,
.project-wip-heading,
.project-cost-sales-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 0 0 8px;
}

.project-billing-schedule-heading h2,
.project-budget-heading h2,
.project-wip-heading h2,
.project-cost-sales-heading h2 {
    padding-bottom: 0;
}

.project-billing-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    padding: 4px 14px 14px;
}

.project-billing-summary > div {
    background: #f8fafc;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    padding: 12px 14px;
}

.project-billing-summary > div.is-primary {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.project-billing-summary span {
    color: #5b6673;
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.project-billing-summary strong {
    color: #0f172a;
    display: block;
    font-size: 1.2rem;
    letter-spacing: 0;
    margin-top: 4px;
}

.project-billing-summary > div.is-primary span,
.project-billing-summary > div.is-primary strong {
    color: #ffffff;
}

.pipeline-billing-heading {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #e5ebf0;
    padding: 10px 18px;
}

.pipeline-billing-heading-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pipeline-billing-heading h2 {
    background: transparent;
    border: 0;
    font-size: 1rem;
    padding: 0;
}

.pipeline-billing-heading p {
    color: #64748b;
    font-size: 0.8rem;
    max-width: 700px;
}

.pipeline-billing-summary {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
    padding: 0;
}

.pipeline-billing-summary .pipeline-billing-estimate-form {
    min-width: 260px;
}

.pipeline-billing-summary > div {
    border-radius: 7px;
    min-width: 180px;
    padding: 9px 12px;
}

.pipeline-billing-summary .pipeline-billing-estimate-control {
    align-items: center;
    display: flex;
    gap: 6px;
}

.pipeline-billing-summary .pipeline-billing-estimate-control .form-control {
    height: 34px;
}

.pipeline-billing-summary .pipeline-billing-estimate-control .btn {
    flex: 0 0 auto;
    height: 34px;
    width: 34px;
}

.pipeline-billing-summary span {
    font-size: 0.7rem;
}

.pipeline-billing-summary strong {
    font-size: 1.05rem;
}

.project-billing-schedule-panel .project-legacy-panel-body {
    padding: 12px 18px 18px;
}

.project-budget-heading > div:first-child {
    min-width: 0;
}

.project-budget-heading p {
    color: var(--cf-muted);
    font-size: 0.84rem;
    margin: 4px 20px 0;
}

.project-budget-tabs {
    background: #ffffff;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    gap: 8px;
    margin: 0 0 14px;
    overflow-x: auto;
    padding: 10px;
    white-space: nowrap;
}

.project-budget-tabs .nav-link {
    background: #e7f5f1;
    border: 1px solid #d7dee6;
    box-shadow: none;
    color: #0f4633;
    font-size: 0.88rem;
    font-weight: 750;
    max-width: 190px;
    min-height: 34px;
    overflow: hidden;
    padding: 6px 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-budget-tabs .project-budget-new-tab {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.project-budget-tab-content {
    min-width: 0;
}

.project-budget-pane-title {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 5px solid #0f766e;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0 14px 12px;
    padding: 12px 14px;
}

.project-budget-pane-title.is-variation {
    background: #fff7ed;
    border-color: #fed7aa;
    border-left-color: #d97706;
}

.project-budget-pane-title-main {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.project-budget-pane-title-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
}

.project-budget-pane-title-actions form {
    margin: 0;
}

.project-budget-line-actions {
    white-space: nowrap;
}

.project-budget-line-actions form {
    display: inline-flex;
    margin: 0 0 0 4px;
}

.project-budget-line-qty-input {
    min-width: 86px;
}

.project-budget-line-money-input {
    min-width: 118px;
}

.project-budget-pane-icon {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 8px;
    color: #0f766e;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.project-budget-pane-title.is-variation .project-budget-pane-icon {
    border-color: rgba(217, 119, 6, 0.22);
    color: #b45309;
}

.project-budget-pane-icon svg {
    height: 17px;
    width: 17px;
}

.project-budget-pane-title strong {
    color: #123f32;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-budget-pane-title.is-variation strong {
    color: #5b3416;
}

.project-budget-pane-pill {
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 999px;
    color: #0f766e;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    padding: 5px 9px;
    text-transform: uppercase;
}

.project-budget-pane-title.is-variation .project-budget-pane-pill {
    border-color: rgba(217, 119, 6, 0.22);
    color: #b45309;
}

.project-budget-tabs .nav-link:hover,
.project-budget-tabs .nav-link:focus {
    background: #d9eee7;
    color: #0f4633;
}

.project-budget-tabs .nav-link.active,
.project-budget-tabs .nav-link:active {
    background: var(--cf-primary-dark);
    border-color: var(--cf-primary-dark);
    color: #ffffff !important;
}

.project-budget-tabs .nav-link.active:hover,
.project-budget-tabs .nav-link.active:focus {
    background: var(--cf-primary-dark);
    color: #ffffff !important;
}

.project-budget-detail-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    padding: 0 14px 14px;
}

.project-budget-detail-summary > div {
    background: #ffffff;
    border: 1px solid #dde4ea;
    border-top: 4px solid #d8e6ef;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    padding: 11px 12px 12px;
}

.project-budget-detail-summary > div:first-child {
    border-top-color: #0f766e;
}

.project-budget-detail-summary > div:nth-child(2) {
    border-top-color: #2563eb;
}

.project-budget-detail-summary > div:nth-child(3) {
    border-top-color: #d97706;
}

.project-budget-detail-summary span,
.project-budget-detail-summary small {
    color: #5b6673;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.project-budget-detail-summary strong {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    letter-spacing: 0;
    margin-top: 4px;
}

.project-budget-detail-summary small {
    letter-spacing: 0;
    margin-top: 2px;
    text-transform: none;
}

.project-variation-budget-form {
    background: #ffffff;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    margin: 0 14px 14px;
    padding: 12px;
}

.project-variation-budget-form-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.project-variation-budget-form-head h3 {
    color: #17212b;
    font-size: 0.92rem;
    font-weight: 900;
    margin: 0;
}

.project-variation-budget-form-head span {
    background: #eefbf6;
    border: 1px solid #bcebd8;
    border-radius: 999px;
    color: #0f766e;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    padding: 4px 8px;
    text-transform: uppercase;
}

.project-variation-budget-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 0.9fr) minmax(160px, 0.9fr) minmax(220px, 1.4fr) minmax(90px, 0.45fr) minmax(130px, 0.65fr) auto;
}

.project-variation-budget-grid label {
    display: grid;
    gap: 4px;
    margin: 0;
    min-width: 0;
}

.project-variation-budget-grid label > span {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.project-budget-tab-content .project-cost-category-table-wrap {
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    margin: 0 14px 14px;
    overflow: hidden;
}

.project-budget-tab-content .project-cost-category-table-wrap table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.project-budget-tab-content .empty-state {
    color: #64748b;
    font-weight: 650;
    padding: 22px 12px;
}

.project-budget-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(220px, 1.35fr) minmax(150px, 0.85fr) minmax(170px, 0.95fr);
    max-width: 760px;
    padding: 10px 14px 8px 0;
    width: 100%;
}

.project-budget-summary-group {
    background: #f8fafc;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    min-width: 0;
    padding: 10px 12px;
}

.project-budget-summary-group span,
.project-budget-summary-group small {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.25;
    text-transform: uppercase;
}

.project-budget-summary-group strong {
    color: #0f172a;
    display: block;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    margin-top: 4px;
    white-space: nowrap;
}

.project-budget-summary-group small {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-top: 4px;
    text-transform: none;
}

.project-wip-overall-summary {
    max-width: none;
    padding: 0 0 14px;
}

.project-wip-heading {
    padding: 0 14px 12px;
}

.project-wip-heading p {
    color: var(--cf-muted);
    font-size: 0.86rem;
    margin: 4px 0 0;
}

.project-wip-groups,
.project-wip-position {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-wip-groups {
    margin-bottom: 14px;
}

.project-wip-callout {
    border: 1px solid #dce3ea;
    border-left-width: 5px;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.project-wip-callout span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.project-wip-callout strong {
    color: #0f172a;
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
}

.project-wip-callout p {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 5px 0 0;
}

.project-wip-callout.is-success {
    background: #ecfdf3;
    border-color: #22c55e;
}

.project-wip-callout.is-info {
    background: #eff6ff;
    border-color: #3b82f6;
}

.project-wip-callout.is-attention {
    background: #fff7e6;
    border-color: #f59e0b;
}

.project-wip-callout.is-warning {
    background: #fffbeb;
    border-color: #eab308;
}

.project-wip-callout.is-danger {
    background: #fff1f2;
    border-color: #e11d48;
}

.project-wip-legacy-test {
    background: #f7fbf9;
    border: 1px solid #d8e5df;
    border-left: 4px solid #0f7a5a;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px;
}

.project-wip-legacy-test-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.project-wip-legacy-test-heading strong {
    color: #0f172a;
    display: block;
    font-size: 0.98rem;
    font-weight: 900;
}

.project-wip-legacy-test-heading small {
    color: #64748b;
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 2px;
}

.project-wip-legacy-test-note {
    background: #fff7e6;
    border: 1px solid #f2d18b;
    border-radius: 6px;
    color: #74470b;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.4;
    margin-top: 12px;
    padding: 10px 12px;
}

.project-wip-card,
.project-wip-position-card {
    background: #f8fafc;
    border: 1px solid #dce3ea;
    border-radius: 8px;
    min-width: 0;
    padding: 14px;
}

.project-wip-card-primary {
    background: #e7f6ef;
    border-color: #bfe7d3;
}

.project-wip-card-label {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.project-wip-card-label button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7dee6;
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    flex: 0 0 auto;
    height: 24px;
    justify-content: center;
    padding: 0;
    width: 24px;
}

.project-wip-card-label button:hover,
.project-wip-card-label button:focus {
    border-color: #0f766e;
    color: #0f766e;
}

.project-wip-card-label svg {
    height: 15px;
    width: 15px;
}

.project-wip-card span,
.project-wip-position-card span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1.25;
    text-transform: uppercase;
}

.project-wip-card strong,
.project-wip-position-card strong {
    color: #0f172a;
    display: block;
    font-size: 1.26rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    margin-top: 6px;
    white-space: nowrap;
}

.project-wip-card small,
.project-wip-position-card small {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 8px;
}

.project-wip-position-card.is-attention {
    background: #fff7e6;
    border-color: #f2d18b;
}

.project-wip-position-card.is-warning {
    background: #fff1f2;
    border-color: #fecdd3;
}

.project-wip-note {
    background: #f5f7f9;
    border: 1px dashed #cbd5df;
    border-radius: 8px;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
    padding: 12px 14px;
}

.report-page {
    display: grid;
    gap: 18px;
}

.report-hero {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 22px 24px;
}

.report-hero h1 {
    font-size: 2rem;
    letter-spacing: 0;
    margin: 0;
}

.report-hero p {
    color: #64748b;
    font-weight: 700;
    margin: 6px 0 0;
}

.report-hero-actions {
    flex: 0 0 auto;
}

.wip-snapshot-controls {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.wip-snapshot-filter {
    align-items: end;
    display: flex;
    gap: 10px;
}

.wip-snapshot-filter label {
    color: #475569;
    display: block;
    font-size: 0.82rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.wip-snapshot-filter .form-control {
    min-width: 180px;
}

.report-testing-warning {
    align-items: flex-start;
    background: #fff4d6;
    border: 2px solid #f59e0b;
    border-left-width: 7px;
    border-radius: 8px;
    color: #7c3f00;
    display: flex;
    font-size: 0.94rem;
    font-weight: 800;
    gap: 12px;
    line-height: 1.4;
    margin-top: 14px;
    max-width: 880px;
    padding: 12px 14px;
    width: 100%;
}

.report-testing-warning svg {
    flex: 0 0 auto;
    height: 22px;
    margin-top: 1px;
    width: 22px;
}

.report-testing-warning strong {
    color: #78350f;
    display: block;
    font-size: 0.96rem;
    font-weight: 950;
    letter-spacing: 0;
}

.report-testing-warning span {
    display: block;
    margin-top: 2px;
}

.project-wip-testing-warning {
    max-width: none;
}

.wip-eofy-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.wip-eofy-shortcuts .active {
    background: #0f6f50;
    border-color: #0f6f50;
    color: #ffffff;
}

.wip-total-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wip-total-card {
    background: #ffffff;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    padding: 16px;
}

.wip-total-card.is-primary,
.wip-total-card.is-positive {
    background: #ecfdf3;
    border-color: #bfe7d3;
}

.wip-total-card.is-info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.wip-total-card.is-negative {
    background: #fff7e6;
    border-color: #f2d18b;
}

.wip-total-card span {
    color: #64748b;
    display: block;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.wip-total-card strong {
    color: #0f172a;
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
    margin-top: 7px;
}

.wip-total-card small {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 7px;
}

.wip-snapshot-summary {
    padding: 14px 18px;
}

.wip-position-summary {
    border: 1px solid #dce3ea;
    border-left-width: 5px;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px 14px;
}

.wip-position-summary strong {
    color: #0f172a;
    display: block;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0;
}

.wip-position-summary p {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 5px 0 0;
}

.wip-position-summary.is-success {
    background: #ecfdf3;
    border-color: #22c55e;
}

.wip-position-summary.is-info {
    background: #eff6ff;
    border-color: #3b82f6;
}

.wip-position-summary.is-attention {
    background: #fff7e6;
    border-color: #f59e0b;
}

.wip-position-summary.is-warning {
    background: #fffbeb;
    border-color: #eab308;
}

.wip-help-label {
    border-bottom: 1px dotted currentColor;
    cursor: help;
    text-decoration: none;
    text-underline-offset: 3px;
}

.wip-summary-overview {
    display: grid;
    gap: 10px;
}

.wip-summary-meta {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-weight: 800;
    gap: 8px 14px;
    padding: 9px 11px;
}

.wip-summary-meta span {
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.wip-summary-meta strong {
    color: #0f172a;
}

.wip-summary-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.wip-summary-metrics > div {
    background: #ffffff;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    padding: 10px 12px;
}

.wip-summary-metrics span {
    color: #64748b;
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wip-summary-metrics strong {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-top: 5px;
}

.wip-snapshot-summary p {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    margin: 10px 0 0;
}

.wip-snapshot-table-panel {
    overflow: hidden;
}

.wip-snapshot-table {
    margin-bottom: 0;
}

.wip-snapshot-table thead th {
    background: #f2f4f6;
    color: #374151;
    font-size: 0.82rem;
    white-space: nowrap;
}

.wip-snapshot-table td {
    border-color: #e5e7eb;
    font-size: 0.86rem;
    white-space: nowrap;
}

.wip-snapshot-table td:first-child,
.wip-snapshot-table th:first-child {
    min-width: 260px;
    white-space: normal;
}

.status-pill-wip-success,
.status-pill-wip-info,
.status-pill-wip-attention,
.status-pill-wip-warning,
.status-pill-wip-danger {
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    padding: 6px 9px;
}

.status-pill-wip-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.status-pill-wip-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.status-pill-wip-attention,
.status-pill-wip-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.status-pill-wip-danger {
    background: #ffe4e6;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.project-billing-table-wrap,
.project-cost-category-table-wrap,
.project-cost-sales-table-wrap {
    padding: 0 14px 18px;
}

.project-billing-table-wrap .table thead th,
.project-cost-category-table-wrap .table thead th,
.project-cost-sales-table-wrap .table thead th {
    background: #f2f4f6;
    color: #374151;
    font-size: 0.9rem;
    text-transform: none;
}

.project-billing-table-wrap .table td,
.project-billing-table-wrap .table th,
.project-cost-category-table-wrap .table td,
.project-cost-category-table-wrap .table th,
.project-cost-sales-table-wrap .table td,
.project-cost-sales-table-wrap .table th {
    border-color: #e5e7eb;
}

.project-cost-category-upload {
    margin-bottom: 10px;
}

.project-budget-import {
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
}

.project-cost-upload-grid {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(320px, 1fr) auto;
}

.project-cost-upload-grid .form-label {
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 650;
    margin-bottom: 4px;
}

.project-cost-upload-grid .form-control {
    border-color: #cfd6dd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.project-budget-dropzone {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #b8c5d2;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: flex;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-budget-dropzone:hover,
.project-budget-dropzone.is-dragover {
    background: #eefdf8;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.project-budget-dropzone-icon {
    align-items: center;
    background: #e7f5f1;
    border-radius: 6px;
    color: #0f766e;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.project-budget-dropzone-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.project-budget-dropzone-copy strong {
    color: #0f172a;
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-budget-dropzone-copy small {
    color: #64748b;
    font-size: 0.78rem;
}

.project-cost-upload-grid > .btn {
    align-self: stretch;
    min-width: 112px;
    justify-content: center;
}

.project-xero-import-test-form .project-cost-upload-grid {
    grid-template-columns: minmax(280px, 1fr) auto;
}

.project-budget-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin: 0 0 16px;
}

.project-budget-tools form {
    margin: 0;
}

.budget-clear-list {
    color: #334155;
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 20px;
}

.budget-clear-list li::marker {
    color: #0f766e;
}

.project-cost-category-select {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(150px, 1fr) 34px;
    min-width: 220px;
}

.project-cost-category-select .form-select {
    border-color: #cfd6dd;
    border-radius: 4px;
    font-size: 0.82rem;
}

.project-budget-line-match-form {
    grid-template-columns: minmax(260px, 1fr) auto 34px;
}

.project-budget-line-match-select {
    background-color: #ffffff;
    border-left: 4px solid #0f766e;
    font-weight: 650;
}

.project-budget-line-match-select optgroup {
    background: #e7f5f1;
    color: #0f4633;
    font-size: 0.82rem;
    font-weight: 900;
}

.project-budget-line-match-select option.budget-match-category-heading {
    background: #e7f5f1;
    color: #0f4633;
    font-weight: 900;
}

.project-budget-line-match-select option {
    background: #ffffff;
    color: #17212b;
    font-weight: 500;
}

.project-budget-line-match-form.has-suggestion .project-budget-line-match-select {
    border-color: #f2c166;
    border-left-color: #d97706;
}

.budget-match-suggestion {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #9a3412;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 850;
    justify-content: center;
    letter-spacing: 0.02em;
    min-height: 28px;
    padding: 4px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.budget-match-confirmed {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: #047857;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0.02em;
    min-height: 28px;
    padding: 4px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.budget-match-review {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0.02em;
    min-height: 28px;
    padding: 4px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.project-cost-category-select .btn {
    height: 31px;
    width: 34px;
}

.project-cost-budget-form {
    display: inline-block;
    margin: 0;
    min-width: 170px;
}

.project-cost-budget-form .input-group {
    flex-wrap: nowrap;
}

.project-cost-budget-form .input-group-text,
.project-cost-budget-form .form-control {
    border-color: #cfd6dd;
    font-size: 0.82rem;
}

.project-cost-budget-form .btn-icon {
    border-color: #cfd6dd;
    height: 31px;
    width: 34px;
}

.project-cost-budget-form .project-save-status {
    display: block;
    font-size: 0.72rem;
    justify-content: flex-end;
    margin-top: 3px;
    min-height: 16px;
    text-align: right;
}

.project-cost-category-select .project-save-status {
    font-size: 0.72rem;
    grid-column: 1 / -1;
    min-height: 16px;
}

.project-cost-sales-filter {
    border-top: 1px solid #edf1f5;
    margin: 0 14px 12px;
    padding-top: 12px;
}

.project-cost-sales-filter .form-label {
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 650;
    margin-bottom: 5px;
}

.project-cost-sales-filter-control {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-cost-sales-filter-control .form-control {
    border-color: #cfd6dd;
    border-radius: 4px;
    flex: 1 1 260px;
    font-size: 0.9rem;
    min-height: 34px;
}

.project-cost-pagination {
    align-items: center;
    border-top: 1px solid #edf1f5;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    font-weight: 650;
    gap: 10px;
    justify-content: space-between;
    padding: 12px 14px 16px;
}

.project-cost-pagination-top {
    border-bottom: 1px solid #edf1f5;
    padding-bottom: 12px;
}

.project-cost-pagination nav {
    margin: 0;
}

.project-files-panel {
    overflow: hidden;
}

.project-files-upload {
    align-items: end;
    border-bottom: 1px solid #edf1f5;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, .7fr) minmax(220px, 1fr) auto;
    padding: 16px;
}

.project-files-upload-action {
    display: flex;
    justify-content: flex-end;
}

.project-files-review-layout {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(360px, .85fr) minmax(520px, 1.15fr);
    padding: 16px;
}

.project-files-preview-card {
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    overflow: hidden;
}

.project-file-preview {
    border-radius: 0;
    min-height: 620px;
}

.project-file-preview iframe {
    min-height: 620px;
}

.project-files-primary strong {
    display: block;
}

.project-files-preview-link {
    align-items: center;
    color: #0f3f35;
    display: inline-flex;
    gap: 8px;
    text-decoration: none;
}

.project-files-preview-link:hover {
    color: #0b604e;
    text-decoration: underline;
}

.project-files-preview-link svg {
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.project-files-primary small {
    color: #52657a;
    display: block;
    font-size: .8rem;
    margin-top: 3px;
}

.project-files-table-wrap {
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    overflow: auto;
}

@media (max-width: 960px) {
    .project-files-upload {
        grid-template-columns: 1fr;
    }

    .project-files-upload-action {
        justify-content: flex-start;
    }

    .project-files-review-layout {
        grid-template-columns: 1fr;
    }

    .project-file-preview,
    .project-file-preview iframe {
        min-height: 460px;
    }
}

.pagination {
    gap: 4px;
    margin: 0;
}

.page-link {
    align-items: center;
    border: 1px solid var(--cf-line);
    border-radius: 6px;
    color: var(--cf-primary);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 750;
    min-height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 6px 11px;
}

.page-link:hover,
.page-link:focus {
    background: #eef8f5;
    border-color: var(--cf-primary);
    color: var(--cf-primary);
    box-shadow: 0 0 0 0.18rem rgba(18, 128, 116, 0.12);
}

.page-item.active .page-link {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #ffffff;
}

.page-item.disabled .page-link {
    background: #f8fafc;
    border-color: var(--cf-line);
    color: var(--cf-muted);
}

.project-cost-sales-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 20px 0 0;
}

.project-cost-sales-summary span {
    background: #f8fafc;
    border: 1px solid #dce3ea;
    border-radius: 4px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 5px 8px;
}

.project-legacy-cos-import,
.project-legacy-cos-summary {
    background: #f7fbf9;
    border: 1px solid #d8e5df;
    border-left: 4px solid #0f7a5a;
    border-radius: 6px;
    margin: 0 14px 14px;
    padding: 12px 14px;
}

.project-legacy-cos-import {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.project-legacy-cos-import small {
    color: #5f6f78;
    display: block;
    font-weight: 600;
    margin-top: 2px;
}

.project-legacy-cos-import-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-legacy-cos-summary details {
    margin-top: 6px;
}

.project-legacy-cos-summary ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.project-xero-import-test-form {
    border-bottom: 1px solid #edf1f5;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.project-xero-import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.project-xero-import-notice {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.project-xero-import-notice span {
    min-width: 0;
}

.project-cost-sales-primary strong,
.project-cost-sales-table-wrap td > strong {
    color: #111827;
    display: block;
    font-weight: 750;
}

.project-cost-sales-primary small,
.project-cost-sales-muted {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    margin-top: 2px;
}

.project-cost-sales-primary small {
    display: -webkit-box;
    line-height: 1.35;
    max-height: 2.7em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.project-cost-sales-table-wrap .table {
    border-collapse: separate;
    border-spacing: 0;
}

.project-cost-sales-table-wrap .table thead th {
    border-bottom: 1px solid #dbe4ef;
}

.project-cost-sales-table-wrap .project-cost-invoice-row > td {
    background: #ffffff;
    border-bottom: 0;
    border-top: 0;
    padding-bottom: 0;
    padding-top: 6px;
    vertical-align: bottom;
}

.project-cost-sales-table-wrap .project-cost-invoice-row:not(:first-child) > td {
    border-top: 2px solid #cbd8e6;
}

.project-cost-sales-table-wrap .project-cost-invoice-row.is-even > td,
.project-cost-sales-table-wrap .project-cost-line-detail.is-even > td {
    background: #f6faf9;
}

.project-cost-sales-table-wrap .project-cost-invoice-row > td:first-child {
    border-left: 3px solid var(--cf-primary);
    padding-left: 12px;
}

.project-cost-sales-table-wrap .project-cost-invoice-row > td:last-child {
    padding-right: 10px;
}

.project-cost-sales-table-wrap .project-cost-line-detail > td {
    background: #ffffff;
    border-bottom: 0;
    border-left: 3px solid var(--cf-primary);
    border-top: 0;
    padding: 0 10px 4px 18px;
}

.project-cost-sales-table-wrap .project-cost-line-detail.is-odd > td {
    background: #ffffff;
}

.project-cost-sales-table-wrap .project-cost-line-detail .project-cost-line-panel {
    background: inherit;
    border: 0;
    margin: 0;
    overflow: hidden;
}

.project-cost-sales-table-wrap .project-cost-line-summary {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 32px;
    padding: 5px 10px;
    text-align: left;
    width: 100%;
}

.project-cost-sales-table-wrap .project-cost-line-summary:focus,
.project-cost-sales-table-wrap .project-cost-line-summary:focus-visible {
    box-shadow: none;
    outline: 0;
}

.project-cost-sales-table-wrap .project-cost-line-panel.is-open .project-cost-line-summary {
    background: transparent;
}

.project-cost-line-summary-main {
    align-items: center;
    color: #17212b;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 6px;
    font-weight: 850;
}

.project-cost-line-summary-main small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
    margin-left: 4px;
}

.project-cost-line-chevron {
    color: var(--cf-primary);
    height: 15px;
    transition: transform 140ms ease;
    width: 15px;
}

.project-cost-line-summary[aria-expanded="true"] .project-cost-line-chevron {
    transform: rotate(90deg);
}

.project-cost-sales-due-soon {
    color: var(--cf-danger);
    font-weight: 800;
}

.project-cost-sales-row-removing {
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.project-vendor-review-actions {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    justify-content: flex-end;
    min-width: 126px;
}

.project-vendor-review-actions form {
    margin: 0;
}

.project-vendor-review-actions .btn-icon {
    height: 32px;
    width: 34px;
}

.project-cost-line-list {
    display: grid;
    gap: 1px;
    padding: 8px 0 0;
}

.project-cost-line-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.76);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(240px, 1.15fr) minmax(360px, 1.65fr) minmax(128px, 0.5fr);
    min-height: 48px;
    padding: 7px 10px;
    transition: none;
}

.project-cost-line-item:hover {
    background: rgba(255, 255, 255, 0.76);
}

.project-cost-line-item + .project-cost-line-item {
    border-top: 1px solid rgba(15, 118, 110, 0.10);
}

.project-cost-line-copy,
.project-cost-line-money {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.project-cost-line-copy strong {
    color: #17212b;
    font-size: 0.86rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-cost-line-copy span,
.project-cost-line-money span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
}

.project-cost-line-money {
    text-align: right;
}

.project-cost-line-money strong {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 850;
}

.project-cost-line-assign {
    min-width: 0;
}

.project-cost-line-assign .project-cost-category-select {
    width: 100%;
}

.project-cost-line-assign .project-budget-line-match-select {
    border-left-width: 3px;
}

.project-cost-line-assign .project-cost-category-select .btn {
    box-shadow: none;
}

.project-cost-lines-body[hidden] {
    display: none;
}

.project-cost-line-loading,
.project-cost-line-empty,
.project-cost-line-error {
    background: rgba(255, 255, 255, 0.76);
    border-top: 1px solid rgba(15, 118, 110, 0.10);
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px;
}

.project-cost-line-error {
    color: var(--cf-danger);
}

.table {
    font-size: 0.93rem;
}

.table thead th {
    background: #f8faf9;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
}

.muted-small {
    color: var(--cf-muted);
    font-size: 0.82rem;
}

.status-pill {
    background: #eef4f6;
    border: 1px solid #d8e4e8;
    border-radius: 999px;
    color: #344054;
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 9px;
}

.status-pill-icon {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.status-pill-icon svg {
    height: 13px;
    stroke-width: 2.4;
    width: 13px;
}

.pipeline-stage-pill {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

.pipeline-stage-enquiry {
    background: #ecfeff;
    border-color: #67e8f9;
    color: #155e75;
}

.pipeline-stage-qualified {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #075985;
}

.pipeline-stage-quoted {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.pipeline-stage-follow_up {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.pipeline-stage-on_hold {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.pipeline-stage-won {
    background: #dcfce7;
    border-color: #4ade80;
    color: #166534;
}

.pipeline-stage-lost {
    background: #ffe4e6;
    border-color: #fb7185;
    color: #9f1239;
}

.pipeline-heat-cold {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #075985;
}

.pipeline-heat-warm {
    background: #fef3c7;
    border-color: #facc15;
    color: #854d0e;
}

.pipeline-heat-hot {
    background: #ffedd5;
    border-color: #fb923c;
    color: #9a3412;
}

.pipeline-heat-ready {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.status-pill-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.status-pill-success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.status-pill-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.nav-task-dropdown {
    position: relative;
}

.nav-task-button {
    position: relative;
}

.nav-task-count {
    align-items: center;
    background: #dc2626;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
}

.nav-task-menu {
    min-width: 360px;
    padding: 0;
}

.nav-task-menu-header,
.nav-task-menu-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
}

.nav-task-menu-header {
    border-bottom: 1px solid var(--cf-line);
}

.nav-task-menu-header a {
    font-size: 0.78rem;
    font-weight: 700;
}

.nav-task-menu-footer {
    border-top: 1px solid var(--cf-line);
}

.nav-task-menu-item {
    border-bottom: 1px solid #edf1f3;
    color: var(--cf-ink);
    display: block;
    padding: 10px 12px;
}

.nav-task-menu-item:hover,
.nav-task-menu-item:focus {
    background: #f8faf9;
    color: var(--cf-ink);
}

.nav-task-menu-item.is-overdue {
    background: #fff7ed;
}

.nav-task-menu-item span,
.nav-task-menu-item small {
    display: block;
}

.nav-task-menu-item span {
    font-size: 0.88rem;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-task-menu-item small,
.nav-task-empty {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.nav-task-empty {
    padding: 16px 12px;
}

.user-status {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 750;
    padding: 4px 9px;
}

.user-status-active {
    background: #dcfce7;
    color: #166534;
}

.user-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.pm-colour-field {
    align-items: center;
    display: flex;
    gap: 10px;
}

.pm-colour-example {
    align-items: center;
    background: var(--pm-colour, #0f766e);
    border: 1px solid color-mix(in srgb, var(--pm-colour, #0f766e), #000 12%);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    justify-content: center;
    min-height: 38px;
    min-width: 82px;
    padding: 0 12px;
}

.pm-initials-badge {
    align-items: center;
    background: var(--pm-colour, #0f766e);
    border: 1px solid color-mix(in srgb, var(--pm-colour, #0f766e), #000 12%);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.66rem;
    font-weight: 850;
    height: 21px;
    justify-content: center;
    letter-spacing: 0;
    min-width: 28px;
    padding: 0 6px;
}

.pm-dashboard-hero {
    align-items: stretch;
    background:
        linear-gradient(135deg, rgba(5, 91, 70, 0.98) 0%, rgba(15, 118, 110, 0.94) 58%, rgba(10, 87, 92, 0.98) 100%);
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    color: #ffffff;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(210px, 0.62fr) minmax(480px, 1.5fr) auto;
    margin-bottom: 16px;
    overflow: hidden;
    padding: 18px 22px;
    position: relative;
}

.pm-dashboard-hero::after {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(255, 255, 255, 0));
    content: "";
    height: 180px;
    pointer-events: none;
    position: absolute;
    right: -56px;
    top: -76px;
    transform: rotate(11deg);
    width: 260px;
}

.pm-dashboard-hero-main,
.pm-dashboard-hero-summary,
.pm-dashboard-hero-actions {
    position: relative;
    z-index: 1;
}

.pm-dashboard-hero .eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.pm-dashboard-hero h1 {
    color: #ffffff;
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    line-height: 1;
    margin: 0;
}

.pm-dashboard-hero-copy {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    margin: 12px 0 0;
    max-width: 560px;
}

.pm-dashboard-hero-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.pm-dashboard-hero-meta span {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
}

.pm-dashboard-hero-meta svg {
    height: 15px;
    width: 15px;
}

.pm-dashboard-hero-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.pm-dashboard-hero-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    min-height: 82px;
    padding: 11px 12px;
}

.pm-dashboard-hero-stat.is-gold {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.9));
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pm-dashboard-hero-stat.is-muted {
    background: rgba(255, 255, 255, 0.08);
}

.pm-dashboard-hero-stat span {
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pm-dashboard-hero-stat strong {
    color: #ffffff;
    display: block;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1;
    margin-top: 7px;
}

.pm-dashboard-hero-stat small {
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 0.78rem;
    font-weight: 760;
    margin-top: 7px;
}

.pm-dashboard-hero-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
}

.pm-dashboard-hero-actions .btn {
    justify-content: center;
    min-width: 142px;
}

.pm-dashboard-review-panel,
.pm-dashboard-project-panel {
    margin-bottom: 22px;
    overflow: hidden;
}

.pm-dashboard-review-table td,
.pm-dashboard-project-table td {
    vertical-align: middle;
}

.pm-dashboard-review-table td > small,
.pm-dashboard-project-table td > small,
.pm-dashboard-project-table td.text-end small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 3px;
}

.pm-dashboard-project-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.pm-dashboard-project-toolbar h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.pm-dashboard-mobile-label {
    display: none;
}

.pm-dashboard-project-toolbar p,
.pm-dashboard-review-panel .section-heading p {
    color: var(--cf-muted);
    font-size: 0.82rem;
    margin: 3px 0 0;
}

.pm-dashboard-project-toolbar .project-search-form {
    flex: 0 1 560px;
    margin: 0;
}

.pm-dashboard-project-table .pm-initials-badge {
    margin-right: 6px;
    vertical-align: middle;
}

.pm-dashboard-assigned-row {
    background: #f0fdfa;
}

.pm-dashboard-action-pills {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pm-dashboard-category-pills {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.pm-dashboard-review-table .project-vendor-review-actions {
    justify-content: flex-end;
    min-width: 0;
}

.pm-token-review-body {
    min-height: 100vh;
    margin: 0;
    background: #f3f6f8;
    color: #102033;
}

.pm-token-review-shell {
    width: min(760px, calc(100% - 24px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.pm-token-confirm-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.pm-token-review-header,
.pm-token-invoice-card,
.pm-token-review-complete {
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 35, 55, 0.08);
}

.pm-token-review-header {
    padding: 22px;
    margin-bottom: 16px;
}

.pm-token-review-header h1,
.pm-token-invoice-card h1,
.pm-token-invoice-card h2,
.pm-token-review-complete h2 {
    margin: 0;
    color: #0f2a43;
}

.pm-token-review-header p {
    margin: 6px 0 0;
    color: #53657a;
}

.pm-token-review-meta,
.pm-token-actions,
.pm-token-invoice-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pm-token-review-meta {
    margin-top: 14px;
}

.pm-token-review-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4f8;
    font-size: 0.84rem;
    color: #41556b;
}

.pm-token-review-list {
    display: grid;
    gap: 14px;
}

.pm-token-invoice-card,
.pm-token-review-complete {
    padding: 18px;
}

.pm-token-invoice-head {
    justify-content: space-between;
    margin-bottom: 14px;
}

.pm-token-invoice-head p,
.pm-token-description,
.pm-token-review-complete p {
    margin: 4px 0 0;
    color: #53657a;
}

.pm-token-invoice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.pm-token-invoice-grid div {
    padding: 10px;
    border-radius: 6px;
    background: #f7fafc;
}

.pm-token-invoice-grid dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #6a7a8b;
}

.pm-token-invoice-grid dd {
    margin: 2px 0 0;
    font-weight: 700;
    color: #0f2a43;
}

.pm-token-actions {
    margin-top: 14px;
    width: 100%;
    justify-content: space-between;
}

.pm-token-confirm-actions {
    display: grid;
    gap: 10px;
}

.pm-token-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .65rem 1rem;
    border: 1px solid #b8c6d5;
    border-radius: 8px;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
}

.pm-token-action-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 107, 82, 0.18);
}

.pm-token-action-view {
    color: #0f2a43;
    background: #fff;
}

.pm-token-action-view:hover {
    color: #0f2a43;
    border-color: #7890aa;
    background: #f8fafc;
}

.pm-token-action-approve {
    margin-left: auto;
    color: #fff;
    border-color: #0f5a46;
    background: #0f6b52;
    box-shadow: 0 10px 22px rgba(15, 107, 82, .18);
}

.pm-token-action-approve:hover {
    color: #fff;
    background: #0b553f;
    border-color: #0b553f;
}

.pm-token-action-back {
    background: #fff;
    border-color: #c7d3df;
    color: #294157;
}

.pm-token-action-back:hover {
    background: #f4f7fa;
    border-color: #8ca0b5;
    color: #102033;
}

.pm-token-authorise-button {
    width: 100%;
    appearance: none;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    min-height: 52px;
}

.pm-token-reject-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #f1c7cd;
    border-radius: 8px;
    background: #fff7f7;
}

.pm-token-reject-head {
    display: grid;
    gap: 3px;
}

.pm-token-reject-head strong {
    color: #7f1d1d;
    font-size: 0.98rem;
    font-weight: 850;
}

.pm-token-reject-head span {
    color: #7f4a4a;
    font-size: 0.86rem;
}

.pm-token-reject-fields {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.pm-token-reject-fields label {
    color: #7f1d1d;
    display: grid;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 5px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pm-token-reject-fields select,
.pm-token-reject-fields textarea {
    appearance: none;
    background: #fff;
    border: 1px solid #d9aeb5;
    border-radius: 8px;
    color: #17212b;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 500;
    min-height: 42px;
    padding: 9px 11px;
    text-transform: none;
    width: 100%;
}

.pm-token-reject-fields select {
    background-image: linear-gradient(45deg, transparent 50%, #7f1d1d 50%), linear-gradient(135deg, #7f1d1d 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 34px;
}

.pm-token-reject-fields textarea {
    line-height: 1.35;
    min-height: 88px;
    resize: vertical;
}

.pm-token-reject-fields select:focus,
.pm-token-reject-fields textarea:focus {
    border-color: #b4232d;
    box-shadow: 0 0 0 3px rgba(180, 35, 45, 0.14);
    outline: none;
}

.pm-token-reject-button {
    align-items: center;
    background: #fff;
    border: 1px solid #b4232d;
    border-radius: 8px;
    color: #991b1b;
    display: inline-flex;
    font: inherit;
    font-weight: 850;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
}

.pm-token-reject-button:hover,
.pm-token-reject-button:focus {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}

@media (max-width: 560px) {
    .pm-token-review-shell {
        width: min(100% - 20px, 760px);
        padding: 16px 0 32px;
    }

    .pm-token-confirm-shell {
        align-content: center;
        min-height: 100svh;
    }

    .pm-token-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pm-token-action-approve {
        margin-left: 0;
    }

    .pm-token-reject-fields {
        grid-template-columns: 1fr;
    }

    .pm-token-action-button {
        width: 100%;
        min-height: 50px;
        border-radius: 10px;
        font-size: 1rem;
    }
}

.modal-summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.modal-summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.modal-summary-list dt {
    color: #63758a;
    font-weight: 600;
}

.modal-summary-list dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
}

.pm-schedule-panel {
    overflow: hidden;
}

.pm-schedule-heading {
    align-items: flex-start;
}

.pm-schedule-heading > div:first-child {
    min-width: 0;
}

.pm-schedule-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.pm-print-controls {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    gap: 8px;
}

.pm-print-controls .form-select {
    min-width: 220px;
}

.pm-period-controls {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    white-space: nowrap;
}

.pm-print-title {
    display: none;
}

.pm-schedule-summary {
    background: #f8faf9;
    border-bottom: 1px solid var(--cf-line);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 14px 16px;
}

.pm-schedule-summary div {
    background: #ffffff;
    border: 1px solid #e3e9ee;
    border-radius: 8px;
    padding: 10px 12px;
}

.pm-schedule-summary strong,
.pm-schedule-summary span {
    display: block;
}

.pm-schedule-summary strong {
    font-size: 1rem;
    line-height: 1.2;
}

.pm-schedule-summary span {
    color: var(--cf-muted);
    font-size: 0.78rem;
    margin-top: 3px;
}

.pm-schedule-scroll {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.pm-schedule-top-scroll {
    background: #f8faf9;
    border-bottom: 1px solid var(--cf-line);
    height: 18px;
    overflow-x: auto;
    overflow-y: hidden;
}

.pm-schedule-top-scroll-inner {
    height: 1px;
}

.pm-schedule-top-scroll::-webkit-scrollbar,
.pm-schedule-scroll::-webkit-scrollbar {
    height: 14px;
}

.pm-schedule-top-scroll::-webkit-scrollbar-thumb,
.pm-schedule-scroll::-webkit-scrollbar-thumb {
    background: #8b969f;
    border-radius: 999px;
}

.pm-schedule-top-scroll::-webkit-scrollbar-track,
.pm-schedule-scroll::-webkit-scrollbar-track {
    background: #e5ebef;
}

.pm-schedule-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.76rem;
    min-width: 1620px;
    table-layout: fixed;
    width: max-content;
}

.pm-schedule-table th,
.pm-schedule-table td {
    border-bottom: 1px solid #cad5df;
    border-right: 1px solid #d7e0e8;
    height: 26px;
    min-width: 76px;
    padding: 0;
    position: relative;
    text-align: center;
    vertical-align: middle;
}

.pm-schedule-table th {
    background: #05070b;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    position: sticky;
    text-transform: none;
    top: 0;
    z-index: 8;
}

.pm-schedule-table tbody tr:nth-child(even) td:not(.pm-project-col):not(.pm-initials-col) {
    background: #f7fbfd;
}

.pm-schedule-table tbody tr:nth-child(odd) td:not(.pm-project-col):not(.pm-initials-col) {
    background: #ffffff;
}

.pm-schedule-table tbody tr:hover td {
    background: #e8f7f7 !important;
}

.pm-schedule-table tbody tr:hover .pm-project-col a {
    color: #075e58;
}

.pm-schedule-table .pm-project-col {
    background: #ffffff;
    box-shadow: 1px 0 0 #9aa9b7;
    left: 0;
    min-width: 280px;
    padding: 3px 10px;
    position: sticky;
    text-align: left;
    width: 280px;
    z-index: 6;
}

.pm-schedule-table thead .pm-project-col {
    background: #05070b;
    z-index: 10;
}

.pm-schedule-table .pm-project-col a {
    color: #0f766e;
    display: block;
    font-weight: 650;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-schedule-table .pm-initials-col {
    background: #ffffff;
    box-shadow: 1px 0 0 #9aa9b7;
    left: 280px;
    min-width: 48px;
    position: sticky;
    width: 48px;
    z-index: 6;
}

.pm-initials-button {
    appearance: none;
    cursor: pointer;
}

.pm-initials-button:hover,
.pm-initials-button:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-colour, #0f766e), #ffffff 58%);
    outline: none;
}

.pm-schedule-table thead .pm-initials-col {
    background: #05070b;
    z-index: 10;
}

.pm-schedule-active {
    background: color-mix(in srgb, var(--pm-colour, #0f766e), #ffffff 14%) !important;
}

.pm-schedule-active span {
    background: var(--pm-colour, #0f766e);
    display: block;
    height: 100%;
    opacity: 0.92;
    width: 100%;
}

@media print {
    @page {
        margin: 10mm;
        size: A3 landscape;
    }

    body {
        background: #ffffff !important;
        color: #111827;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .app-topbar,
    .page-heading,
    .alert,
    .pm-schedule-top-scroll,
    .modal,
    .modal-backdrop {
        display: none !important;
    }

    .app-shell {
        max-width: none;
        padding: 0;
    }

    .pm-schedule-panel {
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .pm-print-title {
        align-items: end;
        border-bottom: 2px solid #111827;
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .pm-print-title h2 {
        font-size: 18px;
        margin: 0;
    }

    .pm-print-title strong {
        font-size: 12px;
    }

    .pm-schedule-summary {
        border: 1px solid #d1d5db;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 8px;
        padding: 6px;
    }

    .pm-schedule-summary div {
        border-radius: 0;
        padding: 5px 7px;
    }

    .pm-schedule-summary strong {
        font-size: 10px;
    }

    .pm-schedule-summary span {
        font-size: 8px;
    }

    .pm-schedule-scroll {
        overflow: visible;
    }

    .pm-schedule-table {
        font-size: 8px;
        min-width: 0;
        table-layout: fixed;
        width: 100%;
    }

    .pm-schedule-table th,
    .pm-schedule-table td {
        height: 18px;
        min-width: 0;
        padding: 0;
    }

    .pm-schedule-table th {
        background: #111827 !important;
        color: #ffffff !important;
        font-size: 7px;
        position: static;
    }

    .pm-schedule-table .pm-project-col,
    .pm-schedule-table .pm-initials-col {
        box-shadow: none;
        left: auto;
        position: static;
        z-index: auto;
    }

    .pm-schedule-table .pm-project-col {
        min-width: 0;
        padding: 2px 4px;
        width: 21%;
    }

    .pm-schedule-table .pm-initials-col {
        min-width: 0;
        width: 4%;
    }

    .pm-schedule-table .pm-project-col a {
        color: #111827;
        font-size: 8px;
        white-space: normal;
    }

    .pm-initials-button {
        border: 0;
        cursor: default;
    }

    .pm-schedule-active span {
        opacity: 1;
    }
}

.access-group-picker,
.access-permission-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-group-choice {
    align-items: flex-start;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 11px 12px;
}

.access-group-choice input {
    margin-top: 4px;
}

.access-group-choice strong,
.access-group-choice em {
    display: block;
}

.access-group-choice em {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-style: normal;
    margin-top: 2px;
}

.access-group-choice:has(input:checked) {
    background: #e8f3f1;
    border-color: #9fd2c7;
}

.access-group-choice-full {
    grid-column: 1 / -1;
}

.access-pill-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.access-pill {
    background: #eef4f6;
    border: 1px solid #d8e4e8;
    border-radius: 999px;
    color: #344054;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
}

[data-project-progress-payments].rows-updated tr {
    animation: rows-updated 1.2s ease;
}

@keyframes rows-updated {
    0% {
        background: #fef9c3;
    }
    100% {
        background: transparent;
    }
}

.alert-row {
    align-items: flex-start;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 9px;
    padding: 8px 0;
}

.alert-row-link {
    color: inherit;
    text-decoration: none;
}

.alert-row-link:hover {
    background: #f8fafc;
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.alert-row-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 6px;
    padding: 8px 10px;
}

.alert-row:last-child {
    border-bottom: 0;
}

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

.alert-row span {
    color: var(--cf-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.alert-icon {
    align-items: center;
    background: #fff5e8;
    border: 1px solid #f1d3a6;
    border-radius: 8px;
    color: var(--cf-warning);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.alert-icon svg {
    height: 16px;
    width: 16px;
}

.empty-state {
    color: var(--cf-muted);
    padding: 18px;
    text-align: center;
}

.project-actions-list {
    border-top: 1px solid var(--cf-line);
}

.project-activity-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.project-activity-type-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-activity-type-option,
.project-activity-pm-check {
    align-items: center;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: flex;
    gap: 9px;
    min-height: 42px;
    padding: 9px 11px;
}

.project-activity-type-option:has(input:checked) {
    background: #e6f5f1;
    border-color: var(--cf-teal);
    color: var(--cf-teal-dark);
    font-weight: 700;
}

.project-activity-email-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 14px;
}

.project-activity-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 0 18px 14px;
}

.project-activity-search {
    align-items: center;
    display: flex;
    flex: 1;
    position: relative;
}

.project-activity-search svg {
    color: var(--cf-muted);
    height: 18px;
    left: 12px;
    pointer-events: none;
    position: absolute;
    width: 18px;
}

.project-activity-search .form-control {
    padding-left: 38px;
}

.project-activity-toolbar .form-select {
    max-width: 260px;
}

.project-activity-pm-check {
    color: var(--cf-muted);
    margin: 14px 0 0;
}

.project-action-row {
    align-items: flex-start;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 18px;
}

.project-action-row:last-child {
    border-bottom: 0;
}

.project-action-row strong,
.project-action-row span {
    display: block;
}

.project-action-row strong {
    color: var(--cf-ink);
    font-size: 0.92rem;
}

.project-action-row span,
.project-action-row time {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.project-action-row time {
    white-space: nowrap;
}

.project-action-controls {
    align-items: flex-end;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 6px;
}

.project-action-controls form {
    margin: 0;
}

.project-action-controls .btn-icon-only {
    height: 30px;
    min-height: 30px;
    width: 32px;
}

.project-action-note {
    color: var(--cf-ink);
    font-size: 0.84rem;
    line-height: 1.35;
    margin: 6px 0 0;
    white-space: pre-wrap;
}

.project-action-badge {
    background: #eef2f7;
    border: 1px solid var(--cf-line);
    border-radius: 999px;
    color: var(--cf-muted);
    display: inline-flex !important;
    font-size: 0.68rem !important;
    font-weight: 700;
    margin-left: 6px;
    padding: 1px 7px;
    text-transform: uppercase;
    vertical-align: middle;
}

.project-action-email {
    margin-top: 4px;
}

.task-create-panel {
    margin-bottom: 18px;
}

.task-form,
.task-edit-form {
    padding: 18px;
}

.task-list {
    border-top: 1px solid var(--cf-line);
}

.task-row {
    align-items: flex-start;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 16px 18px;
}

.task-row:last-child {
    border-bottom: 0;
}

.task-row.is-overdue {
    background: #fff7ed;
}

.task-row.is-complete {
    background: #f8faf9;
}

.task-row-main {
    min-width: 0;
}

.task-row-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-row-title strong {
    font-size: 1rem;
}

.task-row-main p {
    color: #475467;
    margin: 8px 0 0;
    white-space: pre-line;
}

.task-row-meta {
    align-items: center;
    color: var(--cf-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    gap: 10px;
    margin-top: 10px;
}

.task-row-meta span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.task-row-meta svg {
    height: 14px;
    width: 14px;
}

.task-row-actions {
    align-items: flex-end;
    display: flex;
    flex: 0 0 250px;
    flex-direction: column;
    gap: 8px;
}

.task-edit-details {
    position: relative;
    text-align: right;
}

.task-edit-details summary {
    cursor: pointer;
    list-style: none;
}

.task-edit-details summary::-webkit-details-marker {
    display: none;
}

.task-edit-form {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
    display: grid;
    gap: 8px;
    margin-top: 8px;
    min-width: 330px;
    position: absolute;
    right: 0;
    text-align: left;
    z-index: 20;
}

.cashflow-grid {
    height: calc(100vh - 210px);
    min-height: 520px;
    width: 100%;
}

.vendor-report-grid {
    height: calc(100vh - 260px);
    min-height: 440px;
}

.vendor-contact-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    max-width: 100%;
    min-height: 38px;
    overflow: hidden;
    padding: 3px 0;
}

.vendor-contact-cell strong {
    color: var(--cf-ink);
    display: block;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-contact-project {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-payments-panel .section-heading-padded {
    padding-bottom: 10px;
    padding-top: 12px;
}

.vendor-heading-tools {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: flex-end;
}

.vendor-sync-summary {
    align-items: center;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 210px;
    padding: 7px 10px;
    text-align: right;
}

.vendor-sync-summary span,
.vendor-sync-summary small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.72rem;
    line-height: 1.1;
}

.vendor-sync-summary strong {
    color: var(--cf-ink);
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
    margin: 2px 0;
}

.vendor-sync-summary-form {
    flex: 0 0 auto;
}

.vendor-sync-button.is-syncing {
    border-color: var(--cf-primary);
    color: #fff;
    cursor: wait;
}

.vendor-sync-button.is-syncing i,
.vendor-sync-button.is-syncing svg {
    animation: vendor-sync-spin 0.8s linear infinite;
}

@keyframes vendor-sync-spin {
    to {
        transform: rotate(360deg);
    }
}

.vendor-schedule-actions {
    align-items: center;
    border-top: 1px solid var(--cf-line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 350px) minmax(126px, auto) minmax(220px, 1fr) auto;
    padding: 10px 18px;
}

.vendor-planned-summary-strip {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
}

.vendor-selected-summary-chip {
    background: #ecfdf3;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    flex: 0 0 auto;
    min-width: 126px;
    padding: 7px 10px;
}

.vendor-selected-summary-chip span,
.vendor-selected-summary-chip small {
    color: #4b5563;
    display: block;
    font-size: 0.72rem;
    line-height: 1.1;
}

.vendor-selected-summary-chip strong {
    color: #065f46;
    display: block;
    font-size: 0.94rem;
    line-height: 1.2;
    margin-top: 2px;
}

.vendor-selected-summary-chip.is-empty {
    background: #f8faf9;
    border-color: var(--cf-line);
}

.vendor-selected-summary-chip.is-empty strong {
    color: var(--cf-muted);
}

.vendor-planned-summary-chip,
.vendor-planned-summary-empty {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 7px 10px;
}

.vendor-planned-summary-chip {
    appearance: none;
    background: #ecfdf3;
    border-color: #bbf7d0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.vendor-planned-summary-chip:hover,
.vendor-planned-summary-chip:focus {
    background: #dcfce7;
    border-color: #86efac;
    outline: none;
}

.vendor-planned-summary-chip:focus-visible {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.18);
}

.vendor-planned-summary-chip span,
.vendor-planned-summary-chip small,
.vendor-planned-summary-empty {
    color: var(--cf-muted);
    font-size: 0.72rem;
    line-height: 1.1;
}

.vendor-planned-summary-chip strong {
    color: #166534;
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-top: 2px;
}

.vendor-planned-summary-empty {
    background: #f8faf9;
}

.vendor-schedule-actions .form-control {
    max-width: none;
    min-width: 0;
}

.vendor-search {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    width: 100%;
}

.vendor-search .input-group {
    min-width: 0;
    width: 100%;
}

.vendor-schedule-actions > .btn {
    justify-self: end;
    min-width: 124px;
    white-space: normal;
}

@media (max-width: 1100px) {
    .vendor-schedule-actions {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .vendor-search,
    .vendor-planned-summary-strip {
        grid-column: 1 / -1;
    }

    .vendor-selected-summary-chip {
        grid-column: 1;
        justify-self: start;
    }

    .vendor-schedule-actions > .btn {
        align-self: stretch;
        grid-column: 2;
        grid-row: 2;
    }
}

.vendor-age-overdue {
    color: var(--cf-danger) !important;
    font-weight: 700;
}

.vendor-report-grid .ag-cell.vendor-pay-cell {
    align-items: center;
    display: flex;
    justify-content: center;
    line-height: 1;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.vendor-report-grid .ag-header-cell[col-id="schedule_payment"] .ag-header-cell-label {
    justify-content: center;
}

.vendor-report-grid .vendor-pay-checkbox {
    appearance: auto;
    cursor: pointer;
    display: block;
    flex: 0 0 1.35rem;
    height: 1.35rem;
    margin: 0;
    width: 1.35rem;
}

.vendor-report-grid .vendor-grid-select {
    border-color: #cfd6dd;
    border-radius: 4px;
    font-size: 0.78rem;
    min-height: 30px;
    padding: 3px 26px 3px 7px;
}

.vendor-report-grid .vendor-pay-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.vendor-report-grid .vendor-pay-warning {
    align-items: center;
    background: #fff7d6;
    border: 1px solid #d89b00;
    border-radius: 50%;
    color: #8a5900;
    cursor: help;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 1.35rem;
    justify-content: center;
    line-height: 1;
    width: 1.35rem;
}

.vendor-report-grid .ag-row.vendor-payable-run-row {
    background: #fff7ed;
}

/* Contractor compliance */
.contractor-compliance-workspace {
    background: #fff;
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    overflow: hidden;
}

.contractor-compliance-header {
    align-items: flex-end;
    border-bottom: 1px solid var(--cf-border);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 24px;
}

.contractor-compliance-header h1 {
    font-size: 1.65rem;
    margin: 0 0 4px;
}

.contractor-compliance-header p:last-child,
.contractor-requirements-heading p {
    color: var(--cf-muted);
    margin: 0;
}

.contractor-compliance-toolbar {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 16px 24px;
}

.contractor-search-control {
    flex: 1 1 420px;
    max-width: 680px;
    position: relative;
}

.contractor-search-control svg {
    height: 18px;
    left: 12px;
    position: absolute;
    top: 11px;
    width: 18px;
}

.contractor-search-control input { padding-left: 40px; }

.contractor-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.contractor-filter {
    background: #eef8f3;
    border: 1px solid #b9ddce;
    color: #174f3d;
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 34px;
    padding: 5px 9px;
}

.contractor-filter:first-child { border-radius: 6px 0 0 6px; }
.contractor-filter:last-child { border-radius: 0 6px 6px 0; }
.contractor-filter.active { background: var(--cf-green); border-color: var(--cf-green); color: #fff; }
.contractor-filter span { margin-left: 5px; opacity: .75; }

.contractor-compliance-table-wrap { border-top: 1px solid var(--cf-border); }
.contractor-compliance-table th { background: #f4f6f7; color: #394b5a; font-size: .76rem; text-transform: uppercase; }
.contractor-compliance-table tbody tr { cursor: pointer; }
.contractor-compliance-table td { height: 66px; }

.contractor-status {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 800;
    padding: 4px 9px;
    white-space: nowrap;
}

.contractor-status-compliant { background: #e8f8ee; border-color: #a9e0ba; color: #176b36; }
.contractor-status-due_soon { background: #fff6d9; border-color: #e8ca6e; color: #785800; }
.contractor-status-expired { background: #ffebeb; border-color: #e5a3a3; color: #a11d1d; }
.contractor-status-missing { background: #fff1df; border-color: #e8b77a; color: #8b4a00; }
.contractor-status-inactive { background: #edf1f3; border-color: #cbd4d9; color: #53636d; }

.contractor-issue-summary {
    display: block;
    max-width: 390px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contractor-compliance-message {
    border-left: 4px solid;
    margin: 0 24px 14px;
    padding: 10px 12px;
}
.contractor-compliance-message.is-success { background: #e8f8ee; border-color: #27844b; color: #176b36; }
.contractor-compliance-message.is-danger { background: #ffebeb; border-color: #ba2c2c; color: #8a1717; }

.contractor-detail-status {
    align-items: center;
    background: #f4f7f6;
    border-left: 4px solid var(--cf-green);
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 12px;
}

.contractor-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contractor-field-wide { grid-column: 1 / -1; }
.contractor-edit-actions {
    align-items: center;
    border-bottom: 1px solid var(--cf-border);
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    padding-bottom: 18px;
}

.contractor-standard-types { border: 0; margin: 18px 0 0; padding: 0; }
.contractor-standard-types legend { font-size: .9rem; font-weight: 800; margin-bottom: 8px; }
.contractor-check-option { align-items: center; display: inline-flex; gap: 6px; margin-right: 18px; }

.contractor-requirements-heading { align-items: end; display: flex; justify-content: space-between; padding: 20px 0 12px; }
.contractor-requirements-heading h3 { font-size: 1.1rem; margin: 0 0 2px; }
.contractor-add-requirement {
    align-items: center;
    background: #f6faf8;
    border: 1px solid #cfe1d9;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr) auto auto;
    margin-bottom: 14px;
    padding: 12px;
}
.contractor-add-requirement .form-check { margin: 0; white-space: nowrap; }

.contractor-requirements-list { display: grid; gap: 10px; }
.contractor-requirement { border: 1px solid var(--cf-border); border-radius: 6px; padding: 14px; }
.contractor-requirement-head,
.contractor-current-document,
.contractor-document-history > div {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.contractor-requirement-head h4 { font-size: .98rem; margin: 0 0 3px; }
.contractor-requirement-actions { align-items: center; display: flex; gap: 12px; }
.contractor-requirement-actions .form-check { margin: 0; }
.requirement-required, .requirement-optional { color: var(--cf-muted); font-size: .75rem; }
.requirement-required { color: #176b36; font-weight: 700; }

.contractor-current-document {
    background: #f7f8f9;
    margin-top: 10px;
    min-height: 50px;
    padding: 8px 10px;
}
.contractor-current-document > div:first-child { display: grid; gap: 1px; }
.contractor-current-document > div:first-child span { color: var(--cf-muted); font-size: .78rem; }
.contractor-document-missing { color: #9b4b00; font-weight: 700; }
.contractor-file-available { color: #176b36; }
.contractor-file-unavailable { color: #9b4b00; font-weight: 700; }
.contractor-upload-form { display: grid; gap: 10px; grid-template-columns: 1.3fr .8fr .8fr 170px auto; margin-top: 10px; }
.contractor-document-history { border-top: 1px solid var(--cf-border); margin-top: 12px; padding-top: 10px; }
.contractor-document-history summary { color: var(--cf-muted); cursor: pointer; font-weight: 700; }
.contractor-document-history > div { border-top: 1px solid #edf0f2; margin-top: 8px; padding-top: 8px; }

@media (max-width: 900px) {
    .contractor-compliance-header, .contractor-compliance-toolbar { align-items: stretch; flex-direction: column; }
    .contractor-status-filters { justify-content: flex-start; }
    .contractor-form-grid, .contractor-add-requirement, .contractor-upload-form { grid-template-columns: 1fr; }
    .contractor-field-wide { grid-column: auto; }
}

.vendor-report-grid .ag-row.vendor-payable-run-row .ag-cell {
    border-bottom-color: #fed7aa;
}

.vendor-report-grid .ag-row.vendor-payment-batch-total-row {
    background: #ffffff;
    border-bottom: 2px solid #0f172a;
    border-top: 2px solid #0f172a;
}

.vendor-report-grid .ag-row.vendor-payment-batch-total-row .ag-cell {
    align-items: center;
    color: #0f172a;
    display: flex;
    font-weight: 800;
}

.vendor-report-grid .ag-row.vendor-payment-batch-total-row .ag-cell[col-id="amount_due"] {
    color: #0f172a;
    justify-content: flex-end;
}

.vendor-selected-overview {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.vendor-selected-overview > div {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 12px;
}

.vendor-selected-overview span,
.section-mini-heading span {
    color: var(--cf-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.vendor-selected-overview strong {
    color: var(--cf-ink);
    display: block;
    font-size: 1rem;
    margin-top: 4px;
}

.vendor-selected-list-block {
    margin-bottom: 18px;
}

.vendor-selected-list-heading {
    align-items: end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.vendor-selected-list-heading .section-mini-heading {
    margin-bottom: 0;
}

.vendor-selected-list-heading small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.76rem;
    line-height: 1.2;
    margin-top: 2px;
}

.vendor-selected-toggle {
    align-items: center;
    color: var(--cf-muted);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
}

.vendor-selected-list {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    max-height: 260px;
    overflow: auto;
}

.vendor-selected-list-row {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 12px;
}

.vendor-selected-list-row:hover {
    background: #f8faf9;
}

.vendor-selected-list-row + .vendor-selected-list-row {
    border-top: 1px solid var(--cf-line);
}

.vendor-selected-list-check {
    margin: 0;
}

.vendor-selected-list-main {
    min-width: 0;
}

.vendor-selected-list-main strong,
.vendor-selected-list-main span {
    display: block;
}

.vendor-selected-list-main strong {
    color: var(--cf-ink);
    font-size: 0.88rem;
    line-height: 1.2;
}

.vendor-selected-list-main span {
    color: var(--cf-muted);
    font-size: 0.74rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-selected-list-amount {
    color: var(--cf-ink);
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

.vendor-selected-list-empty {
    color: var(--cf-muted);
    margin: 0;
    padding: 12px;
}

.vendor-modal-clear-action {
    margin-right: auto;
}

.section-mini-heading {
    margin-bottom: 8px;
}

.vendor-modal-date-row {
    max-width: 320px;
}

.ag-theme-quartz {
    --ag-border-radius: 8px;
    --ag-font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    --ag-header-background-color: #f8faf9;
    --ag-header-foreground-color: #475467;
    --ag-selected-row-background-color: #e8f3f1;
}

.toast {
    border-radius: 8px;
}

.xero-contact-results {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(24, 33, 47, 0.1);
    margin-top: 6px;
    max-height: 260px;
    overflow: auto;
    position: absolute;
    width: min(520px, calc(100vw - 48px));
    z-index: 20;
}

.xero-contact-result,
.xero-contact-empty {
    background: transparent;
    border: 0;
    display: block;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.xero-contact-result:hover,
.xero-contact-result:focus {
    background: #e8f3f1;
}

.xero-contact-result.is-incomplete {
    background: #fff7ed;
    cursor: not-allowed;
}

.xero-contact-result.is-incomplete strong {
    color: #9a3412;
}

.xero-contact-result.is-incomplete:hover,
.xero-contact-result.is-incomplete:focus {
    background: #ffedd5;
}

.xero-contact-result strong,
.xero-contact-result span {
    display: block;
}

.xero-contact-result span,
.xero-contact-empty {
    color: var(--cf-muted);
    font-size: 0.82rem;
}

.schedule-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.schedule-heading-copy {
    flex: 1 1 auto;
    min-width: 320px;
}

.schedule-heading h1 {
    font-size: 1.28rem;
    line-height: 1.1;
}

.schedule-heading .eyebrow {
    font-size: 0.66rem;
    margin-bottom: 1px;
}

.schedule-heading-meta {
    color: var(--cf-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.74rem;
    gap: 2px 14px;
    line-height: 1.25;
    margin-top: 3px;
}

.live-pill {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 999px;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
    padding: 8px 10px;
    white-space: nowrap;
}

.live-pill[data-state="syncing"] {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

.live-pill[data-state="updated"] {
    background: #fef9c3;
    border-color: #fde047;
    color: #854d0e;
}

.live-pill[data-state="error"] {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.schedule-heading .heading-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.schedule-command-bar {
    align-items: flex-end;
    display: grid;
    flex: 0 1 auto;
    justify-items: end;
}

.schedule-command-primary,
.schedule-command-secondary {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.schedule-command-bar .btn {
    min-height: 32px;
    padding: 0.32rem 0.58rem;
}

.schedule-command-bar .btn-icon {
    height: 32px;
    padding: 0;
    width: 32px;
}

.schedule-command-bar .btn-icon-label {
    font-size: 0.84rem;
}

.schedule-range-nav {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.schedule-days-select {
    min-width: 170px;
    width: 190px;
}

.schedule-panel {
    overflow: visible;
}

.schedule-scroll {
    max-height: calc(100vh - 104px);
    overflow-x: hidden;
    overflow-y: auto;
}

.schedule-loading-shell {
    align-items: center;
    display: flex;
    min-height: 360px;
    justify-content: center;
}

.schedule-loading-card {
    align-items: center;
    background: #f8faf9;
    border: 1px solid #d7e2df;
    border-radius: 8px;
    color: #52606b;
    display: inline-flex;
    gap: 12px;
    padding: 16px 18px;
}

.schedule-loading-card strong {
    color: #14253a;
    display: block;
}

.schedule-loading-card span:last-child {
    display: block;
    font-size: 0.86rem;
}

.schedule-bottom-scroll {
    background: #f8faf9;
    border-top: 1px solid #b9c6d0;
    bottom: 0;
    height: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    position: sticky;
    z-index: 18;
}

.schedule-bottom-scroll::-webkit-scrollbar {
    height: 22px;
}

.schedule-bottom-scroll::-webkit-scrollbar-track {
    background: #e5eaee;
    border-radius: 999px;
}

.schedule-bottom-scroll::-webkit-scrollbar-thumb {
    background: #8b98a5;
    border: 4px solid #e5eaee;
    border-radius: 999px;
}

.schedule-bottom-scroll::-webkit-scrollbar-thumb:hover {
    background: #5f6f7f;
}

.schedule-bottom-scroll [data-schedule-bottom-spacer] {
    height: 1px;
}

.schedule-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.72rem;
    min-width: 1500px;
    table-layout: fixed;
    width: max-content;
}

.schedule-table th,
.schedule-table td {
    border-bottom: 1px solid #b9c6d0;
    border-right: 1px solid #b9c6d0;
    height: 26px;
    min-width: 104px;
    padding: 3px 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.schedule-table thead th {
    background: #05070a;
    color: #ffffff;
    font-weight: 750;
    position: sticky;
    top: 0;
    z-index: 14;
}

.schedule-table thead th span {
    display: block;
    font-size: 0.66rem;
    font-weight: 600;
    margin-top: 3px;
}

.schedule-table .schedule-title {
    font-size: 0.82rem;
    text-align: left;
}

.schedule-sticky {
    box-shadow: 1px 0 0 #8795a1;
    left: 0;
    min-width: 252px !important;
    position: sticky;
    z-index: 4;
}

tbody .schedule-sticky {
    background: inherit;
    text-align: left;
}

thead .schedule-sticky {
    z-index: 16;
}

.schedule-summary-sticky > th,
.schedule-summary-sticky > td {
    background: inherit;
    position: sticky;
    top: var(--schedule-sticky-top);
    z-index: 10;
}

.schedule-summary-sticky > .schedule-sticky {
    z-index: 13;
}

.schedule-weekend {
    background: #0f2738 !important;
}

.schedule-start {
    background: #ffffff;
    font-weight: 700;
}

.schedule-income {
    background: #d9f99d;
    color: #166534;
}

.schedule-muted {
    background: #f7dfd0;
    color: #667085;
}

.schedule-outflow {
    background: #fee2e2;
    color: #7f1d1d;
}

.schedule-amex {
    background: #efc9ec;
    color: #6d1f63;
}

.schedule-total {
    background: #fecaca;
    color: #7f1d1d;
}

.schedule-unplanned-outgoing {
    background: #fed7aa;
    color: #7c2d12;
}

.schedule-ato {
    background: #fee2e2;
    color: #991b1b;
}

.schedule-amex-payment {
    background: #f8d7ef;
    color: #86198f;
}

.schedule-available {
    background: #d8f5d2;
    color: #166534;
    font-weight: 800;
}

.schedule-closing {
    background: #d1f1ff;
    color: #075985;
    font-weight: 800;
}

.schedule-editable-cash-cell {
    cursor: pointer;
}

.schedule-reconciliation-cell {
    cursor: pointer;
    position: relative;
}

.schedule-reconciliation-cell:hover {
    outline: 2px solid #14b8a6;
    outline-offset: -2px;
}

.schedule-reconciled-cell {
    background-image: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0));
    color: #0f766e;
}

.schedule-forecast-cell {
    color: #64748b;
    font-style: italic;
}

.schedule-closing .schedule-forecast-cell {
    color: #64748b;
}

.schedule-locked-cell {
    box-shadow: inset 0 0 0 999px rgba(15, 23, 42, 0.045);
    cursor: not-allowed;
}

.schedule-reconciliation-cell.schedule-reconciled-cell {
    background: #bbf7d0 !important;
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.32);
    color: #14532d;
    font-weight: 850;
}

.schedule-reconciliation-cell.schedule-locked-cell {
    cursor: pointer;
}

.schedule-locked-cell .schedule-drag-card {
    cursor: not-allowed;
}

.schedule-reconciled-mark {
    color: #0f766e;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 900;
    margin-left: 4px;
    vertical-align: top;
}

.schedule-editable-cash-cell[data-movable-cash-cell="true"] {
    cursor: grab;
}

.schedule-editable-cash-cell[data-movable-cash-cell="true"]:active {
    cursor: grabbing;
}

.schedule-editable-cash-cell.is-dragging {
    opacity: 0.55;
}

.schedule-editable-cash-cell:hover {
    outline: 2px solid #0ea5e9;
    outline-offset: -2px;
}

.schedule-editable-cash-cell.schedule-actual-cell {
    cursor: help;
}

.schedule-editable-cash-cell.schedule-actual-cell:hover {
    outline: 2px solid rgba(100, 116, 139, 0.45);
    outline-offset: -2px;
}

.schedule-has-details {
    text-decoration: underline dotted rgba(15, 23, 42, 0.35);
    text-underline-offset: 3px;
}

.schedule-manual-cell {
    background-image: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.18));
}

.schedule-paid-cell {
    background: #bbf7d0 !important;
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.28);
    color: #14532d;
}

.schedule-paid-mark {
    color: #15803d;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 900;
    margin-left: 4px;
    vertical-align: top;
}

.schedule-gap {
    background: #f8faf9;
    height: 14px;
}

.schedule-amex-heading {
    background: #d456c8;
    color: #ffffff;
    font-weight: 800;
}

.schedule-project-row {
    background: #c7edfb;
}

.schedule-project-lane-row .schedule-project-cell {
    border-top-color: rgba(125, 175, 190, 0.42);
}

.schedule-project-row:nth-child(even) {
    background: #bce8f6;
}

.schedule-table tbody tr:hover,
.schedule-table tbody tr:hover .schedule-sticky {
    background: #fff7c2 !important;
}

.schedule-table tbody tr:hover td {
    box-shadow: inset 0 1px 0 #e4c95f, inset 0 -1px 0 #e4c95f;
}

.schedule-project-row .schedule-sticky span {
    color: #475467;
    display: block;
    font-size: 0.66rem;
    font-weight: 500;
    max-width: 238px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-project-title {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.schedule-project-title strong {
    color: #111827;
    font-size: 0.8rem;
    font-weight: 620;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-project-summary-trigger {
    background: transparent;
    border: 0;
    display: block;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 100%;
}

.schedule-project-summary-trigger:hover .schedule-project-title strong,
.schedule-project-summary-trigger:focus-visible .schedule-project-title strong {
    color: var(--cf-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.schedule-project-summary-trigger:focus-visible {
    border-radius: 5px;
    outline: 2px solid rgba(15, 118, 110, 0.3);
    outline-offset: 2px;
}

.schedule-project-meta-row {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 2px;
    max-width: 238px;
    min-width: 0;
}

.schedule-project-meta-row form {
    flex: 0 0 auto;
}

.schedule-project-pin {
    align-items: center;
    background: #ffffff;
    border: 1px solid #7fb6c6;
    border-radius: 5px;
    color: #0f5f72;
    display: inline-flex;
    flex: 0 0 16px;
    height: 16px;
    justify-content: center;
    line-height: 1;
    min-height: 16px;
    padding: 0;
    width: 16px;
}

.schedule-project-pin:hover,
.schedule-project-pin:focus {
    background: #ecfeff;
    border-color: #0f7286;
    color: #0f5f72;
}

.schedule-project-pin.is-pinned {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #ffffff;
}

.schedule-project-pin i {
    display: block;
    height: 9px;
    stroke-width: 2.6;
    width: 9px;
}

.schedule-project-pin svg {
    display: block;
    height: 9px;
    stroke: currentColor;
    width: 9px;
}

.schedule-project-address {
    color: #334155 !important;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    line-height: 1.18;
    margin-top: 2px;
}

.project-summary-dialog {
    max-width: 860px;
}

.project-summary-modal .modal-header {
    align-items: flex-start;
    padding: 18px 22px 14px;
}

.project-summary-modal .modal-body {
    padding: 18px 22px 22px;
}

.payable-warning-dialog {
    max-width: 620px;
}

.payable-warning-modal .modal-header,
.payable-warning-modal .modal-body,
.payable-warning-modal .modal-footer {
    padding-left: 22px;
    padding-right: 22px;
}

.payable-warning-modal .modal-header {
    align-items: flex-start;
    padding-top: 18px;
}

.payable-warning-modal .modal-body {
    color: var(--cf-muted);
    line-height: 1.45;
}

.modal-kicker {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.project-summary-address {
    color: var(--cf-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.project-summary-headings,
.project-summary-row {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(190px, 1fr) 90px 90px 88px 112px;
}

.project-summary-headings {
    border-bottom: 1px solid var(--cf-line);
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0 0 9px;
    text-transform: uppercase;
}

.project-summary-list {
    max-height: min(52vh, 460px);
    overflow-y: auto;
}

.project-summary-row {
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
    font-size: 0.9rem;
    padding: 11px 0;
}

.project-summary-row strong {
    color: var(--cf-ink);
    text-align: right;
}

.project-summary-description {
    color: var(--cf-ink);
    font-weight: 650;
    min-width: 0;
}

.project-summary-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 6px 9px;
    text-align: center;
    white-space: nowrap;
}

.project-summary-status-not_sent {
    background: #fee2e2;
    color: #991b1b;
}

.project-summary-status-sent {
    background: #dcfce7;
    color: #166534;
}

.project-summary-status-received {
    background: #111827;
    color: #fff;
}

.project-summary-empty {
    color: var(--cf-muted);
    font-size: 0.92rem;
    margin: 0;
}

@media (max-width: 760px) {
    .project-summary-headings,
    .project-summary-row {
        grid-template-columns: minmax(150px, 1fr) 78px 78px 78px 96px;
    }
}

.schedule-weekend-cell {
    background: #afd9ee;
}

.schedule-project-cell {
    cursor: cell;
    overflow: visible;
    vertical-align: top;
}

.schedule-project-row:nth-child(even) .schedule-weekend-cell {
    background: #a5d2e7;
}

.schedule-drag-card {
    background: linear-gradient(180deg, #b8892d 0%, #8f641e 100%);
    border: 1px solid rgba(92, 61, 12, 0.72);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 246, 196, 0.28), 0 1px 2px rgba(15, 23, 42, 0.16);
    cursor: grab;
    line-height: 1.15;
    min-height: 22px;
    padding: 2px 4px;
}

.schedule-range-card {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
    position: relative;
    width: 100%;
}

.schedule-range-card + .schedule-range-card {
    margin-top: 3px;
}

.schedule-card-content {
    align-items: end;
    display: grid !important;
    column-gap: 6px;
    row-gap: 1px;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    max-width: 100%;
    width: 100%;
}

.schedule-card-label {
    display: -webkit-box !important;
    grid-column: 1 / -1;
    line-height: 1.05;
    max-height: 2.1em;
    max-width: 126px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.schedule-card-invoice {
    justify-self: start;
    max-width: 90px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-range-handle {
    background: rgba(15, 118, 110, 0.42);
    border: 0;
    border-radius: 999px;
    cursor: ew-resize;
    height: calc(100% - 8px);
    min-height: 14px;
    padding: 0;
    position: absolute;
    top: 4px;
    opacity: 0.7;
    width: 4px;
}

.schedule-range-handle:hover,
.schedule-range-handle:focus {
    background: rgba(15, 118, 110, 0.8);
    opacity: 1;
    outline: none;
}

.schedule-range-handle-start {
    left: 4px;
}

.schedule-range-handle-end {
    right: 4px;
}

.schedule-drag-card:active {
    cursor: grabbing;
}

.schedule-drag-card.is-dragging {
    opacity: 0.45;
}

.schedule-range-card.is-resizing {
    opacity: 0.35;
    z-index: 4;
}

.schedule-range-preview {
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.25), 0 8px 18px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    cursor: ew-resize;
    display: block;
    pointer-events: none;
    position: fixed;
    z-index: 5000;
}

.schedule-range-preview span,
.schedule-range-preview small {
    max-width: 100%;
}

.schedule-drag-card strong,
.schedule-drag-card span,
.schedule-drag-card small {
    display: block;
}

.schedule-drag-card strong {
    color: #fff7d6;
    font-size: 0.68rem;
    justify-self: end;
    line-height: 1;
    padding-left: 0;
    text-align: right;
    white-space: nowrap;
}

.schedule-drag-card span {
    color: #fff3c4;
    font-size: 0.62rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-drag-card small {
    color: #fffbeb;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-card-bank-badge {
    align-self: flex-start;
    background: #dcfce7;
    border-radius: 999px;
    color: #065f46 !important;
    display: inline-flex !important;
    font-size: 0.56rem !important;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-width: 16px;
    padding: 0.14rem 0.24rem;
}

.schedule-card-bank-suggested .schedule-card-bank-badge {
    background: #fef3c7;
    color: #92400e !important;
}

.schedule-card-bank-reconciled .schedule-card-bank-badge {
    background: #d1fae5;
    color: #065f46 !important;
}

.schedule-card-bank-part_received .schedule-card-bank-badge {
    background: #dbeafe;
    color: #1d4ed8 !important;
}

.bank-match-panel {
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    overflow: hidden;
}

.bank-match-panel-heading,
.bank-match-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.bank-match-panel-heading {
    background: #fff;
    border-bottom: 1px solid #d8dee8;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
}

.bank-match-panel-heading span,
.bank-match-row-main small,
.bank-match-row-main span {
    color: #64748b;
    font-size: 0.8rem;
}

.bank-match-list {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
}

.bank-match-selected {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0.75rem 0.75rem 0;
    padding: 0.75rem 0.85rem;
}

.bank-match-selected div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.bank-match-selected span,
.bank-match-selected small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.bank-match-selected strong {
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bank-match-selected b {
    color: #065f46;
    flex: 0 0 auto;
    font-size: 1rem;
}

.bank-match-selected-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.bank-match-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    justify-content: space-between;
    padding: 0.65rem;
}

.bank-match-row-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.bank-match-row-main strong,
.bank-match-row-main span,
.bank-match-row-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bank-match-row-amount {
    display: grid;
    gap: 0.15rem;
    min-width: 7.5rem;
    text-align: right;
}

.bank-match-row-amount span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.bank-match-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.bank-match-manual {
    display: grid;
    gap: 0.5rem;
}

.bank-match-manual h3 {
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 800;
    margin: 0;
}

.bank-match-status-matched {
    background: #d1fae5;
    color: #065f46;
}

.bank-match-status-suggested {
    background: #fef3c7;
    color: #92400e;
}

.bank-match-status-unmatched {
    background: #f1f5f9;
    color: #475569;
}

.schedule-card-state-not_sent {
    background: #fee2e2;
    border-color: #ef4444;
}

.schedule-card-state-not_sent strong,
.schedule-card-state-not_sent span,
.schedule-card-state-not_sent small {
    color: #991b1b;
}

.schedule-card-state-sent {
    background: #dcfce7;
    border-color: #22c55e;
}

.schedule-card-state-sent strong,
.schedule-card-state-sent span,
.schedule-card-state-sent small {
    color: #166534;
}

.schedule-card-state-received {
    background: #f5c542;
    border-color: #c99700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(15, 23, 42, 0.16);
}

.schedule-card-state-received strong,
.schedule-card-state-received span,
.schedule-card-state-received small {
    color: #1f2937;
}

.schedule-card-type-variation {
    border-style: dashed;
    border-width: 2px;
}

.schedule-drop-target {
    outline: 2px solid #0f766e;
    outline-offset: -2px;
}

.schedule-drop-reject {
    outline: 2px solid #b42318;
    outline-offset: -2px;
}

.split-payment-dialog {
    max-width: 650px;
}

.split-payment-modal .modal-header {
    align-items: flex-start;
    padding: 16px 18px 14px;
}

.split-payment-modal .modal-body {
    padding: 16px 18px;
}

.split-payment-modal .modal-footer {
    padding: 14px 18px;
}

.split-modal-title-block {
    min-width: 0;
}

.split-payment-modal .modal-title {
    font-size: 1.15rem;
    line-height: 1.15;
}

.split-modal-context {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.split-context-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe7ed;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 5px 9px;
}

.split-context-item svg {
    color: var(--cf-primary);
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.split-context-item strong {
    color: #0f172a;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.split-context-item strong.text-danger {
    color: var(--cf-danger) !important;
}

.split-summary,
.split-balance {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe7ed;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px;
}

.split-payment-summary {
    background: #ffffff;
    border-color: #d7dde5;
    margin-bottom: 14px;
    padding: 13px 14px;
}

.split-payment-summary span {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.split-payment-summary strong {
    font-size: 1.05rem;
}

.split-status-picker {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.split-status-picker > span {
    color: var(--cf-muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.split-status-options {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split-status-chip {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
}

.split-status-chip i {
    border-radius: 999px;
    display: inline-block;
    height: 14px;
    width: 14px;
}

.split-status-chip-draft i {
    background: #ef4444;
}

.split-status-chip-submitted i {
    background: #22c55e;
}

.split-status-chip-approved i {
    background: #111827;
}

.split-status-chip.is-active {
    background: #f0fdfa;
    border-color: var(--cf-primary);
    box-shadow: inset 0 0 0 1px var(--cf-primary);
    color: #111827;
}

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

.split-summary span,
.split-balance span {
    color: var(--cf-muted);
    font-size: 0.82rem;
}

.split-summary strong,
.split-balance strong {
    color: #0f172a;
    white-space: nowrap;
}

.split-balance {
    background: #ecfeff;
    margin-bottom: 0;
}

.xero-invoice-panel {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe7ed;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(170px, 1fr) auto;
    padding: 12px 13px;
}

.xero-invoice-meta {
    align-content: center;
    display: grid;
    gap: 1px;
    min-width: 0;
}

.xero-invoice-panel span,
.xero-invoice-panel small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
}

.xero-invoice-panel span {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: none;
    white-space: nowrap;
}

.xero-invoice-panel strong {
    display: block;
    font-size: 1.02rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xero-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.xero-invoice-actions .btn {
    justify-content: center;
    min-height: 34px;
    min-width: 84px;
    white-space: nowrap;
}

.payable-file-preview {
    min-width: 0;
}

.payable-review-layout .panel {
    overflow: hidden;
}

.payable-review-layout .section-heading-padded {
    padding-bottom: 10px;
    padding-top: 10px;
}

.payable-review-form-body {
    padding-top: 12px !important;
}

.payable-review-form-body .form-label {
    color: var(--cf-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.payable-review-form-body .form-control,
.payable-review-form-body .form-select {
    min-height: 38px;
}

.payable-review-form-body textarea.form-control {
    min-height: 70px;
}

.payable-file-preview iframe {
    border: 0;
    display: block;
    min-height: min(760px, calc(100vh - 260px));
    width: 100%;
}

.payable-file-preview-placeholder {
    align-items: center;
    background: #f8fbfb;
    border-top: 1px solid var(--cf-line);
    color: var(--cf-muted);
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 280px;
    padding: 24px;
    text-align: center;
}

.payable-file-preview-placeholder svg {
    background: #e8f3f1;
    border: 1px solid #b7ddd5;
    border-radius: 8px;
    color: var(--cf-primary-dark);
    height: 42px;
    padding: 9px;
    width: 42px;
}

.payable-file-preview-placeholder strong {
    color: var(--cf-ink);
    font-size: 1rem;
}

.progress-payment-main {
    min-width: 280px;
}

.progress-payment-xero {
    min-width: 310px;
}

.progress-payment-date-cell {
    color: #334155;
    white-space: nowrap;
}

.progress-payment-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.progress-payment-title strong {
    color: #111827;
}

.progress-payment-title span {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-payment-title .progress-payment-type-pill {
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    padding: 6px 10px;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
    text-transform: uppercase;
}

.progress-payment-type-pill-variation {
    background: #9a3412;
    border-color: #7c2d12;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(154, 52, 18, 0.22);
}

.progress-payment-title .progress-payment-signing-pill {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    padding: 6px 10px;
    white-space: nowrap;
}

.progress-payment-signing-pill.is-signed {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534 !important;
}

.progress-payment-signing-pill.is-waiting {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8 !important;
}

.progress-payment-signing-pill.is-not-sent {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569 !important;
}

.progress-payment-signing-pill.is-action-needed {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b !important;
}

.progress-payment-task {
    color: #334155;
    margin-top: 2px;
}

.progress-payment-variation-summary {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 3px;
}

.progress-payment-docusign-warning {
    color: #b45309;
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.3;
    margin-top: 4px;
}

.progress-xero-strip {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 0;
    padding: 0;
}

.progress-gst-toggle {
    display: inline-flex;
    gap: 8px;
}

.progress-gst-toggle label {
    align-items: center;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    padding: 9px 12px;
}

.progress-gst-toggle input {
    margin: 0;
}

.progress-gst-toggle label:has(input:checked) {
    background: #e7f8f4;
    border-color: #128678;
    color: #0f766e;
    font-weight: 750;
}

.progress-payment-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.variation-fields-panel {
    background: #f8fafc;
    border: 1px solid #dbe5e8;
    border-radius: 8px;
    padding: 14px;
}

.variation-fields-panel-standalone {
    align-self: start;
    background: #ffffff;
}

.variation-create-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.variation-create-stack {
    display: block;
}

.variation-payment-modal .modal-dialog,
#progressPaymentEditModal.is-editing-variation .modal-dialog {
    max-width: min(1280px, calc(100vw - 32px));
}

.variation-payment-modal .modal-body,
#progressPaymentEditModal.is-editing-variation .modal-body {
    padding: 10px 12px;
}

.variation-payment-modal .modal-header,
.variation-payment-modal .modal-footer,
#progressPaymentEditModal.is-editing-variation .modal-header,
#progressPaymentEditModal.is-editing-variation .modal-footer {
    padding-left: 12px;
    padding-right: 12px;
}

.variation-payment-modal .modal-header,
#progressPaymentEditModal.is-editing-variation .modal-header {
    align-items: flex-start;
    gap: 16px;
}

.variation-header-owner-note {
    display: grid;
    gap: 2px;
    margin-left: auto;
    max-width: 420px;
    min-width: 260px;
    text-align: right;
}

.variation-header-owner-note span {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.variation-header-owner-note strong {
    color: var(--cf-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.variation-edit-intro {
    display: block;
}

#progressPaymentEditModal.is-editing-variation .variation-edit-intro {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.variation-edit-main-fields {
    display: grid;
    gap: 6px;
}

.variation-pricing-helper {
    background: #f8fafc;
    border: 1px solid #dbe4ea;
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
    min-width: 0;
    overflow: hidden;
}

.variation-pricing-helper > div {
    border-top: 1px solid #e5edf2;
    padding: 6px 8px;
}

.variation-pricing-helper > div:first-child {
    border-top: 0;
}

.variation-pricing-helper span {
    color: var(--cf-muted);
    display: block;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.variation-pricing-helper strong {
    color: var(--cf-ink);
    display: block;
    font-size: 0.92rem;
    font-weight: 900;
    margin-top: 2px;
    white-space: nowrap;
}

.variation-payment-modal .form-label,
#progressPaymentEditModal.is-editing-variation .form-label {
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.variation-payment-modal textarea.form-control,
#progressPaymentEditModal.is-editing-variation textarea.form-control {
    min-height: 38px;
}

.progress-edit-grid {
    display: block;
}

.progress-edit-grid.is-variation {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
}

.is-editing-variation .modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding-bottom: 14px;
}

.progress-edit-side {
    display: grid;
    gap: 8px;
}

.progress-edit-rail {
    display: grid;
    gap: 7px;
    min-width: 0;
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-timing-row > div {
    align-items: center;
    column-gap: 6px;
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-timing-row .form-label {
    margin-bottom: 0;
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-timing-row .form-text {
    display: none;
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-timing-row input[type="date"] {
    max-width: 168px;
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-timing-row .input-group {
    max-width: 138px;
}

.variation-payment-modal .progress-edit-side,
#progressPaymentEditModal.is-editing-variation .progress-edit-side {
    gap: 7px;
}

.progress-edit-row-stack {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.variation-payment-modal .progress-edit-row-stack,
#progressPaymentEditModal.is-editing-variation .progress-edit-row-stack {
    gap: 6px;
}

.variation-payment-modal .variation-timing-row,
#progressPaymentEditModal.is-editing-variation .variation-timing-row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr !important;
}

.progress-edit-row-stack.variation-admin-row,
.progress-edit-grid.is-variation [data-progress-xero-fields].variation-admin-row {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr !important;
}

#progressPaymentEditModal.is-editing-variation .progress-edit-rail .variation-admin-row .form-text {
    display: none;
}

.progress-edit-grid.is-variation [data-progress-status-field],
.progress-edit-grid.is-variation [data-progress-xero-fields] {
    border-top: 0;
    padding-top: 0;
}

.progress-edit-grid.is-variation [data-progress-xero-fields] {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
}

.progress-edit-grid.is-variation [data-progress-xero-fields] > * {
    max-width: none;
    width: 100%;
}

.variation-create-side {
    display: grid;
    gap: 16px;
}

.variation-panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.variation-panel-heading h3 {
    font-size: 1rem;
    margin: 0;
}

.variation-panel-heading p {
    color: var(--cf-muted);
    font-size: 0.86rem;
    margin: 0;
}

.variation-line-list {
    display: grid;
    gap: 6px;
}

.variation-line-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(150px, 190px) 38px;
}

.progress-edit-grid.is-variation .variation-line-row,
.variation-create-stack .variation-line-row {
    align-items: center;
    gap: 8px;
    grid-template-columns: minmax(360px, 2fr) minmax(220px, 0.75fr) minmax(160px, 0.55fr) 38px;
    padding: 0;
}

.progress-edit-grid.is-variation .variation-line-row [data-remove-variation-line],
.variation-create-stack .variation-line-row [data-remove-variation-line] {
    justify-self: end;
}

.progress-edit-grid.is-variation .variation-fields-panel,
.variation-create-stack .variation-fields-panel {
    padding: 6px 8px 8px;
}

.progress-edit-grid.is-variation .variation-total-strip,
.variation-create-stack .variation-total-strip {
    margin-top: 8px;
}

.project-cost-budget-line-row {
    background: #fbfdff;
}

.variation-line-row .form-label {
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.variation-line-row .form-control,
.variation-line-row .form-select {
    min-height: 36px;
}

.variation-total-strip {
    align-items: center;
    background: #e7f8f4;
    border: 1px solid #b9e7dd;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 8px 10px;
}

.variation-total-strip span,
.variation-owner-note span {
    color: var(--cf-muted);
    font-size: 0.82rem;
}

.variation-total-strip strong {
    color: #0f766e;
    font-size: 1.05rem;
}

.variation-owner-note {
    background: #f8fafc;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.variation-owner-note strong {
    color: var(--cf-ink);
    font-size: 0.9rem;
}

.docusign-progress-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.48);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 5000;
}

.docusign-progress-card {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
    max-width: 420px;
    padding: 22px;
    width: min(420px, 100%);
}

.docusign-progress-header {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.docusign-progress-header span {
    color: var(--cf-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.docusign-progress-header strong {
    color: #111827;
    font-size: 20px;
}

.docusign-progress-steps {
    display: grid;
    gap: 10px;
}

.docusign-progress-step {
    align-items: center;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: var(--cf-muted);
    display: flex;
    gap: 10px;
    padding: 11px 12px;
}

.docusign-progress-step span {
    background: #e5e7eb;
    border-radius: 999px;
    display: block;
    height: 12px;
    width: 12px;
}

.docusign-progress-step.is-active {
    border-color: var(--cf-teal);
    color: #111827;
}

.docusign-progress-step.is-active span {
    animation: docusign-pulse 0.85s ease-in-out infinite;
    background: var(--cf-teal);
}

.docusign-progress-step.is-done {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.docusign-progress-step.is-done span {
    background: #10b981;
}

.docusign-progress-step.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.docusign-progress-step.is-error span {
    background: #ef4444;
}

.docusign-progress-message {
    color: var(--cf-muted);
    font-size: 13px;
    margin-top: 14px;
}

@keyframes docusign-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(18, 128, 116, 0.32);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(18, 128, 116, 0);
    }
}

@media (max-width: 980px) {
    .variation-create-grid,
    .progress-edit-grid.is-variation {
        grid-template-columns: 1fr;
    }

    .variation-payment-modal .modal-dialog,
    #progressPaymentEditModal.is-editing-variation .modal-dialog {
        max-width: calc(100vw - 20px);
    }

    .variation-payment-modal .modal-header,
    #progressPaymentEditModal.is-editing-variation .modal-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .variation-header-owner-note {
        grid-column: 1 / -1;
        margin-left: 0;
        max-width: none;
        min-width: 0;
        text-align: left;
    }

    #progressPaymentEditModal.is-editing-variation .variation-edit-intro {
        grid-template-columns: 1fr;
    }

    .variation-payment-modal .variation-timing-row,
    #progressPaymentEditModal.is-editing-variation .variation-timing-row {
        grid-template-columns: 1fr;
    }

    .progress-edit-grid.is-variation .variation-line-row,
    .variation-create-stack .variation-line-row {
        grid-template-columns: 1fr;
    }

    .progress-edit-grid.is-variation .variation-line-row [data-remove-variation-line],
    .variation-create-stack .variation-line-row [data-remove-variation-line] {
        justify-self: start;
    }

    .project-cost-line-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .project-cost-line-money {
        text-align: left;
    }
}

.add-payment-dialog {
    max-width: 560px;
}

.add-payment-modal .modal-header {
    align-items: flex-start;
    border-bottom-color: #e5e7eb;
    padding: 15px 18px 12px;
}

.add-payment-modal .modal-body {
    padding: 16px 18px 18px;
}

.add-payment-modal .modal-footer {
    background: #f8fafc;
    border-top-color: #e5e7eb;
    padding: 12px 18px;
}

.add-payment-title-block {
    min-width: 0;
}

.add-payment-modal .modal-title {
    font-size: 1.08rem;
    line-height: 1.2;
}

.add-payment-project-context {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.3;
    margin: 6px 0 0;
    max-width: 470px;
}

.add-payment-stack {
    display: grid;
    gap: 13px;
}

.payment-type-options {
    display: grid;
    background: #f8fafc;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
}

.payment-type-options label {
    align-items: center;
    border: 0;
    border-right: 1px solid #d8dee6;
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
}

.payment-type-options label:last-child {
    border-right: 0;
}

.payment-type-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-type-options span {
    line-height: 1.15;
    white-space: nowrap;
}

.payment-type-options label:has(input:checked) {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #ffffff;
    font-weight: 750;
}

.add-payment-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
}

.add-payment-type-options label {
    min-height: 42px;
    padding: 8px 12px;
}

.add-payment-date-grid,
.add-payment-bottom-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.92fr);
}

.add-payment-date-row {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
    padding: 7px 12px;
}

.add-payment-date-row span {
    color: var(--cf-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.add-payment-date-row strong {
    color: var(--cf-ink);
    font-size: 0.92rem;
    margin-top: 1px;
}

.add-payment-status-options {
    display: grid;
    background: #f8fafc;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
}

.add-payment-status-chip {
    margin: 0;
}

.add-payment-status-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.add-payment-status-chip span {
    align-items: center;
    background: transparent;
    border: 0;
    border-right: 1px solid #d8dee6;
    border-radius: 0;
    color: #334155;
    cursor: pointer;
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    min-height: 40px;
    padding: 8px 7px;
    white-space: nowrap;
}

.add-payment-status-chip:last-child span {
    border-right: 0;
}

.add-payment-status-chip strong {
    font-size: inherit;
    line-height: 1;
}

.add-payment-status-chip i {
    border-radius: 999px;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.add-payment-status-chip-draft i {
    background: #ef4444;
}

.add-payment-status-chip-submitted i {
    background: #22c55e;
}

.add-payment-status-chip-approved i {
    background: #111827;
}

.add-payment-status-chip input:checked + span {
    background: var(--cf-primary);
    box-shadow: none;
    color: #ffffff;
}

.add-payment-status-chip input:checked + span i {
    background: #ffffff;
}

.progress-xero-meta span,
.progress-xero-meta em {
    color: var(--cf-muted);
    display: block;
    font-size: 0.7rem;
    font-style: normal;
}

.progress-xero-meta strong {
    color: #0f172a;
    display: block;
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: nowrap;
}

.progress-payment-status-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.progress-payment-status,
.progress-xero-meta em.progress-payment-xero-status {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
    padding: 5px 8px;
    white-space: nowrap;
}

.progress-payment-status-not_sent {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.progress-payment-status-sent {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.progress-payment-status-received {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.progress-xero-meta em.progress-payment-xero-status {
    margin-top: 5px;
}

.progress-payment-xero-status.is-empty,
.progress-payment-xero-status.is-linked {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.progress-payment-xero-status.is-draft,
.progress-payment-xero-status.is-submitted,
.progress-payment-xero-status.is-blocked {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.progress-payment-xero-status.is-authorised {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.progress-payment-xero-status.is-paid {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.progress-payment-xero-status.is-voided {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.progress-xero-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: flex-end;
    white-space: nowrap;
}

.progress-tool-group {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.progress-tool-group-label {
    color: #64748b;
    display: block;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.progress-row-action-groups {
    align-items: flex-start;
    display: inline-flex;
    gap: 10px;
    justify-content: flex-end;
    white-space: nowrap;
}

.progress-action-cluster {
    align-items: flex-start;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
}

.progress-action-buttons {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.progress-action-buttons .btn,
.progress-action-buttons form {
    margin-left: 0;
}

.progress-payment-actions {
    white-space: nowrap;
}

.progress-payment-actions .btn {
    margin-left: 0;
}

.project-list-toolbar {
    align-items: end;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
}

.project-search-form {
    flex: 1 1 640px;
    max-width: 760px;
}

.project-search-control {
    align-items: center;
    display: flex;
    gap: 8px;
}

.project-search-control > svg {
    color: var(--cf-muted);
    flex: 0 0 auto;
    height: 20px;
    width: 20px;
}

.project-search-control .form-control {
    min-width: 260px;
}

.pipeline-list-panel .project-search-form {
    max-width: none;
}

.pipeline-list-panel .project-search-control {
    flex-wrap: wrap;
}

.pipeline-list-panel .project-search-control .form-control,
.pipeline-list-panel .project-search-control .form-select {
    flex: 1 1 180px;
    min-width: 0;
}

.pipeline-list-panel .project-search-control input[type="date"] {
    flex-basis: 170px;
}

.pipeline-list-table {
    table-layout: fixed;
    width: 100%;
}

.pipeline-list-table th:first-child,
.pipeline-list-table td:first-child {
    overflow: hidden;
    width: 36%;
}

.pipeline-list-table th:nth-child(2),
.pipeline-list-table td:nth-child(2),
.pipeline-list-table th:nth-child(3),
.pipeline-list-table td:nth-child(3) {
    width: 11%;
}

.pipeline-list-table th:nth-child(4),
.pipeline-list-table td:nth-child(4) {
    width: 14%;
}

.pipeline-list-table th:nth-child(5),
.pipeline-list-table td:nth-child(5),
.pipeline-list-table th:nth-child(6),
.pipeline-list-table td:nth-child(6) {
    width: 12%;
}

.pipeline-list-table th:last-child,
.pipeline-list-table td:last-child {
    width: 4%;
}

.project-search-result {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}

.project-warning-count {
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    color: #92400e;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 750;
    gap: 4px;
    line-height: 1.15;
    padding: 5px 9px;
    text-decoration: none;
    white-space: nowrap;
}

.project-warning-count:hover {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #78350f;
}

.project-warning-count svg {
    flex: 0 0 auto;
    height: 12px;
    width: 12px;
}

.project-list-status {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-list-status .status-pill {
    min-height: 26px;
    padding: 5px 9px;
}

.project-warning-tooltip {
    --bs-tooltip-bg: #1f2937;
    --bs-tooltip-color: #ffffff;
    --bs-tooltip-max-width: 340px;
    --bs-tooltip-opacity: 1;
}

.project-warning-tooltip .tooltip-inner {
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
    padding: 8px 10px;
    text-align: left;
}

.project-search-result span {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.project-search-result strong {
    color: var(--cf-ink);
}

.progress-payment-group-row td {
    border: 0;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.75rem 0.9rem;
    text-transform: uppercase;
}

.progress-payment-group-row span {
    margin-right: 0.9rem;
}

.progress-payment-group-row strong {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: none;
}

.progress-payment-group-row-scheduled td {
    background: #0f7a4f;
}

.progress-payment-group-row-unscheduled td {
    background: #b42318;
}

.xero-email-summary {
    background: #f8faf9;
    border: 1px solid #dbe7ed;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 12px;
}

.xero-email-summary span,
.xero-email-option em {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    font-style: normal;
}

.xero-email-summary strong {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    line-height: 1.25;
}

.variation-notice-check {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    margin: 0;
}

.variation-notice-check-input {
    border: 1.5px solid #98a2b3;
    flex: 0 0 auto;
    height: 18px;
    margin: 3px 0 0;
    width: 18px;
}

.variation-notice-help {
    padding-left: 28px;
}

.xero-email-options {
    display: grid;
    gap: 10px;
}

.xero-email-option {
    align-items: flex-start;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
}

.xero-email-option input {
    margin-top: 4px;
}

.xero-email-option strong {
    color: #111827;
    display: block;
}

.xero-email-option-disabled {
    background: #f8fafc;
    opacity: 0.68;
}

.settings-page-heading {
    margin-bottom: 18px;
}

.settings-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: 280px minmax(0, 1fr);
}

.settings-nav {
    overflow: hidden;
    padding: 8px;
    position: sticky;
    top: 82px;
}

.settings-nav-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #475467;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px;
    text-align: left;
    width: 100%;
}

.settings-nav-item + .settings-nav-item {
    margin-top: 4px;
}

.settings-nav-item svg {
    background: #f5f8f8;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: var(--cf-primary-dark);
    height: 34px;
    padding: 7px;
    width: 34px;
}

.settings-nav-item strong,
.settings-nav-item small {
    display: block;
}

.settings-nav-item strong {
    color: #182230;
    font-size: 0.95rem;
}

.settings-nav-item small {
    color: var(--cf-muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

.settings-nav-item.is-active {
    background: #e8f3f1;
}

.settings-nav-item.is-active svg {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #fff;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.is-active {
    display: block;
}

.settings-tab-header {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.settings-tab-header h2 {
    font-size: 1.55rem;
    font-weight: 850;
    margin: 0;
}

.settings-tab-header p {
    color: var(--cf-muted);
    margin: 4px 0 0;
}

.settings-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

.settings-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.settings-panel {
    overflow: hidden;
}

.settings-panel-body {
    padding: 18px;
}

.settings-source-add-form,
.settings-source-edit-form,
.settings-source-row {
    align-items: center;
    display: flex;
    gap: 10px;
}

.settings-source-add-form .form-control {
    max-width: 520px;
}

.settings-source-list {
    display: grid;
    gap: 10px;
}

.settings-source-row {
    background: #f8faf9;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    justify-content: space-between;
    padding: 10px;
}

.settings-source-row.is-archived {
    background: #f6f3f4;
    opacity: 0.78;
}

.settings-source-edit-form {
    flex: 1;
}

.settings-source-order {
    max-width: 92px;
}

.settings-weekday-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(54px, 1fr));
}

.settings-toggle {
    display: block;
}

.settings-toggle-inline {
    display: inline-block;
}

.settings-toggle-inline span {
    min-width: 160px;
}

.settings-toggle input {
    opacity: 0;
    position: absolute;
}

.settings-toggle span {
    align-items: center;
    background: #f8faf9;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: #475467;
    display: flex;
    font-weight: 750;
    height: 42px;
    justify-content: center;
}

.settings-toggle input:checked + span {
    background: #e8f3f1;
    border-color: #9fd2c7;
    color: var(--cf-primary-dark);
}

.settings-toggle input:focus + span {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.settings-account-picker {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    max-height: 218px;
    overflow-y: auto;
    padding: 8px;
}

.settings-account-group + .settings-account-group {
    border-top: 1px solid #e4ebe9;
    margin-top: 8px;
    padding-top: 8px;
}

.settings-account-group-label {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.settings-account-option {
    align-items: center;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 5px 6px;
}

.settings-account-option:hover {
    background: #f3f7f6;
}

.settings-account-option input {
    margin: 0;
}

.settings-account-option span,
.settings-account-option strong,
.settings-account-option small {
    display: block;
    min-width: 0;
}

.settings-account-option strong {
    color: var(--cf-ink);
    font-size: 0.86rem;
    line-height: 1.15;
}

.settings-account-option small {
    color: var(--cf-muted);
    font-size: 0.76rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-account-option:has(input:checked) {
    background: #e8f3f1;
    box-shadow: inset 3px 0 0 var(--cf-primary);
}

.settings-account-option-saved small {
    color: #9a5b16;
}

.settings-style-options {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-style-option {
    display: block;
}

.settings-style-option input {
    opacity: 0;
    position: absolute;
}

.settings-style-option span {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: block;
    min-height: 104px;
    padding: 18px;
}

.settings-style-option span strong {
    color: var(--cf-ink);
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
}

.settings-style-option span small {
    color: var(--cf-muted);
    display: block;
    line-height: 1.35;
}

.settings-style-option input:checked + span {
    background: #0b3a49;
    border-color: rgba(20, 184, 166, 0.7);
    box-shadow: 0 18px 42px rgba(11, 122, 117, 0.18);
}

.settings-style-option input:checked + span strong,
.settings-style-option input:checked + span small {
    color: #ffffff;
}

.settings-style-option input:focus + span {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.settings-impact-panel,
.settings-break-even-panel {
    grid-column: 2;
}

.settings-panel-wide {
    grid-column: 1 / -1;
}

.settings-section-title-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.settings-action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-action-stack .btn {
    justify-content: center;
}

.settings-bank-account-list {
    display: grid;
    gap: 14px;
}

.settings-bank-account-row {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 14px;
}

.settings-bank-account-row-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.settings-bank-account-row-heading strong,
.settings-bank-account-row-heading small {
    display: block;
}

.settings-bank-account-row-heading small {
    color: var(--cf-muted);
}

.settings-bank-account-row .settings-toggle-inline {
    width: 100%;
}

.settings-bank-account-row .settings-toggle-inline span {
    min-width: 0;
    width: 100%;
}

.settings-info-panel {
    align-items: center;
    background: #f8fbfb;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
}

.settings-info-panel p {
    color: var(--cf-muted);
    margin: 4px 0 0;
}

.settings-info-panel > strong {
    font-size: 1.15rem;
    white-space: nowrap;
}

.settings-label-help {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.settings-field-help {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cdd6df;
    border-radius: 999px;
    color: var(--cf-muted);
    cursor: help;
    display: inline-flex;
    height: 18px;
    justify-content: center;
    position: relative;
    width: 18px;
    z-index: 4;
}

.settings-field-help svg {
    height: 12px;
    width: 12px;
}

.settings-field-help:hover,
.settings-field-help:focus {
    background: #e8f3f1;
    border-color: #8fc7bd;
    color: var(--cf-primary-dark);
    outline: none;
}

.settings-field-help::after {
    background: #18212f;
    border-radius: 8px;
    bottom: 24px;
    box-shadow: 0 12px 30px rgba(24, 33, 47, 0.22);
    color: #ffffff;
    content: attr(title);
    display: none;
    font-size: 0.72rem;
    font-weight: 650;
    left: 0;
    line-height: 1.35;
    max-width: min(320px, 70vw);
    min-width: 240px;
    padding: 10px 12px;
    pointer-events: none;
    position: absolute;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

.settings-field-help:hover::after,
.settings-field-help:focus::after {
    display: block;
}

.settings-muted {
    color: var(--cf-muted);
    margin: 0;
}

.system-deploy-shell {
    display: grid;
    gap: 18px;
}

.system-deploy-hero {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 22px 24px;
}

.system-deploy-hero h2 {
    font-size: 1.45rem;
    font-weight: 850;
    margin: 0;
}

.system-deploy-hero p {
    color: var(--cf-muted);
    margin: 4px 0 0;
}

.system-deploy-hero small {
    color: var(--cf-muted);
    display: block;
    font-weight: 700;
    margin-top: 4px;
}

.system-deploy-hero .btn {
    flex: 0 0 auto;
}

.system-deploy-status-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-deploy-main-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
}

.system-deploy-card {
    padding: 18px;
}

.system-deploy-card > span {
    color: var(--cf-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 9px;
    text-transform: uppercase;
}

.system-deploy-card > strong {
    color: var(--cf-ink);
    display: block;
    font-size: 1.08rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.system-deploy-card > small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.system-change-list {
    display: grid;
}

.system-change-row {
    align-items: start;
    border-bottom: 1px solid var(--cf-line);
    display: grid;
    gap: 14px;
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 13px 0;
}

.system-change-row:first-child {
    padding-top: 0;
}

.system-change-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.system-change-row code {
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.system-change-row strong {
    color: var(--cf-ink);
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
}

.system-change-row small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 3px;
}

.system-deploy-output {
    background: #0d1b2a;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: #e6f2ff;
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    margin: 0;
    max-height: 360px;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
}

.system-version-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-version-grid > div,
.system-version-message {
    background: #f8faf9;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 11px 12px;
}

.system-version-grid span,
.system-version-message span,
.system-version-message small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.system-version-grid strong,
.system-version-message strong {
    color: var(--cf-ink);
    display: block;
    font-size: 0.96rem;
    line-height: 1.25;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.system-version-grid code,
.system-version-message code,
.system-branch-table code,
.system-branch-table td {
    overflow-wrap: anywhere;
}

.system-version-message {
    margin-top: 10px;
}

.system-version-message small {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 6px;
    text-transform: none;
}

.system-branch-table-wrap {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    margin-top: 14px;
    overflow-x: auto;
}

.system-branch-table {
    margin: 0;
}

.system-branch-table th {
    background: #f8faf9;
    color: var(--cf-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.system-branch-table td {
    vertical-align: middle;
}

.system-branch-table tr.is-current td {
    background: #ecfdf3;
}

.system-branch-table td span {
    background: #0f766e;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    margin-left: 7px;
    padding: 4px 7px;
    text-transform: uppercase;
}

.settings-logo-preview {
    align-items: center;
    background: #fff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 118px;
    padding: 16px;
}

.settings-logo-preview img {
    display: block;
    max-height: 86px;
    max-width: 100%;
    object-fit: contain;
}

.settings-summary-list {
    margin: 0;
}

.settings-summary-list div {
    border-bottom: 1px solid var(--cf-line);
    padding: 12px 0;
}

.settings-summary-list div:first-child {
    padding-top: 0;
}

.settings-summary-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.settings-summary-list dt {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-weight: 750;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.settings-summary-list dd {
    font-weight: 750;
    margin: 0;
}

.deployment-output-alert {
    margin-bottom: 18px;
}

.deployment-output-alert details {
    margin-top: 10px;
}

.deployment-output-alert summary {
    cursor: pointer;
    font-weight: 700;
}

.deployment-output-alert pre {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    color: #111827;
    font-size: 0.78rem;
    margin: 10px 0 0;
    max-height: 280px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.adjustment-line-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.adjustment-lines {
    display: grid;
    gap: 5px;
}

.schedule-adjustment-dialog {
    max-width: min(900px, calc(100vw - 40px));
}

.schedule-adjustment-modal .modal-body {
    padding: 12px 16px 16px;
}

.schedule-adjustment-header {
    align-items: flex-start;
    padding: 12px 16px;
}

.schedule-adjustment-title-block .modal-title {
    font-size: 1.25rem;
    line-height: 1.2;
}

.adjustment-value-card,
.adjustment-total-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 12px;
}

.adjustment-value-card span,
.adjustment-total-card span {
    color: var(--cf-muted);
    font-size: 0.86rem;
}

.adjustment-value-card strong,
.adjustment-total-card strong {
    color: var(--cf-ink);
    font-size: 0.98rem;
    font-weight: 750;
    white-space: nowrap;
}

.adjustment-source-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.adjustment-source-total {
    background: #fff;
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 8px 10px;
}

.adjustment-source-total span {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.adjustment-source-total strong {
    color: var(--cf-ink);
    font-size: 1rem;
    font-weight: 800;
}

.adjustment-source-total-cost {
    background: #fff7ed;
    border-color: #fed7aa;
}

.adjustment-source-total-carried {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.statement-match-panel {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.statement-match-card {
    background: #fff;
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 8px 10px;
}

.statement-match-card span {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.statement-match-card strong {
    color: var(--cf-ink);
    font-size: 0.98rem;
    font-weight: 750;
}

.statement-match-card.is-balanced {
    background: #f0fdf4;
    border-color: #86efac;
}

.statement-match-card.is-warning {
    background: #fffbeb;
    border-color: #fbbf24;
}

.statement-line-header,
.statement-line {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(340px, 1fr) minmax(130px, 180px) minmax(118px, auto);
}

.statement-line-header {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0;
    margin-bottom: 4px;
    padding: 0 12px;
    text-transform: uppercase;
}

.statement-line-list {
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    display: grid;
    max-height: 360px;
    overflow: auto;
}

.statement-line {
    align-items: center;
    padding: 10px 12px;
}

.statement-line + .statement-line {
    border-top: 1px solid #d7e0e7;
}

.statement-line-main {
    min-width: 0;
}

.statement-line-main .fw-semibold {
    font-size: 0.86rem;
    font-weight: 650 !important;
    line-height: 1.25;
}

.statement-line-main .table-muted {
    font-size: 0.72rem;
    line-height: 1.2;
    margin-top: 2px;
}

.statement-line-match {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 6px;
    max-width: 100%;
    padding: 5px 8px;
    width: fit-content;
}

.statement-line-match[data-state="matched"] {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.statement-line-match[data-state="possible"] {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.statement-line-match[data-state="unmatched"] {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.statement-line-account {
    color: var(--cf-muted);
    font-size: 0.8rem;
    line-height: 1.25;
    min-width: 0;
}

.statement-line-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    min-width: 128px;
}

.statement-line[data-readonly="true"] .statement-line-actions {
    min-width: 92px;
}

.statement-line-actions strong {
    font-size: 0.88rem;
    font-weight: 750;
}

.statement-line-actions .btn {
    min-height: 32px;
    padding-inline: 10px;
    white-space: nowrap;
}

.adjustment-lines-header {
    color: var(--cf-muted);
    font-size: 0.68rem;
    font-weight: 750;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 116px 112px 34px;
    padding: 0 4px;
    text-transform: uppercase;
}

[data-schedule-adjustment-form] [data-adjustment-help] {
    font-size: 0.78rem;
    line-height: 1.35;
}

.adjustment-loading-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    color: #334155;
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
}

.adjustment-loading-card strong,
.adjustment-loading-card span {
    display: block;
}

.adjustment-loading-card strong {
    color: #0f766e;
    font-size: 0.9rem;
}

.adjustment-loading-card span {
    font-size: 0.8rem;
}

[data-schedule-adjustment-form] [data-adjustment-readonly-note] {
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 10px 12px;
}

.adjustment-line {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 116px 112px 34px;
}

.adjustment-line .form-control {
    font-size: 0.84rem;
    min-height: 34px;
    padding: 0.25rem 0.5rem;
}

.adjustment-line [data-adjustment-description] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adjustment-line [data-adjustment-amount],
.adjustment-line [data-remove-adjustment-line] {
    min-height: 34px;
}

.adjustment-line [data-remove-adjustment-line] {
    height: 34px;
    padding: 0;
    width: 34px;
}

.adjustment-source-badge {
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.66rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 24px;
    overflow: hidden;
    padding: 4px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adjustment-source-badge[data-source-type="cost"] {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.adjustment-source-badge[data-source-type="fixed"] {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.adjustment-source-badge[data-source-type="carried"] {
    background: #eef2ff;
    border-color: #818cf8;
    color: #3730a3;
}

.adjustment-source-badge[data-source-type="manual"] {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.adjustment-source-badge[data-source-type="bank"] {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.adjustment-source-badge[data-source-type="amex"] {
    background: #fdf2f8;
    border-color: #f9a8d4;
    color: #9d174d;
}

.fixed-expense-table,
.fixed-expense-detail-table {
    font-size: 0.82rem;
}

.fixed-expense-table input[name="supplier_name"] {
    min-width: 108px;
}

.xero-supplier-match-status {
    align-items: center;
    border: 1px solid #f1c98b;
    border-radius: 8px;
    color: #7a4a0c;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    gap: 6px 10px;
    margin-top: 8px;
    padding: 8px 10px;
}

.xero-supplier-match-status.is-matched {
    background: var(--cf-primary-mint);
    border-color: #b9ddce;
    color: var(--cf-primary-dark);
}

.xero-supplier-match-status.is-unmatched {
    background: #fff7e8;
}

.xero-supplier-match-status strong {
    font-weight: 850;
}

.fixed-expense-table input[name="what_for"] {
    min-width: 120px;
}

.fixed-expense-table input[name="first_due_date"] {
    min-width: 132px;
}

.fixed-expense-table input[name="amount"] {
    min-width: 92px;
}

.fixed-expense-table input[name="payment_method"] {
    min-width: 96px;
}

.fixed-expense-table select[name="recurrence"],
.fixed-expense-table select[name="status"] {
    min-width: 92px;
}

.fixed-expense-table thead th,
.fixed-expense-detail-table thead th {
    white-space: nowrap;
}

.fixed-expense-detail-table tbody tr:nth-child(even) {
    background: #e8f2fb;
}

.fixed-expense-detail-table tbody tr:nth-child(odd) {
    background: #f3f8fc;
}

.fixed-expense-preview-header {
    justify-content: center;
}

.fixed-expense-preview-header h2 {
    text-align: center;
}

.fixed-expense-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-expense-preview-grid .planning-section {
    border-bottom: 0;
}

.fixed-expense-preview-grid .planning-section + .planning-section {
    border-left: 1px solid var(--cf-line);
}

.planning-period-strip {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.planning-period-strip div {
    display: grid;
    gap: 3px;
}

.planning-period-strip span {
    color: var(--cf-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.planning-period-strip strong {
    color: #0f172a;
    font-size: 1.25rem;
    line-height: 1.15;
}

.planning-period-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.planning-month-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-bottom: 18px;
}

.planning-month-card {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 4px;
    padding: 14px;
    text-decoration: none;
}

.planning-month-card:hover {
    border-color: #14b8a6;
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
}

.planning-month-card.is-active {
    background: #e7f8f4;
    border-color: #128678;
    box-shadow: inset 0 0 0 1px #128678;
}

.planning-month-card span,
.planning-month-card small {
    color: var(--cf-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.planning-month-card strong {
    color: #0f172a;
    font-size: 1rem;
}

.planning-month-card em {
    color: #0f766e;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 850;
}

.planning-empty-months {
    display: grid;
    gap: 4px;
    padding: 18px;
}

.planning-empty-months span {
    color: var(--cf-muted);
}

.planning-month-panel {
    margin-bottom: 18px;
    overflow: hidden;
}

.planning-month-header {
    align-items: center;
    background: #f8faf9;
    border-bottom: 1px solid var(--cf-line);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    justify-content: space-between;
    padding: 16px 18px;
}

.planning-month-header > .btn-icon-only {
    flex: 0 0 34px;
}

.planning-month-header h2 {
    font-size: 1.12rem;
    font-weight: 750;
    margin: 0;
}

.planning-month-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.planning-month-totals span {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: var(--cf-muted);
    font-size: 0.78rem;
    padding: 7px 9px;
}

.planning-month-totals b {
    color: var(--cf-ink);
    font-weight: 800;
    margin-left: 5px;
}

.planning-section {
    border-bottom: 1px solid var(--cf-line);
}

.planning-section:last-child {
    border-bottom: 0;
}

.planning-section-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 10px 18px;
}

.planning-section-title h3 {
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0;
}

.planning-section-title span {
    font-weight: 800;
}

.planning-income .planning-section-title {
    background: #dcfce7;
    color: #166534;
}

.planning-outflow .planning-section-title {
    background: #fee2e2;
    color: #7f1d1d;
}

.planning-list-table {
    font-size: 0.82rem;
}

.planning-list-table th,
.planning-list-table td {
    white-space: nowrap;
}

.planning-income-table td {
    vertical-align: middle;
}

.planning-income-table .form-control-sm {
    min-width: 145px;
}

.planning-description-input {
    min-width: 280px;
}

.planning-project-name {
    font-weight: 800;
}

.planning-project-meta {
    color: var(--cf-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.76rem;
    gap: 8px;
    margin-top: 2px;
}

.banking-balance-board {
    display: grid;
    gap: 12px;
}

.banking-balance-board-row {
    display: grid;
    gap: 12px;
}

.banking-balance-board-row-operating {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.banking-balance-board-row-finance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.banking-balance-tile {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: var(--cf-ink);
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 112px;
    padding: 14px;
}

.banking-balance-tile:hover,
.banking-balance-tile.active {
    border-color: #7dd3c7;
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
    color: var(--cf-ink);
}

.banking-balance-tile-icon {
    align-items: center;
    background: #e9fbf7;
    border: 1px solid #bce9df;
    border-radius: 8px;
    color: var(--cf-teal);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.banking-balance-tile-icon svg {
    height: 20px;
    width: 20px;
}

.banking-balance-tile span,
.banking-balance-tile small {
    color: var(--cf-muted);
    display: block;
    font-size: 0.76rem;
}

.banking-balance-tile strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.2;
    margin-top: 2px;
}

.banking-balance-tile b {
    display: block;
    font-size: 1.38rem;
    line-height: 1.1;
    margin-top: 8px;
}

.banking-balance-tile-breakdown {
    border-top: 1px solid rgba(24, 33, 47, 0.1);
    display: grid;
    gap: 5px;
    margin-top: 10px;
    padding-top: 8px;
}

.banking-balance-tile-breakdown span {
    display: flex;
    justify-content: space-between;
}

.banking-balance-tile-breakdown b {
    font-size: 0.86rem;
    margin-top: 0;
}

.banking-balance-tile-note {
    border-top: 1px solid rgba(24, 33, 47, 0.1);
    margin-top: 8px;
    padding-top: 7px;
}

.banking-balance-tile-net {
    background: #eefdfb;
    border-color: #8bd8ce;
}

.banking-balance-tile-net.is-negative,
.banking-balance-tile.is-loan {
    background: #fff7ed;
    border-color: #fed7aa;
}

.banking-balance-tile.is-amex {
    background: #fff7ff;
    border-color: #e9b8e7;
}

.banking-balance-tile.is-muted {
    background: #f8fafc;
    border-style: dashed;
}

.banking-balance-check-heading {
    align-items: center;
    gap: 16px;
}

.banking-balance-check-heading p {
    color: var(--cf-muted);
    font-size: 0.82rem;
    margin: 3px 0 0;
}

.banking-balance-check-form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.banking-balance-check-form .form-control {
    min-width: 160px;
}

.banking-balance-check-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}

.banking-balance-check-card {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    min-height: 92px;
    padding: 12px;
}

.banking-balance-check-card span,
.banking-balance-check-card small {
    color: var(--cf-muted);
    font-size: 0.76rem;
}

.banking-balance-check-card strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.banking-balance-check-card b {
    font-size: 1.16rem;
    line-height: 1.1;
}

.banking-balance-check-card.is-total {
    background: #eefdfb;
    border-color: #8bd8ce;
}

.banking-balance-check-card.is-total.is-negative {
    background: #fff1f2;
    border-color: #f2adb8;
}

.banking-balance-check-card.is-missing {
    background: #f8fafc;
    border-style: dashed;
}

.banking-filter-heading p,
.table-muted {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.banking-filter-heading {
    align-items: center;
    gap: 16px;
}

.banking-filter-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.banking-filter-form .form-select {
    min-width: 260px;
}

.banking-summary-strip {
    align-items: center;
    background: #f8faf9;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
}

.banking-summary-strip span {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    color: var(--cf-muted);
    font-size: 0.82rem;
    padding: 7px 10px;
}

.banking-day-group-row td {
    background: #eef6f3;
    border-top: 2px solid #b7d7cd;
    padding: 0 !important;
}

.banking-day-group {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 14px;
}

.banking-day-total-row td {
    background: #f8faf9;
    border-bottom: 2px solid #d8e3df;
    padding: 8px 14px !important;
}

.banking-day-group > div:first-child {
    display: grid;
    gap: 1px;
    min-width: 150px;
}

.banking-day-group strong {
    color: var(--cf-ink);
    font-weight: 800;
}

.banking-day-group span,
.banking-day-group small {
    color: var(--cf-muted);
    font-size: 0.78rem;
}

.banking-day-metrics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.banking-day-metrics > span {
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 5px 8px;
}

.banking-pagination {
    border-top: 1px solid var(--cf-line);
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px;
}

.banking-pagination nav {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    width: 100%;
}

.banking-pagination .pagination {
    margin: 0;
}

.banking-pagination .page-link {
    color: var(--cf-ink);
    font-size: 0.8rem;
    height: 32px;
    min-width: 32px;
    padding: 0 10px;
}

.banking-pagination p,
.banking-pagination .small {
    color: var(--cf-muted);
    font-size: 0.78rem;
    margin: 0;
}

.banking-transaction-table {
    font-size: 0.84rem;
    table-layout: fixed;
    width: 100%;
}

.banking-transaction-table th,
.banking-transaction-table td {
    white-space: nowrap;
}

.banking-transaction-table th:nth-child(1),
.banking-transaction-table td:nth-child(1) {
    width: 86px;
}

.banking-transaction-table th:nth-child(2),
.banking-transaction-table td:nth-child(2) {
    width: 150px;
}

.banking-transaction-table th:nth-child(3),
.banking-transaction-table td:nth-child(3) {
    width: auto;
}

.banking-transaction-table th:nth-child(4),
.banking-transaction-table td:nth-child(4) {
    width: 190px;
}

.banking-transaction-table th:nth-child(5),
.banking-transaction-table td:nth-child(5),
.banking-transaction-table th:nth-child(6),
.banking-transaction-table td:nth-child(6),
.banking-transaction-table th:nth-child(7),
.banking-transaction-table td:nth-child(7) {
    width: 118px;
}

.banking-transaction-table th:nth-child(8),
.banking-transaction-table td:nth-child(8) {
    width: 170px;
}

.banking-transaction-table th:nth-child(9),
.banking-transaction-table td:nth-child(9) {
    width: 72px;
}

.banking-transaction-description {
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal !important;
    word-break: normal;
}

.help-heading {
    align-items: center;
}

.help-intro {
    color: var(--cf-muted);
    margin: 8px 0 0;
    max-width: 760px;
}

.help-daily {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: 260px minmax(0, 1fr);
    margin-bottom: 18px;
    padding: 22px;
}

.help-daily h2,
.help-panel h2,
.help-triggers h2 {
    font-size: 1.18rem;
    font-weight: 800;
    margin: 0;
}

.help-steps {
    counter-reset: help-step;
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-steps li {
    align-items: start;
    display: grid;
    gap: 4px 12px;
    grid-template-columns: 34px minmax(0, 1fr);
    line-height: 1.35;
}

.help-steps li::before {
    align-items: center;
    background: #e8f5f1;
    border: 1px solid #b9ded3;
    border-radius: 999px;
    color: #0f766e;
    content: counter(help-step);
    counter-increment: help-step;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.help-step-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.help-step-copy > span {
    color: var(--cf-muted);
}

.help-steps strong,
.help-list strong,
.help-flow-list strong {
    color: var(--cf-ink);
    font-weight: 800;
}

.help-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-panel {
    padding: 20px;
}

.help-panel-wide {
    grid-column: 1 / -1;
}

.help-panel-heading {
    align-items: center;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.help-panel-heading > svg {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1d4ed8;
    flex: 0 0 auto;
    height: 34px;
    padding: 7px;
    width: 34px;
}

.help-triggers {
    margin-bottom: 18px;
    padding: 20px;
}

.help-trigger-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-trigger-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.help-trigger-card strong {
    color: var(--cf-ink);
    font-weight: 850;
}

.help-trigger-card p {
    color: var(--cf-muted);
    line-height: 1.4;
    margin: 0;
}

.help-trigger-card span {
    color: #0f766e;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.35;
}

.help-list,
.help-flow-list {
    color: var(--cf-muted);
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.help-list {
    list-style: none;
}

.help-list li {
    border-bottom: 1px solid #eef2f7;
    line-height: 1.38;
    padding-bottom: 9px;
}

.help-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.help-flow-list > div {
    display: grid;
    gap: 4px;
}

.help-flow-list span {
    line-height: 1.38;
}

.help-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 16px 0 0;
    padding: 10px 12px;
}

.help-calculation-box {
    background: #f8fafc;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
}

.help-calculation-box > strong {
    color: var(--cf-ink);
    font-weight: 850;
}

.help-calculation-box > span,
.help-calculation-box p {
    color: var(--cf-muted);
    line-height: 1.38;
    margin: 0;
}

.help-calculation-box dl {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.help-calculation-box dl div {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 10px;
}

.help-calculation-box dt {
    color: var(--cf-muted);
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.help-calculation-box dd {
    color: var(--cf-ink);
    font-weight: 850;
    margin: 0;
}

.help-legend-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-legend-block {
    display: grid;
    gap: 9px;
}

.help-legend-block h3 {
    font-size: 0.9rem;
    font-weight: 850;
    margin: 0 0 2px;
}

.help-legend-row {
    align-items: center;
    color: var(--cf-muted);
    display: grid;
    font-size: 0.9rem;
    gap: 9px;
    grid-template-columns: 44px minmax(0, 1fr);
    line-height: 1.3;
}

.help-swatch {
    align-items: center;
    border: 1px solid var(--cf-line);
    border-radius: 7px;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    min-width: 38px;
}

.help-swatch-bubble-red {
    background: #fee2e2;
    border-color: #ef4444;
}

.help-swatch-bubble-green,
.help-swatch-income {
    background: #dcfce7;
    border-color: #22c55e;
}

.help-swatch-bubble-dark {
    background: #111827;
    border-color: #020617;
}

.help-swatch-bubble-dashed {
    background: #dcfce7;
    border: 2px dashed #22c55e;
}

.help-swatch-handle {
    background: linear-gradient(90deg, #0f766e 0 5px, #dcfce7 5px calc(100% - 5px), #0f766e calc(100% - 5px));
    border-color: #0f766e;
}

.help-swatch-start {
    background: #ffffff;
}

.help-swatch-outgoing {
    background: #fecaca;
    border-color: #fca5a5;
}

.help-swatch-unplanned {
    background: #fed7aa;
    border-color: #fdba74;
}

.help-swatch-amex {
    background: #f8d7ef;
    border-color: #e9a8dc;
}

.help-swatch-closing {
    background: #d1f1ff;
    border-color: #93c5fd;
}

.help-swatch-reconciled {
    background: #bbf7d0;
    border-color: #16a34a;
    color: #14532d;
}

.help-swatch-paid {
    background: #ecfdf3;
    border-color: #22c55e;
    color: #087443;
}

.help-swatch-forecast {
    background: #f8fafc;
    color: #64748b;
    font-style: italic;
}

.help-swatch-locked {
    background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 4px, #e2e8f0 4px, #e2e8f0 8px);
}

.help-swatch-pm {
    background: #6d80e8;
    border-color: #4f46e5;
}

.help-swatch-pm-initials {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

@media (max-width: 1100px) {
    .dashboard-grid,
    .content-grid,
    .settings-grid,
    .help-grid,
    .help-daily {
        grid-template-columns: 1fr;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

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

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

    .settings-nav {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        position: static;
    }

    .settings-nav-item {
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 10px;
    }

    .settings-nav-item svg {
        height: 28px;
        padding: 5px;
        width: 28px;
    }

    .settings-impact-panel,
    .settings-break-even-panel {
        grid-column: auto;
    }

    .system-deploy-main-grid,
    .system-deploy-status-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-action-grid,
    .three-month-target-grid,
    .xero-invoice-history-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .banking-balance-board-row-operating,
    .banking-balance-board-row-finance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .planning-month-header {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .fixed-expense-preview-grid {
        grid-template-columns: 1fr;
    }

    .access-group-picker,
    .access-permission-grid {
        grid-template-columns: 1fr;
    }

    .fixed-expense-preview-grid .planning-section + .planning-section {
        border-left: 0;
        border-top: 1px solid var(--cf-line);
    }

    .schedule-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-command-bar {
        justify-items: stretch;
    }

    .schedule-command-primary,
    .schedule-command-secondary {
        justify-content: flex-start;
    }

    .pm-schedule-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-schedule-actions {
        align-items: flex-start;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .pm-dashboard-hero {
        grid-template-columns: minmax(190px, 0.55fr) minmax(420px, 1fr) auto;
    }

    .pm-dashboard-hero-summary {
        grid-template-columns: repeat(4, minmax(96px, 1fr));
    }

    .pm-dashboard-hero-stat {
        min-height: 66px;
        padding: 9px 10px;
    }

    .pm-dashboard-hero-stat span {
        font-size: 0.66rem;
    }

    .pm-dashboard-hero-stat strong {
        font-size: 1.45rem;
    }

    .pm-dashboard-hero-stat small {
        display: none;
    }

    .pipeline-command-summary {
        min-height: 66px;
        padding: 9px 10px;
    }

    .pipeline-command-summary span {
        font-size: 0.66rem;
    }

    .pipeline-command-summary strong {
        font-size: 1.45rem;
    }

    .pipeline-command-summary .pipeline-command-note {
        display: none;
    }

    .pm-dashboard-hero-actions {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pm-dashboard-hero-actions .btn {
        flex: 1 1 180px;
    }

    .pm-dashboard-project-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-dashboard-project-toolbar .project-search-form {
        flex-basis: auto;
        width: 100%;
    }

    .navbar-actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: 12px;
    }

    .navbar-project-search {
        margin: 12px 0 0;
        min-width: 0;
        width: 100%;
    }

    .nav-task-menu {
        min-width: 300px;
    }

    .task-row {
        flex-direction: column;
    }

    .task-row-actions {
        align-items: flex-start;
        flex: 1 1 auto;
        width: 100%;
    }

    .task-edit-details {
        text-align: left;
        width: 100%;
    }

    .task-edit-form {
        max-width: 100%;
        min-width: 0;
        position: static;
        width: 100%;
    }

    .vendor-heading-tools {
        flex-wrap: wrap;
    }

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

}

@media (max-width: 680px) {
    .auth-shell {
        background:
            linear-gradient(180deg, rgba(6, 18, 31, 0.9) 0%, rgba(7, 24, 39, 0.82) 100%),
            url("../images/login-construction-bg.png") center center / cover no-repeat;
        justify-content: center;
        padding: 20px;
    }

    .auth-brand h1 {
        font-size: 2rem;
    }

    .app-shell {
        padding: 18px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero-row h1 {
        font-size: 1.9rem;
    }

    .heading-actions {
        align-items: stretch;
    }

    .dashboard-hero-actions {
        align-items: stretch;
        justify-content: stretch;
    }

    .heading-actions .btn {
        flex: 1 1 auto;
    }

    .nav-task-menu {
        min-width: min(320px, calc(100vw - 40px));
    }

    .pm-print-controls {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .pm-print-controls .form-select,
    .pm-print-controls .btn {
        width: 100%;
    }

    .pm-period-controls {
        width: 100%;
    }

    .pm-schedule-summary {
        grid-template-columns: 1fr;
    }

    .pm-dashboard-hero {
        gap: 16px;
        grid-template-columns: 1fr;
        margin-bottom: 16px;
        padding: 20px;
    }

    .pm-dashboard-hero h1 {
        font-size: 2rem;
    }

    .pm-dashboard-hero-copy {
        font-size: 0.86rem;
    }

    .pm-dashboard-hero-summary {
        gap: 9px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-dashboard-hero-stat {
        min-height: 0;
        padding: 12px;
    }

    .pm-dashboard-hero-stat strong {
        font-size: 1.65rem;
    }

    .pm-dashboard-hero-actions {
        display: none;
    }

    .pm-dashboard-desktop-label {
        display: none;
    }

    .pm-dashboard-mobile-label {
        display: inline;
    }

    .pm-dashboard-project-toolbar p {
        display: none;
    }

    .pm-dashboard-heading .heading-actions {
        display: none;
    }

    .pm-dashboard-project-table .pm-dashboard-other-row {
        display: none;
    }

    .pm-dashboard-project-table td[data-label="PM"] {
        display: none;
    }

    .pm-dashboard-review-table .project-vendor-review-actions {
        justify-content: flex-start;
    }

    .pm-dashboard-project-panel .table-responsive,
    .project-cost-sales-table-wrap.table-responsive {
        overflow: visible;
    }

    .pm-dashboard-project-table,
    .pm-dashboard-project-table tbody,
    .pm-dashboard-project-table tr,
    .pm-dashboard-project-table td,
    .project-cost-sales-table-wrap > .table,
    .project-cost-sales-table-wrap > .table tbody,
    .project-cost-sales-table-wrap > .table tr,
    .project-cost-sales-table-wrap > .table td {
        display: block;
        width: 100%;
    }

    .pm-dashboard-project-table thead,
    .project-cost-sales-table-wrap > .table > thead {
        display: none;
    }

    .pm-dashboard-project-table tbody,
    .project-cost-sales-table-wrap > .table > tbody {
        padding: 10px;
    }

    .pm-dashboard-project-table tr,
    .project-cost-sales-table-wrap .project-cost-invoice-row {
        background: #ffffff;
        border: 1px solid var(--cf-line);
        border-radius: 8px;
        box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
        margin: 0 0 10px;
        overflow: hidden;
    }

    .pm-dashboard-project-table tr.pm-dashboard-assigned-row,
    .project-cost-sales-table-wrap .project-cost-invoice-row.pm-dashboard-assigned-row {
        background: #f0fdfa;
    }

    .pm-dashboard-project-table td,
    .project-cost-sales-table-wrap .project-cost-invoice-row > td {
        align-items: flex-start;
        border: 0;
        border-bottom: 1px solid var(--cf-line-soft);
        display: grid;
        gap: 8px;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        padding: 10px 12px;
        text-align: left !important;
    }

    .pm-dashboard-project-table td:last-child,
    .project-cost-sales-table-wrap .project-cost-invoice-row > td:last-child {
        border-bottom: 0;
    }

    .pm-dashboard-project-table td::before,
    .project-cost-sales-table-wrap .project-cost-invoice-row > td::before {
        color: var(--cf-muted);
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 850;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .pm-dashboard-project-table td[data-label="Project"],
    .project-cost-sales-table-wrap .project-cost-invoice-row > td[data-label="Supplier"] {
        display: block;
    }

    .pm-dashboard-project-table td[data-label="Project"]::before,
    .project-cost-sales-table-wrap .project-cost-invoice-row > td[data-label="Supplier"]::before {
        display: block;
        margin-bottom: 5px;
    }

    .pm-dashboard-project-table td[data-label="Email"],
    .project-cost-sales-table-wrap .project-cost-invoice-row > td[data-label="Actions"] {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }

    .pm-dashboard-project-table td[data-label="Email"]::before,
    .project-cost-sales-table-wrap .project-cost-invoice-row > td[data-label="Actions"]::before {
        flex: 1 0 100%;
    }

    .pm-dashboard-project-table td[data-label="Email"] .btn,
    .project-cost-sales-table-wrap .project-vendor-review-actions {
        width: auto;
    }

    .project-cost-sales-table-wrap .project-vendor-review-actions {
        justify-content: flex-start;
    }

    .project-cost-line-detail {
        border: 0;
        margin: -5px 0 12px;
    }

    .project-cost-line-detail > td {
        display: block !important;
        padding: 0 10px 10px !important;
    }

    .project-cost-line-detail > td::before {
        content: none !important;
    }

    .three-month-opportunity-note {
        max-width: none;
    }

    .schedule-command-primary,
    .schedule-command-secondary {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .schedule-command-primary > *,
    .schedule-command-secondary > * {
        flex: 1 1 auto;
    }

    .schedule-days-select {
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-action-grid,
    .three-month-target-grid,
    .xero-invoice-history-row {
        grid-template-columns: 1fr;
    }

    .planning-period-strip {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .planning-period-nav {
        justify-content: stretch;
    }

    .planning-period-nav .btn {
        flex: 1 1 auto;
    }

    .vendor-heading-tools {
        align-items: stretch;
        flex-direction: column;
        justify-content: stretch;
        width: 100%;
    }

    .vendor-payments-panel .section-heading-padded {
        align-items: stretch;
        flex-direction: column;
    }

    .vendor-heading-tools .btn-group {
        display: flex;
        width: 100%;
    }

    .vendor-heading-tools .btn-group .btn {
        flex: 1 1 0;
    }

    .vendor-sync-summary {
        flex: 1 1 100%;
        min-width: 0;
        text-align: left;
        width: 100%;
    }

    .vendor-schedule-actions {
        grid-template-columns: 1fr;
    }

    .vendor-search {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .vendor-selected-summary-chip,
    .vendor-planned-summary-strip,
    .vendor-schedule-actions > .btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: stretch;
        width: 100%;
    }

    .vendor-selected-list-row {
        align-items: start;
        gap: 6px 10px;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .vendor-selected-list-check {
        margin-top: 2px;
    }

    .vendor-selected-list-amount {
        grid-column: 2;
        justify-self: start;
    }

    .banking-balance-board-row-operating,
    .banking-balance-board-row-finance,
    .banking-balance-check-grid {
        grid-template-columns: 1fr;
    }

    .banking-balance-check-heading,
    .banking-filter-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .banking-balance-check-form,
    .banking-filter-form {
        justify-content: stretch;
        width: 100%;
    }

    .banking-balance-check-form > *,
    .banking-filter-form > * {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .banking-balance-check-form .form-control,
    .banking-filter-form .form-select {
        min-width: 0;
    }

    .statement-match-panel {
        grid-template-columns: 1fr;
    }

    .statement-line {
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
    }

    .statement-line-header,
    .adjustment-lines-header {
        display: none;
    }

    .statement-line-actions {
        justify-content: space-between;
        min-width: 0;
        width: 100%;
    }

    .adjustment-line {
        grid-template-columns: 1fr;
    }

    .split-status-options,
    .split-receipt-grid {
        grid-template-columns: 1fr;
    }

    .add-payment-date-grid,
    .add-payment-bottom-grid,
    .add-payment-status-options,
    .add-payment-type-options {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .add-payment-status-chip span,
    .payment-type-options label {
        border-bottom: 1px solid #d8dee6;
        border-right: 0;
    }

    .add-payment-status-chip:last-child span,
    .payment-type-options label:last-child {
        border-bottom: 0;
    }

    .xero-invoice-panel {
        grid-template-columns: 1fr;
    }

    .xero-invoice-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xero-invoice-actions .btn {
        min-width: 0;
        width: 100%;
    }

    .settings-weekday-grid {
        grid-template-columns: repeat(4, minmax(54px, 1fr));
    }

    .settings-nav {
        grid-template-columns: 1fr;
    }

    .settings-tab-header {
        align-items: stretch;
        flex-direction: column;
    }

    .system-deploy-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .system-deploy-hero .btn {
        justify-content: center;
        width: 100%;
    }

    .system-change-row {
        grid-template-columns: 1fr;
    }

    .help-legend-grid {
        grid-template-columns: 1fr;
    }

    .help-trigger-grid {
        grid-template-columns: 1fr;
    }

    .project-list-toolbar,
    .project-search-control {
        align-items: stretch;
        flex-direction: column;
    }

    .project-search-form {
        flex: 0 1 auto;
        max-width: none;
        width: 100%;
    }

    .project-search-control .form-control,
    .project-search-control .form-select,
    .project-search-control .btn {
        width: 100%;
    }

    .pipeline-list-panel .project-search-control .form-control,
    .pipeline-list-panel .project-search-control .form-select,
    .pipeline-list-panel .project-search-control input[type="date"] {
        flex: 0 0 auto;
        height: 42px;
        min-height: 42px;
    }

    .pipeline-list-panel .project-search-control .btn,
    .pipeline-list-panel .project-search-control .btn-icon {
        min-height: 42px;
        width: 100%;
    }

    .project-search-control > svg {
        display: none;
    }

    .pipeline-list-table,
    .pipeline-list-table tbody,
    .pipeline-list-table tr,
    .pipeline-list-table td,
    .project-index-table,
    .project-index-table tbody,
    .project-index-table tr,
    .project-index-table td {
        display: block;
        width: 100%;
    }

    .pipeline-list-table thead,
    .project-index-table thead {
        display: none;
    }

    .pipeline-list-table tr,
    .project-index-table tr {
        align-items: center;
        border-bottom: 1px solid var(--cf-line);
        display: grid;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 12px 14px;
    }

    .pipeline-list-table td,
    .project-index-table td {
        border: 0;
        padding: 0;
    }

    .pipeline-list-table td:not(:first-child):not(:last-child),
    .project-index-table td:not(:first-child):not(:last-child) {
        display: none;
    }

    .pipeline-list-table td:last-child,
    .project-index-table td:last-child {
        text-align: right !important;
    }

    .pipeline-list-table td:first-child a,
    .project-index-table td:first-child a {
        display: block;
        line-height: 1.25;
    }

    .project-search-result {
        align-items: flex-start;
    }

    .project-section-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-section-tabs .project-mobile-hidden-tab {
        display: none;
    }

    .project-section-tabs .nav-item,
    .project-section-tabs .nav-link {
        width: 100%;
    }

    .project-section-tabs .pipeline-stage-tab-status {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-left: 0;
        padding-right: 0;
    }

    .project-section-tabs .nav-link {
        justify-content: center;
    }

    .project-legacy-grid {
        grid-template-columns: 1fr;
    }

    .project-legacy-banner {
        min-height: 68px;
        padding: 16px;
    }

    .project-hero {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .project-hero-main {
        gap: 8px;
        padding: 14px 16px;
    }

    .pipeline-hero .project-hero-main {
        grid-template-columns: 1fr;
    }

    .pipeline-hero-copy {
        width: 100%;
    }

    .pipeline-hero-notes {
        display: none;
    }

    .project-hero-title-row {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .project-hero-side {
        align-items: stretch;
        gap: 8px;
        min-width: 0;
        width: 100%;
    }

    .project-status-rail {
        justify-content: flex-start;
    }

    .project-status-rail .status-pill {
        min-height: 26px;
        padding: 5px 9px;
    }

    .project-hero-contacts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .project-hero-contacts span {
        padding: 8px 10px;
        text-align: left;
    }

    .project-hero-contacts small {
        font-size: 0.56rem;
    }

    .project-hero-contacts strong {
        font-size: 0.74rem;
    }

    .project-hero-address {
        display: none;
    }

    .project-hero-title-desktop {
        display: none;
    }

    .project-hero-title-mobile {
        display: inline;
    }

    .project-hero h1 {
        font-size: 0.96rem;
        line-height: 1.18;
    }

    [data-project-enact-import],
    .project-activity-heading .muted-small {
        display: none;
    }

    .metric-help::after {
        font-size: 0.76rem;
        min-width: min(280px, calc(100vw - 32px));
        right: -6px;
        width: min(280px, calc(100vw - 32px));
    }

    .project-field-row {
        gap: 6px;
        grid-template-columns: 1fr;
        margin-bottom: 10px;
    }

    .project-billing-schedule-heading,
    .project-budget-heading,
    .project-wip-heading,
    .project-cost-sales-heading,
    .progress-payment-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .project-billing-summary {
        grid-template-columns: 1fr;
    }

    .project-budget-pane-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-budget-pane-title strong {
        white-space: normal;
    }

    .pipeline-billing-heading {
        align-items: stretch;
        padding: 14px;
    }

    .pipeline-billing-summary {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .pipeline-billing-summary .pipeline-billing-estimate-form,
    .pipeline-billing-summary > div {
        min-width: 0;
        width: 100%;
    }

    #pipeline-billing .project-billing-table-wrap {
        overflow: visible;
    }

    #pipeline-billing .project-billing-table-wrap table,
    #pipeline-billing .project-billing-table-wrap tbody,
    #pipeline-billing .project-billing-table-wrap tr,
    #pipeline-billing .project-billing-table-wrap td {
        display: block;
        width: 100%;
    }

    #pipeline-billing .project-billing-table-wrap thead {
        display: none;
    }

    #pipeline-billing .project-billing-table-wrap table {
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    #pipeline-billing .pipeline-billing-schedule-row {
        background: #ffffff;
        border: 1px solid #dce5eb;
        border-radius: 8px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
        padding: 12px;
    }

    #pipeline-billing .pipeline-billing-schedule-row td {
        border: 0;
        padding: 0 0 10px;
        text-align: left !important;
    }

    #pipeline-billing .pipeline-billing-schedule-row td:last-child {
        padding-bottom: 0;
    }

    #pipeline-billing .pipeline-billing-schedule-row td::before {
        color: #64748b;
        content: attr(data-label);
        display: block;
        font-size: 0.74rem;
        font-weight: 850;
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    #pipeline-billing .pipeline-billing-schedule-row .form-control,
    #pipeline-billing .pipeline-billing-schedule-row .form-select {
        width: 100%;
    }

    #pipeline-billing .pipeline-billing-row-actions {
        align-items: stretch;
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr auto;
    }

    #pipeline-billing .pipeline-billing-row-actions::before {
        grid-column: 1 / -1;
    }

    #pipeline-billing .pipeline-billing-row-actions .btn-icon-label {
        justify-content: center;
        width: 100%;
    }

    .project-budget-heading p {
        margin: 4px 20px 0;
    }

    .project-budget-summary {
        grid-template-columns: 1fr;
        max-width: none;
        padding: 0 20px 8px;
    }

    .project-budget-detail-summary {
        grid-template-columns: 1fr;
    }

    .project-variation-budget-grid {
        grid-template-columns: 1fr;
    }

    .project-cost-sales-summary {
        padding: 0 20px 8px;
    }

    .project-wip-groups,
    .project-wip-position {
        grid-template-columns: 1fr;
    }

    .report-hero,
    .wip-snapshot-controls,
    .wip-snapshot-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .report-hero-actions,
    .report-hero-actions .btn,
    .wip-snapshot-filter .btn,
    .wip-snapshot-filter .form-control {
        width: 100%;
    }

    .wip-eofy-shortcuts {
        justify-content: flex-start;
    }

    .wip-total-grid {
        grid-template-columns: 1fr;
    }

    .project-cost-upload-grid,
    .project-cost-category-select {
        grid-template-columns: 1fr;
    }

    .project-activity-type-grid,
    .project-activity-email-grid {
        grid-template-columns: 1fr;
    }

    .project-activity-heading,
    .project-activity-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .project-activity-heading .btn,
    .project-activity-toolbar .form-select {
        max-width: none;
        width: 100%;
    }

    .project-cost-category-select .btn {
        width: 100%;
    }

    .progress-payment-heading-actions .btn {
        width: 100%;
    }

    .cashflow-grid {
        height: 620px;
    }
}
.payable-history-search {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.payable-history-search-field {
    flex: 1 1 460px;
    min-width: 0;
}

.payable-history-search-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    padding-top: 1.75rem;
}

.payable-history-search-actions .btn {
    white-space: nowrap;
}

.payable-intake-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: stretch;
}

.payable-intake-dropzone {
    position: relative;
    min-height: 96px;
    border: 1px dashed #9fb3c8;
    border-radius: 8px;
    background: #f8fbfd;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.payable-intake-dropzone.is-dragging {
    border-color: #0f766e;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .22);
}

.payable-intake-dropzone.is-rejected {
    border-color: #dc2626;
    background: #fef2f2;
}

.payable-intake-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.payable-intake-drop-label {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 96px;
    margin: 0;
    padding: 1rem 1.15rem;
    color: #172033;
    pointer-events: none;
}

.payable-intake-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #0f766e;
    background: #e7f6f2;
    border: 1px solid #b8dfd6;
    flex: 0 0 auto;
}

.payable-intake-drop-copy {
    display: grid;
    gap: .2rem;
}

.payable-intake-drop-copy strong,
.payable-intake-busy strong {
    font-size: 1rem;
    line-height: 1.2;
}

.payable-intake-drop-copy small,
.payable-intake-busy small {
    color: #5f6f87;
}

.payable-intake-busy {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.15rem;
    border-radius: 8px;
    background: rgba(236, 253, 245, .96);
    color: #0f3f3a;
    z-index: 2;
}

.payable-intake-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(15, 118, 110, .2);
    border-top-color: #0f766e;
    border-radius: 999px;
    animation: payable-intake-spin .75s linear infinite;
    flex: 0 0 auto;
}

.payable-intake-actions {
    display: flex;
}

.payable-intake-actions .btn {
    min-width: 180px;
}

.payable-intake-upload.is-uploading .payable-intake-file-input {
    pointer-events: none;
}

@keyframes payable-intake-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .payable-history-search,
    .payable-history-search-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .payable-history-search-actions {
        padding-top: 0;
    }

    .payable-history-search-actions .btn-group,
    .payable-history-search-actions .btn {
        width: 100%;
    }

    .payable-intake-upload {
        grid-template-columns: 1fr;
    }

    .payable-intake-actions .btn {
        width: 100%;
    }
}

.payable-line-editor .table-responsive {
    overflow-x: auto;
}

.payable-line-editor {
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 10px;
}

.payable-line-table {
    table-layout: fixed;
    min-width: 980px;
    width: 100%;
}

.payable-line-description-col {
    width: auto;
}

.payable-line-qty-col {
    width: 76px;
}

.payable-line-rate-col {
    width: 118px;
}

.payable-line-money-col {
    width: 112px;
}

.payable-line-action-col {
    width: 52px;
}

.payable-line-editor th,
.payable-line-editor td {
    vertical-align: middle;
}

.payable-line-editor th {
    white-space: nowrap;
}

.payable-line-editor input[name$="[description]"] {
    min-width: 0;
}

.payable-line-editor input[data-line-quantity],
.payable-line-editor input[data-line-unit],
.payable-line-editor input[data-line-ex],
.payable-line-editor input[data-line-gst],
.payable-line-editor input[data-line-inc] {
    padding-left: .4rem;
    padding-right: .4rem;
}

.payable-total-strip {
    align-items: end;
    background: #f8fbfb;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px;
}

.payable-total-strip .form-control {
    font-weight: 700;
}

@media (max-width: 640px) {
    .payable-line-qty-col {
        width: 68px;
    }

    .payable-line-rate-col {
        width: 108px;
    }

    .payable-line-money-col {
        width: 104px;
    }

    .payable-total-strip {
        grid-template-columns: 1fr;
    }
}

.project-cost-line-panel {
    color: #334155;
}

.project-cost-line-summary-main {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-cost-line-summary-main small {
    color: #64748b;
    font-size: .78rem;
    font-weight: 650;
}

.pm-token-line-list {
    display: grid;
    gap: .45rem;
    margin: .85rem 0;
}

.pm-token-line-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .2rem .75rem;
    padding: .65rem .75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.pm-token-line-row small {
    color: #64748b;
}

.pm-token-line-row strong {
    grid-row: span 2;
    align-self: center;
    white-space: nowrap;
}

.timesheet-panel-heading {
    align-items: flex-start;
    border-bottom: 1px solid var(--cf-line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.timesheet-panel-heading h2 {
    font-size: 1rem;
    margin: 0;
}

.timesheet-panel-heading p {
    color: #64748b;
    font-size: .875rem;
    margin: .2rem 0 0;
}

.timesheet-entry-grid,
.timesheet-filter-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: 150px minmax(170px, 220px) 110px 110px minmax(260px, 1fr) auto;
    padding: 1rem;
}

.timesheet-filter-grid {
    grid-template-columns: 170px minmax(220px, 320px) auto;
}

.timesheet-description-field {
    min-width: 0;
}

.timesheet-submit-field {
    align-self: end;
}

.timesheet-total-pills {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.timesheet-summary-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.timesheet-summary-grid strong {
    color: #0f513f;
    display: block;
    font-size: 1.25rem;
    margin-top: .2rem;
}

.timesheet-table th {
    white-space: nowrap;
}

.timesheet-line-description {
    min-width: 260px;
}

.timesheet-time-input {
    min-width: 84px;
}

.timesheet-actions {
    white-space: nowrap;
}

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

.timesheet-help-shots {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.timesheet-help-shot {
    background: #f8fafc;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
}

.timesheet-help-shot img {
    aspect-ratio: 16 / 10;
    display: block;
    height: auto;
    object-fit: cover;
    object-position: top left;
    width: 100%;
}

.timesheet-help-shot figcaption {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    padding: 10px 12px;
}

.timesheet-help-grid h3 {
    font-size: .95rem;
    margin: 0 0 .45rem;
}

.timesheet-help-grid ul {
    margin: 0;
    padding-left: 1.1rem;
}

.timesheet-help-grid li + li {
    margin-top: .35rem;
}

@media (max-width: 1100px) {
    .timesheet-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timesheet-description-field,
    .timesheet-submit-field {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .timesheet-panel-heading {
        display: grid;
    }

    .timesheet-total-pills {
        justify-content: flex-start;
    }

    .timesheet-entry-grid,
    .timesheet-filter-grid {
        grid-template-columns: 1fr;
    }

    .timesheet-description-field,
    .timesheet-submit-field {
        grid-column: auto;
    }

    .timesheet-help-grid {
        grid-template-columns: 1fr;
    }

    .timesheet-help-shots {
        grid-template-columns: 1fr;
    }
}
