/* AVstackr author-facing modal shell — shared by the executive summary, estimate, proposal, invoice and certified system
   windows on Project Details, the project configuration window there, and the labor types, summary lines, cable types,
   line item attribute keys, external records console and namespace windows on Global Settings.
   ========================================================================
   The frame, header, body, notices, panel, field register, saved view, footer, buttons, links, badges,
   chips, numbers and table register that every author-facing window wears. Each window that needs more adds
   its own stylesheet after this one under its own prefix: executive-summary-modal.css (esm-),
   estimate-modal.css (est-), proposal-modal.css (prop-), invoice-modal.css (inv-),
   certified-system-modal.css (csw-), project-config-modal.css (pcm-), labor-type-modal.css (ltm-),
   cable-type-modal.css (ctm-), line-item-key-modal.css (lik-), external-records-modal.css (erc-) and
   summary-line-modal.css (slm-),
   and its modal element wears both classes (`am-modal esm-modal`). A plain stylesheet rather than a scoped .razor.css,
   because the windows are drawn by the page and several components together. Every class is `am-`
   prefixed so it cannot collide with Bootstrap, the Blueprint shell or a component's scoped rules. The
   windows keep the shared `bp-backdrop` (z-index 1050, in blueprint-modal.css) and no other `bp-` class.

   The field register (sections, labels, inputs, selects, the textarea, field notes, the readout and
   the signature rows) came here from estimate-modal.css when the proposal window became the third
   author-facing window to need it (docs/superpowers/specs/2026-11-07-proposal-modal-visual-refresh-design.md, D4).
   The saved view (the saved-document row, the saved panel, its number head, the facts list and the
   action row) came here from estimate-modal.css when the invoice window became the second window to
   show a saved document (docs/superpowers/specs/2026-11-07-invoice-modal-visual-refresh-design.md, D4).
   The disabled field (muted text, the not-allowed cursor, no hover border) came here from
   proposal-modal.css when the certified system window became the second window with a field that
   can be disabled (docs/superpowers/specs/2026-11-11-certified-wizard-visual-refresh-design.md).
   The segments (am-segments, am-segment) came here from estimate-modal.css as est-segments and
   est-segment when the project configuration window became the second window with a segmented choice
   (docs/superpowers/plans/2026-11-13-design-fee-labor-base.md, Task 5).
   The table register (the table windows section at the end of this file) came here from
   labor-type-modal.css as ltm- classes when the cable types and line item attribute keys windows became
   its second and third users (docs/superpowers/plans/2026-11-14-global-config-friendly-style.md, Task 4).
   The Register and Delete namespace windows in GlobalProjectConfig.razor wear only am- classes and have
   no stylesheet of their own.
   The summary lines window wears that table register too. Its toolbar (am-toolbar), and the grid and affix fields
   (am-grid, am-affix, am-affix-unit) from project-config-modal.css (pcm-), came here when the summary lines window
   became their second user (docs/superpowers/plans/2026-11-14-custom-summary-lines-phase1.md, Task 10, fix round 1).
   The summary line form, drawn in both the summary lines window and the project configuration window, wears only
   am- classes for the same reason (am-stack, am-options, am-option, am-select.is-sm).

   Promotion rule: a class used by a second author-facing window moves to this file as `am-`; a class
   only one window uses stays in that window's stylesheet under its prefix.

   The register comes from the owner's design spec of 2026-11-06 (spec D2): sentence case, rounded
   panels, 32px horizontal padding, 44px header and footer buttons, numbers in the monospace stack.
   Fonts inherit the app's stacks; the design's Inter / JetBrains Mono are not loaded for these windows.
   Type: title 22px/600 at -0.01em; body 14px/400; meta, links and secondary buttons 13px/500;
   primary button 14px/600; text button 14px/500; small buttons 13px/500; badge and chip 12px/500;
   section headings 14px/600; labels 13px/500; fields 14px/400, small fields 13px; field notes,
   hints, the readout and the signature rows 13px/400; a saved document's number 16px/600, its facts
   13px/500 terms beside 14px values, the total 14px/600.

   Colours. Every colour is an --app-* token from themes/theme-base.css, so the modal follows every
   preset and both modes with no [data-theme] rules of its own. No literal colours and no important flags.
   The design spec's names map to tokens (spec D3):

     design name               token
     ------------------------  ------------------------------------------------------------
     bg/backdrop               the shared bp-backdrop
     bg/modal                  --app-surface-panel
     bg/inset                  --app-surface-sunken
     bg/bar                    --app-surface-canvas
     bg/selected               --app-surface-raised
     bg/hover-row              --app-surface-hover
     border/default, row       --app-border-hairline
     border/strong             --app-border-strong
     text/primary              --app-text-data
     text/strong               --app-text-strong
     text/secondary            --app-text-label
     text/muted, disabled      --app-text-disabled
     accent                    --app-accent-fill, with --app-accent-border
     text on accent            --app-on-accent
     link                      --app-accent-fill
     warn                      --app-status-warn over color-mix(in srgb, warn 12%, transparent)
     success                   --app-status-ok
     danger                    --app-danger for the rail and icon, text on --app-text-strong
     warn action text          --app-warn-text
     danger action text        --app-danger-text

   Radii come only from the four --am-radius-* steps declared on .am-modal (16 modal, 12 panel,
   10 button, 8 toolbar button), a step less 1px where a child sits inside a 1px border, 0, or 999px
   for the fully round badges and chips. --am-radius-btn is also the field radius: a window's inputs
   and selects reuse the button step. One shadow, on the modal: var(--app-shadow-lg).
   ======================================================================== */

