.forecast-page {
    padding: 2rem 0 3rem;
}

.forecast-header,
.forecast-panel-header,
.forecast-event-card,
.forecast-workspace,
.forecast-form-grid {
    display: flex;
}

.forecast-header {
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.forecast-eyebrow,
.forecast-panel-header > div > span {
    color: #6e63c6;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.forecast-header h1,
.forecast-panel-header h2 {
    color: #172642;
    font-family: Montserrat, Inter, sans-serif;
    font-weight: 800;
    margin: .2rem 0 .45rem;
}

.forecast-header p {
    color: #667085;
    margin: 0;
    max-width: 720px;
}

.forecast-year-form {
    min-width: 145px;
}

.forecast-year-form label,
.forecast-status-filter label,
.forecast-form-field label {
    color: #43516a;
    display: block;
    font-size: .83rem;
    font-weight: 700;
    margin-bottom: .36rem;
}

.forecast-year-form select,
.forecast-status-filter select,
.forecast-form-field input,
.forecast-form-field select,
.forecast-form-field textarea {
    background: #fff;
    border: 1px solid #d8ddec;
    border-radius: .7rem;
    color: #172642;
    min-height: 2.65rem;
    padding: .55rem .7rem;
    width: 100%;
}

.forecast-tabs {
    border-bottom: 1px solid #e4e8f3;
    display: flex;
    gap: 1.15rem;
    margin-bottom: 1.35rem;
}

.forecast-tabs a,
.forecast-tabs span {
    color: #75809a;
    font-size: .9rem;
    font-weight: 700;
    padding: .55rem .1rem .7rem;
    text-decoration: none;
}

.forecast-tabs .is-active {
    border-bottom: 2px solid #5e50c8;
    color: #3f337e;
}

.forecast-tabs span {
    cursor: not-allowed;
    opacity: .64;
}

.forecast-alert {
    border-radius: .8rem;
    display: flex;
    gap: .45rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
}

.forecast-alert-error {
    background: #fff1f3;
    border: 1px solid #ffc7d1;
    color: #9e1c3b;
}

.forecast-alert-success {
    background: #edf9f2;
    border: 1px solid #b8e8cb;
    color: #19633d;
}

.forecast-workspace {
    align-items: flex-start;
    gap: 1.25rem;
}

.forecast-events-panel,
.forecast-editor-panel,
.forecast-unavailable {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(30, 42, 75, .06);
    padding: 1.2rem;
}

.forecast-events-panel {
    flex: 1 1 61%;
}

.forecast-editor-panel {
    flex: 0 1 390px;
    position: sticky;
    top: 1rem;
}

.forecast-panel-header {
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forecast-panel-header h2 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.forecast-panel-header > a {
    color: #5e50c8;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
}

.forecast-count,
.forecast-status {
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 800;
    padding: .28rem .55rem;
}

.forecast-count {
    background: #f1efff;
    color: #5343b6;
}

.forecast-status-filter {
    align-items: center;
    display: flex;
    gap: .55rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.forecast-status-filter label {
    margin: 0;
}

.forecast-status-filter select {
    min-height: 2.2rem;
    width: 190px;
}

.forecast-event-list {
    display: grid;
    gap: .75rem;
}

.forecast-event-card {
    align-items: center;
    border: 1px solid #edf0f7;
    border-radius: .85rem;
    gap: 1rem;
    justify-content: space-between;
    padding: .9rem;
}

.forecast-event-card-main {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
}

.forecast-event-card h3 {
    color: #1c2944;
    font-size: 1rem;
    margin: 0 0 .15rem;
}

.forecast-event-card p,
.forecast-event-card small {
    color: #71809a;
    display: block;
    font-size: .83rem;
    margin: 0;
}

.forecast-event-kind {
    border-radius: .5rem;
    font-size: .72rem;
    font-weight: 800;
    min-width: 4.5rem;
    padding: .33rem .45rem;
    text-align: center;
    text-transform: capitalize;
}

.forecast-event-kind-income {
    background: #e8f8ef;
    color: #1a7748;
}

.forecast-event-kind-expense {
    background: #fff3e9;
    color: #a34a13;
}

.forecast-event-kind-transfer {
    background: #eef0ff;
    color: #4a3aa1;
}

.forecast-event-card-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.forecast-event-amount {
    color: #172642;
    font-size: .96rem;
}

.forecast-status-active {
    background: #e8f8ef;
    color: #1a7748;
}

.forecast-status-paused {
    background: #fff5d9;
    color: #8f5a00;
}

.forecast-status-archived {
    background: #eef1f7;
    color: #59657b;
}

.forecast-event-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

.forecast-event-actions a,
.forecast-event-actions button {
    background: transparent;
    border: 0;
    color: #5e50c8;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 700;
    padding: 0;
    text-decoration: none;
}

.forecast-event-actions .forecast-archive-action {
    color: #9d3650;
}

.forecast-form-field {
    margin-bottom: .9rem;
}

.forecast-searchable-select {
    position: relative;
}

.forecast-searchable-select.is-enhanced [data-forecast-searchable-native] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.forecast-searchable-select-control {
    position: relative;
    display: flex;
    align-items: center;
}

.forecast-form-field .forecast-searchable-select-control input {
    padding-right: 2.45rem;
    padding-left: 2.35rem;
}

.forecast-searchable-select-icon {
    position: absolute;
    left: .72rem;
    z-index: 1;
    color: #74809a;
    font-size: 1.15rem;
    line-height: 1;
    pointer-events: none;
    transform: rotate(-14deg);
}

.forecast-searchable-select-clear {
    position: absolute;
    right: .42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6e7890;
    font: inherit;
    font-size: 1.15rem;
    cursor: pointer;
}

.forecast-searchable-select-clear:hover,
.forecast-searchable-select-clear:focus-visible {
    background: #eef1f7;
    color: #5e50c8;
    outline: 0;
}

.forecast-searchable-select-results {
    position: absolute;
    right: 0;
    left: 0;
    top: 4rem;
    z-index: 40;
    max-height: 19rem;
    overflow-y: auto;
    border: 1px solid rgba(19, 37, 75, .14);
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 16px 38px rgba(19, 37, 75, .17);
}

.forecast-searchable-select-result-list {
    display: grid;
}

.forecast-searchable-select-result {
    display: grid;
    gap: .12rem;
    width: 100%;
    padding: .7rem .8rem;
    border: 0;
    border-bottom: 1px solid #edf0f7;
    background: #fff;
    color: #172642;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.forecast-searchable-select-result:last-child {
    border-bottom: 0;
}

.forecast-searchable-select-result:hover,
.forecast-searchable-select-result:focus-visible,
.forecast-searchable-select-result[aria-selected="true"] {
    background: #f2f4ff;
    outline: 0;
}

.forecast-searchable-select-result strong {
    font-size: .84rem;
}

.forecast-searchable-select-result span {
    color: #71809a;
    font-size: .75rem;
}

.forecast-searchable-select-message {
    margin: 0;
    padding: .8rem;
    color: #71809a;
    font-size: .8rem;
}

.forecast-form-field small {
    color: #7a8498;
    display: block;
    font-size: .75rem;
    margin-top: .3rem;
}

.forecast-form-field textarea {
    min-height: 5.3rem;
    resize: vertical;
}

.forecast-form-field span.field-validation-error {
    color: #bd2349;
    display: block;
    font-size: .77rem;
    margin-top: .28rem;
}

.forecast-form-grid {
    gap: .75rem;
}

.forecast-form-grid > * {
    flex: 1;
}

.forecast-editor-note {
    background: #f4f2ff;
    border-radius: .75rem;
    color: #554a86;
    font-size: .78rem;
    margin: .9rem 0;
    padding: .75rem;
}

.forecast-editor-note strong,
.forecast-editor-note span {
    display: block;
}

.forecast-editor-note span {
    margin-top: .18rem;
}

.forecast-submit {
    background: #5e50c8;
    border: 0;
    border-radius: .7rem;
    color: #fff;
    font-weight: 800;
    min-height: 2.75rem;
    width: 100%;
}

.forecast-empty-state {
    background: #f8f9fd;
    border: 1px dashed #d7dced;
    border-radius: .8rem;
    color: #64718a;
    padding: 1.2rem;
    text-align: center;
}

.forecast-empty-state h3 {
    color: #283957;
    font-size: 1rem;
    margin-bottom: .35rem;
}


/* Forecast-only liquidity automation: compact legend markers and ledger alerts. */
.forecast-legend-emergency-withdrawal,
.forecast-legend-emergency-replenishment,
.forecast-legend-fidelity-contribution {
    background: transparent !important;
    border-radius: 0 !important;
    height: 18px !important;
    position: relative;
    width: 18px !important;
}

.forecast-legend-emergency-withdrawal::before,
.forecast-legend-emergency-replenishment::before,
.forecast-legend-fidelity-contribution::before {
    font-size: 18px;
    font-style: normal;
    font-weight: 900;
    left: 0;
    line-height: 1;
    position: absolute;
    top: 0;
}

.forecast-legend-emergency-withdrawal::before {
    color: #D92D20;
    content: "★";
}

.forecast-legend-emergency-replenishment::before {
    color: #1A7748;
    content: "★";
}

.forecast-legend-fidelity-contribution::before {
    color: #6913CC;
    content: "★";
}


.forecast-chart-tooltip-automation,
.forecast-row-automation {
    border-radius: 999px;
    display: inline-block;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .025em;
    margin-top: .32rem;
    padding: .18rem .4rem;
    text-transform: uppercase;
}

.forecast-chart-tooltip-automation-emergency_withdrawal,
.forecast-row-automation-emergency_withdrawal {
    background: rgba(217, 45, 32, .12);
    color: #D92D20;
}

.forecast-chart-tooltip-automation-emergency_replenishment,
.forecast-row-automation-emergency_replenishment {
    background: rgba(26, 119, 72, .12);
    color: #1A7748;
}

.forecast-chart-tooltip-automation-fidelity_contribution,
.forecast-row-automation-fidelity_contribution {
    background: rgba(105, 19, 204, .11);
    color: #6913CC;
}

.forecast-chart-tooltip-entry-label.forecast-chart-tooltip-entry-automation-emergency_withdrawal {
    color: #D92D20;
}

.forecast-chart-tooltip-entry-label.forecast-chart-tooltip-entry-automation-emergency_replenishment {
    color: #1A7748;
}

.forecast-chart-tooltip-entry-label.forecast-chart-tooltip-entry-automation-fidelity_contribution {
    color: #6913CC;
}

.forecast-running-row-automation-emergency_withdrawal td {
    background: rgba(217, 45, 32, .055);
    border-bottom-color: rgba(217, 45, 32, .22);
    border-top: 1px solid rgba(217, 45, 32, .22);
}

.forecast-running-row-automation-emergency_withdrawal td:first-child {
    border-left: 4px solid #D92D20;
}

.forecast-running-row-automation-emergency_replenishment td {
    background: rgba(26, 119, 72, .045);
    border-bottom-color: rgba(26, 119, 72, .18);
    border-top: 1px solid rgba(26, 119, 72, .18);
}

.forecast-running-row-automation-emergency_replenishment td:first-child {
    border-left: 4px solid #1A7748;
}

.forecast-running-row-automation-fidelity_contribution td {
    background: rgba(105, 19, 204, .045);
    border-bottom-color: rgba(105, 19, 204, .18);
    border-top: 1px solid rgba(105, 19, 204, .18);
}

.forecast-running-row-automation-fidelity_contribution td:first-child {
    border-left: 4px solid #6913CC;
}

@media (max-width: 991px) {
    .forecast-workspace {
        flex-direction: column;
    }

    .forecast-events-panel,
    .forecast-editor-panel {
        flex-basis: auto;
        width: 100%;
    }

    .forecast-editor-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .forecast-header,
    .forecast-event-card,
    .forecast-form-grid {
        align-items: stretch;
        flex-direction: column;
    }

    .forecast-header {
        align-items: stretch;
    }

    .forecast-event-card-side {
        align-items: flex-start;
    }

    .forecast-event-actions {
        justify-content: flex-start;
    }

    .forecast-status-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .forecast-status-filter select {
        width: 100%;
    }
}


.forecast-overview-controls {
    align-items: end;
    display: grid;
    gap: .35rem;
    grid-template-columns: minmax(130px, 155px) minmax(220px, 290px);
}

.forecast-overview-control-field label {
    color: #43516a;
    display: block;
    font-size: .83rem;
    font-weight: 700;
    margin-bottom: .36rem;
}

.forecast-overview-control-field select,
.forecast-overview-control-field input {
    background: #fff;
    border: 1px solid #d8ddec;
    border-radius: .7rem;
    color: #172642;
    min-height: 2.65rem;
    padding: .55rem .7rem;
    width: 100%;
}

.forecast-overview-control-field-reserve {
    grid-column: 1 / -1;
}

.forecast-overview-control-field-reserve input {
    max-width: 12rem;
}

.forecast-overview-control-field-reserve small {
    color: #71809a;
    display: block;
    font-size: .76rem;
    line-height: 1.35;
    margin-top: .34rem;
    max-width: 32rem;
}

.forecast-overview-context,
.forecast-projection-card {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(30, 42, 75, .06);
}

.forecast-overview-context {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: .9rem 1.1rem;
}

.forecast-overview-context strong,
.forecast-overview-context span {
    display: block;
}

.forecast-overview-context strong {
    color: #1c2944;
    font-size: 1rem;
}

.forecast-overview-context span,
.forecast-overview-context p {
    color: #71809a;
    font-size: .82rem;
    margin: .12rem 0 0;
}

.forecast-alert-warning {
    background: #fff7e6;
    border: 1px solid #ffd693;
    color: #8a5300;
}

.forecast-overview-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.forecast-overview-summary article {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: .9rem;
    box-shadow: 0 8px 20px rgba(30, 42, 75, .04);
    padding: .95rem;
}

.forecast-overview-summary article > span,
.forecast-overview-summary article > strong,
.forecast-overview-summary article > small {
    display: block;
}

.forecast-overview-summary article > span {
    color: #67758d;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.forecast-overview-summary article > strong {
    color: #172642;
    font-size: 1.12rem;
    margin: .34rem 0 .22rem;
}

.forecast-overview-summary article > small {
    color: #7a8498;
    font-size: .76rem;
}

.forecast-year-end-card {
    border-top: 3px solid #6913CC !important;
}

.forecast-reference-balance-card {
    border-top: 3px solid #121D35 !important;
}

.forecast-reference-balance-card:nth-last-child(2),
.forecast-reference-balance-card:last-child {
    border-top-color: #6913CC !important;
}

.forecast-projection-card {
    margin-bottom: 1rem;
    padding: 1.2rem;
}

.forecast-projection-legend {
    align-items: center;
    color: rgba(18, 29, 53, .62);
    display: flex;
    flex-wrap: wrap;
    font-family: Poppins, Inter, Arial, sans-serif;
    font-size: .78rem;
    gap: .7rem;
}

.forecast-projection-legend span {
    align-items: center;
    display: inline-flex;
    gap: .28rem;
}

.forecast-projection-legend i {
    border-radius: 999px;
    display: inline-block;
    height: .28rem;
    width: 1rem;
}

.forecast-legend-actual {
    background: #2673FB;
}

.forecast-legend-projected {
    background: repeating-linear-gradient(
        90deg,
        #6913CC 0,
        #6913CC 4px,
        transparent 4px,
        transparent 7px
    );
}

.forecast-legend-projected.is-long-range,
.forecast-legend-projected-negative.is-long-range {
    background: #6913CC;
}

.forecast-legend-projected-negative {
    background: repeating-linear-gradient(
        90deg,
        #D92D20 0,
        #D92D20 4px,
        transparent 4px,
        transparent 7px
    );
}

.forecast-legend-projected-negative.is-long-range {
    background: #D92D20;
}

.forecast-legend-zero {
    background: #121D35;
    height: 1px !important;
}

.forecast-balance-chart {
    margin: 0;
}

.forecast-balance-chart-canvas {
    height: 300px;
    min-height: 240px;
    position: relative;
    width: 100%;
}

.forecast-projection-header-actions,
.forecast-chart-dialog-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: flex-end;
}

.forecast-chart-expand-action,
.forecast-chart-dialog-close-action {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(18, 29, 53, .18);
    border-radius: .65rem;
    color: #121D35;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.15rem;
    justify-content: center;
    padding: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    width: 2.15rem;
}

.forecast-chart-expand-action:hover,
.forecast-chart-dialog-close-action:hover {
    background: rgba(38, 115, 251, .08);
    border-color: rgba(38, 115, 251, .5);
    color: #2673FB;
}

.forecast-chart-expand-action:focus-visible,
.forecast-chart-dialog-close-action:focus-visible {
    outline: 3px solid rgba(105, 19, 204, .28);
    outline-offset: 2px;
}

.forecast-chart-expand-action svg,
.forecast-chart-dialog-close-action svg {
    fill: none;
    height: 1.1rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1.1rem;
}

.forecast-chart-dialog {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    height: 100vh;
    inset: 0;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: clamp(.75rem, 2vw, 1.5rem);
    width: 100vw;
}

.forecast-chart-dialog[open] {
    align-items: stretch;
    display: flex;
}

.forecast-chart-dialog::backdrop {
    background: rgba(18, 29, 53, .76);
}

.forecast-chart-dialog-panel {
    background: #fff;
    border: 1px solid rgba(38, 115, 251, .28);
    border-radius: 1rem;
    box-shadow: 0 24px 64px rgba(18, 29, 53, .34);
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.forecast-chart-dialog-header {
    align-items: flex-start;
    border-bottom: 1px solid rgba(18, 29, 53, .11);
    display: flex;
    flex: 0 0 auto;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
}

.forecast-chart-dialog-header > div > span {
    color: #6913CC;
    display: block;
    font-family: Poppins, Inter, Arial, sans-serif;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.forecast-chart-dialog-header h2 {
    color: #121D35;
    font-family: Montserrat, Poppins, Arial, sans-serif;
    font-size: clamp(1.08rem, 1.6vw, 1.35rem);
    margin: .22rem 0 0;
}

.forecast-chart-dialog .forecast-balance-chart-expanded {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1rem 1.25rem 1.25rem;
}

.forecast-chart-dialog .forecast-balance-chart-canvas {
    flex: 1 1 auto;
    height: auto;
    min-height: 320px;
}

.forecast-chart-dialog .forecast-chart-fallback {
    margin: 0;
}

body.forecast-chart-dialog-open {
    overflow: hidden;
}

@supports (height: 100dvh) {
    .forecast-chart-dialog {
        height: 100dvh;
    }
}

.forecast-chart-accessibility-summary {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.forecast-chart-fallback {
    color: rgba(18, 29, 53, .72);
    font-family: Poppins, Inter, Arial, sans-serif;
    font-size: .82rem;
    line-height: 1.5;
    margin: .75rem 0 0;
}

.forecast-chart-tooltip {
    background: #fff;
    border: 1px solid rgba(18, 29, 53, .18);
    border-radius: .8rem;
    box-shadow: 0 14px 32px rgba(18, 29, 53, .16);
    box-sizing: border-box;
    color: #121D35;
    font-family: Poppins, Inter, Arial, sans-serif;
    max-width: calc(100vw - 2rem);
    min-width: 0;
    overflow: visible;
    white-space: normal;
    width: min(430px, calc(100vw - 2rem));
}

.forecast-chart-tooltip-heading {
    align-items: center;
    border-bottom: 1px solid rgba(18, 29, 53, .11);
    display: flex;
    font-size: .76rem;
    font-weight: 600;
    justify-content: space-between;
    letter-spacing: .01em;
    padding: .72rem .82rem .62rem;
}

.forecast-chart-tooltip-heading em {
    border-radius: 999px;
    font-size: .65rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .035em;
    padding: .17rem .42rem;
    text-transform: uppercase;
}

.forecast-chart-tooltip-status-actual {
    background: rgba(38, 115, 251, .12);
    color: #2673FB;
}

.forecast-chart-tooltip-status-projected {
    background: rgba(105, 19, 204, .11);
    color: #6913CC;
}

.forecast-chart-tooltip-balance {
    align-items: baseline;
    display: flex;
    gap: .6rem;
    justify-content: space-between;
    padding: .63rem .82rem;
}

.forecast-chart-tooltip-balance span {
    color: rgba(18, 29, 53, .62);
    font-size: .74rem;
}

.forecast-chart-tooltip-balance strong {
    color: #121D35;
    font-family: Montserrat, Poppins, Arial, sans-serif;
    font-size: .86rem;
}

.forecast-chart-tooltip-balance strong.forecast-chart-tooltip-balance-negative {
    color: #D92D20;
}

.forecast-chart-tooltip-entries {
    border-top: 1px solid rgba(18, 29, 53, .11);
    max-height: none;
    overflow: visible;
    padding: .18rem .82rem;
}

.forecast-chart-tooltip-entry {
    align-items: flex-start;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    row-gap: .35rem;
    padding: .54rem 0;
}

.forecast-chart-tooltip-entry + .forecast-chart-tooltip-entry {
    border-top: 1px solid rgba(18, 29, 53, .08);
}

.forecast-chart-tooltip-entry-detail {
    max-width: 100%;
    min-width: 0;
}

.forecast-chart-tooltip-entry,
.forecast-chart-tooltip-entry-detail,
.forecast-chart-tooltip-entry strong,
.forecast-chart-tooltip-entry span,
.forecast-chart-tooltip-entry small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.forecast-chart-tooltip-entry strong,
.forecast-chart-tooltip-entry span,
.forecast-chart-tooltip-entry small {
    display: block;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
}

.forecast-chart-tooltip-entry strong {
    color: #121D35;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.25;
}

.forecast-chart-tooltip-entry span,
.forecast-chart-tooltip-entry small {
    color: rgba(18, 29, 53, .62);
    font-size: .68rem;
    line-height: 1.35;
    margin-top: .08rem;
}

.forecast-chart-tooltip-entry-amount {
    color: #121D35;
    font-family: Montserrat, Poppins, Arial, sans-serif;
    font-size: .73rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.forecast-chart-tooltip-automation-metrics {
    border-top: 1px solid rgba(18, 29, 53, .08);
    display: grid;
    gap: .14rem .75rem;
    grid-column: 1 / -1;
    grid-template-columns: minmax(10rem, 1fr) max-content;
    margin-top: .1rem;
    padding-top: .38rem;
}

.forecast-chart-tooltip-automation-metrics span {
    color: rgba(18, 29, 53, .62);
    font-size: .66rem;
    margin: 0;
}

.forecast-chart-tooltip-automation-metrics b {
    color: #121D35;
    font-size: .68rem;
    line-height: 1.35;
    text-align: right;
}

.forecast-chart-tooltip-automation-metrics b.forecast-chart-tooltip-replenishment-needed {
    color: #D92D20;
}

.forecast-chart-tooltip-automation-metrics b.forecast-chart-tooltip-replenishment-complete {
    color: #1A7748;
}

.forecast-chart-tooltip-automation-metrics b.forecast-chart-tooltip-fidelity-balance {
    color: #6913CC;
}

.forecast-chart-tooltip-duplicate {
    color: #6913CC !important;
    font-weight: 700;
}

.forecast-chart-tooltip-empty {
    color: rgba(18, 29, 53, .62);
    font-size: .73rem;
    margin: .5rem 0;
}

.forecast-table-wrap {
    overflow-x: auto;
}

.forecast-running-table {
    border-collapse: collapse;
    min-width: 860px;
    width: 100%;
}

.forecast-running-table th,
.forecast-running-table td {
    border-bottom: 1px solid #edf0f7;
    padding: .74rem .6rem;
    text-align: left;
    vertical-align: top;
}

.forecast-running-table th {
    color: #65728a;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.forecast-running-table td {
    color: #34435f;
    font-size: .84rem;
}

.forecast-running-table td strong,
.forecast-running-table td small {
    display: block;
}

.forecast-running-table td strong {
    color: #1c2944;
    font-size: .87rem;
}

.forecast-running-table td small {
    color: #79859a;
    font-size: .75rem;
    margin-top: .15rem;
    max-width: 285px;
}


.forecast-row-kind {
    border-radius: 999px;
    display: inline-block;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .025em;
    margin: .35rem 0 0;
    padding: .18rem .4rem;
    text-transform: uppercase;
}

.forecast-row-kind-transfer {
    background: #eef0ff;
    color: #4a3aa1;
}

.forecast-running-table .forecast-number {
    text-align: right;
    white-space: nowrap;
}

.forecast-running-balance {
    color: #172642 !important;
    font-weight: 800;
}

.forecast-running-balance.is-negative {
    color: #a32747 !important;
}

.forecast-projection-source,
.forecast-duplicate-flag {
    border-radius: 999px;
    display: inline-block;
    font-size: .7rem;
    font-weight: 800;
    padding: .25rem .46rem;
    white-space: nowrap;
}

.forecast-projection-source-opening {
    background: #eef1f7;
    color: #59657b;
}

.forecast-projection-source-actual {
    background: #eaf4ff;
    color: #2c5e94;
}

.forecast-projection-source-committed {
    background: #f3efff;
    color: #5b46b2;
}

.forecast-projection-source-planned {
    background: #e8f8ef;
    color: #1a7748;
}

.forecast-duplicate-flag {
    background: #fff3d8;
    color: #8a5300;
    margin-top: .25rem;
}

@media (max-width: 991px) {
    .forecast-overview-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-overview-context {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .forecast-overview-controls {
        align-items: stretch;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .forecast-overview-control-field-reserve input {
        max-width: none;
    }

    .forecast-overview-summary {
        grid-template-columns: 1fr;
    }

    .forecast-projection-card {
        padding: .95rem;
    }

    .forecast-projection-legend {
        justify-content: flex-start;
    }

    .forecast-projection-header-actions {
        justify-content: space-between;
        width: 100%;
    }

    .forecast-chart-dialog {
        padding: 0;
    }

    .forecast-chart-dialog-panel {
        border: 0;
        border-radius: 0;
    }

    .forecast-chart-dialog-header {
        flex-direction: column;
        padding: 1rem;
    }

    .forecast-chart-dialog-header-actions {
        justify-content: space-between;
        width: 100%;
    }

    .forecast-chart-dialog .forecast-balance-chart-expanded {
        padding: .75rem 1rem 1rem;
    }

    .forecast-chart-dialog .forecast-balance-chart-canvas {
        min-height: 260px;
    }
}


/* Credit-card payment workbook review: evidence-only, no financial mutation. */
.forecast-review-page .forecast-header {
    align-items: flex-start;
}

.forecast-review-controls {
    align-items: flex-end;
    display: flex;
    gap: .8rem;
}

.forecast-review-history-toggle {
    align-items: center;
    color: #53627a;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 700;
    gap: .42rem;
    padding: .55rem .7rem;
    white-space: nowrap;
}

.forecast-review-history-toggle input {
    accent-color: #6255d5;
    height: 1rem;
    width: 1rem;
}

.forecast-review-boundary {
    align-items: flex-start;
    background: #fff7e7;
    border: 1px solid #f1d8a6;
    border-radius: .75rem;
    color: #6a4c11;
    display: flex;
    flex-direction: column;
    font-size: .86rem;
    gap: .22rem;
    line-height: 1.45;
    margin: 1rem 0;
    padding: .85rem 1rem;
}

.forecast-review-boundary strong {
    color: #754d00;
}

.forecast-review-boundary em {
    color: #3c356d;
    font-style: normal;
    font-weight: 800;
}

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

.forecast-review-card {
    margin-top: 1rem;
}

.forecast-review-table {
    min-width: 1220px;
}

.forecast-review-table td small {
    max-width: 260px;
}

.forecast-workbook-row {
    color: #576781;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.forecast-review-amount {
    color: #923c25 !important;
    font-weight: 800;
}

.forecast-review-mapping,
.forecast-review-status {
    border-radius: 999px;
    display: inline-block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    padding: .25rem .46rem;
    text-transform: uppercase;
}

.forecast-review-mapping-ready {
    background: #e8f8ef;
    color: #1a7748;
}

.forecast-review-mapping-source_account_unresolved,
.forecast-review-mapping-destination_account_unresolved,
.forecast-review-mapping-account_pair_unresolved {
    background: #fff0ef;
    color: #a43a37;
}

.forecast-review-status {
    background: #eef0ff;
    color: #4a3aa1;
}

.forecast-review-row-historical {
    background: #fbfcff;
    opacity: .82;
}

.forecast-review-row-future td:first-child strong {
    color: #332b81;
}

@media (max-width: 991px) {
    .forecast-review-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .forecast-review-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .forecast-review-summary {
        grid-template-columns: 1fr;
    }
}


/* Forecast actualization: a deliberately subtle table action opens a focused
   review dialog. It uses the existing Shelvera surfaces and never expands the
   running-ledger table with a noisy action column. */
.forecast-record-actual-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f54d8;
    font: inherit;
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.forecast-record-actual-link:hover,
.forecast-record-actual-link:focus-visible {
    color: #1b2d73;
}

.forecast-actualization-dialog {
    width: min(680px, calc(100vw - 2rem));
    max-height: min(760px, calc(100vh - 2rem));
    padding: 0;
    border: 1px solid #d9dff3;
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 5rem rgba(19, 34, 78, 0.3);
    background: #fff;
}

.forecast-actualization-dialog::backdrop {
    background: rgba(17, 31, 64, 0.45);
    backdrop-filter: blur(2px);
}

.forecast-actualization-form {
    display: flex;
    flex-direction: column;
    max-height: inherit;
}

.forecast-actualization-header,
.forecast-actualization-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
}

.forecast-actualization-header {
    border-bottom: 1px solid #e4e8f5;
    background: linear-gradient(105deg, #fff 0%, #fbf8ff 100%);
}

.forecast-actualization-header h2 {
    margin: 0.2rem 0 0;
    color: #10275d;
    font-size: 1.5rem;
}

.forecast-actualization-header p {
    margin: 0.35rem 0 0;
    color: #68799f;
    line-height: 1.45;
}

.forecast-dialog-close {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #dce2f3;
    border-radius: 50%;
    background: #fff;
    color: #5f7197;
    font-size: 1.5rem;
    cursor: pointer;
}

.forecast-actualization-body {
    display: grid;
    gap: 1rem;
    overflow-y: auto;
    padding: 1.35rem 1.5rem;
}

.forecast-actualization-plan-summary {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border: 1px solid #ded8ff;
    border-radius: 0.85rem;
    background: #fbfaff;
}

.forecast-actualization-plan-summary > span,
.forecast-actualization-plan-summary div span {
    color: #6b64b8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.forecast-actualization-plan-summary strong {
    color: #162d64;
}

.forecast-actualization-plan-summary small {
    color: #697aa0;
}

.forecast-actualization-plan-summary div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e8e4fb;
}

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

.forecast-actualization-body label {
    display: grid;
    gap: 0.4rem;
    color: #415981;
    font-size: 0.84rem;
    font-weight: 750;
}

.forecast-actualization-body input,
.forecast-actualization-body select,
.forecast-actualization-body textarea {
    width: 100%;
    min-height: 2.8rem;
    box-sizing: border-box;
    border: 1px solid #cbd5eb;
    border-radius: 0.65rem;
    background: #fff;
    color: #152d64;
    font: inherit;
    font-weight: 600;
    padding: 0.6rem 0.7rem;
}

.forecast-actualization-body textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.forecast-actualization-body input:focus-visible,
.forecast-actualization-body select:focus-visible,
.forecast-actualization-body textarea:focus-visible,
.forecast-dialog-close:focus-visible,
.forecast-record-actual-link:focus-visible {
    outline: 3px solid rgba(96, 112, 255, 0.28);
    outline-offset: 2px;
}

.forecast-actualization-amount {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #cbd5eb;
    border-radius: 0.65rem;
}

.forecast-actualization-amount span {
    display: grid;
    place-items: center;
    min-width: 4.25rem;
    border-right: 1px solid #dbe1f0;
    background: #f6f8ff;
    color: #405a8e;
    font-size: 0.8rem;
    font-weight: 800;
}

.forecast-actualization-amount input {
    border: 0;
    border-radius: 0;
}

.forecast-actualization-amount:focus-within {
    outline: 3px solid rgba(96, 112, 255, 0.28);
    outline-offset: 2px;
}

.forecast-actualization-body em {
    color: #7e8eae;
    font-size: 0.77rem;
    font-style: normal;
    font-weight: 600;
}

.forecast-actualization-transfer-route small {
    color: #7464bc;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.3;
}

.forecast-actualization-ledger-note {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    color: #52698f;
    font-size: 0.82rem;
    line-height: 1.45;
}

.forecast-actualization-ledger-note span {
    color: #6c22d7;
}

.forecast-actualization-footer {
    align-items: center;
    border-top: 1px solid #e4e8f5;
    background: #fff;
}

.forecast-actualization-footer .forecast-button-secondary,
.forecast-actualization-footer .forecast-button-primary {
    min-height: 2.75rem;
    border-radius: 0.7rem;
    padding: 0.65rem 1rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.forecast-actualization-footer .forecast-button-secondary {
    margin-left: auto;
    border: 1px solid #d5ddec;
    background: #fff;
    color: #19336a;
}

.forecast-actualization-footer .forecast-button-primary {
    border: 1px solid #122b63;
    background: #122b63;
    color: #fff;
}

.forecast-actualization-footer .forecast-button-primary:disabled {
    cursor: wait;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .forecast-actualization-dialog {
        width: 100vw;
        max-height: min(92vh, 760px);
        margin: auto 0 0;
        border-radius: 1.25rem 1.25rem 0 0;
    }

    .forecast-actualization-header,
    .forecast-actualization-body,
    .forecast-actualization-footer {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .forecast-form-grid {
        grid-template-columns: 1fr;
    }

    .forecast-actualization-footer {
        position: sticky;
        bottom: 0;
    }
}

.forecast-actualization-body select[aria-readonly="true"] {
    background: #f6f7fc;
    color: #52698f;
    cursor: not-allowed;
}


/* Unified selected-account ledger and all-account planned activity ---------- */
.forecast-activity-card {
    margin-top: 1.5rem;
}

.forecast-activity-card-header {
    align-items: flex-start;
    gap: 1rem;
}

.forecast-activity-card-header > div:first-child {
    min-width: 0;
}

.forecast-activity-intro {
    max-width: 52rem;
    margin: .38rem 0 0;
    color: #60729a;
    font-size: .875rem;
    line-height: 1.5;
}

.forecast-activity-intro strong {
    color: #314a80;
}

.forecast-activity-header-controls {
    display: grid;
    justify-items: end;
    gap: .65rem;
}

.forecast-activity-view-toggle {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d5dff1;
    border-radius: .72rem;
    background: #f7f9fe;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}

.forecast-activity-view-toggle button {
    min-height: 2.35rem;
    border: 0;
    border-right: 1px solid #d5dff1;
    background: transparent;
    color: #53698f;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    padding: .45rem .82rem;
    transition: background-color .15s ease, color .15s ease;
}

.forecast-activity-view-toggle button:last-child {
    border-right: 0;
}

.forecast-activity-view-toggle button:hover {
    background: #eef2ff;
    color: #2e3f87;
}

.forecast-activity-view-toggle button.is-active {
    background: #122b63;
    color: #ffffff;
}

.forecast-activity-view-toggle button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(105, 19, 204, .28);
    outline-offset: -2px;
}

.forecast-activity-filters {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(9rem, .8fr);
    gap: .8rem;
    align-items: end;
    margin: 0 0 1.1rem;
    padding: .85rem;
    border: 1px solid #e4e9f4;
    border-radius: .9rem;
    background: #f8faff;
}

.forecast-activity-filters label {
    display: grid;
    gap: .35rem;
    color: #586a91;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .015em;
}

.forecast-activity-filters select {
    min-width: 0;
    min-height: 2.55rem;
    border: 1px solid #ccd7eb;
    border-radius: .65rem;
    background: #ffffff;
    color: #112a5e;
    font: inherit;
}

.forecast-activity-filters select {
    padding: 0 .7rem;
}

.forecast-activity-filters select:focus {
    outline: 3px solid rgba(105, 19, 204, .17);
    outline-offset: 1px;
    border-color: #6913cc;
}

.forecast-scoped-search {
    margin-top: 1.1rem;
}

.forecast-search-empty {
    margin-top: .75rem;
}

.forecast-activity-table {
    min-width: 1110px;
}

.forecast-activity-table th:nth-child(1) {
    min-width: 6.7rem;
}

.forecast-activity-table th:nth-child(2) {
    min-width: 16rem;
}

.forecast-activity-table th:nth-child(3) {
    min-width: 13rem;
}

.forecast-activity-table th:nth-child(4) {
    min-width: 9.5rem;
}

.forecast-activity-row-review td {
    background: #fbfcff;
}

.forecast-activity-row-review td:first-child {
    box-shadow: inset 3px 0 0 #d8c4ff;
}

.forecast-activity-account-cell > strong,
.forecast-activity-account-cell > small,
.forecast-activity-role-cell > small {
    display: block;
}

.forecast-activity-account-cell > small,
.forecast-activity-role-cell > small {
    margin-top: .18rem;
    color: #7587aa;
    font-size: .74rem;
    line-height: 1.35;
}

.forecast-activity-role-cell .forecast-projection-source,
.forecast-activity-role-cell .forecast-activity-impact,
.forecast-activity-role-cell .forecast-duplicate-flag {
    margin: 0 .26rem .24rem 0;
}

.forecast-activity-kind-income {
    background: #e9f8ef;
    color: #1a7748;
}

.forecast-activity-kind-expense {
    background: #fff1ed;
    color: #b53f25;
}

.forecast-activity-route {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    color: #455d8d;
    font-size: .83rem;
    line-height: 1.35;
}

.forecast-activity-route strong {
    display: inline;
    color: #112a5e;
    font-size: inherit;
}

.forecast-activity-impact {
    display: inline-block;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    padding: .25rem .46rem;
    white-space: nowrap;
}

.forecast-activity-impact-included {
    background: #edf4ff;
    color: #355f95;
}

.forecast-activity-impact-review {
    background: #f1edff;
    color: #6245b4;
}

.forecast-activity-not-included {
    color: #8491a8 !important;
}

.forecast-activity-action {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.forecast-activity-no-action {
    color: #92a0b8;
}

.forecast-activity-empty {
    margin: 0;
    padding: 1rem .65rem .15rem;
    color: #66799f;
    font-size: .88rem;
}

@media (max-width: 900px) {
    .forecast-activity-card-header {
        display: grid;
    }

    .forecast-activity-header-controls {
        justify-items: start;
    }
}

@media (max-width: 780px) {
    .forecast-activity-card {
        margin-inline: -.1rem;
    }

    .forecast-activity-filters {
        grid-template-columns: 1fr;
    }

    .forecast-activity-view-toggle {
        max-width: 100%;
    }

    .forecast-activity-view-toggle button {
        flex: 1 1 auto;
        padding-inline: .65rem;
    }
}

/* Operating-cash-pool and unified-activity refinements. The action column
   deliberately reserves a real width and stays visible, so text actions never truncate. */
.forecast-operating-cash-pool-copy {
    max-width: 52rem;
}

.forecast-activity-table {
    min-width: 1280px;
}

.forecast-activity-table th:nth-child(8),
.forecast-activity-table td:nth-child(8) {
    min-width: 12.5rem;
}

.forecast-activity-table th:nth-child(8),
.forecast-activity-action {
    background: #fff;
    box-shadow: -14px 0 18px rgba(18, 29, 53, .04);
    position: sticky;
    right: 0;
    z-index: 2;
}

.forecast-activity-row-review .forecast-activity-action {
    background: #fbfcff;
}

.forecast-activity-action {
    box-sizing: border-box;
    width: 12.5rem;
    min-width: 12.5rem;
    padding-left: 1rem !important;
    padding-right: 1.1rem !important;
    text-align: left;
    white-space: nowrap;
}

.forecast-record-actual-link {
    max-width: none;
    min-width: max-content;
    overflow: visible;
    white-space: nowrap;
}

/* A zero actual is a Forecast-only skip: it is deliberately distinct from a
   posted ledger actual so users understand that no account balance changes. */
.forecast-actualization-skip-note {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid #ddd0ff;
    border-radius: 0.7rem;
    background: #fbf9ff;
    color: #55418f;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.45;
}

.forecast-actualization-skip-note span {
    color: #6c22d7;
    font-weight: 900;
}

/* Forecast activity table polish: reserve real columns instead of overlaying a
   sticky action column. This keeps the running-balance column readable and the
   Mark/Record actions complete on desktop and horizontally scrollable layouts. */
.forecast-activity-table {
    table-layout: fixed;
    min-width: 1420px;
}

.forecast-activity-col-date {
    width: 8.25rem;
}

.forecast-activity-col-activity {
    width: 18.5rem;
}

.forecast-activity-col-account {
    width: 16rem;
}

.forecast-activity-col-role {
    width: 12.5rem;
}

.forecast-activity-col-money {
    width: 9.5rem;
}

.forecast-activity-col-running {
    width: 12rem;
}

.forecast-activity-col-action {
    width: 13rem;
}

.forecast-activity-table th:nth-child(8),
.forecast-activity-table td:nth-child(8),
.forecast-activity-action,
.forecast-activity-table th:nth-child(8) {
    position: static;
    right: auto;
    z-index: auto;
    box-shadow: none;
    min-width: 0;
}

.forecast-activity-action-heading,
.forecast-activity-action {
    background: transparent;
    text-align: right;
    white-space: nowrap;
}

.forecast-activity-action {
    width: auto;
    padding-left: .75rem !important;
    padding-right: .75rem !important;
}

.forecast-record-actual-link {
    display: inline-flex;
    max-width: none;
    min-width: max-content;
    overflow: visible;
    white-space: nowrap;
}


/* Forecast activity table: fit the full combined review list without horizontal scrolling.
   Rows are intentionally taller so account, role, balance, and action content remain readable. */
.forecast-activity-card .forecast-table-wrap {
    overflow-x: visible;
}

.forecast-activity-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
}

.forecast-activity-col-date {
    width: 8%;
}

.forecast-activity-col-activity {
    width: 19%;
}

.forecast-activity-col-account {
    width: 18%;
}

.forecast-activity-col-role {
    width: 16%;
}

.forecast-activity-col-money {
    width: 9%;
}

.forecast-activity-col-running {
    width: 11%;
}

.forecast-activity-col-action {
    width: 10%;
}

.forecast-activity-table th,
.forecast-activity-table td {
    overflow-wrap: break-word;
    white-space: normal;
}

.forecast-activity-table td {
    line-height: 1.38;
    padding-bottom: 1.05rem;
    padding-top: 1.05rem;
}

.forecast-activity-table .forecast-number {
    overflow-wrap: normal;
    white-space: normal;
}

.forecast-activity-action-heading,
.forecast-activity-action {
    text-align: left;
    white-space: normal;
}

.forecast-activity-action {
    padding-left: .8rem !important;
    padding-right: .6rem !important;
}

.forecast-record-actual-link {
    display: inline-flex;
    line-height: 1.3;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    overflow-wrap: break-word;
    text-align: left;
    white-space: normal;
}

@media (max-width: 900px) {
    .forecast-activity-col-date {
        width: 9%;
    }

    .forecast-activity-col-activity {
        width: 20%;
    }

    .forecast-activity-col-account {
        width: 18%;
    }

    .forecast-activity-col-role {
        width: 16%;
    }

    .forecast-activity-col-money {
        width: 8%;
    }

    .forecast-activity-col-running {
        width: 11%;
    }

    .forecast-activity-col-action {
        width: 10%;
    }
}

.forecast-repeat-interval-field {
    border: 1px solid #e4e9f4;
    border-radius: .85rem;
    background: #fbfcff;
    padding: .78rem;
}

.forecast-repeat-interval-control {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.forecast-repeat-interval-control input {
    max-width: 7rem;
}

.forecast-repeat-interval-control span {
    color: #526b9e;
    font-size: .86rem;
    font-weight: 800;
}

.forecast-activity-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.1rem;
    margin: -.2rem 0 1rem;
    color: #526b9e;
    font-size: .78rem;
    font-weight: 800;
}

.forecast-activity-status-legend span {
    align-items: center;
    display: inline-flex;
    gap: .42rem;
}

.forecast-activity-status-swatch {
    border-radius: 999px;
    display: inline-block;
    height: .7rem;
    width: .7rem;
}

.forecast-activity-status-swatch-completed {
    background: #1a7748;
}

.forecast-activity-status-swatch-attention {
    background: #d92d20;
}

.forecast-activity-status-swatch-upcoming {
    background: #e67e22;
}

.forecast-activity-row-completed td {
    background: #f1fbf5;
    border-bottom-color: rgba(26, 119, 72, .18);
}

.forecast-activity-row-completed td:first-child {
    box-shadow: inset 4px 0 0 #1a7748;
}

.forecast-activity-row-attention:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > td,
.forecast-activity-row-attention:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > .forecast-activity-action {
    background: #fff3f2;
    border-bottom-color: rgba(217, 45, 32, .22);
}

.forecast-activity-row-attention:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > td:first-child {
    box-shadow: inset 4px 0 0 #d92d20;
}

.forecast-activity-row-upcoming:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > td,
.forecast-activity-row-upcoming:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > .forecast-activity-action {
    background: #fff8e6;
    border-bottom-color: rgba(230, 126, 34, .24);
}

.forecast-activity-row-upcoming:not(.forecast-running-row-automation-emergency_withdrawal):not(.forecast-running-row-automation-emergency_replenishment):not(.forecast-running-row-automation-fidelity_contribution) > td:first-child {
    box-shadow: inset 4px 0 0 #e67e22;
}

.forecast-activity-attention-flag {
    background: #d92d20;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .04em;
    margin-top: .32rem;
    padding: .2rem .48rem;
    text-transform: uppercase;
}

.forecast-activity-row-overdue.forecast-running-row-automation-emergency_withdrawal > td,
.forecast-activity-row-overdue.forecast-running-row-automation-emergency_replenishment > td,
.forecast-activity-row-overdue.forecast-running-row-automation-fidelity_contribution > td {
    border-bottom: 2px solid #d92d20;
    border-top: 2px solid #d92d20;
}
