/* Flyout form document — shared React-parity styling for the New Form flyout.
   The React forms (BudgetTransferForm, ContractRequestForm, etc.) render as a
   fixed-width white "PDF page" on a grey desk, with grey panel/grid headers and
   cream card bodies. This ports that look onto the Blazor forms (Bootstrap
   cards + Telerik grids) 1:1 — same 1509px natural page width and the same
   authored px sizes as the React CSS, so the flyout's fit-to-width zoom scales
   it to exactly the same on-screen size and density as React.

   REUSE: wrap any flyout form's body in `.flyout-form-doc` and the generic
   chrome (page, grey card headers, cream bodies, grey grid header + footer,
   column dividers, section titles) applies with no per-form classes. Add
   `.ff-info` / `.ff-impact` to the two side-by-side cards, `.ff-readonly` to
   auto-populated value boxes, `.ff-statement` to a contingency-impact table,
   `.ff-sov-title` to the section heading, and a per-form modifier on the root
   (e.g. `.ff-btf`) for money-column alignment that depends on column order.

   Scoped under `.flyout-form-doc`; bindings untouched — this only restyles.

   Palette (from ContractRequestForm.css / BudgetTransferForm.css, measured live):
     desk #e9eaee ; page #fff ; card body cream #faf8f5 ; header bar #d9d9d9
     locked field #f5f5f5 fill / #555 text / #d9d9d9 border ; ink #222
     column div #c5c5c5 / #c8c8c8 ; hairline #ececec ; grid footer #eae9e7 ;
     border #d9d9d9 ; error #c0392b */

/* ---- Desk + page ------------------------------------------------------- */
/* The flyout zoom scroll area is the grey desk; the page centres on it with a
   soft shadow (like a sheet of paper). Padding gives the top/bottom margin;
   the side margin comes from the fit-to-width inset in FlyoutZoom. */
.flyout-zoom-content:has(.flyout-form-doc) {
    background: #e9eaee;
    /* Desk margin above/below the page — unzoomed (like React's 28px .crf-doc-desk
       padding), so the gap stays 28px regardless of the fit scale. Putting it on
       the zoomed .flyout-zoom-scale shrank it with the zoom. */
    padding: 28px 0;
}

.flyout-zoom-scale:has(.flyout-form-doc) {
    padding: 0;
}

/* React renders the page as a single self-contained element that is a direct
   child of the scrolling desk. The Blazor form instead nests the page inside
   its own standalone-layout scroll containers (Telerik splitter, the
   overflow-x:hidden k-pane, an overflow-y-scroll container-fluid, fixed
   projectrac-height, a sticky footer). Those scroll/clip the oversized page
   internally. Neutralize them when a flyout page is hosted so the whole form
   flows as ONE block and only the outer desk scrolls (both axes) — the white
   page never scrolls itself, matching React. */
.flyout-zoom-scale:has(.flyout-form-doc) .k-splitter,
.flyout-zoom-scale:has(.flyout-form-doc) .k-splitter > .k-pane,
.flyout-zoom-scale:has(.flyout-form-doc) .projectrac-height,
.flyout-zoom-scale:has(.flyout-form-doc) .container-fluid.overflow-y-scroll {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.flyout-zoom-scale:has(.flyout-form-doc) .k-splitter,
.flyout-zoom-scale:has(.flyout-form-doc) .k-splitter > .k-pane,
.flyout-zoom-scale:has(.flyout-form-doc) .k-splitter > .k-pane > .container-fluid {
    background: transparent !important;
}

/* The form's own sticky bottom bar (certification row when embedded) flows
   inline as part of the page instead of sticking to the flyout. */
.flyout-zoom-scale:has(.flyout-form-doc) .sticky-bottom {
    position: static !important;
    background: transparent !important;
}

/* Zero the wrapper row's top padding (Bootstrap pt-3). It sits INSIDE the
   zoomed scale, so it made the gap above the page grow/shrink with the zoom.
   The only space above the page is now the fixed 28px unzoomed desk padding,
   constant at any zoom — like React. */
.flyout-zoom-scale:has(.flyout-form-doc) .row.pt-3 {
    padding-top: 0 !important;
}

.flyout-form-doc {
    --ff-cream: #faf8f5;
    --ff-header: #d9d9d9;
    --ff-border: #d9d9d9;
    --ff-lock-fill: #f5f5f5;
    --ff-lock-text: #555;
    --ff-ink: #222;
    --ff-col-div: #c5c5c5;
    --ff-hairline: #ececec;
    --ff-footer: #eae9e7;
    --ff-error: #c0392b;

    /* Fixed page — same natural width as the React page so fit-to-width scales
       both identically. */
    width: 1509px;
    max-width: none;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 32px 40px 28px;
    background: #fff;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
    color: var(--ff-ink);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 10.5px;
    line-height: 1.35;
}

/* ---- Title block (PROJECT / FORM NAME (ref) + date) -------------------- */
.flyout-form-doc .ff-titleblock {
    padding-bottom: 9.6px;
    margin-bottom: 12.8px;
    border-bottom: 1px solid var(--ff-border);
}

.flyout-form-doc .ff-title-proj {
    font-size: 12px;
    font-weight: 700;
    color: var(--ff-ink);
    text-transform: uppercase;
    line-height: 1.3;
}

.flyout-form-doc .ff-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 2px;
}

.flyout-form-doc .ff-title-name,
.flyout-form-doc .ff-title-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--ff-ink);
    text-transform: uppercase;
}

.flyout-form-doc .ff-title-date {
    white-space: nowrap;
}

/* Align every row to the page content box (zero Bootstrap row/col gutters) so
   the two cards span exactly the SOV grid's width — the Impact card's right edge
   reaches the page edge and lines up with the grid. */