/* ── shell ──────────────────────────────────────────────────────────────── */

.am-modal {
    --am-radius-modal: 16px;
    --am-radius-panel: 12px;
    --am-radius-btn: 10px;
    --am-radius-tool: 8px;
    --am-pad: 32px;
    /* The monospace stack the register keeps for numbers and unit boxes; one declaration, read everywhere. */
    --am-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
    color: var(--app-text-data);
    background: var(--app-surface-panel);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-modal);
    box-shadow: var(--app-shadow-lg);
    z-index: 1051;
}

/* ── header ─────────────────────────────────────────────────────────────── */

.am-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px var(--am-pad) 20px;
    border-bottom: 1px solid var(--app-border-hairline);
}

.am-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--app-text-strong);
}

/* The draft state beside the title: a word, fully round. */
.am-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
}
.am-badge.is-neutral {
    color: var(--app-text-label);
    background: var(--app-surface-raised);
    border-color: var(--app-border-hairline);
}
.am-badge.is-busy {
    color: var(--app-accent-border);
    background: color-mix(in srgb, var(--app-accent-border) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-accent-border) 35%, transparent);
}
.am-badge.is-saved {
    color: var(--app-status-ok);
    background: color-mix(in srgb, var(--app-status-ok) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-status-ok) 35%, transparent);
}
.am-badge.is-draft {
    color: var(--app-status-warn);
    background: color-mix(in srgb, var(--app-status-warn) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-status-warn) 35%, transparent);
}
.am-badge.is-failed {
    color: var(--app-danger);
    background: color-mix(in srgb, var(--app-danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-danger) 35%, transparent);
}

/* A small fully round label: the version tag in the title, "Alt" on an add-alternate room. */
.am-chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--app-text-label);
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: 999px;
}
/* A chip's state colour: a 12% fill and a 35% border of one token, as the badges do. */
.am-chip.is-ok {
    color: var(--app-text-strong);
    background: color-mix(in srgb, var(--app-status-ok) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-status-ok) 35%, transparent);
}
.am-chip.is-warn {
    color: var(--app-text-strong);
    background: color-mix(in srgb, var(--app-status-warn) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-status-warn) 35%, transparent);
}
.am-chip.is-danger {
    color: var(--app-text-strong);
    background: color-mix(in srgb, var(--app-danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-danger) 35%, transparent);
}
/* The colour sits on the icon, the tint and the border; the label stays on the strong text token for contrast. */
.am-chip.is-ok > i { color: var(--app-status-ok); }
.am-chip.is-warn > i { color: var(--app-status-warn); }
.am-chip.is-danger > i { color: var(--app-danger); }
.am-chip.is-neutral {
    color: var(--app-text-label);
    background: color-mix(in srgb, var(--app-text-label) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-text-label) 35%, transparent);
}

