﻿h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* —— Self-hosted design-system fonts (Barlow / Barlow Condensed, latin subset) —— */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/barlow-condensed-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/barlow-condensed-700.woff2') format('woff2'); }

:root {
    --icpro-font-body: 'Barlow', "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --icpro-font-heading: 'Barlow Condensed', "Segoe UI", system-ui, sans-serif;
    /* One grid text size for rows AND headers across every list (owner, 14 Aug 2026:
       standardise on the WO-number cell size). Two-line cells keep a smaller secondary line. */
    --icpro-grid-fs: 0.84rem;
    --icpro-ink: #16202c;
    --icpro-muted: #64748b;
    --icpro-faint: #94a3b8;
    --icpro-line: #e2e7ee;
    --icpro-line-strong: #cbd5e1;
    --icpro-accent: #416180;
    --icpro-accent-dark: #2c455d;
    --icpro-accent-soft: #eef6ff;
    --icpro-danger: #b3261e;
    --icpro-danger-soft: #fbeaea;
    --icpro-warn: #8a5a00;
    --icpro-warn-soft: #fbf1de;
    --icpro-held-soft: #fff6d6;   /* an imported row waiting for the engineer's Confirm (CR-671); not an override */
    --icpro-warn-fill: #d99a00;   /* an amber you can fill a bar with; --icpro-warn is a text colour (CR-615) */
    --icpro-surface: #ffffff;
    --icpro-canvas: #f4f6f9;
    --icpro-sidebar: #1d2d3d;
    --icpro-sidebar-hover: rgba(255, 255, 255, 0.08);
    --icpro-sidebar-active: rgba(255, 255, 255, 0.14);
    --icpro-sidebar-text: #e8eef5;
    --icpro-sidebar-muted: #9eb4c8;
    --icpro-radius: 0.5rem;
    --icpro-radius-sm: 0.35rem;
    --icpro-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --icpro-shadow-md: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --icpro-shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);

    /* —— Design-system scale (Claude Design handoff, Aug 2026) ——
       Additive tokens: the full neutral / steel-blue accent ramps behind the
       existing --icpro-* aliases above, so screens can move onto the handoff
       scale incrementally without a global reflow. Source of truth:
       design_handoff_icpro_redesign/.../styles.css */
    --icpro-neutral-100: #f5f5f8;
    --icpro-neutral-200: #e7e7ea;
    --icpro-neutral-300: #d4d4d7;
    --icpro-neutral-400: #b7b7ba;
    --icpro-neutral-500: #98989b;
    --icpro-neutral-600: #7a7a7d;
    --icpro-neutral-700: #5d5d60;
    --icpro-neutral-800: #424244;
    --icpro-neutral-900: #2b2b2d;

    --icpro-accent-100: #eef6ff;
    --icpro-accent-200: #d6ebff;
    --icpro-accent-300: #b5d9fd;
    --icpro-accent-400: #94bce3;
    --icpro-accent-500: #749dc4;
    --icpro-accent-600: #597ea3;
    --icpro-accent-700: #416180;
    --icpro-accent-800: #2c455d;
    --icpro-accent-900: #1d2d3d;

    --icpro-accent2-100: #eef6ff;
    --icpro-accent2-200: #d6ebff;
    --icpro-accent2-300: #bdd8f2;
    --icpro-accent2-400: #9ebbd8;
    --icpro-accent2-500: #7e9cb8;
    --icpro-accent2-600: #627d98;
    --icpro-accent2-700: #486077;
    --icpro-accent2-800: #314457;
    --icpro-accent2-900: #1f2d3a;

    /* Semantic (added for this app, not in the design system) */
    --icpro-error-border: #b4483f;
    --icpro-error-bg: #fdf1ef;
    --icpro-error-text: #7d2d26;
    --icpro-destructive-text: #8f342c;

    /* The ENTRY role. Owner, 25 Aug 2026: "Yes, green tab is deliberate for entry screens."
       So the tab colour carries meaning -- steel-blue is a list you are looking at, green is a
       form you are typing in -- and these are the values that cue was already using on
       Calibration Observations, kept exactly rather than re-picked. */
    --icpro-entry: #22aa66;
    --icpro-entry-ink: #114411;
    --icpro-entry-soft: #d9f0e2;
    --icpro-entry-deep: #0d6b3f;

    /* Fields. Owner, 25 Aug 2026: "keep read only value columns in grey and data entry
       columns in off white color and the cells should have visible border in both (not a
       dark black border) in every textbox control in all pages."

       So the background says whether you may type in it, and the border is always there --
       an operator should never have to hover a cell to find out it is a box. */
    --icpro-field-bg: #fcfdfe;          /* off white: type here */
    --icpro-field-readonly-bg: #eceff3; /* grey: a value, not a box */
    --icpro-field-line: #c4cfdc;        /* visible, and nowhere near black */
    --icpro-field-line-hover: #9fb0c4;

    /* Spacing scale (px per handoff; kept as tokens, not raw px) */
    --icpro-space-1: 3.4px;
    --icpro-space-2: 6.8px;
    --icpro-space-3: 10.2px;
    --icpro-space-4: 13.6px;
    --icpro-space-6: 20.4px;
    --icpro-space-8: 27.2px;

    /* Square-cornered by design-system intent (cards/btn/input/tag/dialog). */
    --icpro-radius-square: 0;
    --icpro-radius-tag: 3px;

    --icpro-tabular: tabular-nums;
}

/* Segmented control (design-system): a row of mutually-exclusive buttons, one active. */
.ic-segmented { display: inline-flex; border: 1px solid var(--icpro-line-strong); overflow: hidden; }
.ic-seg {
    padding: 0.32rem 0.75rem; font: inherit; font-size: 0.8rem; font-weight: 600;
    background: var(--icpro-surface); color: var(--icpro-muted);
    border: none; border-right: 1px solid var(--icpro-line-strong); cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.ic-seg:last-child { border-right: none; }
.ic-seg:hover { background: var(--icpro-neutral-100); color: var(--icpro-ink); }
.ic-seg.active { background: var(--icpro-accent-600); color: #fff; }

/* Collapsible filter bar toggle. */
.ic-filter-toggle-row { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.ic-filter-toggle {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.7rem; font: inherit; font-size: 0.85rem; font-weight: 600;
    color: var(--icpro-ink); background: var(--icpro-surface);
    border: 1px solid var(--icpro-line-strong); cursor: pointer;
}
.ic-filter-toggle:hover { border-color: var(--icpro-accent); }
.ic-filter-toggle .e-filter { font-size: 0.9rem; color: var(--icpro-accent-700); }
.ic-filter-caret { font-size: 0.75rem; transition: transform 0.15s ease; }
.ic-filter-toggle.open .ic-filter-caret { transform: rotate(180deg); }
.ic-filter-summary { font-size: 0.8rem; color: var(--icpro-muted); }

/* The list search box: one field, above every browse grid, that looks in every column.
   Always on screen -- searching is the commonest thing an operator does with a list, and
   putting it behind the Filter toggle is what made finding a Lab ID take four steps
   (owner, 20 Sep 2026). Right-aligned, so it sits over the grid's own toolbar line and
   reads as part of the grid rather than as another page filter. */
.ic-grid-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
    margin: 0 0 0.4rem;
}
.ic-grid-search > span.ic-grid-search-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--icpro-muted);
}
/* The house field chrome (§2.8), not a third look: same tokens, same 3px radius, same focus
   ring as every filter-bar and form-grid field. This box had its own border, radius and
   outline for one revision on 20 Sep 2026 -- the very thing the 29 Aug 2026 review removed. */
.ic-grid-search input[type="search"] {
    width: 18rem;
    max-width: 100%;
    font: inherit;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    background: var(--icpro-field-bg);
    color: var(--icpro-ink);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.ic-grid-search input[type="search"]:hover:not(:disabled) { border-color: var(--icpro-field-line-hover); }
.ic-grid-search input[type="search"]:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
    background: #fff;
}

/* CR-586 (owner, 20 Oct 2026): on a browse list the box moves up into the free middle of the grid's toolbar line --
   left of Columns, right of Group / Filter / Export -- instead of a row of its own. Only while the grid is wide
   enough to leave that room (the container query: the widest browse toolbar -- Group, Filter, Export, Update,
   Cancel -- ends 28rem in, and the box needs 29rem at the right); narrower, the rules above put it back on its own
   row. */
.ic-grid-host.ic-search-inline { position: relative; container-type: inline-size; }
@container (min-width: 62rem) {
    .ic-search-inline > .ic-grid-search {
        position: absolute;
        top: 0;
        right: var(--ic-grid-search-right, 8rem);
        height: var(--ic-grid-toolbar-h, 2.4rem);
        margin: 0;
        z-index: 3;
    }
    .ic-search-inline > .ic-grid-search input[type="search"] { width: 16rem; padding: 0.25rem 0.5rem; }
    /* An editable list's toolbar has nothing at its right end (no Columns button): the box sits there. */
    .ic-search-edit > .ic-grid-search { right: 0.5rem; }
}

/* The Pressure Unit Converter page: its two sections close together (owner, 22 Oct 2026). */
.puc-page > .section-title { margin: 0.4rem 0 0.35rem; }
.puc-page > .section-title:first-child { margin-top: 0; }
.puc-page > .form-grid { margin-bottom: 0.5rem; row-gap: 0.4rem; }

/* CR-586 (owner, 20 Oct 2026: "the start and end date must be always visible"): the period of a list whose other
   criteria sit in the Filters tray, on the always-visible row beside the toggle. Caption beside the box rather than
   over it, so the row keeps one line's height; the field look is the filter bar's. */
.ic-filter-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.65rem; }
.ic-filter-inline label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    /* CR-597: the house label (owner, 21 Oct 2026: "Label Font and size must be same in every page"). */
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--icpro-muted);
}
.ic-filter-inline input {
    font: inherit;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    padding: 0.28rem 0.45rem;
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    background: var(--icpro-field-bg);
    color: var(--icpro-ink);
}
.ic-filter-inline input:hover:not(:disabled) { border-color: var(--icpro-field-line-hover); }
.ic-filter-inline input:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
    background: #fff;
}

/* The Lab ID box is narrower than the filter bar's default: a Lab ID is a fixed-width string
   and a full-width box beside the work order combo reads as the more important of the two. */
.filter-bar input.ic-filter-labid { width: 11rem; min-width: 11rem; }

/* ---------------------------------------------------------------------------
   The tab system -- one grammar, two ROLES and two LEVELS.

   There were five. Four were steel-blue underlines with different padding and
   the fifth, on Calibration Observations, was green -- because `.cal-tab` never
   reached this file and was written in a <style> block on the page itself. Asked
   whether the green was deliberate, the owner said (25 Aug 2026):
   "Yes, green tab is deliberate for entry screens."

   So it is a cue, and now a stated one:

     ROLE   (default)     STEEL-BLUE -- a list you are LOOKING AT
            .entry        GREEN      -- a form you are TYPING IN
     LEVEL  (default)     the screen's own tabs
            .sub          a second level inside one of those tabs

   Put `.entry` on the BAR, not the tab, so a screen cannot end up half one role
   and half the other. Everything else -- the underline, the count pill, the
   outward arrow on a tab that navigates -- is shared, which is the point.
   --------------------------------------------------------------------------- */
.ic-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0 0 0.75rem; border-bottom: 1px solid var(--icpro-neutral-300); }
.ic-tab {
    background: none; border: none; border-bottom: 2px solid transparent;
    padding: 0.5rem 0.85rem; font: inherit; font-size: 0.85rem; font-weight: 600;
    color: var(--icpro-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; margin-bottom: -1px; text-align: left;
}
.ic-tab:hover { color: var(--icpro-ink); }
.ic-tab.active { color: var(--icpro-accent-700); border-bottom-color: var(--icpro-accent); }
.ic-tab:disabled { color: var(--icpro-neutral-400); cursor: not-allowed; }
.ic-tab:focus-visible { outline: 2px solid var(--icpro-accent); outline-offset: -2px; }

/* Inside a master form card the bar keeps the card's side padding and sits flush on the body
   (the six pages that were master-form tabs until 23 Sep 2026, REVIEW-UIUX-Sep2026 §2.13). */
.master-form-card > .ic-tabs { padding: 0 0.75rem; margin: 0; background: var(--icpro-surface); }

/* The entry role. */
.ic-tabs.entry .ic-tab.active { color: var(--icpro-entry-ink); border-bottom-color: var(--icpro-entry); }
.ic-tabs.entry .ic-tab:hover { color: var(--icpro-entry-ink); }
.ic-tabs.entry .ic-tab:disabled { color: var(--icpro-neutral-400); }

/* The second level: same grammar, quieter, and no rule of its own -- it sits
   inside a tab that already drew one. */
.ic-tabs.sub { border-bottom-color: var(--icpro-line); margin: 0.6rem 0 0.4rem; gap: 0.1rem; }
.ic-tabs.sub .ic-tab { padding: 0.32rem 0.7rem; font-size: 0.8rem; font-weight: 550; }

/* A tab that OPENS another screen rather than switching in place. Without the
   arrow it looks like a tab that failed to switch. */
a.ic-tab::after { content: " 97"; font-size: 0.85em; opacity: 0.7; margin-left: 0.15rem; }

.ic-tab-count {
    font-size: 0.72rem; font-weight: 700; background: var(--icpro-neutral-200); color: var(--icpro-neutral-700);
    border-radius: 999px; padding: 0.05rem 0.4rem; min-width: 1.2rem; text-align: center;
}
.ic-tab.active .ic-tab-count { background: var(--icpro-accent-200); color: var(--icpro-accent-800); }
.ic-tabs.entry .ic-tab.active .ic-tab-count { background: var(--icpro-entry-soft); color: var(--icpro-entry-deep); }

/* Compact per-row action button (grid cells). */

/* Two-line paired grid cell (design-system list pattern): 13.5px primary, 12px secondary. */
.ic-cell-2 { display: flex; flex-direction: column; line-height: 1.25; }
/* A column heading on two lines, one per line of the two-line cell beneath it (owner, 25 Sep 2026). */
.ic-head-2 { display: inline-flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.e-grid.e-control .e-headercell:has(.ic-head-2) { height: auto; }
.e-grid.e-control .e-headercell:has(.ic-head-2) .e-headercelldiv { height: auto; line-height: 1.2; padding-top: 4px; padding-bottom: 4px; }
.ic-cell-primary { font-size: var(--icpro-grid-fs); font-weight: 600; color: var(--icpro-ink); text-decoration: none; }
a.ic-cell-primary { color: var(--icpro-accent-700); }
a.ic-cell-primary:hover { text-decoration: underline; }
.ic-cell-secondary { font-size: 0.75rem; color: var(--icpro-neutral-600); }
.ic-cell-strong { font-weight: 600; }
/* A browse list's key column (IcGridColumns.Key): the Calibrations list's primary-line weight. */
.e-grid .e-rowcell.ic-col-key { font-weight: 600; color: var(--icpro-ink); }
/* Equipment list (legacy mEquipment List conditional format): due / overdue in red; not displayed in
   the master list in grey on grey. */
.e-grid .e-rowcell .eq-due { color: #c62828; font-weight: 700; }
.e-grid .e-rowcell .eq-hidden { color: #929292; background: #ececec; padding: 0 0.25rem; }
/* View / Edit / Delete and the History Card icon on one line. */
.eq-row-actions { display: inline-flex; align-items: center; gap: 0.2rem; }
.eq-row-actions .btn-group-actions { display: inline-flex; }
/* Wraps instead of cutting off (IcGridColumns.KeyWrap / Wrap): a long customer name is read in full. */
.e-grid .e-rowcell.ic-col-wrap,
.e-grid .e-rowcell.ic-col-wrap .ic-cell-primary,
.e-grid .e-rowcell.ic-col-wrap .ic-cell-secondary { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.3; }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--icpro-font-body);
    -webkit-font-smoothing: antialiased;
    color: var(--icpro-ink);
    background: var(--icpro-canvas);
    line-height: 1.45;
}

h1, h2, h3, h4 { font-family: var(--icpro-font-heading); font-weight: 600; letter-spacing: 0; }

/* Syncfusion's bootstrap5 theme hard-sets its own font on components; pull them onto Barlow. */
.e-control, .e-grid, .e-btn, .e-input, .e-input-group, .e-dropdownbase,
.e-grid .e-headercell, .e-grid .e-rowcell { font-family: var(--icpro-font-body); }

a { color: var(--icpro-accent); }

/* —— Application shell (InstaCalPro-style dark sidebar + light app bar) —— */
.ic-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--icpro-canvas);
}

.ic-sidebar {
    --sidebar-w: 280px;
    --sidebar-mini-w: 68px;
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background: var(--icpro-sidebar);
    color: var(--icpro-sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    z-index: 40;
    overflow: hidden;
    transition: flex-basis 0.2s ease, width 0.2s ease;
}

.ic-shell.is-mini .ic-sidebar {
    flex-basis: var(--sidebar-mini-w);
    width: var(--sidebar-mini-w);
}

.ic-shell-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ic-sidebar-header {
    flex: 0 0 auto;
    padding: 0.75rem 0.7rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ic-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 650;
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--icpro-sidebar-text);
    text-decoration: none;
    justify-content: flex-start;
}

.ic-sidebar-brand:hover {
    background: transparent;
    color: #fff;
}

/* The product name takes the menu items' own colour (owner, 24 Sep 2026), with the version under it. */
.ic-sidebar-brand-text {
    color: inherit;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ic-sidebar-brand-version {
    color: var(--icpro-sidebar-muted);
    font-size: 0.72rem;
    font-weight: 550;
    letter-spacing: 0.02em;
    margin-top: 0.15rem;
}

.ic-sidebar-brand img {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    flex: 0 0 auto;
}

.ic-shell.is-mini .ic-sidebar-header {
    padding: 0.65rem 0.35rem;
}

.ic-shell.is-mini .ic-sidebar-brand {
    justify-content: center;
}

.ic-shell.is-mini .ic-sidebar-brand img {
    width: 36px;
    height: 36px;
}

.ic-shell.is-mini .ic-sidebar-brand-text,
.ic-shell.is-mini .ic-nav-label,
.ic-shell.is-mini .ic-nav-group-text,
.ic-shell.is-mini .ic-nav-chevron {
    display: none;
}

.ic-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.55rem 0.4rem 0.75rem;
}

.ic-sidebar-scroll::-webkit-scrollbar { width: 6px; }
.ic-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.ic-nav-link,
.ic-nav-group-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--icpro-sidebar-text);
    text-decoration: none;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.25;
}

.ic-shell.is-mini .ic-nav-link,
.ic-shell.is-mini .ic-nav-group-btn {
    justify-content: center;
    padding: 0.65rem 0.35rem;
}

.ic-nav-link:hover,
.ic-nav-group-btn:hover {
    background: var(--icpro-sidebar-hover);
    color: #fff;
}

.ic-nav-link.active {
    background: var(--icpro-accent-600);
    color: #fff;
    font-weight: 650;
}

.ic-nav-link .e-icons,
.ic-nav-group-btn .e-icons {
    color: #9ec9e0;
    flex: 0 0 auto;
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
}

.ic-nav-link.active .e-icons,
.ic-nav-link:hover .e-icons,
.ic-nav-group-btn:hover .e-icons {
    color: #fff;
}

.ic-nav-child {
    padding-left: 1.85rem;
    font-weight: 450;
    font-size: 0.84rem;
    color: var(--icpro-sidebar-muted);
}

.ic-nav-group { margin: 0.12rem 0; }

.ic-nav-group-text { flex: 1 1 auto; }

.ic-nav-chevron {
    margin-left: auto;
    transition: transform 0.15s ease;
    font-size: 0.7rem;
    color: var(--icpro-sidebar-muted);
    line-height: 1;
}

.ic-nav-group.expanded .ic-nav-chevron {
    transform: rotate(180deg);
}

.ic-nav-children {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.1rem 0 0.25rem;
}

.ic-sidebar-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.55rem 0.4rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

/* Settings, pinned above the vendor mark in the sidebar footer. */
.ic-sidebar-settings { margin-bottom: 0.15rem; }

.ic-sidebar-vendor {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
}

.ic-sidebar-vendor img {
    width: 100px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 6px;
    display: block;
}

.ic-sidebar-vendor:hover {
    background: var(--icpro-sidebar-hover);
}

.ic-shell.is-mini .ic-sidebar-vendor {
    justify-content: center;
    padding: 0.2rem;
}

.ic-shell.is-mini .ic-sidebar-vendor img {
    width: 48px;
    height: 24px;
    padding: 2px;
}

.ic-sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--icpro-sidebar-muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
}

.ic-shell.is-mini .ic-sidebar-toggle {
    justify-content: center;
    padding: 0.65rem 0.35rem;
}

.ic-sidebar-toggle:hover {
    background: var(--icpro-sidebar-hover);
    color: #fff;
}

.ic-sidebar-toggle .e-icons {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
}

/* Light app bar (InstaCalPro toolbar) with profile on the right */
.ic-appbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 30;
    /* CR-740: 44 px, was 53. Its tallest child is the 36 px icon button. */
    min-height: 2.75rem;
    padding: 0.2rem 1rem;
    background: #fff;
    color: var(--icpro-ink);
    border-bottom: 1px solid var(--icpro-neutral-300);
    box-shadow: var(--icpro-shadow-sm);
}

/* .ic-appbar-brand and its version chip removed 24 Sep 2026 (owner): the version now sits under
   the product's name at the top of the rail (.ic-sidebar-brand-version). */

/* The laboratory's own identity, beside the product's (owner's header, 21 Sep 2026).
   ICPro's logo stays to its LEFT, which is what he asked for. */
.ic-appbar-lab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.65rem;
    margin-left: 0.15rem;
    border-left: 1px solid var(--icpro-line);
    color: var(--icpro-ink);
    text-decoration: none;
    min-width: 0;
}

/* A lab logo is usually a WIDE letterhead banner, not a square mark -- Alfa-Tech's is 1873x317,
   nearly 6:1. Boxed at 30x30 it rendered as a 5px-tall smear: present, and unreadable (owner,
   21 Sep 2026). Height is fixed so the bar's rhythm holds; width is free up to a cap, so a wide
   logo gets a band and a square one still sits in its own square. The initials fallback beside
   this keeps its 30x30 -- initials ARE square. */
.ic-appbar-lab .ic-lab-logo {
    width: auto;
    height: 30px;
    max-width: 8.5rem;
    border-radius: 6px;
    object-fit: contain;
    object-position: left center;
    background: var(--icpro-surface);
    flex-shrink: 0;
}

.ic-appbar-lab .ic-lab-initials {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--icpro-accent-100);
    color: var(--icpro-accent-700);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ic-appbar-lab .ic-lab-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.ic-appbar-lab .ic-lab-name {
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 22rem;
}

.ic-appbar-lab .ic-lab-sub {
    font-size: 0.68rem;
    color: var(--icpro-muted);
    white-space: nowrap;
}

/* Below the breakpoint the lab's wordmark goes; the chip stays, so the header still says
   whose laboratory this is. */
@media (max-width: 1100px) {
    .ic-appbar-lab .ic-lab-text { display: none; }
}

.ic-appbar-spacer { flex: 1 1 auto; }

/* Top-bar breadcrumb, resolved from the nav catalogue (IcAppShell.RebuildCrumbs). */
.ic-appbar-divider {
    width: 1px; align-self: stretch;
    margin: 0.35rem 0.15rem;
    background: var(--icpro-neutral-300);
}

.ic-appbar-crumbs {
    display: flex; align-items: center; gap: 0.35rem;
    min-width: 0; overflow: hidden;
    font-size: 0.8rem; color: var(--icpro-neutral-600);
    white-space: nowrap;
}

.ic-crumb { overflow: hidden; text-overflow: ellipsis; }
.ic-crumb.is-current { color: var(--icpro-ink); font-weight: 600; }
.ic-crumb-sep { color: var(--icpro-neutral-400); }

@media (max-width: 900px) {
    /* The page's own h1 says where you are; the trail is the first thing to go. */
    .ic-appbar-crumbs, .ic-appbar-divider { display: none; }
}

.ic-appbar-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--icpro-ink);
    text-decoration: none;
    font: inherit;
    font-size: 1rem;
    background: transparent;
    border: 1px solid var(--icpro-line);
    border-radius: 8px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    cursor: pointer;
}

.ic-appbar-icon-btn:hover {
    background: #f1f5f9;
    border-color: var(--icpro-line-strong);
}

.ic-appbar-groups-btn {
    width: auto;
    min-width: 2.25rem;
    padding: 0 0.65rem;
    font-size: 0.82rem;
    font-weight: 550;
}

.ic-appbar-groups-label {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .ic-appbar-groups-label { display: none; }
    .ic-appbar-groups-btn {
        width: 2.25rem;
        padding: 0;
    }
}

.ic-appbar-login {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--icpro-line-strong);
    border-radius: 8px;
    color: var(--icpro-ink);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 550;
}

.ic-appbar-login:hover {
    background: #f1f5f9;
}

.ic-profile {
    position: relative;
}

.ic-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid var(--icpro-line);
    border-radius: 999px;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    cursor: pointer;
    font: inherit;
    color: var(--icpro-ink);
}

.ic-profile-btn:hover,
.ic-profile.open .ic-profile-btn {
    background: #eef2f7;
    border-color: var(--icpro-line-strong);
}

.ic-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: var(--icpro-accent-100);
    color: var(--icpro-accent-700);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.ic-profile-avatar.lg {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.8rem;
}

.ic-profile-name {
    font-size: 0.86rem;
    font-weight: 600;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ic-profile-caret {
    font-size: 0.75rem;
    color: var(--icpro-muted);
}

.ic-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 15rem;
    background: #fff;
    border: 1px solid var(--icpro-line);
    border-radius: 10px;
    box-shadow: var(--icpro-shadow-lg);
    padding: 0.5rem;
    z-index: 50;
}

.ic-profile-menu-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.4rem 0.55rem;
}

.ic-profile-menu-name {
    font-weight: 650;
    font-size: 0.9rem;
}

.ic-profile-menu-role {
    font-size: 0.75rem;
    color: var(--icpro-muted);
}

.ic-profile-menu-sep {
    height: 1px;
    background: var(--icpro-line);
    margin: 0.25rem 0;
}

.ic-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--icpro-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 550;
    padding: 0.55rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;   /* the Change password item is a link */
    box-sizing: border-box;
}

.ic-profile-menu-item:hover {
    background: #f1f5f9;
}

.ic-profile-menu-item .e-icons {
    color: var(--icpro-muted);
}

.ic-signout { display: block; margin: 0; width: 100%; }

@media (max-width: 720px) {
    .ic-profile-name { display: none; }
}

/* —— The ribbon (CR-727; owner, 16 Nov 2026) ——
   The lab's other menu style: the sidebar's groups as a row of tabs under the app bar, the open group's pages as a
   band of buttons. Drawn only when mCompany.MenuStyle is Ribbon; the rail is then not in the page at all, so nothing
   here touches a lab on the sidebar. The tab row wears the rail's colour and the buttons the accent scale, so both
   follow the user's theme. It scrolls away with the page; the app bar stays. */
.ic-ribbon {
    flex: 0 0 auto;
    background: var(--icpro-surface, #fff);
    border-bottom: 1px solid var(--icpro-neutral-300);
    box-shadow: var(--icpro-shadow-sm);
}

.ic-ribbon-tabs {
    display: flex;
    align-items: stretch;
    /* One row, always (CR-740). Wrapped, the twelfth tab took a second row to itself at 1366 px - 33 px of every
       page for one word. Below the width where they fit, the row scrolls sideways instead. */
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0 0.1rem;
    padding: 0 0.6rem;
    background: var(--icpro-sidebar);
    color: var(--icpro-sidebar-text);
}

.ic-ribbon-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem 0.2rem 0.1rem;
    color: var(--icpro-sidebar-muted);
    text-decoration: none;
}

.ic-ribbon-version { font-size: 0.72rem; font-weight: 500; white-space: nowrap; }

.ic-ribbon-tab {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 6px 6px 0 0;
    margin-top: 0.25rem;
    /* 0.5rem, not more: with the "Masters — " prefix gone the twelve tabs fit one row at 1440 px. */
    padding: 0.4rem 0.5rem;
    background: transparent;
    color: var(--icpro-sidebar-text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.ic-ribbon-tab:hover { background: var(--icpro-sidebar-hover); color: #fff; }

/* The open tab joins the band beneath it; the Dashboard tab is a link and is lit while that page shows. */
.ic-ribbon-tab.is-open {
    background: var(--icpro-surface, #fff);
    color: var(--icpro-accent-800, var(--icpro-ink));
    font-weight: 650;
}

a.ic-ribbon-tab.active { background: var(--icpro-accent-600); color: #fff; font-weight: 650; }

.ic-ribbon-vendor { display: inline-flex; align-items: center; padding: 0.2rem 0.5rem 0.2rem 0; opacity: 0.85; }
.ic-ribbon-vendor:hover { opacity: 1; }
.ic-ribbon-vendor img { height: 22px; width: auto; display: block; }

.ic-ribbon-band {
    display: flex;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.2rem 0.6rem 0.2rem;   /* CR-740: the band is 64 px, was 84 */
    overflow-x: auto;
}

.ic-ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
    width: 5.6rem;
    padding: 0.2rem 0.25rem 0.2rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--icpro-ink);
    text-decoration: none;
    text-align: center;
}

.ic-ribbon-btn:hover { background: var(--icpro-accent-100); border-color: var(--icpro-accent-300); }

.ic-ribbon-btn.active { background: var(--icpro-accent-100); border-color: var(--icpro-accent-500); }

.ic-ribbon-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--icpro-accent-700); }

.ic-ribbon-label { font-size: 0.74rem; font-weight: 500; line-height: 1.2; }

.ic-ribbon-btn.active .ic-ribbon-label { font-weight: 650; }

/* Keyboard focus, in the house form; the lighter ring on the dark tab row. */
.ic-ribbon-tab:focus-visible, .ic-ribbon-brand:focus-visible, .ic-ribbon-vendor:focus-visible {
    outline: 2px solid var(--icpro-accent-300);
    outline-offset: -2px;
}
.ic-ribbon-btn:focus-visible { outline: 2px solid var(--icpro-accent); outline-offset: 1px; }

/* A ribbon lab's page is drawn once before the lab's menu style has been read, and that first frame would show the
   empty rail. App.razor already knows the style and says so on <html>; a sidebar lab has no such attribute. */
:root[data-menu="ribbon"] .ic-sidebar { display: none; }

/* CR-740: on a laptop the twelve tabs fit one row with a little less air (measured at 1366 px: the last tab ends
   at 1247, the version beside the logo still showing). */
@media (max-width: 1500px) {
    .ic-ribbon-tab { padding: 0.4rem 0.36rem; font-size: 0.8rem; }
}

@media (max-width: 900px) {
    /* No rail to keep clear of (CR-714's margin is for the floating rail). */
    .ic-shell.is-ribbon .ic-shell-main { margin-left: 0; }
    .ic-ribbon-version, .ic-ribbon-vendor { display: none; }
}

/* —— Tabbed documents (CR-728; owner, 16 Nov 2026) ——
   Ribbon labs only. The shell fills the window exactly: app bar, ribbon, the strip of open pages, and under it the
   pages themselves, each a frame that scrolls for itself - so the menu and the tabs stay in view however long a page
   is. A sidebar lab has none of these classes in its page. */
.ic-shell.is-tabbed, .ic-shell.is-tabbed .ic-shell-main { height: 100vh; min-height: 0; }
.ic-shell.is-tabbed .ic-shell-main { overflow: hidden; }

.ic-doc-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.ic-doc-strip {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 0.15rem;
    padding: 0.3rem 0.6rem 0;
    background: var(--icpro-neutral-100);
    border-bottom: 1px solid var(--icpro-neutral-300);
    overflow-x: auto;
    overflow-y: hidden;
}

.ic-doc-tablist { display: flex; align-items: flex-end; gap: 0.15rem; flex: 0 0 auto; }

/* Read out, not drawn (the unsaved dot's meaning). */
.ic-visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ic-doc-tab {
    display: inline-flex;
    align-items: center;
    /* Never squeezed: with many pages open the strip scrolls sideways instead. */
    flex: 0 0 auto;
    min-width: 0;
    max-width: 15rem;
    border: 1px solid var(--icpro-neutral-300);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: var(--icpro-neutral-200);
    margin-bottom: -1px;
}

.ic-doc-tab.active { background: var(--icpro-canvas); border-top: 2px solid var(--icpro-accent); }

.ic-doc-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    border: none;
    background: none;
    padding: 0.35rem 0.3rem 0.35rem 0.7rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 550;
    color: var(--icpro-muted);
    cursor: pointer;
}

.ic-doc-tab.active .ic-doc-tab-btn { color: var(--icpro-accent-800); font-weight: 650; }
.ic-doc-tab:not(.active) .ic-doc-tab-btn:hover { color: var(--icpro-ink); }

/* The Dashboard has no Close, so its caption takes the padding the Close would. */
.ic-doc-tab-btn:last-child { padding-right: 0.7rem; }

.ic-doc-tab-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ic-doc-tab-dirty { color: var(--icpro-entry-deep, var(--icpro-accent-700)); font-size: 0.6rem; line-height: 1; }

.ic-doc-tab-close {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.25rem;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--icpro-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.ic-doc-tab-close:hover { background: var(--icpro-neutral-300); color: var(--icpro-ink); }

.ic-doc-tab-btn:focus-visible, .ic-doc-tab-close:focus-visible { outline: 2px solid var(--icpro-accent); outline-offset: -2px; }

.ic-doc-strip-spacer { flex: 1 1 auto; }

.ic-doc-close-all { flex: 0 0 auto; align-self: center; margin-bottom: 0.2rem; white-space: nowrap; }

.ic-doc-frames { flex: 1 1 auto; min-height: 0; position: relative; background: var(--icpro-canvas); }

/* Every open page keeps its size while another is in front (hidden, not removed), so a grid drawn in it never
   measures a zero-width box. */
iframe.ic-doc { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; }
iframe.ic-doc.is-active { visibility: visible; }

/* A tab's frame: the page alone. No rail to keep clear of on a narrow window (CR-714's margin). */
.ic-shell.is-embedded .ic-shell-main { min-height: 100vh; }
@media (max-width: 900px) { .ic-shell.is-embedded .ic-shell-main { margin-left: 0; } }

.ic-content {
    /* Full width like InstaCalPro main-content — list grids need the space for columns */
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1rem 1.25rem 2.5rem;
    flex: 1;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .ic-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        box-shadow: var(--icpro-shadow-lg);
    }

    .ic-shell.is-mini .ic-sidebar {
        flex-basis: var(--sidebar-mini-w, 68px);
        width: var(--sidebar-mini-w, 68px);
    }

    /* CR-714: the floating menu no longer takes room in the row, so the page kept starting at the window's left
       edge, under it. The page keeps clear of the minimised rail; an expanded menu opens over the page as a drawer. */
    .ic-shell-main { margin-left: 68px; }
}

.ic-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--icpro-muted);
    margin-bottom: 0.35rem;
}

.ic-breadcrumb a {
    color: var(--icpro-accent);
    text-decoration: none;
    font-weight: 550;
}

.ic-breadcrumb a:hover { text-decoration: underline; }

.ic-breadcrumb-sep { opacity: 0.55; }

.ic-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.ic-empty-icon {
    font-size: 2rem;
    color: var(--icpro-accent);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.ic-empty-title {
    font-weight: 650;
    font-size: 1.1rem;
    margin: 0 0 0.4rem;
}

.blank-layout {
    min-height: 100vh;
    background: var(--icpro-canvas);
}

/* Legacy top-nav classes kept for any leftover markup */
.app-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--icpro-line);
    background: var(--icpro-surface);
    box-shadow: var(--icpro-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header .tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--icpro-accent);
    background: var(--icpro-accent-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}

.app-main {
    max-width: none;
    margin: 0;
    padding: 1rem 1.25rem 2.5rem;
}

/* Every muted caption in the app at 12.8px (owner, 21 Oct 2026, CR-606): the one size wins over the page- and
   card-level rules that used to shrink or grow it, which is what !important is for here. */
.muted { color: var(--icpro-muted); font-size: 0.8rem !important; }

.app-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--icpro-ink);
    text-decoration: none;
    margin-right: 0.75rem;
}

.app-header .brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: contain;
}

.app-header nav {
    display: flex;
    gap: 0.15rem 0.2rem;
    flex: 1;
    flex-wrap: wrap;
}

.app-header nav a {
    color: var(--icpro-muted);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 500;
    padding: 0.3rem 0.55rem;
    border-radius: var(--icpro-radius-sm);
    transition: background-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.app-header nav a:hover { color: var(--icpro-accent-dark); background: var(--icpro-accent-soft); }

.ic-error-boundary {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 1.5rem 1.75rem;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
}

.ic-error-boundary h1 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.ic-error-boundary .actions {
    margin-top: 1.25rem;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.page-head h1 { margin: 0 0 0.15rem; font-size: 1.5rem; }
.page-head p.muted { max-width: 52rem; margin: 0; font-size: 0.8rem; }

/* Short helper line above a grid — keep it tight so it doesn't push the grid down. */
p.muted.small { margin: 0.35rem 0; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--icpro-line-strong);
    background: var(--icpro-surface);
    color: var(--icpro-ink);
    padding: 0.45rem 0.9rem;
    border-radius: var(--icpro-radius-sm);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-weight: 550;
    font-size: 0.88rem;
    box-shadow: var(--icpro-shadow-sm);
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}

.btn:hover { border-color: var(--icpro-faint); box-shadow: var(--icpro-shadow-md); }
.btn:active { transform: translateY(1px); }
.btn:disabled, label.btn.disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
/* A label standing as a button over a hidden file picker cannot be :disabled; it carries the class. */
label.btn.disabled { pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--icpro-accent); outline-offset: 1px; }

.btn.primary {
    background: var(--icpro-accent);
    border-color: var(--icpro-accent);
    color: #fff;
}

.btn.primary:hover { background: var(--icpro-accent-dark); border-color: var(--icpro-accent-dark); }

/* ---------------------------------------------------------------------------
   The button system -- one base, two sizes, four intents.
   Owner, 25 Aug 2026: "Button sizes are also not consistent somewhere it's too
   much big somewhere small... button images are different for the same operation
   in other pages."

   He was right, and the cause was worse than drift: FOUR of the modifier classes
   the pages already used were never written down. `.btn.small`, `.btn.danger`,
   `.btn-ghost` and `.btn-danger` appear on ~40 buttons and matched no rule at
   all, so every one of them rendered as a full-size neutral button. A "Retire"
   and a "Save" sat side by side, the same size and the same colour.

   SIZE   default   page and section actions, dialog buttons
          .sm       actions that live inside a table row or a cell
   INTENT (none)    the ordinary action
          .primary  the one action the screen exists for -- at most one per group
          .danger   destroys or withdraws something
          .ghost    a third-rank action; no border until you point at it
   SHAPE  .icon     icon only, no caption. ALWAYS give it a title= as well, or it
                    says nothing to an operator who does not already know it.
   --------------------------------------------------------------------------- */