.flyout-form-doc .row {
    margin-left: 0;
    margin-right: 0;
}

.flyout-form-doc .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

/* ---- Two-card row — React column widths (info 50%+180, impact 50%-200) -- */
.flyout-form-doc .ff-cards {
    display: grid;
    grid-template-columns: minmax(0, calc(50% + 180px)) minmax(0, calc(50% - 200px));
    gap: 20px;
    align-items: stretch;
}

/* CRF: two EQUAL panels (React `.crf-top-grid` = 1fr 1fr), unlike the PCF/BTF
   info(50%+180) + impact(50%-200) split above. Equal width gives the Contract
   Terms full-width controls the same room as the info card (they were cramped /
   cut off in the narrow 50%-200 column). */
.flyout-form-doc.ff-crf .ff-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Card chrome — cream body, thin border. Targets any .card in the doc. */
.flyout-form-doc .card {
    background: var(--ff-cream);
    border: 1px solid var(--ff-border);
    border-radius: 4.8px;
    overflow: hidden;
    box-shadow: none;
    margin: 0;
}

.flyout-form-doc .ff-info,
.flyout-form-doc .ff-impact,
.flyout-form-doc .ff-terms {
    min-width: 0;
}

/* ---- Card header — grey bar, dark uppercase (beats projectrac-primary) -- */
.flyout-form-doc .card > .card-header {
    background: var(--ff-header) !important;
    color: var(--ff-ink) !important;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.32px;
    padding: 0 11.2px;
    height: 25.6px;
    min-height: 25.6px;
    display: flex;
    align-items: center;
    border: none;
    border-bottom: 1.6px solid #e0e0e0;
    border-radius: 0;
}

.flyout-form-doc .card > .card-header .float-end {
    margin-left: auto;
    font-weight: 700;
}

.flyout-form-doc .card > .card-body {
    background: var(--ff-cream);
    padding: 9.6px 11.2px;
}

/* ---- Label / value rows (info card) ------------------------------------ */
.flyout-form-doc .ff-info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6.4px;
}

.flyout-form-doc .ff-info-table > tr > td,
.flyout-form-doc .ff-info-table > tbody > tr > td {
    vertical-align: middle;
    padding: 0;
}

.flyout-form-doc .ff-info-table td.fw-bold,
.flyout-form-doc .ff-info-table td:first-child {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ff-ink);
    white-space: nowrap;
    width: 96px;
    padding-right: 6.4px;
}

.flyout-form-doc .ff-info-table td.align-content-start {
    vertical-align: top;
    padding-top: 4px;
}

/* CRF label columns — React sizes its two panels differently, because Contract
   Terms' longest label ("Compensation Structure:") is wider than Contract
   Information's ("Contract Assignment:"):
     `.crf-field-row            { grid-template-columns: 140px 1fr }`  (Terms)
     `.crf-info-body-tight ...  { grid-template-columns: 130px 1fr }`  (Info)
   with a 6.4px gap, which the shared `padding-right: 6.4px` above already gives.
   The BTF/PCF have their own widths (see below), so these are scoped to
   `.ff-crf` rather than changing the shared value.
   The app-wide `div:not(.workplan-tree) td { font-size: 11px !important;
   font-weight: 500 !important }` (app.css) beats the typography declared above,
   so the label font has to be re-forced here with `!important`. */
/* `table-layout: fixed` so the declared width is a real track, as React's grid
   column is — under `auto` the browser sizes column 1 to its widest label and
   the two panes end up with different label columns (82 / 93.6 measured).
   Both CRF tables are plain 2-column label|value, and their first row is a
   normal 2-cell row, so the first-row column model fixed layout reads is right. */
.flyout-form-doc.ff-crf .ff-info-table {
    table-layout: fixed;
}

.flyout-form-doc.ff-crf .ff-info-table td.fw-bold,
.flyout-form-doc.ff-crf .ff-info-table td:first-child {
    width: 130px;
    font-size: 10.5px !important;
    font-weight: 600 !important;
}

.flyout-form-doc.ff-crf .ff-terms-table td.fw-bold,
.flyout-form-doc.ff-crf .ff-terms-table td:first-child {
    width: 140px;
}

/* BTF / PCF label typography — the app-wide
   `div:not(.workplan-tree) td { font-size: 11px !important; font-weight: 500
   !important }` in app.css beats the 10.5px/600 declared on `.ff-info-table
   td:first-child` above, so it has to be re-forced per form, exactly as the CRF
   block does. React's label is `.crf-label { font-size: 10.5px; font-weight: 600 }`. */
.flyout-form-doc.ff-btf .ff-info-table td.fw-bold,
.flyout-form-doc.ff-btf .ff-info-table td:first-child,
.flyout-form-doc.ff-pcf .ff-info-table td.fw-bold,
.flyout-form-doc.ff-pcf .ff-info-table td:first-child {
    font-size: 10.5px !important;
    font-weight: 600 !important;
}

/* BTF label column — React `.btf-xfer-info .crf-field-row
   { grid-template-columns: 96px minmax(0,1fr) minmax(0,1fr) }`. `min-width`
   rather than the CRF's `table-layout: fixed`: this table models React's
   3-column grid as TWO table columns with the inner control sized by
   `--ff-half` off the value cell, and changing layout mode would re-base that.
   Under auto layout a plain `width` is only a suggestion — the browser was
   shrinking the column to its content (82.9 measured) — so it needs a floor. */
.flyout-form-doc.ff-btf .ff-info-table td.fw-bold,
.flyout-form-doc.ff-btf .ff-info-table td:first-child {
    width: 96px;
    min-width: 96px;
}