.am-sub {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--app-text-label);
}

/* A 44x44 hit area, pulled into the header's padding so the glyph lines up with the title's cap. */
.am-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: -6px -10px 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    color: var(--app-text-label);
    background: transparent;
    border: 0;
    border-radius: var(--am-radius-btn);
    cursor: pointer;
}
.am-close:hover {
    color: var(--app-text-strong);
    background: var(--app-surface-hover);
}

/* ── body ───────────────────────────────────────────────────────────────── */

/* Header and footer never leave the screen; the body is what scrolls. */
.am-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px var(--am-pad);
}

/* A notice: a tinted panel with a coloured rail and a leading icon (Font Awesome 6 Free solid). */
.am-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: var(--am-radius-panel);
}
.am-notice::before {
    flex: 0 0 auto;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    line-height: 1.5;
}
.am-notice.is-warning {
    color: var(--app-status-warn);
    background: color-mix(in srgb, var(--app-status-warn) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-status-warn) 35%, transparent);
    border-left-color: var(--app-status-warn);
}
.am-notice.is-warning::before {
    content: "\f071";
    color: var(--app-status-warn);
}
.am-notice.is-danger {
    color: var(--app-text-strong);
    background: color-mix(in srgb, var(--app-danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--app-danger) 35%, transparent);
    border-left-color: var(--app-danger);
}
.am-notice.is-danger::before {
    content: "\f06a";
    color: var(--app-danger);
}
.am-notice.is-info {
    color: var(--app-text-data);
    background: color-mix(in srgb, var(--app-accent-fill) 10%, transparent);
    border-color: color-mix(in srgb, var(--app-accent-fill) 35%, transparent);
    border-left-color: var(--app-accent-fill);
}
.am-notice.is-info::before {
    content: "\f05a";
    color: var(--app-accent-fill);
}

/* ── panel ──────────────────────────────────────────────────────────────── */

/* A sunken, rounded box inside the body; the window's own class lays out what it holds. */
.am-panel {
    padding: 16px;
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-panel);
}

/* ── fields ─────────────────────────────────────────────────────────────── */

/* The field register: sections, labels, inputs, selects, the textarea, field notes, the readout and
   the signature rows, shared by every window that has a form. Fields reuse the button step:
   inputs, selects and the textarea take var(--am-radius-btn) (10px), the readout a panel step less 4px. */

.am-section {
    min-width: 0;
    margin: 0;
}

/* Title left, aside right. */
.am-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.am-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--app-text-strong);
}

/* Layout only: an aside — a link, a count — sits at the right. */
.am-section-aside { margin-left: auto; }

.am-section-note {
    font-size: 13px;
    font-weight: 400;
    color: var(--app-text-label);
}

.am-section-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--app-text-label);
}

/* A label above its control. */
.am-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--app-text-label);
}

/* A label or column header that explains itself on hover: its title carries the tip, the small (i) after
   the words says one is there. Used by the labor types and project configuration windows. */
.am-hint { cursor: help; }

.am-hint-icon {
    margin-left: 4px;
    font-size: 11px;
    color: var(--app-text-disabled);
}
.am-hint:hover .am-hint-icon { color: var(--app-text-label); }

.am-input,
.am-select,
.am-textarea {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--app-text-data);
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-btn);
}
.am-input:hover,
.am-select:hover,
.am-textarea:hover { border-color: var(--app-border-strong); }
.am-input:focus,
.am-select:focus,
.am-textarea:focus { border-color: var(--app-accent-border); }

/* The monospace stack the register keeps for numbers: ZIP, email and phone. */
.am-input.is-mono {
    font-family: var(--am-font-mono);
    font-variant-numeric: tabular-nums;
}

