:root {
    --bg-900: #071A3D;
    --bg-850: #162638;
    --bg-100: #f4f7fb;
    --bg-50: #fbfdff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: rgba(255, 255, 255, 0.97);
    --panel-muted: rgba(248, 250, 252, 0.92);
    --border-soft: rgba(107, 114, 128, 0.22);
    --border-strong: rgba(107, 114, 128, 0.34);
    --text-900: #071A3D;
    --text-700: #374151;
    --text-500: #6b7280;
    --text-400: #9ca3af;
    --brand: #18C4C7;
    --brand-strong: #071A3D;
    --accent: #27D6D9;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-lg: 0 28px 70px rgba(7, 26, 61, 0.16);
    --shadow-md: 0 18px 36px rgba(7, 26, 61, 0.10);
}

/* CPMCore Sales demo checklist */
.demo-checklist-shell { max-width: 1500px; }
.demo-overall-bar { display: grid; gap: 10px; padding: 6px 2px 2px; }
.demo-overall-bar .btn { justify-self: start; }
.demo-area { padding: 0; }
.demo-area-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 24px 28px; cursor: pointer; list-style: none; }
.demo-area-summary::-webkit-details-marker { display: none; }
.demo-area-summary::marker { content: ""; }
.demo-area-summary .section-kicker, .demo-area-summary .section-copy, .demo-area-title { display: block; }
.demo-area-title { margin: 4px 0 6px; color: var(--text-900); font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 750; line-height: 1.2; }
.demo-area-summary-progress { display: flex; gap: 16px; align-items: center; white-space: nowrap; color: var(--text-700); font-weight: 700; }
.demo-area-chevron { width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 160ms ease; }
.demo-area[open] .demo-area-chevron { transform: rotate(225deg); }
.demo-area[open] .demo-area-summary { border-bottom: 1px solid var(--border); }
.demo-area-body { display: grid; gap: 18px; padding: 24px 28px 28px; }
.demo-area-header { display: grid; grid-template-columns: minmax(260px, 380px); justify-content: end; }
.demo-company-picker { margin: 0; }
.demo-progress-label { display: flex; justify-content: space-between; gap: 20px; }
.demo-progress-track { height: 12px; overflow: hidden; border-radius: 999px; background: rgba(107, 114, 128, 0.18); }
.demo-progress-track > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width 180ms ease; }
.demo-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 38px; }
.demo-check-group { min-width: 0; }
.demo-check-group h3 { margin-top: 0; }
.demo-check-list { display: grid; gap: 10px; }
.demo-check-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.demo-check-box { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--border-strong); border-radius: 7px; color: #ffffff; font-weight: 800; }
.demo-check-item a { color: var(--text-900); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.demo-check-item a:hover { color: #087f83; }
.demo-check-item.is-complete .demo-check-box { border-color: var(--success); background: var(--success); }
.demo-check-item.is-complete a { color: var(--text-500); text-decoration: line-through; }
.demo-check-disabled { color: var(--text-500); }
@media (max-width: 820px) {
    .demo-area-header, .demo-groups { grid-template-columns: 1fr; }
    .demo-area-summary { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
    .demo-area-summary-progress { justify-content: space-between; }
    .demo-area-body { padding: 20px; }
}

/* Customer-branded Master Sales Funnel report */
.master-sales-report-shell {
    max-width: 1540px;
}

.sales-report-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 126px;
    padding: 22px 28px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    border-bottom: 5px solid #18c4c7;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(7, 26, 61, 0.08);
}

.sales-report-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 20px;
}

.sales-report-logo {
    display: block;
    width: auto;
    max-width: 250px;
    height: auto;
    max-height: 78px;
    object-fit: contain;
}

.sales-report-logo-fallback {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, #071a3d, #0a4e85);
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sales-report-company-lockup {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding-left: 20px;
    border-left: 1px solid rgba(107, 114, 128, 0.32);
}

.sales-report-company-lockup strong {
    overflow: hidden;
    color: #071a3d;
    font-size: clamp(20px, 2.4vw, 32px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
    text-overflow: clip;
    white-space: normal;
}

.sales-report-company-lockup span,
.sales-report-title-lockup > span {
    color: #18c4c7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sales-report-title-lockup {
    flex: 0 0 auto;
    text-align: right;
}

.sales-report-title-lockup h1 {
    margin: 3px 0 5px;
    color: #071a3d;
    font-size: clamp(30px, 3.5vw, 48px);
    line-height: 0.98;
}

.sales-report-title-lockup p {
    margin: 0;
    color: var(--text-500);
    font-size: 13px;
}

.sales-report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.sales-report-kpi-grid .insight-card {
    min-width: 0;
    padding: 20px;
}

.sales-report-kpi-grid .metric-value {
    font-size: clamp(25px, 3vw, 38px);
}

.sales-report-kpi-compact {
    border-top-color: rgba(47, 107, 138, 0.65);
}

.sales-report-kpi-alert {
    border-top-color: #e97924;
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.96));
}

.sales-report-stage-card {
    overflow: hidden;
}

.sales-report-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.sales-report-stage {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 8px;
    padding: 17px;
    overflow: hidden;
    border: 1px solid rgba(107, 114, 128, 0.22);
    border-radius: 18px;
    background: #ffffff;
}

.sales-report-stage::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #2f6b8a;
    content: "";
}

.sales-report-stage-won::before { background: #0f766e; }
.sales-report-stage-closed::before { background: #e97924; }

.sales-report-stage-sequence {
    display: flex;
    justify-content: flex-end;
}

.sales-report-stage-sequence span {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 999px;
    background: #eef4fb;
    color: #2f6b8a;
    font-size: 10px;
    font-weight: 900;
}

.sales-report-stage-name {
    min-height: 34px;
    color: var(--text-700);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.4;
}

.sales-report-stage > strong {
    color: #071a3d;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: 25px;
    letter-spacing: -0.045em;
}

.sales-report-stage-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-500);
    font-size: 10px;
    font-weight: 750;
}

.sales-report-stage-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf1;
}

.sales-report-stage-track span {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: #2f6b8a;
}

.sales-report-stage-won .sales-report-stage-track span { background: #0f766e; }
.sales-report-stage-closed .sales-report-stage-track span { background: #e97924; }

.sales-report-intelligence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sales-report-insight-panel { min-width: 0; padding: 18px; border: 1px solid rgba(107, 114, 128, 0.24); border-radius: 18px; background: #ffffff; }
.sales-report-insight-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #dce3ec; }
.sales-report-insight-heading span { color: #18aeb3; font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sales-report-insight-heading h2 { margin: 3px 0 0; color: #071a3d; font-size: 18px; }
.sales-report-insight-heading > strong { color: #071a3d; font-size: 12px; text-align: right; }
.sales-report-insight-empty { padding: 16px 0; color: #6b7280; font-size: 11px; }
.sales-report-bar-list { display: grid; gap: 11px; }
.sales-report-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.sales-report-bar-label, .sales-report-bar-value { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sales-report-bar-label { min-width: 0; }
.sales-report-bar-label strong { overflow: hidden; color: #23364f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sales-report-bar-label span, .sales-report-bar-value span { color: #6b7280; font-size: 8px; }
.sales-report-bar-value strong { color: #071a3d; font-size: 11px; }
.sales-report-bar-track { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #e5eaf1; }
.sales-report-bar-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: #2f7797; }
.sales-report-followup-stack { display: flex; height: 15px; margin: 4px 0 15px; overflow: hidden; border-radius: 999px; background: #e5eaf1; }
.sales-report-followup-stack span { display: block; height: 100%; }
.sales-report-followup-stack .is-due, .sales-report-followup-dot.is-due { background: #d95b49; }
.sales-report-followup-stack .is-next, .sales-report-followup-dot.is-next { background: #e5a11d; }
.sales-report-followup-stack .is-later, .sales-report-followup-dot.is-later { background: #15847a; }
.sales-report-followup-stack .is-unscheduled, .sales-report-followup-dot.is-unscheduled { background: #8b96a8; }
.sales-report-followup-list { display: grid; gap: 9px; }
.sales-report-followup-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto 42px; align-items: center; gap: 8px; color: #374151; font-size: 10px; }
.sales-report-followup-row em { color: #6b7280; font-style: normal; text-align: right; }
.sales-report-followup-dot { width: 8px; height: 8px; border-radius: 50%; }
.sales-report-largest-panel { margin-top: 14px; }
.sales-report-largest-list { display: grid; gap: 9px; }
.sales-report-largest-row { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(240px, 1.4fr) auto; align-items: center; gap: 14px; }
.sales-report-largest-name { display: grid; min-width: 0; gap: 2px; }
.sales-report-largest-name strong { overflow: hidden; color: #23364f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sales-report-largest-name span { overflow: hidden; color: #6b7280; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sales-report-largest-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e5eaf1; }
.sales-report-largest-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: #18aeb3; }
.sales-report-largest-value { min-width: 86px; color: #071a3d; font-size: 12px; text-align: right; }

.sales-report-print-only {
    display: none;
}

.banker-opportunity-card {
    overflow: hidden;
}

.banker-opportunity-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #071a3d;
}

.banker-opportunity-heading h2 {
    margin: 4px 0;
    color: #071a3d;
    font-size: 23px;
}

.banker-opportunity-heading p {
    margin: 0;
    color: var(--text-500);
    font-size: 12px;
}

.banker-opportunity-heading > span {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e7f8f8;
    color: #071a3d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.banker-opportunity-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    table-layout: fixed;
}

.banker-col-opportunity { width: 40%; }
.banker-col-owner { width: 15%; }
.banker-col-value { width: 15%; }
.banker-col-stage { width: 15%; }
.banker-col-follow-up { width: 15%; }

.banker-opportunity-table th {
    padding: 9px 10px;
    border-bottom: 2px solid #071a3d;
    background: #071a3d;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;
}

.banker-opportunity-table .banker-register-title-row th {
    padding: 2px 0 12px;
    border-bottom: 2px solid #071a3d;
    background: #ffffff;
    color: #071a3d;
    text-transform: none;
}

.banker-register-title-row th > span,
.banker-register-title-row th > strong {
    display: block;
}

.banker-register-title-row th > span {
    margin-bottom: 3px;
    color: #18c4c7;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.banker-register-title-row th > strong {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.banker-opportunity-table .banker-register-count {
    color: #6b7280;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: right;
    text-transform: uppercase;
    vertical-align: bottom;
}

.banker-opportunity-table td {
    padding: 10px;
    border-bottom: 1px solid #dce3ec;
    color: #374151;
    font-size: 10px;
    line-height: 1.3;
    vertical-align: middle;
}

.banker-opportunity-table tbody tr:nth-child(even) td {
    background: #f7f9fc;
}

.banker-opportunity-table td strong,
.banker-opportunity-table td span {
    display: block;
}

.banker-opportunity-table td strong {
    color: #071a3d;
    font-size: 11px;
    white-space: normal;
}

.banker-opportunity-table td strong + span {
    margin-top: 2px;
    overflow: hidden;
    color: #6b7280;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.banker-opportunity-table .banker-value-cell {
    color: #071a3d;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.banker-stage-chip {
    display: inline-block !important;
    max-width: 100%;
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid rgba(24, 196, 199, 0.35);
    border-radius: 999px;
    background: #e7f8f8;
    color: #071a3d;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.sales-report-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 4px 0;
    border-top: 2px solid #071a3d;
    color: var(--text-500);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .sales-report-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .sales-report-brand-header { align-items: flex-start; flex-direction: column; }
    .sales-report-title-lockup { text-align: left; }
    .sales-report-company-lockup { padding-left: 0; border-left: 0; }
    .sales-report-logo { max-width: 190px; max-height: 64px; }
    .sales-report-kpi-grid { grid-template-columns: 1fr; }
    .sales-report-intelligence { grid-template-columns: 1fr; }
    .sales-report-largest-row { grid-template-columns: 1fr auto; }
    .sales-report-largest-track { grid-column: 1 / -1; grid-row: 2; }
    .sales-report-footer { flex-direction: column; }
}

@media print {
    body.master-sales-report-page {
        color: #071a3d;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .master-sales-report-page .page-shell {
        display: block;
        width: 100%;
        max-width: none;
    }

    .master-sales-report-page .sales-report-brand-header {
        min-height: 0;
        margin: 0 0 0.16in;
        padding: 0 0 0.12in;
        border: 0;
        border-bottom: 4px solid #18c4c7;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
    }

    .master-sales-report-page .sales-report-logo {
        max-width: 1.8in;
        max-height: 0.58in;
    }

    .master-sales-report-page .sales-report-logo-fallback {
        width: 0.58in;
        height: 0.58in;
        border-radius: 8px;
        font-size: 18pt;
    }

    .master-sales-report-page .sales-report-company-lockup strong { font-size: 20pt; }
    .master-sales-report-page .sales-report-title-lockup h1 { font-size: 22pt; }

    .master-sales-report-page .dashboard-command {
        margin-bottom: 0.12in;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .master-sales-report-page .dashboard-command-top {
        display: block;
    }

    .master-sales-report-page .dashboard-command-top > div:first-child,
    .master-sales-report-page .dashboard-filter-bar,
    .master-sales-report-page .collapsible-search-card {
        display: none !important;
    }

    .master-sales-report-page .dashboard-summary-card {
        padding: 0.12in 0.16in;
        border-radius: 10px;
        background: #071a3d;
        box-shadow: none;
    }

    .master-sales-report-page .procurement-mix-card {
        grid-template-columns: 1.1fr 1.4fr;
        gap: 4px 16px;
    }

    .master-sales-report-page .procurement-mix-card .hero-panel-label,
    .master-sales-report-page .procurement-mix-heading,
    .master-sales-report-page .procurement-mix-copy,
    .master-sales-report-page .procurement-mix-footer {
        grid-column: 1;
    }

    .master-sales-report-page .procurement-mix-list {
        grid-column: 2;
        grid-row: 1 / span 4;
        gap: 5px;
    }

    .master-sales-report-page .procurement-mix-heading { font-size: 15pt; }
    .master-sales-report-page .procurement-mix-copy { display: none; }
    .master-sales-report-page .procurement-mix-row-head strong { font-size: 7pt; }
    .master-sales-report-page .procurement-mix-row-head span { font-size: 6.5pt; }
    .master-sales-report-page .procurement-mix-track { height: 4px; }

    .master-sales-report-page .sales-report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.08in;
        margin-bottom: 0.12in;
        break-inside: avoid;
    }

    .master-sales-report-page .sales-report-kpi-grid .insight-card {
        gap: 4px;
        min-height: 0;
        padding: 0.1in 0.12in;
        border-radius: 9px;
        box-shadow: none;
    }

    .master-sales-report-page .sales-report-kpi-grid .metric-title { font-size: 7pt; }
    .master-sales-report-page .sales-report-kpi-grid .metric-value { font-size: 18pt; }
    .master-sales-report-page .sales-report-kpi-grid .metric-note { display: none; }
    .master-sales-report-page .sales-report-kpi-grid .metric-foot { display: none; }
    .master-sales-report-page .sales-report-estimated-cost { display: none !important; }

    .master-sales-report-page .sales-report-stage-card {
        margin-bottom: 0.12in;
        padding: 0.12in;
        border-radius: 10px;
        break-inside: avoid;
    }

    .master-sales-report-page .sales-report-stage-card .section-heading { margin-bottom: 0.08in; }
    .master-sales-report-page .sales-report-stage-card h2 { display: none; }
    .master-sales-report-page .sales-report-stage-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.05in;
    }

    .master-sales-report-page .sales-report-stage {
        gap: 3px;
        padding: 0.07in;
        border-radius: 7px;
    }

    .master-sales-report-page .sales-report-stage-sequence span { width: 17px; height: 17px; font-size: 6pt; }
    .master-sales-report-page .sales-report-stage-name { min-height: 22px; font-size: 6.5pt; }
    .master-sales-report-page .sales-report-stage > strong { font-size: 11pt; }
    .master-sales-report-page .sales-report-stage-meta { font-size: 5.5pt; }
    .master-sales-report-page .sales-report-stage-track { height: 3px; }

    .master-sales-report-page .sales-report-intelligence {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.08in;
        margin-bottom: 0.08in;
        break-inside: avoid;
    }

    .master-sales-report-page .sales-report-insight-panel {
        padding: 0.1in;
        border-radius: 8px;
        break-inside: avoid;
    }

    .master-sales-report-page .sales-report-insight-heading { gap: 8px; margin-bottom: 0.07in; padding-bottom: 0.05in; }
    .master-sales-report-page .sales-report-insight-heading span { font-size: 5.5pt; }
    .master-sales-report-page .sales-report-insight-heading h2 { font-size: 10pt; }
    .master-sales-report-page .sales-report-insight-heading > strong { font-size: 7pt; }
    .master-sales-report-page .sales-report-bar-list { gap: 0.055in; }
    .master-sales-report-page .sales-report-bar-row { gap: 2px 8px; }
    .master-sales-report-page .sales-report-bar-label strong,
    .master-sales-report-page .sales-report-bar-value strong { font-size: 6.5pt; }
    .master-sales-report-page .sales-report-bar-label span,
    .master-sales-report-page .sales-report-bar-value span { font-size: 5.2pt; }
    .master-sales-report-page .sales-report-bar-track { height: 4px; }
    .master-sales-report-page .sales-report-followup-stack { height: 8px; margin: 0 0 0.08in; }
    .master-sales-report-page .sales-report-followup-list { gap: 0.045in; }
    .master-sales-report-page .sales-report-followup-row { grid-template-columns: 7px minmax(0, 1fr) auto 32px; gap: 5px; font-size: 6pt; }
    .master-sales-report-page .sales-report-followup-dot { width: 6px; height: 6px; }
    .master-sales-report-page .sales-report-largest-panel { margin-top: 0; margin-bottom: 0.08in; }
    .master-sales-report-page .sales-report-largest-list { gap: 0.05in; }
    .master-sales-report-page .sales-report-largest-row { grid-template-columns: 1.05fr 1.4fr auto; gap: 0.08in; }
    .master-sales-report-page .sales-report-largest-name strong { font-size: 6.25pt; }
    .master-sales-report-page .sales-report-largest-name span { font-size: 5pt; }
    .master-sales-report-page .sales-report-largest-track { height: 6px; }
    .master-sales-report-page .sales-report-largest-value { min-width: 0.62in; font-size: 7pt; }

    .master-sales-report-page .sales-report-print-only {
        display: block !important;
    }

    .master-sales-report-page .sales-report-screen-register {
        display: none !important;
    }

    .master-sales-report-page .banker-opportunity-card {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        break-before: page;
        page-break-before: always;
        box-shadow: none;
    }

    .master-sales-report-page .banker-opportunity-table { margin-top: 0; }
    .master-sales-report-page .banker-opportunity-table .banker-register-title-row th { padding: 0 0 0.09in; }
    .master-sales-report-page .banker-register-title-row th > span { font-size: 7pt; }
    .master-sales-report-page .banker-register-title-row th > strong { font-size: 15pt; }
    .master-sales-report-page .banker-opportunity-table .banker-register-count { font-size: 7pt; }
    .master-sales-report-page .banker-opportunity-table th { padding: 7px 6px; font-size: 6.75pt; }
    .master-sales-report-page .banker-opportunity-table td { padding: 8px 6px; font-size: 8pt; line-height: 1.35; }
    .master-sales-report-page .banker-opportunity-table td strong { font-size: 8.5pt; }
    .master-sales-report-page .banker-opportunity-table td strong + span { font-size: 6.5pt; white-space: normal; }
    .master-sales-report-page .banker-opportunity-table .banker-value-cell { font-size: 8.5pt; }
    .master-sales-report-page .banker-stage-chip { font-size: 5.75pt; text-overflow: clip; white-space: normal; }
    .master-sales-report-page .banker-opportunity-table tr { break-inside: avoid; }
    .master-sales-report-page .banker-opportunity-table thead { display: table-header-group; }

    .master-sales-report-page .wip-table-card {
        padding: 0.12in;
        border-radius: 10px;
    }

    .master-sales-report-page .wip-table-card .section-heading { margin-bottom: 0.08in; }
    .master-sales-report-page .wip-table-card h2 { font-size: 13pt; }
    .master-sales-report-page .wip-table-shell { overflow: visible; }
    .master-sales-report-page .wip-table { min-width: 0; font-size: 6.5pt; }
    .master-sales-report-page .wip-table th,
    .master-sales-report-page .wip-table td { padding: 5px 4px; }
    .master-sales-report-page .wip-table .job-cell { gap: 1px; }
    .master-sales-report-page .wip-table .job-cell span { font-size: 5.5pt; }
    .master-sales-report-page .status-chip { padding: 3px 5px; font-size: 5.5pt; }
    .master-sales-report-page .wip-table tr { break-inside: avoid; }
    .master-sales-report-page .wip-table thead { display: table-header-group; }

    .master-sales-report-page .sales-report-footer {
        position: static;
        margin-top: 0.1in;
        padding-top: 0.06in;
        font-size: 6.75pt;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    color: var(--text-900);
    font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(24, 196, 199, 0.12), transparent 24%),
        radial-gradient(circle at 85% 16%, rgba(39, 214, 217, 0.10), transparent 20%),
        linear-gradient(180deg, #f8fbff 0%, #eff4fa 52%, #eef2f6 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(24, 196, 199, 0.08), transparent 22%),
        radial-gradient(circle at 80% 0%, rgba(24, 196, 199, 0.08), transparent 18%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    background-image:
        linear-gradient(rgba(107, 114, 128, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 114, 128, 0.16) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 88%);
}

body.login-body {
    color: #e2e8f0;
    background:
        radial-gradient(circle at 15% 18%, rgba(24, 196, 199, 0.18), transparent 20%),
        radial-gradient(circle at 80% 10%, rgba(39, 214, 217, 0.16), transparent 18%),
        linear-gradient(145deg, #071A3D 0%, #14283d 58%, #183650 100%);
}

body.login-body::after {
    opacity: 0.14;
    background-size: 84px 84px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 92%);
}

form,
.login-shell,
.topbar,
.page {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--text-900);
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    letter-spacing: -0.05em;
}

h1 {
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.02;
}

h2 {
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.08;
}

h3 {
    font-size: 20px;
    line-height: 1.18;
}

p {
    margin: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(7, 26, 61, 0.72);
    border-bottom: 1px solid rgba(107, 114, 128, 0.18);
}

.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-lockup {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.cpmcore-header-logo-frame,
.cpmcore-login-logo-frame {
    position: relative;
    display: block;
    overflow: hidden;
    flex: 0 0 auto;
    background: #ffffff;
    border: 1px solid rgba(103, 227, 229, 0.44);
    box-shadow: 0 14px 30px rgba(7, 26, 61, 0.24);
}

.cpmcore-header-logo-frame {
    width: 180px;
    height: 46px;
    border-radius: 12px;
}

.cpmcore-header-logo,
.cpmcore-login-logo {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-navigation-shell {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 2px;
}

.topbar-actions:has(.top-navigation-shell) > .status-pill {
    display: none;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.nav-menu-trigger,
.nav-identity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-menu-trigger:hover,
.nav-dropdown[open] > .nav-menu-trigger,
.nav-dropdown[open] > .nav-identity {
    border-color: rgba(191, 219, 254, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-dropdown.is-active > .nav-menu-trigger {
    border-bottom-color: #67e3e5;
    border-radius: 0;
    color: #ffffff;
}

.nav-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 210px;
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(3, 14, 35, 0.24);
}

.nav-menu-panel-wide {
    min-width: 240px;
}

.nav-menu-link {
    padding: 10px 11px;
    border-radius: 8px;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.nav-menu-link:hover,
.nav-menu-link.is-active {
    background: rgba(24, 196, 199, 0.1);
    color: var(--brand-strong);
}

.nav-menu-link.is-active {
    box-shadow: inset 3px 0 0 var(--brand);
}

.nav-account-menu {
    margin-left: 4px;
}

.nav-identity {
    gap: 7px;
    max-width: 215px;
    padding: 4px 7px 4px 10px;
    border-color: rgba(103, 227, 229, 0.22);
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
}

.nav-identity-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: linear-gradient(145deg, #67e3e5, #12aeb5);
    color: #071a3d;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    box-shadow: none;
}

.nav-identity-company {
    display: block;
    overflow: hidden;
    max-width: 140px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-identity-chevron {
    color: #67e3e5;
    font-size: 12px;
}

.nav-account-panel {
    min-width: 245px;
}

.nav-account-context {
    display: grid;
    gap: 3px;
    margin-bottom: 6px;
    padding: 10px 11px 12px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.14);
}

.nav-account-context strong {
    color: var(--text-900);
    font-size: 14px;
}

.nav-account-context span {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 700;
}

.nav-menu-link-logout {
    color: #a43b3b;
}

.nav-mobile-toggle {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-link.is-active {
    color: #ffffff;
    background: transparent;
    border-bottom-color: #67e3e5;
    border-radius: 0;
}

.launcher-utility-nav {
    flex-wrap: nowrap;
}

.launcher-modules-menu {
    position: relative;
}

.launcher-modules-menu > summary {
    list-style: none;
}

.launcher-modules-menu > summary::-webkit-details-marker {
    display: none;
}

.launcher-modules-menu[open] > summary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.launcher-modules-chevron {
    margin-left: 2px;
    font-size: 11px;
    color: #67e3e5;
}

.launcher-modules-panel {
    top: calc(100% + 10px);
    right: auto;
    left: 0;
    grid-template-columns: minmax(210px, 1fr);
    gap: 2px;
    width: max-content;
    min-width: 250px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 110px));
    overflow-y: auto;
    padding: 10px;
}

.launcher-modules-panel .nav-link {
    justify-content: flex-start;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 700;
}

.launcher-modules-panel .nav-link:hover {
    color: var(--brand-strong);
    background: rgba(24, 196, 199, 0.1);
    transform: none;
}

@media (max-width: 640px) {
    .launcher-modules-panel {
        position: fixed;
        top: 74px;
        right: 16px;
        left: 16px;
        grid-template-columns: 1fr;
        width: auto;
        min-width: 0;
        max-height: calc(100vh - 94px);
    }
}

.nav-link-graphic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link-graphic svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.integration-result-heading {
    margin-top: 28px;
}

.integration-api-table {
    min-width: 980px;
}

.integration-api-table-shell {
    overflow-x: auto;
}

.integration-api-table td {
    vertical-align: top;
}

.arcsite-intake-table {
    min-width: 0;
    table-layout: fixed;
}

.integration-match-select {
    min-width: 0;
    min-height: 42px;
    margin-bottom: 8px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.arcsite-intake-table th:nth-child(1) { width: 19%; }
.arcsite-intake-table th:nth-child(2) { width: 22%; }
.arcsite-intake-table th:nth-child(3) { width: 22%; }
.arcsite-intake-table th:nth-child(4) { width: 14%; }
.arcsite-intake-table th:nth-child(5) { width: 23%; }

.arcsite-intake-table th,
.arcsite-intake-table td {
    padding-left: 12px;
    padding-right: 12px;
    overflow-wrap: anywhere;
}

.arcsite-intake-table .arcsite-action-button {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.arcsite-proposal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.arcsite-pdf-link {
    display: inline-block;
    margin-top: 8px;
}

.page {
    padding: 38px 28px 56px;
}

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.content-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.eyebrow,
.section-kicker,
.metric-title,
.mini-stat-label,
.module-kicker,
.hero-panel-label,
.field-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow,
.section-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--brand);
}

.hero-card,
.section-card,
.form-card,
.login-card,
.launcher-item,
.insight-card,
.stage-card,
.mini-stat {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border-soft);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
}

.hero-card::before,
.section-card::before,
.form-card::before,
.login-card::before,
.launcher-item::before,
.insight-card::before,
.stage-card::before,
.mini-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

.hero-card {
    padding: 32px;
}

.hero-card-split {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy {
    max-width: 840px;
    margin-top: 16px;
    color: var(--text-700);
    font-size: 17px;
    line-height: 1.72;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.highlight-chip {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(24, 196, 199, 0.16);
    background: rgba(24, 196, 199, 0.10);
    color: #18C4C7;
    font-size: 13px;
    font-weight: 700;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(7, 26, 61, 0.96) 0%, rgba(14, 40, 68, 0.95) 58%, rgba(10, 78, 133, 0.92) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.hero-panel-identity {
    justify-content: flex-start;
}

.hero-panel-label {
    color: rgba(191, 219, 254, 0.82);
}

.hero-panel-value {
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.04;
}

.hero-panel-value-entity {
    max-width: 100%;
    font-size: clamp(23px, 2.35vw, 34px);
    letter-spacing: -0.045em;
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-graphic-value {
    width: 100%;
    letter-spacing: 0;
}

.hero-process-graphic {
    display: grid;
    grid-template-columns: 52px minmax(20px, 1fr) 52px minmax(20px, 1fr) 52px;
    align-items: center;
    width: 100%;
    min-height: 76px;
}

.hero-process-graphic-short {
    grid-template-columns: 62px minmax(28px, 1fr) 62px;
    max-width: 270px;
}

.hero-process-node,
.hero-state-node {
    display: inline-flex;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(125, 211, 252, 0.44);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24) 0 14%, rgba(24, 196, 199, 0.24) 44%, rgba(14, 116, 144, 0.12) 100%);
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-process-graphic-short .hero-process-node {
    width: 62px;
    height: 62px;
}

.hero-process-node svg,
.hero-state-node svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: #a5f3fc;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-process-graphic-short .hero-process-node svg {
    width: 31px;
    height: 31px;
}

.hero-process-node-accent {
    border-color: rgba(45, 212, 191, 0.55);
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24) 0 14%, rgba(45, 212, 191, 0.3) 44%, rgba(13, 148, 136, 0.14) 100%);
}

.hero-process-node-finish {
    border-color: rgba(134, 239, 172, 0.55);
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24) 0 14%, rgba(34, 197, 94, 0.28) 44%, rgba(21, 128, 61, 0.14) 100%);
}

.hero-process-node-finish svg {
    stroke: #bbf7d0;
}

.hero-process-connector {
    position: relative;
    height: 3px;
    margin: 0 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.25), rgba(45, 212, 191, 0.9));
}

.hero-process-connector::after {
    position: absolute;
    top: -4px;
    right: -1px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid #5eead4;
    content: "";
}

.hero-process-connector-sync {
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.25), rgba(45, 212, 191, 0.9), rgba(125, 211, 252, 0.25));
}

.hero-process-connector-sync::before {
    position: absolute;
    top: -4px;
    left: -1px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-right: 7px solid #67e8f9;
    border-bottom: 5px solid transparent;
    content: "";
}

.hero-state-graphic {
    display: grid;
    grid-template-columns: repeat(4, 52px);
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 290px;
    padding: 11px 0;
    background: linear-gradient(rgba(125, 211, 252, 0.26), rgba(125, 211, 252, 0.26)) center / calc(100% - 52px) 2px no-repeat;
}

.hero-state-won {
    border-color: rgba(134, 239, 172, 0.55);
}

.hero-state-won svg {
    stroke: #bbf7d0;
}

.hero-state-lost {
    border-color: rgba(253, 164, 175, 0.52);
}

.hero-state-lost svg {
    stroke: #fecdd3;
}

.hero-state-no-bid {
    border-color: rgba(253, 230, 138, 0.52);
}

.hero-state-no-bid svg {
    stroke: #fef3c7;
}

.hero-panel-copy {
    color: rgba(226, 232, 240, 0.84);
    line-height: 1.68;
}

.pipeline-pulse-panel {
    justify-content: flex-start;
    gap: 20px;
}

.pipeline-pulse-flow {
    display: grid;
    grid-template-columns: minmax(54px, 1fr) 16px minmax(54px, 1fr) 16px minmax(54px, 1fr) 16px minmax(54px, 1fr);
    align-items: start;
    gap: 5px;
    margin-top: 14px;
}

.pipeline-pulse-step {
    display: grid;
    justify-items: center;
    gap: 7px;
    color: rgba(226, 232, 240, 0.88);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
}

.pipeline-pulse-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(125, 211, 252, 0.44);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.22) 0 14%, rgba(24, 196, 199, 0.24) 44%, rgba(14, 116, 144, 0.12) 100%);
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.pipeline-pulse-node svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #a5f3fc;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pipeline-pulse-node-accent {
    border-color: rgba(45, 212, 191, 0.58);
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.22) 0 14%, rgba(45, 212, 191, 0.32) 44%, rgba(13, 148, 136, 0.14) 100%);
}

.pipeline-pulse-node-finish {
    border-color: rgba(103, 232, 229, 0.62);
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24) 0 14%, rgba(24, 196, 199, 0.38) 44%, rgba(7, 52, 86, 0.18) 100%);
}

.pipeline-pulse-connector {
    position: relative;
    height: 2px;
    margin-top: 23px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.24), rgba(45, 212, 191, 0.88));
}

.pipeline-pulse-connector::after {
    position: absolute;
    top: -3px;
    right: -1px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #5eead4;
    content: "";
}

.pipeline-pulse-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pipeline-pulse-metric {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
}

.pipeline-pulse-metric span {
    color: rgba(191, 219, 254, 0.78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.pipeline-pulse-metric strong {
    overflow: hidden;
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(20px, 2.1vw, 27px);
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-pulse-caption {
    padding-top: 13px;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
    color: rgba(226, 232, 240, 0.74);
    font-size: 11px;
    line-height: 1.55;
}

.pipeline-pulse-caption > span {
    margin-right: 8px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 560px) {
    .pipeline-pulse-flow {
        grid-template-columns: repeat(4, minmax(54px, 1fr));
    }

    .pipeline-pulse-connector {
        display: none;
    }
}

.hero-panel-logo-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 72px;
}

.hero-panel-logo {
    display: block;
    max-width: 100%;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(7, 26, 61, 0.24));
}

.card-copy,
.section-copy,
.module-copy {
    color: var(--text-700);
    line-height: 1.68;
}

.card-copy {
    margin-top: 10px;
}

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

.section-copy {
    max-width: 450px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.main-menu-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.launcher-module-groups {
    display: grid;
    gap: 22px;
    width: 100%;
    margin-top: 30px;
}

.launcher-module-group {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(107, 114, 128, 0.18);
}

.launcher-module-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.launcher-module-group-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.launcher-module-group-heading > span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 10px;
    background: rgba(24, 196, 199, 0.12);
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
}

.launcher-module-group-heading > span svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.launcher-module-group-heading strong,
.launcher-module-group-heading small {
    display: block;
}

.launcher-module-group-heading strong {
    color: var(--text-900);
    font-size: 15px;
}

.launcher-module-group-heading small {
    margin-top: 2px;
    color: var(--text-700);
    font-size: 12px;
}

.launcher-module-group-attention .launcher-module-group-heading > span {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.module-quick-copy,
.module-quick-copy strong,
.module-quick-copy small {
    display: block;
}

.module-quick-copy small {
    margin-top: 3px;
    color: var(--text-700);
    font-size: 11px;
    font-weight: 700;
}

.module-quick-link-alert {
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.92));
    box-shadow: 0 9px 22px rgba(180, 83, 9, 0.1);
}

.module-quick-link-alert .module-quick-icon {
    background: rgba(245, 158, 11, 0.15);
    stroke: #b45309;
}

.module-quick-link-alert .module-quick-copy small {
    color: #92400e;
}

.module-quick-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-900);
    box-shadow: 0 7px 18px rgba(15, 35, 48, 0.06);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-quick-link:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 196, 199, 0.38);
    box-shadow: 0 12px 24px rgba(15, 35, 48, 0.1);
}

.module-quick-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    padding: 8px;
    border-radius: 13px;
    background: rgba(24, 196, 199, 0.11);
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    box-sizing: content-box;
}

.module-quick-link-primary {
    border-color: rgba(24, 196, 199, 0.35);
    background: linear-gradient(135deg, rgba(24, 196, 199, 0.98), rgba(7, 52, 86, 0.98));
    color: #ffffff;
}

.module-quick-link-primary .module-quick-icon {
    background: rgba(255, 255, 255, 0.16);
    stroke: #ffffff;
}

@media (max-width: 840px) {
    .main-menu-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .launcher-utility-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .launcher-utility-nav .nav-link {
        width: auto;
        flex: 1 1 calc(50% - 8px);
    }

    .main-menu-quick-grid {
        grid-template-columns: 1fr;
    }
}

.btn,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 32px rgba(24, 196, 199, 0.24);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn {
    width: 100%;
    margin-top: 22px;
}

.btn:hover,
.button-link:hover,
.launcher-button:hover {
    transform: translateY(-2px);
}

.btn:hover,
.button-link:hover {
    filter: brightness(1.03);
}

.btn-secondary,
.button-link-secondary {
    border-color: var(--border-strong);
    background: var(--panel-strong);
    box-shadow: none;
    color: var(--text-900);
}

.button-link-success {
    border-color: #15803d;
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 18px 32px rgba(22, 163, 74, 0.24);
    color: #ffffff;
}

.input {
    width: 100%;
    min-height: 54px;
    padding: 15px 16px;
    border: 1px solid rgba(107, 114, 128, 0.34);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--text-900);
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: rgba(24, 196, 199, 0.52);
    box-shadow: 0 0 0 4px rgba(24, 196, 199, 0.12);
    transform: translateY(-1px);
}