/* NO width rule for the PCF on purpose. React's 110px left track is NOT
   comparable: its PCF info panel is a TWO-COLUMN ownership layout (contractor
   fields left, Landmark-added fields right — `110px 1fr 148px 1fr`), and
   "Contract Assignment:" lives in the RIGHT 148px column. React's own comment
   says so: "124px was sized for the old 'Contract Assignment:' label that has
   since moved to the right column" (BudgetTransferForm.css ~L66). Blazor's PCF
   is a single-column table that still carries that label on the LEFT, where it
   measures 110.8px and so cannot fit a 110px track. Letting the column size to
   its content (117.2px) is correct until the panel is restructured into React's
   two-column layout — see the TODO item. */

/* Value cell fills the area right of the 96px label. The short fields (Date /
   Project / Transfer Type) then take HALF of it via --ff-half so they render at
   the same width as React's `1fr` column of its `96px 1fr 1fr` info grid;
   textarea + attachment span the whole cell (React's col2+col3). */
.flyout-form-doc .ff-info-table td:nth-child(2) {
    width: 100%;
    /* Override Bootstrap `pr-3` on the Date/Project cells so every value cell has
       the same 0 right padding (React's value column is flush) — otherwise the
       half-width fields wouldn't line up across rows. */
    padding-right: 0 !important;
    --ff-half: calc((100% - 6.4px) / 2);
}

.flyout-form-doc .ff-readonly {
    display: flex;
    align-items: center;
    height: 24px;
    width: var(--ff-half);
    padding: 0 6.4px;
    background: var(--ff-lock-fill);
    border: 1px solid var(--ff-border);
    border-radius: 2.4px;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--ff-lock-text);
    box-sizing: border-box;
}

/* Editable inputs (Telerik) — clean white field, thin border, compact */
.flyout-form-doc .ff-info-table .k-picker,
.flyout-form-doc .ff-info-table .k-textarea,
.flyout-form-doc .ff-info-table .k-input {
    font-size: 10.5px;
    border-radius: 2.4px;
    border-color: var(--ff-border);
    background: #fff;
    box-shadow: none;
    width: 100%;
}

/* Transfer Type (a dropdown picker) is a short field → half width, matching
   the Date / Project read-only boxes and React's `1fr` info column. */
.flyout-form-doc .ff-info-table .k-picker {
    width: var(--ff-half);
}