/* A small input: a signature form's name and title. */
.am-input.is-sm {
    height: 36px;
    font-size: 13px;
}

/* A required field left blank; after hover and focus so the danger border holds. */
.am-input.is-invalid { border-color: var(--app-danger); }

.am-textarea {
    height: auto;
    min-height: 96px;
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
}

/* The sentence under a field. */
.am-field-note {
    margin-top: 8px;
    font-size: 13px;
    color: var(--app-text-label);
}

/* A stored value shown read-only: an address, a link. */
.am-readout {
    padding: 12px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--app-text-data);
    overflow-wrap: anywhere;
    background: var(--app-surface-sunken);
    border-radius: calc(var(--am-radius-panel) - 4px);
}

/* Inside a panel the panel already sits on the sunken surface, so the controls in it take the
   panel surface instead and the readout gets its own hairline, or none of them reads as a box. */
.am-panel .am-input,
.am-panel .am-select,
.am-panel .am-readout { background: var(--app-surface-panel); }
.am-panel .am-readout { border: 1px solid var(--app-border-hairline); }

/* One signer slot: "Signer n", its state chip and, where the window has one, the slot's action. */
.am-sig-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--app-text-label);
}

/* The shared chip is a fixed 20px line; a long "Signed by …" label wraps inside it and the chip grows. */
.am-sig-row .am-chip {
    white-space: normal;
    text-align: left;
    height: auto;
    min-height: 20px;
    padding-block: 2px;
}

/* A declined slot's reason. */
.am-sig-note {
    font-size: 13px;
    color: var(--app-text-label);
}

/* Signer name, signer title, Request, Cancel: a wrapping row, so it never overflows at any width. */
.am-sig-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.am-sig-form .am-input {
    flex: 1 1 160px;
    max-width: 180px;
}

/* A segmented choice: From customer / Enter manually, Equipment / Labor. The segments take the
   toolbar step, var(--am-radius-tool) (8px), at 13px/500. */
.am-segments {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.am-segment {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: var(--app-text-label);
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-tool);
    cursor: pointer;
}
.am-segment.is-on {
    color: var(--app-text-strong);
    background: var(--app-surface-raised);
    border-color: var(--app-border-strong);
}

/* Inside a panel the segments not chosen take the panel surface, as the shared fields do. */
.am-panel .am-segment:not(.is-on) { background: var(--app-surface-panel); }

/* ── saved view ─────────────────────────────────────────────────────────── */

/* A window that shows a saved document: the saved-document row (a label and its select on one line),
   then the saved panel (am-panel am-saved-panel) with the document's number head, its facts list and
   the action row. */

/* The label and the select on one line. */
.am-saved-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.am-saved-row .am-label {
    flex: 0 0 auto;
    margin-bottom: 0;
    white-space: nowrap;
}

/* The saved panel takes am-panel's box; a long unbroken value (a link) wraps inside it rather than
   widening it. */
.am-saved-panel { min-width: 0; }

/* The document's number with the viewed pills beside it. */
.am-saved-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--app-text-strong);
}

.am-facts {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: baseline;
    column-gap: 16px;
    row-gap: 8px;
    margin: 0;
}
/* Bootstrap's reboot sets dt bold and gives dd a bottom margin. */
.am-facts dt {
    font-size: 13px;
    font-weight: 500;
    color: var(--app-text-label);
}
.am-facts dd {
    margin: 0;
    font-size: 14px;
    color: var(--app-text-data);
}
.am-facts dd.is-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--app-text-strong);
}

/* The action row under the facts: the window's buttons. */
.am-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.am-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px var(--am-pad);
    background: var(--app-surface-canvas);
    border-top: 1px solid var(--app-border-hairline);
    border-bottom-left-radius: calc(var(--am-radius-modal) - 1px);
    border-bottom-right-radius: calc(var(--am-radius-modal) - 1px);
}

.am-status {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--app-text-label);
}