.btn.sm { padding: 0.25rem 0.6rem; font-size: 0.78rem; gap: 0.3rem; }
.btn.icon { padding: 0.25rem 0.45rem; line-height: 1; }
.btn.sm.icon { padding: 0.15rem 0.35rem; }

/* CR-702 (owner, 9 Nov 2026): a common caption drawn as its icon (wwwroot/js/ic-icon-buttons.js decides which).
   One square size for every such button, one smaller square inside a table row; the caption stays in the DOM as
   the accessible name, hidden by font-size so the words take no room. */
.btn[data-ic-icon] {
    font-size: 0; gap: 0; padding: 0; justify-content: center;
    width: 2rem; height: 2rem; min-width: 2rem; flex: 0 0 auto; line-height: 1;
}
.btn[data-ic-icon]::before { font-family: "e-icons"; font-size: 1rem; line-height: 1; font-weight: normal; }
.btn.sm[data-ic-icon] { width: 1.6rem; height: 1.6rem; min-width: 1.6rem; }
.btn.sm[data-ic-icon]::before { font-size: 0.85rem; }
/* One height for every button, captioned or icon (owner: "make button sizes equal"): 2 rem, 1.6 rem for .sm. */
.btn { height: 2rem; padding-top: 0; padding-bottom: 0; white-space: nowrap; box-sizing: border-box; }
.btn.sm { height: 1.6rem; }
.btn.icon { width: 2rem; min-width: 2rem; padding: 0; justify-content: center; }
.btn.sm.icon { width: 1.6rem; min-width: 1.6rem; padding: 0; }
/* A button that already carried its own icon beside its words: the icon alone, same square. */
.btn[data-ic-only] {
    font-size: 0; gap: 0; padding: 0; justify-content: center;
    width: 2rem; height: 2rem; min-width: 2rem; flex: 0 0 auto; line-height: 1;
}
.btn[data-ic-only] > .e-icons { font-size: 1rem; }
.btn.sm[data-ic-only] { width: 1.6rem; height: 1.6rem; min-width: 1.6rem; }
.btn.sm[data-ic-only] > .e-icons { font-size: 0.85rem; }
/* "mail": the icon font has no envelope, so it is drawn with a mask in the button's own text colour. */
.btn[data-ic-icon="mail"]::before, .ic-mail-icon {
    content: ""; display: inline-block; width: 1rem; height: 1rem; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn.sm[data-ic-icon="mail"]::before { width: 0.85rem; height: 0.85rem; }

.btn.danger { color: var(--icpro-destructive-text); border-color: var(--icpro-error-border); }
.btn.danger:hover { background: var(--icpro-error-bg); border-color: var(--icpro-error-border); }
.btn.danger.primary { background: var(--icpro-danger); border-color: var(--icpro-danger); color: #fff; }
.btn.danger.primary:hover { background: var(--icpro-error-text); border-color: var(--icpro-error-text); }

.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--icpro-accent-700); }
.btn.ghost:hover { background: var(--icpro-neutral-100); border-color: var(--icpro-line); box-shadow: none; }
.btn.ghost.danger { color: var(--icpro-destructive-text); }
.btn.ghost.danger:hover { background: var(--icpro-error-bg); }

/* The action column of an entry table: right-aligned, and tight enough that a row
   of them does not out-weigh the data beside it. */
td.row-actions, .row-actions { display: flex; gap: 0.25rem; justify-content: flex-end; align-items: center; }
table.ic-entry th.row-actions, table.ic-entry td.row-actions { width: 1%; white-space: nowrap; }

.meta-bar {
    display: flex;
    gap: 1.25rem;
    align-items: end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    padding: 0.85rem 1rem;
    box-shadow: var(--icpro-shadow-sm);
}

.meta-bar label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--icpro-muted);
}

.meta-bar select {
    min-width: 10rem;
    padding: 0.35rem 0.5rem;
}

.home-links { line-height: 2; }
.home-links a { font-weight: 550; }

.home-hero {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.home-hero h1 { margin: 0; }

/* .home-logo removed 21 Sep 2026: the dashboard's ICPro mark went with it (owner — "keep only
   Side bar ICPro logo"), and a class nothing wears is the debt §1.1 was written about. */

.error { color: var(--icpro-danger); font-weight: 550; }
.warn { color: var(--icpro-warn); font-weight: 550; }
.ok { color: var(--icpro-accent-dark); font-weight: 550; }

/* Allotment on the Calibrations list (CR-309): a dropdown and its button that read as ONE action
   inside the record-actions bar, so they keep a tighter gap than the bar's own. No divider —
   the four house bars that mix navigation links with a write button (JobSearch and its twins)
   separate them with nothing but the bar's gap. Filed here, beside .filter-bar, because that is
   the only place it appears. */
.ic-allot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Multi-column customer picker rows (name / address / city) -- the legacy customer combo's
   ColumnHeads list. Used by the Work Order entry and Bulk Print (CR-320). */
/* Customer / Location-Division / Address / City (owner, 25 Sep 2026): the name WRAPS -- some customers'
   names run past 60 characters -- and the division sits beside it. */
.ic-mc-row { display: grid; grid-template-columns: minmax(14rem, 2fr) 8rem minmax(8rem, 1.4fr) 7rem; gap: 0.75rem; align-items: center; }
.ic-mc-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-mc-row > span:first-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }

/* IcDropDown's two-column mode (IcChoice.Detail): Customer | Location/Division. */
.ic-dd2-row { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 0.75rem; align-items: center; }
.ic-dd2-row > span:first-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.ic-dd2-row > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--icpro-muted); }
/* The same two columns with a short code first: Equipment ID | Equipment. */
.ic-dd2-row.ic-dd2-idfirst { grid-template-columns: 9rem minmax(0, 1fr); }
.ic-dd2-row.ic-dd2-idfirst > span:first-child { white-space: nowrap; }
.ic-dd2-row.ic-dd2-idfirst > span:last-child { white-space: normal; color: inherit; }
.ic-dd2-head { font-weight: 600; border-bottom: 1px solid var(--icpro-line); padding: 0.35rem 0.75rem; color: var(--icpro-muted, #6b7280); }
.e-popup.ic-dd2 .e-list-item,
.e-popup.e-multi-column .e-list-item,
.e-ddl.e-popup .e-list-item:has(.ic-mc-row),
.e-ddl.e-popup .e-list-item:has(.ic-dd2-row) { height: auto; min-height: 36px; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; white-space: normal; }
.ic-mc-head { font-weight: 600; border-bottom: 1px solid var(--icpro-line); padding-bottom: 0.2rem; color: var(--icpro-muted, #6b7280); }
/* IcCustomerPicker (CR-510): the list is cut at 50 rows; this line says so. */
.ic-picker-more { padding: 0.35rem 0.75rem; border-top: 1px solid var(--icpro-line); color: var(--icpro-muted, #6b7280); font-style: italic; }

.filter-bar {
    display: flex;
    gap: 0.45rem 0.9rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    padding: 0.5rem 0.75rem;
    box-shadow: var(--icpro-shadow-sm);
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    /* CR-597: the house label size and case, as on the entry forms -- no longer a small uppercase caption. */
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--icpro-muted);
}

/* "Migrated calibration — read only" on the Observations page: one rule for the nine copies that
   each carried the same inline style (REVIEW-UIUX-Sep2026 §5.3). */
.ic-migrated-note { border-left: 3px solid var(--icpro-warn); padding: 0.4rem 0.6rem; background: var(--icpro-warn-soft); }

/* A tick-box criterion reads as a box with its caption, not a caption stacked over a box
   (REVIEW-UIUX-Sep2026 §5.6 — CalibrationDueSummary's "Include overdue"). */
.filter-bar label.check {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.8rem;
}
/* The tick box itself is a box, not a field: without this it took the filter bar's 6.5rem input width and stood a
   wide gap away from its caption (owner, 20 Oct 2026, the Jobs list's four ticks: "Reduce the space between check box
   and label ... so that it will fit in one row"). CR-588. */
.filter-bar label.check input[type="checkbox"] { min-width: 0; width: auto; margin: 0; padding: 0; }

/* Compact controls in the filter bar only (entry forms keep the roomier .form-grid sizing). */
.filter-bar input,
.filter-bar select {
    padding: 0.28rem 0.45rem;
    min-width: 6.5rem;
    max-width: 15rem;
    font-size: 0.85rem;
}

/* Colours, border and radius come from the FIELD STANDARD block below (review 2026-08-29
   §5.2: filter bars and .form-grid pages were a third field look). Kept as these selectors
   rather than joining the standard's list because they already coexist with Syncfusion
   controls inside the same containers; only the VALUES are aligned. Padding stays per
   context — the compact rule above, and the roomier entry sizing here. */
.filter-bar input,
.filter-bar select,
.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    font: inherit;
    min-width: 8rem;
    background: var(--icpro-field-bg);
    color: var(--icpro-ink);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.filter-bar input:hover:not(:disabled):not([readonly]),
.filter-bar select:hover:not(:disabled),
.form-grid input:hover:not(:disabled):not([readonly]),
.form-grid select:hover:not(:disabled),
.form-grid textarea:hover:not(:disabled):not([readonly]) { border-color: var(--icpro-field-line-hover); }

.filter-bar input:focus,
.filter-bar select:focus,
.form-grid input:focus,
.form-grid select:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
    background: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--icpro-shadow-sm);
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--icpro-muted);
}

.form-grid label.span-2 { grid-column: span 2; }
/* The required cue, same idiom as .lf-lbl.req / .fg-label.req: ink and bolder, no asterisk.
   No form-grid page could show it before 23 Sep 2026 (REVIEW-UIUX-Sep2026 §5.2 F5). */
.form-grid label.req,
.filter-bar label.req,
.mu-fields label.req { font-weight: 650; color: var(--icpro-ink); }
.form-grid label.check {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    /* CR-622 (owner, 23 Oct 2026: "Adjust controls in Certificate setup, Certificate Styles, specially check boxes"):
       a tick row sits on the line of the boxes beside it, not halfway up their caption. */
    align-self: end;
    min-height: 2.15rem;
}
/* The tick box is a box, not a field: the field rule's 8rem minimum made it a wide cell with the box drawn in its
   middle and the caption pushed to the far side (CR-622; the filter bar's own fix is CR-588). */
.form-grid label.check input[type="checkbox"] { min-width: 0; width: auto; margin: 0; padding: 0; flex: 0 0 auto; }
/* Several ticks under one caption (Certificate styles' Title style: Bold, Italic, Underline), on the line of the boxes. */
.form-grid .check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1rem; min-height: 2.15rem; }
.form-grid .check-row label.check { align-self: auto; min-height: 0; }

/* Job-line picker (CR-019): a checkbox list replacing the comma-separated id box.
   A <div> rather than a <label>, since it wraps many checkboxes each with its own
   label -- so it needs the label typography and the span rule restated. */
.form-grid .field-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--icpro-muted);
}

.form-grid .field-block.span-2 { grid-column: span 2; }
.form-grid .field-block.span-full { grid-column: 1 / -1; }

.line-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.3rem 1rem;
    max-height: 13rem;
    overflow-y: auto;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius-sm);
    background: var(--icpro-surface);
}

.line-picker label {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    color: var(--icpro-ink);
}

.line-picker input[type="checkbox"] { min-width: 0; }

.form-grid.readonly span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--icpro-ink);
    min-height: 1.4rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 650;
    margin: 1.5rem 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--icpro-line);
}

.flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.flag {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--icpro-line-strong);
    border-radius: 999px;
    color: var(--icpro-muted);
    background: var(--icpro-surface);
}

.flag.on {
    border-color: var(--icpro-accent);
    color: var(--icpro-accent-dark);
    background: var(--icpro-accent-soft);
}

.verify-card {
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    padding: 1.5rem 1.75rem;
    max-width: 36rem;
    box-shadow: var(--icpro-shadow-lg);
}

.verify-card.ok { border-left: 4px solid var(--icpro-accent); }
.verify-card.bad { border-left: 4px solid var(--icpro-danger); }

.verify-card h2 { margin-top: 0; }

.verify-card dl {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem 0.75rem;
}

.verify-card dt { color: var(--icpro-muted); font-weight: 600; }
.verify-card dd { margin: 0; }

/* Generic content surface + data table -- used by report/list pages outside the
   Syncfusion grid component (which brings its own bootstrap5 theme). */
.card {
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm);
    padding: 1.25rem 1.5rem;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    overflow: hidden;
    box-shadow: var(--icpro-shadow-sm);
    font-size: 0.88rem;
}

table.data th {
    text-align: left;
    font-weight: 650;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--icpro-muted);
    background: var(--icpro-canvas);
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--icpro-line);
}

table.data td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--icpro-line);
}

table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--icpro-canvas); }

.letterhead {
    width: 100%;
    flex: 0 0 auto;
    margin: 0 0 1.5mm;
}

/* Letter footer (CR-072; repositioned 21 Aug 2026). It sits INSIDE the sheet now, as the last
   band of .certificate-footer, and spans the full content width -- the owner's "footer should be
   part of the certificate ... stretch the image to the page width". Its depth is the lab's
   setting (mCompany.CCFooterHeight), applied inline by the block, because stretching to a fixed
   height is exactly what a letterhead of the wrong proportions cannot survive. Nothing renders
   when no footer is assigned. */
.letter-footer {
    width: 100%;
    flex: 0 0 auto;
    margin: 1.5mm 0 0.5mm;
}

/* UAT-060: object-fit was `fill`, which stretches the image to the band and ignores its
   aspect ratio. AlfaTech's footer is 14.84:1 and the band is 194 x 25.4 mm = 7.64:1, so
   the strip was drawn at roughly TWICE its proportional height {D} text stretched
   vertically and interpolated, which is what reads as blurry. Every other certificate
   image in this sheet already uses `contain`; the footer was the one exception.
   `contain` keeps the lab's own proportions and fits the image inside the band the lab
   reserved, so the reserved depth and every page break stay exactly where they were. */
.letter-footer-img {
    display: block;
    width: 100%;
    object-fit: contain;
}