.input-multiline {
    min-height: 138px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.currency-input {
    text-align: right;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
}

.message {
    display: block;
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(24, 196, 199, 0.10);
    color: #18C4C7;
    font-size: 14px;
    line-height: 1.6;
}

.message:empty {
    display: none;
}

.message-success {
    border-color: rgba(22, 163, 74, 0.20);
    background: rgba(22, 163, 74, 0.10);
    color: #166534;
}

.message-error {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(220, 38, 38, 0.10);
    color: #991b1b;
}

.message-warning {
    border-color: rgba(245, 158, 11, 0.34);
    color: #92400e;
    background: rgba(254, 243, 199, 0.86);
}

.table-link.is-busy,
.btn.is-busy {
    cursor: wait;
    opacity: 0.68;
    pointer-events: none;
}

.table-link.is-busy::after,
.btn.is-busy::after {
    display: inline-block;
    width: 0.72em;
    height: 0.72em;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    vertical-align: -0.08em;
    animation: cpm-ajax-spin 650ms linear infinite;
}

[data-closeout-task-id] {
    transition: background-color 180ms ease;
}

[data-closeout-task-id].is-finished {
    background: rgba(22, 163, 74, 0.035);
}

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

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-grid {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
    gap: 28px;
    align-items: stretch;
}

.signal-marker,
.helper-marker {
    display: grid;
    place-items: center;
    font-weight: 900;
}

.login-grid-focused {
    width: min(520px, 100%);
    grid-template-columns: minmax(0, 1fr);
}

.login-card {
    align-self: center;
    padding: 34px;
    background: rgba(255, 255, 255, 0.95);
}

.login-card-focused {
    width: 100%;
    padding: 38px;
    border-color: rgba(103, 227, 229, 0.34);
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(7, 26, 61, 0.42);
}

.login-card-focused .cpmcore-login-logo-frame {
    width: 100%;
    height: 118px;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(7, 26, 61, 0.14);
}

.login-logo-link {
    display: block;
    width: 100%;
    border-radius: 18px;
    text-decoration: none;
}

.login-logo-link:focus-visible {
    outline: 3px solid #27d6d9;
    outline-offset: 4px;
}

.login-logo-link:hover .cpmcore-login-logo-frame {
    border-color: rgba(39, 214, 217, 0.78);
    box-shadow: 0 18px 40px rgba(7, 26, 61, 0.2);
}

.login-heading {
    margin-top: 30px;
}

.login-card h1 {
    font-size: clamp(32px, 4vw, 42px);
}

.login-form {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-card-focused .btn {
    width: 100%;
    margin-top: 4px;
}

.login-access-note {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-500);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.login-landing-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 16px auto 0;
    color: #087f83;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.login-landing-link:hover {
    color: #075c60;
    text-decoration: underline;
}

.login-landing-link:focus-visible {
    outline: 3px solid rgba(39, 214, 217, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

.login-form-row,
.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    margin-bottom: 18px;
}

.form-subhead {
    margin: 4px 0 16px;
    color: var(--text-900);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.field-label,
.form-row label {
    color: var(--text-500);
}

.form-row label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.input-hint {
    margin-top: 8px;
    color: var(--text-500);
    font-size: 13px;
    line-height: 1.58;
}

.input-hint-emphasis {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(24, 196, 199, 0.24);
    background: rgba(24, 196, 199, 0.06);
    color: #18C4C7;
}

.insight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.insight-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.insight-card-primary {
    background: linear-gradient(145deg, rgba(24, 196, 199, 0.12), rgba(255, 255, 255, 0.96));
}

.metric-title {
    color: var(--text-500);
}

.metric-value {
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.06em;
    color: var(--text-900);
}

.metric-value.is-text {
    font-size: clamp(22px, 3vw, 28px);
    letter-spacing: -0.04em;
}

.module-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.metric-value-workflow {
    letter-spacing: 0;
}

.module-workflow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 6px;
}

.module-workflow-scene {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.module-workflow-scene::before,
.module-workflow-scene::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.module-workflow-scene::before {
    inset: 1px;
    background: radial-gradient(circle at 35% 28%, #ffffff 0 18%, rgba(24, 196, 199, 0.18) 42%, rgba(24, 196, 199, 0.08) 100%);
    border: 1px solid rgba(24, 196, 199, 0.34);
    box-shadow: 0 4px 10px rgba(15, 35, 48, 0.08);
}

.module-workflow-scene::after {
    right: 2px;
    bottom: 2px;
    width: 5px;
    height: 5px;
    background: var(--brand);
    box-shadow: 0 0 0 2px #ffffff;
}

.module-workflow-graphic {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.module-workflow-arrow {
    color: var(--brand);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.coverage-graphic {
    display: flex;
    align-items: center;
    min-height: 56px;
}

.coverage-scene,
.alignment-node {
    display: inline-flex;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(24, 196, 199, 0.34);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #ffffff 0 16%, rgba(24, 196, 199, 0.2) 44%, rgba(24, 196, 199, 0.08) 100%);
    box-shadow: 0 5px 12px rgba(15, 35, 48, 0.08);
}

.coverage-scene svg,
.alignment-node svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.coverage-connector {
    height: 2px;
    min-width: 7px;
    flex: 1 1 18px;
    background: linear-gradient(90deg, rgba(24, 196, 199, 0.3), var(--brand), rgba(24, 196, 199, 0.3));
}

.coverage-scene:nth-of-type(4n + 3) {
    transform: translateY(5px);
}

.alignment-graphic {
    position: relative;
    width: min(100%, 250px);
    height: 76px;
}

.alignment-track {
    position: absolute;
    top: 25px;
    left: 19px;
    right: 19px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(24, 196, 199, 0.28), var(--brand), rgba(24, 196, 199, 0.28));
}

.alignment-track::after {
    position: absolute;
    top: -4px;
    right: -1px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--brand);
    content: "";
}

.alignment-node {
    position: absolute;
    top: 7px;
}

.alignment-node-start {
    left: 0;
}

.alignment-node-middle {
    left: calc(50% - 19px);
}

.alignment-node-end {
    right: 0;
}

.alignment-branch {
    position: absolute;
    top: 27px;
    left: 50%;
    width: 34%;
    height: 29px;
    border-left: 2px solid rgba(24, 196, 199, 0.55);
    border-bottom: 2px solid rgba(24, 196, 199, 0.55);
    border-radius: 0 0 0 12px;
}

.alignment-node-branch {
    top: 38px;
    right: 0;
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    background: radial-gradient(circle at 35% 28%, #ffffff 0 16%, rgba(249, 180, 45, 0.2) 44%, rgba(249, 180, 45, 0.08) 100%);
    border-color: rgba(249, 180, 45, 0.45);
}

.alignment-node-branch svg {
    width: 18px;
    height: 18px;
    stroke: #c27a00;
}

.metric-note {
    color: var(--text-700);
    line-height: 1.62;
}

.metric-foot {
    margin-top: auto;
    padding-top: 4px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.95fr);
    gap: 24px;
    align-items: start;
}

.section-card,
.form-card {
    padding: 28px;
}

.stage-grid {
    display: grid;
    gap: 16px;
}

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

.stage-card,
.mini-stat {
    padding: 20px;
    background: var(--panel-muted);
    box-shadow: var(--shadow-md);
}

.stage-count {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(24, 196, 199, 0.18), rgba(24, 196, 199, 0.08));
    color: var(--brand-strong);
    font-weight: 900;
}

.stage-copy {
    margin-top: 10px;
    color: var(--text-700);
    line-height: 1.65;
}

.signal-list,
.helper-list {
    display: grid;
    gap: 12px;
}

.helper-list-spaced {
    margin-top: 18px;
}

.signal-item,
.helper-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
}

.signal-marker,
.helper-marker {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.signal-item strong,
.helper-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-900);
    letter-spacing: -0.02em;
}

.signal-item span,
.helper-item span {
    color: var(--text-700);
    line-height: 1.62;
}

.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-stat-label {
    color: var(--text-500);
}

.mini-stat-value {
    margin-top: 10px;
    color: var(--text-900);
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.mini-stat-copy {
    margin-top: 6px;
    color: var(--text-700);
    font-size: 14px;
    line-height: 1.56;
}

.launcher-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.launcher-item {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 22px;
}

.launcher-item-primary {
    background: linear-gradient(145deg, rgba(24, 196, 199, 0.14), rgba(255, 255, 255, 0.98));
    border-color: rgba(24, 196, 199, 0.24);
}

.launcher-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-height: 140px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(107, 114, 128, 0.28);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 14px 28px rgba(7, 26, 61, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.launcher-button:hover {
    filter: brightness(1.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 18px 32px rgba(7, 26, 61, 0.12);
}

.launcher-button-live {
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(165deg, var(--brand) 0%, var(--brand-strong) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 18px 34px rgba(24, 196, 199, 0.24);
    color: #ffffff;
}

.launcher-button-label {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.launcher-button-subtitle {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-menu-page .launcher-button-subtitle {
    display: none;
}

.launcher-button-live .launcher-button-subtitle {
    color: rgba(207, 250, 254, 0.94);
}

.launcher-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.launcher-button-live .launcher-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #ecfeff;
}

.launcher-details {
    min-width: 0;
}

.module-kicker {
    color: var(--brand);
}

.module-title {
    color: var(--text-900);
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.04;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(107, 114, 128, 0.24);
    background: rgba(241, 245, 249, 0.92);
    color: var(--text-700);
    font-size: 12px;
    font-weight: 700;
}

.launcher-item-primary .tag {
    border-color: rgba(24, 196, 199, 0.20);
    background: rgba(236, 254, 255, 0.90);
    color: #075c60;
}

.form-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.scroll-target {
    scroll-margin-top: 112px;
}

.selection-toolbar {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    align-items: stretch;
}

.selection-field {
    min-width: 0;
    margin-bottom: 0;
}

.selection-toolbar .input {
    min-width: 0;
    max-width: 100%;
}

.selection-toolbar select.input,
.selection-toolbar input[type="date"].input {
    height: 54px;
}

.sales-filter-date-editor {
    position: relative;
    display: flex;
    min-width: 0;
}

.sales-filter-date-editor > .input {
    height: 54px;
    padding-right: 52px;
}

.sales-filter-date-picker-button {
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    display: grid;
    width: 46px;
    place-items: center;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(24, 196, 199, 0.22);
    border-radius: 0 9px 9px 0;
    background: transparent;
    color: #173c4b;
    cursor: pointer;
    font-size: 19px;
}

.sales-filter-date-picker-button:hover,
.sales-filter-date-picker-button:focus-visible {
    background: #ecfeff;
    box-shadow: inset 0 0 0 2px rgba(15, 148, 151, 0.28);
    outline: none;
}

.sales-filter-date-picker-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sales-filter-date-picker-input {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0.01;
    pointer-events: none;
}

.funnel-filter-card > summary {
    list-style: none;
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

.funnel-filter-card > summary::-webkit-details-marker {
    display: none;
}

.funnel-filter-card > summary:focus-visible {
    outline: 3px solid rgba(24, 196, 199, 0.32);
    outline-offset: 6px;
    border-radius: 10px;
}

.funnel-filter-card[open] > .funnel-filter-summary {
    margin-bottom: 18px;
}

.funnel-filter-toggle::after {
    content: "Show filters";
}

.funnel-filter-card[open] .funnel-filter-toggle::after {
    content: "Hide filters";
}

.funnel-filter-body {
    border-top: 1px solid rgba(107, 114, 128, 0.16);
    padding-top: 18px;
}

.toolbar-note {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
    color: var(--text-700);
    line-height: 1.62;
}

.summary-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.summary-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.mini-stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.mini-stat-link:hover,
.mini-stat-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(24, 196, 199, 0.38);
    box-shadow: var(--shadow-lg);
}

.weekly-billable-picker {
    margin-top: 14px;
}

.weekly-schedule-picker {
    min-width: min(100%, 310px);
}

.weekly-schedule-picker-controls {
    display: grid;
    grid-template-columns: 38px minmax(160px, 1fr) 38px;
    align-items: center;
    gap: 8px;
}

.sunday-week-picker {
    position: relative;
    min-width: 0;
}

.sunday-week-toggle {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.sunday-week-chevron {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.sunday-week-popup {
    position: absolute;
    z-index: 80;
    top: calc(100% + 9px);
    left: 50%;
    width: min(430px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid rgba(57, 83, 105, 0.2);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 22px 52px rgba(16, 34, 57, 0.22);
    transform: translateX(-50%);
}

.sunday-week-value,
.sunday-week-popup[hidden],
.sunday-week-postback {
    display: none !important;
}

.sunday-week-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.sunday-week-popup-header strong {
    color: var(--text-900);
    font-size: 1rem;
}

.sunday-week-popup-header > div {
    display: flex;
    gap: 6px;
}

.sunday-week-popup-header button,
.sunday-week-today {
    border: 0;
    background: transparent;
    color: #0f766e;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sunday-week-popup-header button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 18px;
}

.sunday-week-popup-header button:hover,
.sunday-week-popup-header button:focus-visible,
.sunday-week-today:hover,
.sunday-week-today:focus-visible {
    background: rgba(20, 184, 166, 0.1);
}

.sunday-week-headings,
.sunday-week-row {
    display: grid;
    grid-template-columns: 52px repeat(7, minmax(34px, 1fr));
    align-items: center;
    text-align: center;
}

.sunday-week-headings {
    padding: 0 5px 8px;
    color: var(--text-500);
    font-size: 0.72rem;
    font-weight: 800;
}

.sunday-week-grid {
    display: grid;
    gap: 4px;
}

.sunday-week-row {
    width: 100%;
    min-height: 39px;
    padding: 0 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-900);
    cursor: pointer;
    font: inherit;
}

.sunday-week-row:hover,
.sunday-week-row:focus-visible {
    border-color: rgba(15, 118, 110, 0.3);
    background: rgba(20, 184, 166, 0.08);
    outline: none;
}

.sunday-week-row.is-selected {
    border-color: #0b2147;
    background: #0b2147;
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(11, 33, 71, 0.18);
}

.sunday-week-number {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(107, 114, 128, 0.24);
    font-weight: 850;
}

.sunday-week-row.is-selected .sunday-week-number {
    border-right-color: rgba(255, 255, 255, 0.35);
}

.sunday-week-row .is-outside-month {
    opacity: 0.42;
}

.sunday-week-row .is-today {
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.sunday-week-today {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 9px;
}

.week-step-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(15, 118, 110, 0.24);
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.08);
    color: #0f766e;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}

.week-step-button:hover,
.week-step-button:focus-visible {
    border-color: rgba(15, 118, 110, 0.42);
    background: rgba(20, 184, 166, 0.15);
}

.weekly-schedule-picker > small {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 700;
}

.weekly-billable-picker label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-700);
    font-size: 0.78rem;
    font-weight: 700;
}

.weekly-billable-picker .input {
    width: 100%;
}

.seasonality-page-shell {
    max-width: 1720px;
}

.seasonality-control-card {
    overflow: hidden;
}

@media (min-width: 901px) {
    .seasonality-control-card.collapsible-search-card > .section-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 24px;
    }

    .seasonality-control-card.collapsible-search-card > .section-heading > :first-child {
        min-width: 0;
        justify-self: start;
    }

    .seasonality-control-card.collapsible-search-card > .section-heading > .toolbar-pill {
        justify-self: center;
    }

    .seasonality-control-card.collapsible-search-card > .section-heading > .collapsible-card-toggle {
        justify-self: end;
    }
}

.seasonality-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.seasonality-control-grid .form-row {
    margin-bottom: 0;
}

.seasonality-target-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.72);
}

.seasonality-target-grid .form-row {
    margin-bottom: 0;
}

.seasonality-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.seasonality-analysis-card {
    overflow: hidden;
}

.seasonality-data-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.seasonality-entry-panel {
    padding: 20px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.74);
}

.seasonality-entry-panel-wide {
    grid-column: 1 / -1;
}

.seasonality-grid-instructions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.72);
}

.seasonality-grid-instructions strong {
    display: block;
    margin-top: 5px;
    color: var(--text-900);
}

.seasonality-entry-panel h3 {
    margin: 7px 0 8px;
    color: var(--text-900);
    font-size: 1.15rem;
}

.seasonality-manual-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.seasonality-manual-entry-grid .form-row {
    margin-bottom: 0;
}

.seasonality-table-shell {
    margin-top: 22px;
    overflow-x: auto;
    border: 1px solid rgba(107, 114, 128, 0.26);
    border-radius: 18px;
    background: #fff;
    scrollbar-color: rgba(37, 99, 235, 0.38) rgba(226, 232, 240, 0.65);
}

.seasonality-table {
    width: 100%;
    min-width: 1520px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-900);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.seasonality-table th,
.seasonality-table td {
    min-width: 92px;
    padding: 12px 10px;
    border-right: 1px solid rgba(107, 114, 128, 0.22);
    border-bottom: 1px solid rgba(107, 114, 128, 0.22);
    text-align: right;
    white-space: nowrap;
}

.seasonality-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #071A3D;
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.seasonality-table th:first-child,
.seasonality-table td:first-child {
    min-width: 210px;
    text-align: left;
}

.seasonality-table .seasonality-sticky-column {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f8fafc;
    box-shadow: 8px 0 18px rgba(7, 26, 61, 0.06);
}

.seasonality-table thead .seasonality-sticky-column {
    z-index: 3;
    background: #071A3D;
}

.seasonality-table tbody tr:last-child th,
.seasonality-table tbody tr:last-child td {
    border-bottom: 0;
}

.seasonality-history-edit-cell {
    padding: 5px !important;
    background: #fffbeb;
}

.seasonality-history-input {
    width: 100%;
    min-width: 90px;
    box-sizing: border-box;
    padding: 8px 7px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text-900);
    font: inherit;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.seasonality-history-input:hover {
    border-color: rgba(202, 138, 4, 0.32);
    background: #fff;
}

.seasonality-history-input:focus,
.seasonality-history-input.is-edited {
    border-color: #ca8a04;
    outline: 3px solid rgba(250, 204, 21, 0.2);
    background: #fff;
}

.seasonality-history-input.input-error {
    border-color: #dc2626;
    outline-color: rgba(220, 38, 38, 0.16);
}

.seasonality-grid-save-actions {
    margin-top: 16px;
}

.seasonality-autosave-trigger {
    display: none;
}

.seasonality-table td.is-negative,
.seasonality-history-input.is-negative {
    color: #b91c1c;
}

.seasonality-total-row th,
.seasonality-total-row td {
    background: #e8eef5;
    font-weight: 800;
}

.seasonality-percent-row th,
.seasonality-percent-row td {
    background: #f1f5f9;
    color: #334155;
    font-weight: 750;
}

.seasonality-average-row th,
.seasonality-average-row td {
    background: #eaf4d3;
    color: #365314;
    font-weight: 800;
}

.seasonality-forecast-row th,
.seasonality-forecast-row td {
    background: #dcfce7;
    color: #166534;
    font-weight: 850;
}

.seasonality-actual-row th,
.seasonality-actual-row td {
    background: #fef9c3;
}

.seasonality-variance-row th,
.seasonality-variance-row td {
    background: #eff6ff;
    font-weight: 800;
}

.seasonality-trend-table td {
    color: #64748b;
    text-align: center;
}

.seasonality-trend-table td.is-actual {
    background: #fef08a;
    color: #854d0e;
    font-weight: 800;
}

.seasonality-trend-table td.is-closed {
    background: #e2e8f0;
    color: #64748b;
}

.seasonality-weekly-table {
    min-width: 1760px;
}

.seasonality-weekly-table .seasonality-week-row th {
    background: #071A3D;
    color: #fff;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-align: center;
}

.seasonality-weekly-table .seasonality-week-row .seasonality-sticky-column {
    text-align: left;
}

.seasonality-seasonal-ar-row th,
.seasonality-seasonal-ar-row td {
    background: #eef5df;
    color: #365314;
    font-weight: 800;
}

.seasonality-override-row th,
.seasonality-override-row td {
    background: #fef08a;
}

.seasonality-effective-row th,
.seasonality-effective-row td {
    background: #dcfce7;
    color: #166534;
    font-weight: 850;
}

.seasonality-override-input {
    width: 112px;
    padding: 8px 9px;
    border: 1px solid rgba(133, 77, 14, 0.24);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.86);
    color: #713f12;
    font: inherit;
    text-align: right;
}

.seasonality-override-input:focus {
    border-color: #ca8a04;
    outline: 3px solid rgba(250, 204, 21, 0.22);
}

.seasonality-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
    color: var(--text-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.seasonality-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid rgba(7, 26, 61, 0.12);
}

.legend-actual {
    background: #fef08a;
}

.legend-closed {
    background: #e2e8f0;
}

.legend-forecast {
    background: #fff;
}

.alternative-bids-editor {
    gap: 10px;
}

.alternative-bids-list {
    display: grid;
    gap: 10px;
}

.alternative-bid-row {
    display: grid;
    grid-template-columns: minmax(105px, auto) minmax(150px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.alternative-bid-label {
    font-weight: 700;
}

.alternative-bid-accepted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.alternative-bid-add {
    justify-self: start;
}

@media (max-width: 720px) {
    .alternative-bid-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.table-toolbar.proposal-register-toolbar {
    display: grid;
    flex: 1 1 760px;
    grid-template-columns: max-content max-content max-content minmax(0, 1fr) max-content;
    align-items: center;
    justify-content: flex-start;
}

.proposal-register-toolbar .proposal-register-search {
    width: 100%;
    max-width: none;
    grid-column: 1 / -2;
    grid-row: 2;
}

.proposal-register-toolbar > .toolbar-pill:last-child {
    grid-column: -2 / -1;
    grid-row: 2;
    justify-self: end;
}

@media (max-width: 900px) {
    .table-toolbar.proposal-register-toolbar {
        display: flex;
        width: 100%;
        flex-basis: auto;
    }

    .proposal-register-toolbar .proposal-register-search {
        flex: 1 1 calc(100% - 130px);
    }
}

.register-layout-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.94);
}

.register-layout-link {
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
}

.register-layout-link:hover {
    color: var(--brand-strong);
    background: rgba(255, 255, 255, 0.88);
}

.register-layout-link.is-active {
    color: #fff;
    background: var(--brand-strong);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.2);
}

.proposal-register-search {
    position: relative;
    flex: 1 1 360px;
    min-width: min(100%, 280px);
    max-width: 560px;
}

.proposal-register-search-input {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px 14px 66px;
    border: 1px solid rgba(107, 114, 128, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-900);
    font-size: 16px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.proposal-register-search-input::placeholder {
    color: var(--text-500);
    font-weight: 500;
}

.proposal-register-search-input:focus {
    outline: none;
    border-color: rgba(24, 196, 199, 0.42);
    box-shadow: 0 0 0 4px rgba(24, 196, 199, 0.10);
}

.proposal-register-search-icon {
    position: absolute;
    top: 50%;
    left: 24px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(71, 85, 105, 0.9);
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
}

.proposal-register-search-icon::after {
    content: "";
    position: absolute;
    right: -8px;
    bottom: -4px;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.9);
    transform: rotate(45deg);
    transform-origin: center;
}

.form-actions .btn {
    width: auto;
    min-width: 220px;
    margin-top: 0;
}

.sales-opportunity-actions {
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) minmax(160px, 1fr) minmax(120px, 0.75fr);
    align-items: stretch;
}

.sales-opportunity-actions .btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .sales-opportunity-actions {
        grid-template-columns: 1fr;
    }
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow: 0 18px 32px rgba(153, 27, 27, 0.24);
}

.form-sidebar {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.94) 0%, rgba(239, 246, 255, 0.92) 100%);
}

#related-job-schedule .helper-item {
    align-items: flex-start;
}

.related-schedule-item-content {
    flex: 1 1 auto;
    min-width: 0;
}

.schedule-equipment-quick-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 7px;
}

.schedule-equipment-search-wrap {
    min-width: 0;
}

.schedule-equipment-search-wrap > .input {
    width: 100%;
}

.schedule-equipment-quick-add > .button-link {
    min-height: 48px;
    white-space: nowrap;
}

.schedule-equipment-quick-add + .input-hint {
    margin-bottom: 10px;
}

.schedule-equipment-add-status {
    min-height: 20px;
    margin-top: 6px;
    color: #087f5b;
    font-size: 12px;
    font-weight: 750;
}

.schedule-equipment-add-status.is-error {
    color: #b42318;
}

@media (max-width: 640px) {
    .schedule-equipment-quick-add {
        grid-template-columns: 1fr;
    }
}

#related-job-schedule .related-schedule-date {
    display: block;
    margin-top: 2px;
}

.related-schedule-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin-top: 4px;
}

#related-job-schedule .related-schedule-separator {
    color: var(--text-500);
    line-height: 1;
}

#related-job-schedule .related-schedule-overlap {
    margin-top: 10px;
    line-height: 1.2;
}

@media (max-width: 520px) {
    #related-job-schedule .helper-item {
        gap: 12px;
        padding: 15px;
    }

    #related-job-schedule .helper-marker {
        width: 34px;
        height: 34px;
    }

    .related-schedule-meta {
        display: grid;
        gap: 0;
    }

    #related-job-schedule .related-schedule-separator {
        display: none;
    }
}

.company-users-layout {
    grid-template-columns: minmax(0, 2.35fr) minmax(280px, 0.65fr);
    align-items: stretch;
}

.user-roster-card {
    min-width: 0;
}

.role-guide-card {
    height: 100%;
}

.user-roster-toolbar {
    display: grid;
    flex: 0 1 560px;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
}