/* The ready check; the spinner carries Bootstrap's spinner-border and takes the accent. */
.am-status-icon {
    flex: 0 0 auto;
    font-size: 14px;
    color: var(--app-status-ok);
}
.am-status-icon.spinner-border { color: var(--app-accent-border); }

.am-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--am-radius-btn);
    cursor: pointer;
}

.am-btn-primary {
    font-size: 14px;
    font-weight: 600;
    color: var(--app-on-accent);
    background: var(--app-accent-fill);
    border-color: var(--app-accent-fill);
}
.am-btn-primary:hover:not(:disabled) {
    background: var(--app-accent-border);
    border-color: var(--app-accent-border);
}

.am-btn-secondary {
    color: var(--app-text-strong);
    background: transparent;
    border-color: var(--app-border-strong);
}
.am-btn-secondary:hover:not(:disabled) { background: var(--app-surface-hover); }

/* A footer button with no border or fill: Cancel beside the others, at their box. */
.am-btn-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--app-text-label);
    background: transparent;
    border-color: transparent;
}
.am-btn-text:hover:not(:disabled) { color: var(--app-text-strong); }

/* An action that reverses an issued document (Void approval, Void invoice, Revoke) or destroys one
   (Delete): a secondary button whose text, border and wash carry the status colour, so it reads at
   a glance. The text tokens are AA on every author-window surface in both modes, washes included. */
.am-btn.is-warn {
    color: var(--app-warn-text);
    background: color-mix(in srgb, var(--app-warn-text) 8%, transparent);
    border-color: color-mix(in srgb, var(--app-warn-text) 45%, transparent);
}
.am-btn.is-warn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--app-warn-text) 12%, transparent);
    border-color: var(--app-warn-text);
}
.am-btn.is-danger {
    color: var(--app-danger-text);
    background: color-mix(in srgb, var(--app-danger-text) 8%, transparent);
    border-color: color-mix(in srgb, var(--app-danger-text) 45%, transparent);
}
.am-btn.is-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--app-danger-text) 12%, transparent);
    border-color: var(--app-danger-text);
}

/* A small button inside the body: 36px tall on the toolbar step. */
.am-btn.is-sm {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--am-radius-tool);
}

/* A button that reads as a link: Select all / Clear, Try again. */
.am-link {
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: inherit;
    color: var(--app-accent-fill);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.am-link:hover:not(:disabled) {
    text-decoration: underline;
    text-decoration-color: currentColor;
}

/* Every number in the modal: the monospace stack with even figures. */
.am-num {
    font-family: var(--am-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ── focus and disabled ─────────────────────────────────────────────────── */

.am-close:focus-visible,
.am-btn:focus-visible,
.am-link:focus-visible,
.am-segment:focus-visible {
    outline: 2px solid var(--app-accent-border);
    outline-offset: 2px;
}

.am-input:focus-visible,
.am-select:focus-visible,
.am-textarea:focus-visible {
    outline: 2px solid var(--app-accent-border);
    outline-offset: 2px;
}

.am-btn:disabled,
.am-link:disabled,
.am-segment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* A field that does not apply as things stand (Tables only needs no template; an owner-furnished slot
   needs no product) greys out and keeps its border still under the pointer. */
.am-select:disabled,
.am-input:disabled {
    color: var(--app-text-disabled);
    cursor: not-allowed;
}
.am-select:disabled:hover,
.am-input:disabled:hover { border-color: var(--app-border-hairline); }

/* ── configuration windows: toolbar, grid, affix fields, options ─────────── */
/* Shared by the summary lines window on Global Settings and the project configuration window on Project Details,
   alongside the table register below, which stays last so its 32px table fields win at equal weight. */

/* A toolbar above a table: its buttons at the left, at their own width. */
.am-toolbar { display: flex; }

/* Three fields to a row. */
.am-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

/* A field and its unit box (%, a currency, hrs) joined into one control. */
.am-affix {
    display: flex;
    align-items: stretch;
}
.am-affix > .am-input {
    flex: 1 1 auto;
    min-width: 0;
}
.am-affix > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.am-affix > :not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.am-affix-unit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    font-family: var(--am-font-mono);
    font-size: 13px;
    color: var(--app-text-label);
    background: var(--app-surface-raised);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-btn);
}

/* A small select beside small inputs. */
.am-select.is-sm {
    height: 36px;
    font-size: 13px;
}

/* A form's rows one under another. */
.am-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* A wrapping list of ticks, and one tick with its words. */
.am-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.am-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--app-text-data);
    cursor: pointer;
}
/* A lone tick that sits in a row of fields takes their height. */
.am-option.is-field { height: 36px; }