.certificate-sheet {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    background: #fff;
    padding: 2mm 3mm 1.5mm;
    border: 0.6pt solid #000;
    font-size: 8.5pt;
    font-family: Cambria, "Times New Roman", Times, serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
/* CR-375: the lab's "Print page border on certificates" is off -- the sheet keeps its geometry, without the
   frame. CertificateDocument writes the marker ahead of the certificate it belongs to. */
.page-border-spec[data-draw="0"] ~ .certificate-document .certificate-sheet,
.page-border-spec[data-draw="0"] ~ * .certificate-sheet { border-color: transparent; }

/* The calibration photograph on the Format 31-35 certificates. The legacy fixes the frame at
   1.8313 inch tall whatever the picture's proportions (imgGIImage1.Height = 1.8313 * 1440 twips)
   and uses SizeMode = 3 (Zoom), which fits the image inside that box keeping its aspect ratio --
   object-fit: contain. The block renders nothing at all when there is no file, so an absent image
   leaves no gap, matching Height = 0. */
.cert-image { margin: 2mm 0; text-align: center; }
.cert-image img { height: 1.8313in; max-width: 100%; object-fit: contain; }
/* Unbreakable in print (owner, 19 Aug 2026): when the signatures don't fit, the whole block --
   signatures, notes, "End of certificate" -- moves to the last page together, instead of the
   endmark line orphaning alone on a page of its own. */
.certificate-footer { flex: 0 0 auto; margin-top: auto; break-inside: avoid; page-break-inside: avoid; }

/* The sign-off and its footer band: MOVED to print-shared.css (owner, 14 Sep 2026, "Legacy:
   sign-off in footer"), so the screen and the PDF read one copy. The 22 Aug 2026 rules that sat
   here put the band BELOW the sign-off; they are gone rather than left beside the new ones,
   because at equal specificity this later-loaded file would have silently won. */
.certificate-footer { position: relative; }

.stationery-reserve { }
/* Amendment number and date: MOVED to print-shared.css (CR-185) -- it prints, and the PDF
   renderer reads only that file, so a rule left here styled the screen and not the paper. */
table.identity-grid th,
table.identity-grid td {
    border: 0.5pt solid #000;
    padding: 0.8mm 0.6mm;
    text-align: center;
    vertical-align: top;
}
table.identity-grid th { font-weight: bold; }
/* Inline beside the date, not under it: the identity header's row was twice as deep as it
   needed to be (owner, 21 Aug 2026). */
.due-note { font-size: 7.5pt; font-weight: normal; margin-left: 1mm; white-space: nowrap; }
table.kv td.k { font-weight: normal; white-space: nowrap; width: 25%; }
table.kv td.k.indent { padding-left: 6mm; width: 25%; }
/* Second key column: "Sr. No." / "Identification No." / "Humidity". Widened from 18% and no
   longer allowed to shrink -- "Identification No." was wrapping and its value crowding the
   right margin (owner, 21 Aug 2026). Every row uses the same columns, so the three labels
   start at the same x. */
table.kv td.k2 { font-weight: normal; white-space: nowrap; width: 22%; min-width: 34mm; padding-left: 2mm; }
/* The legacy prints the units note right-aligned on the same line as the acceptance
   heading, as a separate control. */
.unit-line .unit-right { float: right; }
/* The UUC type's Observation Header, printed above the closing notes as the legacy
   report footer does. */
/* The UUC type's units note, now sitting between the Calibration Results bar and the table it
   describes (owner, 21 Aug 2026). Left-aligned against the sheet, matching the printed
   original's "All values of error in um." */
.observation-header { font-size: 8.5pt; margin: 0.8mm 0 1mm; text-align: left; }
/* Row-group label spanning the four Error-of-indication rows. */
.mpe-group { vertical-align: middle; text-align: center; }
/* UN-MOVED from print-shared.css (CR-185): screen and PDF disagree on this pair by
   design of their separate histories -- on SCREEN table.qtn-items (9pt, later in this
   file) beats this 8pt on combined grid+qtn tables; in the PDF the renderer's own
   copy sits AFTER its qtn-items rule and 8pt wins. Un-moved so each side keeps the
   order it always had; the before/after checks hold both sides pixel-stable. */
table.grid { width: 100%; border-collapse: collapse; font-size: 8pt; }
table.grid th, table.grid td {
    border: 0.5pt solid #000;
    padding: 0.55mm 0.35mm;
    text-align: center;
    vertical-align: middle;
}
table.grid th { font-weight: bold; }
/* Document numbering (owner, 22 Aug 2026). The example is the point of the screen, so it gets
   the weight: a mask is unreadable and the number it makes is not. */
.num-rules code { font-size: 0.9em; }
.num-rules td.num-example { font-weight: 650; }
/* table.grid is sized for PRINT (8pt); this table is a screen the lab reads
   (owner, 31 Aug 2026: "increase font size of the table content"). */
table.grid.num-rules { font-size: 0.9rem; }
table.grid.num-rules th, table.grid.num-rules td { padding: 0.35rem 0.6rem; }
tr.num-editing td { background: #eef4fb; }
.num-editor { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; margin-top: 0.5rem; }
.num-fields { flex: 1 1 30rem; min-width: 0; }
.num-mask { width: 100%; font-family: Consolas, "Courier New", monospace; }
.num-small { width: 6rem; }
.num-tokens { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.btn.num-token { padding: 0.1rem 0.45rem; font-family: Consolas, "Courier New", monospace; font-size: 0.82em; }
.num-preview {
    flex: 0 0 18rem; padding: 0.9rem 1rem; border: 1px solid var(--ic-border, #d5d9e0);
    border-radius: 4px; background: #f7f9fc;
}
.num-preview-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ic-muted, #5b6472); }
.num-preview-value { font-size: 1.25rem; font-weight: 700; margin: 0.35rem 0 0.5rem; word-break: break-all; }
/* Legibility warnings under the preview -- advice, not a validation failure, so amber. */
.num-warnings { margin: 0.5rem 0 0; padding-left: 1.1rem; color: #8a5a00; font-size: 0.82rem; }
/* Bulk row add above a template's seed grid. */
.seed-bulk-add { display: flex; align-items: center; gap: 0.6rem; margin: 0.4rem 0 0.5rem; flex-wrap: wrap; }
.seed-bulk-add label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; } /* CR-597 */
.seed-bulk-add input[type="number"] { width: 5rem; }

/* Certificate Template page's own title shell (.tpl-head / .tpl-pill / .tpl-sub) was retired
   1 Oct 2026 when the page moved to IcEntityHeader (CR-360). */

.tpl-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tpl-section-head h2 { font-size: 1.15rem; margin: 0; }

/* Three across, wrapping to one on a narrow screen. */
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem 1.25rem; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
/* CR-597: the house label (.lf-lbl) -- one size and case on every page (owner, 21 Oct 2026). */
.tpl-lbl { font-size: 0.8rem; font-weight: 500; color: #6b6b6b; }
/* Same required cue as .lf-lbl.req / .fg-label.req — the red asterisk went app-wide on
   21 Aug 2026, and these two fields were the last to still draw one. */
.tpl-lbl.req { color: var(--icpro-ink); }
.tpl-field input, .tpl-field select { min-height: 34px; }
.tpl-inline { display: flex; align-items: center; gap: 0.4rem; }
.tpl-inline .num { width: 8.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.tpl-inline .num.grow { flex: 1; width: auto; }
.tpl-to { color: #6b6b6b; font-size: 0.85rem; }

/* Availability: two states, one control. */
.tpl-toggle { display: inline-flex; border: 1px solid #ccd3da; border-radius: 6px; overflow: hidden; width: fit-content; }
.tpl-toggle button { border: 0; background: #fff; padding: 0.35rem 0.85rem; font-size: 0.85rem; cursor: pointer; min-height: 34px; }
.tpl-toggle button.on { background: var(--icpro-accent, #2f5b86); color: #fff; }
.tpl-toggle button:disabled { cursor: default; opacity: .7; }

/* Section tabs, each carrying its own row count. */
.tpl-grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0.9rem 0 0.4rem; flex-wrap: wrap; }
.tpl-grid-head h3 { display: inline; font-size: 1rem; margin: 0 0.5rem 0 0; }
.tpl-grid-actions { display: flex; align-items: center; gap: 0.4rem; }
.tpl-grid-actions .num-small { width: 4rem; text-align: right; }

/* ---------------------------------------------------------------------------
   .ic-entry -- the house ENTRY grid: a plain editable table.
   Owner, 23 Aug 2026, on seeing the redesigned template page: "The table design is
   also quite easy to operate for the user than Syncfusion grid."
   Use this where every cell is always editable and the row count is small -- seed
   rows, calibration observations. Use IcDataGrid for BROWSE lists, where filtering,
   sorting, paging and export earn their keep. CLAUDE.md 4 carries the rule.
   --------------------------------------------------------------------------- */
table.ic-entry { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
/* The invoice's cumulative grid: its <colgroup> widths hold, and the table scrolls sideways
   inside .scroll-x rather than squeezing every column (owner, 25 Sep 2026). */
table.ic-entry.inv-cum { table-layout: fixed; width: 113rem; min-width: 100%; }
/* Its Item Details twin: 20 columns, 176rem. Text cells wrap within their width. */
table.ic-entry.inv-items { table-layout: fixed; width: 176rem; min-width: 100%; }
table.ic-entry.inv-items td { overflow-wrap: anywhere; }
/* CR-542: the item row the Invoice History Price is for (the legacy subform's current record). */
table.ic-entry.inv-items tr.current td { background: var(--icpro-accent-soft); }
table.ic-entry.inv-price { width: auto; min-width: 40rem; }
/* The Proforma Invoice's item grid, the same way: 9 columns, 81.5rem. */
table.ic-entry.inv-proforma { table-layout: fixed; width: 81.5rem; min-width: 100%; }
table.ic-entry.inv-proforma td { overflow-wrap: anywhere; }

/* The invoice / proforma item grids scroll in their own box (owner, 25 Sep 2026): the headings stay
   at the top and the first two columns stay at the left, instead of the whole page scrolling and
   the sideways scrollbar sitting under the last row. */
.inv-grid-box { max-height: 62vh; overflow: auto; border: 1px solid var(--icpro-line); }
.inv-grid-box table.ic-entry thead th { position: sticky; top: 0; z-index: 2; }
.inv-grid-box table.ic-entry th:nth-child(-n+2),
.inv-grid-box table.ic-entry td:nth-child(-n+2) { position: sticky; z-index: 1; background: var(--icpro-surface); }
.inv-grid-box table.ic-entry thead th:nth-child(-n+2) { z-index: 3; background: var(--icpro-neutral-100); }
.inv-grid-box table.ic-entry th:nth-child(1), .inv-grid-box table.ic-entry td:nth-child(1) { left: 0; }
/* The second column starts where the first one's <col> width ends. */
.inv-grid-box table.inv-items th:nth-child(2), .inv-grid-box table.inv-items td:nth-child(2),
.inv-grid-box table.inv-proforma th:nth-child(2), .inv-grid-box table.inv-proforma td:nth-child(2) { left: 3.5rem; }
.inv-grid-box table.inv-cum th:nth-child(2), .inv-grid-box table.inv-cum td:nth-child(2) { left: 5.5rem; }
.inv-grid-box table.ic-entry td:nth-child(2) { box-shadow: 1px 0 0 var(--icpro-line); }

/* The house box for every ENTRY grid (CR-568, the review's §G; owner 19 Oct 2026: "the height of a
   grid must remain controlled by its container or configured maximum height. When more rows are
   present, the grid should scroll vertically instead of increasing the height of the entire page").
   The invoice box above, generalised: a bounded height, the heading rows pinned while the sheet
   scrolls, and the Sr./point column pinned while it scrolls sideways. Put it on the .scroll-x or
   .f12-fs wrapper of a sheet; a short sheet shows no scrollbar and nothing changes. */
.ic-grid-box { max-height: clamp(18rem, 60vh, 48rem); overflow: auto; border: 1px solid var(--icpro-line); }
/* The whole thead, not each th: a multi-row heading (Format 9 has three rows, Format 65 four) then
   pins as one block without a per-row offset. */
.ic-grid-box > table.ic-entry > thead,
.ic-grid-box table.ic-entry > thead { position: sticky; top: 0; z-index: 2; background: var(--icpro-neutral-100); }
.ic-grid-box table.ic-entry th.sr, .ic-grid-box table.ic-entry td.sr,
.ic-grid-box table.ic-entry th.c-sr, .ic-grid-box table.ic-entry td.c-sr { position: sticky; left: 0; z-index: 1; background: var(--icpro-surface); }
.ic-grid-box table.ic-entry > thead th.sr, .ic-grid-box table.ic-entry > thead th.c-sr { z-index: 3; background: var(--icpro-neutral-100); }
.ic-grid-box table.ic-entry.grid > thead th.sr { background: var(--icpro-canvas); }
.ic-grid-box table.ic-entry td.sr, .ic-grid-box table.ic-entry td.c-sr { box-shadow: 1px 0 0 var(--icpro-line); }
td.nowrap { white-space: nowrap; }
/* Header rows carry a light band (owner, 1 Sep 2026: "give some light background color to
   the headings row so that it will be easily identified") — every entry table, every format. */
table.ic-entry th { text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: .04em;
                    text-transform: uppercase; color: #6b6b6b; padding: 0.3rem 0.6rem;
                    background: var(--icpro-neutral-100);
                    border-bottom: 1px solid #e2e2e2; white-space: nowrap; }
/* CR-740: a row is its 26 px control and a hairline of air - 30 px, where it was 39. */
/* height on a cell is a floor, not a cap: a row of plain text (a read-only list) keeps 28 px and is not squeezed
   to its line of type. */
table.ic-entry td { padding: 0.0625rem 0.5rem; height: 1.75rem; border-bottom: 1px solid #f0f0f0; }
table.ic-entry th.sr, table.ic-entry td.sr { width: 5rem; color: #3a5f85; }
table.ic-entry th.del, table.ic-entry td.del { width: 2.5rem; text-align: right; }
table.ic-entry tr.blank td { color: #9a9a9a; }
/* A derived column is a value, not a box -- same grey as a read-only field, so the two
   read as the same thing whether the sheet draws them as cells or as inputs. */
table.ic-entry td.derived { background: var(--icpro-field-readonly-bg); color: var(--icpro-neutral-800);
                            text-align: right; font-variant-numeric: tabular-nums; }
table.ic-entry td.group { color: #3a5f85; }
/* A header cell spanning a pair of columns (Format 4NF's Top / Bottom). */
table.ic-entry th.ic-entry-span { text-align: center; border-bottom: 1px solid #e6e6e6; }

/* ---------------------------------------------------------------------------
   THE FIELD STANDARD -- one look for every box the operator types in.

   Owner, 25 Aug 2026. Before this there was no base rule for an input at all:
   every context invented its own (.lf-val > input, .ic-entry-cell, .tg-taper-footer
   > label > input, and the per-format grids), and .ic-entry-cell drew its border in
   TRANSPARENT -- so a cell only looked like a box once you hovered it.

     off white + visible border ... you may type here
     grey      + visible border ... a value; derived, migrated or locked

   Applied through .ic-field and to the table and form idioms by name rather than
   to a bare `input` selector: Syncfusion paints its own border on a wrapper and
   styles the inner input transparent, so a global rule would double the border on
   every dropdown and date picker in the application.
   --------------------------------------------------------------------------- */
.ic-field,
table.ic-entry input:not([type="checkbox"]):not([type="radio"]),
table.ic-entry select,
table.ic-entry textarea,
table.ic-acc input,
.lf-val > input, .lf-val > select, .lf-val > textarea,
.master-form-grid input:not([type="checkbox"]):not([type="radio"]),
.master-form-grid select,
.master-form-grid textarea {
    font: inherit;
    font-size: 0.85rem;
    color: var(--icpro-ink);
    background: var(--icpro-field-bg);
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    padding: 0.25rem 0.4rem;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ic-field:hover:not(:disabled):not([readonly]),
table.ic-entry input:hover:not(:disabled):not([readonly]),
table.ic-entry select:hover:not(:disabled),
table.ic-entry textarea:hover:not(:disabled):not([readonly]),
.lf-val > input:hover:not(:disabled):not([readonly]),
.lf-val > select:hover:not(:disabled),
.lf-val > textarea:hover:not(:disabled):not([readonly]),
.master-form-grid input:hover:not(:disabled):not([readonly]),
.master-form-grid select:hover:not(:disabled),
.master-form-grid textarea:hover:not(:disabled):not([readonly]) { border-color: var(--icpro-field-line-hover); }

.ic-field:focus,
table.ic-entry input:focus,
table.ic-entry select:focus,
table.ic-entry textarea:focus,
.lf-val > input:focus, .lf-val > select:focus, .lf-val > textarea:focus,
.master-form-grid input:focus, .master-form-grid select:focus, .master-form-grid textarea:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
    background: #fff;
}

/* A box you cannot type in reads as a value: grey, and the border stays so the
   column still lines up with the ones you can. */
/* The base rule above carries the :not() chain, which counts toward specificity, so these have
   to carry it too or an off-white entry box beats the grey of a locked one. That is exactly what
   happened on a migrated sheet: 66 read-only cells rendered as though they were typeable. */
.ic-field[readonly], .ic-field:disabled,
table.ic-entry input[readonly]:not([type="checkbox"]):not([type="radio"]),
table.ic-entry input:disabled:not([type="checkbox"]):not([type="radio"]),
table.ic-entry select:disabled, table.ic-entry textarea[readonly],
.lf-val > input[readonly], .lf-val > input:disabled,
.lf-val > select:disabled, .lf-val > textarea[readonly],
.master-form-grid input[readonly]:not([type="checkbox"]):not([type="radio"]),
.master-form-grid input:disabled:not([type="checkbox"]):not([type="radio"]),
.master-form-grid select:disabled, .master-form-grid textarea[readonly] {
    background: var(--icpro-field-readonly-bg);
    color: var(--icpro-neutral-800);
    cursor: default;
}

/* ---------------------------------------------------------------------------
   .ic-entry.grid -- the READING grid: an entry table with every cell ruled.

   A calibration datasheet is a ruled grid on paper and the operator reads across
   a row of ten columns, so the rules earn their place here where they would be
   noise on a seed list. Same table, one modifier.

   It replaces THREE copies of the same base -- `.f12-grid`, `.f4-grid` and
   `.f8-grid` -- which were written one per format as each was built, differed
   only in a padding and a font size, and lived in a <style> block on the page.
   Owner, 25 Aug 2026: "Design all result pages to at least it should look like
   it's a entry form." They now differ in nothing.
   --------------------------------------------------------------------------- */
/* Sized by its columns, never squeezed (CR-568): at least the box's width, and wider when the
   columns' own minimums add up to more -- then the box scrolls sideways. The old cap
   (max-width 1100px, and 900-1250px per format) did one of two wrong things: squeezed a
   19-column sheet into it, or stretched a three-digit observation to a 120px box. */
table.ic-entry.grid { width: auto; min-width: 100%; font-size: 0.85rem; }
table.ic-entry.grid th,
table.ic-entry.grid td { border: 1px solid var(--icpro-line-strong); padding: 0.0625rem 0.2rem; text-align: center; }
table.ic-entry.grid th { padding: 0.2rem 0.4rem; }
/* Normal case, unlike the plain entry table's headings. A reading grid's headings
   carry UNITS and symbols -- µm, Ø, ß -- and CSS uppercasing turns the micro sign
   into a Greek capital Mu, which is a different character and a wrong unit. The
   same trap the Eszett hit on the Impact sheet; there it needed an escape hatch,
   here it is simply never turned on. */
table.ic-entry.grid thead th { background: var(--icpro-canvas); font-weight: 600; color: var(--icpro-ink);
                               font-size: 0.8rem; letter-spacing: 0; text-transform: none; }
table.ic-entry.grid tbody th { background: var(--icpro-canvas); font-weight: 600; min-width: 2.5rem; }
/* The field standard supplies the box; a reading grid only says how wide and that
   numbers are centred under their heading. */
table.ic-entry.grid input { width: 100%; min-width: 5rem; text-align: center; }
/* Centred rather than right-aligned: in a ruled grid the derived column sits
   between two typed ones and should line up with them. */
table.ic-entry.grid td.derived { text-align: center; }
/* A value the operator typed OVER a derived one -- flagged, because the sheet
   no longer computes it. */
table.ic-entry.grid td.actual,
table.ic-entry.grid .actual { background: var(--icpro-warn-soft); }

/* Format 12's element sheet: a row per element, its position, and the direct
   reading beside it. Not shared -- this is that sheet's own shape. */
table.ic-entry.grid tr.side td { background: var(--icpro-sidebar); color: var(--icpro-sidebar-text);
                                 text-align: left; font-weight: 600; }
table.ic-entry.grid .el { font-weight: 600; }
table.ic-entry.grid .pos, table.ic-entry.grid .direct { color: var(--icpro-muted); }
table.ic-entry.grid .direct { text-align: right; font-style: italic; }

/* ---------------------------------------------------------------------------
   ONE COLUMN-TYPE VOCABULARY for every entry sheet (CR-584; review §G item 3).

   Promoted from the Format 51-65 sheets' own CSS, where each format carried the same ten classes with
   widths read off its legacy form (twips / 15). Here once, at the WIDEST value any of them used, so no
   reading box on any sheet is narrower than it was; the per-format rules that sized inputs by format
   (.f1 / .f2 input min-width, .f4 td.derived min-width) are retired and the sheets' columns carry a
   class instead. A sheet's extra, format-specific classes (.c-point, .c-scope, .c-force ...) stay in its
   own file: they name that format's columns, not a kind of column.

     c-sr    the serial / point number, centred (inputmode numeric)
     c-mark  a one-character flag column (* #), centred
     c-x     one observation of a repeated reading (X1..Xn, M1..Mn)
     c-read  a reading, or a figure derived from readings
     c-unit  a unit
     c-k     the coverage factor
     c-pct   a percentage
     c-temp  a temperature or other environment figure
     c-wide  a long figure (a weight, an angle in d/m/s)
     c-text  free text (a remark, a description), left-aligned

   An input in a classed cell fills the cell and takes its width from the class -- the Format 51-65
   pattern (input { width: 100%; min-width: 0 }). The rule is written on td:is(...) > input so it
   outranks the ruled grid's own input rule (table.ic-entry.grid input, min-width 5rem) without
   depending on source order; that rule stays as the fallback for the ruled grids outside the sheets
   (Format 5, 8, the profile projector, the quality and environment records).

   Alignment: c-sr and c-mark are centred here; a reading keeps its family's alignment -- centred in
   a ruled grid, right for a derived figure on the 51-65 sheets -- which this vocabulary does not move
   (a flipped alignment on a sheet a user has read for years is a change, not a promotion). */
table.ic-entry .c-sr   { min-width: 2.25rem; text-align: center; }
table.ic-entry .c-mark { min-width: 2rem; text-align: center; }
/* CR-722 (owner, 15 Nov 2026: "Hide *# column in all result grids"). The special-mark column of the entry grids,
   closed to nothing rather than removed: the cell stays in the row, so every title row's colspan still lands on
   the columns it was written for. The stored mark is untouched and still prints where a certificate prints it. */
table.ic-entry :is(th, td).c-starhash { width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important;
                                         border-left-width: 0 !important; border-right-width: 0 !important; font-size: 0 !important; overflow: hidden; }
table.ic-entry :is(th, td).c-starhash > * { display: none !important; }
table.ic-entry .c-x    { min-width: 4.5rem; }
table.ic-entry .c-read { min-width: 5.75rem; }
table.ic-entry .c-unit { min-width: 6rem; }
table.ic-entry .c-k    { min-width: 3rem; }
table.ic-entry .c-pct  { min-width: 3.5rem; }
table.ic-entry .c-temp { min-width: 6.75rem; }
table.ic-entry .c-wide { min-width: 8.5rem; }
table.ic-entry .c-text { min-width: 10rem; text-align: left; }
table.ic-entry td:is(.c-sr, .c-mark, .c-x, .c-read, .c-unit, .c-k, .c-pct, .c-temp, .c-wide, .c-text) > input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%; min-width: 0; box-sizing: border-box;
}
.ic-sheet-title { font-size: 0.95rem; margin: 1rem 0 0.35rem; color: var(--icpro-ink); }

/* ===========================================================================
   The calibration entry surface.

   The last of Calibration Observations' own <style> block, which was 126
   selectors when the owner said the result pages all look different from each
   other. It was written one format at a time, so the same idea arrived under a
   new name each time a format was built. Six of those ideas are folded here;
   the rest are genuinely one format's own shape and are simply relocated.

   Folded, with what they were:
     .ic-field-strip .. .f12-head, .mu-head, .f8-head, .f8-tol   (4 -> 1)
     .ic-chk-inline ... .f13-chk, .f8-chk                        (2 -> 1)
     .ic-cell-label ... .f5-side, .f9-foot-label, .f7-dir        (3 -> 1)
     .is-override ..... .f9-hyst, .f17-flat                      (2 -> 1)
     .scroll-x ........ .mu-scroll, .f4-scroll                   (2 -> 0, it existed)
     .cal-banner ...... .cal-banner, .mu-foot                    (2 -> 1)
     td.derived ....... .f4-derived, .f8-derived                 (2 -> 0, it existed)

   And five rules here were already duplicates: .side, .el, .derived, .actual
   and .ic-sheet-title moved into this file when the reading grids were folded,
   but the copies left behind survived because the rename happened first and the
   removal matched only the old .f12-* names.

   Three more were dead: .f7-fwd, .f7-rev and .f8-tol are in no markup.
   (.f7-fwd and .f7-rev came back 25 Sep 2026 for the Forward / Reverse colours.)
   =========================================================================== */

/* The instrument band. Dark, full width, used twice: the UUC strip under the
   page title and the uncertainty summary at the foot of that tab. */
.cal-banner {
    display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
    background: var(--icpro-sidebar); color: var(--icpro-sidebar-text);
    padding: 0.5rem 0.8rem; border-radius: 4px; margin: 0.4rem 0; font-size: 0.85rem;
}

/* A strip of labelled fields above a grid -- the constants a sheet is computed
   from. Four formats each wrote this out; they differed in one field width. */
.ic-field-strip { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin: 0.5rem 0; }
.ic-field-strip label { display: flex; flex-direction: column; font-size: 0.8rem; gap: 0.15rem; }
.ic-field-strip input, .ic-field-strip select { width: 12rem; }
.ic-field-strip.f12-head input, .ic-field-strip.f12-head select { width: 11rem; }
.ic-field-strip.f12-mode select { width: 14rem; }
/* The Type A observations: narrower, and numbers, so right-aligned. */
.ic-field-strip.mu-readings { gap: 0.6rem; margin: 0.4rem 0 0.8rem; }
.ic-field-strip.mu-readings input { width: 7rem; text-align: right; }

/* A checkbox that reads as one line with its caption, inside a field strip
   whose labels are otherwise stacked. */
.ic-chk-inline { flex-direction: row !important; align-items: center; gap: 0.4rem; }
.ic-chk-inline input { width: auto; }

/* A row-heading cell: canvas ground, bold. Go / NoGo, a totals row, a direction.
   Was .f5-side, .f9-foot-label and .f7-dir, all three the same three declarations.

   NOTE, and it is a question for Vikas rather than something to change quietly:
   all three also carried `text-align: left`, and it has NEVER applied. The grid's
   own `table.ic-entry.grid td { text-align: center }` outranks a single class,
   and its predecessor `.f12-grid th, .f12-grid td` did too, back to the day
   Format 12 was built. So these headings have always rendered centred. The dead
   declaration is dropped rather than forced, so the rule says what happens; if
   the legacy's left-aligned block headings are what he wants, it is one
   specificity bump away. */
.ic-cell-label { background: var(--icpro-canvas); font-weight: 600; white-space: nowrap; }
.ic-cell-label.f7-dir { min-width: 5.5rem; }
/* Forward and Reverse told apart as the legacy's ForwardReverse box does it: light blue for
   Forward, light pink for Reverse (conditional formatting on TmpTCalibrationDetails subform
   FormatNo7; owner, 25 Sep 2026). */
.ic-cell-label.f7-fwd { background: #D1EAF0; color: #1b2a33; }
.ic-cell-label.f7-rev { background: #EFD3D2; color: #3a1f1e; }
/* The template's plunger-dial entry sequence: one tick box per turn and division (CR-335). */
.ic-entry.f7-seq { width: auto; }
.ic-entry.f7-seq td.chk { text-align: center; }
.ic-entry.f7-seq th { white-space: nowrap; }

/* A figure the sheet flags: a hysteresis total, a flatness result, a reading
   typed over a derived one. The same amber the entry tables use for an override.

   Scoped past td.derived deliberately. The flagged cells carry BOTH classes, and
   as .f9-hyst / .f12-derived the two rules tied on specificity, so source order
   settled it and the amber won. Folding the reading grids turned the derived one
   into `table.ic-entry td.derived`, which outranks a bare class -- and Format 9's
   hysteresis total and Format 17's flatness result quietly went grey. Nobody
   reported it; it turned up on the rendered page while checking this move. */
.is-override,
table.ic-entry td.derived.is-override { background: var(--icpro-warn-soft); }

/* ---- Format 12: the thread sheet's own controls -------------------------- */
/* The fieldset each Format 12 block sits in. overflow-x because the element
   sheet is wider than a narrow window and nothing else was clipping it -- the
   PAGE scrolled sideways instead, which the standard rules out. Pre-dates the
   move; found while checking that the move had not broken anything. */
.f12-fs { border: 0; padding: 0; margin: 0; min-width: 0; overflow-x: auto; }
.f12-footer { margin-top: 0.5rem; }

/* ---- Format 2: the generate strip and the parallelism block --------------- */
.f2-generate { align-items: flex-end; border: 1px solid var(--icpro-line-strong); padding: 0.5rem 0.6rem; border-radius: 3px; }
.f2-generate select { width: 18rem; }
.f2-banner { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
             color: var(--icpro-neutral-700); margin: 0.5rem 0 0.25rem; }
.f2-parallelism { margin-top: 0.9rem; max-width: 34rem; }
.f2-parallelism-head { background: var(--icpro-danger-soft); border: 1px solid var(--icpro-line-strong); border-bottom: 0;
                       padding: 0.3rem 0.5rem; font-size: 0.85rem; font-weight: 600; }
.f2-parallelism-row { display: flex; gap: 0.4rem; align-items: center; border: 1px solid var(--icpro-line-strong);
                      padding: 0.4rem 0.5rem; }
.f2-parallelism-row input { width: 6rem; text-align: right; }
.f2-parallelism-result { display: inline-block; width: 6rem; text-align: right; padding: 0.2rem 0.3rem; }

/* ---- Format 1: the blade figures under the quadrant grid ------------------ */
.f1-blade { display: flex; gap: 1.2rem; margin-top: 0.7rem; flex-wrap: wrap; font-size: 0.85rem; }
.f1-blade label { display: flex; align-items: center; gap: 0.4rem; }
.f1-blade input { width: 8rem; }
.f1-blade .f1-unit { width: 4rem; }

/* ---- Format 7: turns down the rows, divisions across --------------------- */
.f7-turn { white-space: nowrap; }
.f7-summary { display: flex; align-items: flex-start; gap: 1.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.f7-hyst-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; white-space: nowrap; } /* CR-597 */
/* Repeatability: a measured figure and its unit, shown only for the UUC types
   whose master ticks it -- the legacy's own pair of controls on TCalibration. */
.f7-repeat { width: 6rem; }
.f7-repeat-unit { width: 3.5rem; }

/* ---- Format 17: the flatness strip under the matrix ---------------------- */
.f17-summary { display: flex; align-items: center; gap: 1.2rem; margin-top: 0.7rem; flex-wrap: wrap; font-size: 0.85rem; }
.f17-summary label { display: flex; align-items: center; gap: 0.4rem; }
.f17-summary input { width: 5rem; }
/* A derived value shown OUTSIDE a table, so it cannot use td.derived. Same
   ground, boxed, so it reads as computed rather than typed. */
.f17-out { display: inline-block; min-width: 4rem; padding: 0.15rem 0.4rem; border: 1px solid var(--icpro-line-strong);
           background: var(--icpro-canvas); font-variant-numeric: tabular-nums; text-align: center; }
.row-wrap { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---- Format 9 ------------------------------------------------------------ */
.f9-summary { display: flex; align-items: flex-start; gap: 1rem; margin-top: 0.6rem; }

/* ---- Formats 4 and 8: how wide a derived reading has to be to be readable -- */
/* Format 4's derived columns carry .c-read since CR-584; Format 8 is not among the CR-568 sheets and keeps its rule. */
table.ic-entry.grid.f8 td.derived { min-width: 6rem; }

/* ---- Format 8: the aperture block ---------------------------------------- */
.f8-block { border: 1px solid var(--icpro-line-strong); border-radius: 4px; padding: 0.5rem 0.8rem 0.8rem; margin: 0.6rem 0; min-width: 0; }
.f8-block legend { font-weight: 600; padding: 0 0.4rem; }
.f8-sub { font-size: 0.85rem; margin: 0.7rem 0 0.3rem; color: var(--icpro-muted); }

/* ---- The uncertainty tab (legacy pgTypeA) -------------------------------- */
.mu-grid { border-collapse: collapse; font-size: 0.85rem; margin-bottom: 0.6rem; }
.mu-grid th, .mu-grid td { border: 1px solid var(--icpro-line-strong); padding: 0.25rem 0.6rem; text-align: right; min-width: 7rem; }
.mu-grid thead th, .mu-grid tbody th { background: var(--icpro-canvas); font-weight: 600; text-align: center; }
.mu-grid tbody th { text-align: left; min-width: 4rem; }
.mu-cmc { vertical-align: middle; font-weight: 600; }
.mu-typeb { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.mu-typeb th, .mu-typeb td { border: 1px solid var(--icpro-line-strong); padding: 0.2rem 0.4rem; text-align: right; white-space: nowrap; }
.mu-typeb thead th { background: var(--icpro-canvas); font-weight: 600; text-align: center; white-space: normal; }
.mu-typeb .mu-left { text-align: left; white-space: normal; min-width: 16rem; }
.lf-warn { color: var(--icpro-error-border); font-size: 0.85rem; margin: 0.2rem 0; }

/* ---- The Images tab (legacy PgImages) ------------------------------------ */
.img-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; max-width: 48rem; margin: 0.5rem 0; }
.img-label { font-size: 0.8rem; color: var(--icpro-muted); }
.img-name { font-weight: 600; font-variant-numeric: tabular-nums; }
.img-choose { position: relative; overflow: hidden; display: inline-block; cursor: pointer; }
.img-choose input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cal-image { display: block; max-width: 100%; width: 32rem; border: 1px solid var(--icpro-line-strong); border-radius: 4px; margin: 0.5rem 0; }
table.ic-entry.grid.sheet { margin-bottom: 0.35rem; }
table.ic-entry.grid.sheet th { font-size: 0.78rem; line-height: 1.2; }
table.ic-entry.grid.sheet .el { text-align: left; white-space: nowrap; }
table.ic-entry.grid.sheet .pos { width: 2rem; font-weight: 600; }
/* CR-351: "Specified Limit Min / Max" -- two 4-place figures on one line (owner, 27 Sep 2026). */
table.ic-entry .spec-limit { min-width: 11.5rem; white-space: nowrap; }

/* Per-format sizing. The only thing that ever really differed between the seven
   sheets: how wide a reading needs to be to be readable -- and since CR-584 that comes from the
   column's class (.c-read, .c-x, .c-wide ...), not from a rule per format. Format 1's and Format 2's
   input widths lived here until then; Format 1's select keeps its own. */
table.ic-entry.grid.f1 select { min-width: 8rem; }
table.ic-entry.grid.f4 { font-size: 0.8rem; }
table.ic-entry.grid.f4 th, table.ic-entry.grid.f4 td { padding: 0.2rem 0.3rem; white-space: nowrap; }
table.ic-entry.grid.f4 thead th { white-space: normal; }
table.ic-entry.grid.f4 input { width: 5.5rem; min-width: 0; text-align: right; }
/* Owner, 11 Nov 2026: Format 4 has eighteen figure columns, and at the house c-read width (5.75rem) the
   sheet was 1,693px in a 1,044px entry area, so the Internal and Depth blocks were off the screen. Here,
   and only here, a column may shrink to 3.1rem so all three blocks show at 1366 x 768 with the menu open;
   the table is still width 100%, so on a wider screen the columns are as wide as before. The box inside
   gives up its side padding and a little type size (0.85rem to 0.8rem) to keep a 1000.00 reading whole. */
table.ic-entry.grid.f4 th, table.ic-entry.grid.f4 td { padding-left: 0.15rem; padding-right: 0.15rem; }
table.ic-entry.grid.f4 .c-read { min-width: 3.1rem; }
table.ic-entry.grid.f4 td.c-read > input:not([type="checkbox"]):not([type="radio"]) { padding-left: 0.15rem; padding-right: 0.15rem; font-size: 0.8rem; }

/* The other sheets that were wider than the screen (owner, 11 Nov 2026) -- the same exception as Format 4
   above, for the same reason, each measured at 1366 x 768 with the menu open (a 1,030px entry area):
     Format 18   1,470px  seventeen columns; the results (Repeatability ... Error) were off the screen
     Format 5    1,128px  one heading kept on a single line made its column 184px
     Format 12   1,166px  per gauge table
     Format 8    1,784px  the wire-diameter table (fifteen columns) only; the aperture table is untouched
     31-35       up to 2,523px (Format 34): a heading on one line set its column's width
   In each, a heading may wrap, a column may be narrower than the house width, and the cell padding is
   smaller; every table is still as wide as its box, so on a wider screen the columns open out again.
   Nothing is hidden, moved or renamed. */
table.ic-entry.grid.f18 { font-size: 0.8rem; }
table.ic-entry.grid.f18 th, table.ic-entry.grid.f18 td { padding-left: 0.15rem; padding-right: 0.15rem; }
table.ic-entry.grid.f18 thead th { white-space: normal; }
table.ic-entry.grid.f18 .c-read { min-width: 3.6rem; }
table.ic-entry.grid.f18 td.c-read > input:not([type="checkbox"]):not([type="radio"]) { padding-left: 0.15rem; padding-right: 0.15rem; font-size: 0.8rem; }
table.ic-entry.grid.f5 thead th { white-space: normal; }
.f12-fs.ic-grid-box table.ic-entry.grid.sheet th, .f12-fs.ic-grid-box table.ic-entry.grid.sheet td { padding-left: 0.2rem; padding-right: 0.2rem; }
.f12-fs.ic-grid-box table.ic-entry.grid.sheet thead th { white-space: normal; }
.f12-fs.ic-grid-box table.ic-entry.grid.sheet .c-read { min-width: 4.6rem; }
/* Format 8: both summary tables give up cell padding (the aperture table was 15px over its box); the
   table whose last heading row has seven or more cells is the wire-diameter one, and only its boxes narrow. */
table.ic-entry.grid.f8.f8-summary th, table.ic-entry.grid.f8.f8-summary td { padding-left: 0.15rem; padding-right: 0.15rem; }
.f8-summary:has(thead tr:last-child th:nth-child(7)) th { white-space: normal; }
table.ic-entry.grid.f8.f8-summary:has(thead tr:last-child th:nth-child(7)) input { width: 3.3rem; padding-left: 0.2rem; padding-right: 0.2rem; }
.f8-summary:has(thead tr:last-child th:nth-child(7)) select { min-width: 7.5rem; }
/* The designer formats' sheet (ConfigurableGrid). */
table.ic-entry.cfg-sheet thead th { white-space: normal; }
table.ic-entry.cfg-sheet th, table.ic-entry.cfg-sheet td { padding-left: 0.15rem; padding-right: 0.15rem; }
table.ic-entry.cfg-sheet .c-read { min-width: 3.25rem; }
table.ic-entry.grid.f5 input { min-width: 4.5rem; }
table.ic-entry.grid.f7 input { min-width: 3.2rem; }
table.ic-entry.grid.f7 td, table.ic-entry.grid.f7 th { min-width: 3.2rem; }
table.ic-entry.grid.f8 input { width: 6rem; min-width: 0; text-align: right; }
table.ic-entry.grid.f8 th, table.ic-entry.grid.f8 td { padding: 0.2rem 0.4rem; }
table.ic-entry.grid.f9 input { min-width: 5.5rem; }
table.ic-entry.grid.f17 input { min-width: 3.5rem; }
table.ic-entry.grid.f17 td, table.ic-entry.grid.f17 th { min-width: 3.5rem; }
table.ic-entry.grid.f18 input { min-width: 4rem; }
/* CR-671: the row's "= Nom" / "Copy" quick-entry buttons, kept on one line and out of the way. */
table.ic-entry th.quick, table.ic-entry td.quick { width: 1%; white-space: nowrap; padding-left: .15rem; padding-right: .15rem; }
table.ic-entry tr.awaiting > td { background: var(--icpro-held-soft); }
table.ic-entry tr.calc-failed > td { background: var(--icpro-danger-soft); }   /* CR-718: a row whose calculation failed */
table.ic-entry td.quick .btn.sm { padding-left: 0.3rem; padding-right: 0.3rem; }

/* Format 18's settings strip: the sequence, the reading source and the uncertainty budget the
   whole sheet is computed from. A fieldset so `disabled` on a migrated sheet reaches every
   control in one place. */
.f18-settings {
    display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: flex-end;
    border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius-sm);
    background: var(--icpro-canvas); padding: 0.7rem 0.85rem; margin: 0 0 0.6rem;
}
.f18-settings label { display: flex; flex-direction: column; gap: 0.2rem;
                      font-size: 0.72rem; font-weight: 600; letter-spacing: .03em;
                      text-transform: uppercase; color: var(--icpro-muted); }
.f18-settings input.num { width: 6rem; text-align: right; }
.f18-settings select { min-width: 9rem; }
.f18-settings .f18-scope { flex: 1 1 22rem; }
.f18-settings .f18-scope select { width: 100%; }
/* CR-744: the same set-up folded to one line of its values once the sheet holds readings. The captions wear the
   label style of the boxes they stand for. */
.f18-settings-line {
    display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; align-items: baseline;
    border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius-sm);
    background: var(--icpro-canvas); padding: 0.3rem 0.85rem; margin: 0 0 0.4rem; font-size: 0.82rem;
}
.f18-settings-line b { font-size: 0.7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
                       color: var(--icpro-muted); margin-right: 0.3rem; }

/* The little accuracy summaries that sit beside Formats 7 and 9's grids. Not a
   reading grid -- a label/value list that happens to be a table. */
table.ic-acc { border-collapse: collapse; font-size: 0.85rem; }
table.ic-acc th { text-align: left; font-weight: 400; padding: 0.15rem 0.5rem 0.15rem 0; white-space: nowrap; }
table.ic-acc td { padding: 0.15rem 0.25rem; }
table.ic-acc thead th { font-weight: 600; text-align: center; }

/* An item an outside agency calibrated: the lab enters no readings for it (CR-157), so it is
   marked in the list rather than left to be discovered by opening it. */
.ic-chip-ext {
    display: inline-block; padding: 0.05rem 0.4rem; border-radius: 3px;
    background: var(--icpro-warn-soft); color: var(--icpro-warn);
    border: 1px solid var(--icpro-warn-soft); font-size: 0.78rem; font-weight: 600;
}
table.ic-acc td.derived { min-width: 4.5rem; text-align: center; border: 1px solid var(--icpro-line-strong);
                          background: var(--icpro-canvas); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------
   The Impact Testing Machine composite: two tabs on one sheet, and the machine
   constants that sit above the energy grid. The legacy highlights the constants
   in green and amber, which is a real operator cue -- those are the numbers the
   whole table is computed from.
   --------------------------------------------------------------------------- */
.itm-constants { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
                 padding: 0.5rem 0.75rem; margin-bottom: 0.5rem;
                 background: #f6f8fa; border: 1px solid #e6ecf2; border-radius: 4px; }
.itm-constants label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; } /* CR-597 */
.itm-constants input { width: 5rem; }
.itm-constants .hl-green { background: #d8f0d8; padding: 0.1rem 0.35rem; border-radius: 3px; font-weight: 600; }
.itm-constants .hl-amber { background: #ffe9a8; padding: 0.1rem 0.35rem; border-radius: 3px; font-weight: 600; }

/* CSS uppercasing turns the Eszett into "SS" -- a real German rule that is wrong for a
   symbol. The beta in "Angle of Rise B" is a measurement symbol, not a letter, so it is
   exempted from the header transform rather than the header losing its capitals. */
table.ic-entry th .no-caps { text-transform: none; }
/* The Impact sheets print their working formulas above the table and the acceptance rule
   beneath it. Both are part of the statement, so they are set as text, not as chrome. */
.itm-formula, .ds-formula { margin: 0.15rem 0; font-size: 8.5pt; }
.ds-note { margin: 0.35rem 0 0; font-size: 8pt; }
.grid.results th .u { display: block; font-weight: 400; font-size: 0.85em; }
.grid.results td.c { text-align: center; }
/* td.num joins td.r: every accounts / monitoring report page marks its figures "num", and
   the class was inert on this table family, so numbers printed centred (ui-conformance,
   4 Sep 2026). One rule corrects the whole family. */
.grid.results td.r, .grid.results td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid.results th .no-caps { text-transform: none; }
.grid.results th.deg-strip { font-weight: 400; font-size: 0.85em; text-transform: none; }

/* The acceptance rule, printed verbatim beneath the energy table. */
.itm-note { margin: 0.4rem 0 0; font-size: 0.78rem; color: #555; font-style: italic; }

/* Two boxes under one heading — a value and the unit that scales it, as Format 54/55's
   "Accuracy (+/-)" needs. The unit stays narrow so the value keeps the eye. */
table.ic-entry td.pair { display: flex; gap: 0.25rem; align-items: center; }
table.ic-entry td.pair > input { min-width: 0; }
table.ic-entry td.pair > input.unit { flex: 0 0 4.5rem; }

/* Pass / Fail reads at a glance — the operator is scanning a column of verdicts. */
table.ic-entry td.pass { color: #1c6b3f; font-weight: 600; }
table.ic-entry td.fail { color: #b3261e; font-weight: 700; }

/* The parameter row heads its own block of observations. */
table.ic-entry tr.parameter-row > td { border-top: 1px solid #dfe6ee; }
table.ic-entry tr.parameter-row > td.num { color: #3a5f85; font-weight: 600; }

/* The calibration's remark under the results.
   Certificate: lblRemark -- Left 60, Width 10620, FontSize 9, FontWeight 700, TextAlign 1.
   Record sheet: Text297 -- same place, FontSize 9, no FontWeight. */
.cert-remark { margin: 0.35rem 0 0; font-size: 9pt; font-weight: 700; text-align: left; }

/* A results heading with its units note pushed to the right edge, as the 4NF subreports draw
   it (caption at Left 120, note at Left 6180 with TextAlign 3). */
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.results-head .section { margin: 0; }
.results-unit { font-size: 9pt; font-weight: 700; white-space: nowrap; }
table.ic-entry .num { text-align: right; font-variant-numeric: tabular-nums; }
.ic-entry-ord { margin-left: 0.4rem; font-size: 0.68rem; color: #9a9a9a; text-transform: none; letter-spacing: 0; }
/* It drew its border in TRANSPARENT until 25 Aug 2026, so a cell did not look like a box
   until the mouse was over it. It now takes the field standard above and only sets what is
   particular to a cell: full width, and a height that keeps rows even. */
.ic-entry-cell { width: 100%; padding: 0.15rem 0.35rem; min-height: 26px; }
/* A single-column seed table gave its one input the full page — "2.5" in a 1,500px box.
   Capped at a readable measure so the column of readings aligns and scans (round-2 review
   finding 11, CR-202). */
table.ic-entry.one-col .ic-entry-cell { max-width: 320px; }
/* An accent dot, per the 31 Aug handoff — a blank seed row is deliberate and visible. */
.ic-entry-blank { display: inline-block; width: 6px; height: 6px; background: var(--icpro-accent); border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; }

/* A parent row in a grouped entry table (Format 4NF's shift-error groups). It carries the
   group's name across the row, with its steps indented beneath. */
table.ic-entry tr.ic-entry-group td { background: #eef2f7; border-top: 1px solid #d6dfe9; }
table.ic-entry tr.ic-entry-group .ic-entry-cell { font-weight: 600; color: #274a6d; }
table.ic-entry tr.ic-entry-group + tr td { border-top: none; }

.tpl-grid-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
                 padding: 0.5rem 0.2rem; border-top: 1px solid #e2e2e2; }
.tpl-note { margin-top: 1.25rem; font-size: 0.8rem; color: #6b6b6b; }
.tpl-note .req-star { color: #b4483f; }
/* Format 8's summary tables follow the legacy form: the nominal value at the left, the
   direction's figures across. They are wider than the tab, so they scroll on their own. */
.f8-summary { width: auto; }
.f8-summary th, .f8-summary td { white-space: nowrap; }
.f8-summary input { width: 6.5rem; }
.f8-summary select { min-width: 9rem; }
.f8-block { overflow-x: auto; }
.num-warnings li { margin-bottom: 0.25rem; }

/* Accreditation register (migration 106). Screen only. The QR preview sits beside the fields
   because "which QR" is a picture question -- a lab with two similar QR images cannot tell them
   apart from a dropdown name. */
.accred-current { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.accred-fields { flex: 1 1 26rem; min-width: 0; }
.accred-qr { flex: 0 0 12rem; }
.accred-qr img { width: 100%; max-width: 12rem; height: auto; border: 1px solid var(--ic-border, #d5d9e0); }
/* The period in force, distinguished from the closed ones it sits above. */
tr.accred-in-force td { font-weight: 600; background: #eef4fb; }

/* Branding image library (CR-070). Screen only -- none of this reaches a certificate. */
.brand-upload { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.brand-upload label { display: flex; flex-direction: column; gap: 0.25rem; }
/* The panel's text and date boxes wear the house field chrome (DESIGN-UI-Standard 2.8) -- they
   rendered as bare browser controls inside a styled card (ui-conformance, 4 Sep 2026). */
.brand-upload input:not([type=file]) {
    min-height: 34px;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    background: var(--icpro-field-bg);
    font: inherit;
}
.brand-upload input:not([type=file]):hover:not(:disabled) { border-color: var(--icpro-field-line-hover); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
/* Image first, then Delete, then the description (owner, 21 Aug 2026) -- a column, not a row,
   so the artwork gets the card's full width instead of a 96px thumbnail beside the text. */
.brand-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--icpro-line);
    border-radius: 6px;
    padding: 0.75rem;
}
/* Fixed height with contain, so a wide letterhead and a square stamp both stay readable
   without one of them dictating the card height. */
.brand-thumb {
    width: 100%;
    height: 110px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f8fa;
    border: 1px solid var(--icpro-line);
    overflow: hidden;
}
.brand-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-actions { display: flex; justify-content: flex-end; }
/* Smaller type than the rest of the page: the description is reference, not the subject. */
.brand-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.3;
    color: var(--icpro-neutral-700);
}
.brand-meta b { font-size: 0.82rem; color: var(--icpro-ink); }
.brand-meta > span { overflow-wrap: anywhere; }

/* The assignment matrix on Page Setup: a picker under each show/hide checkbox. */
.page-setup-matrix .ps-pick {
    width: 100%;
    margin-top: 0.25rem;
    min-height: 30px;
    padding: 0.2rem 0.35rem;
    font: inherit;
    font-size: 0.8rem;
    color: var(--icpro-ink);
    background: var(--icpro-field-bg);
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
}
/* The Default Settings prose blocks (certificate notes, the four SRF texts) -- the design's
   .prose: body font, not the browser's monospace textarea default. */
.ds-prose {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--icpro-ink);
    background: var(--icpro-field-bg);
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    padding: 0.55rem 0.7rem;
    resize: vertical;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.ds-prose:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.15);
}
.ds-prose:disabled { background: var(--icpro-panel, #f1f5f9); color: var(--icpro-muted, #64748b); }
/* A full-width footnote row inside the matrix -- left-aligned and quiet, so it reads as a note
   about the row above rather than as another setting. */
.page-setup-matrix td.ps-note { text-align: left; font-size: 0.82em; color: var(--ic-muted, #5b6472); }
.page-setup-matrix td.ps-cell { vertical-align: top; }


/* Format 17 (Surface Plate) -- flatness grid corner labels (B/C top, A/D bottom) */
.sp-corner-row { display: flex; justify-content: space-between; font-weight: bold; font-size: 9pt; padding: 0 0.5mm; }
.wide-table { width: 100%; overflow-x: auto; }
.wide-table table.grid.results td { font-size: 7.5pt; padding: 0.4mm 0.3mm; }

@media print {
    .no-print, .app-header, .ic-sidebar, .ic-appbar, .ic-ribbon, #blazor-error-ui { display: none !important; }
    body { background: #fff; }
    .app-main, .ic-content { max-width: none; padding: 0; }
    .ic-shell-main { min-height: 0; }
    .certificate-sheet { padding: 2mm 3mm 1.5mm; }

    /* Repeats the letterhead + Certificate No./ULR No. on every printed page -- see
       LetterheadBlock.razor. Fixed positioning is removed from normal flow, so
       .certificate-sheet gets compensating top margin (28mm image + 1.5mm original gap)
       to keep page 1 visually identical to before. */
    .letterhead {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 194mm;
        margin: 0;
        background: #fff;
        z-index: 10;
    }
    /* The letterhead is drawn as a fixed band, so the sheet has to reserve its depth. That
       depth is now the lab's own (--cert-lh-mm, from mCompany.CCLetterheadHeight) plus the
       1.5mm gap; the fallback is the 28mm this rule used to hard-code. */
    .certificate-sheet { margin-top: calc(var(--cert-lh-mm, 28mm) + 1.5mm); }

    /* The blank reserve is a SCREEN device. In print the sheet's 29.5mm top margin already
       holds the space open for the fixed letterhead, so leaving the reserve in flow would
       push everything down by a second 28mm. Only reachable since CR-071 made the letterhead
       hideable -- before that there was always an image and this never rendered. */
    .stationery-reserve { display: none; }

    /* In print the footer stays where it is in flow -- inside the sheet, under the signatures.
       It used to be lifted out to a fixed band at the page foot, which is what printed it
       outside the border. The PDF renderer still draws its own repeating copy for multi-page
       output (RepeatingBands), and hides this one while it does. */
    .letter-footer { break-inside: avoid; page-break-inside: avoid; }
}

/* =============================================================================
   Master form layout (InstaCalPro gauge-master / form-grid patterns, ICPro tokens)
   ============================================================================= */

.master-form-card {
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.master-form-card > .master-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--icpro-surface);
    color: var(--icpro-ink);
    border-bottom: 1px solid var(--icpro-line);
}

.master-form-card > .master-form-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 650;
    color: var(--icpro-ink);
}

.master-form-card > .master-form-header .muted {
    color: var(--icpro-muted);
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
}





.master-form-body {
    padding: 1rem 1.15rem 1.25rem;
}

/* Default: two columns of field pairs (preferred). Flat label/control markup falls back below. */
.master-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1.25rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

/* Flat label|control|label|control layout (no .master-form-field children). */
.master-form-grid:not(:has(.master-form-field)) {
    grid-template-columns: 9.5rem minmax(0, 1fr) 9.5rem minmax(0, 1fr);
    gap: 0.4rem 0.65rem;
    align-items: center;
}

/*
 * Full-width pair: use only when the label is the first cell of a new row.
 * Do NOT put fg-span-2 on the second field of a two-field row — that orphans the label.
 */
.master-form-grid:not(:has(.master-form-field)) > .fg-span-2,
.master-form-grid:not(:has(.master-form-field)) > input.fg-span-2,
.master-form-grid:not(:has(.master-form-field)) > select.fg-span-2,
.master-form-grid:not(:has(.master-form-field)) > textarea.fg-span-2 {
    grid-column: 2 / -1;
}

/* Explicit full-width label+control row (preferred over bare fg-span-2). */
.master-form-grid > .fg-row-full {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.4rem 0.65rem;
    align-items: center;
}

/* An empty label+control pair, so the next pair starts a new row (CR-618, Customer master). */
.master-form-grid > .fg-pair-blank {
    grid-column: span 2;
}

/* Compact multi-pair row (e.g. Range / To / Unit). */
.master-form-grid > .fg-inline-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(4rem, 1fr) auto minmax(4rem, 1fr) auto minmax(4rem, 1fr);
    gap: 0.35rem 0.5rem;
    align-items: center;
}

.master-form-grid > .fg-inline-row.pairs-2 {
    grid-template-columns: auto minmax(4rem, 1fr) auto minmax(4rem, 1fr);
}

.master-form-grid > .fg-inline-row > .fg-label {
    white-space: nowrap;
}

.master-form-grid > datalist {
    display: none;
}

.master-form-field {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.3rem 0.55rem;
    align-items: center;
}

.master-form-field.wide {
    grid-column: 1 / -1;
}

/* A checkbox field: the box at the start of its control cell, not centred in it (CR-619). */
.master-form-field > input[type="checkbox"] { justify-self: start; }

.master-form-field.wide .fg-control,
.master-form-field.wide input,
.master-form-field.wide select,
.master-form-field.wide textarea {
    grid-column: 2 / -1;
}

/* Required marking, unified with the .lf-lbl idiom (review 2026-08-29 §5.3): a plain label
   is muted, a required one is ink and bolder. The old .req rule set the identical colour
   .fg-label already had, so 27 required fields on the master forms showed NOTHING before a
   refused save. No asterisk — the owner removed the red star app-wide (21 Aug 2026). */
.master-form-grid .fg-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--icpro-muted);
    margin: 0;
}

.master-form-grid .fg-label.req {
    font-weight: 650;
    color: var(--icpro-ink);
}

/* A tick-box with its caption, wherever it sits. The grid-scoped rule below adds only the
   full-width span; outside a master-form grid (the Customer master's Portal access section,
   the certificate-template panel) the box and caption still line up and take the accent. */
.fg-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem; /* CR-597: the house label size */
}

.fg-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--icpro-accent);
}

.fg-check label {
    margin: 0;
    font-weight: 500;
    color: var(--icpro-ink);
    white-space: normal;
    width: auto;
}

.master-form-grid .fg-check,
.master-form-grid .fg-span-full {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    grid-column: 1 / -1;
    padding: 0.2rem 0;
    width: auto;
    max-width: 100%;
}

.master-form-grid .fg-check label,
.master-form-grid .fg-span-full label {
    margin: 0;
    font-size: 0.8rem; /* CR-597: the house label size, not the field's 0.85 rem */
    font-weight: 500;
    color: var(--icpro-ink);
    white-space: normal;
    width: auto;
    flex: 0 1 auto;
}

/* CR-602 (owner, 21 Oct 2026: "Other check boxes also align with controls"): a tick row on a master form lays out
   as every other row does -- its caption in the label column, the box at the start of the control column -- instead
   of box-then-caption from the left edge. The markup (box, then its <label for>) is unchanged. */
.master-form-grid > .fg-check {
    display: grid;
    grid-template-columns: subgrid;
    column-gap: inherit;
}
.master-form-grid > .fg-check > label {
    grid-column: 1; grid-row: 1;
    color: var(--icpro-muted);
}
.master-form-grid > .fg-check > input[type="checkbox"] { grid-column: 2; grid-row: 1; justify-self: start; }

/* Colour, border and the read-only grey come from the field standard; this rule keeps only
   what is particular to a master form's two-column grid. */
.master-form-grid input:not([type="checkbox"]):not([type="radio"]),
.master-form-grid select,
.master-form-grid textarea {
    padding: 0.35rem 0.5rem;
    border-radius: var(--icpro-radius-sm);
    font-size: 0.875rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.master-form-grid input[type="checkbox"],
.master-form-grid input[type="radio"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--icpro-accent);
}

/* Focus and the read-only state come from the field standard too. `opacity` used to fade the
   whole control, which dims the VALUE the operator is trying to read; the standard greys the
   ground and leaves the text alone. */

/* =============================================================================
   Design-handoff shared patterns (CR-200, 31 Aug 2026)
   Structure and behaviour from design_handoff_icpro_masters; skin is ICPro's own
   tokens — the handoff's square-cornered Industry system is deliberately NOT copied.
   ============================================================================= */

/* A small outline status tag beside a page title ("Catalogue row · view only"). */
.rd-tag {
    display: inline-block; font-size: 0.72rem; font-weight: 550; white-space: nowrap;
    padding: 0.1rem 0.55rem; border: 1px solid var(--icpro-line-strong);
    border-radius: 999px; color: var(--icpro-muted);
}

/* Identity strip: fixed identity as label-over-value cells, not greyed inputs. */
.rd-ident {
    display: flex; align-items: stretch; flex-wrap: wrap;
    border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm);
    background: var(--icpro-surface); overflow: hidden;
}
.rd-ident > div { padding: 0.5rem 0.9rem; border-right: 1px solid var(--icpro-line); min-width: 0; }
.rd-ident > div.rd-ident-note {
    display: flex; align-items: center; justify-content: flex-end; flex: 1;
    border-right: none; font-size: 0.75rem; color: var(--icpro-muted);
}
.rd-ident-note span { max-width: 17rem; }
.rd-ident-val { font-size: 1.15rem; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rd-ident input { margin-top: 2px; width: 7.5rem; }

/* A label above a value or field. CR-597: the house label size and case, no longer a micro uppercase caption
   (owner, 21 Oct 2026: "Label Font and size must be same in every page"). */
.rd-lbl {
    display: block; font-size: 0.8rem; font-weight: 500;
    color: var(--icpro-muted);
}
/* CR-597: a caption wrapping its own tick box takes the label size wherever it sits. */
label:has(> input[type="checkbox"]) { font-size: 0.8rem; }

/* Section head: uppercase title with a hairline underline and an optional right note. */
.rd-sec {
    display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
    border-bottom: 1px solid var(--icpro-line-strong); padding-bottom: 6px;
}
.rd-sec > .t {
    font-size: 0.8rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--icpro-accent-700);
}
.rd-sec > .note { font-size: 0.75rem; color: var(--icpro-muted); }

/* Sign toggle: three square buttons replacing the +/−/± dropdown. Selected = filled. */
.rd-sgn {
    appearance: none; width: 26px; height: 26px; padding: 0; cursor: pointer;
    border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm);
    background: transparent; font-size: 13px; line-height: 1; color: var(--icpro-muted);
}
.rd-sgn:hover:not(:disabled):not(.on) { border-color: var(--icpro-accent); color: var(--icpro-accent-700); }
.rd-sgn.on { background: var(--icpro-accent); border-color: var(--icpro-accent); color: #fff; }
.rd-sgn:disabled { cursor: default; opacity: 0.55; }

/* Inline text button ("+ second tolerance", "clear user"). */
.rd-mini {
    appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
    font-size: 0.75rem; color: var(--icpro-accent-700); text-align: left;
}
.rd-mini:hover:not(:disabled) { text-decoration: underline; }
.rd-mini:disabled { color: var(--icpro-muted); cursor: default; }

/* Numeric field: right-aligned tabular numerals. */
.rd-num { text-align: right; font-variant-numeric: tabular-nums; }

/* A derived value rendered as text (never a disabled input). */
.rd-derived { font-size: 0.78rem; color: var(--icpro-muted); font-variant-numeric: tabular-nums; }

/* A derived value rendered as a tinted read-only block sized like a field. */
.rd-readonly-val {
    background: var(--icpro-field-readonly-bg); color: var(--icpro-neutral-800);
    border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius-sm);
    padding: 0.35rem 0.5rem; font-size: 0.875rem; font-variant-numeric: tabular-nums;
    min-height: 1.4rem;
}

/* Accent variant of the tag ("NABL accredited"). */
.rd-tag.accent { border-color: var(--icpro-accent); color: var(--icpro-accent-700); }
/* The alarming state — Overdue, Withdrawn, Under amendment — must not be the most muted thing on the screen. */
.rd-tag.warn { border-color: var(--icpro-error-border); color: var(--icpro-error-text); }

/* Small live count beside a tab caption ("Equipment (3)"). */
.rd-count {
    font-size: 0.68rem; border: 1px solid var(--icpro-line-strong); border-radius: 999px;
    padding: 0 0.4rem; margin-left: 6px; color: var(--icpro-muted); font-variant-numeric: tabular-nums;
}

/* Two-option segmented control (In lab / On site), replacing a 2-option dropdown. */
.rd-seg {
    display: inline-flex; border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius-sm); padding: 2px; width: fit-content; background: var(--icpro-surface);
}
.rd-seg button {
    appearance: none; background: none; border: 0; min-height: 26px; padding: 0 12px;
    font-size: 0.82rem; color: var(--icpro-muted); cursor: pointer; border-radius: 3px;
}
.rd-seg button:hover:not(:disabled):not(.on) { color: var(--icpro-accent-700); }
.rd-seg button.on { background: var(--icpro-accent); color: #fff; }
.rd-seg button:disabled { cursor: default; }

/* Removable chip (parameters measured). */
.rd-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem;
    border: 1px solid var(--icpro-line-strong); border-radius: 999px; padding: 0.15rem 0.65rem;
    background: var(--icpro-surface);
}
.rd-chip .x { border: 0; background: none; cursor: pointer; color: var(--icpro-muted); padding: 0; font-size: 0.8rem; line-height: 1; }
.rd-chip .x:hover:not(:disabled) { color: var(--icpro-danger); }
.rd-chip .x:disabled { cursor: default; }
/* The dashboard-preset chip's x is a link back to the bare list (CR-317), not a button. */
.rd-chip a.x { text-decoration: none; }

/* A required micro label carries the house cue: ink, not muted (no asterisk). */
.rd-lbl.req { color: var(--icpro-ink); }

/* Row expander toggle (+ / –) at a table row's end. */
.rd-expand-btn {
    appearance: none; width: 26px; height: 26px; padding: 0; cursor: pointer;
    border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm);
    background: transparent; font-size: 14px; line-height: 1; color: var(--icpro-accent-700);
}
.rd-expand-btn:hover:not(:disabled) { border-color: var(--icpro-accent); }
/* The opened detail row under a table row: tinted, indented fields. */
table.ic-entry tr.rd-expand-row > td {
    background: var(--icpro-neutral-100); text-align: left; padding: 0.6rem 0.75rem 0.75rem;
}
.rd-expand-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; align-items: end; }

/* —— Calibration scope (screen 2) —— */
.cs-section { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.cs-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; align-items: end; }
.cs-grid4 > .span2 { grid-column: span 2; }
.cs-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.cs-compound { display: flex; align-items: center; gap: 6px; }
.cs-compound input { min-width: 0; }
.cs-compound .joiner { font-size: 0.82rem; color: var(--icpro-muted); flex: none; }
/* Range + unit and least count + unit on one row (UUC Type wise scope, owner 24 Sep 2026). */
.cs-rangelc { display: flex; align-items: flex-end; gap: 0.75rem; }
.cs-rangelc > div { min-width: 0; }
.cs-rangelc-range { flex: 3 1 0; }
.cs-rangelc-lc { flex: 2 1 0; }
/* Bulk Print's button row: all thirteen together (owner, 24 Sep 2026), tighter than a criteria row. */
.filter-bar.bp-actions { gap: 0.4rem; align-items: center; }
/* Moved from inline styles on BulkPrint (REVIEW-UIUX-Sep2026 §2.18); values unchanged. */
.master-form-card.bp-last-run { margin-bottom: 1rem; }
/* CR-719 (owner's Claude Design page, 15 Nov 2026): Bulk Print in three numbered steps, every output a card. */
.bp-step { margin: 0 0 1.1rem; }
.bp-step-head { display: flex; align-items: baseline; gap: 0.5rem; margin: 0 0 0.5rem; font-size: 1.05rem; font-weight: 650; color: var(--icpro-ink); }
.bp-step-head h2 { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; font: inherit; }
.bp-step-no { font-size: 0.72rem; font-weight: 650; color: var(--icpro-accent-700); letter-spacing: 0.04em; }
.bp-list-head { align-items: center; justify-content: space-between; }
.bp-step .filter-bar { margin-bottom: 0.5rem; }
.filter-bar.bp-actions .bp-spacer { flex: 1 1 auto; }
.bp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; }
.bp-card {
    display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
    min-height: 5.4rem; padding: 0.7rem 0.8rem; text-align: left; text-decoration: none; cursor: pointer;
    font: inherit; color: var(--icpro-ink); background: var(--icpro-surface);
    border: 1px solid var(--icpro-line); border-radius: 4px;
}
.bp-card:hover { border-color: var(--icpro-accent); }
.bp-card:focus-visible, .bp-card:focus-within { outline: 2px solid var(--icpro-accent); outline-offset: 1px; }
.bp-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.bp-card-top .e-icons { font-size: 1.15rem; color: var(--icpro-accent-700); }
.bp-card-tag { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--icpro-muted); }
.bp-card-name { font-size: 0.92rem; font-weight: 650; line-height: 1.25; }
.bp-card.primary { background: var(--icpro-accent); border-color: var(--icpro-accent); color: #fff; }
.bp-card.primary .e-icons, .bp-card.primary .bp-card-tag { color: #fff; }
.bp-card:disabled, .bp-card.disabled { cursor: not-allowed; opacity: 0.55; }
.bp-card:disabled:hover, .bp-card.disabled:hover { border-color: var(--icpro-line); }
.bp-card.primary:disabled:hover { border-color: var(--icpro-accent); }

/* The plain inputs in the CR-200 section grids had NO field styling at all — browser
   defaults, visibly shorter than the Syncfusion dropdowns beside them (owner, 31 Aug 2026:
   "adjust the range, lc, K Factor, alpha value text box height. May be css not applied
   there"). The field standard's values, at the 34px control height the dropdowns render. */
.cs-grid4 input:not([type="checkbox"]):not([type="radio"]),
.cs-grid4 select,
.cs-compound input:not([type="checkbox"]):not([type="radio"]) {
    font: inherit;
    color: var(--icpro-ink);
    background: var(--icpro-field-bg);
    border: 1px solid var(--icpro-field-line);
    border-radius: 3px;
    padding: 0.4rem 0.55rem;
    min-height: 34px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cs-grid4 input:hover:not(:disabled):not([readonly]),
.cs-grid4 select:hover:not(:disabled),
.cs-compound input:hover:not(:disabled):not([readonly]) { border-color: var(--icpro-field-line-hover); }
.cs-grid4 input:focus,
.cs-grid4 select:focus,
.cs-compound input:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
    background: #fff;
}
.cs-checks { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }
.cs-checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }

/* —— MU study (screen 3): interactive step strip, stat cards, share bars, hero result —— */
.mu-steps {
    display: flex; align-items: stretch; gap: 0; background: var(--icpro-surface);
    border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm); margin-bottom: 1rem; overflow: hidden; flex-wrap: wrap;
}
.mu-steps button {
    appearance: none; background: none; border: 0; border-right: 1px solid var(--icpro-line);
    flex: 1 1 0; display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem;
    font: inherit; font-size: 0.82rem; color: var(--icpro-muted); cursor: pointer; min-width: 11rem;
}
.mu-steps button:hover { color: var(--icpro-ink); background: var(--icpro-neutral-100); }
.mu-steps button.active { color: var(--icpro-ink); font-weight: 650; background: var(--icpro-accent-soft); }
.mu-steps button .n {
    width: 1.4rem; height: 1.4rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; flex: none; border: 1px solid var(--icpro-line-strong);
    font-size: 0.72rem; font-variant-numeric: tabular-nums;
}
.mu-steps button.done .n { background: var(--icpro-accent); border-color: var(--icpro-accent); color: #fff; }
/* The answer, visible from every step. */
.mu-steps .mu-steps-result {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; margin-left: auto;
    font-size: 0.82rem; color: var(--icpro-muted); white-space: nowrap;
}
.mu-steps .mu-steps-result b { color: var(--icpro-ink); font-variant-numeric: tabular-nums; }

.rd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.rd-stat {
    border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm);
    padding: 0.5rem 0.75rem; background: var(--icpro-surface); min-width: 0;
}
.rd-stat .cap {
    font-size: 0.66rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--icpro-muted); display: block;
}
.rd-stat .val { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.rd-stat .sub { font-size: 0.72rem; color: var(--icpro-muted); }

.rd-bar { height: 8px; background: var(--icpro-neutral-100); border: 1px solid var(--icpro-line); border-radius: 4px; overflow: hidden; min-width: 3rem; }
.rd-bar > i { display: block; height: 100%; background: var(--icpro-accent); }

/* The filled result panel — the study's answer at a glance. */
.mu-hero {
    background: var(--icpro-accent); color: #fff; border-radius: var(--icpro-radius);
    padding: 1rem 1.25rem; box-shadow: var(--icpro-shadow-sm);
}
.mu-hero .cap { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; }
.mu-hero .big { font-size: 2.4rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mu-hero .sub { font-size: 0.8rem; opacity: 0.9; }
.mu-topfive { display: flex; flex-direction: column; gap: 0.45rem; }
.mu-topfive .row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 3.5rem; gap: 0.6rem; align-items: center; font-size: 0.8rem; }
.mu-topfive .row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-topfive .row .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--icpro-muted); }

/* —— Acceptance criteria (screen 4): the editable printable table with gutters —— */
.sac-gt { border-collapse: collapse; table-layout: fixed; min-width: 100%; }
.sac-gt td { border: 1px solid var(--icpro-line-strong); padding: 0; vertical-align: middle; }
.sac-gt td.gutter { border: 0; }
.sac-gt input.gc {
    width: 100%; border: 0; background: transparent; font-size: 13px; color: var(--icpro-ink);
    padding: 6px 8px; min-height: 30px; text-align: center; font-variant-numeric: tabular-nums;
    border-radius: 0; box-shadow: none;
}
.sac-gt input.gc:hover:not(:focus):not([readonly]) { background: var(--icpro-accent-soft); }
.sac-gt input.gc:focus { outline: 2px solid var(--icpro-accent); outline-offset: -2px; background: var(--icpro-surface); }
.sac-gt tr.gh input.gc { font-weight: 600; background: var(--icpro-neutral-100); text-align: left; }
.sac-gt td.rowlabel { background: var(--icpro-neutral-100); }
.sac-gt td.rowlabel input.gc { text-align: left; }
.sac-gut {
    width: 100%; background: none; border: 0; cursor: pointer; padding: 4px 2px;
    font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--icpro-muted);
}
.sac-gut:hover:not(:disabled) { color: var(--icpro-accent-700); }
.sac-gut.on { color: var(--icpro-accent-700); font-weight: 650; }
.sac-gut:disabled { cursor: default; }
/* The certificate preview: a white sheet with the report's own 1px black table. */
.sac-sheet { background: #fff; border: 1px solid var(--icpro-line-strong); padding: 1.5rem; overflow: auto; }
.sac-pv { border-collapse: collapse; }
.sac-pv td { border: 1px solid #333; padding: 3px 10px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; color: #000; }
/* Attachment banner. */
.sac-banner {
    border: 1px solid var(--icpro-accent); border-radius: var(--icpro-radius-sm);
    padding: 0.6rem 0.9rem; display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; background: var(--icpro-surface);
}
.sac-banner.detached { border-color: var(--icpro-line-strong); }
/* The collapsed legacy coordinate view. */
.sac-coords { border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm); max-height: 260px; overflow: auto; font-size: 0.78rem; }
.sac-coords .hd, .sac-coords .row {
    display: grid; grid-template-columns: 3.5rem 5rem 6rem 5rem 4rem minmax(0, 1fr);
    gap: 0.75rem; padding: 0.25rem 0.75rem; align-items: center;
}
.sac-coords .hd { background: var(--icpro-neutral-100); border-bottom: 1px solid var(--icpro-line-strong); position: sticky; top: 0; }
.sac-coords .row { border-bottom: 1px solid var(--icpro-line); font-variant-numeric: tabular-nums; }
.sac-coords .row .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* —— Users & roles (screen 5): the permissions matrix —— */
/* The two admin screens read as tabs of one surface (an .ic-tabs.entry bar of links since 23 Sep 2026). */

.rp-scroll {
    overflow: auto; max-height: 65vh;
    border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm);
}
table.rp-matrix { border-collapse: collapse; width: 100%; font-size: 0.82rem; background: var(--icpro-surface); }
.rp-matrix th, .rp-matrix td { padding: 0.3rem 0.65rem; border-bottom: 1px solid var(--icpro-line); }
.rp-matrix thead th {
    position: sticky; top: 0; z-index: 2; background: var(--icpro-surface);
    border-bottom: 1px solid var(--icpro-line-strong); text-align: center; vertical-align: top;
    padding-top: 0.5rem; padding-bottom: 0.4rem;
}
.rp-matrix thead th.code-col { text-align: left; }
.rp-matrix td.c { text-align: center; }
.rp-matrix tr.band td {
    background: var(--icpro-neutral-100); font-weight: 650; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--icpro-accent-700);
}
.rp-matrix td.code { font-variant-numeric: tabular-nums; }
.rp-matrix td.code .desc { color: var(--icpro-muted); font-size: 0.78rem; }
.rp-rolehead .nm { font-weight: 650; }
.rp-rolehead .ct { display: block; font-size: 0.68rem; color: var(--icpro-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* The permission sheet (IcPermissionSheet, CR-730): one role or one user, groups that open and
   close with a count on each, the rp-matrix table inside. */
.ps-sheet { max-width: 68rem; }
.ps-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.ps-tools select {
    font: inherit; font-size: 0.85rem; color: var(--icpro-ink); min-height: 34px;
    background: var(--icpro-field-bg); border: 1px solid var(--icpro-field-line); border-radius: 3px; padding: 0.2rem 0.4rem;
}
.ps-totals { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; margin-left: auto; }
.ps-totals .rd-tag b { font-variant-numeric: tabular-nums; margin-left: 0.25rem; }
.ps-legend input, .ps-table input[type=checkbox] { vertical-align: middle; }
.ps-legend .ps-extra-key { margin-left: 1rem; padding: 0.1rem 0.25rem; background: var(--icpro-accent-100); border-radius: 3px; }
.ps-section {
    margin: 0.9rem 0 0.35rem; font-family: var(--icpro-font-heading); font-weight: 600; font-size: 1rem;
    color: var(--icpro-ink);
}
.ps-group { border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm); margin-bottom: 0.3rem; background: var(--icpro-surface); }
.ps-head {
    appearance: none; display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
    padding: 0.4rem 0.7rem; border: 0; background: var(--icpro-neutral-100); cursor: pointer;
    font: inherit; font-size: 0.85rem; color: var(--icpro-ink); border-radius: var(--icpro-radius-sm);
}
.ps-head:hover:not(:disabled) { background: var(--icpro-accent-100); }
.ps-head:disabled { cursor: default; color: var(--icpro-ink); }
.ps-caret { width: 0.9rem; color: var(--icpro-muted); }
.ps-title { font-weight: 650; }
.ps-count { margin-left: auto; font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--icpro-accent-700); }
.ps-count.none { color: var(--icpro-muted); }
.ps-count.full { font-weight: 650; }
.ps-count.extra { margin-left: 0; padding: 0 0.4rem; border: 1px solid var(--icpro-accent); border-radius: 0.6rem; }
.ps-note { margin: 0.4rem 0.7rem 0.2rem; }
.ps-table thead th { position: static; }
.ps-table th.ps-col { width: 9.5rem; font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--icpro-neutral-700); }
.ps-table th.code-col { font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--icpro-neutral-700); }
.ps-allnone { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--icpro-muted); }
.ps-table tbody tr:hover td { background: var(--icpro-accent-100); }
.ps-table tbody tr:last-child td { border-bottom: 0; }
.ps-table td.ps-extra { background: var(--icpro-accent-100); }
table.ua-accounts.ps-roles tr.selected td { background: var(--icpro-accent-100); }
table.ua-accounts.ps-roles tr.selected td.name { font-weight: 650; }

/* Accent-bordered inline panel (the "New user" form above the accounts list). */
.rd-accent-panel {
    border: 1px solid var(--icpro-accent); border-radius: var(--icpro-radius-sm);
    padding: 0.9rem 1rem; margin-bottom: 1rem; background: var(--icpro-surface);
}

/* The Format 41-48 design panel (template parameter list): the column-definitions and
   seed tables at a readable measure, and the DisplaySrNo / datasheet-decimals flag row. */
.tpl-design-flags { display: flex; align-items: center; gap: 1.25rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------------
   Parameter-driven screens, per the owner's "ICPro Redesign" handoff (1 Sep 2026,
   Design Changes\ICPro Redesign.dc.html, CR-212): a parameter CARD sidebar on the
   left, the selected parameter's work area on the right; REF chips and an accent
   formula/computed band; a footer bar under the entry grid.
   --------------------------------------------------------------------------- */
.pp-layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); align-items: start; border-top: 1px solid var(--icpro-line); margin-top: 1rem; }
.pp-side { border-right: 1px solid var(--icpro-line); padding: 1.1rem 1.1rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; min-height: 24rem; }
.pp-side h6 { margin: 0; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--icpro-neutral-700); font-weight: 650; }
.pp-side-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.5rem; }
.pp-cards { display: flex; flex-direction: column; gap: 1px; background: var(--icpro-line); border: 1px solid var(--icpro-line); }
.pp-card { display: flex; gap: 0.6rem; padding: 0.6rem 0.7rem; background: var(--icpro-surface); align-items: flex-start; cursor: pointer; text-align: left; border: 0; font: inherit; width: 100%; position: relative; }
.pp-card:hover { background: var(--icpro-accent-100); }
.pp-card .sr { font-size: 0.7rem; font-variant-numeric: tabular-nums; color: var(--icpro-muted); width: 0.8rem; padding-top: 2px; }
.pp-card .nm { font-family: var(--icpro-font-heading); font-size: 0.95rem; line-height: 1.2; }
.pp-card .meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; font-size: 0.7rem; }
.pp-card .meta .fmt { color: var(--icpro-accent-700); }
.pp-card .meta .note { color: var(--icpro-muted); }
.pp-card .marker { position: absolute; top: 0; right: 0; bottom: 0; width: 6px; }
.pp-card.is-open .marker { background: var(--icpro-accent); }
.pp-side-note { border: 1px solid var(--icpro-accent-300); background: var(--icpro-accent-100); padding: 0.65rem 0.7rem; font-size: 0.75rem; line-height: 1.5; color: var(--icpro-accent-700); }
.pp-main { padding: 1.1rem 1.4rem 1.6rem; min-width: 0; display: flex; flex-direction: column; gap: 1.3rem; }
.pp-main-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.pp-main-head h4 { margin: 0; font-size: 1.25rem; }
.pp-main-head .summary { font-size: 0.75rem; color: var(--icpro-neutral-700); }
/* Section heads carry the same light band as table headers (owner, 1 Sep 2026). */
.pp-sec-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; flex-wrap: wrap;
               background: var(--icpro-neutral-100); padding: 0.35rem 0.6rem;
               border-bottom: 1px solid var(--icpro-line); }
.pp-sec-head h6 { margin: 0; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--icpro-neutral-700); font-weight: 650; }
.pp-sec-head .hint { font-size: 0.72rem; color: var(--icpro-muted); }
.pp-sec-head .tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--icpro-neutral-700); }
.pp-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.72rem; color: var(--icpro-accent-700); background: var(--icpro-accent-100); border: 1px solid var(--icpro-accent-300); padding: 1px 6px; }
.pp-refnote { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.62rem; color: var(--icpro-accent-700); text-transform: none; letter-spacing: 0; margin-top: 1px; }
table.ic-entry th.fx, table.ic-entry td.fx { background: var(--icpro-accent-100); border-left: 1px solid var(--icpro-accent-300); }
table.ic-entry td.fx input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; }
table.ic-entry td.fx-seed input[disabled] { background: var(--icpro-accent-100); border-style: dashed; }
.pp-foot { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-top: 1px solid var(--icpro-line-strong); background: var(--icpro-neutral-100); flex-wrap: wrap; }
.pp-foot .status { font-size: 0.75rem; color: var(--icpro-neutral-700); margin-left: 0.3rem; }
.pp-foot .primary-slot { margin-left: auto; }
.pp-legend { margin-left: auto; display: flex; align-items: center; gap: 0.9rem; font-size: 0.72rem; color: var(--icpro-neutral-700); }
.pp-legend .sw { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; background: var(--icpro-surface); border: 1px solid var(--icpro-line-strong); }
.pp-legend .sw.fx { background: var(--icpro-accent-100); border-color: var(--icpro-accent-300); }
/* Grouped band headers on the multi-table entry grid; the computed block reads accent. */
table.ic-entry th.band-h { background: var(--icpro-neutral-100); font-size: 0.68rem; letter-spacing: 0.09em; border-bottom: 1px solid var(--icpro-line-strong); }
table.ic-entry th.band-h.fx { color: var(--icpro-accent-700); }
table.ic-entry td.computed { background: var(--icpro-accent-100); text-align: right; font-variant-numeric: tabular-nums; color: var(--icpro-accent-700); }
/* Reading-block cells at half width (owner, 1 Sep 2026): five repeats per column would
   otherwise out-measure the result columns they feed. */
table.ic-entry th.rd-block { font-size: 0.68rem; }
table.ic-entry td.rd-block input { width: 3.4rem; min-width: 3.4rem; text-align: right; }
/* Observed range and its computed siblings keep a floor so the row actions never crowd them. */
table.ic-entry td.computed { min-width: 5rem; }
table.ic-entry td.row-actions { padding-left: 0.8rem; }
/* The collapsed parameter sidebar: a narrow strip with the expander (owner, 1 Sep 2026). */
.pp-layout.side-collapsed { grid-template-columns: 2.4rem minmax(0, 1fr); }
.pp-layout.side-collapsed .pp-side { padding: 0.6rem 0.3rem; min-height: 0; }
.pp-side-toggle { align-self: flex-end; }

/* Entry progress bars in the sidebar. */
.pp-progress { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.78rem; border-top: 1px solid var(--icpro-line); padding-top: 0.9rem; }
.pp-progress .row { display: flex; justify-content: space-between; }
.pp-progress .val { font-variant-numeric: tabular-nums; color: var(--icpro-accent-700); }
.pp-progress .bar { height: 3px; background: var(--icpro-neutral-300); }
.pp-progress .bar > span { display: block; height: 100%; background: var(--icpro-accent); }

/* The parameter lists (template + calibration): sixteen columns squeeze the in-cell
   combos to nothing without a floor — a Parameter reading "T…" and a unit reading "u…"
   are unreadable. Names get a wider floor than units; the frequency box stops flexing
   into the widest column on the sheet; the actions never wrap or clip. */
table.ic-entry td.p-name { min-width: 10rem; }
table.ic-entry td.p-unit { min-width: 5.5rem; }
table.ic-entry td.p-freq input { width: 6rem; }
table.ic-entry td.row-actions { white-space: nowrap; }

/* The user-accounts list (Admin/Users), per the design handoff: uppercase column labels
   on a neutral band, hairline row rules, hover, and compact field-styled selects. */
table.ua-accounts {
    border-collapse: collapse; width: 100%;
    border: 1px solid var(--icpro-line-strong); background: var(--icpro-surface);
}
table.ua-accounts th {
    background: var(--icpro-neutral-100); border-bottom: 1px solid var(--icpro-line-strong);
    font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--icpro-neutral-700); text-align: left; padding: 0.45rem 0.75rem;
}
table.ua-accounts td {
    padding: 0.35rem 0.75rem; border-bottom: 1px solid var(--icpro-line);
    vertical-align: middle; font-size: 0.85rem;
}
table.ua-accounts tbody tr:hover td { background: var(--icpro-accent-100); }
/* CR-601: a footer total (the Pending Instruments card's "Total", as the legacy subform's). */
table.ua-accounts tfoot td { font-weight: 600; border-top: 1px solid var(--icpro-line-strong); }
/* A dashboard card's list in a bounded box (owner, 20 Oct 2026, on "Master equipments due": "make this
   list scrollable table"): CR-568's rule applied to a card -- the box has a height, the rows scroll
   inside it and the heading row stays pinned, so a lab with forty standards due does not push the
   rest of the band off the screen. A short list shows no scrollbar and nothing changes. */
.adm-list-box { max-height: clamp(12rem, 40vh, 24rem); overflow: auto; }
.adm-list-box table.ua-accounts { margin: 0; }
.adm-list-box table.ua-accounts > thead th { position: sticky; top: 0; z-index: 1; background: var(--icpro-neutral-100); }
table.ua-accounts td.name { font-size: 0.9rem; }
/* Dashboard card grids (owner, 21 Oct 2026): every content cell at 12.8px, the name column included.
   `.adm-fig` is carried only by the dashboard's tables, so Admin/Users keeps its own sizes. */
table.ua-accounts.adm-fig td,
table.ua-accounts.adm-fig td.name { font-size: 0.8rem; }
/* A figure column, right-aligned and lined up. Lived twice as page-local `.adm-fig` and `.gs-fig`
   copies (dashboard band, search results) until 21 Sep 2026; one rule here retires both. */
table.ua-accounts th.num,
table.ua-accounts td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ua-accounts select,
table.ua-accounts input[type=date] {
    font: inherit; font-size: 0.85rem; color: var(--icpro-ink);
    background: var(--icpro-field-bg); border: 1px solid var(--icpro-field-line);
    border-radius: 3px; padding: 0.2rem 0.4rem; min-height: 30px; min-width: 11rem;
}
table.ua-accounts .row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* —— Gauge spec master (screen 1) —— */
.gs-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 1.5rem; }
.gs-block { display: flex; flex-direction: column; gap: 0.4rem; }
.gs-row {
    display: grid; grid-template-columns: 110px minmax(96px, 1fr) minmax(0, 206px) minmax(0, 150px);
    gap: 0.75rem; align-items: start; padding: 0.4rem 0.4rem 0.4rem 0;
    border-bottom: 1px solid var(--icpro-line);
}
.gs-row:hover { background: var(--icpro-accent-soft); }
.gs-row .gs-label { font-size: 0.8rem; padding-top: 6px; } /* CR-597 */
.gs-dia { display: flex; align-items: center; gap: 6px; }
.gs-dia input { flex: 1; min-width: 0; }
.gs-unit { font-size: 0.75rem; color: var(--icpro-muted); width: 24px; flex: none; }
.gs-tols { display: flex; flex-direction: column; gap: 4px; }
.gs-tol { display: flex; align-items: center; gap: 4px; }
.gs-tol .gs-signs { display: flex; gap: 2px; flex: none; }
.gs-tol input { flex: 1; min-width: 0; }
.gs-limits { padding-top: 7px; }
.gs-wear {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}
.gs-wear > div { display: grid; grid-template-columns: 110px minmax(96px, 1fr) 24px; gap: 0.75rem; align-items: center; }
.gs-taper-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; align-items: end; }
.gs-foot { margin: 0; font-size: 0.78rem; color: var(--icpro-muted); }