.user-roster-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.user-roster-actions > * {
    white-space: nowrap;
}

.user-roster-search {
    position: relative;
    width: 100%;
    min-width: 190px;
}

.user-roster-search .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.user-roster-search-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 43px;
    border: 1px solid rgba(107, 114, 128, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-900);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.user-roster-search-input:focus {
    outline: none;
    border-color: rgba(24, 196, 199, 0.52);
    box-shadow: 0 0 0 4px rgba(24, 196, 199, 0.10);
}

.user-roster-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 13px;
    height: 13px;
    border: 2px solid var(--text-500);
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
}

.user-roster-search-icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--text-500);
    transform: rotate(45deg);
}

.user-roster-sort {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.user-roster-sort:hover,
.user-roster-sort:focus-visible {
    color: var(--brand-strong);
}

.user-roster-sort:focus-visible {
    outline: 2px solid rgba(24, 196, 199, 0.52);
    outline-offset: 4px;
    border-radius: 2px;
}

.user-roster-sort-indicator::before {
    content: "\2195";
    font-size: 13px;
    letter-spacing: 0;
    opacity: 0.48;
}

.user-roster-table th[aria-sort="ascending"] .user-roster-sort-indicator::before {
    content: "\2191";
    opacity: 1;
}

.user-roster-table th[aria-sort="descending"] .user-roster-sort-indicator::before {
    content: "\2193";
    opacity: 1;
}

.user-roster-no-results td {
    padding: 34px 18px;
    color: var(--text-500);
    font-weight: 700;
    text-align: center;
}

@media (max-width: 900px) {
    .user-roster-card > .section-heading {
        flex-direction: column;
    }

    .user-roster-toolbar {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 520px) {
    .user-roster-actions {
        gap: 6px;
    }

    .user-roster-actions .button-link,
    .user-roster-actions .toolbar-pill {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 0;
        padding: 9px 8px;
        font-size: 10px;
        text-align: center;
    }
}

.company-branding-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 32px;
    align-items: start;
}

.company-branding-controls {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(107, 114, 128, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
}

.branding-preview-shell {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.branding-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 22px;
    border-radius: 22px;
    border: 1px dashed rgba(107, 114, 128, 0.28);
    background:
        linear-gradient(45deg, rgba(226, 232, 240, 0.68) 25%, transparent 25%, transparent 75%, rgba(226, 232, 240, 0.68) 75%, rgba(226, 232, 240, 0.68)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.94) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.94) 75%, rgba(255, 255, 255, 0.94));
    background-position: 0 0, 12px 12px;
    background-size: 24px 24px;
}

.branding-preview-image {
    display: block;
    max-width: 100%;
    max-height: 112px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(7, 26, 61, 0.18));
}

.branding-preview-note {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.branding-inline-message {
    margin-top: 0;
}

.branding-actions {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.branding-actions .btn {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1050px) {
    .company-users-layout,
    .company-branding-grid {
        grid-template-columns: 1fr;
    }
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 40;
    padding: 24px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 26, 61, 0.52);
    backdrop-filter: blur(10px);
}

.modal-frame {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-card {
    width: min(720px, 100%);
    margin: 0;
    max-height: calc(100vh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 34px 80px rgba(7, 26, 61, 0.26);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -28px -28px 18px;
    padding: 28px 28px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.96) 84%, rgba(255, 255, 255, 0.86) 100%);
}

.modal-close {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-700);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-900);
    transform: translateY(-1px);
}

.modal-card .message {
    margin-top: 18px;
}

.modal-card .role-checklist {
    max-height: none;
    overflow: visible;
}

.modal-actions {
    margin-top: 24px;
}

hr {
    border: 0;
    border-top: 1px solid rgba(107, 114, 128, 0.20);
    margin: 26px 0;
}

.dashboard-command {
    padding: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 249, 255, 0.93) 100%);
}

.dashboard-command-top {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.dashboard-subcopy {
    max-width: 780px;
    margin-top: 14px;
    color: var(--text-700);
    font-size: 17px;
    line-height: 1.72;
}

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

.dashboard-summary-card,
.dashboard-mini-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(107, 114, 128, 0.18);
}

.dashboard-summary-card {
    padding: 22px;
    background: linear-gradient(160deg, rgba(7, 26, 61, 0.96) 0%, rgba(14, 40, 68, 0.95) 58%, rgba(10, 78, 133, 0.92) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dashboard-summary-card::before,
.dashboard-mini-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
}

.dashboard-summary-value,
.dashboard-mini-value,
.bucket-value,
.currency-cell {
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
}

.dashboard-summary-value {
    margin-top: 8px;
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.dashboard-summary-copy {
    margin-top: 12px;
    color: rgba(226, 232, 240, 0.84);
    line-height: 1.65;
}

.dashboard-context-grid {
    max-width: 520px;
    margin-top: 22px;
}

.dashboard-coverage-card {
    display: grid;
    gap: 12px;
}

.dashboard-coverage-heading {
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.dashboard-coverage-copy {
    color: rgba(226, 232, 240, 0.78);
    font-size: 12px;
    line-height: 1.5;
}

.dashboard-coverage-list {
    display: grid;
    gap: 12px;
    margin-top: 2px;
}

.dashboard-coverage-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 6px 12px;
    align-items: end;
}

.dashboard-coverage-row-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    grid-column: 1 / -1;
}

.dashboard-coverage-row-heading strong {
    color: #ffffff;
    font-size: 12px;
}

.dashboard-coverage-row-heading span {
    color: rgba(226, 232, 240, 0.68);
    font-size: 10px;
    text-align: right;
}

.dashboard-coverage-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.dashboard-coverage-bar span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #67e8f9);
}