@media (max-width: 720px) {
    .am-grid { grid-template-columns: 1fr; }
}

/* ── table windows ──────────────────────────────────────────────────────── */

/* The register of the windows that manage a list in a table: the labor types, cable types and line item
   attribute keys windows on Global Settings, and the footer and note the external records console shares
   with them. It came here from labor-type-modal.css (ltm-) when the cable types and attribute keys windows
   became its second and third users (docs/superpowers/plans/2026-11-14-global-config-friendly-style.md,
   Task 4). The owner's dense register: 13px cells on 6px 10px, 12px/500 sentence-case headers, 32px
   fields and 32px square icon buttons on the toolbar step. These rules sit last in the file so that, at
   equal weight, the table's 32px fields and buttons win over .am-input.is-sm and .am-btn.is-sm. */

/* A list window's body sits a step tighter than a form's. */
.am-body.is-compact { gap: 16px; }

/* A window with one footer button, Close, at the right. */
.am-foot.is-end { justify-content: flex-end; }

/* A table fills its panel edge to edge; a narrow screen scrolls it sideways inside the panel. */
.am-panel.am-table-panel {
    padding: 0;
    overflow-x: auto;
}

.am-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.am-table th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    color: var(--app-text-label);
    border-bottom: 1px solid var(--app-border-hairline);
}

.am-table td {
    padding: 6px 10px;
    vertical-align: middle;
    color: var(--app-text-data);
    border-bottom: 1px solid var(--app-border-hairline);
}

.am-table tbody tr:last-child td { border-bottom: 0; }

/* Under the table's own th and td rules, so a header lines up with its column. */
.am-table .am-end { text-align: right; }
.am-table .am-center { text-align: center; }

/* The row being edited, and its notes row under it, lift off the panel. */
.am-table .am-edit-row td { background: var(--app-surface-raised); }
.am-table .am-edit-notes td {
    padding-top: 0;
    padding-bottom: 10px;
    background: var(--app-surface-raised);
}

/* Fields inside the table sit on the dense row height. */
.am-table .am-input,
.am-table .am-select {
    height: 32px;
    padding: 0 8px;
}

.am-table .am-edit-notes .am-textarea {
    min-height: 56px;
    font-size: 13px;
    background: var(--app-surface-panel);
}

/* A row's ticked flags (PM base, Active) take the accent. */
.am-check {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
    accent-color: var(--app-accent-fill);
    cursor: pointer;
}
.am-check:disabled { cursor: not-allowed; }

/* A ticked flag in a saved row, and the dash for an unticked or empty one. */
.am-tick { color: var(--app-status-ok); }
.am-dash { color: var(--app-text-disabled); }

/* The notes marker and, as a cell, the "notes below" arrow and the order number. The cell form sits under the
   table so it outranks .am-table td's colour. */
.am-muted,
.am-table .am-muted { color: var(--app-text-label); }

/* The row shown before the first item exists. */
.am-table .am-empty-row {
    padding: 16px 10px;
    text-align: center;
    color: var(--app-text-label);
}

/* A short line of guidance beside a toolbar, or the sentence shown in place of an empty list or result. */
.am-note {
    margin: 0;
    font-size: 13px;
    color: var(--app-text-label);
}

/* A row's actions (move, edit, delete, save, cancel) stay on one line at the right. */
.am-table .am-row-actions {
    white-space: nowrap;
    text-align: right;
}

/* A square icon button on the toolbar step, 32px to sit inside the dense row. */
.am-btn.am-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: 4px;
}