/* —— InstaCalPro master list UI (MasterGridTemplate look) —— */
.master-list-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0 0.15rem;
}

.master-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.master-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.master-card-header {
    background: var(--icpro-surface);
    color: var(--icpro-ink);
    padding: 0.9rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--icpro-line);
    flex-wrap: wrap;
    gap: 0.85rem;
}

.master-card-header .header-left {
    flex: 1;
    min-width: 12rem;
}

.master-title {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin: 0 0 0.15rem;
    color: var(--icpro-ink);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.master-title-icon {
    font-size: 1.05rem;
    color: var(--icpro-accent);
}

.master-subtitle {
    font-size: 0.9rem;
    margin: 0;
    color: var(--icpro-muted);
    max-width: 52rem;
}

.master-card-header .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.master-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    background: #fff;
}

.master-filters {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.master-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
}

.master-filters input,
.master-filters select {
    padding: 0.4rem 0.55rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font: inherit;
    min-width: 10rem;
    background: #fff;
}

.master-filters input:focus,
.master-filters select:focus {
    outline: none;
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 3px rgba(65, 97, 128, 0.2);
}

.alert-modern {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    font-weight: 550;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.loading-container {
    text-align: center;
    padding: 3.5rem 2rem;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 10px;
}

.loading-spinner {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto;
    border: 3px solid #e9ecef;
    border-top-color: var(--icpro-accent);
    border-radius: 50%;
    animation: master-spin 0.7s linear infinite;
}

@keyframes master-spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 0.85rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: #adb5bd;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state h2 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.grid-container {
    background: #fff;
    border-radius: 12px;
    padding: 0.65rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Uniform compact font across every IcDataGrid (browse lists AND editable master tables). */
/* NOTE: SfGrid.CssClass ("ic-grid") is not emitted onto the grid element in this Syncfusion
   build, so .ic-grid selectors never match. Target the real grid classes instead: e-grid+e-control
   is on every grid root, so this applies app-wide and outspecifies bootstrap5.css's own
   .e-grid .e-rowcell / .e-headercelldiv (14px) rules. One token drives every list. */
.e-grid.e-control .e-rowcell,
.e-grid.e-control .e-headercell,
.e-grid.e-control .e-headercelldiv,
.e-grid.e-control .e-headercell .e-headertext { font-size: var(--icpro-grid-fs); }
.ic-grid .e-altrow .e-rowcell { background-color: #f8f9fa; }   /* alternate row shading everywhere */

/* Professional Syncfusion grid (InstaCalPro) — steel-blue header */
.professional-grid .e-gridheader {
    background: linear-gradient(135deg, var(--icpro-accent-dark), var(--icpro-accent));
    border-radius: 8px 8px 0 0;
    /* Do NOT use overflow:hidden — it clips Excel filter popups. */
    overflow: visible;
}

.professional-grid .e-gridheader .e-headercell {
    font-size: var(--icpro-grid-fs);
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    color: #fff !important;
    text-align: center;
    background: transparent !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    vertical-align: middle;
}

.professional-grid .e-gridheader .e-headercell .e-headertext {
    color: #fff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25;
}

/* Filter icons must stay visible on the teal header */
.professional-grid .e-gridheader .e-icon-filter,
.professional-grid .e-gridheader .e-filtered::before,
.professional-grid .e-gridheader .e-filtermenudiv {
    color: #fff !important;
    opacity: 1 !important;
}

.e-grid .e-filter-popup,
.e-excelfilter,
.e-dialog.e-excelfilter {
    z-index: 10000 !important;
}

.professional-grid .e-rowcell {
    font-size: var(--icpro-grid-fs);
    padding: 0.32rem 0.5rem !important;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.professional-grid .e-row:hover .e-rowcell {
    background: var(--icpro-accent-soft);
}

.professional-grid .e-altrow .e-rowcell {
    background: rgba(248, 249, 250, 0.55);
}

.professional-grid .e-pager {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 0 0 8px 8px;
    padding: 0.75rem 1rem;
    border-top: 2px solid #e9ecef;
}

.professional-grid .e-pager .e-currentitem {
    background: var(--icpro-accent) !important;
    color: #fff !important;
    border-radius: 6px;
}

.professional-grid .e-toolbar {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    padding: 0.4rem 0.75rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-buttons .btn-group-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
}

/* Icon-only and compact, so an Action column needs ~32px per action (owner, 22 Oct 2026). */
.action-buttons .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    min-width: 1.7rem;
    height: 1.6rem;
    padding: 0;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 550;
    text-decoration: none;
    border: 1px solid var(--icpro-line-strong);
    color: var(--icpro-muted);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

/* The icon takes its button's colour: white on the filled Calibrate button and on every hover. A grid
   cell's own icon colour had been winning, leaving a dark icon on the dark fill (owner, 22 Oct 2026). */
.action-buttons .btn-action .e-icons,
.e-grid .e-rowcell .action-buttons .btn-action .e-icons {
    font-size: 0.9rem;
    line-height: 1;
    color: inherit;
}

.action-buttons .btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    background: var(--icpro-accent);
    border-color: var(--icpro-accent);
    color: #fff;
}

.action-buttons .btn-action-view:hover,
.action-buttons .btn-action-edit:hover {
    background: var(--icpro-accent);
    border-color: var(--icpro-accent);
    color: #fff;
}

/* The row's main action (Calibrate): filled, as .btn.primary is beside the others. */
.action-buttons .btn-action-primary {
    background: var(--icpro-accent);
    border-color: var(--icpro-accent);
    color: #fff;
}

.action-buttons .btn-action-primary:hover {
    background: var(--icpro-accent);
    color: #fff;
}

/* The row's own Delete in an editable list (IcDataGrid): the bin at the Action icons' size, not a 0.8rem ×. */
.btn.ic-row-del { padding: 0.2rem 0.35rem; }
.btn.ic-row-del .e-icons,
.e-grid .e-rowcell .btn.ic-row-del .e-icons { font-size: 1rem; line-height: 1; color: inherit; }

/* A letter beside the icon when two actions share one (Print / Print with Pressure). */
.action-buttons .btn-action .btn-action-badge {
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 1px;
    align-self: flex-end;
    margin-bottom: 0.2rem;
}

.action-buttons .btn-action-danger {
    border-color: #dc3545;
    color: #b3261e;
}

.action-buttons .btn-action-danger:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    color: #fff;
}

.action-buttons .btn-action:disabled,
.action-buttons .btn-action:disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #fff;
    border-color: var(--icpro-line-strong);
    color: var(--icpro-muted);
}

/* View-mode fieldset: disable native inputs without changing layout */
fieldset.master-view-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-inline-size: 0;
}

fieldset.master-view-fieldset:disabled {
    opacity: 1;
}

/* View mode must also hold the Syncfusion controls shut. A disabled fieldset disables the
   native <input> inside an SfDropDownList / SfComboBox, but the popup opens from a CLICK on
   the wrapper div, which the fieldset does not reach — so dropdowns stayed operable on every
   view-only master form (owner, 31 Aug 2026). Killing pointer events on the wrapper closes
   that path; keyboard entry is already closed by the natively-disabled inner input. The
   ground goes the read-only grey of the field standard so it reads as a value, not a box. */
fieldset.master-view-fieldset:disabled .e-input-group,
fieldset.master-view-fieldset:disabled .e-control-wrapper {
    pointer-events: none;
}

fieldset.master-view-fieldset:disabled .e-input-group:not(.e-disabled),
fieldset.master-view-fieldset:disabled .e-control-wrapper:not(.e-disabled) {
    background: var(--icpro-field-readonly-bg);
}

/* The clear (×) and dropdown chevron are actions; a value has neither. */
fieldset.master-view-fieldset:disabled .e-input-group .e-clear-icon,
fieldset.master-view-fieldset:disabled .e-input-group .e-input-group-icon {
    visibility: hidden;
}

/* —— Toasts (IcToast host in IcAppShell) —— */
.ic-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(26rem, calc(100vw - 2rem));
    pointer-events: none;
}

.ic-toast-region {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Owner, 16 Aug 2026: "the user cannot notice the messages, mostly the Save messages".
   These were white cards on a white page in the bottom-right corner. Now a solid colour
   block with white text, a larger hit area and a brief attention pulse. */
.ic-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--icpro-radius-sm);
    border: 1px solid transparent;
    box-shadow: var(--icpro-shadow-lg);
    font-size: 0.92rem;
    font-weight: 500;
    color: #ffffff;
    pointer-events: auto;
    animation: ic-toast-in 0.22s ease-out, ic-toast-pulse 0.9s ease-out 0.22s 2;
}

@keyframes ic-toast-in {
    from { opacity: 0; transform: translateY(0.6rem) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* Two slow pulses of the shadow -- enough to catch the eye from the bench without the
   jitter of a flashing element. */
@keyframes ic-toast-pulse {
    0% { box-shadow: var(--icpro-shadow-lg), 0 0 0 0 rgba(255, 255, 255, 0.55); }
    100% { box-shadow: var(--icpro-shadow-lg), 0 0 0 0.65rem rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .ic-toast { animation: none; }
}

.ic-toast-success { background: #0b6e4f; border-color: #095a41; }
.ic-toast-info { background: var(--icpro-accent-700); border-color: var(--icpro-accent-800); }
.ic-toast-error { background: var(--icpro-danger); border-color: #8f1d17; }

/* Severity also carried by a glyph, so the message does not rely on colour alone. */
.ic-toast-icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.25rem; height: 1.25rem; margin-top: 0.05rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.78rem; font-weight: 700; line-height: 1;
}

.ic-toast-text { flex: 1; line-height: 1.35; }

.ic-toast-close {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

/* White, not ink: the toast grounds are the saturated status colours, and a dark glyph on
   the error red measured 2.5:1. A later duplicate used to override this to ink (review
   2026-08-29 §5.8). */
.ic-toast-close:hover { color: #ffffff; }
.ic-toast-close:focus-visible { outline: 2px solid #ffffff; outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
    .ic-toast { animation: none; }
}

/* Derived job workflow status badges (Jobs list) */
.ic-status {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.4;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ic-status-pending {
    background: var(--icpro-canvas);
    color: var(--icpro-muted);
    border-color: var(--icpro-line-strong);
}

.ic-status-in-progress {
    background: var(--icpro-warn-soft);
    color: var(--icpro-warn);
    border-color: var(--icpro-warn-soft);
}

.ic-status-certified {
    background: var(--icpro-accent-soft);
    color: var(--icpro-accent-dark);
    border-color: var(--icpro-accent-soft);
}

/* Jobs list (CR-483): the legacy work order list's three colour rules, in the status chips' own tones. */
.jobs-flag-pending { background: var(--icpro-warn-soft); color: var(--icpro-warn); padding: 0 0.25rem; border-radius: 3px; }
.jobs-flag-partial { background: var(--icpro-warn-soft); color: var(--icpro-warn); padding: 0 0.25rem; border-radius: 3px; }
.jobs-flag-authorised { background: var(--icpro-accent-soft); color: var(--icpro-accent-dark); padding: 0 0.25rem; border-radius: 3px; }
.jobs-quick { gap: 1.25rem; }
/* CR-591 paired each document's preview with its mail; CR-702 (owner, 9 Nov 2026) puts the mail, an icon, beside
   the preview rather than under it, and the toolbar is one row of icons and short captions. */
.jobs-toolbar { align-items: center; }
/* CR-702: two rows -- New / View / Edit / Delete with the filters, then the documents -- close together. */
.jobs-toolbar:has(+ .jobs-docs) { margin-bottom: 0.4rem; }
.jobs-toolbar .ic-filter-inline { flex: 0 1 auto; min-width: 0; }
.jobs-btn-pair { display: inline-flex; flex-direction: row; align-items: center; gap: 0.2rem; }
.jobs-btn-pair > .btn { justify-content: center; }
/* CR-748: a list's tools beside its title -- Jobs' documents, Calibrations' On Site list and allotment. They take the
   room the title leaves, wrap when it runs out, and keep to the right. */
.page-head > .actions.jobs-docs,
.page-head > .actions.cal-head-tools { flex: 1 1 auto; flex-shrink: 1; justify-content: flex-end; align-items: center; min-width: 0; }
/* CR-748: Calibrations' filters on the record actions' row: captions above their boxes as before, buttons level
   with the boxes. */
.filter-bar.cal-toolbar { align-items: end; justify-content: flex-end; }
.filter-bar.cal-toolbar > label:first-of-type { margin-left: auto; }

.ic-status-dispatched {
    background: #e7f5ef;
    color: #0b6e4f;
    border-color: #d3ece0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 650;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-height: 1.15rem;
}

.status-badge.status-active {
    background: #28a745;
    color: #fff;
}

.status-badge.status-inactive {
    background: #6c757d;
    color: #fff;
}

@media (max-width: 768px) {
    .master-card-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem;
    }

    .master-card-header .header-actions {
        justify-content: center;
    }

    .master-card-body {
        padding: 1rem;
    }

    .master-title {
        justify-content: center;
        font-size: 1.15rem;
    }
}

/* Thread Gauge Specs hub — Access mThreadData button panel (not a data list) */
.thread-hub-panel {
    max-width: 36rem;
    margin: 1.5rem auto;
    padding: 1.5rem 2rem 2rem;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm);
    text-align: center;
}

.thread-hub-panel h2 {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 650;
}

.thread-hub-panel .thread-hub-btns {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.thread-hub-panel .thread-hub-btns a {
    display: block;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--icpro-ink);
    background: #f8fafc;
    border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius-sm);
    transition: background 0.12s ease, border-color 0.12s ease;
}

.thread-hub-panel .thread-hub-btns a:hover {
    background: var(--icpro-accent-soft);
    border-color: var(--icpro-accent);
    color: var(--icpro-ink);
    text-decoration: none;
}

.master-section-banner {
    margin: 1rem 0 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--icpro-accent-soft);
    color: var(--icpro-accent-dark);
    border-left: 3px solid var(--icpro-accent);
    font-weight: 650;
    font-size: 0.9rem;
    border-radius: var(--icpro-radius-sm);
}

.master-section-banner .muted {
    color: var(--icpro-muted);
    font-weight: 500;
    font-size: 0.8rem;
}

.hub-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.hub-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem;
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.hub-tile-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.15rem;
}

/* Default settings — CompanyMasterDS section panels + page-setup matrix */
.ds-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 1100px) {
    .ds-panels { grid-template-columns: 1fr; }
}

/* CR-506: Default Settings "Email Messages" -- two columns of rich-text boxes, label above each. */
.ds-mail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.ds-mail label { display: block; font-weight: 600; margin-bottom: .25rem; }
@media (max-width: 900px) { .ds-mail-grid { grid-template-columns: 1fr; } }

.ds-panel {
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius-sm);
    overflow: hidden;
    background: #fff;
}