.dashboard-coverage-percent {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.dashboard-coverage-row-alert .dashboard-coverage-bar span {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dashboard-coverage-row-alert .dashboard-coverage-percent {
    color: #fde68a;
}

.dashboard-coverage-footer {
    display: grid;
    gap: 3px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-coverage-footer strong {
    color: #67e8f9;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-coverage-footer span {
    color: rgba(226, 232, 240, 0.7);
    font-size: 10px;
    line-height: 1.45;
}

.procurement-mix-card {
    display: grid;
    gap: 13px;
}

.procurement-mix-heading {
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.procurement-mix-copy,
.procurement-mix-empty {
    color: rgba(226, 232, 240, 0.78);
    font-size: 12px;
    line-height: 1.5;
}

.procurement-mix-list {
    display: grid;
    gap: 12px;
}

.procurement-mix-row {
    display: grid;
    gap: 6px;
}

.procurement-mix-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.procurement-mix-row-head strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.procurement-mix-row-head span {
    flex: 0 0 auto;
    color: rgba(191, 219, 254, 0.78);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.procurement-mix-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.procurement-mix-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #18c4c7, #67e8f9);
    box-shadow: 0 0 14px rgba(24, 196, 199, 0.35);
}

.procurement-mix-footer {
    display: grid;
    gap: 3px;
    padding-top: 11px;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
}

.procurement-mix-footer strong {
    color: #67e8f9;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.procurement-mix-footer span {
    color: rgba(226, 232, 240, 0.68);
    font-size: 10px;
    line-height: 1.45;
}

.team-load-card {
    display: grid;
    gap: 13px;
}

.team-load-heading {
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.team-load-copy,
.team-load-empty {
    color: rgba(226, 232, 240, 0.78);
    font-size: 12px;
    line-height: 1.5;
}

.team-load-list {
    display: grid;
    gap: 12px;
}

.team-load-row {
    display: grid;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.team-load-row.is-unassigned,
.team-load-row.has-conflict {
    border-color: rgba(253, 230, 138, 0.24);
    background: rgba(245, 158, 11, 0.08);
}

.team-load-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.team-load-row-head strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-load-row-head span {
    flex: 0 0 auto;
    color: rgba(191, 219, 254, 0.78);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.team-load-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.team-load-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #18c4c7, #67e8f9);
    box-shadow: 0 0 14px rgba(24, 196, 199, 0.35);
}

.team-load-row.is-unassigned .team-load-fill,
.team-load-row.has-conflict .team-load-fill {
    background: linear-gradient(90deg, #f59e0b, #fde68a);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

.team-load-alert {
    min-height: 0;
    color: #fde68a;
    font-size: 10px;
    font-weight: 700;
}

.team-load-alert:empty {
    display: none;
}

.team-load-footer {
    display: grid;
    gap: 3px;
    padding-top: 11px;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
}

.team-load-footer strong {
    color: #67e8f9;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.team-load-footer span {
    color: rgba(226, 232, 240, 0.68);
    font-size: 10px;
    line-height: 1.45;
}

.billing-readiness-card {
    display: grid;
    gap: 13px;
}

.billing-readiness-heading {
    color: #ffffff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.billing-readiness-copy,
.billing-readiness-empty {
    color: rgba(226, 232, 240, 0.78);
    font-size: 12px;
    line-height: 1.5;
}

.billing-readiness-list {
    display: grid;
    gap: 12px;
}

.billing-readiness-row {
    display: grid;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.billing-readiness-row.is-attention {
    border-color: rgba(253, 230, 138, 0.24);
    background: rgba(245, 158, 11, 0.08);
}

.billing-readiness-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.billing-readiness-row-head strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-readiness-row-head span {
    flex: 0 0 auto;
    color: rgba(191, 219, 254, 0.78);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.billing-readiness-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.billing-readiness-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #18c4c7, #67e8f9);
    box-shadow: 0 0 14px rgba(24, 196, 199, 0.35);
}

.billing-readiness-row.is-attention .billing-readiness-fill {
    background: linear-gradient(90deg, #f59e0b, #fde68a);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

.billing-readiness-alert {
    min-height: 0;
    color: #fde68a;
    font-size: 10px;
    font-weight: 700;
}

.billing-readiness-alert:empty {
    display: none;
}

.billing-readiness-footer {
    display: grid;
    gap: 3px;
    padding-top: 11px;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
}

.billing-readiness-footer strong {
    color: #67e8f9;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.billing-readiness-footer span {
    color: rgba(226, 232, 240, 0.68);
    font-size: 10px;
    line-height: 1.45;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-mini-card {
    padding: 18px;
    background: rgba(248, 250, 252, 0.95);
    box-shadow: var(--shadow-md);
}

.dashboard-mini-value {
    margin-top: 8px;
    color: var(--text-900);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-filter-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.filter-chip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 74px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.20);
    background: rgba(248, 250, 252, 0.92);
    box-shadow: var(--shadow-md);
}

.filter-label {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.filter-chip strong {
    color: var(--text-900);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.filter-chip-action {
    border-color: rgba(24, 196, 199, 0.18);
    background: linear-gradient(135deg, rgba(24, 196, 199, 0.10), rgba(255, 255, 255, 0.96));
}

.wip-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.wip-metric-card {
    min-height: 210px;
}

.wip-board {
    display: grid;
    grid-template-columns: minmax(0, 1.68fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: start;
}

.section-heading-tight {
    margin-bottom: 18px;
}

.collapsible-card-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.08);
    color: #0f766e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.collapsible-card-toggle:hover {
    border-color: rgba(15, 118, 110, 0.38);
    background: rgba(20, 184, 166, 0.14);
}

.collapsible-card-toggle:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.25);
    outline-offset: 2px;
}

.collapsible-card-toggle-icon {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(225deg) translate(-1px, -1px);
    transition: transform 150ms ease;
}

.collapsible-search-card.is-collapsed .collapsible-card-toggle-icon {
    transform: rotate(45deg) translate(-1px, -1px);
}

.collapsible-search-card.is-collapsed > .section-heading {
    margin-bottom: 0;
}

.collapsible-card-body[hidden],
.collapsible-search-card [hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .collapsible-search-card > .section-heading {
        flex-wrap: wrap;
    }

    .collapsible-card-toggle {
        width: 100%;
    }
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.toolbar-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.toolbar-pill-alert {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.toolbar-pill-hotlink {
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.toolbar-pill-hotlink:hover,
.toolbar-pill-hotlink:focus-visible {
    background: rgba(24, 196, 199, 0.16);
    color: #18C4C7;
    transform: translateY(-1px);
}

.table-link {
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table-link-warning {
    color: #98540f;
}

.table-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.table-inline-stack {
    display: grid;
    gap: 10px;
    min-width: 180px;
}

.table-input {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.proposal-register-table {
    table-layout: fixed;
}

.proposal-register-table .proposal-opportunity-col {
    width: 17%;
}

.proposal-register-table .proposal-procurement-col {
    width: 10%;
}

.proposal-register-table .proposal-owner-col {
    width: 10%;
}

.proposal-register-table .proposal-bid-due-col {
    width: 7%;
}

.proposal-register-table .proposal-amount-col {
    width: 12%;
}

.proposal-register-table .proposal-estimated-col {
    width: 10%;
}

.proposal-register-table .proposal-stage-col {
    width: 14%;
}

.proposal-register-table .proposal-follow-up-col {
    width: 10%;
}

.proposal-register-table .proposal-actions-col {
    width: 10%;
}

.proposal-register-table .proposal-owner-column,
.proposal-register-table .proposal-owner-cell {
    width: 10%;
}

.proposal-register-table .proposal-owner-cell {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.proposal-register-table .proposal-stage-column,
.proposal-register-table .proposal-stage-cell {
    width: 14%;
}

.proposal-register-table .proposal-stage-cell .table-inline-stack {
    width: 100%;
    min-width: 0;
}

.proposal-register-table .proposal-stage-cell .table-input {
    width: 100%;
    min-width: 0;
}

.call-log-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
}

.call-log-toolbar > div:first-child {
    display: grid;
    gap: 4px;
    color: var(--text-700);
}

.call-log-toolbar > div:first-child strong {
    color: var(--text-900);
    font-size: 15px;
}

.call-log-toolbar > div:first-child span {
    color: var(--text-500);
    font-size: 13px;
}

.call-log-sort-field {
    min-width: 220px;
    margin: 0;
}

.call-log-sort-field label {
    font-size: 10px;
}

.call-log-shell {
    overflow-x: auto;
}

.call-log-table {
    min-width: 1040px;
    table-layout: fixed;
}

.call-log-table .call-log-customer-col { width: 17%; }
.call-log-table .call-log-location-col { width: 15%; }
.call-log-table .call-log-phone-col { width: 12%; }
.call-log-table .call-log-follow-up-col { width: 14%; }
.call-log-table .call-log-notes-col { width: 42%; }

.call-log-table td {
    vertical-align: middle;
}

.call-log-lead span,
.call-log-location {
    overflow-wrap: anywhere;
}

.call-log-phone {
    color: var(--brand-strong);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.call-log-phone:hover {
    text-decoration: underline;
}

.call-log-phone[disabled] {
    color: var(--text-500);
    font-weight: 600;
    pointer-events: none;
}

.call-log-stage {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--brand-strong);
    background: rgba(24, 196, 199, 0.11);
    font-size: 11px;
    font-weight: 800;
}

.call-log-stage-editor {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.call-log-stage-editor .table-input {
    width: 100%;
    min-width: 0;
}

.call-log-notes {
    width: 100%;
    min-height: 66px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
    resize: vertical;
}

.call-log-note-controls {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(160px, 0.8fr);
    align-items: end;
    gap: 10px;
    margin-top: 10px;
}

.call-log-follow-up-editor {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.call-log-follow-up-editor .table-input {
    width: 100%;
    min-width: 0;
}

.call-log-control-label {
    color: var(--text-500);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.call-touch-history {
    margin-top: 9px;
    border: 1px solid rgba(107, 114, 128, 0.16);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.9);
}

.call-touch-history summary {
    padding: 9px 11px;
    color: var(--brand-strong);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.call-touch-list {
    display: grid;
    max-height: 260px;
    overflow-y: auto;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.call-touch-item {
    display: grid;
    gap: 5px;
    padding: 10px 11px;
}

.call-touch-item + .call-touch-item {
    border-top: 1px solid rgba(107, 114, 128, 0.12);
}

.call-touch-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 5px 10px;
    color: var(--text-500);
    font-size: 10px;
}

.call-touch-meta strong {
    color: var(--text-700);
}

.call-touch-stage-change {
    color: var(--brand-strong);
    font-size: 10px;
    font-weight: 800;
}

.call-touch-stage-change:empty,
.call-touch-item p:empty {
    display: none;
}

.call-touch-item p {
    margin: 0;
    color: var(--text-700);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.call-log-row-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.call-log-save {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    min-height: 48px;
    margin: 0;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12px;
}

.call-log-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .call-log-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .call-log-sort-field {
        width: 100%;
    }

    .call-log-note-controls {
        grid-template-columns: 1fr;
    }

    .call-log-row-actions {
        grid-column: auto;
        justify-content: flex-start;
    }

    .call-log-save {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }
}

.table-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.role-checklist {
    display: grid;
    gap: 10px;
    margin-top: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
}

.role-checklist input,
.admin-flag-checkbox input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--brand);
}

.role-checklist label,
.role-checklist td,
.admin-flag-checkbox {
    color: var(--text-700);
    font-size: 14px;
    line-height: 1.6;
}

.admin-flag-checkbox {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.print-shell {
    max-width: 1080px;
    margin: 0 auto;
}

.print-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.print-meta-item {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(107, 114, 128, 0.20);
    background: rgba(248, 250, 252, 0.94);
    color: var(--text-700);
    font-size: 14px;
    line-height: 1.55;
}

.print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.billing-report-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
}

.billing-report-total span {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.billing-report-total strong {
    color: var(--text-900);
    font-family: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.table-link-danger {
    color: #b91c1c;
}

.table-link-danger:hover {
    color: #991b1b;
}

.table-link:hover {
    color: var(--brand);
}

.table-link-disabled {
    color: var(--text-500);
    cursor: default;
}

.wip-table-shell {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.wip-table {
    width: 100%;
    border-collapse: collapse;
}

.wip-schedule-table-shell {
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.wip-schedule-table {
    min-width: 1080px;
    table-layout: fixed;
}

.wip-schedule-plan-column {
    width: 13%;
}

.wip-schedule-work-column {
    width: 29%;
}

.wip-schedule-status-column {
    width: 10%;
}

.wip-schedule-ownership-column {
    width: 21%;
}

.wip-schedule-resources-column {
    width: 15%;
}

.wip-schedule-actions-column {
    width: 12%;
}

.wip-schedule-table th,
.wip-schedule-table td {
    padding-right: 13px;
    padding-left: 13px;
    overflow-wrap: anywhere;
}

.schedule-date-stack,
.schedule-work-stack,
.schedule-detail-list {
    display: grid;
    gap: 11px;
}

.schedule-date-stack > div,
.schedule-detail-row,
.schedule-resource-counts > div {
    display: grid;
    gap: 3px;
}

.schedule-date-stack > div + div,
.schedule-line-summary,
.schedule-detail-row:not(:first-child),
.schedule-resource-counts {
    padding-top: 9px;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.schedule-date-stack span,
.schedule-nested-label,
.schedule-detail-row > span,
.schedule-resource-counts span {
    color: var(--text-500) !important;
    font-size: 10px !important;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.schedule-date-stack strong,
.schedule-detail-row strong,
.schedule-resource-counts strong {
    color: var(--text-900);
    font-size: 13px;
    line-height: 1.35;
}

.schedule-detail-row small {
    color: var(--text-500);
    font-size: 11px;
    line-height: 1.35;
}

.schedule-detail-list > .status-chip {
    max-width: 100%;
    justify-self: start;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
}

.schedule-work-stack .job-cell strong {
    line-height: 1.35;
}

.schedule-work-stack .job-cell span:not(.schedule-nested-label) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.4;
}

.schedule-resource-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wip-schedule-table .status-chip {
    max-width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

.wip-schedule-table .table-action-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

.wip-schedule-table .table-link {
    line-height: 1.35;
}

.schedule-table-scroll-hint {
    margin: 0 0 10px;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
}

.schedule-suggestion-label {
    display: block;
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    color: #8a5600;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.schedule-resource-label {
    color: var(--text-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jobs-master-table-shell {
    overflow-x: auto;
}

.jobs-master-search,
.wip-schedule-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 16px;
    align-items: end;
    margin: 18px 0;
}

.jobs-master-search > label,
.wip-schedule-search > label {
    grid-column: 1 / -1;
    color: var(--text-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.jobs-master-search-control,
.wip-schedule-search-control {
    position: relative;
    width: 100%;
}

.jobs-master-search-input,
.wip-schedule-search-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px 10px 46px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
}

.jobs-master-search-icon,
.wip-schedule-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-500);
    border-radius: 50%;
    transform: translateY(-60%);
    pointer-events: none;
}

.jobs-master-search-icon::after,
.wip-schedule-search-icon::after {
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--text-500);
    transform: rotate(45deg);
    content: "";
}

.jobs-master-search-count,
.wip-schedule-search-count {
    min-width: 105px;
    padding-bottom: 13px;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.jobs-master-no-results[hidden] {
    display: none;
}

.wip-schedule-no-results[hidden] {
    display: none;
}

.jobs-master-no-results td {
    padding: 30px 18px;
    color: var(--text-500);
    font-weight: 700;
    text-align: center;
}

.wip-schedule-no-results td {
    padding: 30px 18px;
    color: var(--text-500);
    font-weight: 700;
    text-align: center;
}

@media (max-width: 640px) {
    .jobs-master-search,
    .wip-schedule-search {
        grid-template-columns: 1fr;
    }

    .jobs-master-search-count,
    .wip-schedule-search-count {
        min-width: 0;
        padding-bottom: 0;
        text-align: left;
    }
}

.jobs-master-table {
    min-width: 1120px;
}

.jobs-master-table th,
.jobs-master-table td {
    padding-right: 12px;
    padding-left: 12px;
}

.jobs-master-table .job-billing-column {
    width: 210px;
    min-width: 210px;
}

.jobs-master-table .job-billing-column .job-cell strong {
    white-space: nowrap;
}

.job-billing-editor {
    display: grid;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.jobs-master-table .job-billing-input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 8px 11px;
    border-radius: 11px;
    font-size: 13px;
}

.job-billing-aging-row {
    display: grid;
    grid-template-columns: auto 54px auto;
    gap: 8px;
    align-items: center;
}

.job-billing-aging-label {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
}

.jobs-master-table .job-billing-aging-input {
    padding-right: 5px;
    padding-left: 9px;
}

.job-billing-save {
    display: inline-flex;
    min-height: 40px;
    padding: 0 11px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(24, 196, 199, 0.32);
    border-radius: 11px;
    background: rgba(24, 196, 199, 0.10);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.job-billing-save:hover,
.job-billing-save:focus-visible {
    border-color: rgba(24, 196, 199, 0.55);
    background: rgba(24, 196, 199, 0.17);
}

.superintendent-table-shell {
    overflow-x: auto;
}

.superintendent-table {
    min-width: 1120px;
    table-layout: fixed;
}

.superintendent-table th:nth-child(1) { width: 35%; }
.superintendent-table th:nth-child(2) { width: 25%; }
.superintendent-table th:nth-child(3) { width: 22%; }
.superintendent-table th:nth-child(4) { width: 18%; }

.superintendent-table td {
    overflow-wrap: anywhere;
}

.superintendent-date-stack {
    display: grid;
    gap: 10px;
    width: 210px;
    max-width: 100%;
}

.superintendent-date-stack .input {
    width: 100%;
}

.superintendent-requested-date {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.superintendent-pm-name {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.14);
}

.superintendent-pm-name small {
    color: var(--text-500);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.superintendent-pm-name strong {
    color: var(--text-700);
    font-size: 12px;
}

.superintendent-requested-date small {
    color: var(--text-500);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.superintendent-requested-date strong {
    color: var(--text-700);
    font-size: 12px;
}

.superintendent-date-stack label {
    display: grid;
    gap: 5px;
}

.superintendent-date-stack label > span,
.superintendent-date-resources small {
    color: var(--text-500);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.superintendent-date-resources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.superintendent-date-resources > span {
    display: grid;
    gap: 3px;
}

.superintendent-date-resources strong {
    color: var(--text-700);
    font-size: 12px;
}

.superintendent-foreman-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.subcontractor-search-input {
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 36px;
}

.subcontractor-quick-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}

.subcontractor-quick-add-button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(5, 150, 105, 0.34);
    border-radius: 14px;
    background: rgba(236, 253, 245, 0.94);
    color: #047857;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.10);
}

.subcontractor-quick-add-button:hover,
.subcontractor-quick-add-button:focus-visible {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
    outline: none;
    transform: translateY(-1px);
}

.subcontractor-quick-add-modal .modal-card {
    width: min(500px, 100%);
    padding: 26px;
    border-radius: 24px;
}

.subcontractor-quick-add-modal .modal-frame {
    min-height: calc(100vh - 48px);
    align-items: center;
}

.subcontractor-quick-add-modal .modal-backdrop {
    padding: 0;
    border: 0;
}

.subcontractor-quick-add-modal .modal-header {
    position: static;
    display: block;
    margin: 0 0 24px;
    padding: 0 48px 0 0;
    background: none;
}

.subcontractor-quick-add-modal .modal-header .section-kicker {
    margin-bottom: 7px;
    font-size: 11px;
}

.subcontractor-quick-add-modal .modal-header h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.08;
}

.subcontractor-quick-add-modal .modal-header .card-copy {
    max-width: 390px;
    margin: 9px 0 0;
    font-size: 15px;
    line-height: 1.5;
}

.subcontractor-quick-add-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 500;
    line-height: 36px;
    letter-spacing: 0;
}

.subcontractor-quick-add-modal .form-row {
    gap: 7px;
}

.subcontractor-quick-add-modal .form-row label {
    font-size: 11px;
}

.subcontractor-quick-add-modal .input {
    min-height: 52px;
    padding: 13px 15px;
    border-radius: 15px;
    font-size: 16px;
}

.subcontractor-quick-add-modal .modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 10px;
    margin-top: 20px;
}

.subcontractor-quick-add-modal .modal-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 11px 16px;
    border-radius: 15px;
}

@media (max-width: 560px) {
    .subcontractor-quick-add-modal .modal-frame {
        min-height: calc(100vh - 20px);
        align-items: flex-start;
    }

    .subcontractor-quick-add-modal .modal-card {
        padding: 22px;
    }

    .subcontractor-quick-add-modal .modal-header {
        margin: 0 0 20px;
        padding-right: 42px;
    }

    .subcontractor-quick-add-modal .modal-actions {
        grid-template-columns: 1fr;
    }
}

body.modal-open {
    overflow: hidden;
}

.schedule-defer-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.schedule-deferred-note {
    max-width: 230px;
    padding: 8px 10px;
    border: 1px solid rgba(180, 83, 9, 0.20);
    border-radius: 10px;
    background: rgba(255, 247, 237, 0.92);
    color: #9a4d05;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
}

.schedule-defer-modal .modal-card {
    width: min(560px, 100%);
    padding: 26px;
    border-radius: 24px;
}

.schedule-defer-modal .modal-frame {
    min-height: calc(100vh - 48px);
    align-items: center;
}

.schedule-defer-modal .modal-backdrop {
    padding: 0;
    border: 0;
}

.schedule-defer-modal .modal-header {
    position: static;
    display: block;
    margin: 0 0 22px;
    padding: 0 48px 0 0;
    background: none;
}

.schedule-defer-modal .modal-header h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.08;
}

.schedule-defer-modal .modal-header .card-copy {
    margin: 9px 0 0;
    font-size: 15px;
    line-height: 1.5;
}

.schedule-defer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 500;
    line-height: 36px;
    letter-spacing: 0;
}

.schedule-defer-item-name {
    display: block;
    margin-top: 12px;
    color: var(--text-900);
}

.schedule-defer-modal .form-row {
    gap: 7px;
    margin-top: 16px;
}

.schedule-defer-modal .modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 10px;
    margin-top: 20px;
}

.schedule-defer-modal .modal-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 11px 16px;
    border-radius: 15px;
}

@media (max-width: 560px) {
    .schedule-defer-modal .modal-frame {
        min-height: calc(100vh - 20px);
        align-items: flex-start;
    }

    .schedule-defer-modal .modal-card {
        padding: 22px;
    }

    .schedule-defer-modal .modal-actions {
        grid-template-columns: 1fr;
    }
}

.searchable-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.superintendent-foreman-stack {
    display: grid;
    justify-items: start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.superintendent-foreman-stack .table-link {
    white-space: nowrap;
}

.schedule-row-action {
    width: 100%;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 12px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.schedule-row-action-primary {
    box-shadow: 0 10px 22px rgba(24, 196, 199, 0.18);
}

.schedule-compact-action {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 9px;
    box-shadow: none;
    font-size: 11px;
}

.schedule-suggestion-label {
    cursor: default;
}

.superintendent-week-workspace {
    overflow: hidden;
}

.schedule-readiness-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin: 24px 0 16px;
}

.schedule-readiness-card {
    min-height: 112px;
    padding: 18px 20px;
    border: 1px solid #dce4ed;
    border-radius: 20px;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.schedule-readiness-card span,
.schedule-preview-heading span {
    color: #68758a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.schedule-readiness-card strong {
    margin-top: 7px;
    color: #0b2146;
    font-size: 30px;
    line-height: 1;
}

.schedule-readiness-card small {
    margin-top: 8px;
    color: #647187;
}

.schedule-readiness-primary {
    border-color: #bdebf0;
    background: #eafafb;
}

.schedule-publish-state {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 17px;
    border-radius: 14px;
}

.schedule-publish-state span {
    color: #526078;
}

.schedule-conflict-summary-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.8rem;
    width: 100%;
}

.schedule-conflict-summary {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(153, 82, 8, 0.22);
    border-radius: 0.7rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.85rem;
}

.schedule-conflict-summary > strong {
    color: #8a4705;
}

.schedule-conflict-summary .schedule-conflict-relationship {
    color: #98540f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.schedule-conflict-override {
    display: block;
    margin-top: 0.85rem;
    width: 100%;
}

.schedule-conflict-override label {
    cursor: pointer;
    font-weight: 700;
    margin-left: 0.4rem;
}

.schedule-publish-ready {
    color: #116b63;
    background: #e8f8f4;
    border: 1px solid #bce8dd;
}

.schedule-publish-blocked {
    color: #8a4e08;
    background: #fff5df;
    border: 1px solid #efd5a3;
}

.schedule-preview-panel,
.schedule-revision-panel {
    margin-top: 22px;
    border: 1px solid #dce4ed;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.schedule-preview-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    background: #f1f5f9;
}

.schedule-preview-heading div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.schedule-preview-heading strong {
    color: #0b2146;
    font-size: 18px;
}

.schedule-preview-heading small {
    color: #69758a;
}

.exact-publish-preview > .schedule-preview-heading {
    margin-bottom: 0;
}

.exact-publish-preview .collapsible-card-toggle {
    margin-left: auto;
}

.exact-publish-preview.is-collapsed > .schedule-preview-heading {
    border-radius: 20px;
}

@media (max-width: 720px) {
    .exact-publish-preview > .schedule-preview-heading {
        gap: 12px;
    }

    .exact-publish-preview > .schedule-preview-heading small {
        width: 100%;
    }

    .exact-publish-preview .collapsible-card-toggle {
        margin-left: 0;
    }
}

.schedule-preview-row,
.schedule-history-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(210px, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 16px 20px;
}

.schedule-preview-row + .schedule-preview-row,
.schedule-history-row + .schedule-history-row {
    border-top: 1px solid #e2e8f0;
}

.schedule-preview-row > div,
.schedule-history-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-preview-row strong,
.schedule-history-row strong {
    color: #10264b;
}

.schedule-preview-row span:not(.status-chip),
.schedule-history-row span {
    color: #5c6980;
}

.schedule-preview-empty {
    padding: 25px 20px;
    color: #68758a;
}

.schedule-history-list {
    border: 1px solid #dce4ed;
    border-radius: 18px;
    overflow: hidden;
}

.schedule-history-row {
    grid-template-columns: 1fr auto;
}

.schedule-revision-panel {
    margin-top: 20px;
}

.schedule-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.schedule-ready-label,
.schedule-blocker-label {
    font-size: 12px;
    font-weight: 900;
}

.schedule-ready-label {
    color: #138377;
}

.schedule-blocker-label {
    color: #a35d08;
}

.schedule-conflict-row td {
    background: #fff8e8;
}

.schedule-hold-link {
    color: #9a5708;
}

.schedule-hold-row td {
    padding: 0 !important;
    background: #fffaf0;
}

.schedule-hold-panel {
    display: grid;
    grid-template-columns: minmax(240px,.8fr) minmax(520px,1.8fr) auto;
    gap: 24px;
    align-items: end;
    padding: 22px 24px;
    border-top: 1px solid #efd7a9;
    border-bottom: 1px solid #efd7a9;
}

.schedule-hold-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-hold-copy span {
    color: #9a5708;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.schedule-hold-copy strong {
    color: #10264b;
}

.schedule-hold-copy small {
    color: #68758a;
    line-height: 1.45;
}

.schedule-hold-fields {
    display: grid;
    grid-template-columns: repeat(3,minmax(150px,1fr));
    gap: 12px;
}

.schedule-hold-notes {
    grid-column: 1 / -1;
}

.schedule-hold-notes textarea {
    min-height: 70px;
    resize: vertical;
}

.schedule-hold-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 4px;
}

.assignment-segment-history {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px dashed #d6dee8;
}

.assignment-segment-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #42516a;
    background: #eef3f8;
    font-size: 12px;
}

.assignment-segment-chip strong {
    color: #10264b;
}

.assignment-segment-chip span:empty {
    display: none;
}

.schedule-ajax-progress {
    position: fixed;
    z-index: 1400;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 17px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fff;
    background: #102b52;
    box-shadow: 0 18px 42px rgba(16,43,82,.28);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
}

.schedule-ajax-progress span {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #20c4ca;
    border-radius: 50%;
    animation: cpm-ajax-spin 650ms linear infinite;
}

.schedule-ajax-busy .superintendent-week-workspace,
.schedule-ajax-busy .superintendent-table-shell,
.schedule-ajax-busy .schedule-history-list {
    cursor: progress;
}

@media (max-width: 1180px) {
    .schedule-readiness-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .schedule-hold-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .schedule-readiness-grid {
        grid-template-columns: 1fr 1fr;
    }

    .schedule-preview-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .schedule-preview-heading,
    .schedule-publish-state {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Foreman time-off requests and schedule availability */
.foreman-primary-actions { min-width: min(100%,360px); }
.time-off-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.time-off-form-grid label small { color: #687c8c; font-weight: 600; }
.time-off-acknowledgement { margin-top: 18px; padding: 15px 17px; border: 1px solid #bed7e4; border-radius: 12px; background: #eef8fb; color: #173d4c; font-weight: 700; }
.time-off-acknowledgement input { width: 20px; height: 20px; vertical-align: middle; accent-color: #0e7490; }
.time-off-use-choice { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; margin-top: 18px; padding: 18px; border: 1px solid #c9d9e5; border-radius: 13px; background: #fff; }
.time-off-use-choice > div { display: grid; gap: 5px; }
.time-off-use-choice > div strong { color: #162e3d; text-transform: uppercase; letter-spacing: .01em; }
.time-off-use-choice > div small { color: #526575; font-style: italic; font-weight: 700; text-transform: uppercase; }
.time-off-request-comments { margin-top: 18px; }
.time-off-request-comments textarea { min-height: 112px; resize: vertical; }
.time-off-yes-no tbody { display: flex; gap: 20px; }
.time-off-yes-no td { padding: 0; }
.time-off-yes-no label { margin-left: 7px; color: #173d4c; font-weight: 800; text-transform: uppercase; }
.time-off-yes-no input { width: 22px; height: 22px; vertical-align: middle; accent-color: #0e7490; }
.time-off-request-list,.foreman-availability-list { display: grid; gap: 10px; }
.time-off-request-row,.foreman-availability-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 15px 17px; border: 1px solid #d7e2e9; border-radius: 13px; background: #fff; }
.time-off-request-row > div:first-child,.time-off-request-status,.foreman-availability-row > div { display: grid; gap: 4px; }
.time-off-request-row small,.foreman-availability-row span { color: #5c7080; }
.time-off-request-note { margin: 6px 0 0; padding: 9px 11px; border-left: 3px solid #9fc8d8; background: #f4f9fb; color: #314d5e; font-size: 13px; white-space: pre-wrap; }
.time-off-request-status { justify-items: end; text-align: right; }
.time-off-review-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.time-off-review-card header h2 { margin: 4px 0; }
.time-off-review-tabs { display: flex; gap: 8px; margin: 2px 0 18px; border-bottom: 1px solid #d3dee7; }
.time-off-review-tab { appearance: none; padding: 12px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #526575; font: inherit; font-weight: 800; cursor: pointer; }
.time-off-review-tab.is-active { border-bottom-color: #18c4c7; color: #0d6975; }
.time-off-review-panel[hidden] { display: none; }
.time-off-pending-card { overflow: hidden; padding: 0; }
.time-off-pending-card > header { margin: 0; padding: 22px 24px 18px; }
.time-off-review-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; padding: 1px 0; background: #dce6ed; border-block: 1px solid #dce6ed; }
.time-off-review-facts .job-cell { min-height: 86px; padding: 17px 20px; background: #f9fbfc; }
.time-off-review-facts .job-cell > span { color: #687c8c; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.time-off-request-note-review { display: grid; gap: 6px; margin: 18px 22px 0; padding: 15px 17px; border: 1px solid #bfd7e2; border-radius: 13px; background: #f3f9fb; }
.time-off-request-note-review > span { color: #687c8c; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.time-off-request-note-review p { margin: 0; color: #28495b; white-space: pre-wrap; }
.time-off-assignment-warning,.time-off-assignment-clear { display: grid; gap: 4px; margin: 18px 22px 0; padding: 15px 17px; border-radius: 13px; }
.time-off-assignment-warning { border: 1px solid #e9bc7a; background: #fff7e9; color: #70470d; }
.time-off-assignment-clear { border: 1px solid #aed9cf; background: #effaf7; color: #205d51; }
.time-off-assignment-warning span,.time-off-assignment-clear span { font-size: 13px; }
.time-off-decision-area { padding: 18px 22px 22px; }
.time-off-decision-area label small { color: #a23a3a; font-weight: 800; }
.time-off-decision-actions { justify-content: flex-end; }
.time-off-deny-button { border-color: #ca7373; color: #982f2f; }
.time-off-status-submitted { border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.14); color: #915603; }
.time-off-status-approved { border-color: rgba(34,139,94,.26); background: rgba(34,139,94,.12); color: #176a47; }
.time-off-status-denied { border-color: rgba(190,55,55,.25); background: rgba(190,55,55,.12); color: #9a2929; }
.time-off-status-cancelled { border-color: #cad3dc; background: #eef2f5; color: #596978; }
.time-off-history-table td { vertical-align: top; }
.time-off-history-note { max-width: 320px; margin-top: 7px; color: #314d5e; white-space: pre-wrap; }
.time-off-history-action { width: 1%; white-space: nowrap; }
.foreman-availability-panel { margin: 16px 0; padding: 18px; border: 1px solid #b9d6e4; border-radius: 15px; background: #f4fafc; }
.foreman-availability-row { grid-template-columns: minmax(0,1fr) auto; background: rgba(255,255,255,.86); }
.time-off-publish-blocker { border-color: #dc7272; background: #fff1f1; }
.time-off-resolution-modal .modal-card { width: min(680px,calc(100vw - 32px)); }
.time-off-resolution-modal [data-time-off-resolution-label] { display: block; margin-top: 8px; color: #294b5d; }
.time-off-resolution-options tbody { display: grid; gap: 9px; }
.time-off-resolution-options td { padding: 0; }
.time-off-resolution-options label { margin-left: 8px; color: #173d4c; font-weight: 700; }
.time-off-resolution-options input { width: 19px; height: 19px; vertical-align: middle; accent-color: #0e7490; }

@media (max-width: 760px) {
    .time-off-form-grid { grid-template-columns: 1fr; }
    .time-off-use-choice { grid-template-columns: 1fr; }
    .time-off-request-row { grid-template-columns: 1fr; }
    .time-off-request-status { justify-items: start; text-align: left; }
    .time-off-request-row .button-link { width: 100%; }
    .foreman-primary-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .time-off-review-tabs { overflow-x: auto; }
    .time-off-review-tab { flex: 0 0 auto; }
    .time-off-review-facts { grid-template-columns: 1fr; }
    .time-off-decision-actions { display: grid; grid-template-columns: 1fr; }
    .time-off-decision-actions .btn { width: 100%; }
}

.superintendent-assignment-grid {
    display: grid;
    gap: 16px;
}

.assignment-week-selector-body {
    display: grid;
    grid-template-columns: minmax(250px, 340px) minmax(280px, 1fr);
    align-items: end;
    gap: 20px;
}

.week-picker-overflow-card {
    overflow: visible;
    z-index: 5;
}

.assignment-week-selector-body .weekly-billable-picker {
    margin-top: 0;
}

.assignment-week-source {
    display: grid;
    gap: 4px;
    margin: 0;
}

.assignment-week-source strong {
    color: var(--text-900);
}

.assignment-week-source span {
    color: var(--text-700);
}

.assignment-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(135px, 1fr));
    width: min(100%, 390px);
    margin: 0 0 22px;
    padding: 6px;
    border: 1px solid rgba(57, 83, 105, 0.2);
    border-radius: 22px;
    background: #eef3f6;
    box-shadow: 0 10px 24px rgba(16, 34, 57, 0.08);
}

.assignment-view-option {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    color: #374151;
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.assignment-view-option:hover,
.assignment-view-option:focus-visible {
    color: #0b2147;
}

.assignment-view-option.is-active {
    background: #0b2147;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 33, 71, 0.2);
}

.pm-weekly-foreman-note-card .section-heading {
    align-items: flex-end;
}

.pm-weekly-foreman-note-card .weekly-billable-picker {
    margin-top: 0;
}

.pm-foreman-note-sources {
    display: grid;
    gap: 6px;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid rgba(57, 83, 105, 0.16);
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.74);
}

.pm-foreman-note-source {
    display: grid;
    grid-template-columns: minmax(140px, 0.3fr) minmax(240px, 1fr);
    gap: 10px;
    padding: 6px 0;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.pm-foreman-note-source:first-of-type {
    border-top: 0;
}

.pm-foreman-note-source span {
    white-space: pre-wrap;
}

.pm-master-foreman-note {
    grid-column: 1 / -1;
}

.published-general-foreman-notes {
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid rgba(15, 118, 110, 0.24);
    border-left: 5px solid #0f766e;
    border-radius: 14px;
    background: rgba(20, 184, 166, 0.08);
    color: var(--text-900);
    line-height: 1.55;
}

.published-general-foreman-notes .section-kicker {
    margin-bottom: 8px;
}

.foreman-schedule-card .section-kicker {
    margin-bottom: 5px;
}

.superintendent-job-assignment.foreman-job-assignment {
    grid-template-columns: minmax(230px, 1.2fr) minmax(200px, 1fr) minmax(210px, 1fr) minmax(110px, auto);
}

@media (max-width: 760px) {
    .assignment-week-selector-body {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .assignment-view-switch {
        width: 100%;
    }

    .pm-foreman-note-source {
        grid-template-columns: 1fr;
    }
}

.superintendent-job-card {
    overflow: hidden;
    border: 1px solid rgba(107, 114, 128, 0.18);
    border-radius: 18px;
    background: #fbfdff;
}

.superintendent-job-card:nth-child(even) {
    border-color: rgba(57, 83, 105, 0.24);
    background: #e7eef4;
}

.superintendent-job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.16);
    background: rgba(241, 245, 249, 0.92);
}

.superintendent-job-card:nth-child(even) .superintendent-job-card-header {
    background: #d8e3ec;
}

.superintendent-job-card-header h3 {
    margin: 0;
    color: var(--text-900);
    font-size: 18px;
    line-height: 1.3;
}

.superintendent-job-card-header p {
    margin: 5px 0 0;
    color: var(--text-500);
    font-size: 13px;
}

.superintendent-job-assignment-list {
    display: grid;
}

.superintendent-job-assignment {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
}

.superintendent-job-assignment + .superintendent-job-assignment {
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.superintendent-job-card-tools {
    display: grid;
    justify-items: end;
    gap: 11px;
}

.superintendent-job-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.superintendent-job-actions .button-link {
    min-height: 38px;
    padding: 9px 13px;
    font-size: 11px;
}

.button-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
    pointer-events: none;
}

.supporting-foreman-list,
.supporting-foreman-add {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(33, 53, 71, 0.12);
}

.supporting-foreman-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(41, 117, 145, 0.08);
}

.supporting-foreman-item div,
.supporting-foreman-item span {
    display: block;
}

.supporting-foreman-item span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.supporting-foreman-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.supporting-foreman-dates label span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .superintendent-job-assignment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .superintendent-job-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .superintendent-job-card-tools {
        justify-items: start;
    }

    .superintendent-job-actions {
        justify-content: flex-start;
    }

    .superintendent-job-assignment {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        margin: 0.55in;
    }

    .assignment-print-mode {
        background: #ffffff;
    }

    .assignment-print-mode .topbar,
    .assignment-print-mode .hero-card,
    .assignment-print-mode .assignment-week-selector-card,
    .assignment-print-mode .assignment-view-switch,
    .assignment-print-mode .section-heading,
    .assignment-print-mode .superintendent-job-actions {
        display: none !important;
    }

    .assignment-print-mode .page,
    .assignment-print-mode .section-card {
        padding: 0;
    }

    .assignment-print-mode .page-shell {
        max-width: none;
    }

    .assignment-print-mode .section-card,
    .assignment-print-mode .superintendent-job-card {
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
    }

    .assignment-print-mode .superintendent-job-card-header {
        padding: 0 0 16px;
        background: #ffffff;
    }

    .assignment-print-mode .superintendent-job-assignment {
        break-inside: avoid;
        padding: 13px 0;
    }
}

/* Printable Foreman Daily report */
.foreman-report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.foreman-report-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.foreman-report-two-column h3 { margin: 0 0 10px; color: var(--text-900); }
.foreman-report-list { margin: 0; padding-left: 22px; line-height: 1.8; }
.foreman-report-notes { margin: 12px 0 0; color: var(--text-700); line-height: 1.7; white-space: normal; }
.foreman-report-footer { color: var(--text-500); font-size: 12px; text-align: right; }

@media(max-width:760px) {
    .foreman-report-summary-grid, .foreman-report-two-column { grid-template-columns: 1fr; }
}

@media print {
    @page { size: Letter portrait; margin: 0.32in 0.38in; }

    html,
    body.foreman-report-print-page {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        color: #071a3d;
        font-size: 9pt;
        line-height: 1.3;
    }

    .foreman-report-print-page .page,
    .foreman-report-print-page .page-shell,
    .foreman-report-print-page .print-shell {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .foreman-report-print-page .foreman-report-print.content-stack {
        display: grid;
        gap: 7px;
    }

    .foreman-report-print-page .foreman-report-print .section-card {
        margin: 0;
        padding: 9px 11px;
        border: 1px solid #cfd8e6;
        border-radius: 9px;
        break-inside: avoid;
    }

    .foreman-report-print-page .foreman-report-print h1 {
        margin: 2px 0 3px;
        font-size: 18pt;
        line-height: 1.08;
    }

    .foreman-report-print-page .foreman-report-print h2 {
        margin: 1px 0 0;
        font-size: 11pt;
        line-height: 1.15;
    }

    .foreman-report-print-page .foreman-report-print h3 {
        margin: 0 0 3px;
        font-size: 9pt;
    }

    .foreman-report-print-page .foreman-report-print .section-copy,
    .foreman-report-print-page .foreman-report-print p {
        margin: 2px 0 0;
        line-height: 1.28;
    }

    .foreman-report-print-page .foreman-report-print .section-kicker {
        font-size: 7.5pt;
        letter-spacing: 0.12em;
    }

    .foreman-report-print-page .foreman-report-print .section-heading {
        margin-bottom: 6px;
        gap: 8px;
    }

    .foreman-report-print-page .foreman-report-print .status-chip {
        padding: 4px 8px;
        font-size: 7.5pt;
    }

    .foreman-report-print-page .foreman-report-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .foreman-report-print-page .foreman-report-summary-grid .job-cell {
        gap: 1px;
        padding: 6px 7px;
        border-radius: 7px;
    }

    .foreman-report-print-page .foreman-report-summary-grid .job-cell span {
        font-size: 7pt;
    }

    .foreman-report-print-page .foreman-report-summary-grid .job-cell strong {
        font-size: 8.5pt;
        line-height: 1.2;
    }

    .foreman-report-print-page .foreman-report-two-column {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
        gap: 18px;
    }

    .foreman-report-print-page .foreman-report-list {
        columns: 2;
        column-gap: 18px;
        margin: 0;
        padding-left: 16px;
        font-size: 8.5pt;
        line-height: 1.35;
    }

    .foreman-report-print-page .foreman-report-list li {
        break-inside: avoid;
        margin: 0 0 1px;
    }

    .foreman-report-print-page .wip-table-shell {
        overflow: visible;
        border-radius: 7px;
    }

    .foreman-report-print-page .wip-table {
        min-width: 0;
        font-size: 8pt;
    }

    .foreman-report-print-page .wip-table th,
    .foreman-report-print-page .wip-table td {
        padding: 4px 6px;
        line-height: 1.2;
    }

    .foreman-report-print-page .foreman-report-notes {
        margin-top: 4px;
        font-size: 8.5pt;
        line-height: 1.3;
    }

    .foreman-report-print-page .message {
        margin: 0;
        padding: 7px 9px;
        font-size: 8.5pt;
        line-height: 1.25;
    }

    .foreman-report-print-page .foreman-report-footer {
        margin-top: 1px;
        font-size: 7pt;
        line-height: 1;
    }
}

.foreman-work-table-shell {
    overflow-x: auto;
}

.foreman-work-table {
    min-width: 1180px;
}

.foreman-work-table th:nth-child(1) { width: 13%; }
.foreman-work-table th:nth-child(2) { width: 22%; }
.foreman-work-table th:nth-child(3) { width: 21%; }
.foreman-work-table th:nth-child(4) { width: 10%; }
.foreman-work-table th:nth-child(5) { width: 18%; }
.foreman-work-table th:nth-child(6) { width: 9%; }
.foreman-work-table th:nth-child(7) { width: 7%; }

.foreman-work-table td:last-child .table-link {
    white-space: nowrap;
}

/* Published Foreman schedule */
.foreman-mobile-shell{max-width:980px}.foreman-mobile-hero{padding:28px}.foreman-mobile-hero h1{margin-bottom:6px}.foreman-week-selector{padding:18px 22px}.foreman-week-selector .weekly-schedule-picker{margin:0}.foreman-revision-bar{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:16px 18px;border-radius:14px;background:#0b2348;color:#fff;box-shadow:0 10px 24px rgba(11,35,72,.16)}.foreman-revision-details{display:flex;flex-direction:column;gap:3px;min-width:0}.foreman-revision-details strong{font-size:1.08rem}.foreman-revision-details span{color:#d9e6f7;font-size:.86rem}.foreman-revision-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.foreman-revision-actions .button-link{min-height:40px;padding:9px 14px;border-radius:10px;background:#fff;color:#0b2348;box-shadow:none;font-size:.82rem;white-space:nowrap}.foreman-acknowledgement{display:inline-flex;align-items:center;width:max-content;padding:6px 10px;border-radius:999px;font-size:.76rem;font-weight:800;white-space:nowrap}.foreman-acknowledgement.is-acknowledged{background:#dff5e5;color:#24633a}.foreman-acknowledgement.is-pending{background:#fff0cf;color:#7d5200}.foreman-mobile-general-notes{margin:0;font-size:1.03rem;line-height:1.55}.foreman-day-strip{display:grid;grid-template-columns:repeat(8,minmax(62px,1fr));gap:7px;margin:18px 0;overflow-x:auto;padding-bottom:3px}.foreman-day-strip button{min-height:58px;padding:8px;border:1px solid #ccd6e5;border-radius:10px;background:#f6f8fb;color:#26364e;font:inherit;font-weight:700;cursor:pointer}.foreman-day-strip button span,.foreman-day-strip button strong{display:block}.foreman-day-strip button span{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em}.foreman-day-strip button.is-active{border-color:#0b2348;background:#0b2348;color:#fff}.foreman-mobile-assignment-list{display:grid;gap:14px}.foreman-mobile-assignment{display:grid;grid-template-columns:150px minmax(0,1.4fr) minmax(220px,.8fr);gap:18px;padding:20px;border:1px solid #dce3ed;border-left:5px solid #2d7085;border-radius:13px;background:#fff;box-shadow:0 7px 18px rgba(25,46,76,.06)}.foreman-assignment-date{display:flex;flex-direction:column;gap:5px}.foreman-assignment-date strong{font-size:1.04rem}.foreman-assignment-date span{color:var(--muted);font-size:.86rem}.foreman-assignment-main h3{margin:4px 0 8px;font-size:1.15rem}.foreman-assignment-main p{margin:4px 0;color:#4b5c73}.foreman-assignment-details{display:grid;gap:8px;margin:0}.foreman-assignment-details div{display:grid;grid-template-columns:58px 1fr;gap:8px}.foreman-assignment-details dt{color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase}.foreman-assignment-details dd{margin:0;font-weight:700}.foreman-assignment-actions{grid-column:1/-1;display:flex;gap:9px;flex-wrap:wrap;padding-top:2px}.foreman-day-empty{margin-top:14px}.foreman-no-schedule{text-align:center;padding:44px 24px}.foreman-no-schedule h2{margin:7px 0}.foreman-no-schedule p{color:var(--muted)}
.foreman-mobile-assignment.is-filtered-out,
.foreman-mobile-assignment[hidden],
.foreman-day-empty[hidden]{display:none!important}
@media(max-width:760px){.foreman-schedule-body .page{padding-top:14px}.foreman-mobile-shell{gap:12px}.foreman-mobile-hero{padding:20px}.foreman-mobile-hero .hero-copy{font-size:.95rem}.foreman-week-selector{padding:15px}.foreman-revision-bar{align-items:stretch;flex-direction:column;padding:16px}.foreman-revision-actions{align-items:stretch;flex-direction:column}.foreman-revision-actions .button-link{text-align:center;width:100%}.foreman-day-strip{grid-template-columns:repeat(8,64px);margin-inline:-4px}.foreman-mobile-assignment{grid-template-columns:1fr;gap:12px;padding:17px}.foreman-assignment-date{padding-bottom:10px;border-bottom:1px solid #e4e9f0}.foreman-assignment-details{padding:12px;background:#f6f8fb;border-radius:9px}.foreman-assignment-actions{grid-column:1;display:grid}.foreman-assignment-actions .button-link{text-align:center;width:100%}.foreman-mobile-general-notes{padding:17px}.foreman-weekly-assignments{padding:17px}.foreman-weekly-assignments .section-heading{align-items:flex-start}.foreman-schedule-body .topbar-inner{padding-inline:14px}.foreman-schedule-body .status-pill{display:none}}

.field-resource-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 22px;
}

.form-row-span-2 {
    grid-column: 1 / -1;
}

.resource-list {
    display: grid;
}

.resource-roster {
    display: grid;
    gap: 14px;
}

.resource-roster-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(150px, 0.9fr) minmax(130px, 0.7fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(107, 114, 128, 0.16);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
}

.resource-roster-toolbar label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.resource-roster-toolbar label > span {
    color: var(--text-700);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resource-roster-toolbar .input {
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
}

.resource-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
}

.resource-list-row + .resource-list-row {
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.resource-list-row[hidden],
.resource-roster-empty[hidden] {
    display: none !important;
}

.resource-roster-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding-top: 4px;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
}

.resource-roster-pagination > div {
    display: flex;
    gap: 7px;
}

.resource-roster-pagination .button-link {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 9px;
    font-size: 10px;
}

.resource-roster-pagination .button-link:disabled {
    cursor: default;
    opacity: 0.42;
}

.resource-roster-empty {
    margin: 0;
    padding: 12px 14px;
}

.resource-update-progress {
    position: fixed;
    z-index: 2000;
    right: 20px;
    bottom: 20px;
    padding: 11px 15px;
    border-radius: 999px;
    background: var(--text-900);
    box-shadow: 0 12px 30px rgba(7, 26, 61, 0.22);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.crewman-edit-modal {
    z-index: 1000;
}

.crewman-edit-modal .modal-frame {
    min-height: calc(100vh - 48px);
    align-items: center;
}

.crewman-edit-modal .modal-card {
    width: min(760px, 100%);
    padding: 22px;
    border-radius: 22px;
}

.crewman-edit-modal .modal-header {
    position: relative;
    top: auto;
    align-items: center;
    margin: -22px -22px 24px;
    padding: 20px 22px 14px;
    background: rgba(255, 255, 255, 0.98);
}

.crewman-edit-modal .modal-header h2 {
    margin: 2px 0 4px;
    font-size: clamp(24px, 3vw, 32px);
}

.crewman-edit-modal .modal-header .section-kicker {
    margin-bottom: 4px;
}

.crewman-edit-modal .modal-header .card-copy {
    max-width: 570px;
    font-size: 13px;
    line-height: 1.45;
}

.crewman-edit-modal .modal-close {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 10px;
}

.crewman-edit-modal .form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.crewman-edit-modal .form-row {
    gap: 6px;
}

.crewman-edit-modal .form-row label {
    font-size: 10px;
}

.crewman-edit-modal .input {
    min-height: 46px;
    padding: 10px 12px;
}

.crewman-edit-modal .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.crewman-edit-modal .modal-actions .btn {
    min-height: 44px;
    padding: 10px 18px;
}

.field-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.field-selection-grid li {
    min-width: 0;
}

.field-selection-grid label {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(107, 114, 128, 0.2);
    border-radius: 13px;
    background: rgba(248, 250, 252, 0.94);
    color: var(--text-700);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.field-selection-grid input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0 9px 0 0;
    accent-color: var(--brand);
}

.contractor-selector {
    display: grid;
    gap: 12px;
}

.contractor-none-option,
.touch-selection-grid li {
    position: relative;
    min-width: 0;
}

.contractor-none-option {
    display: flex;
    align-items: center;
    width: fit-content;
    min-height: 48px;
    padding: 10px 15px;
    border: 1px solid rgba(107, 114, 128, 0.24);
    border-radius: 999px;
    background: #fff;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.contractor-none-option input {
    width: 20px;
    height: 20px;
    margin: 0 9px 0 0;
    accent-color: var(--brand);
}

.touch-selection-grid input {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    width: 22px;
    height: 22px;
    margin: 0;
    transform: translateY(-50%);
    cursor: pointer;
}

.touch-selection-grid label {
    min-height: 64px;
    padding: 14px 16px 14px 52px;
    border-width: 2px;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.touch-selection-grid li.is-selected label,
.contractor-none-option.is-selected {
    border-color: rgba(24, 196, 199, 0.78);
    background: rgba(24, 196, 199, 0.12);
    color: var(--text-900);
    box-shadow: 0 0 0 3px rgba(24, 196, 199, 0.1);
}

.touch-selection-grid li:focus-within label,
.contractor-none-option:focus-within {
    outline: 3px solid rgba(24, 196, 199, 0.24);
    outline-offset: 2px;
}

.weather-panel,
.completion-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(24, 196, 199, 0.2);
    border-radius: 15px;
    background: rgba(24, 196, 199, 0.055);
}

.field-check {
    color: var(--text-900);
    font-size: 15px;
    font-weight: 800;
}

.field-check input {
    width: 18px;
    height: 18px;
    margin-right: 7px;
    accent-color: var(--brand);
    vertical-align: -3px;
}

.daily-equipment-list {
    display: grid;
}

.equipment-picker {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(24, 196, 199, 0.2);
    border-radius: 15px;
    background: rgba(24, 196, 199, 0.055);
}

.equipment-picker .button-link,
.equipment-picker .btn {
    min-height: 48px;
    margin: 0;
}

.equipment-selected-kicker {
    margin-bottom: 8px;
}

.daily-equipment-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) auto auto minmax(110px, 0.55fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 14px;
    padding: 14px 0;
}

.daily-equipment-row + .daily-equipment-row {
    border-top: 1px solid rgba(107, 114, 128, 0.14);
}

.daily-equipment-row > span {
    align-self: center;
    white-space: nowrap;
}

.field-report-days {
    display: grid;
    gap: 13px;
}

.field-report-day {
    overflow: hidden;
    border: 1px solid rgba(107, 114, 128, 0.18);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
}

.field-report-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.14);
    background: rgba(241, 245, 249, 0.9);
}

.field-report-day header > div {
    display: grid;
    gap: 3px;
}

.field-report-day header strong {
    color: var(--text-900);
}

.field-report-day header span {
    color: var(--text-500);
    font-size: 12px;
}

.field-report-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
}

.field-report-detail-grid .job-cell > span {
    color: var(--text-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-report-notes {
    margin: 0;
    padding: 0 16px 16px;
    color: var(--text-700);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.report-recall-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr) auto;
    align-items: end;
    gap: 12px;
}

.report-recall-filters .form-actions {
    flex-wrap: nowrap;
    margin: 0;
}

.report-recall-filters .btn,
.report-recall-filters .button-link {
    min-height: 48px;
    margin: 0;
    white-space: nowrap;
}

.report-open-link {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 11px;
}

.foreman-report-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
}

.foreman-report-actions .table-link {
    white-space: normal;
}

@media (max-width: 1000px) {
    .field-resource-layout {
        grid-template-columns: 1fr;
    }

    .resource-roster-toolbar {
        grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(140px, 0.8fr));
    }

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

    .daily-equipment-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .equipment-picker {
        grid-template-columns: 1fr auto;
    }

    .field-report-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-recall-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .crewman-edit-modal .modal-frame {
        min-height: calc(100vh - 20px);
        align-items: flex-start;
    }

    .crewman-edit-modal .modal-card {
        padding: 18px;
        border-radius: 18px;
    }

    .crewman-edit-modal .modal-header {
        align-items: flex-start;
        flex-direction: row;
        margin: -18px -18px 20px;
        padding: 18px 18px 12px;
    }

    .crewman-edit-modal .modal-header .card-copy {
        display: none;
    }

    .crewman-edit-modal .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .crewman-edit-modal .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .resource-roster-toolbar {
        grid-template-columns: 1fr;
    }

    .field-selection-grid,
    .daily-equipment-row,
    .resource-list-row {
        grid-template-columns: 1fr;
    }

    .resource-list-row .table-action-group,
    .resource-list-row > .table-link {
        justify-self: stretch;
    }

    .resource-list-row .table-action-group {
        justify-content: flex-start;
    }

    .resource-roster-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-roster-pagination > div {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .equipment-picker {
        grid-template-columns: 1fr;
    }

    .form-row-span-2 {
        grid-column: auto;
    }

    .field-report-day header {
        align-items: flex-start;
        flex-direction: column;
    }

    .field-report-detail-grid {
        grid-template-columns: 1fr;
    }

    .report-recall-filters {
        grid-template-columns: 1fr;
    }

    .report-recall-filters .form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.wip-table th,
.wip-table td {
    text-align: left;
}

.wip-table th {
    padding: 16px 18px;
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(241, 245, 249, 0.94);
}

.wip-table td {
    padding: 18px;
    border-top: 1px solid rgba(107, 114, 128, 0.14);
    color: var(--text-700);
    vertical-align: top;
}

.wip-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.62);
}

.wip-table tbody tr.wip-row-focus,
.wip-table tbody tr.wip-row-focus:hover {
    background: rgba(24, 196, 199, 0.10);
}

.wip-table tbody tr.wip-row-focus td {
    border-top-color: rgba(24, 196, 199, 0.22);
}

.closeout-playbook-table {
    table-layout: fixed;
    min-width: 720px;
}

.closeout-playbook-table .playbook-name-column {
    width: 38%;
}

.closeout-playbook-table .playbook-task-column {
    width: 9%;
}

.closeout-playbook-table .playbook-use-column {
    width: 13%;
}

.closeout-playbook-table .playbook-status-column {
    width: 15%;
}

.closeout-playbook-table .playbook-actions-column {
    width: 25%;
}

.closeout-playbook-table th,
.closeout-playbook-table td {
    overflow-wrap: anywhere;
}

.closeout-playbook-table th:nth-child(2),
.closeout-playbook-table td:nth-child(2) {
    text-align: center;
}

.closeout-playbook-table td {
    vertical-align: middle;
}

.closeout-playbook-table td:first-child strong {
    display: block;
    color: var(--text-900);
    line-height: 1.35;
}

.table-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 7px 10px;
    border: 1px solid rgba(24, 196, 199, 0.24);
    border-radius: 999px;
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.closeout-playbook-table .table-action-group {
    flex-wrap: nowrap;
    gap: 16px;
}

.job-cell {
    display: grid;
    gap: 4px;
}

.job-cell strong {
    color: var(--text-900);
    font-size: 15px;
    letter-spacing: -0.02em;
}

.job-cell span {
    color: var(--text-700);
    font-size: 14px;
}

.currency-cell {
    color: var(--text-900);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.status-chip,
.billing-chip,
.risk-chip,
.exception-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-chip {
    border: 1px solid rgba(24, 196, 199, 0.14);
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand-strong);
}

.status-chip-warning {
    border-color: rgba(245, 158, 11, 0.20);
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.bonding-status-waiting {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}

.bonding-status-acknowledged {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.18);
    color: #8a5203;
}

.bonding-status-submitted {
    border-color: rgba(22, 163, 74, 0.24);
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.bonding-status-allocated {
    border-color: rgba(13, 148, 136, 0.3);
    background: rgba(13, 148, 136, 0.16);
    color: #0f766e;
}

.bonding-status-no-allocation {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.16);
    color: #991b1b;
}

.bonding-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.bonding-search-shell {
    padding: 18px 22px;
}

.bonding-search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.bonding-search-input {
    min-width: 0;
}

.bonding-search-button {
    min-width: 92px;
    min-height: 44px;
}

@media (max-width: 700px) {
    .bonding-search-bar {
        grid-template-columns: 1fr auto;
    }

    .bonding-search-input {
        grid-column: 1 / -1;
    }
}

.billing-chip-ready {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.billing-chip-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.billing-chip-hold {
    background: rgba(107, 114, 128, 0.18);
    color: #475569;
}

.risk-chip-high {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.risk-chip-medium {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.risk-chip-low {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.wip-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.bucket-list,
.conversion-list,
.exception-list,
.risk-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.bucket-row,
.conversion-item,
.exception-item {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.92);
}

.bucket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bucket-row strong,
.conversion-item strong,
.exception-item strong,
.risk-row strong {
    display: block;
    color: var(--text-900);
    letter-spacing: -0.02em;
}

.bucket-row span,
.conversion-item span,
.exception-item span,
.risk-row span {
    display: block;
    margin-top: 4px;
    color: var(--text-700);
    line-height: 1.62;
}

.bucket-value {
    color: var(--text-900);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.05em;
    white-space: nowrap;
}

.conversion-item,
.exception-item {
    display: grid;
    gap: 4px;
}

.exception-pill {
    width: fit-content;
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand-strong);
}

.exception-item-critical {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(145deg, rgba(254, 226, 226, 0.82), rgba(255, 255, 255, 0.96));
}

.exception-item-critical .exception-pill {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.exception-item-warning {
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(145deg, rgba(254, 243, 199, 0.88), rgba(255, 255, 255, 0.96));
}

.exception-item-warning .exception-pill {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b04;
}

.risk-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 42px;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
}

.risk-row + .risk-row {
    border-top: 1px solid rgba(107, 114, 128, 0.16);
}

.risk-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.9);
}

.risk-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.risk-fill-high {
    width: 68%;
    background: linear-gradient(90deg, #f97316 0%, #dc2626 100%);
}

.risk-fill-medium {
    width: 54%;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.risk-fill-low {
    width: 28%;
    background: linear-gradient(90deg, #67E3E5 0%, #18C4C7 100%);
}

.risk-score {
    color: var(--text-900);
    font-weight: 800;
    text-align: right;
}

.cfm-ribbon-shell {
    overflow-x: visible;
}

.cfm-ribbon {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-width: 0;
}

.cfm-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 0 0 16px;
}

.cfm-group + .cfm-group {
    border-top: 1px solid rgba(107, 114, 128, 0.26);
    padding-top: 16px;
}

.cfm-tile-grid {
    display: grid;
    gap: 14px;
    align-items: stretch;
}

.cfm-tile-grid-1 {
    grid-template-columns: minmax(140px, 220px);
}

.cfm-tile-grid-2 {
    grid-template-columns: repeat(2, minmax(140px, 220px));
}

.cfm-tile-grid-3 {
    grid-template-columns: repeat(3, minmax(140px, 220px));
}

.cfm-tile-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cfm-tile-grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.cfm-tile-grid-6 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.cfm-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 124px;
    padding: 14px 12px;
    border-radius: 26px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 18px 28px rgba(7, 26, 61, 0.08);
    text-align: center;
}

a.cfm-tile {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.cfm-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 196, 199, 0.28);
    box-shadow: 0 24px 34px rgba(7, 26, 61, 0.12);
}

.cfm-tile.is-staged {
    box-shadow: none;
}

.cfm-week-divider {
    position: relative;
    margin-right: 14px;
}

.cfm-week-divider::after {
    content: "";
    position: absolute;
    top: 8px;
    right: -15px;
    bottom: 8px;
    width: 1px;
    background: rgba(107, 114, 128, 0.42);
}

.cfm-icon {
    color: var(--brand);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
}

.cfm-icon-dark {
    color: var(--text-900);
}

.cfm-icon-accent {
    color: var(--accent);
}

.cfm-icon-inflow {
    color: #18C4C7;
}

.cfm-icon-outflow {
    color: #67E3E5;
}

.cfm-icon-receipt {
    color: #16a34a;
    font-size: 40px;
    letter-spacing: -0.08em;
}

.cfm-icon-expense {
    color: #dc2626;
    font-size: 40px;
    letter-spacing: -0.08em;
}

.cfm-icon-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.cfm-rolling-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.cfm-adgl-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-adgl-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-confidence-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-confidence-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-next-week-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-next-week-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-seasonality-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-seasonality-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-loc-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-loc-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-receivables-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-receivables-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-payables-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-payables-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-ude-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-ude-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-investments-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-investments-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-recurring-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-recurring-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-collections-tile-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 14px;
}

.cfm-collections-tile-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cfm-swatch-q1 {
    background: #54ace8;
}

.cfm-swatch-q2 {
    background: #fb8c00;
}

.cfm-swatch-q3 {
    background: #63c67a;
}

.cfm-swatch-q4 {
    background: #cbd5e1;
}

.cfm-swatch-annual {
    background: #fbbf24;
}

/* ADGL */
.adgl-page-shell {
    max-width: 1500px;
}

.adgl-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.adgl-settings-card {
    border-color: rgba(24, 196, 199, 0.24);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.adgl-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

.adgl-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adgl-chart-card {
    overflow: hidden;
}

.adgl-chart-shell {
    width: 100%;
    min-height: 420px;
    overflow-x: auto;
    border: 1px solid rgba(107, 114, 128, 0.22);
    border-radius: 20px;
    background: #fff;
    padding: 12px;
}

.adgl-live-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.adgl-history-table th,
.adgl-history-table td {
    text-align: right;
    white-space: nowrap;
}

.adgl-history-table th:nth-child(1),
.adgl-history-table th:nth-child(2),
.adgl-history-table td:nth-child(1),
.adgl-history-table td:nth-child(2) {
    text-align: left;
}

.adgl-result {
    font-weight: 900;
}

.adgl-result-positive {
    color: #15803d;
    background: rgba(220, 252, 231, 0.72);
}

.adgl-result-improving {
    color: #b45309;
    background: rgba(254, 249, 195, 0.72);
}

.adgl-result-risk {
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.72);
}

.adgl-empty-state {
    padding: 28px !important;
    color: var(--text-500);
    text-align: center !important;
}

@media (max-width: 980px) {
    .adgl-settings-grid,
    .adgl-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adgl-hero {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .adgl-settings-grid,
    .adgl-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.cfm-tile-label {
    color: var(--text-900);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.28;
}

.cfm-group-title {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.cfm-note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(107, 114, 128, 0.20);
    background: rgba(248, 250, 252, 0.74);
    color: var(--text-700);
    line-height: 1.6;
}

.cfm-note a {
    color: var(--primary-700);
    font-weight: 700;
    text-decoration: none;
}

.cfm-note a:hover,
.cfm-note a:focus-visible {
    text-decoration: underline;
}

.cfm-copyright-tagline {
    color: var(--text-500);
}

.rolling-quarter-shell {
    max-width: 1380px;
}

.rolling-quarter-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.rolling-quarter-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 14px;
}

.highlight-chip-warning {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(220, 38, 38, 0.10);
    color: #991b1b;
}

.rolling-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.rolling-kpi {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
}

.rolling-kpi-label,
.rolling-exposure-label {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rolling-kpi strong {
    color: var(--text-900);
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.05em;
}

.rolling-kpi > span:last-child {
    color: var(--text-500);
    font-size: 13px;
}

.rolling-kpi-explained { min-height: 300px; }
.rolling-kpi-explained > .rolling-kpi-summary { color: var(--text-500); font-size: 12px; line-height: 1.4; }
.rolling-kpi-reconciliation { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid rgba(100,116,139,.18); }
.rolling-kpi-source-list { display: grid; gap: 6px; }
.rolling-kpi-source { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #52627a; font-size: 10px; line-height: 1.25; }
.rolling-kpi-source span { min-width: 0; }
.rolling-kpi-source b { flex: 0 0 auto; color: var(--text-900); font-size: 11px; font-weight: 850; letter-spacing: -.01em; }
.rolling-kpi-tie-status { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 8px; color: #237044; font-size: 9px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.rolling-kpi-tie-status i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #3d9460; box-shadow: 0 0 0 3px rgba(61,148,96,.12); }
.rolling-kpi-tie-status.is-warning { color: #a6372b; }
.rolling-kpi-tie-status.is-warning i { background: #c84b3c; box-shadow: 0 0 0 3px rgba(200,75,60,.12); }
.rolling-kpi-equation-wrap { justify-content: space-between; }
.rolling-kpi-equation { display: grid; gap: 7px; }
.rolling-kpi-equation > div { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 10px; }
.rolling-kpi-equation > div span { color: #52627a; font-size: 10px; }
.rolling-kpi-equation > div span i { display: inline-block; width: 11px; color: var(--text-900); font-style: normal; font-weight: 900; }
.rolling-kpi-equation > div b { color: var(--text-900); font-size: 11px; font-weight: 850; }
.rolling-kpi-equation-result { padding-top: 7px; border-top: 1px solid rgba(100,116,139,.18); }

.rolling-kpi-alert {
    border-color: rgba(220, 38, 38, 0.22);
    background: linear-gradient(145deg, rgba(254, 226, 226, 0.82), rgba(255, 255, 255, 0.96));
}

.rolling-kpi-alert strong {
    color: #b91c1c;
}

.rolling-kpi-positive {
    border-color: rgba(22, 163, 74, 0.20);
    background: linear-gradient(145deg, rgba(220, 252, 231, 0.72), rgba(255, 255, 255, 0.96));
}

.prediction-compliance-card {
    position: relative;
    align-items: center;
    min-height: 220px;
    overflow: hidden;
    text-align: center;
}

.prediction-compliance-card > .rolling-kpi-label {
    align-self: stretch;
    text-align: left;
}

.prediction-gauge {
    position: relative;
    width: min(100%, 190px);
    margin: 2px auto 0;
}

.prediction-gauge svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.prediction-gauge path {
    fill: none;
    stroke-width: 11;
    stroke-linecap: round;
}

.prediction-gauge-track { stroke: #dbe5ef; }
.prediction-gauge-fill {
    stroke: #64748b;
    stroke-dasharray: var(--prediction-score, 0) 100;
    transition: stroke-dasharray 500ms ease;
}

.prediction-gauge-value {
    position: absolute;
    inset: auto 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.prediction-gauge-value b {
    color: var(--text-900);
    font-size: 29px;
    letter-spacing: -0.05em;
}

.prediction-gauge-value small {
    margin-top: 3px;
    color: var(--text-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.prediction-compliance-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.prediction-compliance-status i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.prediction-compliance-card > p {
    min-height: 32px;
    margin: 0;
    color: var(--text-500);
    font-size: 12px;
    line-height: 1.35;
}

.prediction-compliance-card > a {
    color: #087f86;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.prediction-compliance-card > a:hover { text-decoration: underline; }
.prediction-compliance-strong { border-color: rgba(22, 163, 74, 0.28); background: linear-gradient(145deg, rgba(220, 252, 231, 0.72), rgba(255, 255, 255, 0.96)); }
.prediction-compliance-strong .prediction-gauge-fill { stroke: #16a34a; }
.prediction-compliance-strong .prediction-compliance-status { color: #15803d; }
.prediction-compliance-watch { border-color: rgba(245, 158, 11, 0.30); background: linear-gradient(145deg, rgba(254, 243, 199, 0.72), rgba(255, 255, 255, 0.96)); }
.prediction-compliance-watch .prediction-gauge-fill { stroke: #f59e0b; }
.prediction-compliance-watch .prediction-compliance-status { color: #a16207; }
.prediction-compliance-risk { border-color: rgba(220, 38, 38, 0.26); background: linear-gradient(145deg, rgba(254, 226, 226, 0.72), rgba(255, 255, 255, 0.96)); }
.prediction-compliance-risk .prediction-gauge-fill { stroke: #dc2626; }
.prediction-compliance-risk .prediction-compliance-status { color: #b91c1c; }
.prediction-compliance-baseline .prediction-gauge-fill { stroke: #64748b; }

.rolling-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 700;
}

.rolling-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.legend-dot-inflow {
    background: #16a34a;
}

.legend-dot-outflow {
    background: #f97316;
}

.legend-dot-strong {
    background: #15803d;
}

.legend-dot-watch {
    background: #d97706;
}

.legend-dot-risk {
    background: #b91c1c;
}

.rolling-card-status-key {
    justify-content: flex-end;
}

.rolling-card-status-key span {
    white-space: nowrap;
}

.rolling-cash-curve-card {
    padding-top: 22px;
    padding-bottom: 24px;
}

.rolling-cash-curve-card > .section-heading {
    margin-bottom: 12px;
}

.rolling-cash-curve-card > .section-heading h2 {
    margin-top: 2px;
    font-size: 1.35rem;
    line-height: 1.15;
}

.rolling-cash-curve-card > .section-heading .section-kicker {
    margin-bottom: 3px;
}

.forecast-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.forecast-week {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    background: rgba(248, 250, 252, 0.92);
}

.forecast-week-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.forecast-week-link:hover {
    transform: translateY(-3px);
    filter: brightness(1.04);
}

.forecast-week-link:focus-visible {
    outline: 3px solid #67E3E5;
    outline-offset: 3px;
}

.forecast-week-open-cue {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.forecast-week-date {
    padding: 10px 13px;
    background: linear-gradient(135deg, #18C4C7, #071A3D);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.forecast-week-opening,
.forecast-week-ending {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 13px;
    color: var(--text-500);
    font-size: 12px;
}

.forecast-week-opening strong,
.forecast-week-ending strong {
    color: var(--text-900);
    font-size: 14px;
}

.forecast-week-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(107, 114, 128, 0.18);
    border-top: 1px solid rgba(107, 114, 128, 0.16);
    border-bottom: 1px solid rgba(107, 114, 128, 0.16);
}

.forecast-week-flow span {
    padding: 10px 8px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.forecast-week-flow span:first-child {
    color: #15803d;
}

.forecast-week-flow span:last-child {
    color: #c2410c;
}

.forecast-week-ending {
    background: rgba(219, 234, 254, 0.46);
}

.forecast-week-risk {
    border-color: rgba(220, 38, 38, 0.32);
}

.forecast-week-risk .forecast-week-date {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.forecast-week-risk .forecast-week-opening strong {
    color: #b91c1c;
}

.forecast-week-strong .forecast-week-date {
    background: linear-gradient(135deg, #16a34a, #166534);
}

.forecast-week-watch .forecast-week-date {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.forecast-week.forecast-week-risk,
.forecast-week.forecast-week-watch,
.forecast-week.forecast-week-strong {
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(7, 26, 61, 0.13);
}

.forecast-week.forecast-week-risk {
    border-color: #7f1d1d;
    background: linear-gradient(145deg, #b91c1c, #7f1d1d);
}

.forecast-week.forecast-week-watch {
    border-color: #c2410c;
    background: linear-gradient(145deg, #d97706, #c2410c);
}

.forecast-week.forecast-week-strong {
    border-color: #14532d;
    background: linear-gradient(145deg, #15803d, #14532d);
}

.forecast-week.forecast-week-risk .forecast-week-date,
.forecast-week.forecast-week-watch .forecast-week-date,
.forecast-week.forecast-week-strong .forecast-week-date {
    background: rgba(7, 26, 61, 0.22);
}

.forecast-week.forecast-week-risk .forecast-week-opening,
.forecast-week.forecast-week-risk .forecast-week-ending,
.forecast-week.forecast-week-watch .forecast-week-opening,
.forecast-week.forecast-week-watch .forecast-week-ending,
.forecast-week.forecast-week-strong .forecast-week-opening,
.forecast-week.forecast-week-strong .forecast-week-ending {
    color: rgba(255, 255, 255, 0.78);
}

.forecast-week.forecast-week-risk .forecast-week-opening strong,
.forecast-week.forecast-week-risk .forecast-week-ending strong,
.forecast-week.forecast-week-watch .forecast-week-opening strong,
.forecast-week.forecast-week-watch .forecast-week-ending strong,
.forecast-week.forecast-week-strong .forecast-week-opening strong,
.forecast-week.forecast-week-strong .forecast-week-ending strong {
    color: #ffffff;
}

.forecast-week.forecast-week-risk .forecast-week-flow,
.forecast-week.forecast-week-watch .forecast-week-flow,
.forecast-week.forecast-week-strong .forecast-week-flow {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.forecast-week.forecast-week-risk .forecast-week-flow span,
.forecast-week.forecast-week-watch .forecast-week-flow span,
.forecast-week.forecast-week-strong .forecast-week-flow span {
    background: rgba(255, 255, 255, 0.08);
}

.forecast-week.forecast-week-risk .forecast-week-flow span:first-child,
.forecast-week.forecast-week-watch .forecast-week-flow span:first-child,
.forecast-week.forecast-week-strong .forecast-week-flow span:first-child {
    color: #bbf7d0;
}

.forecast-week.forecast-week-risk .forecast-week-flow span:last-child,
.forecast-week.forecast-week-watch .forecast-week-flow span:last-child,
.forecast-week.forecast-week-strong .forecast-week-flow span:last-child {
    color: #fed7aa;
}

.forecast-week.forecast-week-risk .forecast-week-ending,
.forecast-week.forecast-week-watch .forecast-week-ending,
.forecast-week.forecast-week-strong .forecast-week-ending {
    background: rgba(7, 26, 61, 0.16);
}

.rolling-kpi-warning {
    border-color: rgba(194, 65, 12, 0.36);
    background: linear-gradient(145deg, rgba(254, 215, 170, 0.88), rgba(254, 240, 138, 0.72));
}

.rolling-week-shell {
    max-width: 1280px;
}

.rolling-week-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.rolling-week-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.rolling-week-summary > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 17px 19px;
    border: 1px solid rgba(107, 114, 128, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
}

.rolling-week-summary span {
    color: var(--text-500);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rolling-week-summary strong {
    color: var(--text-900);
    font-size: 24px;
}

.rolling-week-summary .cash-positive { color: #15803d; }
.rolling-week-summary .cash-negative { color: #c2410c; }

.cash-sheet {
    overflow: hidden;
    border: 1px solid rgba(24, 196, 199, 0.34);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(7, 26, 61, 0.13);
}

.cash-sheet-titlebar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-height: 112px;
    border-bottom: 12px solid #18C4C7;
}

.cash-sheet-titlebar > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 24px 30px;
}

.cash-sheet-titlebar span {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.cash-sheet-titlebar strong {
    color: var(--text-900);
    font-size: clamp(25px, 4vw, 40px);
    letter-spacing: -0.035em;
}

.cash-sheet-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    min-width: 190px;
    padding: 20px 28px;
    border-left: 1px solid rgba(24, 196, 199, 0.28);
    background: #fef9c3;
}

.cash-sheet-date strong {
    font-size: 24px;
}

.cash-sheet-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 18px;
    border-top: 1px solid rgba(7, 26, 61, 0.18);
    border-bottom: 1px solid rgba(7, 26, 61, 0.18);
    background: #eff6ff;
    color: #0f172a;
    font-size: 17px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.cash-sheet-section h2 span,
.cash-sheet-ending > div > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #18C4C7;
    color: #ffffff;
    font-size: 12px;
}

.cash-sheet-section h2 em {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 750;
}

.cash-sheet-section h3 {
    margin: 0;
    padding: 8px 18px;
    border-bottom: 1px solid rgba(7, 26, 61, 0.12);
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cash-sheet-row,
.cash-sheet-total,
.cash-sheet-ending {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
    align-items: stretch;
}

.cash-sheet-row > div,
.cash-sheet-row > strong,
.cash-sheet-total > span,
.cash-sheet-total > strong {
    padding: 10px 18px;
    border-bottom: 1px dotted rgba(7, 26, 61, 0.36);
}

.cash-sheet-row > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    background: #fff7ed;
    color: #172033;
    font-weight: 700;
}

.cash-sheet-row small {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.cash-sheet-source-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.cash-sheet-source-link > span {
    color: #18C4C7;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: rgba(24, 196, 199, 0.35);
    text-underline-offset: 3px;
}

.cash-sheet-source-link:hover > span,
.cash-sheet-source-link:focus-visible > span {
    color: #084f8c;
    text-decoration-color: currentColor;
}

.cash-sheet-row > strong,
.cash-sheet-total > strong {
    border-left: 1px solid rgba(24, 196, 199, 0.24);
    background: #dbeafe;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.cash-sheet-row-emphasis > div,
.cash-sheet-row-emphasis > strong {
    background: #fef9c3;
}

.cash-sheet-row-muted {
    opacity: 0.68;
}

.cash-sheet-total {
    font-size: 16px;
    font-style: italic;
    font-weight: 900;
    text-transform: uppercase;
}

.cash-sheet-total > span {
    background: #ffffff;
    text-align: right;
}

.cash-sheet-total-inflow > strong { color: #15803d; }
.cash-sheet-total-outflow > strong { color: #c2410c; }

.cash-sheet-ending {
    align-items: center;
    border-top: 10px solid #18C4C7;
    background: #eff6ff;
}

.cash-sheet-ending > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 4px 12px;
    padding: 18px;
}

.cash-sheet-ending > div > span {
    grid-row: 1 / span 2;
}

.cash-sheet-ending > div > strong {
    font-size: 18px;
    text-transform: uppercase;
}

.cash-sheet-ending small {
    color: var(--text-500);
}

.cash-sheet-ending > strong {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 18px;
    border-left: 1px solid rgba(24, 196, 199, 0.28);
    background: #bfdbfe;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
}

.cash-state-risk { border-color: #ef4444 !important; background-color: #fee2e2 !important; }
.cash-state-risk > strong, .cash-state-risk strong { color: #b91c1c !important; }
.cash-state-watch { border-color: #f59e0b !important; background-color: #fef3c7 !important; }
.cash-state-watch > strong, .cash-state-watch strong { color: #b45309 !important; }
.cash-state-strong { border-color: #22c55e !important; }
.cash-state-strong > strong, .cash-state-strong strong { color: #15803d !important; }

@media (max-width: 820px) {
    .rolling-week-hero {
        flex-direction: column;
    }

    .rolling-week-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-sheet-titlebar {
        min-height: 0;
    }

    .cash-sheet-titlebar > div:first-child {
        padding: 20px;
    }

    .cash-sheet-date {
        min-width: 130px;
        padding: 16px;
    }

    .cash-sheet-row,
    .cash-sheet-total,
    .cash-sheet-ending {
        grid-template-columns: minmax(0, 1fr) 135px;
    }

    .cash-sheet-row > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

@media (max-width: 540px) {
    .rolling-week-summary {
        grid-template-columns: 1fr;
    }

    .cash-sheet-titlebar {
        flex-direction: column;
    }

    .cash-sheet-date {
        align-items: flex-start;
        border-top: 1px solid rgba(24, 196, 199, 0.28);
        border-left: 0;
    }

    .cash-sheet-row,
    .cash-sheet-total,
    .cash-sheet-ending {
        grid-template-columns: minmax(0, 1fr) 112px;
    }

    .cash-sheet-row > div,
    .cash-sheet-row > strong,
    .cash-sheet-total > span,
    .cash-sheet-total > strong {
        padding: 9px 11px;
    }
}

.investment-journal-shell { max-width: 1600px; }
.journal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.investment-grid-wrap { overflow-x: auto; margin-top: 20px; border: 1px solid rgba(148,163,184,.24); border-radius: 18px; }
.investment-grid { width: 100%; min-width: 1900px; border-collapse: collapse; background: #fff; }
.investment-grid th { padding: 12px 9px; background: #18C4C7; color: #fff; font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.investment-grid td { padding: 7px; border-top: 1px solid rgba(148,163,184,.20); border-right: 1px solid rgba(148,163,184,.16); background: rgba(254,249,195,.42); }
.investment-grid tbody tr:nth-child(even) td { background: rgba(239,246,255,.72); }
.investment-name-column { min-width: 300px; text-align: left; }
.investment-direction-column { min-width: 175px; }
.investment-name-editor { display: flex; align-items: center; gap: 8px; }
.investment-name-input { flex: 1 1 285px; min-width: 0; font-weight: 750; }
.investment-direction-input { min-width: 165px; }
.investment-amount-input { width: 105px; min-width: 105px; text-align: right; }
.loc-grid { min-width: 2400px; }
.loc-week-cell { min-width: 125px; }
.loc-week-cell label { display:block; margin:4px 0 2px; color:var(--text-500); font-size:9px; font-weight:800; text-transform:uppercase; }
.ude-name-actions { display:flex; align-items:center; gap:8px; }
.opening-cash-editor { gap:8px; }
.opening-cash-input { max-width:180px; font-size:20px; font-weight:850; }
.opening-cash-save { align-self:flex-start; min-height:34px; padding:7px 11px; font-size:12px; }
.opening-cash-editor .message { margin-top:2px; padding:8px 10px; font-size:11px; }
.cash-position-card-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(59, 130, 246, 0.20);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 20px 46px rgba(7, 26, 61, 0.18);
}

.opening-balance-heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 0 6px;
}

.opening-balance-heading h2 {
    margin: 0;
    color: var(--text-900);
    font-size: 16px;
    letter-spacing: -0.02em;
}

.opening-balance-heading span {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 750;
}

.cash-position-card-group .opening-cash-editor {
    display: grid;
    grid-template-columns: minmax(130px, 180px) auto;
    align-content: start;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    min-height: 112px;
    padding: 13px 16px;
    border-radius: 18px;
}

.cash-position-card-group .opening-cash-editor > .rolling-kpi-label {
    grid-column: 1 / -1;
}

.cash-position-card-group .opening-cash-input {
    width: 100%;
    max-width: 180px;
    min-height: 42px;
    padding: 7px 10px;
    font-size: 18px;
}

.cash-position-card-group .opening-cash-save {
    align-self: center;
    min-height: 36px;
    padding: 7px 11px;
    white-space: nowrap;
}

.cash-position-card-group .cash-position-autosave-status {
    align-self: center;
    min-height: 36px;
    padding: 7px 11px;
    white-space: nowrap;
}

.cash-position-card-group .cash-position-rollover-status {
    grid-column: 1 / -1;
    width: 100%;
}

.cash-position-card-group .cash-position-explanation {
    grid-column: 2;
    align-self: center;
    color: var(--text-500);
    line-height: 1.25;
}

.cash-position-card-group .opening-cash-input[readonly] {
    border-color: rgba(8, 127, 134, 0.35);
    background: #eafafa;
    color: #075d63;
    cursor: default;
}

.check-journal-launch {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 7px;
    max-width: 100%;
    padding: 3px 5px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #087f86;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.check-journal-launch:hover,
.check-journal-launch:focus-visible { background: rgba(24, 196, 199, 0.10); outline: none; }

.check-journal-launch-icon {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #e1f8f8;
}

.check-journal-launch-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.check-journal-launch-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.12; }
.check-journal-launch-copy b { font-size: 11px; font-weight: 850; }
.check-journal-launch-copy small { overflow: hidden; color: #64748b; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.next-week-confidence-meter {
    --confidence-color: #64748b;
    --confidence-soft: #e2e8f0;
    --confidence-border: rgba(100, 116, 139, .28);
    --confidence-background: #f7f9fb;
    --confidence-shadow: rgba(100, 116, 139, .16);
    --confidence-score: 0;
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--confidence-border);
    border-radius: 16px;
    background: var(--confidence-background);
    color: var(--text-900);
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.next-week-confidence-meter:hover,
.next-week-confidence-meter:focus-visible {
    border-color: var(--confidence-color);
    box-shadow: 0 12px 28px var(--confidence-shadow);
    outline: none;
    transform: translateY(-1px);
}

.next-week-confidence-meter-heading,
.next-week-confidence-meter-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.next-week-confidence-meter-heading > b {
    color: var(--text-600);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.next-week-confidence-meter-heading > strong {
    color: var(--confidence-color);
    font-size: 22px;
    line-height: 1;
}

.next-week-confidence-meter-track {
    display: block;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--confidence-soft);
}

.next-week-confidence-meter-track > i {
    display: block;
    width: calc(var(--confidence-score) * 1%);
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--confidence-color);
    transition: width .35s ease;
}

.next-week-confidence-meter-copy > b { color: var(--confidence-color); font-size: 13px; }
.next-week-confidence-meter-copy > small { color: var(--text-500); text-align: right; }
.next-week-confidence-meter-link { color: #087f86; font-size: 12px; font-weight: 850; text-align: right; }
.next-week-confidence-meter-link i { font-style: normal; }
.next-week-confidence-meter-strong { --confidence-color: #16845b; --confidence-soft: #d9f4e8; --confidence-border: rgba(22, 132, 91, .28); --confidence-background: #f2fbf7; --confidence-shadow: rgba(22, 132, 91, .16); }
.next-week-confidence-meter-watch { --confidence-color: #b66a08; --confidence-soft: #fff0ca; --confidence-border: rgba(182, 106, 8, .28); --confidence-background: #fffaf0; --confidence-shadow: rgba(182, 106, 8, .16); }
.next-week-confidence-meter-risk { --confidence-color: #c5252a; --confidence-soft: #fde3e3; --confidence-border: rgba(197, 37, 42, .28); --confidence-background: #fff6f6; --confidence-shadow: rgba(197, 37, 42, .16); }
.next-week-confidence-meter-baseline { --confidence-color: #64748b; --confidence-soft: #e2e8f0; }

@media (max-width: 620px) {
    .next-week-confidence-meter-copy { align-items: flex-start; flex-direction: column; gap: 3px; }
    .next-week-confidence-meter-copy > small { text-align: left; }
}

.cash-position-card-group .opening-cash-editor > span:last-child,
.cash-position-card-group .opening-cash-editor > .message {
    grid-column: 1 / -1;
    margin: 0;
    line-height: 1.25;
}

@media (max-width: 1050px) {
    .cash-position-card-group { grid-column: 1 / -1; grid-template-columns: 1fr; }
    .opening-balance-heading { flex-wrap: wrap; }
}

@media (max-width: 520px) {
    .cash-position-card-group .opening-cash-editor { grid-template-columns: 1fr; }
    .cash-position-card-group .opening-cash-editor > * { grid-column: 1; }
}

.check-journal-open { overflow: hidden; }

.check-journal-overlay {
    position: fixed;
    z-index: 1090;
    inset: 0;
    display: block;
    visibility: hidden;
    border: 0;
    background: rgba(3, 15, 35, 0.48);
    opacity: 0;
    cursor: pointer;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.check-journal-overlay.is-open { visibility: visible; opacity: 1; }

.check-journal-drawer {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(760px, calc(100vw - 28px));
    overflow-y: auto;
    padding: 26px;
    border-left: 1px solid rgba(59, 130, 246, 0.20);
    background: #f6f9fd;
    box-shadow: -24px 0 70px rgba(4, 20, 47, 0.28);
    transform: translateX(104%);
    transition: transform 220ms ease;
}

.check-journal-drawer.is-open { transform: translateX(0); }

.check-journal-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.check-journal-drawer-head h2 { margin: 3px 0 5px; font-size: 25px; letter-spacing: -0.035em; }
.check-journal-drawer-head p { max-width: 580px; margin: 0; color: var(--text-500); font-size: 13px; line-height: 1.45; }
.check-journal-close { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid #d7e1ec; border-radius: 11px; background: #fff; color: #334155; font: inherit; font-size: 25px; line-height: 1; cursor: pointer; }
.check-journal-close:hover { border-color: #9fb5c9; background: #edf4fa; }

.check-journal-summary {
    display: grid;
    grid-template-columns: 140px 190px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.check-journal-summary > div,
.check-journal-summary > p {
    min-width: 0;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #dce7f1;
    border-radius: 14px;
    background: #fff;
}

.check-journal-summary > div { display: flex; flex-direction: column; gap: 3px; }
.check-journal-summary > div span { color: var(--text-500); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.check-journal-summary > div strong { color: var(--text-900); font-size: 22px; letter-spacing: -.04em; }
.check-journal-summary > p { display: flex; align-items: center; color: #52627a; font-size: 12px; line-height: 1.35; }

.check-journal-entry-card,
.check-journal-active {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #dce7f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(10, 35, 70, 0.06);
}

.check-journal-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.check-journal-section-heading h3 { margin: 2px 0 0; font-size: 17px; letter-spacing: -.02em; }
.check-journal-entry-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr) 150px; gap: 11px; }
.check-journal-entry-grid .form-row { margin: 0; }
.check-journal-entry-grid .form-row label { font-size: 11px; }
.check-journal-entry-grid .input { width: 100%; min-height: 40px; padding: 8px 10px; }
.check-journal-add { margin-top: 12px; }
.check-journal-add.is-busy,
.check-journal-clear.is-busy { opacity: .65; pointer-events: none; }
.check-journal-add.is-busy::after,
.check-journal-clear.is-busy::after {
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-left: 7px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    vertical-align: -.1em;
    animation: check-journal-spin .7s linear infinite;
}
@keyframes check-journal-spin { to { transform: rotate(360deg); } }

.check-journal-table { overflow: hidden; border: 1px solid #e1e8f0; border-radius: 12px; }
.check-journal-table-head,
.check-journal-table-row { display: grid; grid-template-columns: 90px minmax(150px, 1fr) 110px 90px; gap: 12px; align-items: center; }
.check-journal-table-head { padding: 9px 11px; background: #edf4fa; color: #64748b; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.check-journal-table-row { padding: 11px; border-top: 1px solid #e7edf4; color: #475569; font-size: 11px; }
.check-journal-table-row:first-of-type { border-top: 0; }
.check-journal-number { color: #0f766e; font-weight: 850; }
.check-journal-payee { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.check-journal-payee strong { overflow: hidden; color: var(--text-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.check-journal-payee span { overflow: hidden; color: var(--text-500); text-overflow: ellipsis; white-space: nowrap; }
.check-journal-amount { color: var(--text-900); font-size: 12px; text-align: right; }
.check-journal-clear { color: #087f86; font-size: 10px; font-weight: 850; white-space: nowrap; }

.check-journal-clear-confirm[hidden] { display: none; }
.check-journal-clear-confirm {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 12px;
    padding: 15px;
    border: 1px solid #99d5d8;
    border-radius: 13px;
    background: linear-gradient(135deg, #effcfc 0%, #f8fbff 100%);
    box-shadow: 0 12px 28px rgba(15, 118, 110, .09);
}
.check-journal-clear-confirm-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 999px; background: #d6f5f2; color: #0f766e; font-size: 17px; font-weight: 900; }
.check-journal-clear-confirm-copy { min-width: 0; }
.check-journal-clear-confirm-copy h4 { margin: 3px 0 5px; color: var(--text-900); font-size: 15px; }
.check-journal-clear-confirm-copy p { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0; color: #475569; font-size: 12px; }
.check-journal-clear-confirm-copy p strong { color: #0f766e; }
.check-journal-clear-confirm-copy small { display: block; margin-top: 5px; color: #64748b; font-size: 10px; }
.check-journal-clear-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.check-journal-clear-cancel,
.check-journal-clear-confirm-button { min-height: 34px; padding: 7px 13px; border-radius: 9px; font-size: 11px; font-weight: 850; cursor: pointer; }
.check-journal-clear-cancel { border: 1px solid #cbd5e1; background: #fff; color: #475569; }
.check-journal-clear-confirm-button { border: 1px solid #0f766e; background: #0f766e; color: #fff; }
.check-journal-clear-cancel:hover { background: #f8fafc; }
.check-journal-clear-confirm-button:hover { background: #0b625c; }
.check-journal-clear-cancel:focus-visible,
.check-journal-clear-confirm-button:focus-visible { outline: 3px solid rgba(34, 211, 238, .32); outline-offset: 2px; }

.check-journal-empty { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed #bfd1df; border-radius: 12px; background: #f8fbfe; }
.check-journal-empty > span { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 999px; background: #dcfce7; color: #15803d; font-weight: 900; }
.check-journal-empty strong { color: var(--text-900); }
.check-journal-empty p { margin: 3px 0 0; color: var(--text-500); font-size: 11px; }

@media (max-width: 700px) {
    .check-journal-drawer { width: 100vw; padding: 20px 15px; }
    .check-journal-summary { grid-template-columns: 1fr 1fr; }
    .check-journal-summary > p { grid-column: 1 / -1; }
    .check-journal-entry-grid { grid-template-columns: 1fr 1fr; }
    .check-journal-table { overflow-x: auto; }
    .check-journal-table-head,
    .check-journal-table-row { min-width: 600px; }
}

@media (max-width: 460px) {
    .check-journal-entry-grid { grid-template-columns: 1fr; }
    .check-journal-entry-grid .form-row { grid-column: 1; }
}

.rolling-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rolling-driver-card h2 {
    margin-bottom: 18px;
}

.rolling-driver-card {
    display: flex;
    flex-direction: column;
}

.rolling-driver-list {
    display: grid;
    gap: 0;
}

.rolling-driver-paired-list > div {
    min-height: 54px;
}

.rolling-driver-unmatched-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid rgba(107, 114, 128, 0.16);
}

.rolling-driver-list .rolling-driver-reconciliation-warning {
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, 0.34);
    border-radius: 10px;
    background: #fff8e5;
}

.rolling-driver-list .rolling-driver-reconciliation-warning span,
.rolling-driver-list .rolling-driver-reconciliation-warning strong {
    color: #92400e;
}

.rolling-driver-card .rolling-driver-total {
    margin-top: auto;
}

.rolling-driver-list > div,
.rolling-driver-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid rgba(107, 114, 128, 0.16);
}

.rolling-driver-list span {
    color: var(--text-700);
}

.rolling-driver-list strong,
.rolling-driver-total strong {
    color: var(--text-900);
    white-space: nowrap;
}

.rolling-driver-hotlink {
    color: #047857;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.rolling-driver-label-hotlink {
    color: #047857;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.rolling-driver-hotlink:hover,
.rolling-driver-hotlink:focus-visible,
.rolling-driver-label-hotlink:hover,
.rolling-driver-label-hotlink:focus-visible {
    color: #065f46;
}

.rolling-driver-hotlink-outflow,
.rolling-driver-label-hotlink-outflow {
    color: #c2410c;
}

.rolling-driver-hotlink-outflow:hover,
.rolling-driver-hotlink-outflow:focus-visible,
.rolling-driver-label-hotlink-outflow:hover,
.rolling-driver-label-hotlink-outflow:focus-visible {
    color: #9a3412;
}

.cash-journal-card,
.cash-expenses-card {
    scroll-margin-top: 24px;
}

.rolling-driver-total {
    margin-top: 8px;
    padding: 15px 16px;
    border: 0;
    border-radius: 16px;
    background: rgba(22, 163, 74, 0.10);
    color: #166534;
    font-weight: 800;
}

.rolling-driver-total-outflow {
    background: rgba(249, 115, 22, 0.11);
    color: #9a3412;
}

.rolling-exposure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rolling-exposure-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.88);
}

.rolling-exposure-card strong {
    color: var(--text-900);
    font-size: 18px;
}

.rolling-exposure-card > span:last-child {
    color: var(--text-700);
    line-height: 1.5;
}

.rolling-exposure-card-accent {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(254, 243, 199, 0.58);
}

.rolling-ude-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.rolling-ude-list span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(24, 196, 199, 0.08);
    color: #18C4C7;
    font-size: 12px;
    font-weight: 700;
}

.cash-receipts-shell {
    max-width: 1380px;
}

.cash-receipts-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.receipt-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
    gap: 9px;
}

.receipt-balance {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(219, 234, 254, 0.46);
}

.receipt-balance span {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.receipt-balance strong {
    color: var(--text-900);
    font-size: 15px;
}

.receipt-balance.receipt-balance-risk {
    border-color: rgba(220, 38, 38, 0.34);
    background-color: #fee2e2;
    background: linear-gradient(145deg, rgba(254, 202, 202, 0.90), rgba(254, 226, 226, 0.82));
}

.receipt-balance.receipt-balance-risk strong {
    color: #b91c1c;
}

.receipt-balance.receipt-balance-caution {
    border-color: rgba(202, 138, 4, 0.34);
    background-color: #fef3c7;
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.92) 0%, rgba(254, 249, 195, 0.88) 48%, rgba(254, 226, 226, 0.88) 100%);
}

.receipt-balance.receipt-balance-caution strong {
    color: #92400e;
}

.receipt-balance.receipt-balance-positive {
    border-color: rgba(22, 163, 74, 0.42);
    background-color: #dcfce7;
    background: linear-gradient(145deg, #bbf7d0, #dcfce7);
}

.receipt-balance.receipt-balance-positive strong {
    color: #166534;
}

.cash-receipts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.receipt-add-button {
    min-height: 44px;
    padding: 10px 15px;
}

.receipt-week-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 0.75fr));
    gap: 12px;
    margin-bottom: 18px;
}

.receipt-week-focus,
.receipt-week-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 92px;
    padding: 15px 17px;
    border-radius: 17px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    background: rgba(248, 250, 252, 0.86);
}

.receipt-week-focus {
    background: linear-gradient(145deg, rgba(217, 249, 157, 0.66), rgba(255, 255, 255, 0.96));
    border-color: rgba(101, 163, 13, 0.22);
}

.receipt-week-label,
.receipt-week-stat span {
    color: var(--text-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.receipt-week-focus strong {
    color: var(--text-900);
    font-size: 20px;
}

.receipt-week-focus > span:last-child {
    color: #3f6212;
    font-size: 13px;
    font-weight: 800;
}

.receipt-week-stat strong {
    color: var(--text-900);
    font-size: 22px;
}

.receipt-list {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(107, 114, 128, 0.20);
}

.receipt-list-head,
.receipt-list-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.8fr) minmax(100px, 0.7fr) minmax(90px, 0.55fr);
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
}

.receipt-list-head {
    background: rgba(241, 245, 249, 0.96);
    color: var(--text-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.receipt-list-row {
    color: var(--text-700);
}

.receipt-list-row + .receipt-list-row {
    border-top: 1px solid rgba(107, 114, 128, 0.16);
}

.receipt-list-head.expense-list-with-actions,
.receipt-list-row.expense-list-with-actions {
    grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.8fr) minmax(100px, 0.7fr) minmax(90px, 0.55fr) minmax(65px, 0.4fr);
}

.expense-delete-button {
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.expense-delete-button:hover {
    color: #7f1d1d;
    text-decoration: underline;
}

.receipt-source {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.receipt-source strong,
.receipt-amount {
    color: var(--text-900);
}

.receipt-source span {
    color: var(--text-500);
    font-size: 12px;
}

.receipt-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.receipt-status-planned {
    background: rgba(101, 163, 13, 0.12);
    color: #3f6212;
}

.receipt-status-archived {
    background: rgba(217, 119, 6, 0.14);
    color: #92400e;
}

.receipt-empty-state {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px dashed rgba(107, 114, 128, 0.34);
    background: rgba(248, 250, 252, 0.62);
}

.receipt-empty-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: rgba(24, 196, 199, 0.10);
    color: var(--brand);
    font-size: 20px;
    font-weight: 800;
}

.receipt-empty-state div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.receipt-empty-state strong {
    color: var(--text-900);
}

.receipt-empty-state div span {
    color: var(--text-700);
    font-size: 13px;
    line-height: 1.55;
}

.receipt-entry-card {
    position: sticky;
    top: 106px;
}

.receipt-entry-card h2 {
    margin-bottom: 10px;
}

.receipt-entry-form {
    margin-top: 20px;
}

.receipt-save-button {
    width: 100%;
}

.receipt-forecast-note {
    margin-top: 18px;
    font-size: 13px;
}

.cash-expenses-page .eyebrow,
.cash-expenses-page .section-kicker {
    color: #b23b38;
}

.expense-highlight-chip {
    border-color: rgba(185, 28, 28, 0.16);
    background: rgba(185, 28, 28, 0.08);
    color: #991b1b;
}

.expense-primary-button {
    background: linear-gradient(135deg, #c85550, #9f2f2c);
    box-shadow: 0 18px 32px rgba(159, 47, 44, 0.22);
}

.expense-week-focus {
    border-color: rgba(185, 28, 28, 0.20);
    background: linear-gradient(145deg, rgba(254, 226, 226, 0.78), rgba(255, 255, 255, 0.96));
}

.expense-week-focus > span:last-child,
.expense-amount {
    color: #991b1b;
}

.expense-status-planned {
    background: rgba(185, 28, 28, 0.10);
    color: #991b1b;
}

.expense-empty-icon {
    background: rgba(185, 28, 28, 0.09);
    color: #b23b38;
}

.expense-clearing-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.20);
    background: rgba(254, 243, 199, 0.48);
}

.expense-clearing-note div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.expense-clearing-note strong {
    color: var(--text-900);
}

.expense-clearing-note div span {
    color: var(--text-700);
    font-size: 13px;
    line-height: 1.55;
}

.recurring-shell {
    max-width: 1560px;
}

.recurring-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.recurring-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.recurring-kpi {
    display: grid;
    gap: 7px;
    min-height: 132px;
    padding: 22px;
    border: 1px solid rgba(107, 114, 128, 0.18);
    border-top: 4px solid #84cc16;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.recurring-kpi span {
    color: var(--text-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recurring-kpi strong {
    color: var(--text-900);
    font-size: 1.7rem;
    line-height: 1;
}

.recurring-kpi small {
    color: var(--text-500);
}

.recurring-kpi-payroll {
    border-top-color: #0f766e;
}

.recurring-setup-card {
    border-left: 5px solid #84cc16;
}

.recurring-calendar-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    background: #d9f99d;
    font-size: 1.65rem;
}

.recurring-setup-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr auto;
    align-items: end;
    gap: 16px;
}

.recurring-apply-button,
.recurring-add-button {
    border-color: #65a30d;
    background: #65a30d;
    color: #ffffff;
}

.recurring-apply-button:hover,
.recurring-add-button:hover {
    border-color: #4d7c0f;
    background: #4d7c0f;
}

.recurring-schedule-card {
    scroll-margin-top: 24px;
    overflow: hidden;
}

.recurring-schedule-heading {
    align-items: flex-end;
}

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

.recurring-actions .button-link {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.recurring-autosave-submit { display: none !important; }
.recurring-autosave-status { min-height: 42px; }

.recurring-table-add-row {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 10px;
}

.recurring-table-add-row .button-link {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.recurring-tool-card {
    border: 1px solid rgba(107, 114, 128, 0.2);
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
}

.biweekly-payroll-setup {
    background: rgba(240, 253, 250, 0.72);
}

.payroll-import-card {
    background: #ffffff;
}

.biweekly-payroll-body {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.2fr);
    align-items: end;
    gap: 18px;
    padding: 0 16px 16px;
}

.biweekly-payroll-body p {
    margin: 0;
    color: var(--text-700);
    font-size: 0.8rem;
    line-height: 1.5;
}

.payroll-import-subsection {
    margin: 0 16px 16px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 11px;
    background: #ffffff;
    overflow: hidden;
}

.payroll-import-subsection > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    color: var(--text-900);
    cursor: pointer;
    list-style: none;
}

.payroll-import-subsection > summary::-webkit-details-marker {
    display: none;
}

.payroll-import-subsection > summary > span:first-child {
    display: grid;
    gap: 2px;
}

.payroll-import-subsection > summary small {
    color: var(--text-700);
    font-size: 0.74rem;
    font-weight: 600;
}

.payroll-import-subsection[open] .recurring-tool-toggle {
    font-size: 0;
}

.payroll-import-subsection[open] .recurring-tool-toggle::after {
    content: "Close";
    font-size: 0.78rem;
}

.payroll-import-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

.payroll-import-body .recurring-import-input {
    min-height: 130px;
}

.payroll-import-body .button-link {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.biweekly-payroll-controls {
    display: grid;
    grid-template-columns: minmax(170px, 0.65fr) minmax(220px, 1fr);
    align-items: end;
    gap: 10px 14px;
}

.biweekly-payroll-controls label {
    display: grid;
    gap: 6px;
    color: var(--text-700);
    font-size: 0.76rem;
    font-weight: 800;
}

.biweekly-payroll-controls .input {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
}

.biweekly-payroll-controls > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.biweekly-payroll-controls .table-link {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.biweekly-payroll-controls .button-link {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.biweekly-payroll-controls small {
    grid-column: 1 / -1;
    color: #0f766e;
    font-weight: 700;
}

.biweekly-payroll-row-select {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 7px;
    color: #0f766e;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 900;
}

.recurring-entry-row[data-entry-type="R"] .biweekly-payroll-row-select {
    display: none;
}

.biweekly-payroll-row-select input {
    margin: 0;
}

.recurring-tool-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px;
    color: var(--text-900);
    cursor: pointer;
    list-style: none;
}

.recurring-tool-card > summary::-webkit-details-marker {
    display: none;
}

.recurring-tool-card > summary > span:first-child {
    display: grid;
    gap: 2px;
}

.recurring-tool-card > summary small {
    color: var(--text-700);
    font-size: 0.76rem;
    font-weight: 600;
}

.recurring-tool-toggle {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
}

.recurring-tool-card[open] .recurring-tool-toggle {
    font-size: 0;
}

.recurring-tool-card[open] .recurring-tool-toggle::after {
    content: "Close";
    font-size: 0.78rem;
}

.recurring-import-body {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.recurring-import-copy {
    display: grid;
    gap: 5px;
    padding-top: 14px;
    border-top: 1px solid rgba(101, 163, 13, 0.22);
    color: var(--text-700);
    font-size: 0.86rem;
}

.recurring-import-copy p {
    margin: 0;
}

.recurring-import-input {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border-radius: 10px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre;
}

.recurring-import-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.recurring-import-actions span {
    color: var(--text-500);
    font-size: 0.78rem;
    font-weight: 700;
}

.recurring-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
}

.recurring-legend > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-700);
    font-size: 0.76rem;
    font-weight: 700;
}

.recurring-legend b {
    color: #4d7c0f;
}

.recurring-legend .recurring-legend-note {
    flex: 1 1 420px;
    margin-left: auto;
    background: rgba(132, 204, 22, 0.12);
    color: #3f6212;
}

.recurring-table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid rgba(107, 114, 128, 0.24);
    border-radius: 16px;
}

.recurring-table-section {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.recurring-payroll-table-section {
    padding-top: 4px;
}

.recurring-table-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.recurring-table-title h3 {
    margin: 2px 0 0;
    color: var(--text-900);
    font-size: 1.08rem;
}

.recurring-table-title > span {
    color: var(--text-500);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.recurring-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-700);
    font-size: 0.77rem;
    font-variant-numeric: tabular-nums;
}

.recurring-table th,
.recurring-table td {
    min-width: 90px;
    padding: 9px 10px;
    border-right: 1px solid rgba(107, 114, 128, 0.18);
    border-bottom: 1px solid rgba(107, 114, 128, 0.18);
    background: #ffffff;
    text-align: right;
    white-space: nowrap;
}

.recurring-table .input {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.recurring-table .recurring-name-input {
    display: inline-block;
    width: 210px;
}

.recurring-name-editor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recurring-delete-icon-button {
    display: inline-flex;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #b91c1c;
    text-decoration: none;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.recurring-delete-icon-button:hover,
.recurring-delete-icon-button:focus-visible {
    border-color: rgba(185, 28, 28, .18);
    background: rgba(239, 68, 68, .10);
    color: #7f1d1d;
    outline: none;
}

.receipt-edit-icon-button {
    color: var(--brand-strong);
}

.receipt-edit-icon-button:hover,
.receipt-edit-icon-button:focus-visible {
    border-color: rgba(24, 196, 199, .24);
    background: rgba(24, 196, 199, .10);
    color: var(--brand);
    outline: none;
}

.cash-receipt-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.recurring-trash-icon,
.recurring-trash-icon svg {
    display: block;
    width: 19px;
    height: 19px;
}

.recurring-trash-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.recurring-table .js-recurring-frequency {
    width: 64px;
}

.recurring-table .js-recurring-first-date {
    width: 138px;
}

.recurring-table .recurring-amount-input {
    width: 96px;
    text-align: right;
}

.recurring-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    padding-top: 11px;
    padding-bottom: 11px;
    background: #ecfccb;
    color: #365314;
    font-size: 0.72rem;
    text-align: center;
}

.recurring-table thead th span {
    display: block;
    margin-bottom: 3px;
    color: #65a30d;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.recurring-table .recurring-name-col,
.recurring-table tbody th {
    min-width: 280px;
    max-width: 280px;
    position: sticky;
    left: 0;
    z-index: 2;
    color: var(--text-900);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recurring-table thead .recurring-name-col {
    z-index: 6;
    text-align: left;
}

.recurring-table .recurring-amount-col {
    min-width: 96px;
}

.recurring-table tbody tr:hover th,
.recurring-table tbody tr:hover td {
    background: #f8fafc;
}

.recurring-table td.is-scheduled {
    background: rgba(132, 204, 22, 0.10);
    color: #3f6212;
    font-weight: 800;
    cursor: pointer;
}

.recurring-table td.is-scheduled:hover {
    background: rgba(132, 204, 22, 0.22);
    box-shadow: inset 0 0 0 2px rgba(101, 163, 13, 0.32);
}

.recurring-table [contenteditable="true"] {
    cursor: text;
    transition: background 120ms ease, box-shadow 120ms ease;
}

.recurring-table [contenteditable="true"]:focus {
    position: relative;
    z-index: 7;
    outline: 0;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px #65a30d;
}

.recurring-table [contenteditable="true"]:empty::before {
    color: #94a3b8;
    content: attr(data-placeholder);
    font-style: italic;
    font-weight: 500;
}

.recurring-table .recurring-new-row th,
.recurring-table .recurring-new-row td {
    background: #f8fafc;
    border-bottom-style: dashed;
}

.recurring-table .recurring-new-row th:first-child::after {
    float: right;
    color: #65a30d;
    content: "+";
    font-size: 1rem;
    font-weight: 900;
}

.recurring-table .recurring-group-row th,
.recurring-table .recurring-group-row td {
    position: static;
    background: #1f2937;
    color: #ffffff;
    font-weight: 800;
    text-align: left;
}

.recurring-table .recurring-group-row td {
    color: #d1d5db;
    font-weight: 600;
}

.recurring-table .recurring-subtotal-row th,
.recurring-table .recurring-subtotal-row td,
.recurring-table tfoot th,
.recurring-table tfoot td {
    background: #f1f5f9;
    color: var(--text-900);
    font-weight: 900;
}

.recurring-table tfoot th {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: right;
}

.recurring-footer-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ecfccb;
    color: #365314;
}

.recurring-footer-summary strong {
    font-size: 1.35rem;
}

.recurring-footer-summary a {
    color: #3f6212;
    font-weight: 800;
}

.recurring-dialog-shell[hidden] {
    display: none !important;
}

.recurring-dialog-shell {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.recurring-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 20, 47, 0.58);
    backdrop-filter: blur(3px);
}

.recurring-dialog-panel {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    width: min(100%, 500px);
    padding: 24px;
    border: 1px solid rgba(107, 114, 128, 0.2);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(6, 20, 47, 0.3);
}

.recurring-dialog-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: #fff7ed;
    color: #c2410c;
    font-size: 1.35rem;
    font-weight: 900;
}

.recurring-dialog-shell[data-tone="danger"] .recurring-dialog-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.recurring-dialog-panel h2 {
    margin: 1px 0 7px;
    color: var(--text-900);
    font-size: 1.2rem;
}

.recurring-dialog-panel p {
    margin: 0;
    color: var(--text-700);
    line-height: 1.55;
}

.recurring-dialog-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.recurring-dialog-actions [hidden] {
    display: none !important;
}

.recurring-dialog-actions .button-link {
    min-width: 94px;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 11px;
    box-shadow: none;
    font-size: 0.84rem;
}

.recurring-dialog-shell[data-tone="danger"] #recurringDialogConfirm {
    border-color: #b91c1c;
    background: #b91c1c;
}

@media (max-width: 560px) {
    .recurring-dialog-panel {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 20px;
    }

    .recurring-dialog-icon {
        width: 38px;
        height: 38px;
    }

    .recurring-dialog-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .recurring-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recurring-setup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .login-grid,
    .hero-card-split,
    .dashboard-layout,
    .form-card-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-command-top,
    .wip-board,
    .wip-secondary-grid,
    .selection-toolbar {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .stage-grid,
    .summary-grid-4,
    .summary-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seasonality-control-grid,
    .seasonality-kpi-grid,
    .seasonality-target-grid,
    .seasonality-data-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .biweekly-payroll-body,
    .biweekly-payroll-controls {
        grid-template-columns: 1fr;
    }

    .biweekly-payroll-controls small {
        grid-column: 1;
    }

    .recurring-hero,
    .recurring-schedule-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .recurring-actions {
        justify-content: flex-start;
    }

    .recurring-table-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .recurring-table-title > span {
        text-align: left;
    }

    .recurring-legend .recurring-legend-note {
        width: 100%;
        margin-left: 0;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .page {
        padding: 26px 18px 42px;
    }

    .login-shell {
        padding: 18px;
        align-items: flex-start;
    }

    .login-card,
    .hero-card,
    .section-card,
    .form-card {
        padding: 24px;
    }

    .modal-shell {
        padding: 10px;
    }

    .modal-card {
        width: 100%;
        border-radius: 24px;
        max-height: calc(100vh - 20px);
    }

    .modal-header {
        flex-direction: column;
        margin: -24px -24px 16px;
        padding: 24px 24px 16px;
    }

    .modal-close {
        align-self: flex-start;
    }

    .insight-strip,
    .stage-grid,
    .mini-stat-grid,
    .summary-grid-4,
    .summary-grid-5 {
        grid-template-columns: 1fr;
    }

    .dashboard-summary-grid,
    .dashboard-filter-bar,
    .wip-metric-grid,
    .wip-secondary-grid {
        grid-template-columns: 1fr;
    }

    .seasonality-control-grid,
    .seasonality-kpi-grid,
    .seasonality-target-grid,
    .seasonality-data-entry-grid,
    .seasonality-manual-entry-grid {
        grid-template-columns: 1fr;
    }

    .rolling-kpi-grid,
    .rolling-exposure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-receipts-layout {
        grid-template-columns: 1fr;
    }

    .receipt-entry-card {
        position: static;
    }

    .table-toolbar {
        justify-content: flex-start;
    }

    .wip-table-shell {
        overflow-x: auto;
    }

    .risk-row {
        grid-template-columns: 1fr;
    }

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

    .rolling-quarter-hero,
    .rolling-detail-grid {
        grid-template-columns: 1fr;
    }

    .rolling-quarter-hero {
        flex-direction: column;
    }

    .cash-receipts-hero {
        flex-direction: column;
    }

    .rolling-quarter-actions {
        align-items: flex-start;
    }

}

@media (max-width: 640px) {
    .recurring-kpi-grid,
    .recurring-setup-grid {
        grid-template-columns: 1fr;
    }

    .recurring-footer-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-inner {
        padding: 12px 16px;
        gap: 10px;
        min-height: 0;
        flex-wrap: wrap;
    }

    .topbar-actions,
    .top-navigation-shell {
        width: 100%;
    }

    .top-navigation-shell {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav-mobile-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 40px;
        padding: 8px 11px;
        border: 1px solid rgba(191, 219, 254, 0.15);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        order: 3;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        padding-top: 6px;
    }

    .top-navigation-shell.is-mobile-open .nav-links {
        display: flex;
    }

    .nav-dropdown:not(.nav-account-menu),
    .nav-menu-trigger {
        width: 100%;
    }

    .nav-menu-trigger {
        justify-content: space-between;
    }

    .nav-menu-panel {
        position: static;
        margin: 4px 0 7px;
        box-shadow: none;
    }

    .nav-account-menu {
        margin-left: auto;
    }

    .cpmcore-header-logo-frame {
        width: 180px;
        height: 46px;
    }

    .cpmcore-login-logo-frame {
        height: 104px;
    }

    .nav {
        gap: 8px;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .status-pill {
        width: 100%;
        justify-content: center;
    }

    .login-grid {
        gap: 18px;
    }

    .login-card-focused {
        padding: 24px;
        border-radius: 24px;
    }

    .form-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .cfm-tile-grid-1,
    .cfm-tile-grid-2,
    .cfm-tile-grid-3,
    .cfm-tile-grid-4,
    .cfm-tile-grid-5,
    .cfm-tile-grid-6 {
        grid-template-columns: 1fr;
    }

    .cfm-week-divider {
        margin-right: 0;
    }

    .cfm-week-divider::after {
        display: none;
    }

    .rolling-kpi-grid,
    .rolling-exposure-grid {
        grid-template-columns: 1fr;
    }

    .receipt-week-summary,
    .receipt-list-head,
    .receipt-list-row {
        grid-template-columns: 1fr;
    }

    .receipt-list-head {
        display: none;
    }

    .receipt-list-row {
        gap: 8px;
    }

}

@media print {
    body {
        background: #ffffff;
    }

    body::before,
    body::after,
    .topbar,
    .print-actions,
    .report-decision-actions {
        display: none !important;
    }

    .page {
        padding: 0;
    }

    .page-shell,
    .print-shell {
        max-width: none;
    }

    .hero-card,
    .section-card,
    .mini-stat,
    .wip-table-shell {
        box-shadow: none;
        background: #ffffff;
        border-color: rgba(107, 114, 128, 0.30);
    }
}
.receivables-shell{max-width:1600px}.receivables-import{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.receivables-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.receivables-grid-wrap{overflow-x:auto}.receivables-summary-grid{width:100%;min-width:1450px;border-collapse:separate;border-spacing:0}.receivables-summary-grid th,.receivables-summary-grid td{padding:13px 10px;text-align:right;border-right:1px solid #d7deea;border-bottom:1px solid #d7deea;white-space:nowrap}.receivables-summary-grid th:first-child{text-align:left;position:sticky;left:0;background:#fff;z-index:1}.receivables-summary-grid thead th{background:#edf3fb;color:#30415f}.receivables-summary-grid .receivables-invoiced td{background:#d7fbfb;color:#075a64}.receivables-summary-grid .receivables-total td{background:#d8f5d8;color:#225e2d;font-weight:800}.receivables-detail-grid{width:100%;border-collapse:collapse}.receivables-detail-grid th,.receivables-detail-grid td{padding:14px;border-bottom:1px solid #e3e8f0;text-align:left}.receivables-detail-grid .money-cell{text-align:right;font-weight:800}.arc-date-waiting{display:inline-block;padding:6px 10px;border-radius:999px;background:#fff4dd;color:#8a5b00;font-weight:700}.arc-date-ready{display:inline-block;padding:6px 10px;border-radius:999px;background:#e0f6e4;color:#2f703a;font-weight:700}@media(max-width:900px){.receivables-kpis{grid-template-columns:1fr 1fr}}
.qbe-import-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 24px; align-items: stretch; }
.qbe-import-entry { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.qbe-import-entry .receivables-import { align-items: flex-start; flex-direction: column; }
.qbe-import-entry .receivables-import .input { width: 100%; }
.qbe-import-entry .section-copy { max-width: 760px; margin: 16px 0 0; }
.qbe-report-guide { display: grid; gap: 9px; padding: 20px 22px; border: 1px solid rgba(24,196,199,.24); border-radius: 18px; background: linear-gradient(145deg, rgba(236,253,253,.88), rgba(248,250,252,.96)); }
.qbe-report-guide > span { color: var(--brand-strong); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.qbe-report-guide > strong { color: var(--text-900); font-size: 21px; letter-spacing: -.025em; }
.qbe-report-guide p, .qbe-report-guide small { margin: 0; color: var(--text-700); line-height: 1.5; }
.qbe-report-guide p { font-size: 13px; }
.qbe-report-guide small { font-size: 11px; }
.qbe-report-columns { display: flex; flex-wrap: wrap; gap: 7px; }
.qbe-report-columns b { padding: 6px 9px; border: 1px solid rgba(15,118,110,.16); border-radius: 999px; background: rgba(255,255,255,.84); color: #0f5f58; font-size: 11px; }
@media(max-width:900px){.qbe-import-layout{grid-template-columns:1fr}.qbe-report-guide{order:-1}}
.receivables-cogs-row td { background: #fff8dc; }
.receivables-cogs-input-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.receivables-cogs-input { width: 72px; min-width: 72px; padding: 7px 8px; text-align: right; font-weight: 800; }
.receivables-cogs-input-wrap > span { color: #7a4a00; font-weight: 850; }
.receivables-cogs-editor { align-items: flex-start; gap: 8px; }

.import-restore-bar { margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(24,196,199,.35); border-radius: 14px; background: rgba(24,196,199,.07); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.import-restore-bar > div { display: grid; gap: 4px; }
.import-restore-bar strong { color: #071a3d; }
.import-restore-bar span { color: #53657d; font-size: .92rem; }
.week-recovery-card { border-color: rgba(24,196,199,.35); }
.week-recovery-warning { display: grid; gap: 5px; padding: 16px 18px; border-left: 4px solid #18c4c7; border-radius: 10px; background: rgba(24,196,199,.07); color: #53657d; }
.week-recovery-warning strong { color: #071a3d; }
@media(max-width:700px){.import-restore-bar{align-items:stretch;flex-direction:column}.import-restore-bar .button-link{width:100%;text-align:center}}
.receivables-cogs-editor .receivables-cogs-input-wrap { justify-content: flex-start; }

.receivables-kpis .rolling-kpi {
    min-height: 112px;
    gap: 4px;
    padding: 14px 18px;
    border-radius: 18px;
}

.receivables-kpis .rolling-kpi > span:first-child {
    font-size: 0.82rem;
    line-height: 1.2;
}

.receivables-kpis .rolling-kpi > strong {
    font-size: clamp(1.65rem, 2.2vw, 2.15rem);
    line-height: 1.05;
}

.receivables-kpis .receivables-cogs-editor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
}

.receivables-kpis .receivables-cogs-editor > span:first-child {
    grid-column: 1 / -1;
}

.receivables-kpis .receivables-cogs-input {
    width: 68px;
    min-width: 68px;
    min-height: 40px;
    padding: 6px 8px;
}

.receivables-kpis .opening-cash-save {
    min-height: 38px;
    padding: 8px 13px;
    white-space: nowrap;
}

.period-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.period-navigation a { display: block; padding: 14px 16px; border: 1px solid rgba(24,196,199,.22); border-radius: 14px; background: #f8fbff; color: #18C4C7; font-weight: 800; text-align: center; text-decoration: none; }
.period-navigation a:hover { background: #eaf4ff; border-color: rgba(24,196,199,.48); }
.annual-forecast-shell { max-width: 1700px; }
.annual-period-card { overflow: hidden; }
.annual-period-title-link { color: inherit; text-decoration-color: rgba(24,196,199,.35); text-underline-offset: 4px; }
.annual-period-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--text-500); font-size: 12px; }
.annual-period-summary strong { color: var(--text-700); }
@media(max-width:900px) { .period-navigation { grid-template-columns: 1fr 1fr; } }
.payables-matrix-card { overflow: hidden; }
.payables-week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 14px; padding: 10px 12px; border: 1px solid #dce7ef; border-radius: 12px; background: #f7fafc; }
.payables-week-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.payables-week-toolbar .button-link { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.payables-week-toolbar > span { color: var(--text-500); font-size: 12px; }
.payables-schedule-wrap { position: relative; max-height: min(68vh, 760px); overflow: auto; border: 1px solid #cfdbe7; border-radius: 12px; scrollbar-gutter: stable; }
.payables-schedule-grid { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.payables-schedule-grid th, .payables-schedule-grid td { box-sizing: border-box; height: 44px; padding: 6px 8px; border-right: 1px solid #d7deea; border-bottom: 1px solid #d7deea; font-size: 12px; white-space: nowrap; }
.payables-schedule-grid thead th { position: sticky; top: 0; z-index: 6; height: 52px; background: #edf3fb; color: #30415f; font-size: 12px; }
.payables-schedule-grid thead th:nth-child(1), .payables-item-row > td:nth-child(1) { left: 0; width: 225px; min-width: 225px; max-width: 225px; }
.payables-schedule-grid thead th:nth-child(2), .payables-item-row > td:nth-child(2) { left: 225px; width: 96px; min-width: 96px; max-width: 96px; }
.payables-schedule-grid thead th:nth-child(3), .payables-item-row > td:nth-child(3) { left: 321px; width: 102px; min-width: 102px; max-width: 102px; }
.payables-schedule-grid thead th:nth-child(4), .payables-item-row > td:nth-child(4) { left: 423px; width: 205px; min-width: 205px; max-width: 205px; border-right: 3px solid #99aabd; }
.payables-schedule-grid thead th:nth-child(-n+4) { position: sticky; z-index: 9; }
.payables-sort-button { display: inline-flex; width: 100%; align-items: center; justify-content: space-between; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-align: left; cursor: pointer; }
.payables-sort-button span { width: 12px; flex: 0 0 auto; opacity: .45; text-align: center; }
.payables-sort-button span::before { content: "\2195"; }
.payables-sort-button.is-ascending span::before { content: "\2191"; }
.payables-sort-button.is-descending span::before { content: "\2193"; }
.payables-sort-button.is-ascending span, .payables-sort-button.is-descending span { opacity: 1; }
.payables-sort-button:focus-visible { outline: 2px solid #168a93; outline-offset: 4px; }
.payables-item-row > td:nth-child(-n+4) { position: sticky; z-index: 3; background: #f2fff1; }
.payables-item-row:hover > td { background: #eef8fb; }
.payables-item-row:hover > td:nth-child(-n+4) { background: #e6f6ef; }
.payable-week-heading { width: 108px; min-width: 108px; text-align: center !important; background: #edf3fb !important; }
.payable-week-heading span { display: block; margin-top: 3px; color: #71809a; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.payables-matrix-summary th, .payables-matrix-summary td { height: 38px; font-size: 12px; font-weight: 850; }
.payables-schedule-grid tbody .payables-matrix-summary > * { position: sticky; z-index: 5; }
.payables-schedule-grid tbody .payables-matrix-summary:nth-child(1) > * { top: 52px; }
.payables-schedule-grid tbody .payables-matrix-summary:nth-child(2) > * { top: 90px; }
.payables-schedule-grid tbody .payables-matrix-summary:nth-child(3) > * { top: 128px; }
.payables-matrix-summary-label { position: sticky; left: 0; z-index: 5; width: 628px; min-width: 628px; max-width: 628px; border-right: 3px solid #99aabd !important; text-align: right !important; text-transform: uppercase; letter-spacing: .035em; }
.payables-schedule-grid tbody .payables-matrix-summary > .payables-matrix-summary-label { z-index: 8; }
.payables-matrix-summary td { width: 108px; min-width: 108px; text-align: right; }
.payables-matrix-listed th, .payables-matrix-listed td { background: #d7fbfb; color: #075a64; }
.payables-matrix-projected th, .payables-matrix-projected td { background: #e5e7eb; color: #374151; }
.payables-matrix-total th, .payables-matrix-total td { background: #d8f5d8; color: #225e2d; border-bottom: 3px solid #9bb8a0; }
.payables-vendor { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.payables-vendor strong { overflow: hidden; color: var(--text-900); font-size: 12px; text-overflow: ellipsis; }
.payables-vendor span { overflow: hidden; color: var(--text-500); font-size: 10px; text-overflow: ellipsis; }
.payables-date-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.payables-date-stack > div { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.payables-date-stack span, .payables-date-stack label { color: var(--text-500); font-size: 8px; font-style: normal; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.payables-date-stack strong { color: #8a4d00; font-size: 11px; }
.payables-date-stack em { overflow: hidden; color: var(--text-700); font-size: 10px; font-style: normal; text-overflow: ellipsis; }
.payables-date-stack label { display: grid; grid-column: 1 / -1; grid-template-columns: 54px 1fr; align-items: center; gap: 6px; }
.payable-override-input { width: 100%; min-width: 0; min-height: 28px; padding: 3px 6px; border-color: #d3b928; background: #fffde0; font-size: 10px; }
.payable-override-input.is-saving { border-color: #3182a0; background: #eef9fc; box-shadow: 0 0 0 2px rgba(49,130,160,.12); }
.payable-override-input.is-saved { border-color: #3d9460; background: #f0fbf3; }
.payable-override-input.is-save-error { border-color: #c84b3c; background: #fff3f1; box-shadow: 0 0 0 2px rgba(200,75,60,.12); }
.payables-autosave-status { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #dce7ef; border-radius: 999px; background: #f7fafc; color: var(--text-500); font-size: 10px; font-weight: 850; letter-spacing: .025em; }
.payables-autosave-status::before { width: 7px; height: 7px; border-radius: 50%; background: #7e8b9d; content: ""; }
.payables-autosave-status.is-saving::before { border: 2px solid #b8d9e4; border-top-color: #237a99; background: transparent; animation: payables-save-spin .7s linear infinite; }
.payables-autosave-status.is-saved { border-color: #c8e8d2; background: #f0fbf3; color: #237044; }
.payables-autosave-status.is-saved::before { background: #3d9460; }
.payables-autosave-status.is-error { border-color: #f0c7c1; background: #fff3f1; color: #a6372b; }
.payables-autosave-status.is-error::before { background: #c84b3c; }
@keyframes payables-save-spin { to { transform: rotate(360deg); } }
.payable-week-cell { width: 108px; min-width: 108px; text-align: right !important; background: #fff; color: #8993a5; }
.payable-week-hit { background: #d7fbfb !important; color: #075a64 !important; font-weight: 900; box-shadow: inset 0 0 0 2px #18a7aa; }
@media(max-width:900px) { .payables-week-toolbar { align-items: stretch; flex-direction: column; } .payables-week-toolbar > span { display: none; } }

.receivables-schedule-grid tbody .receivables-matrix-summary:nth-child(4) > * { position: sticky; top: 166px; z-index: 5; }
.receivables-schedule-grid tbody .receivables-matrix-summary:nth-child(4) > .payables-matrix-summary-label { z-index: 8; }
.receivables-matrix-cogs th,
.receivables-matrix-cogs td { background: #fff6cf; color: #765500; }
.receivable-week-cell { width: 108px; min-width: 108px; text-align: right !important; background: #fff; color: #8993a5; }
.receivable-week-hit { background: #d7fbfb !important; color: #075a64 !important; font-weight: 900; box-shadow: inset 0 0 0 2px #18a7aa; }
.receivables-item-row:nth-child(even) > .receivable-week-cell { background: #f4f9fc; }
.receivables-promise-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 5px 10px; }
.receivables-promise-stack > div { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.receivables-promise-stack > div > span { color: var(--text-500); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.receivables-promise-stack > div > strong { overflow: hidden; color: #8a4d00; font-size: 11px; text-overflow: ellipsis; }
.receivables-promise-stack > div > em { overflow: hidden; color: var(--text-700); font-size: 10px; font-style: normal; text-overflow: ellipsis; }
.receivables-promise-stack > .arc-status { grid-column: 1 / -1; width: max-content; max-width: 100%; padding: 3px 7px; font-size: 8px; }

.arc-work-queue { min-width: 1120px; }
.arc-work-queue tbody tr { transition: background 140ms ease; }
.arc-work-queue tbody tr:hover td { background: rgba(219, 234, 254, 0.45); }
.arc-work-queue .arc-row-missing td { background: rgba(254, 249, 195, 0.62); }
.arc-work-queue .arc-row-overdue td { background: rgba(254, 226, 226, 0.68); }
.arc-work-queue .arc-row-missing:hover td { background: rgba(254, 240, 138, 0.72); }
.arc-work-queue .arc-row-overdue:hover td { background: rgba(254, 202, 202, 0.72); }

.arc-promise-date-input {
    min-width: 154px;
    padding-right: 40px;
    border-color: rgba(24, 196, 199, 0.34);
    background: #ffffff;
    font-weight: 750;
}

.arc-date-editor {
    position: relative;
    display: inline-flex;
    width: 154px;
    min-width: 154px;
    align-items: center;
}

.arc-date-picker-button {
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    display: grid;
    width: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(24, 196, 199, .22);
    border-radius: 0 7px 7px 0;
    background: transparent;
    color: #173c4b;
    cursor: pointer;
}

.arc-date-picker-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.arc-date-picker-button:hover,
.arc-date-picker-button:focus-visible {
    background: #ecfeff;
    box-shadow: inset 0 0 0 2px rgba(15, 148, 151, .28);
    outline: none;
}

.arc-date-picker-input {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: .01;
    pointer-events: none;
}

.arc-row-missing .arc-promise-date-input {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.10);
}

.arc-row-overdue .arc-promise-date-input {
    border-color: #dc2626;
    color: #991b1b;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.09);
}

.arc-forecast-week {
    color: var(--text-700);
    font-weight: 750;
    white-space: nowrap;
}

.arc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-transform: uppercase;
}

.arc-status::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.arc-status-missing { background: #fef3c7; color: #92400e; }
.arc-status-overdue { background: #fee2e2; color: #b91c1c; }
.arc-status-ready { background: #dcfce7; color: #166534; }

@media(max-width:900px) {
    .receivables-kpis { grid-template-columns: 1fr 1fr; }
}

@media(max-width:560px) {
    .receivables-kpis { grid-template-columns: 1fr; }
}

.arc-shell { max-width: 1700px; }
.arc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
    align-items: center;
    gap: clamp(28px, 4vw, 64px);
}
.arc-hero-copy { min-width: 0; }
.arc-hero-copy .hero-copy { max-width: 920px; }
.arc-hero-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.arc-hero-actions .button-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    text-align: center;
}
.arc-hero-primary-action { grid-column: 1 / -1; }
.arc-settings-card { border-color: rgba(24, 196, 199, 0.24); background: linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96)); }
.arc-settings-grid { display: grid; grid-template-columns: minmax(220px, 320px) minmax(220px, 320px) auto; align-items: end; gap: 16px; }
.arc-settings-grid .form-actions { margin: 0; }
.arc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arc-queue-wrap { overflow-x: auto; }
.arc-independent-grid { min-width: 1180px; }
.arc-independent-grid th, .arc-independent-grid td { vertical-align: middle; }
.arc-independent-grid th:first-child, .arc-independent-grid td:first-child { min-width: 230px; }
.arc-independent-grid .arc-queue-row > td { padding-top: 8px; padding-bottom: 8px; }
.arc-independent-grid .arc-queue-row.has-open-collection > td { border-bottom-color: transparent; background: #eef8fb; }
.arc-customer { display: flex; flex-direction: column; gap: 2px; }
.arc-customer span { color: var(--text-500); font-size: 12px; }
.arc-independent-grid .arc-promise-date-input { width: 154px; min-width: 154px; min-height: 36px; padding: 7px 40px 7px 9px; }
.arc-note-action-heading, .arc-note-action-cell { width: 82px; text-align: center !important; }
.arc-note-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 9px; border: 1px solid rgba(15,118,110,.25); border-radius: 9px; background: #fff; color: #0f766e; font: inherit; font-size: 11px; font-weight: 850; cursor: pointer; }
.arc-note-toggle:hover, .arc-note-toggle.is-active { border-color: #0f766e; background: #e8f8f6; }
.arc-note-toggle:focus-visible, .arc-note-close:focus-visible { outline: 3px solid rgba(14,165,233,.25); outline-offset: 2px; }
.arc-note-toggle-icon { display: inline-flex; width: 18px; height: 18px; }
.arc-note-toggle-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.arc-collection-detail > td { padding: 0 !important; border-bottom: 1px solid #b9dbe2 !important; background: #f6fbfc !important; }
.arc-collection-detail[hidden] { display: none; }
.arc-collection-panel { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 22px; padding: 18px 20px 20px; box-shadow: inset 4px 0 0 #18a7aa; }
.arc-collection-panel section { min-width: 0; }
.arc-collection-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.arc-collection-panel-heading > div { display: flex; flex-direction: column; gap: 3px; }
.arc-collection-panel-heading span, .arc-collection-entry label { color: #0f766e; font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.arc-collection-panel-heading strong { color: var(--text-900); font-size: 14px; }
.arc-note-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--text-500); font-size: 23px; line-height: 1; cursor: pointer; }
.arc-note-close:hover { background: #e2f2f5; color: var(--text-900); }
.arc-notes-history { max-height: 150px; overflow-y: auto; padding: 12px 14px; border: 1px solid #d8e7eb; border-radius: 10px; background: #fff; color: var(--text-700); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.arc-collection-entry { display: flex; flex-direction: column; gap: 8px; }
.arc-collection-entry small { color: var(--text-500); font-size: 11px; }
.arc-current-note { width: 100%; min-height: 82px; resize: vertical; }
.arc-queue-heading { align-items: flex-start; }
.arc-queue-actions { display: flex; min-width: min(100%, 430px); flex-direction: column; align-items: stretch; gap: 10px; }
.arc-queue-actions .journal-actions { justify-content: flex-end; }
.arc-search { display: flex; flex-direction: column; gap: 5px; color: var(--text-500); font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.arc-search .input { width: 100%; min-height: 38px; padding: 8px 12px; background: #fff; font-size: 13px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.arc-autosave-status { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #dce7ef; border-radius: 999px; background: #f7fafc; color: var(--text-500); font-size: 10px; font-weight: 850; letter-spacing: .025em; }
.arc-autosave-status::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #7e8b9d; content: ""; }
.arc-autosave-status.is-saving::before { border: 2px solid #b8d9e4; border-top-color: #237a99; background: transparent; animation: payables-save-spin .7s linear infinite; }
.arc-autosave-status.is-saved { border-color: #c8e8d2; background: #f0fbf3; color: #237044; }
.arc-autosave-status.is-saved::before { background: #3d9460; }
.arc-autosave-status.is-error { border-color: #f0c7c1; background: #fff3f1; color: #a6372b; }
.arc-autosave-status.is-error::before { background: #c84b3c; }
.arc-promise-date-input.is-saving { border-color: #3182a0; background: #eef9fc; box-shadow: 0 0 0 2px rgba(49,130,160,.12); }
.arc-promise-date-input.is-saved { border-color: #3d9460; background: #f0fbf3; box-shadow: none; }
.arc-promise-date-input.is-save-error { border-color: #c84b3c; background: #fff3f1; box-shadow: 0 0 0 2px rgba(200,75,60,.12); }
.arc-sort-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; text-align: left; }
.arc-sort-button > span { width: 0; height: 0; border-right: 4px solid transparent; border-left: 4px solid transparent; opacity: .42; }
.arc-sort-button:not(.is-ascending):not(.is-descending) > span { border-top: 5px solid currentColor; }
.arc-sort-button.is-ascending > span { border-bottom: 6px solid currentColor; opacity: 1; }
.arc-sort-button.is-descending > span { border-top: 6px solid currentColor; opacity: 1; }
.arc-sort-button:focus-visible { outline: 3px solid rgba(14,165,233,.25); outline-offset: 4px; }
.arc-queue-row[hidden], .arc-no-search-results[hidden] { display: none; }
.arc-queue-row.is-ajax-saving > td { box-shadow: inset 0 2px 0 #3182a0, inset 0 -2px 0 rgba(49,130,160,.22); }
.arc-queue-row.is-ajax-saved > td { box-shadow: inset 0 2px 0 #3d9460, inset 0 -2px 0 rgba(61,148,96,.18); }
.arc-queue-row.is-ajax-error > td { box-shadow: inset 0 2px 0 #c84b3c, inset 0 -2px 0 rgba(200,75,60,.18); }
.arc-queue-row.is-ajax-saving > td:first-child { position: relative; }
.arc-queue-row.is-ajax-saving > td:first-child::after {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(49,130,160,.24);
    border-top-color: #3182a0;
    border-radius: 50%;
    animation: payables-save-spin .7s linear infinite;
    content: "";
}
.arc-date-picker-button:disabled { opacity: .45; cursor: wait; }
.forecast-inclusion-toggle.is-saving { opacity: .62; cursor: wait; }
.forecast-inclusion-toggle.is-saving::after {
    width: 11px;
    height: 11px;
    border: 2px solid rgba(49,130,160,.24);
    border-top-color: #3182a0;
    border-radius: 50%;
    animation: payables-save-spin .7s linear infinite;
    content: "";
}
.arc-note-save.is-busy { position: relative; padding-left: 30px; opacity: .72; cursor: wait; }
.arc-note-save.is-busy::before {
    position: absolute;
    left: 11px;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255,255,255,.42);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: payables-save-spin .7s linear infinite;
    content: "";
}
.arc-collection-detail.is-ajax-saving .arc-collection-panel { opacity: .76; }
.arc-print-report { display: none; }

@media (prefers-reduced-motion: reduce) {
    .arc-queue-row.is-ajax-saving > td:first-child::after,
    .forecast-inclusion-toggle.is-saving::after,
    .arc-note-save.is-busy::before { animation-duration: 1.4s; }
}
.receivables-imported-queue { min-width: 920px; }
.receivables-imported-queue th:first-child, .receivables-imported-queue td:first-child { width: 34%; min-width: 260px; }
.receivables-imported-queue .arc-queue-row > td { padding-top: 8px; padding-bottom: 8px; vertical-align: middle; }

@media(max-width:900px) {
    .arc-hero { grid-template-columns: 1fr; }
    .arc-hero-actions { max-width: 560px; }
    .arc-settings-grid { grid-template-columns: 1fr 1fr; }
    .arc-settings-grid .form-actions { grid-column: 1 / -1; }
    .arc-kpis { grid-template-columns: 1fr 1fr; }
    .arc-collection-panel { grid-template-columns: 1fr; }
    .arc-queue-heading { flex-direction: column; }
    .arc-queue-actions { width: 100%; }
    .arc-queue-actions .journal-actions { justify-content: flex-start; }
}

@media(max-width:560px) {
    .arc-hero-actions { grid-template-columns: 1fr; }
    .arc-hero-primary-action { grid-column: auto; }
    .arc-settings-grid, .arc-kpis { grid-template-columns: 1fr; }
}

@media print {
    html,
    body.arc-collections-page {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        background: #fff;
        color: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .arc-collections-page .topbar,
    .arc-collections-page .page,
    .arc-collections-page > form > input[type="hidden"] { display: none !important; }

    .arc-collections-page .arc-print-report {
        display: block !important;
        width: 100%;
        color: #000;
        font-family: Arial, Helvetica, sans-serif;
    }

    .arc-print-header {
        display: grid;
        justify-items: center;
        gap: 5px;
        margin: 0 0 .2in;
        padding: 0 .04in;
        break-inside: avoid;
        text-align: center;
    }

    .arc-print-header h1 { margin: 0 0 3px; color: #000; font-size: 14pt; font-weight: 800; line-height: 1.1; }
    .arc-print-header strong { font-size: 10pt; font-weight: 500; }
    .arc-print-logo-frame { display: grid; min-height: .48in; place-items: center; margin-bottom: 2px; }
    .arc-print-logo { display: block; width: auto; max-width: 2.25in; height: auto; max-height: .55in; object-fit: contain; }

    .arc-print-table {
        width: 100%;
        border: 1.5pt solid #000;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 6.7pt;
        line-height: 1.15;
    }

    .arc-print-table thead { display: table-header-group; }
    .arc-print-table tr { break-inside: avoid; page-break-inside: avoid; }
    .arc-print-table th,
    .arc-print-table td {
        overflow: hidden;
        padding: 3px 4px;
        border: 1pt solid #000;
        color: #000;
        text-overflow: clip;
        vertical-align: middle;
    }

    .arc-print-table th {
        height: .34in;
        background: #e6e6e6 !important;
        font-size: 7pt;
        font-weight: 800;
        line-height: 1.15;
        text-align: center;
    }

    .arc-print-table td { height: .18in; }
    .arc-print-table td:not(:first-child):not(:last-child) { text-align: center; }
    .arc-print-table .arc-print-money { font-variant-numeric: tabular-nums; text-align: right !important; white-space: nowrap; }
    .arc-print-table .arc-print-flag { font-size: 6pt; font-weight: 700; }
    .arc-print-table .arc-print-notes { overflow-wrap: anywhere; white-space: pre-wrap; }

    .arc-print-col-name { width: 15.5%; }
    .arc-print-col-invoice { width: 7.5%; }
    .arc-print-col-invoice-date { width: 7.5%; }
    .arc-print-col-amount { width: 8.5%; }
    .arc-print-col-receive { width: 8%; }
    .arc-print-col-promise { width: 8%; }
    .arc-print-col-flag { width: 5.5%; }
    .arc-print-col-voicemail { width: 8%; }
    .arc-print-col-notes { width: 26%; }

    .arc-print-footer {
        position: fixed;
        right: 0;
        bottom: -.42in;
        left: 0;
        display: flex;
        align-items: center;
        gap: 20px;
        padding-top: 5px;
        border-top: .75pt solid #777;
        color: #333;
        font-size: 7pt;
    }

}

/* Forecast confidence */
.confidence-page-shell { max-width: 1540px; }

.confidence-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px auto;
    align-items: center;
    gap: 28px;
}

.confidence-hero-copy { min-width: 0; }

.confidence-hero-score {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2px 12px;
    padding: 18px 20px;
    border: 1px solid rgba(24, 196, 199, 0.18);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 244, 0.92));
}

.confidence-hero-score span,
.confidence-hero-score small {
    grid-column: 1 / -1;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 750;
}

.confidence-hero-score strong {
    color: #18C4C7;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.confidence-hero-score b {
    color: #166534;
    font-size: 24px;
    font-weight: 900;
}

.confidence-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.confidence-kpi-card {
    height: 100%;
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(107, 114, 128, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(7, 26, 61, 0.07);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.confidence-card-link {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.confidence-card-link:hover .confidence-kpi-card {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(7, 26, 61, 0.13);
}

.confidence-card-link:focus-visible {
    border-radius: 20px;
    outline: 3px solid rgba(24, 196, 199, .34);
    outline-offset: 4px;
}

.confidence-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.confidence-card-action > span {
    font-size: 16px;
    line-height: 1;
}

.confidence-kpi-primary {
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.confidence-card-strong { border-top: 4px solid #16a34a; }
.confidence-card-watch { border-top: 4px solid #f59e0b; }
.confidence-card-risk { border-top: 4px solid #dc2626; }
.confidence-card-baseline { border-top: 4px solid #94a3b8; }

.confidence-kpi-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.confidence-kpi-head > span {
    color: var(--text-700);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.confidence-kpi-head > strong {
    color: var(--text-900);
    font-size: 25px;
    letter-spacing: -0.04em;
}

.confidence-balance-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.confidence-balance-pair > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(226, 232, 240, 0.48);
}

.confidence-balance-pair span { color: var(--text-500); font-size: 11px; font-weight: 750; }
.confidence-balance-pair b { color: var(--text-900); font-size: 17px; }

.confidence-meter {
    height: 10px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.confidence-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #18C4C7, #16a34a);
}

.confidence-kpi-note {
    margin-top: 14px;
    color: var(--text-500);
    font-size: 12px;
    line-height: 1.5;
}

.confidence-chart-card { overflow: hidden; }
.confidence-chart-shell { width: 100%; overflow-x: auto; }
.confidence-chart-shell canvas { display: block; min-width: 620px; }

.confidence-window-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 150px;
}

.confidence-window-summary strong { color: #18C4C7; font-size: 34px; line-height: 1; }
.confidence-window-summary span { color: var(--text-700); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.confidence-window-summary small { color: var(--text-500); }

.confidence-grade-key { display: flex; flex-wrap: wrap; gap: 7px; }
.confidence-grade-key span { padding: 6px 9px; border-radius: 999px; background: #eef4fb; color: #42526b; font-size: 11px; font-weight: 800; }
.confidence-history-table { min-width: 900px; }

.confidence-score {
    display: inline-flex;
    min-width: 46px;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.confidence-score-strong { background: #dcfce7; color: #166534; }
.confidence-score-watch { background: #fef3c7; color: #92400e; }
.confidence-score-risk { background: #fee2e2; color: #b91c1c; }
.confidence-score-baseline { background: #e2e8f0; color: #475569; }

@media (max-width: 1100px) {
    .confidence-hero { grid-template-columns: minmax(0, 1fr) 190px; }
    .confidence-hero .rolling-quarter-actions { grid-column: 1 / -1; align-items: flex-start; }
    .confidence-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .confidence-hero { grid-template-columns: 1fr; }
    .confidence-summary-grid { grid-template-columns: 1fr; }
    .confidence-window-summary { align-items: flex-start; }
    .confidence-balance-pair { grid-template-columns: 1fr; }
}

/* Next-week rollover */
.next-week-page-shell { max-width: 1460px; }

.next-week-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px auto;
    align-items: center;
    gap: 28px;
}

.next-week-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border: 1px solid rgba(24, 196, 199, 0.18);
    border-radius: 24px;
    background: #ffffff;
}

.next-week-hero-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }

.next-week-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.next-week-flow-step {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px 20px;
    border: 1px solid rgba(107, 114, 128, 0.26);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.next-week-flow-step-active {
    border-color: rgba(22, 163, 74, 0.28);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.96));
}

.next-week-flow-step > span { color: #18C4C7; font-size: 11px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.next-week-flow-step > strong { color: var(--text-900); font-size: 17px; }
.next-week-flow-step > small { color: var(--text-500); line-height: 1.45; }
.next-week-flow-arrow { display: flex; align-items: center; color: #18C4C7; font-size: 28px; font-weight: 900; }

.next-week-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 20px;
    align-items: stretch;
}

.next-week-entry-card,
.next-week-comparison-card { height: 100%; }

.next-week-input-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.next-week-check-journal-launch {
    display: flex;
    width: fit-content;
    margin-top: 10px;
}

.next-week-confirmation {
    margin-top: 22px;
    padding: 15px 16px;
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 14px;
    background: rgba(255, 251, 235, 0.94);
}

.next-week-confirmation > span,
.next-week-confirmation label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: #78350f;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.next-week-confirmation input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; }

.next-week-comparison-card {
    background: linear-gradient(150deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.next-week-comparison-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(107, 114, 128, 0.22);
}

.next-week-comparison-row span { color: var(--text-500); font-size: 13px; font-weight: 750; }
.next-week-comparison-row strong { color: var(--text-900); font-size: 22px; letter-spacing: -0.035em; }

.next-week-variance {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 5px 16px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #e2e8f0;
    color: #334155;
}

.next-week-variance span { font-size: 12px; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.next-week-variance strong { font-size: 28px; letter-spacing: -0.04em; }
.next-week-variance small { grid-column: 1 / -1; line-height: 1.45; }
.next-week-variance-match { background: #dcfce7; color: #166534; }
.next-week-variance-above { background: #dbeafe; color: #1e40af; }
.next-week-variance-below { background: #fee2e2; color: #991b1b; }

.next-week-formula { margin-top: 16px; color: var(--text-500); font-size: 12px; line-height: 1.55; }

.next-week-safeguard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.next-week-safeguard-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px;
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.72);
}

.next-week-safeguard-grid strong { color: var(--text-900); }
.next-week-safeguard-grid span { color: var(--text-500); font-size: 12px; line-height: 1.5; }

@media (max-width: 1050px) {
    .next-week-hero { grid-template-columns: minmax(0, 1fr) 112px; }
    .next-week-hero .rolling-quarter-actions { grid-column: 1 / -1; align-items: flex-start; }
    .next-week-grid { grid-template-columns: 1fr; }
    .next-week-safeguard-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .next-week-flow { grid-template-columns: 1fr; }
    .next-week-flow-arrow { justify-content: center; transform: rotate(90deg); }
    .next-week-input-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .next-week-hero { grid-template-columns: 1fr; }
    .next-week-safeguard-grid { grid-template-columns: 1fr; }
}
.recovery-code {
    display: block;
    margin: 0.75rem 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.recovery-code-modal .modal-frame {
    align-items: center;
}

.recovery-code-modal-card {
    width: min(620px, 100%);
    text-align: center;
}

.recovery-code-modal-card h2 {
    margin: 6px 0 8px;
}

.recovery-code-display {
    margin: 24px 0 18px;
    padding: 18px 20px;
    border: 1px solid rgba(24, 196, 199, 0.34);
    border-radius: 16px;
    background: #eafafa;
    color: #06142f;
    font-size: clamp(1.25rem, 4vw, 2rem);
    overflow-wrap: anywhere;
    user-select: all;
}

.recovery-code-warning {
    margin: 0;
    color: var(--text-700);
}

.recovery-code-actions {
    justify-content: center;
}

.recovery-code-input {
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Permission-aware report center */
.report-center-shell { max-width: 1460px; }
.report-center-hero { align-items: stretch; }

.report-access-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.report-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-role-chip,
.report-category,
.report-access {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-role-chip {
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
}

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

.report-center-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 22px;
    border: 1px solid rgba(107, 114, 128, 0.22);
    border-radius: 18px;
    background: linear-gradient(155deg, #ffffff, #f8fafc);
}

.report-center-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.report-category {
    padding: 6px 9px;
    background: rgba(24, 196, 199, 0.12);
    color: #0f7f82;
}

.report-access {
    color: var(--text-500);
    text-align: right;
}

.report-center-card h3 {
    margin: 0 0 9px;
    color: var(--text-900);
    font-size: 21px;
    letter-spacing: -0.025em;
}

.report-center-card p {
    flex: 1;
    margin: 0 0 22px;
    color: var(--text-500);
    font-size: 13px;
    line-height: 1.6;
}

.report-center-link {
    align-self: flex-start;
}

.report-empty-state {
    text-align: center;
}

.report-empty-state p {
    max-width: 680px;
    margin: 0 auto 22px;
    color: var(--text-500);
}

@media (max-width: 1050px) {
    .report-center-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .report-center-grid { grid-template-columns: 1fr; }
    .report-center-card { min-height: 0; }
}

.workflow-template-card { padding: 24px 28px; border-top: 4px solid #0f7f82; }
.workflow-template-card .section-heading-tight { margin-bottom: 12px; }
.workflow-template-picker { display: grid; grid-template-columns: minmax(320px, 860px) auto; gap: 16px; align-items: end; justify-content: start; }
.workflow-responsibility-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.workflow-responsibility-grid .form-row:last-child { grid-column: 1 / -1; }
.workflow-responsibility-grid small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.45; }
.workflow-warning-card { border-left: 4px solid #d79a24; }
.workflow-warning-list { display: grid; gap: 10px; }
.workflow-warning { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border-radius: 12px; background: #fff8e8; color: #684b13; }
.workflow-warning-critical { background: #fff0ed; color: #8c3022; }
.workflow-preview-shell { overflow-x: auto; }
.workflow-preview-table { min-width: 840px; }
.workflow-preview-table td:not(:first-child) { font-weight: 750; }

@media (max-width: 760px) {
    .workflow-template-picker,
    .workflow-responsibility-grid { grid-template-columns: 1fr; }
    .workflow-responsibility-grid .form-row:last-child { grid-column: auto; }
}
.weekly-pm-meeting-card{border-top:4px solid #275f71;padding:22px 24px}.pm-meeting-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:center;margin:12px 0}.pm-meeting-summary>div{display:flex;flex-direction:column;gap:2px}.pm-meeting-summary span,.pm-meeting-summary small{color:var(--muted)}.pm-meeting-summary strong{font-size:1.08rem}.pm-readiness-list{display:grid;gap:6px;margin:10px 0}.pm-readiness-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(150px,auto) minmax(150px,auto);gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:#fff}.pm-readiness-row>div{display:flex;flex-direction:column;gap:1px}.pm-readiness-row>div span{color:var(--muted);font-size:.82rem}.pm-meeting-record{display:grid;grid-template-columns:minmax(200px,.7fr) repeat(2,minmax(260px,1fr));gap:12px;margin-top:12px}.pm-attendance-list label{white-space:nowrap}.pm-meeting-publish-notice{display:flex;gap:8px;align-items:baseline;margin-top:12px;padding:10px 12px;border:1px solid rgba(15,118,110,.24);border-radius:10px;background:rgba(204,251,241,.34)}.pm-meeting-publish-notice strong{color:#0f5f58;white-space:nowrap}.pm-meeting-publish-notice span{color:var(--muted);font-size:.88rem}.schedule-revision-reason{max-width:760px;margin:18px 0 10px}@media(max-width:1100px){.pm-meeting-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.pm-meeting-summary>.form-actions{grid-column:1/-1}}@media(max-width:900px){.pm-meeting-summary,.pm-meeting-record{grid-template-columns:1fr}.pm-meeting-summary>.form-actions{grid-column:auto}.pm-readiness-row{grid-template-columns:1fr;gap:8px}.pm-meeting-publish-notice{align-items:flex-start;flex-direction:column}}
.pm-meeting-live-status{display:grid;justify-items:end;gap:6px;text-align:right}.pm-meeting-live-status small{color:var(--muted);font-size:.72rem;font-weight:700}
.pm-readiness-row {
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 220px) minmax(220px, 260px);
}

.pm-readiness-status {
    justify-self: start;
    white-space: nowrap;
}

.pm-readiness-actions {
    align-items: flex-end !important;
    justify-self: stretch;
    text-align: right;
}

@media (max-width: 900px) {
    .pm-readiness-status {
        justify-self: stretch;
        white-space: normal;
    }

    .pm-readiness-actions {
        align-items: flex-start !important;
        text-align: left;
    }
}
.estimate-line-suggestions {
    position: relative;
    z-index: 20;
    margin-top: .35rem;
    border: 1px solid rgba(27, 71, 54, .22);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(24, 52, 43, .14);
    overflow: hidden;
}

.estimate-line-suggestion {
    display: block;
    width: 100%;
    padding: .72rem .85rem;
    border: 0;
    border-bottom: 1px solid rgba(27, 71, 54, .1);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.estimate-line-suggestion:last-child { border-bottom: 0; }
.estimate-line-suggestion:hover,
.estimate-line-suggestion:focus { background: rgba(54, 133, 94, .1); outline: none; }

.import-sync-preview {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(35, 78, 99, .16);
    border-radius: 14px;
    background: #f8fbfc;
}

.import-sync-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    color: var(--text-700);
}

.import-sync-summary strong { color: var(--text-900); }

.import-sync-list {
    display: grid;
    max-height: 310px;
    overflow-y: auto;
    border: 1px solid rgba(35, 78, 99, .12);
    border-radius: 10px;
    background: #fff;
}

.import-sync-row {
    display: grid;
    grid-template-columns: 88px minmax(180px, .8fr) minmax(220px, 1.2fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(35, 78, 99, .09);
    color: var(--text-500);
}

.import-sync-row:last-child { border-bottom: 0; }
.import-sync-row strong { color: var(--text-900); }

.import-sync-action {
    display: inline-flex;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.import-preview-add { background: #e3f6e8; color: #24713a; }
.import-preview-update { background: #fff1cf; color: #8a5a00; }
.import-preview-missing { background: #fde6e4; color: #a52b25; }
.import-preview-unchanged { background: #edf1f4; color: #596773; }

.import-sync-apply {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.import-sync-apply label { font-weight: 700; color: #8b2d28; }

@media (max-width: 720px) {
    .import-sync-row { grid-template-columns: 82px 1fr; }
    .import-sync-row > span:last-child { grid-column: 1 / -1; }
    .import-sync-apply { align-items: stretch; flex-direction: column; }
}

/* Company WIP report - external financial and bonding presentation */
.company-wip-report-page-main {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.wip-report-actions {
    display: flex;
    width: min(100%, 1020px);
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-md);
}

.wip-report-actions > div:first-child { display: grid; gap: 3px; }
.wip-report-actions > div:first-child span { color: #18aeb3; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.wip-report-actions > div:first-child strong { color: #071a3d; font-size: 17px; }

.company-wip-report-sheet {
    width: min(100%, 1020px);
    margin: 0 auto 40px;
    padding: 32px;
    border: 1px solid rgba(107, 114, 128, .22);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(7, 26, 61, .16);
    color: #071a3d;
}

.company-wip-report-header {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 20px;
    border-bottom: 4px solid #18b9be;
}

.company-wip-report-brand { display: flex; min-width: 0; align-items: center; gap: 16px; }
.company-wip-report-logo { display: block; width: auto; max-width: 285px; height: auto; max-height: 78px; object-fit: contain; }
.company-wip-report-logo-fallback { display: grid; width: 68px; height: 68px; flex: 0 0 auto; place-items: center; border-radius: 15px; background: #071a3d; color: #ffffff; font-size: 25px; font-weight: 900; }
.company-wip-report-company-lockup { display: grid; gap: 4px; }
.company-wip-report-company-lockup strong { font-size: 25px; font-weight: 900; line-height: 1.05; }
.company-wip-report-company-lockup span { color: #18aeb3; font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.company-wip-report-title { flex: 0 0 auto; text-align: right; }
.company-wip-report-title h1 { margin: 0 0 6px; color: #071a3d; font-size: 28px; font-weight: 900; letter-spacing: -.035em; line-height: 1; text-transform: uppercase; }
.company-wip-report-title p { margin: 0 0 4px; color: #4b5563; font-size: 13px; }
.company-wip-report-title span { color: #6b7280; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }

.company-wip-primary-metrics,
.company-wip-secondary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-wip-primary-metrics { margin-top: 18px; background: #071a3d; }
.company-wip-primary-metrics > div { display: grid; gap: 10px; padding: 20px 15px; border-right: 1px solid rgba(255,255,255,.32); text-align: center; }
.company-wip-primary-metrics > div:last-child { border-right: 0; }
.company-wip-primary-metrics span { color: #ffffff; font-size: 9px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.company-wip-primary-metrics strong { color: #ffffff; font-size: 28px; font-weight: 850; letter-spacing: -.03em; }

.company-wip-secondary-metrics { margin-top: 12px; border: 1px solid #aeb9c8; }
.company-wip-secondary-metrics > div { display: grid; min-height: 82px; align-content: center; gap: 4px; padding: 12px; border-right: 1px solid #aeb9c8; text-align: center; }
.company-wip-secondary-metrics > div:last-child { border-right: 0; }
.company-wip-secondary-metrics span { color: #243b5e; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.company-wip-secondary-metrics strong { color: #0f9da3; font-size: 23px; letter-spacing: -.025em; }
.company-wip-secondary-metrics small { color: #6b7280; font-size: 8px; font-weight: 700; text-transform: uppercase; }

.company-wip-health { margin: 16px 0; }
.company-wip-section-rule { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: #16345e; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.company-wip-section-rule span { height: 1px; background: #16345e; }
.company-wip-health-counts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.company-wip-health-counts > div { display: flex; align-items: center; justify-content: center; gap: 9px; }
.company-wip-health-counts i { width: 12px; height: 12px; border-radius: 999px; background: #0f9da3; }
.company-wip-health-counts strong { color: #0f9da3; font-size: 27px; }
.company-wip-health-counts span { color: #243b5e; font-size: 11px; }
.company-wip-health-counts .is-watch i { background: #eea400; }
.company-wip-health-counts .is-watch strong { color: #dd9500; }
.company-wip-health-counts .is-attention i { background: #dc4f3f; }
.company-wip-health-counts .is-attention strong { color: #dc4f3f; }

.company-wip-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 8px; border-bottom: 2px solid #071a3d; }
.company-wip-section-heading > div { display: grid; gap: 2px; }
.company-wip-section-heading span { color: #18aeb3; font-size: 8px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.company-wip-section-heading h2 { margin: 0; color: #071a3d; font-size: 19px; text-transform: uppercase; }
.company-wip-section-heading > strong { color: #4b5563; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }

.company-wip-project-table { width: 100%; margin-top: 10px; border-collapse: collapse; table-layout: fixed; }
.wip-report-col-project { width: 20%; }
.wip-report-col-contract { width: 9%; }
.wip-report-col-complete { width: 6%; }
.wip-report-col-earned,
.wip-report-col-billed,
.wip-report-col-actual,
.wip-report-col-cost { width: 8%; }
.wip-report-col-backlog { width: 9%; }
.wip-report-col-margin { width: 6%; }
.wip-report-col-data { width: 18%; }
.company-wip-project-table th { padding: 9px 6px; background: #071a3d; color: #ffffff; font-size: 7.5px; font-weight: 900; letter-spacing: .055em; line-height: 1.25; text-align: left; text-transform: uppercase; }
.company-wip-project-table th:not(:first-child) { text-align: right; }
.company-wip-project-table th:last-child { text-align: left; }
.company-wip-project-table th:nth-last-child(2) { text-align: left; }
.company-wip-project-table td { padding: 10px 6px; border-bottom: 1px solid #d7dee7; color: #29384f; font-size: 9px; line-height: 1.25; vertical-align: top; }
.company-wip-project-table tbody tr:nth-child(even) { background: #f6f8fb; }
.company-wip-project-table td:first-child { display: grid; gap: 3px; }
.company-wip-project-table td:first-child strong { color: #071a3d; font-size: 9px; }
.company-wip-project-table td:first-child span { color: #6b7280; font-size: 7px; }
.company-wip-project-table .wip-report-number { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.company-wip-project-table td:last-child small,
.company-wip-project-table td:nth-last-child(2) small { display: block; margin-top: 3px; color: #6b7280; font-size: 6.5px; line-height: 1.15; }
.wip-health { display: inline-flex; padding: 3px 5px; border-radius: 999px; font-size: 6.5px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.wip-health-plan { background: #dff5f4; color: #087b80; }
.wip-health-watch { background: #fff2cd; color: #9a6500; }
.wip-health-attention { background: #fde3df; color: #b53e30; }

.company-wip-analysis-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; margin-top: 18px; }
.company-wip-analysis-card { padding: 14px; border: 1px solid #aeb9c8; }
.company-wip-analysis-card h2,
.company-wip-attention-card h2 { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 1px solid #16345e; color: #071a3d; font-size: 13px; text-transform: uppercase; }
.company-wip-division-row { display: grid; gap: 5px; margin-top: 10px; }
.company-wip-division-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #334155; font-size: 9px; }
.company-wip-division-track { height: 11px; overflow: hidden; background: #e8edf3; }
.company-wip-division-track span { display: block; height: 100%; min-width: 2px; background: #0f9da3; }
.company-wip-analysis-stack { display: grid; gap: 12px; }
.company-wip-billing-card > div { display: flex; justify-content: space-between; gap: 18px; padding: 6px 3px; border-bottom: 1px solid #d7dee7; color: #334155; font-size: 9px; }
.company-wip-billing-card > div.is-net { margin-top: 3px; border-bottom: 0; background: #e8f8f8; color: #087b80; font-weight: 900; }
.company-wip-attention-card { padding: 13px 14px; border: 1px solid #dc6a58; }
.company-wip-attention-card h2 { border-bottom-color: #dc6a58; color: #c34837; }
.company-wip-attention-card p { margin: 6px 0; color: #4b5563; font-size: 8.5px; }
.company-wip-attention-card p strong { color: #c34837; }

.company-wip-report-empty { margin: 28px 0; padding: 34px; border: 1px solid #aeb9c8; background: #f7f9fb; text-align: center; }
.company-wip-report-empty > span { color: #18aeb3; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.company-wip-report-empty h2 { margin: 8px 0; }
.company-wip-report-empty p { margin: 0; color: #6b7280; }
.company-wip-report-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 18px; padding-top: 9px; border-top: 2px solid #071a3d; color: #566274; font-size: 8px; }

@media (max-width: 760px) {
    .company-wip-report-page-main { padding: 12px; }
    .wip-report-actions,
    .company-wip-report-header { align-items: flex-start; flex-direction: column; }
    .company-wip-report-title { text-align: left; }
    .company-wip-report-sheet { padding: 18px; overflow-x: auto; }
    .company-wip-primary-metrics,
    .company-wip-secondary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .company-wip-analysis-grid { grid-template-columns: 1fr; }
    .company-wip-project-table { min-width: 850px; }
}

@media print {
    @page { size: Letter landscape; margin: .3in .34in; }

    html,
    body.company-wip-report-page {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        background: #ffffff;
        color: #071a3d;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .company-wip-report-page .wip-report-screen-only { display: none !important; }
    .company-wip-report-page .company-wip-report-page-main { display: block; margin: 0; padding: 0; }
    .company-wip-report-page .company-wip-report-sheet { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
    .company-wip-report-page .company-wip-report-header { min-height: 0; padding: 0 0 .09in; }
    .company-wip-report-page .company-wip-report-logo { max-width: 1.72in; max-height: .5in; }
    .company-wip-report-page .company-wip-report-logo-fallback { width: .58in; height: .58in; border-radius: 7px; font-size: 18pt; }
    .company-wip-report-page .company-wip-report-company-lockup strong { font-size: 18pt; }
    .company-wip-report-page .company-wip-report-title h1 { font-size: 16pt; }
    .company-wip-report-page .company-wip-report-title p { font-size: 7.5pt; }
    .company-wip-report-page .company-wip-report-title span { font-size: 6.5pt; }
    .company-wip-report-page .company-wip-primary-metrics { margin-top: .09in; }
    .company-wip-report-page .company-wip-primary-metrics > div { gap: 3px; padding: .08in .07in; }
    .company-wip-report-page .company-wip-primary-metrics span { font-size: 5.75pt; }
    .company-wip-report-page .company-wip-primary-metrics strong { font-size: 14pt; }
    .company-wip-report-page .company-wip-secondary-metrics { margin-top: .05in; }
    .company-wip-report-page .company-wip-secondary-metrics > div { min-height: .42in; padding: .045in; }
    .company-wip-report-page .company-wip-secondary-metrics span { font-size: 5.75pt; }
    .company-wip-report-page .company-wip-secondary-metrics strong { font-size: 11.5pt; }
    .company-wip-report-page .company-wip-secondary-metrics small { font-size: 5pt; }
    .company-wip-report-page .company-wip-health { margin: .055in 0 .07in; break-inside: avoid; }
    .company-wip-report-page .company-wip-section-rule { font-size: 6pt; }
    .company-wip-report-page .company-wip-health-counts { margin-top: .05in; }
    .company-wip-report-page .company-wip-health-counts i { width: 7px; height: 7px; }
    .company-wip-report-page .company-wip-health-counts strong { font-size: 12pt; }
    .company-wip-report-page .company-wip-health-counts span { font-size: 7pt; }
    .company-wip-report-page .company-wip-section-heading { padding-bottom: .04in; }
    .company-wip-report-page .company-wip-section-heading h2 { font-size: 11pt; }
    .company-wip-report-page .company-wip-section-heading span,
    .company-wip-report-page .company-wip-section-heading > strong { font-size: 5.5pt; }
    .company-wip-report-page .company-wip-project-table { margin-top: .05in; }
    .company-wip-report-page .company-wip-project-table thead { display: table-header-group; }
    .company-wip-report-page .company-wip-project-table tr { break-inside: avoid; }
    .company-wip-report-page .company-wip-project-table th { padding: 4px 4px; font-size: 5.5pt; }
    .company-wip-report-page .company-wip-project-table td { padding: 4px; font-size: 5.8pt; }
    .company-wip-report-page .company-wip-project-table td:first-child strong { font-size: 6.2pt; }
    .company-wip-report-page .company-wip-project-table td:first-child span { font-size: 5pt; }
    .company-wip-report-page .company-wip-project-table td:last-child small { font-size: 4.6pt; line-height: 1.2; }
    .company-wip-report-page .wip-health { padding: 2px 4px; font-size: 4.7pt; }
    .company-wip-report-page .company-wip-analysis-grid { gap: .08in; margin-top: .1in; break-inside: avoid; }
    .company-wip-report-page .company-wip-analysis-card,
    .company-wip-report-page .company-wip-attention-card { padding: .08in; }
    .company-wip-report-page .company-wip-analysis-card h2,
    .company-wip-report-page .company-wip-attention-card h2 { margin-bottom: .06in; padding-bottom: .04in; font-size: 7pt; }
    .company-wip-report-page .company-wip-division-row { gap: 2px; margin-top: 4px; }
    .company-wip-report-page .company-wip-division-row > div:first-child,
    .company-wip-report-page .company-wip-billing-card > div,
    .company-wip-report-page .company-wip-attention-card p { font-size: 5.5pt; }
    .company-wip-report-page .company-wip-division-track { height: 6px; }
    .company-wip-report-page .company-wip-report-footer { margin-top: .08in; padding-top: .04in; font-size: 5.5pt; }
}
.forecast-inclusion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.forecast-promise-cell {
    display: grid;
    gap: 5px;
    justify-items: start;
}

.forecast-inclusion-toggle input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #0f766e;
    cursor: pointer;
}

.forecast-excluded-label {
    display: none;
    width: max-content;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff1f2;
    color: #be123c;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.forecast-excluded {
    background: #e2eeec;
    color: #4f6767;
}

.forecast-excluded > td {
    background: #e2eeec;
    color: #4f6767;
}

.arc-work-queue .arc-queue-row.forecast-excluded > td,
.arc-work-queue .arc-queue-row.forecast-excluded:hover > td,
.arc-work-queue .arc-queue-row.forecast-excluded + .arc-collection-detail > td {
    background: #e2eeec;
    color: #4f6767;
}

.forecast-excluded .forecast-excluded-label {
    display: inline-flex;
}

/* Job-first Foreman Daily workflow */
.foreman-daily-controls {
    max-width: 100%;
    margin-bottom: 18px;
}

.foreman-selected-job-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px 22px;
    border: 1px solid #c9d9e5;
    border-radius: 16px 16px 0 0;
    background: #f5f9fc;
}

.foreman-selected-job-summary { min-width: 0; }
.foreman-selected-job-card h3 { margin: 5px 0 4px; font-size: clamp(1.15rem,2vw,1.45rem); line-height: 1.25; }
.foreman-selected-job-card p { margin: 0; color: #526575; font-size: .95rem; }
.foreman-selected-job-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.foreman-selected-job-actions .button-link { min-height: 40px; padding: 8px 13px; border-radius: 10px; font-size: .84rem; white-space: nowrap; }
.foreman-task-selection-list { border: 1px solid #c9d9e5; border-top: 0; border-radius: 0 0 16px 16px; overflow: hidden; }
.foreman-task-selection-row { display: grid; grid-template-columns: auto minmax(180px,1fr) auto auto; align-items: center; gap: 14px; padding: 16px 18px; border-top: 1px solid #dbe6ee; background: #fff; }
.foreman-task-selection-row:first-child { border-top: 0; }
.foreman-task-check input { width: 24px; height: 24px; accent-color: #0e7490; }
.foreman-task-selection-main { display: grid; gap: 3px; }
.foreman-task-selection-main span,.foreman-task-selection-main small { color: #526575; }
.foreman-task-selection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.foreman-task-complete { color: #18794e; font-weight: 800; }
.foreman-daily-launch-actions { align-items: center; justify-content: flex-end; }
.foreman-daily-launch-actions .btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.35); }
.daily-late-flag { background: #fff0d9; border-color: #f0b35b; color: #8b4b00; }
.daily-on-time { background: #e7f7ee; border-color: #8dd5ab; color: #17633b; }
.daily-filing-pill { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.15; }
.daily-filing-pill strong { font: inherit; font-weight: 800; }
.daily-filing-pill small { color: inherit; font-size: .68rem; font-weight: 700; opacity: .82; }
.daily-filing-pill small:empty { display: none; }
.field-report-tasks { margin: 12px 0; color: #344b5b; }

.field-report-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(170px, 0.7fr) minmax(170px, 0.7fr) auto;
    align-items: end;
    gap: 14px;
}

.field-report-filter-action {
    display: flex;
    align-items: flex-end;
    margin-bottom: 18px;
}

.field-report-filter-action .btn {
    min-height: 44px;
    white-space: nowrap;
}

.time-off-report-filter-grid {
    display: grid;
    grid-template-columns: minmax(210px,1.35fr) minmax(190px,1fr) minmax(155px,.72fr) minmax(155px,.72fr) auto;
    align-items: end;
    gap: 14px;
}

.time-off-report-filter-action {
    display: flex;
    align-items: flex-end;
    margin-bottom: 18px;
}

.time-off-report-filter-action .btn { min-height: 44px; white-space: nowrap; }
.time-off-report-table-shell { overflow-x: auto; }
.time-off-report-table { min-width: 980px; }
.time-off-report-table td { vertical-align: top; }

@media print {
    .time-off-report-filter-grid,.time-off-report-results .section-heading .toolbar-pill,.time-off-report-results~.form-actions { display: none; }
    .time-off-report-table { min-width: 0; font-size: 10px; }
}

@media print {
    @page { size: letter portrait; margin: .35in; }
    .field-report-page .topbar,
    .field-report-page .field-report-filter-card,
    .field-report-page .field-report-report-actions { display: none !important; }
    .field-report-page .page,
    .field-report-page .page-shell { max-width: none !important; margin: 0 !important; padding: 0 !important; }
    .field-report-page .hero-card,
    .field-report-page .field-report-job { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
    .field-report-page .hero-card { margin-bottom: .18in; }
    .field-report-page .field-report-job+.field-report-job { break-before: page; }
    .field-report-page .field-report-day { break-inside: avoid; border-radius: 0; }
    .field-report-page .field-report-day header { padding: 8px 10px; }
    .field-report-page .field-report-detail-grid { gap: 8px; padding: 9px 10px; }
    .field-report-page .field-report-tasks,
    .field-report-page .field-report-notes { margin: 7px 10px; font-size: 8pt; }
    .field-report-page .job-cell strong,
    .field-report-page .field-report-day header strong { font-size: 8pt; }
    .field-report-page .status-chip { font-size: 7pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (max-width: 760px) {
    .foreman-selected-job-card { grid-template-columns: 1fr; gap: 15px; padding: 18px; }
    .foreman-selected-job-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-content: stretch; }
    .foreman-selected-job-actions .button-link { width: 100%; }
    .foreman-task-selection-row { grid-template-columns: auto 1fr; }
    .foreman-task-selection-row .status-chip,.foreman-task-selection-row .foreman-task-selection-actions { grid-column: 2; justify-self: start; }
    .foreman-task-selection-actions { justify-content: flex-start; }
    .field-report-filter-grid { grid-template-columns: 1fr; }
    .field-report-filter-action .btn { width: 100%; }
    .time-off-report-filter-grid { grid-template-columns: 1fr; }
    .time-off-report-filter-action .btn { width: 100%; }
}