.flyout-form-doc .ff-info-table .k-picker,
.flyout-form-doc .ff-info-table .k-picker-md .k-input-inner,
.flyout-form-doc .ff-info-table .k-input-md .k-input-inner {
    min-height: 24px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.flyout-form-doc .ff-info-table .k-picker.me-5 {
    margin-right: 0 !important;
}

/* Description + Attachment rows keep full-width value column */
.flyout-form-doc .ff-info-table .k-textarea {
    max-width: none;
}

.flyout-form-doc .ff-info-table .k-textarea .k-input-inner {
    padding: 4px 6.4px;
    line-height: 1.35;
}

.flyout-form-doc .ff-info-actions {
    margin-top: 8px;
}

/* ---- Contract Terms card: label + full-width control grid (React parity) --
   React's Contract Terms uses a `140px 1fr` grid — labels in a fixed column,
   every control fills the value column (1fr). So (unlike the info card's
   half-width pickers) the terms controls all start at the same x and reach the
   same right edge. Source order beats the base `.k-picker { width: --ff-half }`. */
.flyout-form-doc .ff-terms-table .k-picker,
.flyout-form-doc .ff-terms-table .k-numerictextbox,
.flyout-form-doc .ff-terms-table .k-textarea {
    width: 100%;
}

/* Scope of Work box: React `.crf-textarea` — fixed 48px, no resize handle. */
.flyout-form-doc .ff-terms-table .ff-scope,
.flyout-form-doc .ff-terms-table .ff-scope .k-input-inner {
    height: 48px;
    box-sizing: border-box;
    resize: none;
}

/* Period From / to: the two dates share the value column and reach its right
   edge, with the "to" label between (React `140px 1fr 58px 1fr`). */
.flyout-form-doc .ff-terms-table .ff-term-dates {
    display: flex;
    align-items: center;
    gap: 6.4px;
}

.flyout-form-doc .ff-terms-table .ff-term-dates > .k-datepicker,
.flyout-form-doc .ff-terms-table .ff-term-dates > .k-input,
.flyout-form-doc .ff-terms-table .ff-term-dates > .gate-awaiting {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

.flyout-form-doc .ff-terms-table .ff-term-dates > .ff-term-to {
    flex: 0 0 auto;
    font-size: 10.5px;
    color: var(--ff-ink);
}

/* CRF Contract Request Information: stretch every value control to fill the
   column, matching the full-width Description textarea. React's CRF info uses a
   `140px 1fr` grid (full-width controls); the shared `.ff-info-table` rules
   otherwise size pickers / read-only boxes to `--ff-half` for the PCF/BTF
   `96px 1fr 1fr` layout. Scoped to `.ff-crf .ff-info` so those forms are
   untouched; extra classes win over the base half-width rules by specificity. */
.flyout-form-doc.ff-crf .ff-info .ff-info-table .k-picker,
.flyout-form-doc.ff-crf .ff-info .ff-info-table td.ff-half-field .k-picker,
.flyout-form-doc.ff-crf .ff-info .ff-info-table .k-multicolumncombobox,
.flyout-form-doc.ff-crf .ff-info .ff-info-table .ff-readonly,
.flyout-form-doc.ff-crf .ff-info .ff-info-table .ff-half-field .gate-awaiting {
    width: 100%;
}

/* "Search Directory" link INSIDE the Company control (React `.crf-company-dirlink`:
   absolute, right edge, vertically centered on the input, brand-accent). The
   field wrapper is position:relative; the link clears the HierarchicalSelect
   chevron (input reserves 17.6px on the right). */
.flyout-form-doc .crf-company-field {
    position: relative;
}

.flyout-form-doc .crf-company-field .crf-dirlink.k-button {
    position: absolute;
    right: 22px;
    top: 12px;
    transform: translateY(-50%);
    height: auto;
    min-height: 0;
    padding: 0;
    background: none;
    border: none;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    color: var(--projectrac-primary-color, #2b6cb0);
    z-index: 3;
}

.flyout-form-doc .crf-company-field .crf-dirlink.k-button:hover {
    text-decoration: underline;
}

/* Company Directory picker dialog — opened from the "Search Directory" link.
   Rendered at BODY level by TelerikDialog, so these are NOT scoped to
   `.flyout-form-doc`. React CompanyCombo modal parity, minus the contact counts. */
.crf-company-dir .crf-dir-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
}

.crf-company-dir .crf-dir-search:focus {
    border-color: var(--projectrac-secondary-color, #5b9bd5);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--projectrac-secondary-color, #5b9bd5) 18%, transparent);
}

.crf-company-dir .crf-dir-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.crf-company-dir .crf-dir-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.crf-company-dir .crf-dir-row:last-child {
    border-bottom: none;
}

.crf-company-dir .crf-dir-row:hover {
    background: #f7f7f7;
}

.crf-company-dir .crf-dir-row.is-selected {
    background: color-mix(in srgb, var(--projectrac-secondary-color, #5b9bd5) 16%, transparent);
}

.crf-company-dir .crf-dir-name {
    font-size: 13px;
    color: #222;
}

.crf-company-dir .crf-dir-empty {
    padding: 16px;
    text-align: center;
    color: #888;
}

.crf-company-dir .crf-dir-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

/* Footer buttons — React `.npw-btn` (size/padding/radius) with the secondary
   (`.npw-btn-secondary`, Cancel) and primary (`.npw-btn-primary`, Select
   Company = project SECONDARY brand) variants. */
.crf-company-dir .crf-dir-btn {
    font-family: inherit;
    font-size: 10.4px;
    font-weight: 600;
    padding: 6.4px 14.4px;
    border-radius: 3.2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.crf-company-dir .crf-dir-btn:disabled {
    cursor: not-allowed;
}

.crf-company-dir .crf-dir-btn-cancel {
    background: rgba(0, 0, 0, 0.08);
    color: #555;
}

.crf-company-dir .crf-dir-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.14);
    color: #333;
}

.crf-company-dir .crf-dir-btn-select {
    background: var(--projectrac-secondary-color, #5b9bd5);
    border-color: var(--projectrac-secondary-color, #5b9bd5);
    color: #fff;
}

.crf-company-dir .crf-dir-btn-select:not(:disabled):hover {
    filter: brightness(0.92);
}

.crf-company-dir .crf-dir-btn-select:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #999;
}

/* Hide the app's required-field asterisks — React shows none (a cleaner look;
   the cascade + validation still enforce required fields). */
.flyout-form-doc .required-label::after,
.flyout-form-doc .required-column::after {
    content: none;
}

/* ---- Cascade gating: "fill me next" + awaiting states ------------------ */
/* Transfer Type is highlighted while empty — the next field to fill. Tinted in
   the project's primary color (set at runtime via --projectrac-primary-color). */
.flyout-form-doc .ff-fill-next.k-picker {
    border-color: var(--projectrac-primary-color, #4a90d9);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--projectrac-primary-color, #4a90d9) 22%, transparent);
}

/* Awaiting a prerequisite (locked until Transfer Type is chosen): dashed
   border + faint italic — ONLY in edit mode (view mode keeps the solid
   'locked' look). Covers the tagged info fields and any disabled SOV editor. */
.flyout-form-doc.ff-editing .ff-awaiting.k-picker,
.flyout-form-doc.ff-editing .ff-awaiting.k-textarea,
.flyout-form-doc.ff-editing .ff-info-table .k-disabled,
.flyout-form-doc.ff-editing .k-grid .k-disabled {
    border: 1px dashed #bcbcbc !important;
    background: #fafafa !important;
    color: #999 !important;
    font-style: italic;
    opacity: 1 !important;
}

.flyout-form-doc .ff-info-actions .k-button {
    font-size: 10.5px;
}

/* ---- Estimated Contingency Impact — statement style -------------------- */
.flyout-form-doc .ff-statement {
    width: 100%;
    border-collapse: collapse;
}

.flyout-form-doc .ff-statement td {
    font-size: 10.5px;
    /* React impact rows are 24px tall with a 6px gap → 30px pitch. Match that
       pitch with padding (the table is border-collapsed, so no row gap). */
    padding: 8px 0;
    border-bottom: 1px solid var(--ff-hairline);
}

/* Impact card gets React's slightly deeper bottom padding. */
.flyout-form-doc .ff-impact > .card-body {
    padding-bottom: 12.6px;
}

.flyout-form-doc .ff-statement td:first-child {
    color: var(--ff-lock-text);
    font-weight: 500;
    white-space: nowrap;
}

.flyout-form-doc .ff-statement td:nth-child(2) {
    color: var(--ff-lock-text);
    font-weight: 500;
    text-align: left;
    padding-left: 6.4px;
}

.flyout-form-doc .ff-statement td.text-end {
    color: var(--ff-lock-text);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    padding-right: 2px;
}

/* The <hr> row → dark group rule above the total */
.flyout-form-doc .ff-statement td[colspan="3"] {
    padding: 0;
    border-bottom: none;
}

.flyout-form-doc .ff-statement td[colspan="3"] hr {
    border: none;
    border-top: 1px solid var(--ff-ink);
    margin: 3.2px 0 1.6px;
    opacity: 1;
}

/* Total row (Est. … Remaining) — bold ink, no hairline. Uses the same top
   padding as the other rows (base 8px) so it sits the same distance below the
   dark divider as React (it was hugging the line at 2px). */
.flyout-form-doc .ff-statement tr:last-child td {
    border-bottom: none;
}

.flyout-form-doc .ff-statement tr:last-child td:first-child {
    color: var(--ff-ink);
    font-weight: 700;
    letter-spacing: 0.16px;
}

/* Bold subtotal row (e.g. "…Contingency Remaining") — React's strong rows. */
.flyout-form-doc .ff-statement tr.ff-strong td {
    color: var(--ff-ink);
    font-weight: 700;
}

/* React `remainingError` (BudgetTransferForm.css .btf-impact-amount.is-error):
   the Est. … Remaining AMOUNT ($ + digits) goes red; the label stays ink. */
.flyout-form-doc .ff-statement tr.ff-error td:nth-child(2),
.flyout-form-doc .ff-statement tr.ff-error td.text-end {
    color: #c0392b;
}

/* React .btf-impact-error-msg, as placed in .btf-impact-statement (right-aligned). */
.flyout-form-doc .ff-impact-error-msg {
    margin-top: 3.2px;
    font-size: 8.8px;
    font-weight: 600;
    font-style: italic;
    color: #c0392b;
    text-align: right;
}

/* Read-only numeric box in the total row → plain bold text with $ prefix */
.flyout-form-doc .ff-statement .k-numerictextbox {
    border: none;
    background: transparent;
    box-shadow: none;
    width: 100%;
}

.flyout-form-doc .ff-statement .k-numerictextbox .k-input-inner {
    text-align: right;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ff-ink);
    padding: 0 2px 0 0;
    background: transparent;
}

.flyout-form-doc .ff-statement .k-numerictextbox .k-input-prefix span {
    font-weight: 700 !important;
    color: var(--ff-ink);
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- Section title (e.g. "Schedule of Values:") ------------------------ */
.flyout-form-doc .ff-sov-title {
    margin: 12.8px 0 6.4px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ff-ink);
    letter-spacing: 0.32px;
    text-transform: uppercase;
}

/* ---- Detail grid (Telerik) — generic chrome for any form's SOV --------- */
.flyout-form-doc .k-grid {
    border: 1px solid var(--ff-border);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    font-size: 10px;
    color: var(--ff-ink);
}

/* Header — grey bar, dark bold. Beat the app's dark grid theme. */
.flyout-form-doc .k-grid .k-grid-header,
.flyout-form-doc .k-grid .k-grid-header-wrap,
.flyout-form-doc .k-grid .k-header {
    background: var(--ff-header) !important;
    border-color: var(--ff-col-div);
}

.flyout-form-doc .k-grid .k-grid-header .k-table-th {
    background: var(--ff-header) !important;
    color: var(--ff-ink) !important;
    font-weight: 600;
    font-size: 10px;
    height: 24px;
    border-right: 1px solid #c8c8c8;
    border-bottom: 1.6px solid var(--ff-col-div);
    vertical-align: middle;
    padding: 4.8px 8px;
}

.flyout-form-doc .k-grid .k-grid-header .k-table-th .k-column-title {
    white-space: normal;
    line-height: 1.2;
}

.flyout-form-doc .k-grid .k-grid-header .k-table-th:last-child {
    border-right: none;
}

/* Body cells — white rows, thin vertical dividers */
.flyout-form-doc .k-grid .k-table-td {
    border-right: 1px solid var(--ff-col-div);
    border-bottom: 1px solid #ededed;
    padding: 4.8px 8px;
    font-size: 10px;
    color: var(--ff-ink);
    background: #fff;
}

.flyout-form-doc .k-grid .k-table-td:last-child {
    border-right: none;
}

.flyout-form-doc .k-grid .k-table-row:hover .k-table-td,
.flyout-form-doc .k-grid .k-table-row.k-selected .k-table-td {
    background: #f7f6f3;
}

/* Footer (aggregate) row — grey, bold total (React #eae9e7) */
.flyout-form-doc .k-grid .k-grid-footer,
.flyout-form-doc .k-grid .k-grid-footer-wrap {
    background: var(--ff-footer);
    border-color: var(--ff-col-div);
}

.flyout-form-doc .k-grid .k-grid-footer .k-table-td {
    border-right: 1px solid var(--ff-col-div);
    border-top: 1.6px solid var(--ff-col-div);
    font-weight: 700;
    font-size: 10px;
    background: var(--ff-footer);
    padding: 4.8px 8px;
}

.flyout-form-doc .k-grid .k-grid-footer .k-table-td:last-child {
    border-right: none;
}

.flyout-form-doc .ff-addline .k-button {
    font-weight: 600;
    font-size: 10.5px;
}

/* Delete (actions) column — compact, centered, red trash icon like React
   (#c0392b rest, #e74c3c hover). */
.flyout-form-doc .k-grid .k-command-cell {
    padding: 0 !important;
    text-align: center;
}

.flyout-form-doc .k-grid .k-command-cell .k-button {
    background: none;
    border: none;
    box-shadow: none;
    color: #c0392b;
    padding: 2px 4px;
    min-width: 0;
}

.flyout-form-doc .k-grid .k-command-cell .k-button:hover:not(:disabled) {
    background: none;
    color: #e74c3c;
}

.flyout-form-doc .k-grid .k-command-cell .k-button:disabled {
    opacity: 0.3;
}

.flyout-form-doc .k-grid .k-command-cell .k-button .k-svg-icon,
.flyout-form-doc .k-grid .k-command-cell .k-button .k-icon {
    color: inherit;
    width: 14px;
    height: 14px;
}

.flyout-form-doc .k-grid .k-command-cell .k-button .k-svg-icon svg {
    fill: currentColor;
}

/* ------------------------------------------------------------------------ */
/* BTF Schedule of Values — now a home-grown <FormTable> (see
   css/form-table.css); the money-column alignment and the CONTINGENCY IMPACT
   footer are declared per column in Pages/Budget/TransferForm.razor, so the
   `.ff-btf .k-grid .k-table-th:nth-child(n)` rules that used to live here are
   gone. The generic `.flyout-form-doc .k-grid` chrome above STAYS until the
   other four flyout forms are converted too.

   The table needs no overrides here: React's BTF SOV uses the shared
   `.crf-sub-table-wrap` / `.crf-sub-table` chrome unchanged (including the
   bottom-only corner radius), which css/form-table.css reproduces as
   `.ft-wrap` / `.ft-table`. `ff-sov` is left on the wrapper purely as a hook
   for anything BTF-specific that turns up later. */

/* ------------------------------------------------------------------------ */
/* PCF (Pending Change Form) — the cascade uses the shared <GatedField>
   padlock (React's AwaitingField) rather than the BTF's dashed .ff-awaiting.
   Size the padlock to the info fields so it lines up with the Telerik picker
   it stands in for, and give the short fields (Date of Change / Contract
   Assignment) the same half width as the Date / Project read-only boxes. */
.flyout-form-doc .ff-info-table .gate-awaiting {
    height: 24px;
    min-height: 24px;
    padding: 0 6.4px;
    border-radius: 2.4px;
    border-color: var(--ff-border);
    font-size: 10.5px;
}

.flyout-form-doc .ff-info-table .ff-half-field .gate-awaiting,
.flyout-form-doc .ff-info-table td.ff-half-field .k-picker {
    width: var(--ff-half);
}


/* ══ Consultant AFP — Schedule of Values grid ════════════════════════════════
   Pixel port of the React AFP SOV table (ConsultantAFPForm.css +
   ContractRequestForm.css .crf-sub-*), measured live in the React app:
     header  #d9d9d9, 10px/600, padding 4.8px 8px, border-bottom 1.6px #c5c5c5
     body    10px, padding 4px 6.4px, 1px #ececec dividers
     TOTAL   rgb(234,233,231), 10px, 700 label + 600 values,
             padding 4px 6.4px, border-top 1px #c5c5c5, row height 33px
             (1px border + 4px padding + 24px content + 4px padding)
   Column dividers: 1px #ececec inside a group, 1px #c5c5c5 at the
   CONTRACT | WORK COMPLETED boundaries (React cols 3/4/6 = ours 1/2/4), none on
   the last column. Amount + % columns are right-aligned (React .crf-th-right).

   Two specificity traps, hence the .flyout-form-doc prefix and the !importants:
     • app.css forces 11px/500 on every td and 11px/bold on every th;
     • the generic `.flyout-form-doc .k-grid .k-grid-footer .k-table-td` rule
       above is 4 classes and outranks a bare `.afp-sov-grid …` selector, so its
       1.6px / var(--ff-col-div) borders would win. */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th {
    background: #d9d9d9;
    color: #222;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 4.8px 8px !important;
    height: 24px;
    border-bottom: 1.6px solid #c5c5c5 !important;
    border-right: 1px solid #ececec !important;
}

.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td {
    font-size: 10px !important;
    padding: 4px 6.4px !important;
    border-bottom: 1px solid #ececec !important;
    border-right: 1px solid #ececec !important;
    vertical-align: middle;
}

/* ---- TOTAL row ---------------------------------------------------------- */
.flyout-form-doc .afp-sov-grid .k-grid-footer,
.flyout-form-doc .afp-sov-grid .k-grid-footer-wrap {
    background: rgb(234, 233, 231);
    border-color: #c5c5c5;
}

.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td {
    background: rgb(234, 233, 231);
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 4px 6.4px !important;
    /* content-box: 24px content + 4px+4px padding + 1px border-top = React 33px */
    line-height: 24px !important;
    height: 24px !important;
    border-top: 1px solid #c5c5c5 !important;
    border-right: 1px solid #ececec !important;
    /* React total row has NO bottom border - the table edge is the boundary.
       Leaving Telerik's in place makes the row 1px taller than React's 33px. */
    border-bottom: none !important;
}

/* The $ / % values sit in the readonly acct chrome (React
   .crf-cell-acct.crf-cell-acct-editable.crf-cell-acct-readonly = our ported
   .ft-cell-acct*): #f5f5f5 box, 1px #d9d9d9 border, 2.4px radius, 24px tall,
   0 4.8px padding, 10px/600 - measured in the React total row. The TOTAL
   label itself has no box and stays at 700. */
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .ft-cell-acct {
    height: 24px;
    padding: 0 4.8px;
    font-size: 10px !important;
    font-weight: 600 !important;
}

.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .ft-acct,
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .ft-acct-sym,
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .ft-acct-num {
    font-size: 10px !important;
    font-weight: 600 !important;
}

/* % total: no $ sign, pushed right inside the same box (React .afp-pct +
   .afp-pct-total = 9.6px at 600). */
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .afp-pct-total {
    margin-left: auto;
    color: inherit;
    font-size: 9.6px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
}

/* ---- Body cells: same flex wrapper, no chrome ---------------------------
   React puts every body money cell in a bare .crf-cell-acct (24px tall,
   0 4.8px padding, flex space-between) - no border or background, which is
   what separates a data row from the TOTAL. That shared inner padding is
   exactly what keeps the body and total digits column-aligned, so the
   wrapper is not decoration: drop it and the columns stop lining up.
   Current Amount Due keeps .ft-cell-acct-editable (white box + border)
   because React renders it as a clickable input cell. */
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .ft-cell-acct {
    height: 24px;
    padding: 0 4.8px;
}

/* React: .btf-acct is 10.5px, but `.crf-form .btf-acct` pins the SOV to 10px. */
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .ft-acct,
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .ft-acct-sym,
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .ft-acct-num {
    font-size: 10px !important;
    font-weight: 500 !important;
}

/* Body % text (React .afp-pct + .afp-pct-body): 9.6px/500, pushed right so its
   right edge lands on the total row's. */
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .afp-pct {
    font-size: 9.6px !important;
    font-weight: 500 !important;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .afp-pct-body {
    margin-left: auto;
}

.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td .afp-pct.is-empty {
    color: #b0b0b0;
}

/* React runs the TOTAL label at 700 and the $ / % values at 600
   (.afp-line-table tfoot readonly cell + .afp-pct-total). */
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td .fw-bold {
    font-weight: 600 !important;
}

.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:first-child .fw-bold {
    font-weight: 700 !important;
}

/* ---- Group-boundary dividers -------------------------------------------- */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(2),
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(3),
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(5),
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td:nth-child(3),
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td:nth-child(3),
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td:nth-child(5),
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:nth-child(3),
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:nth-child(3),
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:nth-child(5) {
    border-right: 1px solid #c5c5c5 !important;
}

.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:last-child,
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td:last-child,
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:last-child {
    border-right: none !important;
}

/* ---- Amount + % columns right-aligned ----------------------------------- */
.flyout-form-doc .afp-sov-grid .k-grid-container .k-table-td:nth-child(n+3),
.flyout-form-doc .afp-sov-grid .k-grid-footer .k-table-td:nth-child(n+3) {
    text-align: right;
}

/* text-align on the th moves data cells but NOT the header title — that lives in
   .k-cell-inner > .k-link and needs justify-content. */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(n+3) .k-cell-inner,
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(n+3) .k-cell-inner .k-link {
    justify-content: flex-end;
}

/* ---- Super-header (group) row -------------------------------------------
   React's .crf-sub-grouprow .crf-sub-group, measured live: #d9d9d9, 10px/700,
   uppercase, 0.32px letter-spacing, centred, 0 11.2px padding, 25.6px tall,
   1px #c5c5c5 right divider (none on the last band) over a 1.6px #c5c5c5
   bottom rule. Every leaf column sits inside a group here, so the header has
   exactly two rows: tr:first-child is the bands, tr:last-child the titles —
   which is what all the leaf rules above are scoped to. */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:first-child .k-table-th {
    background: #d9d9d9;
    color: #222;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.32px;
    padding: 0 11.2px !important;
    /* border-box like React's th, else the 1.6px bottom rule adds a 27th pixel */
    box-sizing: border-box;
    height: 25.6px;
    border-right: 1px solid #c5c5c5 !important;
    border-bottom: 1.6px solid #c5c5c5 !important;
}

.flyout-form-doc .afp-sov-grid .k-grid-header tr:first-child .k-table-th:last-child {
    border-right: none !important;
}

/* text-align on the th does not move a Telerik header title — it lives in
   .k-cell-inner > .k-link and needs justify-content. */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:first-child .k-cell-inner,
.flyout-form-doc .afp-sov-grid .k-grid-header tr:first-child .k-cell-inner .k-link {
    justify-content: center;
}

/* ---- Two-line leaf header titles ----------------------------------------
   React writes these headers with an explicit <br/> ("Current / Contract
   Amount", "Work Completed / (Previous Application)", …) and right-aligns the
   money + % ones. Telerik clips a column title to a single ellipsised line, so
   wrapping has to be turned back on; the flex parent already pushes the title
   right, but the two lines need text-align to right-align against each other. */
.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-column-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.flyout-form-doc .afp-sov-grid .k-grid-header tr:last-child .k-table-th:nth-child(n+3) .k-column-title {
    text-align: right;
}

/* ══ Consultant AFP — header area ═══════════════════════════════════════════
   Ported from React (ConsultantAFPForm.css .afp-statement-* / .afp-info-body,
   ContractRequestForm.css .crf-panel-body). React's info rows are a 4-column
   grid, 80px label | value | 88px label | value, so the right-hand pair starts
   at the same x on every row. The Blazor panel is a <table>, so the same
   geometry comes from fixed column widths. */
/* ⚠ SCOPED TO `.ff-afp`. This block is the Consultant/Contractor AFP's FOUR-column
   info table (label | value | label | value — its first row carries two empty
   spacer <td>s to establish the column model). It was originally written
   unscoped, as `.flyout-form-doc .ff-info-table`, which applied it to the CRF,
   BTF and PCF as well — and those are TWO-column tables, so
   `td:nth-child(2) { width: calc((100% - 168px) / 2) }` reserved room for a
   second label column that does not exist and halved their value column, while
   `table-layout: fixed` then locked long labels ("Contract Assignment:") into an
   80px cell they overflow. Keep any new rule here scoped the same way. */
.flyout-form-doc.ff-afp .ff-info-table {
    table-layout: fixed;
    width: 100%;
}

/* React's info grid is `80px minmax(0,1fr) 88px minmax(0,1fr)`. Reproducing that
   in a table means putting the widths on the FIRST ROW'S CELLS, which is what
   table-layout:fixed reads. A <colgroup> looks like the natural home but does not
   work here: Chrome gave the whole remainder to the first auto <col> and 0 to the
   second (collapsing Application # / Invoice #), and calc() on a <col> does not
   resolve at all. On cells it does. */
.flyout-form-doc.ff-afp .ff-info-table > tr:first-child > td:nth-child(1) {
    width: 80px;
}

.flyout-form-doc.ff-afp .ff-info-table > tr:first-child > td:nth-child(3) {
    width: 88px;
}

.flyout-form-doc.ff-afp .ff-info-table > tr:first-child > td:nth-child(2),
.flyout-form-doc.ff-afp .ff-info-table > tr:first-child > td:nth-child(4) {
    width: calc((100% - 168px) / 2);
}

/* Billing period: both dates on one row with a "to" between them. */
.flyout-form-doc .afp-period-fields {
    display: flex;
    align-items: center;
    gap: 6.4px;
}

.flyout-form-doc .afp-date-sep {
    color: #555;
    font-size: 10.5px;
}

/* ---- Statement of Contract (right panel) -------------------------------- */
.flyout-form-doc .afp-statement-body {
    display: flex;
    flex-direction: column;
    /* 24px rows + 6px gap so each row sits at the same vertical position as the
       info-panel row beside it; the 12.6px bottom keeps the space under the last
       divider equal to the header-to-first-row space. */
    gap: 6px;
    padding-bottom: 12.6px;
}

.flyout-form-doc .afp-statement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9.6px;
    min-height: 24px;
    font-size: 10.5px;
    position: relative;
}

/* Hairline centred in the 6px gap below the row, not a border hugging the text. */
.flyout-form-doc .afp-statement-row::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    border-top: 1px solid #ececec;
}

.flyout-form-doc .afp-statement-row:last-child::after {
    display: none;
}

/* A marked group break is darker and shows even on the last row. */
.flyout-form-doc .afp-statement-row.afp-statement-row-divider::after {
    display: block;
    border-top: 1px solid #222;
}

.flyout-form-doc .afp-statement-label {
    flex: 1 1 auto;
    color: #555;
    font-weight: 500;
}

/* Fixed width so AcctSlots (width:100%) pins the `$` left and right-aligns the
   digits, matching the SOV money cells rather than a compact "$1,234.00". */
.flyout-form-doc .afp-statement-amount {
    flex: 0 0 160px;
    font-variant-numeric: tabular-nums;
}

/* Total rows: the dark divider sits ABOVE each (from the preceding row). */
.flyout-form-doc .afp-statement-row-strong .afp-statement-label {
    font-weight: 600;
    color: #222;
}

.flyout-form-doc .afp-statement-row-strong .afp-statement-amount .ft-acct,
.flyout-form-doc .afp-statement-row-strong .afp-statement-amount .ft-acct-sym,
.flyout-form-doc .afp-statement-row-strong .afp-statement-amount .ft-acct-num {
    font-weight: 600;
    color: #222;
}

.flyout-form-doc .afp-statement-row-strong::after {
    display: none;
}

.flyout-form-doc .afp-statement-spacer {
    height: 9.6px;
}

/* Right-hand labels of the paired rows (Application #, Invoice #) are
   right-aligned in React so the colon sits flush against the col-4 input. */
.flyout-form-doc .ff-info-table tr > td:nth-child(3) {
    text-align: right;
    padding-left: 0;
}

/* "Add" (subcontract) — React .afp-add-subcontract-btn: grey and not-allowed
   while disabled, accent-filled when live. The accent is the project's
   SECONDARY color (React's --brand-hover). */
.flyout-form-doc .afp-add-subcontract-btn.k-button {
    height: 24px;
    padding: 0 9.6px;
    border: 1px solid #ccc;
    border-radius: 2.4px;
    background: #ccc;
    background-image: none;
    color: #999;
    font-size: 9.6px;
    font-weight: 500;
    white-space: nowrap;
    cursor: not-allowed;
    box-shadow: none;
}

/* Telerik owns .k-disabled / .k-button-solid-base painting, so the grey and the
   accent fill both have to be forced. */
.flyout-form-doc .afp-add-subcontract-btn.k-button.k-disabled,
.flyout-form-doc .afp-add-subcontract-btn.k-button:disabled {
    background: #ccc !important;
    background-image: none !important;
    border-color: #ccc !important;
    color: #999 !important;
    opacity: 1;
}

.flyout-form-doc .afp-add-subcontract-btn.k-button:not(:disabled):not(.k-disabled) {
    background: var(--projectrac-secondary-color, #5b9bd5) !important;
    background-image: none !important;
    border-color: var(--projectrac-secondary-color, #5b9bd5) !important;
    color: #ffffff !important;
    cursor: pointer;
}

.flyout-form-doc .afp-add-subcontract-btn.k-button:not(:disabled):not(.k-disabled):hover {
    filter: brightness(0.92);
}

/* ---- AFP info panel: one right edge ------------------------------------
   In React every control in this panel fills its grid column, so they all end
   at the same x; Contract # is the one that stretches, sharing its column with
   the Add button. The Blazor controls carried fixed pixel widths, which left a
   ragged right edge. */
.flyout-form-doc .ff-info-table .ff-readonly,
.flyout-form-doc .ff-info-table .k-textbox,
.flyout-form-doc .ff-info-table .k-input,
.flyout-form-doc .ff-info-table .k-picker,
.flyout-form-doc .ff-info-table .k-textarea,
.flyout-form-doc .ff-info-table .gate-awaiting {
    width: 100%;
    box-sizing: border-box;
}

/* Contract # shares its cell with Add: the select takes the slack. */
.flyout-form-doc .ff-info-table .afp-contract-row {
    display: flex;
    gap: 6.4px;
    align-items: center;
}

.flyout-form-doc .ff-info-table .afp-contract-row .k-picker,
.flyout-form-doc .ff-info-table .afp-contract-row .k-combobox {
    flex: 1 1 auto;
    min-width: 0;
}

.flyout-form-doc .ff-info-table .afp-contract-row .afp-add-subcontract-btn.k-button {
    flex: 0 0 auto;
    width: auto;
}

/* The two dates split the value column around a centred "to", as React does. */
.flyout-form-doc .afp-period-fields > .k-datepicker {
    flex: 1 1 0;
    min-width: 0;
}

/* Description is the one full-height control. */
.flyout-form-doc .ff-info-table .k-textarea {
    height: auto;
}