/* Default Settings, General Settings tab: the purpose groups and their index (owner, 25 Oct 2026). The index sits
   at the top of the tab; a group heading is a plain section title over its panels, the panels' own captions below. */
.ds-index { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.85rem; }
.ds-group {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--icpro-accent-dark);
    margin: 1.1rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--icpro-line);
    scroll-margin-top: 4.5rem;
}
.ds-index + .ds-group { margin-top: 0; }

.ds-panel > h3 {
    margin: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 650;
    background: var(--icpro-accent-soft);
    color: var(--icpro-accent-dark);
    border-bottom: 1px solid var(--icpro-line);
}

.ds-panel .master-form-grid {
    padding: 0.75rem;
    grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr) !important;
    gap: 0.45rem 0.65rem;
    align-items: center;
}

.ds-panel .master-form-grid .fg-check {
    grid-column: 1 / -1;
}

.ds-panel .master-form-grid .fg-span-2 {
    grid-column: 2 / -1;
}

/* In-page help for a group of settings (CR-741): the page's own muted help text, with a small table where the
   settings are best read side by side. Full width of the panel, above the controls it explains. */
.ds-panel .master-form-grid .ds-help {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0.15rem;
    padding: 0.5rem 0.65rem;
    background: var(--icpro-neutral-100);
    border-left: 3px solid var(--icpro-accent-300);
    border-radius: 3px;
}
/* On-screen help for a whole page (CR-745): the same look as .ds-help, folded behind its own heading so it costs
   one line until it is asked for. */
details.ic-help {
    margin: 0 0 0.6rem; padding: 0.35rem 0.65rem; font-size: 0.82rem;
    background: var(--icpro-neutral-100); border-left: 3px solid var(--icpro-accent-300); border-radius: 3px;
}
details.ic-help > summary { cursor: pointer; font-weight: 600; color: var(--icpro-neutral-700); }
details.ic-help .ic-help-body { margin-top: 0.4rem; max-width: 70rem; }
details.ic-help p { margin: 0 0 0.4rem; }
details.ic-help p:last-child { margin-bottom: 0; }
.ic-help-table { width: 100%; border-collapse: collapse; margin: 0 0 0.4rem; }
.ic-help-table th {
    text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--icpro-neutral-700); padding: 0.2rem 0.4rem; border-bottom: 1px solid var(--icpro-line);
}
.ic-help-table td { padding: 0.25rem 0.4rem; vertical-align: top; border-bottom: 1px solid var(--icpro-line); }
.ic-help-table td:first-child { font-weight: 600; width: 13rem; white-space: nowrap; }
.ds-help p { margin: 0 0 0.4rem; }
.ds-help p:last-child { margin-bottom: 0; }
.ds-help-table { width: 100%; border-collapse: collapse; margin: 0 0 0.4rem; font-size: 0.8rem; }
.ds-help-table th {
    text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--icpro-neutral-700); padding: 0.2rem 0.4rem; border-bottom: 1px solid var(--icpro-line);
}
.ds-help-table td { padding: 0.2rem 0.4rem; vertical-align: top; border-bottom: 1px solid var(--icpro-line); }
.ds-help-table td:first-child { font-weight: 600; width: 24%; }
.ds-help-table td:last-child { width: 30%; }

/* Invoice and quotation text: a textarea's label sits level with its first line, not its middle. */
.ds-panel .ds-text-grid > label.fg-label:has(+ textarea) {
    align-self: start;
    padding-top: 0.3rem;
}

.ds-panel .ds-text-grid textarea {
    width: 100%;
    resize: vertical;
}

.page-setup-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.page-setup-matrix th,
.page-setup-matrix td {
    border: 1px solid var(--icpro-line);
    padding: 0.4rem 0.45rem;
    text-align: center;
    vertical-align: middle;
}

.page-setup-matrix th:first-child,
.page-setup-matrix td:first-child {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    background: #f8fafc;
}

.page-setup-matrix th.ps-srf { background: #1e3a5f; color: #fff; }
.page-setup-matrix th.ps-qtn { background: #b91c1c; color: #fff; }
.page-setup-matrix th.ps-cc { background: #7030a0; color: #fff; }
.page-setup-matrix th.ps-prev { background: #78350f; color: #fff; }
.page-setup-matrix th.ps-dn { background: #eab308; color: #1e293b; }
.page-setup-matrix th.ps-inv { background: #2563eb; color: #fff; }

.page-setup-matrix input[type="number"] {
    width: 4.5rem;
    padding: 0.2rem 0.3rem;
    font: inherit;
    border: 1px solid var(--icpro-line-strong);
    border-radius: 3px;
    text-align: center;
}

.gitype-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.9fr);
    gap: 1.25rem;
    align-items: start;
}

.gitype-docgrid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.gitype-docgrid th,
.gitype-docgrid td {
    border: 1px solid var(--icpro-line);
    padding: 0.3rem 0.4rem;
}

.gitype-docgrid th {
    background: #e2e8f0;
    font-weight: 650;
}

.gitype-docgrid td:first-child {
    color: #1d4ed8;
    font-weight: 600;
    white-space: nowrap;
    width: 7rem;
}

.gitype-docgrid input {
    width: 100%;
    padding: 0.25rem 0.35rem;
    border: 1px solid var(--icpro-line-strong);
    border-radius: 3px;
    font: inherit;
    box-sizing: border-box;
}

.gitype-cert-box {
    border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius-sm);
    padding: 0.75rem;
    background: #f8fafc;
}

.gitype-cert-box h3 {
    margin: 0 0 0.65rem;
    color: #1d4ed8;
    font-size: 0.95rem;
}

.gitype-cert-box label:not(.check) {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
}

.gitype-cert-box textarea,
.gitype-cert-box select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--icpro-line-strong);
    border-radius: 3px;
    font: inherit;
    padding: 0.35rem;
}

.gitype-cert-box label.check,
.gitype-cert-box .fg-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.gitype-cert-box input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 960px) {
    .gitype-layout { grid-template-columns: 1fr; }
    .page-setup-matrix { display: block; overflow-x: auto; }
}

.hub-tile:hover {
    border-color: var(--icpro-accent);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

.hub-tile strong {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--icpro-ink);
}

.hub-tile span {
    font-size: 0.8rem;
    color: var(--icpro-muted);
    line-height: 1.35;
}

@media (max-width: 720px) {
    .master-form-grid {
        grid-template-columns: 1fr;
    }

    .master-form-grid > .fg-pair-blank {
        display: none;
    }
}

/* =============================================================================
   Thread / taper gauge specs — legacy mTPG / mTRG / mTaper* table layout
   ============================================================================= */

.tg-key-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.tg-key-row > label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 650;
    min-width: 7rem;
}

.tg-key-row > label.tg-key-wide {
    flex: 1 1 16rem;
    min-width: 12rem;
}

.tg-key-row input {
    padding: 0.35rem 0.5rem;
    border: 1px solid #64748b;
    border-radius: var(--icpro-radius-sm);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.tg-key-row input:disabled {
    opacity: 1;
    color: #0f172a;
    background: #e2e8f0;
}

.tg-spec-scroll {
    overflow-x: auto;
}

.tg-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
}

.tg-spec-table th,
.tg-spec-table td {
    border: 1px solid #94a3b8;
    padding: 0.35rem 0.4rem;
    vertical-align: middle;
}

.tg-spec-table thead th {
    background: #e2e8f0;
    font-weight: 700;
    text-align: center;
}

.tg-spec-table .tg-col-head {
    min-width: 6rem;
}

.tg-spec-table .tg-row-label {
    background: #f8fafc;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
    width: 7.5rem;
}

.tg-spec-table .tg-dia {
    min-width: 6.5rem;
    background: #fffbeb;
}

.tg-spec-table .tg-dia input,
.tg-spec-table .tg-tol-pair input,
.tg-spec-table .tg-tol-pair select {
    padding: 0.35rem 0.35rem;
    border: 1px solid #64748b;
    border-radius: var(--icpro-radius-sm);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    box-sizing: border-box;
    background: #fff;
}

.tg-spec-table .tg-dia input {
    width: 100%;
    min-width: 5.5rem;
    background: #fffbeb;
}

.tg-spec-table .tg-dia input:disabled,
.tg-spec-table .tg-tol-pair input:disabled,
.tg-spec-table .tg-tol-pair select:disabled {
    opacity: 1;
    color: #0f172a;
    background: #e2e8f0;
    border-color: #94a3b8;
}

.tg-tol-cell {
    background: #eff6ff;
}

.tg-tol-cell.tg-empty {
    background: #f8fafc;
}

.tg-tol-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.tg-tol-pair select {
    width: 3.25rem;
    flex: 0 0 auto;
    font-weight: 700;
    color: #1d4ed8;
}

.tg-tol-pair input {
    width: 5.5rem;
    flex: 1 1 auto;
    min-width: 4rem;
    background: #fff;
}

.tg-unit {
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.tg-taper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tg-taper-table .tg-row-label {
    width: 9.5rem;
}

.tg-taper-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--icpro-line);
}

.tg-taper-footer > label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 650;
}

.tg-taper-footer > label > input {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius-sm);
    font: inherit;
    font-size: 0.875rem;
    width: 10rem;
}

.tg-taper-footer > label > input:disabled {
    opacity: 0.65;
    background: #f1f5f9;
}

.tg-taper-error .tg-tol-pair input {
    width: 7rem;
}

@media (max-width: 960px) {
    .tg-taper-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   Instant Gauge Calculator chrome (hub + module pages)
   ============================================================================= */

:root {
    /* Reconciled to the app palette so the gauge pages don't read as a different
       application (review finding 3.8). Go/NoGo stay semantic. */
    --igc-hero: var(--icpro-sidebar);
    --igc-primary: var(--icpro-accent);
    --igc-go: #1b7f4d;
    --igc-nogo: #b3362b;
    --igc-bg: var(--icpro-canvas);
    --igc-outline: var(--icpro-line-strong);
}

.igc-page { max-width: 1100px; margin: 0 auto 2rem; }

.igc-hero {
    background: var(--igc-hero);
    color: #fff;
    border-radius: 2px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.igc-hero-mark {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    flex: 0 0 auto;
    padding: 0.2rem;
}

.igc-hero .eyebrow {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: #93c5fd;
    font-weight: 650;
}

.igc-hero h1 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.55rem;
    color: #fff;
    font-weight: 700;
}

.igc-hero p {
    margin: 0;
    color: #dbe4ee;
    font-size: 0.88rem;
    max-width: 52rem;
}

.igc-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.igc-chip {
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.igc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.igc-stat {
    background: #fff;
    border: 1px solid var(--igc-outline);
    border-radius: 2px;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.igc-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 750;
    color: #1e293b;
    line-height: 1.1;
}

.igc-stat span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #64748b;
}

.igc-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.igc-tile {
    background: #fff;
    border: 1px solid var(--igc-outline);
    border-radius: 2px;
    padding: 1.1rem 1.15rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 168px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

a.igc-tile:hover {
    border-color: var(--igc-primary);
    box-shadow: 0 4px 14px rgba(15,23,42,0.08);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

.igc-tile-icon {
    width: 36px;
    height: 36px;
}

.igc-tile h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1e293b;
}

.igc-tile p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    flex: 1;
}

.igc-tile .igc-open {
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 650;
}

.igc-tile select {
    margin-top: 0.25rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--igc-outline);
    border-radius: 4px;
    font: inherit;
    font-size: 0.85rem;
    background: #fff;
}

.igc-band {
    background: var(--igc-hero);
    color: #fff;
    border-radius: 2px;
    padding: 0.95rem 1.15rem;
    margin-bottom: 0.65rem;
}

.igc-band h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #fff;
    font-weight: 700;
}

.igc-band p {
    margin: 0.25rem 0 0;
    color: #dbe4ee;
    font-size: 0.85rem;
}

.igc-flank {
    background: #eef2f6;
    border: 1px solid var(--igc-outline);
    border-radius: 2px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 0.85rem;
}

.igc-card {
    background: #fff;
    border: 1px solid var(--igc-outline);
    border-radius: 2px;
    padding: 1rem 1.1rem 1.1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.igc-card h2 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.igc-card .igc-note {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #92400e;
}

.igc-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.igc-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: #334155;
}

.igc-form-grid input,
.igc-form-grid select {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--igc-outline);
    border-radius: 4px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    color: #0f172a;
    text-align: center;
    background: #fff;
}

.igc-form-grid input:disabled,
.igc-form-grid select:disabled,
.igc-form-grid .readonly {
    background: #eef1f4;
    color: #0f172a;
}

.igc-actions {
    display: flex;
    justify-content: flex-end;
}

.igc-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.35rem;
    font: inherit;
    font-weight: 650;
    font-size: 0.9rem;
    cursor: pointer;
}

.igc-btn:hover { background: #2563eb; }
.igc-btn:disabled { opacity: 0.55; cursor: default; }

.igc-back {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    font-weight: 650;
    color: #2563eb;
    text-decoration: none;
}

.igc-back:hover { text-decoration: underline; }

.igc-result-table {
    width: 100%;
    border-collapse: collapse;
}

.igc-result-table th,
.igc-result-table td {
    padding: 0.4rem 0.35rem;
    vertical-align: middle;
}

.igc-result-table .igc-row-label {
    width: 9.5rem;
    font-weight: 650;
    color: #334155;
    font-size: 0.88rem;
}

.igc-result-table .igc-go-h { color: var(--igc-go); text-align: center; font-weight: 700; }
.igc-result-table .igc-nogo-h { color: var(--igc-nogo); text-align: center; font-weight: 700; }

.igc-cell {
    border: 1px solid var(--igc-outline);
    border-radius: 2px;
    background: #fff;
    min-height: 2rem;
    padding: 0.35rem 0.45rem;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.igc-cell.tol {
    font-weight: 600;
    color: #475569;
}

.igc-legend {
    margin: 0.75rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.igc-zone {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.igc-plain-results {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr;
    gap: 0.85rem;
}

.igc-go-label { color: var(--igc-go); font-weight: 700; }
.igc-nogo-label { color: var(--igc-nogo); font-weight: 700; }

@media (max-width: 960px) {
    .igc-stats, .igc-modules, .igc-form-grid, .igc-plain-results { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 960px) {
    .igc-modules { grid-template-columns: 1fr 1fr; }
    .igc-stats { grid-template-columns: 1fr 1fr 1fr; }
}

.e-grid .e-editedbatchcell select,
.e-grid .e-batchcell select,
.e-grid td select { width: 100% !important; min-width: 0; box-sizing: border-box; }
.e-grid .e-editedbatchcell input[type="date"],
.e-grid .e-editedbatchcell input[type="file"] { width: 100%; }

.qtn-title { margin: 0; font-size: 16pt; letter-spacing: 2pt; }

/* UN-MOVED from print-shared.css (CR-185): its 9pt must beat table.grid's 8pt on the
   combined grid results qtn-items tables, exactly as this position always made it. */
table.qtn-items { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 9pt; }
table.qtn-items th, table.qtn-items td { border: 0.5pt solid #000; padding: 1mm 1.5mm; vertical-align: top; }
table.qtn-items th { background: #f2f2f2; text-align: left; }
table.qtn-items td.num { text-align: right; }
.qtn-sign { margin-top: 10mm; text-align: right; font-size: 9.5pt; line-height: 1.5; }
/* —— Entry-screen record header and side rail (IcEntityHeader / IcSideRail) ——
   The two-column entry shell from the design handoff. Presentation only: the form's own
   fields, order and control types are untouched. */

.ic-entity-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0 0.7rem;
    margin-bottom: 0.85rem;
    background: var(--icpro-canvas);
    border-bottom: 1px solid var(--icpro-neutral-300);
}

/* Pinned to the top of the scrolling content column, so Save stays reachable from the
   bottom of a long form -- the complaint behind finding 3.5. */
.ic-entity-head.is-sticky { position: sticky; top: 0; z-index: 5; }

.ic-entity-head-main { min-width: 0; }

.ic-entity-title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.ic-entity-title { margin: 0; font-size: 1.65rem; line-height: 1.15; }

.ic-entity-meta {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--icpro-neutral-700);
    display: flex; flex-wrap: wrap; gap: 0.4rem;
}

.ic-entity-meta-sep { color: var(--icpro-neutral-400); }

.ic-entity-unsaved {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--icpro-warn);
}

.ic-entity-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; }

/* CR-602: a record's Prepared / Modified stamps to the right of its title, before the actions (owner, 21 Oct 2026).
   Two label | value columns side by side; the house label size, the values as a read-only value. */
.ic-entity-stamp { margin-right: auto; min-width: 0; }
.page-head > .ic-record-stamp { margin-right: auto; }
.ic-record-stamp { display: flex; flex-wrap: wrap; gap: 0.35rem 1.75rem; }
.ic-record-stamp-col {
    display: grid; grid-template-columns: max-content max-content; gap: 0.2rem 0.9rem;
    margin: 0; align-items: baseline;
}
.ic-record-stamp-col dt { font-size: 0.8rem; font-weight: 500; color: var(--icpro-muted); }
.ic-record-stamp-col dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--icpro-ink); }

.ic-entity-body { display: flex; align-items: flex-start; gap: 1.25rem; }

/* max-width as well as min-width. .ic-entity-body is a COLUMN flex container, so min-width:0
   guards the main axis -- which is vertical here and therefore the wrong one. On the cross axis
   the item stretches to its content, so a wide table grew this column to 1108px inside a 737px
   parent and the PAGE scrolled sideways instead of the table. Clamping the cross axis lets the
   .scroll-x inside do its job. */
.ic-entity-main { flex: 1 1 auto; min-width: 0; max-width: 100%; }

.ic-rail {
    flex: 0 0 320px;
    width: 320px;
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ic-rail-card {
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-sm);
    padding: 0.85rem 0.95rem 0.9rem;
}

.ic-rail-card-title {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--icpro-neutral-700);
}

/* Label-above-control inputs in the rail, right-aligned numbers per the design spec. */
.ic-rail-inputs { display: grid; gap: 0.5rem; margin-bottom: 0.8rem; }
.ic-rail-inputs label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; /* CR-597 */ color: var(--icpro-neutral-700); }
.ic-rail-inputs input { text-align: right; font-variant-numeric: tabular-nums; }

.ic-rail-rows { display: grid; gap: 0.3rem; }
.ic-rail-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.84rem; }
.ic-rail-row span:last-child { font-variant-numeric: tabular-nums; }
/* A sub-total the eye should find without reading every line (the invoice's Calibration /
   Repair charges, SubTotal, Taxable Amount and Total GST -- owner, 10 Sep 2026, UAT-088). */
.ic-rail-row.is-strong { font-weight: 700; color: var(--icpro-ink); }
.ic-rail-row.is-total {
    margin-top: 0.35rem; padding-top: 0.45rem;
    border-top: 1px solid var(--icpro-line-strong);
    font-family: var(--icpro-font-heading);
    font-size: 1.05rem; font-weight: 600; color: var(--icpro-ink);
}

/* The secondary filter row revealed by "More filters" — visually subordinate to the main bar. */
.filter-bar-more { margin-top: -0.35rem; background: var(--icpro-neutral-100); }
.ic-filter-hidden-note { display: block; margin: 0.35rem 0 0.5rem; }

/* A legacy form value that carries its unit picker inside the same field (item dialog's
   gauge Size / Go Size). The unit applies to the sizes beside it, not to a value of its own. */
.lf-val-unit { display: flex; align-items: center; gap: 0.4rem; }
.lf-val-unit > input { flex: 1 1 auto; min-width: 0; }

/* A percentage input sitting inline in a rail row (quotation "Less Discount %"). */
.ic-rail-pct { width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }

.ic-rail-note { margin: 0; font-size: 0.8rem; color: var(--icpro-neutral-700); line-height: 1.4; }
.ic-rail-note + .ic-rail-note { margin-top: 0.45rem; }

@media (max-width: 1100px) {
    /* Below this the two columns squeeze the form more than the rail is worth. */
    .ic-entity-body { flex-direction: column; }
    .ic-rail { position: static; width: 100%; flex-basis: auto; }
}

/* —— Unsaved-work confirmation (IcUnsavedGuard) ——
   Rendered by the app shell, above everything including the item dialog (z-index 41). */
.ic-confirm-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(16, 24, 40, 0.42);
}

.ic-confirm {
    position: fixed; z-index: 91;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(30rem, calc(100vw - 2rem));
    background: var(--icpro-surface);
    border: 1px solid var(--icpro-line-strong);
    border-radius: var(--icpro-radius);
    box-shadow: var(--icpro-shadow-lg);
    padding: 1.25rem 1.4rem 1.1rem;
}

.ic-confirm-title {
    font-family: var(--icpro-font-heading);
    font-size: 1.35rem; font-weight: 600;
    margin: 0 0 0.4rem; color: var(--icpro-ink);
}

.ic-confirm-body {
    margin: 0 0 1.1rem;
    color: var(--icpro-muted);
    font-size: 0.92rem; line-height: 1.45;
}

.ic-confirm-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }

.ic-confirm-discard { color: var(--icpro-danger); border-color: var(--icpro-danger); }
.ic-confirm-discard:hover { background: var(--icpro-danger-soft); border-color: var(--icpro-danger); }

@media print {
    /* Header row repeats on every printed page, as the Access report's page header does. */
    table.qtn-items thead { display: table-header-group; }
    table.qtn-items tfoot { display: table-row-group; }
    .qtn-block, .qtn-sign { page-break-inside: avoid; }
}

.qtn-sign { text-align: left; }

/* Returnable Challan register (RChallanRegister.razor) -- the legacy
   "Returnable Challan Report", a date-range listing grouped by agency. */
.rc-ason { font-size: 9pt; text-align: right; }
.rc-range { font-size: 9.5pt; margin: 2mm 0 3mm; }
.rc-group { margin-bottom: 5mm; page-break-inside: avoid; }
.rc-group-head { font-size: 10pt; margin-bottom: 1.5mm; }

/* Signature ink on a business document (migration 107). Same 56 x 8.5mm envelope as the
   certificate's, so one scan looks the same wherever it prints; it REPLACES the blank
   dc-sign-space rather than sitting on top of it, so the line does not move. */
.doc-sign-img, .inv-sign-img { display: block; max-width: 56mm; max-height: 14mm; width: auto; height: auto; }
.inv-sign-img { margin: 0 auto; }


/* ---------------------------------------------------------------------------
   Entry-form layout ("lf-").

   Structure follows the Access originals in Legacy App Screenshots\ -- the same
   fields, in the same order, under the same tabs and section captions -- but the
   CONTROLS are styled as a web app rather than as a literal Access replica
   (owner, 9 Aug 2026: "adjust the controls which give the feel of web app").

   So: keep the multi-column label/value structure and the tab strip; drop the
   Access chrome (colon separator column, yellow caption bar, blue/green/orange
   total blocks, the blue label chip) in favour of ordinary web styling.
   --------------------------------------------------------------------------- */
/* UAT-075: a read-only value shown beside a filter-bar label, so the Delivery Challan's
   W. O. Date sits with the W. O. Number it belongs to instead of across the header. */
.filter-bar .fb-ro { align-self: center; font-weight: 600; }
/* UAT-076: a field block placed BELOW an entry grid rather than in the page header.
   Same card as .lf-head, only its top margin differs. */
.lf-below-grid { margin-top: 0.75rem; }

.lf-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
    /* Density (CR-740; owner, 17 Nov 2026: "data entry forms and controls much more lengthy"). A row is one control
       high and no more: 30 px rows 2 px apart, where it was 34 px rows 5.6 px apart for the same 28 px controls. */
    gap: 0.125rem 2.5rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #dde3ea);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
}
.lf-col { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }

/* Work Order, Item Details (CR-747): the heading with its buttons on one line, and each helper row on one line. */
.wo-items-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0.9rem 0 0.4rem;
                 padding-bottom: 0.3rem; border-bottom: 1px solid var(--icpro-line); }
.wo-items-head > .section-title { margin: 0; padding: 0; border: 0; }
.lf-head.wo-items-tools { padding-top: 0.3rem; padding-bottom: 0.3rem; margin-bottom: 0.4rem; }
.lf-val.wo-inline { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.lf-val.wo-inline > .btn { flex: 0 0 auto; white-space: nowrap; }
.lf-val.wo-inline > :not(.btn):not(.muted):not(label) { flex: 1 1 8rem; min-width: 0; }
.lf-val.wo-inline > .wo-file { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-val.wo-inline > .wo-search-lbl { flex: 0 0 auto; margin-left: 0.5rem; }

/* Layout-transparent wrapper: exists only to carry a Blazor @key so a swapped block of rows is
   rebuilt rather than recycled (see the @key note in JobLineEntry.razor). display:contents keeps
   the rows as direct flex children of .lf-col, so spacing is unchanged. */
.lf-subrows { display: contents; }

/* IcDirtyScope wraps a page's editable body to watch for typing (unsaved-work guard).
   display:contents keeps it out of layout entirely — sticky rails, grids and direct-child
   selectors behave exactly as if the wrapper were not there. */
.ic-dirty-scope { display: contents; }

.lf-row { display: flex; align-items: center; gap: 0.6rem; min-height: 1.875rem; }
/* Two controls sharing one value cell (Frequency + period; Location + site). */
.lf-val.lf-pair { display: flex; gap: 6px; }
.lf-val.lf-pair > * { flex: 1 1 0; min-width: 0; }
.lf-lbl {
    flex: 0 0 10.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted, #5b6675);
    line-height: 1.25;
}
/* Access marks required entry by colouring the whole label. Owner asked for the
   red star and the red note to go (21 Aug 2026): required labels are plain,
   validation still reports what is missing on save. */
.lf-lbl.req { color: var(--text, #1f2937); font-weight: 600; }
.lf-lbl.hi { font-weight: 600; color: var(--text, #1f2937); }
/* The literal ":" column is Access-era; the layout carries the separation now. */
.lf-sep { display: none; }

/* CR-597: words standing in a value cell beside its box ("°C", "Humidity", "% Rh", "File Name :") are captions and
   take the label size; the boxes keep their own 0.85 rem (FIELD STANDARD) and a read-only value its 0.9 rem. */
.lf-val { flex: 1 1 auto; min-width: 0; font-size: 0.8rem; }
/* Look (colour, border, radius, focus) comes from the FIELD STANDARD block, which already
   names .lf-val — this later block used to re-declare it at the same specificity with
   different values and silently won on all 174 document-page fields (review 2026-08-29
   §5.2). Only layout stays here. */
.lf-val > input,
.lf-val > select,
.lf-val > textarea { width: 100%; }
.lf-val > textarea { resize: vertical; min-height: 4.5rem; }
.lf-val.ro { font-weight: 600; font-size: 0.9rem; }
/* CR-596 / CR-602: a tick box is its own width at the start of the value cell, so it lines up with the boxes and
   dropdowns of the rows around it (owner, 21 Oct 2026: "Is it impossible to align the checkboxes with other
   controls?" ... "Other check boxes also align with controls"). The value cell's "width: 100%" had made a tick box
   as wide as the cell, and the browser draws the box in its middle. */
.lf-val > input[type="checkbox"] { width: auto; min-width: 0; padding: 0; margin: 0; }

/* Underline tabs rather than Access folder tabs. */
/* Was a solid yellow bar in Access; now a plain section caption. */
.lf-bar {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted, #5b6675);
    padding: 0.4rem 0 0.3rem;   /* CR-740 */
}

.lf-foot {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.lf-foot-notes { flex: 1 1 24rem; min-width: 18rem; }
.lf-calc { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }
.lf-calc-btn { font-weight: 600; }
/* The green-bordered GST box becomes an ordinary panel. */
.lf-gst {
    border: 1px solid var(--border, #dde3ea);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    background: var(--surface-alt, #f8fafc);
}
.lf-gst .lf-lbl { flex: 0 0 7.5rem; text-align: right; }
.lf-pct { flex: 0 0 5rem; }
.lf-pct input {
    width: 100%;
    text-align: right;
    padding: 0.3rem 0.45rem;
    font: inherit;
    font-size: 0.85rem;
    border: 1px solid var(--border, #d3dae3);
    border-radius: 6px;
}
.lf-amt { flex: 0 0 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* Totals as a summary card; emphasis by weight and a single accent, not by
   filling each row with a different colour. */
.lf-totals {
    flex: 0 0 27rem;
    border: 1px solid var(--border, #dde3ea);
    border-radius: 8px;
    background: var(--surface, #fff);
    padding: 0.35rem 0.5rem;
    box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
}
.lf-trow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.88rem;
    color: var(--muted, #5b6675);
}
.lf-trow > span:first-child { flex: 1 1 auto; text-align: right; }
.lf-trow .lf-amt { color: var(--text, #1f2937); font-weight: 500; }
.lf-trow.taxable,
.lf-trow.gst { color: var(--text, #1f2937); font-weight: 600; }
.lf-trow.grand {
    margin-top: 0.15rem;
    border-top: 1px solid var(--border, #dde3ea);
    padding-top: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #1f2937);
}
.lf-trow.grand .lf-amt { font-weight: 700; }

.lf-note { color: var(--muted, #5b6675); font-size: 0.78rem; margin-top: 0.9rem; }
.lf-note::before { content: "* "; color: #d92d20; font-weight: 700; }

@media (max-width: 900px) {
    .lf-head { grid-template-columns: 1fr; padding: 0.9rem; }
    .lf-row { flex-direction: column; align-items: stretch; gap: 0.2rem; min-height: 0; }
    .lf-lbl, .lf-gst .lf-lbl { flex: none; text-align: left; }
    .lf-totals { flex-basis: 100%; }
}

/* Legacy conditional row formatting on browse lists. The quotation list fills an
   accepted quotation's row green (Quotation List form1.png). */
.e-grid .e-row.row-accepted td.e-rowcell { background: #c6e7c8; }
.e-grid .e-row.row-accepted.e-selectionbackground td.e-rowcell { background: #a9dcae; }
/* An inactive (retired) row, greyed (CR-623: Calibration Scope, UUC Type wise). */
.e-grid .e-row.row-inactive td.e-rowcell { background: #eceff2; color: #7b8590; }
.e-grid .e-row.row-inactive.e-selectionbackground td.e-rowcell { background: #dfe3e7; }

.filter-bar .spacer { flex: 1 1 auto; }
/* CR-705 (owner, 10 Nov 2026): "Align filter options and Apply, Clear button on the right side in all pages."
   A list's one-row filters go to the right end of its toolbar; a filter bar on its own row (lists marked ic-end,
   and every report's criteria bar) packs its controls to the right. */
.ic-filter-toggle-row > .ic-filter-inline { margin-left: auto; justify-content: flex-end; }
.filter-bar.ic-end,
.filter-bar.no-print { justify-content: flex-end; }

/* ==========================================================================
   AlfaTech legacy document layouts (acl-*). Millimetre geometry MEASURED from
   the lab's own printed references (Legacy App Screenshots\Alfa-Tech Reports),
   19 Aug 2026 -- not designed. The PDF renderer's paged-chrome composer repeats
   everything marked .page-chrome on every page; the .doc-flow tbody flows.
   Keep in sync with CertificatePrintCss.
   ========================================================================== */
/* UN-MOVED from print-shared.css (CR-185): at equal specificity this rule must beat
   table.qtn-items td, which stays in app.css -- in print-shared it loaded first and
   lost the tie, which changed the item-row padding on the invoice and quotation
   prints (caught by the before/after computed-style check). The PDF renderer keeps
   its own embedded copy, as it does for every rule in this position. */
table.doc-flow td { padding: 0.55mm 0; vertical-align: top; line-height: 1.15; overflow-wrap: break-word; }
/* UN-MOVED from print-shared.css (CR-185), same reason as its neighbours: it must sit
   AFTER table.doc-flow td to keep winning the SRF cell padding, as it always did. */
table.acl-srf-items td { border-left: 0.3mm solid #000; border-bottom: 0.3mm solid #000; padding: 1mm 0.8mm; }
.acl-host { display: flex; justify-content: center; }
/* Screen preview only: the continuation-page chrome variant renders at page-2 coordinates and
   would overlay PART A (seen on the SRF preview, owner 19 Aug 2026). The PDF passes never load
   this file and control the variants themselves. */
.acl-doc .page-chrome-rest { display: none; }
/* Screen preview only: the PDF composer draws the full-height column rules; on screen the
   items table shows its column edges itself (owner: "Preview not showing table lines"). */
table.acl-items td { border-left: 0.3mm solid #000; }
table.acl-items td:last-child { border-right: 0.3mm solid #000; }
table.acl-items { border-bottom: 0.3mm solid #000; }
.acl-doc { position: relative; width: 187.5mm; height: 281.9mm; background: #fff;
           font-family: Cambria, "Times New Roman", Times, serif; font-size: 9pt; color: #000; }
table.srf-items th, table.srf-items td { border: 0.5pt solid #000; padding: 0.75mm 1mm; vertical-align: top; overflow-wrap: break-word; }
table.srf-items th { background: #f2f2f2; font-size: 8pt; }
/* Returnable Challan. Reuses the certificate sheet; only its own parts are here. */
.rc-head td.k, .rc-head td.k2 { white-space: nowrap; font-weight: normal; }
.rc-head td.k2 { padding-left: 4mm; }
.rc-items th, .rc-items td { font-size: 8pt; }
.rc-sub { font-size: 7pt; }
.rc-note { font-size: 8pt; margin-top: 1.5mm; }
.rc-sig td { vertical-align: top; padding-top: 6mm; }

/* ==========================================================================
   Paper stickers -- the legacy IDSticker and Sticker report layouts.

   Every measurement here is the report's own, converted at 1440 twips = 1 inch.
   Nothing is rounded to a "nice" millimetre: these sheets have to line up with
   the die-cut label stock the lab already buys, so the geometry is the spec.

     IDSticker  item 2700 x 480 twips = 47.63 x 8.47 mm, 4 across
     Sticker    item 1800 x 1320 twips = 31.75 x 23.28 mm, 6 across
     both       column spacing 72 twips = 1.27 mm, row spacing 0

   Page margins likewise: 360/720/360/720 twips for the ID sheet,
   576/288/336/360 for the descriptive one.
   ========================================================================== */

.sticker-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.sticker-toolbar .actions { display: flex; gap: 0.5rem; }

.sticker-sheet { display: flex; flex-wrap: wrap; align-content: flex-start; background: #fff; }
.sticker { position: relative; overflow: hidden; font-family: Cambria, Georgia, serif; page-break-inside: avoid; }
.sticker div { position: absolute; white-space: nowrap; overflow: hidden; font-size: 8pt; line-height: 1.05; }

/* -- IDSticker ---------------------------------------------------------- */
.sheet-id { width: 195.79mm; gap: 0 1.27mm; }
.id-sticker { width: 47.63mm; height: 8.47mm; }
/* Text122: full width, 240 twips high, BackColor 15724527 = #EFEFEF. */
.id-company { left: 0; top: 0; width: 47.63mm; height: 4.23mm; background: #efefef; }
/* Label49 "IDNO.": 8pt italic, ForeColor 3355443 = #333333. */
.id-label { left: 0; top: 4.23mm; width: 8.47mm; height: 4.23mm; font-style: italic; color: #333; }
/* LABIDNo: Left 480, Width 2220 twips. */
.id-value { left: 8.47mm; top: 4.23mm; width: 39.16mm; height: 4.23mm; }

/* -- Sticker (descriptive) ---------------------------------------------- */
.sheet-desc { width: 197.62mm; gap: 0 1.27mm; }
.desc-sticker { width: 31.75mm; height: 23.28mm; }
/* Left 60 twips = 1.06mm for every visible field; rows at 0/180/360/540/720/900/1080 twips. */
.d-labid   { left: 1.06mm; top: 0;       width: 30.69mm; height: 3.18mm; }
.d-prefix  { left: 1.06mm; top: 3.18mm;  width: 9.53mm;  height: 3.18mm; }
.d-code    { left: 1.06mm; top: 6.35mm;  width: 8.47mm;  height: 3.18mm; font-style: italic; }
.d-spec    { left: 1.06mm; top: 9.53mm;  width: 30.69mm; height: 3.18mm; }
.d-szlc    { left: 1.06mm; top: 12.70mm; width: 8.47mm;  height: 3.18mm; font-style: italic; }
.d-nominal { left: 10.58mm; top: 12.70mm; width: 21.17mm; height: 3.18mm; }
.d-make    { left: 1.06mm; top: 15.88mm; width: 30.69mm; height: 3.18mm; }
.d-mfg     { left: 1.06mm; top: 19.05mm; width: 30.69mm; height: 3.18mm; }

@media print {
    .sticker-sheet { gap: 0 1.27mm; }
    /* PrtMip margins, per report. Set on the sheet rather than @page so the two
       layouts can differ on one style sheet. */
    .sheet-id   { margin: 12.70mm 6.35mm 12.70mm 6.35mm; }
    .sheet-desc { margin: 5.08mm 5.93mm 6.35mm 10.16mm; }
}

/* -- Sticker Calibration ------------------------------------------------ */
/* item 1440 x 960 twips = 25.4 x 16.93 mm, 7 across, margins 720/230/314/2448. */
.sheet-cal { width: 186.27mm; gap: 0 1.27mm; }
.cal-sticker { width: 25.4mm; height: 16.93mm; }
/* CompanyLoGo: full width, Height 360 twips, SizeMode 1 (Stretch). */
.cal-sticker .c-logo { position: absolute; left: 0; top: 0; width: 25.4mm; height: 6.35mm; object-fit: fill; }
/* Rows at 360 / 540 / 720 twips; label column 0, values at 420 (I.D.) and 540 (dates). */
.c-idlabel  { left: 0;       top: 6.35mm;  width: 8.47mm;  height: 3.18mm; font-size: 6pt; font-style: italic; color: #000; }
.c-idvalue  { left: 7.41mm;  top: 6.35mm;  width: 18mm;    height: 3.18mm; font-size: 6pt; }
.c-callabel { left: 0;       top: 9.53mm;  width: 9.53mm;  height: 3.18mm; font-size: 7pt; font-style: italic; color: #000; }
.c-calvalue { left: 9.53mm;  top: 9.53mm;  width: 15.88mm; height: 3.18mm; }
.c-duelabel { left: 0;       top: 12.70mm; width: 9.53mm;  height: 3.18mm; font-size: 7pt; font-style: italic; color: #000; }
.c-duevalue { left: 9.53mm;  top: 12.70mm; width: 15.88mm; height: 3.18mm; }

@media print {
    .sheet-cal { margin: 4.06mm 5.54mm 43.18mm 12.70mm; }
}

/* -- Accutrace's Sticker Calibration / NonNABL (CR-544) ----------------- */
/* PrtMip: item 2639 x 1332 twips = 46.55 x 23.5 mm, 2 across, column spacing 162 twips, margins 48/78/36/180
   (top/right/bottom/left). Controls at the report's twips: Arial 7pt labels in italic, values bold. */
.sheet-acc { width: 95.96mm; gap: 0 2.86mm; }
.acc-sticker { width: 46.55mm; height: 23.5mm; font-family: Arial, Helvetica, sans-serif; }
.acc-sticker div { font-size: 7pt; }
.a-company { left: 0; top: 0; width: 37.04mm; height: 3.18mm; font-weight: 700; }
.acc-sticker .a-logo { position: absolute; left: 0; top: 3.18mm; width: 6.56mm; height: 5.5mm; object-fit: contain; }
.a-phone { left: 7.41mm; top: 3.18mm; width: 25.4mm; height: 3.18mm; font-style: italic; }
.a-email { left: 7.41mm; top: 6.35mm; width: 25.4mm; height: 3.18mm; font-style: italic; }
.acc-sticker .a-nabl { position: absolute; left: 34.93mm; top: 1.06mm; width: 11.64mm; height: 14.82mm; object-fit: contain; }
.a-lbl { left: 0; width: 9.53mm; height: 3.18mm; font-style: italic; }
.a-colon { left: 9.53mm; width: 1.06mm; height: 3.18mm; text-align: center; font-style: italic; }
.a-val { left: 10.58mm; width: 22.23mm; height: 3.18mm; font-weight: 700; }
.acc-sticker .a-wide { width: 36.04mm; font-size: 6pt; }
.acc-sticker .a-r1 { top: 9.53mm; }
.acc-sticker .a-r2 { top: 12.70mm; }
.acc-sticker .a-r3 { top: 15.88mm; }
.acc-sticker .a-r4 { top: 19.05mm; }

@media print {
    .sheet-acc { margin: 0.85mm 1.38mm 0.64mm 3.18mm; }
}

/* CR-075: the identification number under "Code :" on the descriptive sticker. The legacy
   control is hidden but present -- Left 540, Top 360, Width 1260 twips, 7pt -- so its own
   geometry is used rather than a new position invented for it. */
.d-codevalue { left: 9.53mm; top: 6.35mm; width: 22.23mm; height: 3.18mm; font-size: 7pt; }

/* Quotation header, corrected against qryQuotation's control geometry (18 Aug 2026).
   The report puts "QUOTATION" at Top=1440 -- below the To/address block, not at the top of
   the page -- and pairs Ref. No. with "Customer Ref. :" on the first row. */
.qtn-title { display: block; text-align: center; margin: 2mm 0 3mm; }
/* ==========================================================================
   Document prints: A4, letterhead band, logo and signature blocks.
   Owner, 18 Aug 2026 -- all reports print A4.
   ========================================================================== */
@page { size: A4; margin: 10mm; }

/* imgLetterHead spans the report width above everything else (quotation, challan, SRF). */
.doc-letterhead { margin-bottom: 3mm; }

/* The legacy invoice's imgLetterHead is a small image beside the lab's details
   (Left=60, Width=960 twips = 16.9mm), not a full band. Both dimensions are capped rather
   than the width fixed, so a portrait ("vertical") logo fits the same box as a landscape
   one instead of running down the page (owner, 18 Aug 2026). */
.inv-supplier-inner { display: flex; align-items: flex-start; gap: 2mm; }
.inv-supplier-text { flex: 1 1 auto; min-width: 0; }
.inv-logo { flex: 0 0 auto; width: auto; max-width: 20mm; max-height: 24mm; }

/* imgStamp on the quotation footer, between "For <company>" and the preparer. */
.doc-stamp { display: block; width: 26mm; margin: 1mm 0; }

/* Received By, its own block centred at the foot of the invoice. */
.inv-received { text-align: center; margin: 4mm auto 2mm; }

/* Item rows: every cell starts on the row's first line. A wrapped description in the name
   column otherwise lets Qty/Rate/Amount settle at different heights, and the printed
   quotation reads as though the numbers belong to other rows (owner, 18 Aug 2026). */
table.qtn-items td, table.qtn-items th { vertical-align: top; }
table.qtn-items td.num { white-space: nowrap; }

/* Letterhead/footer bands span the A4 content box, not their natural image size. */
.doc-letterhead, .doc-letterfooter { display: block; width: 100%; max-width: 194mm; margin-left: auto; margin-right: auto; }
.doc-letterfooter { margin-top: 3mm; }

/* ---- Work order: legacy TInward 1..10 acceptance review block -------------
   Rows had no rules of their own, so each control brought its own default
   height and the list ran long. Owner asked for it tightened (21 Aug 2026):
   label on the left, every control aligned in one narrow right column. */
.wo-bottom { margin-top: 0.9rem; }

.wo-review {
    display: grid;
    gap: 0.1rem;
    max-width: 48rem;
}

.wo-rrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    align-items: center;
    column-gap: 0.75rem;
    min-height: 1.5rem;
}

/* CR-602: a tick box at the start of the control column, in line with the dropdowns and the text box (owner,
   21 Oct 2026: "Align the check boxes of last 10 items with textboxes"); not stretched across the column. */
.wo-rctl > input[type="checkbox"] { width: auto; margin: 0; }

/* CR-597: one label size on every page -- the house 0.8 rem of .lf-lbl / .fg-label (owner, 21 Oct 2026). */
.wo-rlbl {
    font-size: 0.8rem;
    line-height: 1.2;
    color: var(--text, #1f2937);
}

.wo-rctl {
    display: flex;
    align-items: center;
    min-width: 0;
}

.wo-rctl > * { width: 100%; }

.wo-rctl input[type="text"] {
    padding: 0.15rem 0.4rem;
    font: inherit;
    font-size: 0.85rem;
}

/* UAT-071: the checkboxes of review items 1-5, 7 and 8 are reset so they sit at the control
   column's left edge. Without this they fell to `.wo-rctl > * { width: 100% }` above and
   stretched across the 15rem control column. Items 1-3 were radios from CR-080 until CR-312
   put the legacy's checkboxes back; the radio selector went with them. */
.wo-rctl input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.wo-rctl .e-input-group,
.wo-rctl .e-ddl { margin: 0; }

/* Quotation Terms / Remarks tabs: the legacy cmdAddSTDTerms / cmdAddSTDRemarks buttons with
   their QuotationType combo, sitting above the grid they append to. */
.actions.qtn-std {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.6rem;
}

.actions.qtn-std label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--icpro-neutral-700);
}

.actions.qtn-std select { font: inherit; font-size: 0.85rem; padding: 0.2rem 0.4rem; }

/* ---- Payment receipt print (owner request, 21 Aug 2026) --------------------
   No legacy report exists for this document, so it borrows the billing chrome the
   quotation and challan prints already use (.doc-letterhead, .qtn-title, .dc-head)
   and adds only what it needs of its own. Flow layout, not the millimetre-absolute
   .acl-doc geometry -- there is no printed original to measure against. */
.pr-doc {
    width: 194mm;
    margin: 0 auto;
    background: #fff;
    padding: 4mm 3mm;
    font-size: 9.5pt;
    color: #000;
}

.pr-section {
    margin: 4mm 0 1.5mm;
    font-weight: bold;
    font-size: 10pt;
}

table.pr-items { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
table.pr-items th, table.pr-items td { border: 0.5pt solid #000; padding: 1mm 1.5mm; }
table.pr-items th { background: #f2f2f2; text-align: left; }

.pr-right { text-align: right; }
.pr-centre { text-align: center; }

table.pr-totals {
    margin: 3mm 0 0 auto;
    width: 92mm;
    border-collapse: collapse;
    font-size: 9.5pt;
}

table.pr-totals td { border: 0.5pt solid #000; padding: 1mm 1.5mm; }
table.pr-totals tr.pr-grand td { font-weight: bold; }

.pr-words { margin: 3mm 0 0; font-size: 10pt; }
.pr-narration { margin: 2mm 0 0; }
.pr-note { margin: 2mm 0 0; font-size: 8.5pt; font-style: italic; }

.pr-sign { margin-top: 10mm; text-align: right; }
.pr-sign-for { font-weight: bold; }
.pr-sign-img { display: inline-block; height: 16mm; margin: 1mm 0; }
.pr-sign-role { margin-top: 10mm; font-weight: bold; }

@media print {
    .pr-doc { width: auto; padding: 0; }
}

/* The item's Additional Parameters under the results table (the legacy lblObservations:
   left-aligned, 9pt, one line per parameter, grows with the content). Named cert-* because
   the item dialog already has a table.addl-params of its own. */
.cert-addl-params { margin: 1.2mm 0 0.6mm; font-size: 8.5pt; line-height: 1.3; }
/* pre-wrap: the legacy composes "name :   value" with THREE spaces after the colon
   (Calibration Certificate.txt :5935, :5944) and HTML would collapse them to one. */
.cert-addl-param { text-align: left; white-space: pre-wrap; }

/* Additional Parameters on the calibration screen: names and units carried from the UUC type,
   values measured here. Five fixed slots, matching the five stored columns. */
.param-grid { width: 100%; max-width: 46rem; border-collapse: collapse; margin: 0 0 0.6rem; }
.param-grid th, .param-grid td { border: 1px solid var(--icpro-line); padding: 0.2rem 0.35rem; }
.param-grid th { background: var(--icpro-neutral-100, #f3f4f6); font-size: 0.78rem; text-align: left; font-weight: 600; }
.param-grid td { font-size: 0.82rem; }
.param-grid input { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.82rem; padding: 0.15rem 0.3rem; }

/* ---- Authorise certificates table -----------------------------------------
   Fixed layout with a width on every column (owner, 21 Aug 2026): the browser was
   sizing them from content, so a long refusal message squeezed the certificate number
   into two lines. */
.auth-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.auth-grid th,
.auth-grid td {
    border: 1px solid var(--icpro-line);
    padding: 0.3rem 0.45rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.auth-grid th {
    background: var(--icpro-neutral-100, #f3f4f6);
    font-weight: 600;
    white-space: nowrap;
}

.auth-grid tbody tr { cursor: pointer; }
.auth-grid tbody tr:hover { background: var(--icpro-neutral-100, #f3f4f6); }
.auth-grid tbody tr.is-picked { background: var(--icpro-accent-100, #e0e7ff); }
/* Authorise job requests (CR-480): the same table, but a row click does nothing there. */
.auth-grid.no-pick tbody tr { cursor: default; }

.auth-grid .auth-pick { width: 2.2rem; text-align: center; }
.auth-grid .auth-cert { width: 11rem; }
.auth-grid .auth-lab { width: 12rem; }
/* UUC Type and STD Specification columns (owner, 28 Aug 2026). */
.auth-grid .auth-uuc { width: 11rem; }
.auth-grid .auth-spec { width: 11rem; }
.auth-grid .auth-cust { width: 14rem; }
.auth-grid .auth-fmt { width: 5rem; }
.auth-grid .auth-date { width: 7rem; white-space: nowrap; }
.auth-grid .auth-authd { width: 9.5rem; white-space: nowrap; }
.auth-grid .auth-by { width: 10rem; }
.auth-grid .auth-ready { width: auto; }
/* The columns above add up to ~100rem; below that the fixed layout scaled every column down and
   "Ready?" -- the one carrying the refusal text -- collapsed to a sliver on a 1366px laptop
   (CR-568, review §G). Now the table keeps its widths and the wrapper scrolls sideways. */
.auth-grid:not(.no-pick) { min-width: 116rem; }

/* The calibration screen's equipment grid (CR-568): nine columns whose declared widths add up to
   ~65rem could not live inside the 46rem cap the additional-parameters grid needs, so Description
   was squeezed out. Sized by its columns inside its own box, like every sheet. */
.param-grid.equip-grid { max-width: none; width: auto; min-width: 100%; }
.param-grid.equip-grid th { white-space: nowrap; }


/* Acceptance Criteria cells keep the line breaks the legacy report's captions carry, which is
   what makes a two-line column heading read as two lines rather than one long run. Scoped to
   this table so no other results grid changes. */
.grid.results.acceptance td, .grid.results.acceptance th { white-space: pre-line; }

/* Login: "Forgot password?" beside the password label, and the keep-me-signed-in tick under it
   (owner, 21 Aug 2026). */
.ic-login-field .ic-login-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ic-login-forgot { font-size: 0.78rem; font-weight: 400; text-decoration: underline; }

.ic-login-remember {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.15rem 0 0.9rem;
    font-size: 0.84rem;
}

.ic-login-remember input { margin: 0; }

/* The Forgot password page: same panel as the sign-in form, explaining the route. */
.ic-login-steps { margin: 0.6rem 0 0.9rem 1.1rem; padding: 0; font-size: 0.88rem; line-height: 1.5; }
.ic-login-steps li { margin-bottom: 0.3rem; }
.ic-login-note { font-size: 0.82rem; color: var(--icpro-neutral-700); margin-bottom: 1rem; }

/* ---- Equipment(s) Used for Calibration -------------------------------------
   The legacy TCalibrationEquipments subform, on the Calibration Observations
   Basic Info page. Only the Equipment ID is an input: every other column is
   read across from the equipment master and was never saved, so it is shown as
   text rather than as a box that looks editable. */
.lf-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lf-bar-btns { display: inline-flex; gap: 0.4rem; }
.lf-linkbtn {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: none;
    color: var(--accent, #2f6fa8);
    border: 1px solid var(--border, #dde3ea);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    background: var(--surface, #fff);
}
.lf-linkbtn:hover { background: var(--surface-alt, #f4f7fa); }
.lf-linkbtn.off { color: var(--muted, #8b95a3); }

.equip-grid { max-width: 72rem; }
.equip-grid td.ro {
    color: var(--text, #1f2937);
    background: var(--surface-alt, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* The legacy paints Valid Up To a fixed cyan (BackColor 13817600) so the eye
   lands on the standard's expiry first. Kept, at web contrast. */
.equip-grid td.eq-valid { background: #d6f5f2; font-variant-numeric: tabular-nums; }
.equip-grid .eq-pick { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.82rem; }
.equip-grid tr.eq-expired td.eq-valid { background: #fde2e1; }
.equip-grid tr.eq-new td { background: var(--surface, #fff); }
.equip-grid .eq-del {
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--muted, #8b95a3);
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
}
.equip-grid .eq-del:hover { color: #b42318; }
.lf-note.warn { color: #b42318; }

/* ---- Accuracy / Uncertainty panels, under the equipment grid ---------------
   The legacy opens mEquipmentAccuracy View and mEquipmentMU View as separate
   read-only datasheets. Here they open UNDER the grid (owner, 21 Aug 2026): the
   operator is mid-calibration and should not lose the form to read a number. */
.eq-panel {
    border: 1px solid var(--icpro-line, #dde3ea);
    border-radius: 8px;
    background: var(--icpro-surface, #fff);
    padding: 0.55rem 0.8rem 0.7rem;
    margin: 0 0 0.9rem;
    max-width: 72rem;
}
.eq-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.eq-panel-close {
    border: 0; background: none; cursor: pointer; line-height: 1;
    font-size: 1.15rem; color: var(--icpro-muted, #8b95a3); padding: 0 0.15rem;
}
.eq-panel-close:hover { color: var(--icpro-text, #1f2937); }
.eq-panel-scroll { overflow-x: auto; }
.eq-detail-grid { max-width: none; width: max-content; min-width: 100%; margin: 0; }
.eq-detail-grid td { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.eq-detail-grid td.left { text-align: left; }
.eq-detail-grid th { white-space: nowrap; }
/* The button whose panel is open. */
.lf-linkbtn.on { background: var(--icpro-neutral-100, #eef2f7); border-color: var(--icpro-line, #c8d2de); }
/* The row both buttons act on. */
.equip-grid tr.eq-picked td { box-shadow: inset 0 0 0 9999px rgba(47, 111, 168, 0.06); }
.equip-grid tbody tr { cursor: pointer; }

/* ---- Calibration Observations: sticky title + instrument strip -------------
   Owner, 21 Aug 2026. On a long results tab the operator was scrolling away
   from both Save and the record they were working on. */
.cal-sticky {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--icpro-bg, #f7f9fc);
    padding-top: 0.25rem;
    box-shadow: 0 1px 0 var(--icpro-line, #dde3ea), 0 6px 10px -8px rgb(16 24 40 / 25%);
}
.cal-sticky .page-head { margin-bottom: 0.4rem; }
/* CR-702 (owner, 9 Nov 2026): the actions at the right, with the Prepared / Modified stamps under them, right-aligned;
   each stamp reads as two short label | value lines. The locked note sits level with Save, not at the top of its row. */
.cal-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; min-width: 0; }
.cal-head-right .actions { justify-content: flex-end; align-items: center; flex-shrink: 1; }
.cal-head-right .ic-record-stamp { justify-content: flex-end; gap: 0.2rem 1.5rem; }
.cal-head-right .ic-record-stamp-col { gap: 0.05rem 0.5rem; }
.cal-head-right .ic-record-stamp-col dt { font-size: 0.75rem; }
.cal-head-right .ic-record-stamp-col dd { font-size: 0.8rem; }

/* ---- The Readings step: a shorter head (owner, 11 Nov 2026) ------------------
   On a 1366 x 768 screen the title, the instrument strip, the step bar, the tabs and the Template ID strip
   left between one and six reading rows above the fold, and the title and strip stay pinned, so scrolling
   did not give the room back. While the Calibration Results tab is open (.compact on .cal-sticky) the same
   things are drawn smaller and closer together: nothing is added, removed or reordered. Set-up, Uncertainty
   and Review keep the full head. The step bar, tabs and Template ID strip follow the head as its siblings. */
.cal-sticky.compact { padding-top: 0.1rem; }
.cal-sticky.compact .page-head { margin-bottom: 0.2rem; gap: 0.75rem; }
.cal-sticky.compact .page-head > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
.cal-sticky.compact .page-head h1 { font-size: 1.15rem; margin: 0; }
.cal-sticky.compact .cal-head-right { gap: 0.15rem; }
.cal-sticky.compact .cal-head-right .ic-record-stamp { gap: 0 1.25rem; }
/* Each stamp on one line (who, then when) instead of two. */
.cal-sticky.compact .cal-head-right .ic-record-stamp-col { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; }
.cal-sticky.compact .cal-banner { gap: 0.15rem 0.9rem; padding: 0.25rem 0.7rem; margin: 0.2rem 0; font-size: 0.8rem; }
.cal-sticky.compact ~ .cal-steps { margin: 0.3rem 0 0.25rem; }
.cal-sticky.compact ~ .cal-steps .cal-step { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.cal-sticky.compact ~ .ic-tabs.entry { margin-bottom: 0.35rem; }
.cal-sticky.compact ~ .cal-tplbar { padding: 0.25rem 0.65rem; margin: 0.3rem 0; }
.cal-locked-note { margin: 0 0.15rem; white-space: nowrap; line-height: 1.2; }
/* The scope / accuracy pickers, sized like the other controls in the column. */
.lf-pick { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.85rem; padding: 0.25rem 0.35rem; }

/* ---- Reports index (CR-204) ------------------------------------------------
   Sixteen reports in three groups, the four run most often pinned in the accent fill,
   variants as sub-links under their parent. The name link stretches over its card so the
   whole card clicks; a variant link layers above it. */
.rep-lbl { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
           color: var(--icpro-muted, #6b7683); margin-bottom: 0.2rem; }
.rep-section { margin-bottom: 1.5rem; }
.rep-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
                border-bottom: 1px solid var(--icpro-line-strong, #c9d3de); padding-bottom: 0.3rem; margin-bottom: 0.75rem; }
.rep-sec-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
                 color: var(--icpro-accent, #2f6fa8); }
/* auto-fill since CR-720: a group of one card no longer stretches across the page. */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; }
.rep-card { position: relative; border: 1px solid var(--icpro-line-strong, #c9d3de);
            background: var(--icpro-surface, #fff); padding: 0.7rem 0.9rem; }
.rep-card:hover { border-color: var(--icpro-accent, #2f6fa8); background: var(--icpro-accent-soft, #eaf1f8); }
.rep-name { font-weight: 700; font-size: 0.95rem; line-height: 1.15; color: inherit; text-decoration: none; }
.rep-name::after { content: ""; position: absolute; inset: 0; }
.rep-desc { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--icpro-muted, #6b7683); }
.rep-variants { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.rep-also { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--icpro-muted, #6b7683); }
.rep-vlink { position: relative; z-index: 1; font-size: 0.78rem; color: var(--icpro-accent, #2f6fa8); text-decoration: none; }
.rep-vlink:hover { text-decoration: underline; }
.rep-vnote { font-size: 0.78rem; color: var(--icpro-muted, #6b7683); }
/* CR-720 (owner's "ICPro Reports Redesign" canvas, 15 Nov 2026): three areas, a chip each, a badge and a star on
   every card, and the user's own pins at the top. The house font and card shape stay; only the area colours are
   the canvas's, and they colour the badge, the chip's dot and the area heading's rule. */
.rep-area-lab { --rep-ink: var(--icpro-accent-700, #416180); --rep-tint: var(--icpro-accent-soft, #eef6ff); }
.rep-area-acc { --rep-ink: #a4480c; --rep-tint: #fbefe3; }
.rep-area-qual { --rep-ink: #0f6b63; --rep-tint: #e3f3f1; }
.rep-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.1rem; }
.rep-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem; font: inherit;
            font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--icpro-ink);
            background: var(--icpro-surface, #fff); border: 1px solid var(--icpro-line-strong, #c9d3de); border-radius: 999px; }
.rep-chip:hover { border-color: var(--icpro-accent, #2f6fa8); }
.rep-chip:focus-visible { outline: 2px solid var(--icpro-accent, #2f6fa8); outline-offset: 1px; }
.rep-chip.on { background: var(--icpro-accent, #2f6fa8); border-color: var(--icpro-accent, #2f6fa8); color: #fff; }
.rep-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--rep-ink); }
.rep-chip.on .rep-dot { background: #fff; }
.rep-chip-count { font-size: 0.74rem; padding: 0 0.45rem; border-radius: 999px; background: var(--icpro-neutral-100, #f2f5f8); color: var(--icpro-muted, #6b7683); }
.rep-chip.on .rep-chip-count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.rep-area { margin-bottom: 0.5rem; }
.rep-area-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin: 0 0 0.75rem;
                 padding-bottom: 0.35rem; border-bottom: 2px solid var(--rep-ink); }
.rep-area-head h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--rep-ink); }
.rep-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.1rem; height: 2.1rem;
             border-radius: 4px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em;
             background: var(--rep-tint); color: var(--rep-ink); }
.rep-card { display: flex; flex-direction: column; }
.rep-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.rep-star { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
            width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.rep-star svg { fill: none; stroke: var(--icpro-muted, #6b7683); }
.rep-star:hover { background: var(--icpro-neutral-100, #f2f5f8); }
.rep-star:focus-visible { outline: 2px solid var(--icpro-accent, #2f6fa8); }
.rep-star.on svg { fill: #e0a100; stroke: #b07d00; }
.rep-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.6rem;
                 font-size: 0.74rem; color: var(--icpro-muted, #6b7683); }
.rep-card .rep-variants { margin-bottom: 0.1rem; }
.rep-open { font-weight: 600; color: var(--rep-ink); }
.rep-pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.6rem; }
.rep-pin { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; text-decoration: none; color: var(--icpro-ink);
           background: var(--icpro-surface, #fff); border: 1px solid var(--icpro-line-strong, #c9d3de); border-radius: 4px; }
.rep-pin:hover { border-color: var(--icpro-accent, #2f6fa8); background: var(--icpro-accent-soft, #eaf1f8); }
.rep-pin-text { display: flex; flex-direction: column; min-width: 0; }
.rep-pin-name { font-weight: 650; font-size: 0.9rem; line-height: 1.2; }
.rep-pin-area { font-size: 0.74rem; color: var(--icpro-muted, #6b7683); }

/* ---- Authorised signatories matrix (CR-203) --------------------------------
   One matrix, employees down, disciplines across as three-column groups. The round-2
   design replaces three stacked copies of the same five-by-three table. Plain markup,
   per the handoff's own note — not a data-grid use case. */
.sig-tools { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.sig-tools .muted.small { margin-left: auto; padding-bottom: 0.45rem; }
.sig-lbl { display: block; font-size: 0.8rem; /* CR-597: the house label */
           color: var(--icpro-muted, #6b7683); margin-bottom: 0.2rem; }
.sig-find input { width: 240px; }
.sig-leavers { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem;
               cursor: pointer; padding-bottom: 0.45rem; }
.sig-matrix { border-collapse: collapse; width: 100%; min-width: 1080px;
              border: 1px solid var(--icpro-line-strong, #c9d3de); background: var(--icpro-surface, #fff); }
.sig-matrix th, .sig-matrix td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--icpro-line, #e2e8ef); }
.sig-matrix thead th { background: var(--icpro-neutral-100, #f2f5f8); }
.sig-matrix .sig-disc { text-align: center; border-left: 1px solid var(--icpro-line-strong, #c9d3de); border-bottom: none; }
.sig-matrix .sig-disc div { font-weight: 700; }
.sig-matrix .sig-sub { text-align: center; font-size: 0.7rem; text-transform: uppercase;
                       letter-spacing: 0.05em; color: var(--icpro-muted, #6b7683); padding: 0 0.25rem 0.35rem;
                       border-bottom: 1px solid var(--icpro-line-strong, #c9d3de); }
.sig-matrix .sig-group { border-left: 1px solid var(--icpro-line-strong, #c9d3de); }
.sig-mini { appearance: none; background: none; border: 0; padding: 0; font: inherit;
            font-size: 0.72rem; letter-spacing: 0.03em; text-transform: none;
            color: var(--icpro-accent, #2f6fa8); cursor: pointer; }
.sig-mini:hover { text-decoration: underline; }
.sig-matrix .sig-name-col { text-align: left; min-width: 200px; }
.sig-matrix .sig-sum-col { text-align: left; min-width: 180px; border-left: 1px solid var(--icpro-line, #e2e8ef); }
.sig-name { font-size: 0.9rem; }
.sig-role { font-size: 0.75rem; color: var(--icpro-muted, #6b7683); display: flex; align-items: center; gap: 0.4rem; }
.sig-tag { font-size: 0.66rem; border: 1px solid var(--icpro-line-strong, #c9d3de); border-radius: 999px;
           padding: 0 0.45rem; color: var(--icpro-muted, #6b7683); white-space: nowrap; }
.sig-matrix .sig-tick { text-align: center; font-variant-numeric: tabular-nums; }
.sig-matrix tbody tr:hover td { background: var(--icpro-accent-soft, #eaf1f8); }
.sig-matrix tr.sig-left .sig-name { color: var(--icpro-muted, #6b7683); }
.sig-matrix tr.sig-left input[type="checkbox"] { opacity: 0.35; }
.sig-matrix tfoot td { background: var(--icpro-neutral-100, #f2f5f8); font-size: 0.8rem;
                       color: var(--icpro-muted, #6b7683); border-top: 1px solid var(--icpro-line-strong, #c9d3de); }
.sig-gap { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.75rem;
           border: 1px solid var(--icpro-accent, #2f6fa8); padding: 0.6rem 0.9rem; max-width: 60rem; }
.sig-gap p { margin: 0; font-size: 0.85rem; }
.sig-gap .e-icons { margin-top: 0.1rem; color: var(--icpro-accent, #2f6fa8); }

/* ---- Employee signature ----------------------------------------------------
   One JPG per employee, named after them, as the legacy keeps them. */
.emp-sign { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; padding: 0.35rem 0; }
.emp-sign-view {
    flex: 0 0 auto;
    min-width: 14rem; min-height: 4.5rem;
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--icpro-line, #dde3ea);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    background: var(--icpro-surface, #fff);
}
.emp-sign-img { max-height: 4.5rem; max-width: 20rem; }
/* The photograph sits in the same row shape as the signature, but portrait: a headshot in a
   signature's letterbox would be cropped to a forehead. */
.emp-photo-view {
    display: flex; align-items: center; justify-content: center;
    min-width: 9rem; min-height: 9rem; padding: 0.5rem;
    border: 1px solid var(--ic-border, #d5d9e0); border-radius: 4px; background: #fff;
}
.emp-photo-img { max-height: 8rem; max-width: 8rem; object-fit: contain; }
.emp-sign-actions { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
/* Photo and Signature side by side in one section (CR-619); one above the other on a phone. */
.emp-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }
.emp-media-col { min-width: 0; }
@media (max-width: 720px) { .emp-media { grid-template-columns: 1fr; } }

/* The Template ID / Range / Add strip above the Calibration Results tabs (CR-150). */
.cal-tplbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem;
              padding: 0.5rem 0.65rem; margin: 0.5rem 0; background: #f4f7fa;
              border: 1px solid #dbe3ec; }
.cal-tplbar-label { font-size: 0.8rem; font-weight: 600; color: #3a5f85; } /* CR-597: the house label size and case */
.cal-tplbar-pick { min-width: 18rem; }
.cal-tplbar-range { font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.cal-tplbar-id { display: inline-block; min-width: 3.5rem; font-weight: 600; color: #3a5f85;
                 font-variant-numeric: tabular-nums; }
.cal-tplbar-pick .e-list-item span + span { margin-left: 0.6rem; }
/* The two prints live at the right-hand end of the strip -- pushed there rather than placed,
   so they stay put however wide the Template ID picker and the range boxes turn out to be. */
.cal-tplbar-prints { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }

/* ---------------------------------------------------------------------------
   The heading line of an entry table: its caption on the left, the buttons that
   act ON it on the right. Owner, 25 Aug 2026 -- the actions used to sit in a row
   underneath, where they read as page-level buttons rather than table ones.
   --------------------------------------------------------------------------- */
/* Same light band as the table headers beneath them (owner, 1 Sep 2026). */
.ic-entry-head { display: flex; align-items: baseline; justify-content: space-between;
                 gap: 1rem; margin: 0.75rem 0 0.35rem; flex-wrap: wrap;
                 background: var(--icpro-neutral-100); padding: 0.35rem 0.6rem;
                 border-bottom: 1px solid var(--icpro-line); }
.ic-entry-head .section-title { margin: 0; }
.ic-entry-head .row-actions { flex: 0 0 auto; }

/* ---------------------------------------------------------------------------
   The parameter list, and the grid the chosen parameter opens beneath it.
   CLAUDE.md 1.0b: mCalibrationDetails / TCalibrationDetails are lists of
   PARAMETERS, and each row names the grid it opens. Owner, 25 Aug 2026, on where
   that grid goes: "format 41-46 should open in same results page but below the
   Selected Parameters table."

   None of these classes existed. The whole surface was rendering unstyled, which
   is its own answer to "couldn't understand that is this a data entry form or
   report".
   --------------------------------------------------------------------------- */
.parameter-list { margin: 0 0 1rem; }

/* The row whose grid is open stays marked, so the table and the panel below it
   still read as connected once the table has scrolled out of view. */
table.ic-entry tr.is-open > td { background: var(--icpro-entry-soft); }
table.ic-entry tr.is-open > td:first-child { box-shadow: inset 3px 0 0 var(--icpro-entry); }

.parameter-panel {
    border: 1px solid var(--icpro-line);
    border-top: 3px solid var(--icpro-entry);
    border-radius: var(--icpro-radius-sm);
    background: var(--icpro-surface);
    padding: 0.75rem 0.9rem 1rem;
    margin: 0 0 1rem;
    box-shadow: var(--icpro-shadow-sm);
}
.parameter-panel > .ic-entry-head { margin-top: 0; }
.parameter-panel .section-title .muted { font-weight: 400; font-size: 0.8rem; }
.cal-tplbar-confirm { border: 1px solid #e0b4b4; background: #fdf5f5; padding: 0.6rem 0.75rem;
                      margin: 0 0 0.5rem; }
.cal-tplbar-confirm p { margin: 0 0 0.5rem; font-size: 0.9rem; }

/* Range and least count on one line (owner, 23 Aug 2026). */
.lf-val.lf-inline { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.lf-val.lf-inline input { width: 6.5rem; }
/* CR-622: the 6.5rem above is for a short number box; a tick box or radio keeps its own size beside its caption, and a
   plain dropdown in the row takes the width of the Syncfusion ones beside it rather than the whole row. */
.lf-val.lf-inline label { display: inline-flex; align-items: center; gap: 0.35rem; }
.lf-val.lf-inline input[type="checkbox"],
.lf-val.lf-inline input[type="radio"] { width: auto; min-width: 0; margin: 0; padding: 0; flex: 0 0 auto; }
.lf-val.lf-inline > select { width: 18rem; min-height: 2rem; flex: 0 0 auto; }
.lf-join { color: #6a6a6a; font-size: 0.85rem; }
.tpl-field.tpl-span { grid-column: 1 / -1; }
.tpl-pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 720px) { .tpl-pair { grid-template-columns: 1fr; } }
/* The UUC type is what the list is scanned by. */
.ic-cell-secondary.ic-cell-strong { font-weight: 600; color: #333; }
/* Why an item is not on Authorise Certificates (CR-155). */
.auth-why { border: 1px solid #dbe3ec; background: #f4f7fa; padding: 0.6rem 1rem; max-width: 46rem; margin: 0 0 0.75rem; }
.auth-why > summary { cursor: pointer; font-weight: 600; color: #3a5f85; }
.auth-why[open] > summary { margin-bottom: 0.5rem; }
.auth-why p { margin: 0 0 0.4rem; }
.auth-why ol { margin: 0 0 0.4rem 1.1rem; padding: 0; }
.auth-why li { margin: 0.25rem 0; }
/* An item an outside agency calibrated (CR-157). */
.cal-locked { border: 1px solid #dbe3ec; background: #f4f7fa; padding: 0.75rem 1rem; margin: 0.5rem 0; max-width: 52rem; }
.cal-locked p { margin: 0 0 0.4rem; }
.cal-locked p:last-child { margin-bottom: 0; }
/* A field a failed save is still waiting on (CR-164).
   The owner asked for a red border after Save rather than a moved cursor: it shows EVERY field
   still missing, and does not depend on which control happens to be focusable. Applied by
   icpro.markInvalid to the element carrying the id -- or, for a Syncfusion control, to the wrapper
   that actually paints the border. */
.ic-invalid,
input.ic-invalid,
select.ic-invalid,
textarea.ic-invalid {
    border: 1px solid #c0392b !important;
    background: #fdf5f5;
    outline: none;
}
.ic-invalid:focus,
input.ic-invalid:focus,
select.ic-invalid:focus {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}
/* Syncfusion paints its border on the wrapper; the inner input is transparent. */
.e-input-group.ic-invalid,
.e-input-group.ic-invalid.e-control-wrapper {
    border-color: #c0392b !important;
    background: #fdf5f5;
}
/* The reason, under the ringed box (review 31 Oct 2026, §2.2; owner: "red border or any text below the
   control"). Written by icpro.markInvalid and removed with the ring, as soon as the box is typed into. */
.ic-invalid-msg {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #b42318;
}
/* Out of flow where the box sits directly in a grid or flex container, so no field moves (icpro.js). */
.ic-invalid-msg.ic-invalid-msg-float {
    position: absolute;
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 1;
}


/* --------------------------------------------------------------------------
   Horizontal scroll container for a wide table.

   Used by the Format 54/55, 41-46 and Impact entry grids and by the UUC type's
   Variants grid. It was being used before it was defined -- the class was on the
   markup from the day those grids were written and matched nothing, so a wide
   grid pushed the page sideways instead of scrolling inside its own box.
   -------------------------------------------------------------------------- */
/* min-width:0 as well as max-width:100%. A flex or grid ITEM defaults to min-width:auto, which
   is its content's intrinsic width -- so a wide table inside one grows the item rather than
   scrolling inside it, and the PAGE ends up scrolling sideways. That is what the quotation item
   table did the moment it stopped being a Syncfusion grid: 351px of page overflow at a 777px
   viewport, with the scroller itself reporting no overflow at all because it had been allowed to
   grow to 1108px. */
.scroll-x { overflow-x: auto; max-width: 100%; min-width: 0; }

/* --------------------------------------------------------------------------
   UUC type Variants (CR-169) -- ISO/ASTM, Analogue/Digital, Pneumatic/Hydraulic.
   -------------------------------------------------------------------------- */
.gitype-variants { margin-top: 1.25rem; }
.gitype-variants h3 { margin: 0 0 .25rem; }
.gitype-variants .muted { margin: 0 0 .6rem; font-size: .8rem; }
.gitype-variants .ic-entry { min-width: 34rem; }
.gitype-variants .ic-entry td .num { width: 5rem; }

/* A retired variant stays listed -- rows that already carry its code must keep
   resolving it -- but reads as inactive. */
.gitype-variants .ic-entry tr.row-off td { opacity: .55; }

/* --------------------------------------------------------------------------
   Format 71 -- the dial-division matrix (CR-172).

   Turns down the side, divisions across the top. The corner cell carries the
   legacy form's own two-way label, which is what explains the grid at a glance.
   -------------------------------------------------------------------------- */
.f71 { margin-top: .5rem; }
.f71-grid { min-width: 40rem; }
.f71-grid td .num { width: 4.5rem; text-align: right; }

/* The corner cell states both axes, as the legacy's Label102 does. */
.f71-corner { text-align: left; white-space: nowrap; }
.f71-corner .f71-cols,
.f71-corner .f71-rows { display: block; font-size: .78rem; line-height: 1.25; font-weight: 600; }
.f71-corner .f71-rows { padding-left: .25rem; }

/* The turn number is a row header, not a reading. */
.f71-grid th.f71-turn { text-align: center; font-weight: 600; }

/* Forward / Reverse band, shown only when both runs exist. */
.f71-grid tr.f71-direction td {
    font-weight: 600;
    text-align: left;
    padding-top: .4rem;
}

/* A migrated turn is read-only and says so quietly. */
.f71-grid tr.row-migrated td .num { background: transparent; border-style: dashed; }

.f71-note { margin: .4rem 0 .2rem; font-size: .85rem; }

/* Format 71's printed matrix (CR-173). The corner cell carries the legacy's own
   "DIVISION->" caption; turns run down the side. */
.f71-print th.f71-print-corner { text-align: left; white-space: nowrap; }
.f71-print th.f71-print-row { text-align: left; white-space: nowrap; font-weight: 600; }
.f71-print td { text-align: right; }


/* ---------------------------------------------------------------------------
   MU Study worksheet (owner-approved redesign from the Claude Design canvas,
   28 Aug 2026 -- CR-190). The page is a four-step worksheet and now says so:
   a stepper map, the ~30 setup fields in six named clusters, Type A statistics
   BESIDE the readings that make them, and the result in its own card.
   --------------------------------------------------------------------------- */
.mu-stepper { display: flex; background: var(--icpro-surface); border: 1px solid var(--icpro-line);
              border-radius: var(--icpro-radius); box-shadow: var(--icpro-shadow-sm);
              overflow: hidden; margin-bottom: 1rem; }
.mu-step { flex: 1 1 0; display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem;
           border-right: 1px solid var(--icpro-line); font-size: 0.85rem; font-weight: 600;
           color: var(--icpro-muted); min-width: 0; }
.mu-step:last-child { border-right: 0; }
.mu-step.done { background: var(--icpro-accent-soft); color: var(--icpro-ink); }
.mu-step .n { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: flex; align-items: center;
              justify-content: center; font-size: 0.75rem; font-weight: 700; flex: 0 0 auto;
              background: var(--icpro-surface); border: 1.5px solid var(--icpro-faint);
              color: var(--icpro-muted); }
.mu-step.done .n { background: var(--icpro-accent); border-color: var(--icpro-accent); color: #fff; }

.mu-card { background: var(--icpro-surface); border: 1px solid var(--icpro-line);
           border-radius: var(--icpro-radius); box-shadow: var(--icpro-shadow-sm);
           padding: 1rem 1.15rem; margin: 0 0 1rem; min-width: 0; }
fieldset.mu-card { border-style: solid; }
.mu-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
                padding-bottom: 0.4rem; border-bottom: 1px solid var(--icpro-line);
                margin-bottom: 0.75rem; flex-wrap: wrap; }
.mu-card-head .section-title { margin: 0; border: 0; padding: 0; }
.mu-card-head .row-actions { display: flex; gap: 0.5rem; flex: 0 0 auto; }
.mu-note { font-size: 0.78rem; color: var(--icpro-muted); line-height: 1.4; margin: 0.5rem 0 0; }

.mu-clusters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem 1.3rem; }
.mu-cluster { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.mu-cluster-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
                    text-transform: uppercase; color: var(--icpro-accent); }
.mu-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.mu-fields.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mu-fields.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mu-fields label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; /* CR-597 */
                   font-weight: 600; color: var(--icpro-muted); min-width: 0; }
.mu-fields label.span-2 { grid-column: span 2; }
.mu-fields label.span-3 { grid-column: span 3; }

.mu-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.mu-row-budget { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.mu-row .mu-card, .mu-row-budget .mu-card { margin-bottom: 0; }
.mu-row, .mu-row-budget { margin-bottom: 1rem; }

.mu-result-box { border: 1px solid var(--icpro-accent); background: var(--icpro-accent-soft);
                 border-radius: var(--icpro-radius-sm); padding: 0.7rem 0.85rem; margin-top: 0.75rem; }
.mu-result-box .cap { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
                      text-transform: uppercase; color: var(--icpro-accent); }
.mu-result-box .val { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mu-result-box .sub { font-size: 0.78rem; color: var(--icpro-muted); }

@media (max-width: 1100px) {
    .mu-clusters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mu-row, .mu-row-budget { grid-template-columns: 1fr; }
}

/* ===== Customer portal (CR-223) — the lab's face: a short bar, no lab navigation ===== */
.portal-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--icpro-canvas); }
/* CR-714 (owner, 14 Nov 2026; design canvas "Customer Portal Top Bar"): one bar of fixed height. The lab's name
   stays on one line; each page name stays on one line and the open page carries a bar under it; the signed-in
   address, Change password and Sign out are one account menu. Under 1180px the page names take a row of their own
   that scrolls sideways, instead of every name breaking onto two or three lines. */
.portal-bar {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 1.75rem; padding: 0 1.5rem; min-height: 56px;
    background: var(--icpro-accent-900); color: #fff; border-bottom: 3px solid var(--icpro-accent);
}
.portal-brand { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 19rem; padding: 0.45rem 0; color: #fff; text-decoration: none; }
.portal-brand-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-brand-sub { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--icpro-accent-300); }
.portal-nav { display: flex; align-items: stretch; gap: 0.25rem; flex: 1 1 auto; min-width: 0; }
.portal-nav-link {
    display: flex; align-items: center; padding: 0 0.75rem; margin-bottom: -3px; border-bottom: 3px solid transparent;
    color: #d5e0ea; text-decoration: none; font-size: 0.875rem; font-weight: 500; white-space: nowrap;
}
.portal-nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.portal-nav-link.active { color: #fff; font-weight: 600; background: rgba(255,255,255,0.08); border-bottom-color: var(--icpro-accent-300); }
.portal-nav-link:focus-visible, .portal-account > summary:focus-visible { outline: 2px solid var(--icpro-accent-300); outline-offset: -2px; }
.portal-user { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.portal-user-name { font-size: 0.85rem; color: var(--icpro-accent-300); }
.portal-signout { margin: 0; }
.portal-account { position: relative; }
.portal-account > summary {
    list-style: none; display: flex; align-items: center; gap: 0.6rem; height: 40px; padding: 0 0.6rem 0 0.4rem;
    border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; color: #fff; font-size: 0.875rem; cursor: pointer; user-select: none;
}
.portal-account > summary::-webkit-details-marker { display: none; }
.portal-account > summary:hover, .portal-account[open] > summary { background: rgba(255,255,255,0.12); }
.portal-account-avatar {
    width: 28px; height: 28px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--icpro-accent-300); color: var(--icpro-accent-900); font-weight: 700; font-size: 0.8rem;
}
.portal-account-name { max-width: 14rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-account-caret { font-size: 0.7rem; }
.portal-account-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 15rem; padding: 0.4rem;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--icpro-surface); color: var(--icpro-ink); border: 1px solid var(--icpro-line-strong);
    border-radius: 8px; box-shadow: var(--icpro-shadow-lg);
}
.portal-account-who { display: flex; flex-direction: column; gap: 2px; padding: 0.5rem 0.6rem 0.6rem; margin-bottom: 0.25rem; border-bottom: 1px solid var(--icpro-line); }
.portal-account-who span { font-size: 0.75rem; color: var(--icpro-muted); }
.portal-account-who b { font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-account-item {
    display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 0.6rem; box-sizing: border-box;
    border: 0; border-radius: 6px; background: none; color: var(--icpro-ink); font: inherit; font-size: 0.875rem;
    text-align: left; text-decoration: none; cursor: pointer;
}
.portal-account-item:hover, .portal-account-item:focus-visible { background: var(--icpro-accent-100); outline: none; }
@media (max-width: 1500px) {
    /* The address is in the menu; the button keeps its initial so the page names keep the row. */
    .portal-account-name { display: none; }
}
@media (max-width: 1180px) {
    .portal-bar { padding: 0 1rem; }
    /* CR-716: the lab's name gives way (it already ends in an ellipsis) so the account button stays on its row.
       At phone width the name's 19rem pushed the button onto a row of its own and the bar stood three rows high. */
    .portal-brand { min-height: 53px; box-sizing: border-box; flex: 1 1 0; max-width: none; }
    .portal-nav { order: 3; flex: 0 0 calc(100% + 2rem); margin: 0 -1rem; padding: 0 0.5rem; box-sizing: border-box; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.1); }
    .portal-nav-link { min-height: 44px; padding: 0 0.65rem; }
}
/* CR-714 (owner, 14 Nov 2026): the portal has no side menu, so its pages take the window's width and the lists
   show more columns, as the lab's own pages do (.ic-content). */
.portal-main { flex: 1; padding: 1.5rem; max-width: none; width: 100%; margin: 0 auto; box-sizing: border-box; }
.portal-foot { display: flex; justify-content: space-between; padding: 0.7rem 1.5rem; font-size: 0.78rem; color: var(--icpro-muted); border-top: 1px solid var(--icpro-line); }
/* The customer portal's "more than one certificate carries this number" list (Q-068). Plain rows, the
   portal's own muted register for the detail line -- no card, because it is a chooser, not a summary. */
.portal-matches { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.portal-matches li { padding: 0.55rem 0; border-bottom: 1px solid var(--ic-border, #d5d9e0); }
.portal-matches li:last-child { border-bottom: 0; }
.portal-matches a { font-weight: 600; }
.portal-matches .muted { display: block; font-size: 0.8rem; }

.portal-cards, .ic-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.portal-card, .ic-card { background: var(--icpro-surface); border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius); padding: 1.1rem 1.25rem; }
.portal-card h2, .ic-card h2 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.portal-kv, .ic-kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0 0 0.9rem; font-size: 0.92rem; }
.portal-kv dt, .ic-kv dt { color: var(--icpro-muted); }
.portal-kv dd, .ic-kv dd { margin: 0; }
/* CR-717: a long value with no space in it (the signed-in e-mail address) breaks inside its card at phone width
   instead of running past the card's edge. Portal only; the lab's cards are left as they are. */
.portal-kv dd { min-width: 0; overflow-wrap: anywhere; }
.portal-issued { padding: 0.6rem 0.8rem; border: 1px solid var(--icpro-line-strong); border-radius: var(--icpro-radius-sm); background: var(--icpro-surface); }
.ic-login-alert-ok { border-color: var(--icpro-accent); }
/* CR-524: the licence's notice to the Admin, and the stop page of a version the AMC does not cover. */
.ic-licence-notice { margin: 0 0 1rem; padding: 0.6rem 1rem; border: 1px solid var(--icpro-line-strong); border-left: 4px solid var(--icpro-accent); border-radius: var(--icpro-radius-sm); background: var(--icpro-surface); }
.ic-licence-notice > a:not(.btn) { margin-left: 0.5rem; }
.ic-licence-stop { border-left-color: var(--icpro-error-border); padding: 1.25rem 1.5rem; }
.ic-licence-stop p { margin: 0.5rem 0 1rem; }
/* The Licence page: the key box takes the field styling, full width, in the house monospace stack. */
#lic-key { width: 100%; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem;
    color: var(--icpro-ink); background: var(--icpro-field-bg); border: 1px solid var(--icpro-field-line); border-radius: 3px; padding: 0.4rem 0.55rem; }
#lic-key:focus { outline: none; border-color: var(--icpro-field-line-hover); }
.portal-notice { margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px solid var(--icpro-line-strong); border-left: 4px solid var(--icpro-accent); border-radius: var(--icpro-radius-sm); background: var(--icpro-surface); }
.portal-notice-warn { border-left-color: var(--icpro-error-border); }
/* CR-617: the band under the portal's top bar during a laboratory preview. */
.portal-preview-band { margin: 0; border-radius: 0; border-left-width: 6px; border-left-color: var(--icpro-warn-fill); background: var(--icpro-warn-soft); }
/* A one-button form placed among other row actions (Preview as customer, CR-617). */
.row-actions .inline-form { display: inline; margin: 0; }
.portal-card-wide { margin-top: 1rem; }
/* CR-616: a customer remark that rejects a calibration (Not Ok / Reject), and the certificate it rejects, in red. */
.pc-reject { color: var(--icpro-danger); font-weight: 600; }
/* CR-712: an Identification No. falling due within five days on the portal's Calibration Due, as ICProLabClient's amber. */
.pc-due-soon { color: var(--icpro-warn); font-weight: 600; }
/* A small fixed-list select inside a browse grid's cell (the History Card's Customer Remark) takes the field styling
   at 30px (DESIGN-UI-Standard 2.8). Real .e-grid classes: the grid's CssClass is not emitted. */
.e-grid .e-rowcell select { font: inherit; font-size: 0.85rem; color: var(--icpro-ink); background: var(--icpro-field-bg);
    border: 1px solid var(--icpro-field-line); border-radius: 3px; padding: 0.2rem 0.4rem; min-height: 30px; min-width: 7rem; }

/* A fieldset used only to switch a whole entry region off (disabled="…"): no box of its own. */
fieldset.ic-lock { border: 0; padding: 0; margin: 0; min-width: 0; }

/* The Blazor unhandled-error banner. Global on purpose: MainLayout, BlankLayout and PortalLayout each
   render the element, and a rule scoped to one layout left it showing on the others' pages -- the
   "An unhandled error has occurred" strip under Access denied and Not found (UAT-043). */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* The certificate preview's page view: the PDF itself in a frame, page by page (UAT-058). */
.cert-page-view iframe { width: 100%; height: 84vh; border: 1px solid var(--icpro-line); background: #fff; }

/* A report's page view (UAT-066): the same, for reports, and it is the default -- so the
   continuous sheet it replaces is hidden on screen. Print still prints the sheet. */
.ic-report-pageview { margin: 0 0 0.75rem; }
.ic-report-pageview-bar { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.ic-report-pageview iframe { width: 100%; height: 84vh; border: 1px solid var(--icpro-line); background: #fff; }
.ic-report-pageview.on + #report-root { display: none; }
@media print {
    .ic-report-pageview.on + #report-root { display: block !important; }
}
/* The legacy report footer's format line, shown once under the sheet on screen (UAT-067). */
.report-pagefoot { margin-top: 0.6rem; font-size: 8pt; text-align: left; }

/* CR-263: the Certificate layout page -- the lab's letterhead at 3px per mm with the sign-off parts as boxes
   that are dragged (anywhere on the box) and resized (the corner handle). Screen only. */
.pl-workspace { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.pl-scroll { overflow-x: auto; max-width: 100%; }
.pl-canvas { position: relative; width: 630px; height: 891px; background: #fff no-repeat 0 0 / 100% 100%;
    border: 1px solid #9aa5b1; box-shadow: 0 1px 4px rgba(0,0,0,.15); touch-action: none; user-select: none; }
.pl-strip { position: absolute; left: 24px; width: 582px; object-fit: fill; pointer-events: none; }
.pl-box { position: absolute; box-sizing: border-box; border: 1.5px dashed #1f5f99; background: rgba(31,95,153,.08);
    cursor: move; overflow: hidden; font-size: 9px; line-height: 1.15; color: #123; }
.pl-box.pl-active, .pl-box:hover { border-style: solid; background: rgba(31,95,153,.16); }
.pl-box .pl-label { position: absolute; left: 2px; top: 1px; font-weight: 600; background: rgba(255,255,255,.85); padding: 0 2px; }
.pl-box img { position: absolute; inset: 12px 2px 2px; max-width: calc(100% - 4px); max-height: calc(100% - 14px); margin: auto; object-fit: contain; pointer-events: none; }
.pl-handle { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: #1f5f99; cursor: nwse-resize; }
.pl-side { flex: 1 1 320px; min-width: 0; }
.pl-side table.ic-entry input[type=number] { width: 5.5rem; }

/* CR-265: Certificate setup -- the header (red) and footer (blue) lines on the letterhead, dragged up or down,
   and the letterhead thumbnails beside their pickers. Screen only. */
.pl-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #c0392b; cursor: ns-resize; z-index: 2; }
.pl-line::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px; }
.pl-line.pl-foot { border-top-color: #1f5f99; }
.pl-line.pl-active { border-top-style: solid; }
.pl-line .pl-line-label { position: absolute; right: 4px; top: -16px; font-size: 10px; font-weight: 600; color: #c0392b;
    background: rgba(255,255,255,.9); padding: 0 3px; pointer-events: none; }
.pl-line.pl-foot .pl-line-label { top: 3px; color: #1f5f99; }
.cs-thumb { height: 48px; width: auto; border: 1px solid #d0d7de; vertical-align: middle; margin-left: .5rem; }

/* Two fixed columns inside a dropdown's list: the id, then the name, so the ids line up
   and the names all start at the same place (owner, 19 Sep 2026 — the Calibration Scope
   Equipment picker). Used through IcDropDown's ItemTemplate; the closed box is unaffected. */
.ddl-cols { display: flex; align-items: baseline; gap: .75rem; width: 100%; }
.ddl-cols .id { flex: 0 0 9rem; font-variant-numeric: tabular-nums; color: var(--icpro-accent-700, #1f5f99); }
.ddl-cols .name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The laboratory's location, from mCompany.City (owner, 21 Sep 2026). One row today, so it
   reads as a label; it becomes a picker the day a second site exists. */
.ic-appbar-site {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--icpro-line);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--icpro-muted);
    white-space: nowrap;
}

.ic-appbar-site .e-icons { font-size: 0.85rem; }

@media (max-width: 1100px) {
    .ic-appbar-site { display: none; }
}

/* ---- Global search and the bell (CR-303) --------------------------------------------------- */

/* House field chrome, NOT a third look. This box had its own radius and border for one
   revision on 21 Sep 2026 — the very thing the note at the top of this file records being
   reverted twice before. 8px to match the appbar's own furniture, which is what the mockup
   draws too. */
.ic-appbar-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--icpro-field-line);
    border-radius: 8px;
    background: var(--icpro-field-bg);
    min-width: 13rem;
    max-width: 26rem;
    flex: 1 1 20rem;
}

.ic-appbar-search .e-icons { font-size: 0.85rem; color: var(--icpro-muted); }

.ic-appbar-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    color: var(--icpro-ink);
}

.ic-appbar-search:focus-within {
    border-color: var(--icpro-accent);
    box-shadow: 0 0 0 2px var(--icpro-accent-200);
}

.ic-bell { position: relative; }
.ic-bell-btn { position: relative; }

/* The bell is an inline SVG, not an icon-font glyph -- this Syncfusion theme ships no bell
   (CR-308). Sized to sit where an .e-icons glyph would, so the button's own box is unchanged. */
.ic-bell-icon {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
}

.ic-bell-badge {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.22rem;
    border-radius: 999px;
    background: var(--icpro-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ic-bell-badge.is-alert { background: var(--icpro-danger); }

/* Same dropdown as .ic-profile-menu, two inches away in the same corner — 10px radius,
   0.5rem padding, z-index 50, white. Two looks for one idea is what §2.2 is about. */
.ic-bell-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 50;
    width: 22rem;
    max-width: 90vw;
    background: #fff;
    border: 1px solid var(--icpro-line);
    border-radius: 10px;
    box-shadow: var(--icpro-shadow-lg);
    padding: 0.5rem;
}

.ic-bell-empty { padding: 0.6rem 0.65rem; margin: 0; font-size: 0.82rem; }

/* A row of .ic-profile-menu-item's shape — 8px radius, its padding, its hover. */
.ic-bell-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.55rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--icpro-ink);
}

.ic-bell-item:hover { background: #f1f5f9; }
.ic-bell-title { font-size: 0.84rem; font-weight: 600; }
.ic-bell-title.is-alert { color: var(--icpro-danger); }
.ic-bell-detail { font-size: 0.76rem; color: var(--icpro-muted); }

/* The search is NOT the first thing shed. This file's own rule is that the trail goes first —
   "the page's own h1 says where you are" — and `/search` is in no menu, so hiding the box would
   make the feature URL-only on a 1280px laptop. Below the breakpoint the box collapses to its
   icon, which still reaches the page. */
@media (max-width: 1100px) {
    .ic-appbar-search { min-width: 0; flex: 0 0 auto; padding: 0.2rem 0.45rem; }
    .ic-appbar-search input { display: none; }
}

/* The search page's own row: label, field, Search, Clear — the shape every other search control
   in the app wears (IcDataGrid, BulkAuthorise), not a fourth one. */
.srch-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    max-width: 44rem;
    margin-bottom: 0.9rem;
}

.srch-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--icpro-neutral-700);
    white-space: nowrap;
}

.srch-input { flex: 1; min-height: 34px; }
.srch-count { margin-bottom: 0.6rem; }

/* ---- Sign-in pages: the lab's /Account/Login and the customer portal's /portal/login, forgot, reset and
   change-password pages. These rules lived in a <style> block inside Login.razor, so the four portal pages —
   which use the same classes (CR-223) — rendered with none of them (owner, 22 Sep 2026: "it looks like
   this"). Shared here so every sign-in page is the same page. ---- */
.ic-login {
    display: flex;
    min-height: 100vh;
    background: var(--icpro-canvas);
}

/* —— Left brand panel —— */
.ic-login-brand {
    flex: 0 0 46%;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--icpro-space-8);
    padding: 2.6rem 2.8rem;
    color: #fff;
    background-color: var(--icpro-accent-900);
    background-image:
        linear-gradient(var(--icpro-accent-800) 1px, transparent 1px),
        linear-gradient(90deg, var(--icpro-accent-800) 1px, transparent 1px);
    background-size: 34px 34px;
}

.ic-login-brand-top { display: flex; align-items: center; gap: 0.8rem; }
.ic-login-brand-top img { border-radius: 8px; }
.ic-login-eyebrow {
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--icpro-accent-300);
}

.ic-login-title {
    margin: 0 0 0.9rem;
    max-width: 20ch;
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}
.ic-login-lede { margin: 0; max-width: 34ch; font-size: 1rem; color: var(--icpro-accent-300); }
/* "Professional" on its own line, in the accent (owner's design image, 25 Sep 2026). */
.ic-login-title-accent { display: block; color: var(--icpro-accent-300); }
.ic-login-rule { height: 1px; background: var(--icpro-accent-700); margin: 1.6rem 0; max-width: 22rem; }

.ic-login-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.95rem; }
.ic-login-facts li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.95rem; color: #e8eef5; }
.ic-login-facts svg { width: 20px; height: 20px; color: var(--icpro-accent-300); flex: 0 0 auto; }

.ic-login-brand-foot { font-size: 0.75rem; color: var(--icpro-accent-400); }

/* —— Right sign-in panel —— */
.ic-login-panel { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.ic-login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: var(--icpro-space-6); }

.ic-login-head h2 { margin: 0 0 0.3rem; font-size: 1.85rem; font-weight: 650; }
.ic-login-sub { margin: 0; font-size: 0.9rem; color: var(--icpro-muted); }

.ic-login-alert {
    padding: 0.6rem 0.8rem; font-size: 0.86rem; font-weight: 550;
    color: var(--icpro-error-text);
    background: var(--icpro-error-bg);
    border: 1px solid var(--icpro-error-border);
}

/* CR-772 / CR-773: Calibration Entry's Reference panel (an adm-card under the pinned head). */
.cal-reference { margin: 0.5rem 0 0.75rem; }
.cal-reference-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.cal-reference-head h2 { margin: 0; }
.cal-reference-sub { margin: 0.6rem 0 0.3rem; font-size: 0.85rem; font-weight: 600; }
.cal-reference-findings { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; font-size: 0.86rem; }

/* CR-769: the two-step sign-in page -- steps, the QR code, the key and the one-time recovery codes. */
.tw-steps { margin: 0; padding-left: 1.2rem; font-size: 0.86rem; display: grid; gap: 0.3rem; }
.tw-qr { display: block; margin: 0.25rem auto; background: #fff; padding: 6px; border: 1px solid var(--icpro-neutral-300, #ccc); }
.tw-key { text-align: center; font-size: 0.82rem; margin: 0; }
.tw-key code, .tw-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.tw-print { margin-top: 0.6rem; }
@media print {
    /* CR-769: printing the two-step page prints the recovery codes alone. */
    .ic-login:has(.tw-codes-box) .ic-login-form > *:not(.tw-codes-box) { display: none !important; }
    .tw-print { display: none !important; }
}
.tw-codes { columns: 2; margin: 0.5rem 0 0; padding-left: 1.4rem; font-size: 0.9rem; }

.ic-login-field { display: flex; flex-direction: column; gap: 0.4rem; }
.ic-login-lbl {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--icpro-muted);
}
.ic-login-field input,
.ic-login-pw input {
    width: 100%;
    padding: 0.62rem 0.7rem;
    font: inherit; font-size: 0.95rem;
    border: 1px solid var(--icpro-line-strong);
    background: var(--icpro-surface);
    border-radius: var(--icpro-radius-square);
}
.ic-login-field input:focus,
.ic-login-pw input:focus {
    outline: none; border-color: var(--icpro-accent);
    box-shadow: 0 0 0 3px var(--icpro-accent-soft);
}

.ic-login-pw { position: relative; display: block; }
.ic-login-show {
    position: absolute; top: 50%; right: 0.5rem; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font: inherit; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--icpro-accent-700);
}

.ic-login-submit { justify-content: center; min-height: 42px; font-size: 0.95rem; }

/* The lab's sign-in (a brand panel beside it): the form sits to the LEFT of its panel, not centred,
   and a little wider (owner, 25 Sep 2026). The portal's sign-in pages have no brand panel and keep
   their centred form. */
.ic-login-brand + .ic-login-panel { justify-content: flex-start; padding-left: clamp(2rem, 7vw, 7rem); }
.ic-login-brand + .ic-login-panel .ic-login-form { max-width: 460px; }
/* The lab's logo | name over tagline (CR-339), as the owner's design lays it out. */
.ic-login-lab {
    display: flex; align-items: center; gap: 1rem;
    padding-bottom: 1rem; border-bottom: 1px solid var(--icpro-neutral-300);
}
.ic-login-lab-logo {
    max-height: 64px; max-width: 170px; object-fit: contain;
    padding-right: 1rem; border-right: 2px solid var(--icpro-accent-900);
}
.ic-login-lab-text { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
/* Two lines at most (owner, 25 Sep 2026): sized so a long legal name fits in two, clamped if not. */
.ic-login-lab-name {
    font-size: 1.15rem; font-weight: 700; line-height: 1.25; color: var(--icpro-accent-900);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

/* Icons inside the username and password boxes, and before the traceability note (owner, 25 Sep 2026). */
.ic-login-input { position: relative; display: block; }
.ic-login-input .ic-login-icon {
    position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--icpro-muted); pointer-events: none;
}
.ic-login-input input { padding-left: 2.3rem; }
.ic-login-foot-icon { display: flex; align-items: flex-start; gap: 0.6rem; }
.ic-login-foot-icon svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--icpro-accent-700); }
.ic-login-lab-tagline { font-size: 0.95rem; letter-spacing: 0.08em; color: var(--icpro-neutral-700); }

.ic-login-foot {
    margin: 0.4rem 0 0; padding-top: 1rem;
    border-top: 1px solid var(--icpro-neutral-300);
    font-size: 0.78rem; color: var(--icpro-muted);
}

@media (max-width: 720px) {
    .ic-login { flex-direction: column; min-height: 100vh; }
    .ic-login-brand { flex: 0 0 auto; min-width: 0; gap: var(--icpro-space-6); padding: 1.8rem; }
    .ic-login-rule, .ic-login-facts { display: none; }
    .ic-login-title { font-size: 1.8rem; }
}

/* The portal's sign-in has no dark brand panel: its eyebrow (the lab's name) sits inside the light
   panel, where the accent-300 meant for the dark aside is too faint to read. */
.ic-login-panel .ic-login-eyebrow { color: var(--icpro-accent-700); }

/* Invoice page: entry-grid column widths sized to their content (owner, 25 Sep 2026),
   moved out of inline styles (CURRENT-STATE §2 design leftovers, 2 Oct 2026). */
.ic-entry.inv-items col:nth-child(1) { width: 3.5rem; }
.ic-entry.inv-items col:nth-child(2) { width: 13rem; }
.ic-entry.inv-items col:nth-child(3) { width: 12rem; }
.ic-entry.inv-items col:nth-child(4) { width: 7rem; }
.ic-entry.inv-items col:nth-child(5) { width: 10rem; }
.ic-entry.inv-items col:nth-child(6) { width: 14rem; }
.ic-entry.inv-items col:nth-child(7) { width: 5rem; }
.ic-entry.inv-items col:nth-child(8) { width: 5.5rem; }
.ic-entry.inv-items col:nth-child(9) { width: 8.5rem; }
.ic-entry.inv-items col:nth-child(10) { width: 8.5rem; }
.ic-entry.inv-items col:nth-child(11) { width: 5.5rem; }
.ic-entry.inv-items col:nth-child(12) { width: 6.5rem; }
.ic-entry.inv-items col:nth-child(13) { width: 7.5rem; }
.ic-entry.inv-items col:nth-child(14) { width: 7.5rem; }
.ic-entry.inv-items col:nth-child(15) { width: 13rem; }
.ic-entry.inv-items col:nth-child(16) { width: 9rem; }
.ic-entry.inv-items col:nth-child(17) { width: 7.5rem; }
.ic-entry.inv-items col:nth-child(18) { width: 13rem; }
.ic-entry.inv-items col:nth-child(19) { width: 7.5rem; }
.ic-entry.inv-items col:nth-child(20) { width: 3rem; }
.ic-entry.inv-cum col:nth-child(1) { width: 5.5rem; }
.ic-entry.inv-cum col:nth-child(2) { width: 22rem; }
.ic-entry.inv-cum col:nth-child(3) { width: 7rem; }
.ic-entry.inv-cum col:nth-child(4) { width: 6rem; }
.ic-entry.inv-cum col:nth-child(5) { width: 9rem; }
.ic-entry.inv-cum col:nth-child(6) { width: 9rem; }
.ic-entry.inv-cum col:nth-child(7) { width: 13rem; }
.ic-entry.inv-cum col:nth-child(8) { width: 9.5rem; }
.ic-entry.inv-cum col:nth-child(9) { width: 6.5rem; }
.ic-entry.inv-cum col:nth-child(10) { width: 13rem; }
.ic-entry.inv-cum col:nth-child(11) { width: 9.5rem; }
.ic-entry.inv-cum col:nth-child(12) { width: 3rem; }
.btn.inv-rail-action { margin-top: 0.7rem; width: 100%; }

/* Payment Receipt: the Payment Type dropdown and the legacy "..." to its master, on one line. */
.pr-type-pair { display: flex; gap: 6px; align-items: center; }
.pr-type-pair > :first-child { flex: 1 1 0; min-width: 0; }

/* ---- CR-387: Masters > Certificate styles (CertificateStyles.razor, StylePartsEditor.razor). ---- */
.st-ed h4 { margin: 1.1rem 0 0.4rem; }
.st-ed-part { border: 1px solid var(--icpro-field-line, #c9d3de); border-radius: 4px; padding: 0.5rem 0.7rem; margin: 0 0 0.6rem; }
.st-ed-part-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.st-ed-actions { margin-left: auto; display: inline-flex; gap: 0.25rem; }
.st-ed-row-actions { white-space: nowrap; }
table.st-ed-fields { margin-bottom: 0.4rem; }
.st-ed-lines textarea { width: 100%; }
textarea.st-ed-json { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
iframe.st-ed-preview { width: 100%; height: 1100px; border: 1px solid var(--icpro-field-line, #c9d3de); background: #fff; }

/* Template seed rows of the fixed-grid parameter formats (CR-418, TemplateSeedGrid). The reading
   box the legacy locks is painted cyan there (vbCyan); kept, at web contrast, as on the
   equipment grid's Valid Up To. The two test lists are three narrow columns, not the page's width. */
table.ic-entry.tpl-seed td.locked, table.ic-entry.tpl-seed td.locked .ic-entry-cell { background: #d6f5f2; }
table.ic-entry.tpl-seed-test { width: auto; min-width: 26rem; }
/* Hardness template rows (CR-436): the legacy form is 8040 twips wide - Sr. No. 780, the rest about 1700 each. */
table.ic-entry.tpl-seed-hardness { width: auto; min-width: 40rem; }
table.ic-entry.tpl-seed-hardness th:not(.sr):not(.del) { width: 9.5rem; min-width: 9.5rem; }
/* The form centres its four boxes (TextAlign 2). */
table.ic-entry.tpl-seed-hardness td:not(.sr):not(.del) .ic-entry-cell { text-align: center; }

/* CR-490 / CR-491: Accutrace's additions to the printed invoice and quotation. */
.inv-certcust { margin-top: 1.5mm; }
.qtn-sac { text-align: right; font-weight: 600; margin: 1mm 0; }
.qtn-bank { display: flex; justify-content: space-between; gap: 6mm; margin-top: 4mm; font-size: 9pt; }
.qtn-formatno { margin-top: 3mm; font-size: 8pt; }
/* CR-492: the payment QR (Accutrace: 1140 x 1080 twips, about 20 x 19 mm) and its app logo above it. */
.inv-payqr { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0.8mm; padding: 0 2mm; }
.inv-payqr img { width: 20mm; height: auto; }
.inv-payqr .inv-paylogo { width: 14mm; }
/* CR-493: Format 8's "Record Sheet Table" - paste the datasheet rows copied from Excel. */
.f8-paste { margin-top: .5rem; display: flex; flex-direction: column; gap: .4rem; max-width: 60rem; }
.f8-paste textarea { width: 100%; font-family: Consolas, monospace; font-size: .85rem; }

/* CR-537: the Onsite List's edit form, two columns as the legacy mOnsite List1 - the visit on the left, the
   expenses on the right - each one label and one control a row. */
.os-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2rem; }
.os-two-col > .master-form-grid:not(:has(.master-form-field)) { grid-template-columns: 11rem minmax(0, 1fr); }
@media (max-width: 1000px) { .os-two-col { grid-template-columns: minmax(0, 1fr); } }

/* Lab & settings pages (Masters -- Lab & settings: Company / Lab Info, Default settings, Branding images,
   Certificate setup, Certificate styles, Accreditation, Document numbering, Documents): every grid's
   content at 12.8px (owner, 21 Oct 2026). The wrapper takes no box of its own, so the pages lay out as before;
   headings keep their sizes. */
.lab-settings { display: contents; }
.lab-settings table td,
.lab-settings table td input:not([type="checkbox"]):not([type="radio"]),
.lab-settings table td select,
.lab-settings table td textarea,
.lab-settings table td .e-input-group,
.lab-settings table td .e-input-group input.e-input,
.lab-settings table td.ps-note,
.lab-settings .e-grid .e-rowcell { font-size: 0.8rem; }
/* The Accreditation page's History list reads larger (owner, 22 Oct 2026). */
.lab-settings table.accred-history td { font-size: 0.9375rem; }
.lab-settings table.accred-history th { font-size: 0.85rem; }

/* The + / − toggle that opens a row's detail: the dashboard's counts first (it lived in Home.razor's own
   style block), now also the Calibration Scope page's ranges (CR-606). */
.act-toggle { border: 1px solid var(--icpro-border, #c9d2dc); background: transparent; width: 1.3rem; height: 1.3rem;
              line-height: 1; padding: 0; margin-right: 0.35rem; border-radius: 3px; cursor: pointer; }

/* CR-606 (owner, 21 Oct 2026): entry tables sized to their content -- the Equipment page's Accuracy, Calibration
   Record and MU grids (eq-fit) and the Calibration Scope page's two (cs-fit). A smaller font; headings wrap
   onto a second line rather than widening their column; each column a width that fits its values. */
table.ic-entry.eq-fit, table.ic-entry.cs-fit { width: auto; font-size: 0.8rem; }
table.ic-entry.eq-fit th, table.ic-entry.cs-fit th { white-space: normal; line-height: 1.2; vertical-align: top;
                                                     padding: 0.35rem 0.4rem; }
table.ic-entry.eq-fit td, table.ic-entry.cs-fit td { padding: 0.2rem 0.3rem; }
/* Only a cell's own box fills the cell (td > input): reaching the input inside a Syncfusion dropdown stretched it to
   the full width and pushed the dropdown's arrow onto a second line (CR-607). */
table.ic-entry.eq-fit td > input:not([type="checkbox"]):not([type="file"]), table.ic-entry.eq-fit td > select,
table.ic-entry.cs-fit td > input:not([type="checkbox"]), table.ic-entry.cs-fit td > select { font-size: 0.8rem; width: 100%; min-width: 0; }
table.ic-entry.eq-fit td .e-input-group, table.ic-entry.cs-fit td .e-input-group { width: 100%; flex-wrap: nowrap; }
table.ic-entry.eq-fit .e-input-group, table.ic-entry.eq-fit .e-input-group input.e-input,
table.ic-entry.cs-fit .e-input-group, table.ic-entry.cs-fit .e-input-group input.e-input { font-size: 0.8rem; }
table.ic-entry.eq-fit th.sr, table.ic-entry.eq-fit td.sr,
table.ic-entry.cs-fit th.sr, table.ic-entry.cs-fit td.sr { width: 2.5rem; }
table.ic-entry.eq-fit th.w-num, table.ic-entry.cs-fit th.w-num { width: 5.5rem; min-width: 5.5rem; }
table.ic-entry.eq-fit th.w-k, table.ic-entry.cs-fit th.w-k { width: 3.5rem; min-width: 3.5rem; }
table.ic-entry.eq-fit th.w-unit, table.ic-entry.cs-fit th.w-unit { width: 7.5rem; min-width: 7.5rem; }
table.ic-entry.eq-fit th.w-type, table.ic-entry.cs-fit th.w-type { width: 7rem; min-width: 7rem; }
table.ic-entry.eq-fit th.w-date { width: 8.5rem; min-width: 8.5rem; }
table.ic-entry.eq-fit th.w-text { width: 8rem; min-width: 8rem; }
table.ic-entry.eq-fit th.w-param, table.ic-entry.cs-fit th.w-param { width: 11rem; min-width: 11rem; }
/* Calibration Scope (Parameter wise): its parameter names are long ("Temperature Controller - RTD Type"), CR-623. */
table.ic-entry.cs-fit th.w-param-wide { width: 19rem; min-width: 19rem; }
/* Calibration history: Cal Certificate No., Calibration Agency and Approved By wider (CR-619, owner 23 Oct 2026). */
table.ic-entry.eq-fit th.w-certno { width: 12rem; min-width: 12rem; }
table.ic-entry.eq-fit th.w-agency { width: 18rem; min-width: 18rem; }
table.ic-entry.eq-fit th.w-person { width: 11rem; min-width: 11rem; }
/* The Calibration Scope page centres every value (owner, 21 Oct 2026). */
table.ic-entry.cs-fit th, table.ic-entry.cs-fit td, table.ic-entry.cs-fit td.derived,
table.ic-entry.cs-fit td > input:not([type="checkbox"]), table.ic-entry.cs-fit .e-input-group input.e-input { text-align: center; }
table.ic-entry.cs-fit th.del, table.ic-entry.cs-fit td.del { text-align: right; }
/* Its three header fields on one row. */
.form-grid > fieldset.cs-head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(12rem, 16rem)); gap: 0.9rem 1.1rem; }

/* The Equipment page's MU grid runs to the foot of the screen, its heading row pinned while the rows scroll;
   the calibration-date picker and the Group button sit beside its heading (CR-606). */
.eq-mu-actions { align-items: center; }
.eq-mu-actions .btn { white-space: nowrap; }
.eq-mu-actions .fg-label { margin: 0; white-space: nowrap; font-size: 0.8rem; }
.eq-mu-actions .e-input-group { min-width: 11rem; }
/* CR-607: the Accuracy and Calibration Record grids too -- each in its own box with a vertical and a horizontal
   scroll bar, the whole heading (both rows of a grouped one) pinned while the rows scroll. A short list needs no
   bar and shows none. */
.eq-grid-box { max-height: calc(100vh - 11rem); overflow: auto; border: 1px solid var(--icpro-line); margin-bottom: 0.75rem; }
.eq-grid-box table.ic-entry > thead { position: sticky; top: 0; z-index: 2; }
/* A heading over From / To / Unit. */
table.ic-entry.eq-fit th.grp { text-align: center; border-bottom: 1px solid var(--icpro-line-strong); padding-bottom: 0.2rem; }
table.ic-entry tr.eq-mu-group td { background: var(--icpro-accent-100); color: #3a5f85; font-weight: 600; padding: 0.3rem 0.5rem; }
/* The attachment cell: the file name over a compact file picker, not the browser's full-width one. */
table.ic-entry.eq-fit th.w-file { width: 13rem; min-width: 13rem; }
table.ic-entry.eq-fit td input[type="file"] { width: 12.5rem; font-size: 0.75rem; padding: 0.1rem; }
table.ic-entry.eq-fit td.att > a, table.ic-entry.eq-fit td.att > span:not(.muted) { display: block; max-width: 12.5rem; overflow: hidden;
                                                                         text-overflow: ellipsis; white-space: nowrap; }

/* The Calibration Observations parameter list (pr-fit), fitted the same way (owner, 22 Oct 2026): 12.8px, headings
   wrapping and top-aligned, each column as wide as its values -- a unit is "°C" or "% FS", not a sentence -- so the
   sixteen columns fit the page instead of scrolling it sideways. The floors set for the old full-size table
   (p-name, p-unit, c-text, c-read) give way to these widths. */
table.ic-entry.pr-fit { width: auto; font-size: 0.8rem; }
table.ic-entry.pr-fit th { white-space: normal; line-height: 1.2; vertical-align: top; padding: 0.35rem 0.3rem; letter-spacing: 0; }
table.ic-entry.pr-fit td { padding: 0.2rem 0.3rem; min-width: 0; }
table.ic-entry.pr-fit td > input:not([type="checkbox"]), table.ic-entry.pr-fit td > select { font-size: 0.8rem; width: 100%; min-width: 0; }
table.ic-entry.pr-fit td.p-freq input { width: 100%; }
table.ic-entry.pr-fit td .e-input-group { width: 100%; flex-wrap: nowrap; }
table.ic-entry.pr-fit .e-input-group, table.ic-entry.pr-fit .e-input-group input.e-input { font-size: 0.8rem; min-width: 0; }
table.ic-entry.pr-fit th.sr, table.ic-entry.pr-fit td.sr { width: 2.6rem; min-width: 2.6rem; text-align: center; }
/* Widened 26 Oct 2026 (owner: "still congested, give proper width to each column; Open and delete are hidden behind
   the dropdown"). The 22 Oct widths cut the values themselves -- "Temperatur...", "0.0000(", a unit box showing only
   "°" -- so each column is now as wide as the longest value it holds plus its dropdown arrow, and the box scrolls
   sideways when the page is narrower, Sr. No. pinned at the left and the actions pinned at the right. */
table.ic-entry.pr-fit th.w-param { width: 16rem; min-width: 16rem; }
table.ic-entry.pr-fit th.w-text { width: 8rem; min-width: 8rem; }
table.ic-entry.pr-fit th.w-num { width: 5.75rem; min-width: 5.75rem; }
table.ic-entry.pr-fit th.w-unit { width: 5.5rem; min-width: 5.5rem; }
table.ic-entry.pr-fit th.w-at { width: 7.25rem; min-width: 7.25rem; }
table.ic-entry.pr-fit th.w-sm { width: 6rem; min-width: 6rem; }
table.ic-entry.pr-fit th.w-fmt { width: 7rem; min-width: 7rem; }
table.ic-entry.pr-fit th.w-io { width: 11.5rem; min-width: 11.5rem; }
table.ic-entry.pr-fit th.w-act { width: 7rem; min-width: 7rem; }
table.ic-entry.pr-fit td.row-actions .btn.ghost { padding-left: 0.3rem; padding-right: 0.3rem; }
/* The shared td.row-actions rule is display:flex, which takes the cell out of the table: the cell then sat over the
   column before it and the dropdown covered Open and Delete. Here it stays a table cell, pinned at the right. */
table.ic-entry.pr-fit td.row-actions { display: table-cell; white-space: nowrap; }
table.ic-entry.pr-fit td.row-actions > .btn + .btn { margin-left: 0.25rem; }
table.ic-entry.pr-fit th.w-act, table.ic-entry.pr-fit td.row-actions {
    position: sticky; right: 0; z-index: 1; background: var(--icpro-surface); box-shadow: -1px 0 0 var(--icpro-line);
}
table.ic-entry.pr-fit thead th.w-act { z-index: 3; background: var(--icpro-neutral-100); }
table.ic-entry.pr-fit tr.is-open > td.row-actions { background: var(--icpro-entry-soft); }
/* Owner, 11 Nov 2026: the list opens on the six fields read while entering readings; "Set-up fields: Show"
   (ParameterResultsEntry) takes .setup-off away and the rest come back, in the legacy's order. By position,
   because the columns are fixed: 1 Sr. No., 2 Parameter, 3 Parameter Details, [4 Frequency, 5 Frequency Unit,
   6 Range Full Scale], 7 Parameter Unit, 8 Standard Reading Unit, 9 UUC Reading Unit, [10 UUC Error Unit,
   11 UUC Error At, 12 Uncertainty Unit, 13 Readings Taken At, 14 UUC as a Source / Measure], 15 Calibration
   Results Format, [16 Input Source or Output Measure, 17-19 the Display ticks], then the Open / delete cell.
   A column added to or moved in that table must be added or moved here. Not drawn only: every field is still
   bound, saved and checked as before. */
table.ic-entry.pr-fit.setup-off > thead > tr > th:nth-child(n+4):nth-child(-n+6),
table.ic-entry.pr-fit.setup-off > tbody > tr > td:nth-child(n+4):nth-child(-n+6),
table.ic-entry.pr-fit.setup-off > thead > tr > th:nth-child(n+10):nth-child(-n+14),
table.ic-entry.pr-fit.setup-off > tbody > tr > td:nth-child(n+10):nth-child(-n+14),
table.ic-entry.pr-fit.setup-off > thead > tr > th:nth-child(n+16):not(.w-act),
table.ic-entry.pr-fit.setup-off > tbody > tr > td:nth-child(n+16):not(.row-actions) { display: none; }

/* CR-688: the dashboard's favourites row -- the user's own buttons, at the top for every role. */
.dash-favs { margin: 0 0 1rem; }
.dash-favs-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.dash-favs-head .dash-section-title { margin: 0; }
.dash-favs-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dash-fav { display: inline-flex; align-items: center; gap: 0.4rem; }
.dash-favs-empty { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.dash-favs-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.25rem 1rem;
                    max-height: 22rem; overflow: auto; padding: 0.5rem; border: 1px solid var(--icpro-line, #d8dde3); border-radius: 6px; }

/* CR-690: the Customer page's tabs -- counts on the headings, read-only document lists. */
.ic-tab-count { display: inline-block; min-width: 1.2rem; padding: 0 0.35rem; margin-left: 0.25rem; border-radius: 0.6rem;
                background: var(--icpro-neutral-200, #e5e7eb); font-size: 0.75rem; font-weight: 600; text-align: center; }
.ic-tab-count:empty { display: none; }
.ic-tab-count.warn { background: #fde2e1; color: #9b1c1c; }
table.customer-docs { width: 100%; max-width: 60rem; }
table.customer-docs td.num, table.customer-docs th.num { text-align: right; }
table.customer-docs tr.is-total td { font-weight: 600; }
/* CR-690: a tab panel hidden with the hidden attribute stays hidden even when its own class sets display (the form grid's
   display: grid would otherwise win over the browser's hidden rule). */
.master-form-body [hidden] { display: none !important; }

/* ---- CR-692: the Modern calibration sticker ---------------------------------------------------------------
   One layout at every label size (.msticker-small / -medium / -large); the size comes inline from the page. On
   a roll each label is a page of its own size; on A4 the page lays the labels in a grid inside 8 mm margins. */
.ms-options { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.ms-options label { white-space: nowrap; }
.msticker { box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; background: #fff; color: #111;
    font-family: "Segoe UI", Arial, sans-serif; border: 0.25mm solid #c9d0d9; border-radius: 1.2mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.msticker .ms-band { display: flex; align-items: center; gap: 1mm; background: var(--ms-accent, #1F4E79); color: #fff;
    padding: 0.5mm 1.5mm; min-height: 4.2mm; }
.msticker .ms-lab { flex: 1 1 auto; font-weight: 600; font-size: 6pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msticker .ms-tag { font-size: 5.5pt; font-weight: 700; letter-spacing: 0.08em; background: #fff; color: var(--ms-accent, #1F4E79);
    border-radius: 0.6mm; padding: 0.1mm 0.8mm; white-space: nowrap; }
.msticker .ms-logo { height: 6mm; max-width: 16mm; object-fit: contain; background: #fff; border-radius: 0.6mm; padding: 0.3mm; }
.msticker .ms-body { flex: 1 1 auto; display: flex; align-items: center; gap: 1.2mm; padding: 0.6mm 1.5mm 0.8mm; min-height: 0; }
.msticker .ms-fields { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.15mm; }
.msticker .ms-row { display: flex; gap: 1mm; font-size: 6.5pt; line-height: 1.2; white-space: nowrap; }
.msticker .ms-k { flex: 0 0 auto; width: 10.5mm; color: #5a6472; }
.msticker .ms-v { overflow: hidden; text-overflow: ellipsis; }
.msticker .ms-strong { font-weight: 700; }
.msticker .ms-due .ms-v { color: var(--ms-accent, #1F4E79); }
/* The certificate number wraps rather than being cut: a full number is the point of the sticker (ATCL/2026/09/00123). */
.msticker .ms-cert .ms-v { white-space: normal; overflow-wrap: anywhere; font-size: 0.92em; line-height: 1.1; }
.msticker .ms-instrument { font-weight: 700; font-size: 7.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.4mm; }
.msticker .ms-qr { flex: 0 0 auto; height: 100%; max-height: 21mm; aspect-ratio: 1; object-fit: contain; }
.msticker-small .ms-band { min-height: 3.6mm; padding: 0.3mm 1.2mm; }
.msticker-small .ms-lab { font-size: 5pt; }
.msticker-small .ms-tag { font-size: 4.5pt; }
.msticker-small .ms-row { font-size: 5.6pt; }
.msticker-small .ms-k { width: 9mm; }
.msticker-small .ms-qr { max-height: 14mm; }
.msticker-small .ms-body { gap: 0.8mm; }
.msticker-large .ms-band { min-height: 8mm; padding: 0.8mm 2mm; }
.msticker-large .ms-lab { font-size: 8pt; }
.msticker-large .ms-tag { font-size: 6.5pt; }
.msticker-large .ms-row { font-size: 8pt; line-height: 1.3; }
.msticker-large .ms-k { width: 14mm; }
.msticker-large .ms-qr { max-height: 32mm; }

/* Screen preview: labels on a grey desk; A4 pages as white sheets. */
.ms-roll { display: flex; flex-wrap: wrap; gap: 4mm; }
.ms-a4 { display: grid; width: 194mm; min-height: 281mm; padding: 8mm; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
    margin-bottom: 6mm; align-content: start; box-sizing: content-box; }
@media print {
    .ms-roll { display: block; }
    .ms-roll-label { break-after: page; page-break-after: always; }
    .ms-roll-label:last-child { break-after: auto; page-break-after: auto; }
    .ms-roll-label .msticker { border: 0; border-radius: 0; }
    .ms-a4 { width: auto; min-height: 0; padding: 0; box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
    .ms-a4:last-child { break-after: auto; page-break-after: auto; }
}

/* ---- CR-694: the Calibration Entry step bar ----------------------------------------------------------------- */
.cal-steps { display: flex; gap: 0; margin: 0.6rem 0 0.4rem; counter-reset: none; }
.cal-steps .cal-step { flex: 1 1 0; display: flex; align-items: center; gap: 0.45rem; min-width: 0; position: relative;
    padding: 0.4rem 0.9rem 0.4rem 1.2rem; background: #eef1f5; color: #3b4552; border: 0; font: inherit; font-size: 0.85rem;
    text-decoration: none; cursor: pointer; clip-path: polygon(0 0, calc(100% - 0.7rem) 0, 100% 50%, calc(100% - 0.7rem) 100%, 0 100%, 0.7rem 50%); }
.cal-steps .cal-step:first-child { padding-left: 0.8rem; clip-path: polygon(0 0, calc(100% - 0.7rem) 0, 100% 50%, calc(100% - 0.7rem) 100%, 0 100%); border-radius: 0.3rem 0 0 0.3rem; }
.cal-steps .cal-step + .cal-step { margin-left: -0.35rem; }
.cal-steps .cal-step:hover:not([disabled]):not([aria-disabled]) { background: #e1e7ef; }
.cal-steps .cal-step[disabled], .cal-steps .cal-step[aria-disabled] { cursor: default; opacity: 0.55; }
.cal-steps .cal-step-no { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 0.75rem; font-weight: 600; background: #fff; color: #5a6472; border: 1px solid #c9d0d9; }
.cal-steps .cal-step-name { font-weight: 600; white-space: nowrap; }
.cal-steps .cal-step-hint { font-size: 0.75rem; color: #6b7684; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-steps .cal-step.current { background: var(--icpro-accent-700, #1F4E79); color: #fff; }
.cal-steps .cal-step.current .cal-step-no { background: #fff; color: var(--icpro-accent-700, #1F4E79); border-color: #fff; }
.cal-steps .cal-step.current .cal-step-hint { color: #dbe4ee; }
.cal-steps .cal-step.done .cal-step-no { background: #1e8449; border-color: #1e8449; color: transparent; position: relative; }
.cal-steps .cal-step.done .cal-step-no::after { content: "\2713"; color: #fff; position: absolute; font-size: 0.8rem; }
.cal-steps .cal-step.current.done .cal-step-no { background: #fff; }
.cal-steps .cal-step.current.done .cal-step-no::after { color: #1e8449; }
@media print { .cal-steps { display: none; } }

/* ---- CR-721: the user's theme choice in the profile menu (both themes) --------------------------------- */
.ic-profile-menu-theme { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.55rem; }
.ic-profile-menu-theme-label { font-size: 0.8rem; color: var(--icpro-muted); margin-right: auto; }
/* The dashboard tile's icon chip belongs to the Balanced theme alone: Classic never draws it. */
.dash-stat-chip { display: none; }

/* ---- CR-721: the "Balanced" colour theme (owner, 15 Nov 2026) ------------------------------------------
   Chosen per user; <html data-theme="balanced">. No attribute is Classic, and nothing above this block is
   changed by it. Everything is inside @media screen, so a printed certificate, datasheet or report is the
   same in either theme: print-shared.css and every @media print rule see Classic's tokens. */
@media screen {
    :root[data-theme="balanced"] {
        --icpro-accent: #4f46e5;
        --icpro-accent-dark: #3730a3;
        --icpro-accent-soft: #eef2ff;
        --icpro-canvas: #f5f7fb;
        /* CR-722 (owner, 15 Nov 2026: "apply the selected theme wherever possible in the pages"): the whole accent
           scale, not only the four tokens of the first brief, so every tab, chip, link, focus ring and filled
           button that draws from it follows the theme; and the menu rail, which is the darkest step of it. */
        --icpro-accent-100: #eef2ff;
        --icpro-accent-200: #e0e7ff;
        --icpro-accent-300: #c7d2fe;
        --icpro-accent-400: #a5b4fc;
        --icpro-accent-500: #818cf8;
        --icpro-accent-600: #6366f1;
        --icpro-accent-700: #4f46e5;
        --icpro-accent-800: #3730a3;
        --icpro-accent-900: #312e81;
        --icpro-sidebar: #1e1b4b;
        --bal-shadow: 0 2px 10px -4px rgba(30, 41, 59, 0.12);
    }

    /* Dashboard KPI tiles. The tile's colour is --stat-tone, set by DashStat from its Tone; a tile without
       one takes the accent. */
    :root[data-theme="balanced"] .dash-stats .dash-stat {
        position: relative;
        background: #fff;
        border: 1px solid #e6e9f0;
        border-top: 3px solid var(--stat-tone, var(--icpro-accent));
        border-radius: 12px;
        box-shadow: var(--bal-shadow);
        transition: box-shadow 0.15s ease, transform 0.15s ease;
    }
    :root[data-theme="balanced"] .dash-stats .dash-stat:hover {
        transform: translateY(-2px);
        border-color: #e6e9f0;
        border-top-color: var(--stat-tone, var(--icpro-accent));
        box-shadow: 0 12px 22px -12px color-mix(in srgb, var(--stat-tone, var(--icpro-accent)) 60%, transparent);
    }
    :root[data-theme="balanced"] .dash-stats .dash-stat-value { color: var(--icpro-ink); }

    :root[data-theme="balanced"] .dash-stats .dash-stat-chip {
        position: absolute;
        right: 0.9rem;
        bottom: 0.9rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: color-mix(in srgb, var(--stat-tone, var(--icpro-accent)) 14%, transparent);
        color: var(--stat-tone, var(--icpro-accent));
    }
    :root[data-theme="balanced"] .dash-stats .dash-stat-chip .e-icons { font-size: 18px; line-height: 1; color: inherit; }
    :root[data-theme="balanced"] .dash-stats .dash-stat-chip-text { font-size: 18px; font-weight: 700; line-height: 1; }
    /* Room for the chip, so a long caption never runs under it. */
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-chip) .dash-stat-label,
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-chip) .dash-stat-sub { padding-right: 2.9rem; }

    /* A figure that is an alert or a warning fills its whole tile. */
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-alert),
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-warn) {
        border-color: transparent;
        background-origin: border-box;
        color: #fff;
    }
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-alert) { background-image: linear-gradient(135deg, #f43f5e, #be123c); }
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-warn) { background-image: linear-gradient(135deg, #f59e0b, #c2410c); }
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-alert) :is(.dash-stat-value, .dash-stat-label, .dash-stat-sub),
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-warn) :is(.dash-stat-value, .dash-stat-label, .dash-stat-sub) { color: #fff; }
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-alert) .dash-stat-chip,
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-warn) .dash-stat-chip { background: rgba(255, 255, 255, 0.2); color: #fff; }
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-alert):hover,
    :root[data-theme="balanced"] .dash-stats .dash-stat:has(.dash-stat-value.is-warn):hover { border-color: transparent; }

    /* Charts. */
    :root[data-theme="balanced"] .adm-bar { background: linear-gradient(180deg, #a5b4fc, #6366f1); border-radius: 6px 6px 0 0; }
    :root[data-theme="balanced"] .adm-bar.is-current { background: linear-gradient(180deg, #6ee7b7, #059669); }
    :root[data-theme="balanced"] .adm-track { background: #eef2ff; border-radius: 999px; }
    :root[data-theme="balanced"] .adm-fill { background: linear-gradient(90deg, #6366f1, #22d3ee); border-radius: 999px; }
    :root[data-theme="balanced"] .adm-fill.is-alert { background: linear-gradient(90deg, #fb7185, #e11d48); }

    /* Dashboard panels. */
    :root[data-theme="balanced"] .adm-card,
    :root[data-theme="balanced"] .dash-card { border-radius: 12px; box-shadow: var(--bal-shadow); }
}

/* ---- CR-722 (owner, 15 Nov 2026): "Use font size for 14px, 16px or greater to 12.8px in every label and control"
   on Bulk Print, and "Do same in Email Messages tab in setting page". 0.8rem is the house label (CR-597). Headings
   keep their size; the grid's own toolbar and pager are the shared list control and are not touched here. */
.bp-card,
.bp-card-name { font-size: 0.8rem; }
.ds-mail > label { font-size: 0.8rem; }
.ds-mail .e-richtexteditor .e-content,
.ds-mail .e-richtexteditor .e-rte-dropdown-btn-text,
.ds-mail .e-richtexteditor .e-toolbar .e-tbar-btn-text { font-size: 0.8rem; }

/* ---- CR-723 (owner, 15 Nov 2026): 12.8px for every label and control that was larger -------------------
   "Use font size for 14px, 16px or greater to 12.8px in every label and control" ... "Yes, whole app" ...
   "But if the font size is >12.8px". 0.8rem is the house label (CR-597).

   One block, so the rule can be read and undone in one place. Each selector below is a label or a control
   (button, tab, chip, text box, dropdown, entry-grid cell, read-only field value) whose own rule earlier in
   this file set a size above 12.8px; the selector is repeated exactly, so this later rule wins at the same
   weight and nothing smaller than 12.8px is raised. NOT in the list, on purpose: headings and titles, figures
   (dashboard values, totals), body and table text, icons, and the menu rail. Screen only: a printed page is
   as it was. */
@media screen {
    /* Controls and labels with no size of their own. A text box, dropdown or button otherwise takes the
       browser's 13.33px; a bare label takes whatever its container has, so it is capped, never raised. */
    :where(.ic-content, .ic-appbar, .portal-main) :is(input, select, textarea, button) { font-size: 0.8rem; }
    :where(.ic-content, .portal-main) label { font-size: min(1em, 0.8rem); }

    .btn,
    .ic-tab,
    .ic-filter-toggle,
    .ic-filter-inline input,
    .filter-bar input, .filter-bar select,
    .ic-appbar-groups-btn,
    .ic-appbar-login,
    .ic-appbar-search input,
    .ic-profile-name,
    .ic-profile-menu-item,
    .form-grid.readonly span,
    .tpl-to,
    .tpl-toggle button,
    table.ic-entry,
    table.ic-entry.grid,
    .master-form-grid .fg-check, .master-form-grid .fg-span-full,
    .rd-readonly-val,
    .rd-seg button,
    .rd-expand-btn,
    .mu-steps button,
    .sac-gt input.gc,
    table.ua-accounts select,
    table.ua-accounts input[type=date],
    .gitype-cert-box label:not(.check),
    .tg-key-row input,
    .tg-spec-table .tg-dia input, .tg-spec-table .tg-tol-pair input, .tg-spec-table .tg-tol-pair select,
    .tg-taper-footer > label > input,
    .igc-tile select,
    .igc-form-grid input, .igc-form-grid select,
    .igc-btn,
    .igc-back,
    .lf-val.ro,
    .lf-pct input,
    .lf-pick,
    .wo-rctl input[type="text"],
    .actions.qtn-std label,
    .actions.qtn-std select,
    .param-grid input,
    .ic-login-remember,
    .ic-login-field input, .ic-login-pw input,
    .ic-login-submit,
    .equip-grid .eq-pick,
    .rep-chip,
    .e-grid .e-rowcell select,
    .f8-paste textarea,
    .cal-steps .cal-step,
    .thread-hub-panel .thread-hub-btns a,
    .portal-account > summary,
    .portal-account-item { font-size: 0.8rem; }

    /* The two form-field rules are long compound selectors; :is() carries their weight without retyping them. */
    :is(.lf-val, .master-form-grid) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 0.8rem; }
    .ic-field,
    table.ic-entry :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
    table.ic-acc input,
    .ic-grid-search input[type="search"] { font-size: 0.8rem; }

    /* The component library's own controls (14px in its theme): text boxes, dropdowns and their lists, date
       and number boxes, tick-box and radio captions, toolbar captions. Its icon buttons are left alone: there
       the font size IS the icon. */
    .e-input-group input.e-input,
    .e-input-group.e-control-wrapper input.e-input,
    .e-input-group textarea.e-input,
    input.e-input,
    textarea.e-input,
    .e-float-input input,
    .e-ddl.e-input-group .e-input,
    .e-multi-select-wrapper input[type="text"],
    .e-multi-select-wrapper .e-delim-values,
    .e-dropdownbase .e-list-item,
    .e-dropdownbase .e-list-group-item,
    .e-ddl.e-popup .e-list-item,
    .e-checkbox-wrapper .e-label,
    .e-radio + label .e-label,
    .e-toolbar .e-tbar-btn-text,
    .e-tab .e-tab-header .e-toolbar-item .e-tab-text { font-size: 0.8rem !important; }
}

/* CR-760: the audit lines (Audit log page, History panel). Read-only; the table is ua-accounts. */
table.ic-audit td { vertical-align: top; }
table.ic-audit td.ic-audit-when { white-space: nowrap; }
table.ic-audit .ic-audit-change { overflow-wrap: anywhere; }
table.ic-audit .ic-audit-field { color: var(--icpro-muted); }
table.ic-audit .ic-audit-old { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
table.ic-audit .ic-audit-new { font-weight: 600; }
.ic-audit-pager { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }

/* CR-787: the skill matrix -- persons across, competences down, as the lab's sheet OM / RFT / 04. */
table.ic-entry.skill-matrix .skill-caption { text-align: left; font-weight: 500; width: 22rem; min-width: 22rem; max-width: 22rem; white-space: normal;
    text-transform: none; font-size: 0.82rem; letter-spacing: normal; color: inherit; position: sticky; left: 7rem; background: var(--icpro-surface); z-index: 1; }
table.ic-entry.skill-matrix .skill-block { text-align: center; vertical-align: middle; font-weight: 600; width: 7rem; min-width: 7rem; max-width: 7rem;
    text-transform: none; font-size: 0.82rem; letter-spacing: normal; color: inherit; white-space: normal; position: sticky; left: 0; background: var(--icpro-surface); z-index: 1; }
table.ic-entry.skill-matrix td { min-width: 9rem; text-align: center; vertical-align: middle; }
table.ic-entry.skill-matrix td.skill-name { font-weight: 600; }
table.ic-entry.skill-matrix tr.skill-date td.skill-caption { text-align: left; font-size: 0.85em; }
table.ic-entry.skill-matrix tr.skill-date td { padding-top: 0; }
table.ic-entry.skill-matrix td.skill-cell { position: relative; }
table.ic-entry.skill-matrix td.skill-overdue { outline: 2px solid var(--icpro-danger, #c62828); outline-offset: -2px; }
.skill-pick { background: none; border: 1px dashed transparent; border-radius: 4px; padding: 2px 6px; min-height: 26px; min-width: 48px; cursor: pointer; }
.skill-pick:hover:not(:disabled) { border-color: var(--icpro-line); }
.skill-pick:disabled { cursor: default; }
.skill-picker { position: absolute; z-index: 20; top: 100%; left: 50%; transform: translateX(-50%); min-width: 20rem;
    display: flex; flex-direction: column; background: var(--icpro-surface, #fff); border: 1px solid var(--icpro-line);
    border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.15); padding: 4px; text-align: left; }
.skill-picker button { display: flex; align-items: center; gap: 0.6rem; background: none; border: 0; padding: 4px 8px; text-align: left; cursor: pointer; border-radius: 4px; }
.skill-picker button:hover { background: var(--icpro-accent-100); }
.skill-box { display: inline-block; vertical-align: middle; flex: none; }
.skill-na { display: inline-block; min-width: 34px; text-align: center; font-weight: 600; }
.skill-legend { display: grid; gap: 0.35rem; margin-top: 0.8rem; }
.skill-legend > div { display: flex; align-items: center; gap: 0.6rem; }

/* Shared by Home and the skill matrix (CR-787); was page-local on Home. */
.home-alert { color: var(--icpro-danger); font-weight: 600; }
/* CR-787: the matrix scroll box (as .ic-grid-box, which is kept for reading sheets); the first two columns stay pinned. */
.skill-matrix-box { max-height: clamp(18rem, 65vh, 52rem); overflow: auto; border: 1px solid var(--icpro-line); }

/* —— CR-791: the Help panel (IcHelpPanel) and the user manual page (HelpManualPage) ——
   On a wide window the panel stands BESIDE the page: the shell gives up its width (.has-help), so the page's own
   Save and Close stay in view. On a narrow one it lies over the page, under the app bar, and below the app bar's
   menus (30) and every dialog. */
.ic-help-btn.is-on { background: var(--icpro-accent-soft); border-color: var(--icpro-accent); color: var(--icpro-accent-dark); }
.ic-help-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 25;
    width: 28rem;
    display: flex; flex-direction: column;
    background: var(--icpro-surface);
    border-left: 1px solid var(--icpro-line-strong);
    box-shadow: var(--icpro-shadow-lg);
}
.ic-shell.has-help > .ic-shell-main { margin-right: 28rem; }
@media (max-width: 1100px) {
    .ic-shell.has-help > .ic-shell-main { margin-right: 0; }
    .ic-help-panel { top: 2.9rem; width: min(28rem, 94vw); }
}
.ic-help-head {
    display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--icpro-line);
    background: var(--icpro-neutral-100, #f4f6f9);
}
.ic-help-kicker { margin-right: auto; font-family: var(--icpro-font-heading); font-size: 1.15rem; font-weight: 600; color: var(--icpro-ink); }
.ic-help-search { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--icpro-line); }
.ic-help-search .ic-field { flex: 1 1 auto; min-width: 0; }
.ic-help-scroll { flex: 1 1 auto; overflow: auto; padding: 0.75rem 0.9rem 1.5rem; }
.ic-help-chapter { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--icpro-muted); }
.ic-help-title { margin: 0.1rem 0 0.6rem; font-family: var(--icpro-font-heading); font-size: 1.45rem; font-weight: 600; color: var(--icpro-ink); }
.ic-help-back { margin-bottom: 0.6rem; }
.ic-help-results, .help-results { list-style: none; margin: 0; padding: 0; }
.ic-help-result {
    display: flex; flex-direction: column; gap: 0.05rem; width: 100%; text-align: left;
    padding: 0.5rem 0.55rem; border: 0; border-radius: 8px; background: transparent; font: inherit; cursor: pointer; color: var(--icpro-ink);
}
.ic-help-result:hover { background: var(--icpro-accent-soft); }
.ic-help-result-title { font-size: 0.86rem; font-weight: 600; }
.ic-help-result-chapter { font-size: 0.74rem; color: var(--icpro-muted); }

/* The manual's own text: one set of rules for the panel and the page. */
.ic-help-body, .help-main { font-size: 0.88rem; line-height: 1.5; color: var(--icpro-ink); }
.ic-help-body h3, .help-main h3 { margin: 1.1rem 0 0.35rem; font-family: var(--icpro-font-heading); font-size: 1.12rem; font-weight: 600; color: var(--icpro-accent-dark); }
.ic-help-body h4, .help-main h4 { margin: 0.9rem 0 0.25rem; font-size: 0.9rem; font-weight: 650; }
.ic-help-body p, .help-main p { margin: 0.4rem 0; }
.ic-help-body ol, .ic-help-body ul, .help-topic ol, .help-topic ul, .help-chapter > ul, .help-chapter > ol { margin: 0.35rem 0 0.5rem; padding-left: 1.35rem; }
.ic-help-body li, .help-topic li { margin: 0.18rem 0; }
.ic-help-body table, .help-main table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 0.8rem; font-size: 0.84rem; }
.ic-help-body th, .ic-help-body td, .help-main th, .help-main td { border: 1px solid var(--icpro-line); padding: 0.3rem 0.5rem; text-align: left; vertical-align: top; }
.ic-help-body th, .help-main th { background: var(--icpro-neutral-100, #f4f6f9); font-weight: 600; }
.ic-help-body blockquote, .help-main blockquote {
    margin: 0.6rem 0; padding: 0.45rem 0.7rem;
    border-left: 3px solid var(--icpro-accent); background: var(--icpro-accent-soft); border-radius: 0 6px 6px 0;
}
.ic-help-body blockquote p, .help-main blockquote p { margin: 0.1rem 0; }
.ic-help-body code, .help-main code { font-size: 0.82rem; background: var(--icpro-neutral-100, #f4f6f9); padding: 0.05rem 0.25rem; border-radius: 3px; }
.ic-help-body a, .help-main a { color: var(--icpro-accent-dark); }

.help-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--icpro-canvas); }
.help-top {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    padding: 0.4rem 1rem; background: #fff; border-bottom: 1px solid var(--icpro-line-strong); box-shadow: var(--icpro-shadow-sm);
}
.help-brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--icpro-ink); font-family: var(--icpro-font-heading); font-size: 1.25rem; font-weight: 600; }
.help-srch { margin: 0 0 0 1rem; flex: 0 1 26rem; }
.help-top-spacer { flex: 1 1 auto; }
.help-layout { display: flex; align-items: flex-start; flex: 1 1 auto; }
.help-toc {
    position: sticky; top: 3rem; flex: 0 0 17rem; align-self: flex-start;
    max-height: calc(100vh - 3rem); overflow: auto; padding: 0.9rem 0.6rem 2rem 1rem; font-size: 0.86rem;
}
.help-toc ol, .help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-toc ol > li > a { display: block; padding: 0.3rem 0.5rem; border-radius: 6px; color: var(--icpro-ink); text-decoration: none; font-weight: 550; }
.help-toc ol > li > a:hover { background: var(--icpro-accent-soft); }
.help-toc ol > li.is-open > a { background: var(--icpro-accent); color: #fff; }
.help-toc ul { margin: 0.15rem 0 0.4rem 0.6rem; border-left: 2px solid var(--icpro-line); }
.help-toc ul a { display: block; padding: 0.16rem 0.55rem; color: var(--icpro-muted); text-decoration: none; font-size: 0.8rem; }
.help-toc ul a:hover { color: var(--icpro-accent-dark); }
.help-main {
    flex: 1 1 auto; min-width: 0; max-width: 60rem;
    margin: 1rem 1.25rem 3rem 0.5rem; padding: 1.25rem 1.75rem 2.5rem;
    background: var(--icpro-surface); border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius);
}
.help-main h1 { margin: 0 0 0.5rem; font-family: var(--icpro-font-heading); font-size: 1.9rem; font-weight: 600; }
.help-topic { scroll-margin-top: 3.5rem; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--icpro-line); }
.help-topic > h2 { margin: 0 0 0.4rem; font-family: var(--icpro-font-heading); font-size: 1.5rem; font-weight: 600; color: var(--icpro-ink); }
.help-lead { font-size: 0.95rem; max-width: 44rem; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.help-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.7rem 0.85rem; border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius); text-decoration: none; background: var(--icpro-surface); }
.help-card:hover { border-color: var(--icpro-accent); box-shadow: var(--icpro-shadow-md); }
.help-card-title { font-family: var(--icpro-font-heading); font-size: 1.1rem; font-weight: 600; color: var(--icpro-ink); }
.help-card-topics { font-size: 0.76rem; color: var(--icpro-muted); }
.help-results li { display: flex; flex-direction: column; padding: 0.4rem 0; border-bottom: 1px solid var(--icpro-line); }
.help-results a { font-weight: 600; }
.help-contents { columns: 2; font-size: 0.9rem; }
@media (max-width: 900px) {
    .help-toc { display: none; }
    .help-main { margin: 0.5rem; padding: 0.9rem 1rem 2rem; }
}
@media print {
    .help-page { background: #fff; }
    .help-main { max-width: none; margin: 0; padding: 0; border: 0; font-size: 10pt; }
    .help-chapter + .help-chapter, .help-cover + .help-chapter { break-before: page; }
    .help-topic { break-inside: auto; }
    .help-main table, .help-main blockquote { break-inside: avoid; }
    .help-main h2, .help-main h3, .help-main h4 { break-after: avoid; }
    .help-main a { color: inherit; text-decoration: none; }
}

/* —— CR-792: Help in the customer portal. The bar's Help button wears the bar's own link look; the panel is the
   lab shell's (IcHelpPanel), and the page gives up its width the same way. */
.portal-help-btn {
    margin-left: auto; align-self: center; padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.35); border-radius: 6px; background: transparent;
    color: #fff; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.portal-help-btn:hover, .portal-help-btn.is-on { background: rgba(255,255,255,0.14); }
.portal-help-btn:focus-visible { outline: 2px solid var(--icpro-accent-300); outline-offset: 2px; }
.portal-help-btn + .portal-user { margin-left: 0; }
.portal-help-btn { min-height: 2rem; }
.portal-shell.has-help { padding-right: 28rem; }
/* The bar's one-row layout needs 1180 px of BAR, and Help takes 28rem of the window: up to 1630 px the bar wears
   its narrow layout while the panel is open, so it does not wrap by accident. */
@media (min-width: 1101px) and (max-width: 1630px) {
    .portal-shell.has-help .portal-bar { padding: 0 1rem; }
    .portal-shell.has-help .portal-brand { min-height: 53px; box-sizing: border-box; flex: 1 1 0; max-width: none; }
    .portal-shell.has-help .portal-nav { order: 3; flex: 0 0 calc(100% + 2rem); margin: 0 -1rem; padding: 0 0.5rem; box-sizing: border-box; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.1); }
}
@media print {
    .portal-bar, .portal-foot, .portal-preview-band { display: none !important; }
    .portal-shell.has-help, .portal-main { padding: 0; }
}
.portal-help.help-layout { align-items: flex-start; }
.portal-help .help-toc { top: 0.5rem; flex-basis: 15rem; padding-left: 0; }
.portal-help .help-main { margin-top: 0; }
@media (max-width: 1100px) {
    .portal-shell.has-help { padding-right: 0; }
    /* The narrow bar is two rows (53 + 44 px and its 3 px rule): the panel starts under both. */
    .portal-shell.has-help .ic-help-panel { top: 6.3rem; }
    .portal-help-btn { min-height: 2.25rem; }
}

/* —— CR-794: the portal guide's sign-in section on the portal's sign-in page. Closed until asked for; no script. */
.ic-login-help { margin-top: 0.9rem; font-size: 0.84rem; }
.ic-login-help > summary { cursor: pointer; color: var(--icpro-accent-700); font-weight: 600; }
.ic-login-help > summary:focus-visible { outline: 2px solid var(--icpro-accent); outline-offset: 2px; }
.ic-login-help .ic-help-body { margin-top: 0.5rem; padding: 0.6rem 0.8rem; border: 1px solid var(--icpro-line); border-radius: var(--icpro-radius-sm); background: var(--icpro-surface); max-height: 22rem; overflow: auto; }

/* —— CR-795: the Help button beside a results format's number. Small, and level with the text it follows. */
.ic-format-help { margin-left: 0.35rem; vertical-align: baseline; padding: 0.05rem 0.45rem; min-height: 0; font-size: 0.74rem; font-weight: 600; }
/* On the dark item strip the ghost button would be ink on ink: it wears the strip's own light text and a line. */
.cal-banner .ic-format-help, .cal-banner .ic-format-help:hover { color: #fff; border: 1px solid rgba(255,255,255,0.55); background: transparent; }
.cal-banner .ic-format-help:hover { background: rgba(255,255,255,0.16); }
.ic-format-help.is-compact { margin-left: 0; min-width: 1.75rem; padding: 0.15rem 0.3rem; font-size: 0.86rem; font-weight: 700; border: 1px solid var(--icpro-line-strong); border-radius: 6px; color: var(--icpro-accent-dark); }
