/* =============================================================================
   Settings-area design language (shared).

   Extracted from the redesigned tenant Config page (super/tenant/config.php) so
   every "Application / settings" page shares ONE source of truth and cannot drift:
   the left rail, the .inner-panel cards, the modern form-control / checkbox / Select2
   skin, and the sticky action footer. Accent = #064a71 (the BlueShell top-bar / brand
   blue, .navbar-default in css/netwing.min.css) with #043552 as its darker shade.

   Loaded by:
     - super/tenant/config.php               (the original)
     - admin Users / Roles / Teams cluster    (this restyle)

   TYPE SCALE. Eight steps, down from EIGHTEEN distinct sizes across this file and css/settings-hub.css
   (PO, 2026-09-01, after the same call was made for the planning family on 2026-08-31). Measured before
   the change: 122 font-size declarations at 18 values, including two at 9px and one at 10px carrying
   text. The steps, and what each one is FOR — the same eight as css/planning-chrome.css, so the two
   areas no longer disagree about the size of the same role:

     11px  chips, badges and uppercase micro-labels ONLY — never a sentence
     13px  secondary text: sub-lines, counts, hints, table header labels (absorbed 12 / 12.5 / 13.5)
     14px  body / primary content (Bootstrap's own)
     16px  card and modal titles (absorbed 15)
     18px  section titles — one level above a card title, not a duplicate of 16 (absorbed 17)
     22px  display numbers: stat values, counts
     26px  the page-level display number
     34px  the one hero figure

   ONE deliberate difference from the planning scale, and it is a decision not an oversight: hint and
   sub-line text here is 14px, not 13. Those three declarations were at 14.5px, and the mechanical
   mapping to 13 would have made the hint text on ~120 pages SMALLER — the opposite of the complaint
   ("the pages read as too small") that produced the eight steps in the first place. docs/reference-style.md
   §1.1 was updated to say 14px rather than 14.5.

   NOT part of the ramp, and deliberately left off-scale — glyph metrics tied to a box, exactly the
   exception the planning file records: .settings-chip i (9), .settings-hub-sep (10),
   .settings-stat-label i (12), .settings-chevron (12), .settings-empty-icon (17), .settings-avatar (24,
   the initials), .config-no-results i (32) and .settings-empty-state i (40). Plus the whole of
   admin/views/priceGrid/_pricelist_pdf.php, which is a PDF stylesheet, not screen text.
   scripts/ui-audit.js (/aesthetic-review) measures the rendered sizes against the ramp.

   The segmented switch (.segmented-switch) lives in css/application.css and is initialised by
   js/settings-pages.js::initSegmentedSwitches(); the toggle pill (.toggle-pill) is css/ref-kit.css's (D-33).
   ============================================================================= */

/* ---- Left rail (sticky section / cluster navigator) ---- */
.config-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* The rail lives in its own reference card — a contained unit resting on the page background,
       like the content cards, instead of floating on the bg (propagated from the Config page). */
    background: var(--ref-surface);
    border: 1px solid var(--ref-hairline);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}
/* Hide scrollbar for sidebar in Chrome, Safari and Opera */
.config-sidebar::-webkit-scrollbar {
    width: 4px;
}
.config-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.config-sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 4px;
}

.settings-side-nav {
    border: none;
}
.settings-side-nav > li {
    float: none !important;
    margin-bottom: 6px;
}
.settings-side-nav > li > a {
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-weight: 500;
    color: var(--ref-ink-2) !important;
    background: transparent;
    border: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    align-items: center;
    gap: 12px;
}
.settings-side-nav > li > a br {
    display: none !important;
}
.settings-side-nav > li > a i,
.settings-side-nav > li > a svg {
    font-size: 1.35em !important;
    width: 1.5em;
    text-align: center;
    margin-bottom: 0 !important;
    transition: transform 0.25s ease;
}
.settings-side-nav > li > a:hover {
    background-color: var(--ref-surface-hover) !important;
    color: var(--ref-ink) !important;
    transform: translateX(3px);
    text-decoration: none;
}
.settings-side-nav > li > a:hover i,
.settings-side-nav > li > a:hover svg {
    transform: scale(1.1);
}
.settings-side-nav > li.active > a,
.settings-side-nav > li.active > a:hover,
.settings-side-nav > li.active > a:focus {
    background-color: var(--area-ink, #064a71) !important;
    color: var(--ref-on-fill) !important;
    box-shadow: 0 4px 14px var(--area-accent-ring-strong, rgba(6, 74, 113, 0.25)) !important;
    font-weight: 600;
}
.settings-side-nav > li.active > a i,
.settings-side-nav > li.active > a svg {
    color: var(--ref-on-fill) !important;
}
/* Small count badge on a rail item (e.g. "12 users"). */
.settings-side-nav > li > a .settings-nav-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--ref-muted);
    background: #edf2f7;
    border-radius: 999px;
    padding: 1px 8px;
}
/* On the ACTIVE row the badge sits on the area ink, and a translucent white pill does not survive
   the move off blue: 25% white over #064a71 composites to #447795 (white on it 4.62:1, a pass by
   0.12) but over the master green #1e8449 it composites to #56a377 — 3.05:1, measured on
   admin/customer/admin. A SOLID white pill with ink text is the one treatment that holds for every
   area, because --area-ink is defined against a near-white surface (9.00:1 for app, 4.50:1 for
   master on #f7fafc, and better than that on pure #fff). */
.settings-side-nav > li.active > a .settings-nav-count {
    color: var(--area-ink, #064a71);
    background: var(--ref-surface);
}

/* Sidebar Search Box */
.sidebar-search {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}
.sidebar-search .input-group {
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}
.sidebar-search .input-group:focus-within {
    border-color: var(--area-accent, #064a71);
    box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, 0.15));
}
.sidebar-search .input-group-addon {
    border: none !important;
    background: var(--ref-surface) !important;
    padding-left: 14px;
}
.sidebar-search .form-control {
    border: none !important;
    height: 42px !important;
    box-shadow: none !important;
    font-size: 14px;
}

/* Content column beside the rail */
.config-tab-content {
    padding-bottom: 120px;
    padding-left: 15px;
}

/* ---- Page wrapper (.settings-page): css/ref-kit.css (.ref-page, D-12's two widths). ---- */

/* THE CUSTOMER HUB IS WIDER, because it is the only page in the design system that carries THREE
   columns: navigation, content, actions (see views/customer/_hub_shell.php on why the actions moved
   right). At the 1500px standard the 3/6/3 split would leave the content 726px against the 1089px it
   has with two columns -- so the width a third column needs is taken from the screen, not from the
   reading column. 1760 + 40px padding: on a 1920 monitor that is 80px of air per side, on a 1440 one it
   behaves exactly as the standard does today.

   SCOPED, deliberately. `.settings-page` is the frame of 132 views and every other one of them has two
   columns and no reason to change. Making the whole application wider is one line here and a decision
   of its own. */
.settings-page.customer-hub {
    max-width: var(--ref-page-max-wide); /* D-12: lists and hubs */
    padding: 40px 40px 0;
}

/* A page that needs the screen — a list beside its detail (the CRM mail page), a list as wide as its columns — is the
   kit's wide frame (D-12: `--ref-page-max-wide`, as `.ref-page--wide`) under the name the CRM pages give it
   (`CrmUi::PAGE_CLASS`, the `pageClass` of _shared/_settings_list); the layout's flash strip follows it, as it follows
   `.ref-page--wide` (css/ref-kit.css, D-71). */
.settings-page.settings-page--wide { max-width: var(--ref-page-max-wide); }
body:has(#page > .settings-page--wide:not(.ref-page--flush)) #page > .row > .col-xs-12 > .heavy-alert {
    max-width: calc(var(--ref-page-max-wide) - 2 * var(--ref-page-pad));
}

/* A page whose only footer is the FIXED .config-sticky-footer, with no .config-tab-content column to
   carry the clearance, needs it on the page itself — or the bar permanently covers the end of the page. */
.settings-page.settings-page-sticky-footer {
    padding-bottom: 120px;
}

/* ---- The layout's flash strip: css/ref-kit.css, for every page (D-18). ---- */
/* The contract wizard (a reference page, not a settings one) prints its «what is missing is marked» and its other
   notes in the same strips: same fills, by its own fence (aesthetic review, 2026-10-09). */
/* On the customer hub the strip ran wider than the page under it: it spans #page, while the hub frames itself
   at 1760px with 40px of padding (.settings-page.customer-hub above) — 40px past the content on each side on a
   1440 screen, more on a wider one. The layout's strip takes the hub's content box. Only where the hub is the
   page itself (//layouts/main: `#page > .settings-page`), and only the layout's strip: an htmx error built
   inside a card wears the same class and keeps its card's width. */
body:has(#page > .settings-page.customer-hub) #page > .row > .col-xs-12 > .heavy-alert {
    width: calc(100% - 80px);
    max-width: calc(var(--ref-page-max-wide) - 80px);
    margin-left: auto;
    margin-right: auto;
}

/* ---- Page header: css/ref-kit.css (one component with .ref-page-head, D-3). ---- */

/* ---- The card (.inner-panel + .formSectionTitle): css/ref-kit.css, under .ref-skin (D-2). ---- */

/* Modern styling for standard form elements. The value in the ink (D-56): Bootstrap writes it #555. */
:where(.ref-skin) .form-control:where(:not(.ref-search *)) {
    color: var(--ref-ink);
    border-radius: 8px !important;
    border: 1px solid var(--ref-border-field) !important;
    padding: 10px 14px !important;
    height: auto !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}
/* The focus ring FOLLOWS THE AREA. Written with the app blue baked in, the most visible accent on any
   form contradicted the page it sat on: a green anagrafica form with a blue ring. The fallbacks are
   the literals it replaces, and under `app` --area-ink/--area-accent-ring ARE those literals, so every
   page that does not declare an area, and every page that declares `app`, renders exactly as before. */
:where(.ref-skin) .form-control:where(:not(.ref-search *)):focus {
    border-color: var(--area-ink, #064a71) !important;
    box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, 0.15)) !important;
}
/* A text field's placeholder in the hint ink (D-36): Bootstrap's #999 is 2.85:1, under AA, on every page — inside the
   page frame too («Unit price» of the boat sale's «Add an item»). The Select2 placeholders beside it already were. */
:where(.ref-skin) .form-control:where(:not(.ref-search *))::placeholder {
    color: var(--ref-muted);
    opacity: 1;
}

/* NATIVE DATE/TIME CONTROLS MUST BE THE SAME HEIGHT AS EVERYTHING ELSE IN THE ROW.
   The rule above is `height: auto` + 10px vertical padding, which gives a text input, a select and a
   Select2 the area's 42px. A native `<input type="date">` has a LARGER intrinsic content height (it
   lays out its own spinner and calendar button in the shadow DOM), so `auto` resolved to **58px** —
   sixteen pixels taller than its neighbours, with the label pushed up to match. Measured 2026-09-02 on
   priceSeasonPeriod/create (2 fields), warehouseStock/viewByDate and priceGrid/calendar, and reported
   by the PO from a page outside this perimeter, so the cause is the shared rule, not one view.
   `!important` is required, not sloppiness: the declaration it corrects is itself `!important`.
   box-sizing is border-box app-wide, so 42px includes the 10px padding and the 1px border, exactly as
   it does for a text input.
   The colour picker is NOT one of these: it is `.settings-color-input`, a deliberate square swatch with
   its own geometry, so its height is set on the component below rather than here.
   ON EVERY PAGE OF THE KIT (D-70): it was scoped to `.settings-page` while the rule it corrects is
   `:where(.ref-skin)`, so a kit page outside the frame — the point-of-sale receipt's Epson panel — had its date at
   58 px beside 42 px fields. The twins at the skin's weight; the `.settings-page` selectors keep theirs, so nothing
   moves inside the frame. */
.settings-page input[type="date"].form-control,
.settings-page input[type="time"].form-control,
.settings-page input[type="datetime-local"].form-control,
.settings-page input[type="month"].form-control,
.settings-page input[type="week"].form-control,
:where(.ref-skin) input[type="date"].form-control,
:where(.ref-skin) input[type="time"].form-control,
:where(.ref-skin) input[type="datetime-local"].form-control,
:where(.ref-skin) input[type="month"].form-control,
:where(.ref-skin) input[type="week"].form-control {
    height: var(--ref-control-h) !important;
}
.settings-page input[type="date"].input-sm,
.settings-page input[type="time"].input-sm,
:where(.ref-skin) input[type="date"].input-sm,
:where(.ref-skin) input[type="time"].input-sm {
    height: var(--ref-control-h-sm) !important;
}

/* An EMPTY native date or time (D-35): the browser paints its mask («mm/dd/yyyy», «--:-- --») in the value's ink, so
   an empty field read as filled beside empty text fields. NativeDatePicker / NativeTimePicker keep `is-empty` on it
   (js/native-picker.js) and the mask takes the hint ink — muted, not hidden: it is the only sign of the order the
   BROWSER's locale gives the day and the month, which can differ from BlueShell's language. On focus, the ink again. */
:where(.ref-skin) input:is([type="date"], [type="time"]).is-empty:not(:focus) {
    color: var(--ref-muted);
}
/* A field PRE-FILLED with a value the user has not confirmed yet (D-121): the hint ink, like an empty native date
   above, until it is touched or focused — the bulk meter readings start every input from the last reading, and «left
   exactly as pre-filled» means «not read». The page drops `is-prefilled` on the first edit. */
:where(.ref-skin) .form-control.is-prefilled:where(:not(.ref-search *)):not(:focus) {
    color: var(--ref-muted);
}

/* ONE HEIGHT FOR A FIELD INSIDE A GRID ROW (§7.0, D-32): the small control, 34 px, at the grid's 4 px radius. The same
   flow had three — 36 px in the goods receipt, 42 in the delivery note's review (its next step), 30 in the boat rentals'
   lines — and a grid row is already as tall as an article's name. A text field keeps its line centred (6 + 20 + 6); a
   Select2 shrinks its box, and the page skin's sprite arrow follows it (7 → 3 px, the centre of THIS box). Weighted by
   the two `:not()` to pass the native date/time pin above (and the warehouse's), and `!important` because the field
   skin's `height: auto` and padding and the 42 px Select2 pin are. A row that is a small form beside a 42 px search and
   button (an «add a line» row) is the page's to keep at the field standard. */
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) :is(input, select):is(.form-control, .ref-native-field):not([type="hidden"]):not([type="checkbox"]) {
    height: var(--ref-control-h-sm) !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    border-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .select2-container .select2-choice {
    height: var(--ref-control-h-sm) !important;
    border-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .select2-dropdown-open:not(.select2-drop-above) .select2-choice { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .select2-dropdown-open.select2-drop-above .select2-choice { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .ref-page-select .select2-choice .select2-arrow b { background-position: 0 3px !important; }
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .ref-page-select.select2-dropdown-open .select2-choice .select2-arrow b { background-position: -18px 3px !important; }
/* A unit beside a field in a grid row (D-121): the input group at the row's 34 px and 4 px radius, like the field it
   joins — the field skin's addon is 42 px with 8 px corners, a box taller than the field it labels (the bulk meter
   readings: «kWh», «m³»). The field's own corners follow it: square where it meets the addon. */
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-addon:where(:not(.ref-search *)) {
    padding: 6px 10px !important;
    line-height: 20px;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-addon:last-child:where(:not(.ref-search *)) {
    border-top-right-radius: var(--ref-radius-inset) !important;
    border-bottom-right-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-addon:first-child:where(:not(.ref-search *)) {
    border-top-left-radius: var(--ref-radius-inset) !important;
    border-bottom-left-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group .form-control:first-child:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group .form-control:last-child:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Field labels: bold + dark, so the label → control → hint hierarchy reads at a glance
   (reference-style standard, propagated from the Config page). Left-aligned even under
   .form-horizontal, since fields are stacked. */
.settings-page .control-label {
    display: block;
    text-align: left;
    font-weight: 700;
    color: var(--ref-ink);
    /* 9px — the whole label→control gap, and it must be the same number in the tenant-configuration
       page's own copy of these rules. 6px read as too tight against a toggle, which has no border of
       its own to hold the eye off the label. */
    margin-bottom: 9px;
    line-height: 1.3;
}
/* Same-row field alignment: in a multi-column row, reserve the label height and bottom-align its
   text, so when one label wraps to two lines and its siblings stay on one line, every input still
   lands on the same baseline — while a single-line label still hugs its field (text at the BOTTOM
   of the reserved space, so no gap above the control). Multi-column cells only; a full-width (…-12)
   stacked field keeps its natural single-line label. */
/* Both `.row` and `.form-group` wrap a multi-column field row in this app, and a settings page uses
   whichever the view happened to be written with — so the reserve has to name both, or the standard
   silently skips half the pages. 40px, matching the tenant-configuration page: the two used to
   disagree (38 vs 40), which is exactly the kind of drift the guard test now blocks. */
.settings-page .row > [class*="col-"] > .control-label:first-child,
.settings-page .form-group > [class*="col-"] > .control-label:first-child {
    min-height: 40px;
    display: flex;
    align-items: flex-end;
    /* A flex box trims the white space at the edges of its items, so the space Yii writes before
       `<span class="required">*</span>` (and before any inline element in a label) vanished and the star sat
       glued to the word. The gap gives it back, one word-space wide. A full-width label is `display: block`
       (below) and keeps the source space, so it needs nothing. */
    gap: .25em;
}
/* A full-width row is exempt from the reserve (below), and therefore also loses the ~13px of slack
   that separates every other row — there is no `.settings-page .row { margin-bottom }` anywhere, so the
   whole row-to-row rhythm of a card comes from that slack. Visible as the Notes field sitting against
   the switch above it on marinaPricelist/update. Same arithmetic as the first-row pull under a card
   header, in the other direction. */
.settings-page .row > [class*="-12"] > .control-label:first-child,
.settings-page .form-group > [class*="-12"] > .control-label:first-child { margin-top: 13px; }
/* …except when that full-width row is the FIRST one under a card header. There the multi-column pull
   below deliberately does NOT apply (a full-width label has no reserve slack to pay back), so adding
   the 13px here would make the header gap on a full-width card LARGER than on a multi-column one —
   re-creating, in the other direction, exactly the discrepancy §7.0 exists to remove. D-148 (2026-11-12): 9px, not 0 —
   measured, a full-width first label sat 18px under the header and a multi-column one 27px. */
.settings-page .formSectionTitle + .row > [class*="-12"] > .control-label:first-child,
.settings-page .formSectionTitle + .form-group > [class*="-12"] > .control-label:first-child,
.settings-page .formSectionTitle + .panel-body > .row:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .formSectionTitle + .panel-body > .form-group:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .ref-card-header + .ref-card-body > .row:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .ref-card-header + .ref-card-body > .form-group:first-child > [class*="-12"] > .control-label:first-child { margin-top: 9px; }
/* …2px in a `.form-horizontal` form, whose label already carries Bootstrap's 7px of padding-top: the 9px were measured
   on a label with none (D-148's first version put the customer edit's full-width first label 6px BELOW its multi-column
   neighbour — it had been 2px above). */
.settings-page .form-horizontal .formSectionTitle + .row > [class*="-12"] > .control-label:first-child,
.settings-page .form-horizontal .formSectionTitle + .form-group > [class*="-12"] > .control-label:first-child,
.settings-page .form-horizontal .formSectionTitle + .panel-body > .row:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .form-horizontal .formSectionTitle + .panel-body > .form-group:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .form-horizontal .ref-card-header + .ref-card-body > .row:first-child > [class*="-12"] > .control-label:first-child,
.settings-page .form-horizontal .ref-card-header + .ref-card-body > .form-group:first-child > [class*="-12"] > .control-label:first-child { margin-top: 2px; }

.settings-page .row > [class*="col-md-12"] > .control-label:first-child,
.settings-page .row > [class*="col-sm-12"] > .control-label:first-child,
.settings-page .row > [class*="col-lg-12"] > .control-label:first-child,
.settings-page .form-group > [class*="col-md-12"] > .control-label:first-child,
.settings-page .form-group > [class*="col-sm-12"] > .control-label:first-child,
.settings-page .form-group > [class*="col-lg-12"] > .control-label:first-child {
    min-height: 0;
    display: block;
}

/* The label carries the whole label→control gap. `.bs-toggle` and `.segmented-switch` also declare
   `margin-top: 4px` (css/application.css, for the pages outside this area whose labels are still
   inline), and on top of the label's margin that put a toggle 4px lower than the text field beside
   it — 10px against 6px, measured. Zeroed here so every control type in a row starts on one line. */
.settings-page .bs-toggle,
.settings-page .segmented-switch {
    margin-top: 0;
}

/* First field row under a card header: close the hole the reserve digs.
   The reserve is `min-height` on the label with the text bottom-aligned, so a single-line label
   carries ~21px of empty space ABOVE its text against ~8px for an unreserved one. Mid-card nobody
   sees it; directly under the header divider it reads as a hole (measured: 41px from the divider to
   the first label's ink, against 28px in a card whose first row is full-width). Pull the row up by
   that difference so a card's first label sits at the same distance from the divider either way.
   Only rows where the reserve is actually in effect are pulled — a row whose labels all sit in
   full-width (…-12) cells has `min-height: 0` and needs no correction. Browsers without `:has()`
   simply keep the old, airier gap. */
.settings-page .formSectionTitle + .row:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child),
.settings-page .formSectionTitle + .form-group:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child),
.settings-page .formSectionTitle + .panel-body > .row:first-child:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child),
.settings-page .formSectionTitle + .panel-body > .form-group:first-child:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child),
.settings-page .ref-card-header + .ref-card-body > .row:first-child:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child),
.settings-page .ref-card-header + .ref-card-body > .form-group:first-child:has(> [class*="col-"]:not([class*="-12"]) > .control-label:first-child) {
    margin-top: -13px;
}

/* An inline checkbox that must line up with the field controls beside it (e.g. "All day" next to a
   Select2): sit it under the (empty) label spacer, centred in the 42px field height so it aligns with
   the neighbouring input rather than floating at label height. */
.settings-page .settings-inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    margin: 0;
    cursor: pointer;
}
/* Per-field help text in italics — reads clearly as secondary guidance under each control, in the hint ink (D-56). */
.settings-page .help-block {
    font-style: italic;
    color: var(--ref-muted);
    font-size: 14px;
}
/* …but a page-level note (the "Fields with * are required" line, on 9 pages of this area) sits on the
   PAGE ground, not inside a white card, and the hint ink measures 4.76:1 on white against only 3.71:1 on
   #e3e3e3. Same reason as .settings-page-sub above. Scoped to a help-block that is NOT inside a card,
   so the per-field ones keep their quieter grey. */
.settings-page > .help-block,
.settings-page > form > .help-block,
/* …and one level deeper, because the customer form keeps its legacy `<div class="form">` wrapper
   between the page and the <form>. Measured on admin/customer/create: 3.65:1 without this. */
.settings-page > .form > form > .help-block { color: var(--ref-ink-2); }

/* Modern Custom Checkboxes */
:where(.ref-skin) input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ref-border-field);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-top: -2px !important;
}
/* --area-ink, not --area-accent: the box is a FILL carrying a white tick, and the accent step is
   chosen to read as a tint (master's #27ae60 is 2.87:1 on white). Same reasoning as the ink rule at
   the top of css/area-tokens.css. */
:where(.ref-skin) input[type="checkbox"]:checked {
    background-color: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
}
:where(.ref-skin) input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* «Some of them» (D-34): a box a script marks `indeterminate` — the «all» of a list where only part is ticked (the
   delivery note's «Keep all the lines», the price-list renewal, the dashboard configurator) — is filled like a ticked
   one, with a white bar instead of the tick. Undrawn, it showed empty: «none», the opposite of the truth. */
:where(.ref-skin) input[type="checkbox"]:indeterminate {
    background-color: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
}
:where(.ref-skin) input[type="checkbox"]:indeterminate::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 6px;
    width: 8px;
    height: 2px;
    border: 0;            /* a box both checked and indeterminate reads «some»: not the tick's strokes */
    transform: none;
    background: var(--ref-on-fill);
}
/* `outline: none` again here: Bootstrap's `input[type="checkbox"]:focus { outline: 5px auto }` has the same
   specificity as this rule and more than the bare one above, so a clicked box kept the browser's blue ring on top of
   the skin (2026-10-13, PO: «checkbox… una volta cliccate hanno problemi di visualizzazione»). Keyboard focus keeps
   a ring of its own, stronger than the click's. */
:where(.ref-skin) input[type="checkbox"]:focus,
:where(.ref-skin) input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, 0.15));
}
:where(.ref-skin) input[type="checkbox"]:focus-visible,
:where(.ref-skin) input[type="radio"]:focus-visible {
    box-shadow: 0 0 0 3px var(--area-accent-ring-strong, rgba(6, 74, 113, 0.25));
}
/* A box that cannot be ticked now (D-139) — a page read without the permission to change it, a permission held through
   another one, an option that means nothing while another is off — stays in its place and LOOKS it, as the switch does
   (D-135): the box at 45% opacity, ticked or not, the not-allowed cursor; its label follows (`.settings-check`, below).
   Undrawn, it painted exactly like a live one: `appearance: none` took the browser's own grey away with the rest, and
   the role page had written the state for itself. Never hidden instead. */
:where(.ref-skin) input[type="checkbox"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}
/* A radio of a settings page outside the skin keeps the browser's own control, but its checked dot took the BROWSER
   blue beside a checkbox ticked in the area's ink — two accents in one form. `accent-color` gives it the same ink
   (inside the skin the radio is drawn below, D-152; the skin keeps the pair, D-70). */
.settings-page input[type="radio"],
:where(.ref-skin) input[type="radio"] {
    accent-color: var(--area-ink, #064a71);
}
/* The kit's radio (D-152, the user 2026-11-12: «as done for the checkboxes, nicer, a little bigger and more visible»):
   drawn like the checkbox above — a ring of the field's border on a white ground, the area's ink when chosen (the
   ring, and a dot drawn as the checkbox draws its tick), the checkbox's focus rings (their selectors list the radio)
   and its disabled state (D-139). 16 px, not the checkbox's 18: Bootstrap's `.radio-inline`/`.radio`
   keep the control 20 px into their label's padding, and a 16 px ring leaves 4 px before the words. The radios a
   component hides (the switch, the segmented switch, the toggle pill) keep their own rules, more specific: they stay
   invisible. */
:where(.ref-skin) input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ref-border-field);
    border-radius: 50%;
    background: var(--ref-surface);
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}
:where(.ref-skin) input[type="radio"]:hover:not(:disabled),
:where(.ref-skin) input[type="radio"]:checked {
    border-color: var(--area-ink, #064a71);
}
:where(.ref-skin) input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--area-ink, #064a71);
}
:where(.ref-skin) input[type="radio"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* The bottom action bar that used to live here is GONE. Every form page's save action is now the
   shared navy pill (.bs-save-pill, css/save-action.css, rendered by the SavePill widget): one
   component, never a page-local bar. Reintroducing a full-width fixed bottom bar fails
   tests/Unit/SaveActionStyleTest.php. See docs/save-action/README.md. */
@media (max-width: 767px) {
    .config-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        padding-right: 0;
    }
    .config-tab-content {
        padding-left: 0;
    }
}

/* ---- Buttons: css/ref-kit.css (one family with .ref-btn*, D-1), the small size, the glyph and the disabled primary included. ---- */

/* ---- Card-header toolbar (buttons on the right of a .formSectionTitle) ---- */
.settings-toolbar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.settings-toolbar .btn {
    font-size: 14px;
    font-weight: 500;
}
/* Toolbar button icons follow the button colour, NOT the section-title accent
   (.formSectionTitle i would otherwise tint them dark-blue → invisible on the primary button). */
.settings-toolbar .btn.settings-btn-primary i {
    color: var(--ref-on-fill) !important;
    margin-right: 6px;
}
.settings-toolbar .btn.settings-btn i {
    color: var(--area-ink, #064a71);
    margin-right: 6px;
}
.settings-toolbar .btn.settings-btn:hover i {
    color: var(--area-ink, #064a71);
}

/* ---- Inline filter bar (inside a list card, above the grid) ---- */
.settings-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
}
.settings-filter-field {
    display: flex;
    flex-direction: column;
    min-width: 170px;
}
/* A field takes its place on the bar by its LABEL, not by its foot (D-120): with the bar's items at its bottom, a help
   line under one field lifted its label and its control above the others' (the billing filters, the customer hub's
   hints). The fields line up on their labels and their controls, the help lines below them; the bar's own items — the
   actions, a lone button — keep its bottom (D-109). */
.settings-filter-bar .settings-filter-field { align-self: flex-start; }
/* A field whose values are long names (a marina picker): twice the default width, and never wider than the
   bar itself on a phone. */
.settings-filter-field.settings-filter-field-wide {
    min-width: min(380px, 100%);
}
/* 9 px to the control, as every other label (§7.0, D-30): the bar had 5. */
.settings-filter-field > label {
    margin: 0 0 9px;
    font-weight: 600;
    color: var(--ref-ink-2);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* The filter's own actions sit at the bar's bottom right, «Reset» then «Search» (D-109): pushed to the end of the last
   line of fields, or of a line of their own when the fields fill theirs; on a grid bar that gives them a whole line
   (the activities, the customer list), at its right. The order is the markup's, so Tab reads it as the eye does. */
.settings-filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    align-items: flex-end;
    margin-left: auto;
}
/* A bar that still carries «Columns» (two legacy settings lists; D-4 puts it in the page header) writes it first: the
   two groups share the right, instead of splitting the free space between them. */
.settings-filter-columns + .settings-filter-actions { margin-left: 0; }
/* A filter bar that is the ONLY content of its card has nothing to divide from: the trailing rule and
   its spacing would read as an empty half-card (price-grid calendar, "rate on a date"). */
.settings-filter-bar.settings-filter-bar-alone {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
/* A legacy `form-horizontal` search form, kept as-is structurally but wearing the card skin instead of
   Bootstrap's grey `.well` (the product hub's sub-reports: yard orders, purchases and sales, …). The
   full conversion to a .settings-filter-bar is a per-page job; this stops a grey box from landing in
   the middle of a reference-style page in the meantime. */
.settings-filter-fold {
    background: var(--ref-surface);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    padding: 20px 20px 4px;
    margin-bottom: 20px;
}
.settings-filter-fold .control-label {
    font-weight: 600;
    color: var(--ref-ink-2);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.settings-filter-fold .form-group:last-child {
    margin-bottom: 12px;
}

/* Columns customiser pushed to the right of the filter bar, before «Reset» / «Search» (D-109). */
.settings-filter-columns {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
}
/* Every button ON the filter line takes the field height, so the line reads as one row. The "Columns"
   button lives in its own `.settings-filter-columns` wrapper and was therefore missed by this rule:
   measured 38px next to two 42px buttons and 42px fields on user/admin, team/admin and
   priceGrid/crossAdjust — the last same-row height mismatch left inside the perimeter (2026-09-02). */
.settings-filter-actions .btn,
.settings-filter-columns .btn,
.settings-filter-bar > .btn,
/* ...and a segmented group nested inside a field of the bar: the three selectors above cannot reach a
   `.settings-btn-group` inside a `.settings-filter-field`, which is how productHierarchy's depth
   switch ended up 38px beside a 42px search box on one bottom-aligned line (2026-09-03). */
.settings-filter-bar .settings-btn-group .btn,
.settings-filter-bar .settings-filter-field .btn {
    height: 42px;
}
/* A <button> centres its label in the forced 42px, an <a class="btn"> does not: its 20px line sat at the top of
   the 24px content box, 2px above the Search label beside it (the Reset link, measured on admin/ai/usage,
   2026-09-30). A 24px line fills the content box exactly (42 - 2x8 padding - 2x1 border), so the label centres
   with no flex — `inline-flex` would swallow the space between an icon and its text. */
.settings-filter-actions a.btn,
.settings-filter-columns a.btn,
.settings-filter-bar > a.btn,
.settings-filter-bar .settings-btn-group a.btn,
.settings-filter-bar .settings-filter-field a.btn {
    line-height: 24px;
}

/* NOT a generic rule for `.btn-block`: tried and reverted the same day. A block button standing in a
   form column beside FIELDS should match the 42px control height, but the same selector also caught
   `user/view`'s "Print" — a block button standing beside two ordinary 38px buttons — and made that row
   ragged instead. CSS cannot tell the two apart, so the page that needs it says so itself
   (priceGrid/crossAdjust, `.cross-preview-btn`). */
.settings-page .cross-preview-btn {
    height: 42px;
}
/* A Select2 + button form inside a card header's toolbar (productBundle/view: the VAT rate, the dimension source):
   on the toolbar's line and at its 38px step, 8px from its button like the toolbar's own gaps — measured 42 beside
   38 and a 5px gap before this rule (2026-10-19). */
.settings-toolbar-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.settings-toolbar-form .select2-container .select2-choice { height: 38px !important; }
/* Pin the filter Select2 to 42px so it lines up with the text fields beside it. */
.settings-filter-field .select2-container,
.settings-filter-field .select2-container .select2-choice {
    height: 42px !important;
}

/* ---- Data grid (.settings-grid / .settings-grid-table): the table, its pinned action column and the row buttons'
   geometry are css/ref-kit.css (.ref-grid-table). The per-action colours of the row buttons stay here, for both names
   of the table (D-21: a shared grid on a page on the kit is a .ref-grid-table). ---- */
/* Per-action colour hints — each row button carries the platform-typical colour of its function, so
   the icon guides the user at a glance: schedule=blue, absences=purple, view=green, edit=orange,
   delete=red. Icon tinted at rest; a soft fill of the same colour on hover. */
.ref-grid-table .button-column a.settings-row-hours,
.settings-grid-table .button-column a.settings-row-hours { color: #3498db; }
.ref-grid-table .button-column a.settings-row-hours:hover,
.settings-grid-table .button-column a.settings-row-hours:hover { border-color: #3498db; color: #3498db; background: #eaf4fb; }
.ref-grid-table .button-column a.settings-row-absences,
.settings-grid-table .button-column a.settings-row-absences { color: #9b59b6; }
.ref-grid-table .button-column a.settings-row-absences:hover,
.settings-grid-table .button-column a.settings-row-absences:hover { border-color: #9b59b6; color: #9b59b6; background: #f5eefb; }
.ref-grid-table .button-column a.settings-row-view,
.settings-grid-table .button-column a.settings-row-view { color: var(--ref-ok); } /* 2.87 -> 5.23:1, hue kept */
.ref-grid-table .button-column a.settings-row-view:hover,
.settings-grid-table .button-column a.settings-row-view:hover { border-color: var(--ref-ok); color: var(--ref-ok); background: var(--ref-ok-bg); }
.ref-grid-table .button-column a.settings-row-action,
.settings-grid-table .button-column a.settings-row-action { color: #5a6b7b; }
.ref-grid-table .button-column a.settings-row-action:hover,
.settings-grid-table .button-column a.settings-row-action:hover { border-color: #5a6b7b; color: #34495e; background: #eef2f6; }
.ref-grid-table .button-column a.settings-row-edit,
.settings-grid-table .button-column a.settings-row-edit { color: #c2610f; }
.ref-grid-table .button-column a.settings-row-edit:hover,
.settings-grid-table .button-column a.settings-row-edit:hover { border-color: var(--ref-warn); color: var(--ref-warn); background: var(--ref-warn-bg); }
.ref-grid-table .button-column a.settings-row-danger,
.settings-grid-table .button-column a.settings-row-danger { color: var(--ref-danger-strong); }
.ref-grid-table .button-column a.settings-row-danger:hover,
.settings-grid-table .button-column a.settings-row-danger:hover { border-color: #e74c3c; color: var(--ref-danger-strong); background: var(--ref-danger-bg); }
/* A row TOGGLE that is on (`aria-pressed="true"`: the attachment shown in the customer app) reads PRESSED, as the
   current reading of «Show» — the area's tint, border and ink, whatever its tone — so its state is told by its shape,
   not by the colour of its glyph alone (D-46). After the tones, at their weight; the disabled state below wins. */
.ref-grid-table .button-column a[aria-pressed="true"],
.settings-grid-table .button-column a[aria-pressed="true"] { border-color: var(--area-accent, #064a71); background: var(--area-accent-ring, rgba(6, 74, 113, .15)); color: var(--area-ink, #064a71); }
/* A button that keeps its place but leads nowhere (CustomButtonColumn `disabled`: an <a> without href) — e.g. the
   attachments of a customer who has none. Every state written, so no hover tint pretends it can be pressed. */
.ref-grid-table .button-column a.is-disabled,
.settings-grid-table .button-column a.is-disabled,
.ref-grid-table .button-column a.is-disabled:hover,
.settings-grid-table .button-column a.is-disabled:hover,
.ref-grid-table .button-column a.is-disabled:focus,
.settings-grid-table .button-column a.is-disabled:focus,
.ref-grid-table .button-column a.is-disabled:active,
.settings-grid-table .button-column a.is-disabled:active {
    border-color: #edf1f5;
    background: #f8fafc;
    color: #b8c2cc;
    cursor: default;
}
/* Text links inside settings CONTENT inherited Bootstrap's `a { color:#428bca; text-decoration:none }`:
   3.63:1 on the white card/row, under the 4.5:1 this 14px text needs (§1.0), with colour as the ONLY
   affordance. #064a71 is 9.44:1 (8.93:1 on the #f5f9ff hover row) and the underline restores the second
   cue. Same fix as `.config-tab-content a` in super/views/tenant/config.php — CHANGE THE TWO TOGETHER:
   that page loads no shared settings stylesheet.
   Three anchor roles, because three families print a classless text link: a scaffold grid data cell (the
   formatter's *ViewLink column types), a NON-scaffold grid data cell (the attachment partials set no
   itemsCssClass), and a summary card row.
   `:not(.button-column)` keeps the pinned row-action buttons above (they are only (0,2,1), so a bare
   `td a` would outrank them). `:not(.btn)` is mandatory, not redundant: the attachment grid's
   CButtonColumn carries no `button-column` class and its buttons are `a.btn.btn-info.btn-xs`; their
   colour is already pinned with !important further down, but `text-decoration` is not.
   `.select2-choice` is not a link either: Select2's box is an <a>, and a picker in a row (the delivery note's lines,
   the purchasing conditions' add row, the bank connections) read as an underlined link that darkened under the
   pointer (D-43). Nor is a component of the kit that happens to be a link (D-153, 2026-11-12): a pill (`.ref-pill`, the
   languages of an automatic message's preview, in the row it opens under) took the cell's ink on its own filled ground
   — the current one read teal on teal, its words gone — and a chip (`.ref-chip-status` with an `href`, the language
   versions of a template) an underline. All in ONE `:not()`: a selector list there weighs its heaviest member, so the
   rule keeps its (0,4,4) and x-editable's override below still wins on the tie.
   Literal hex, not var(--area-accent): see the note on WarehouseStockController's accent below — and
   even with that fixed, a literal is what config.php's twin uses. */
.settings-page .settings-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status),
.settings-page .ref-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status),
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr > td a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status),
.settings-page .settings-summary a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status),
.settings-page a.propagate-diverge-info {
    color: var(--area-ink, #064a71);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.settings-page .settings-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):hover,
.settings-page .settings-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):focus,
.settings-page .ref-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):hover,
.settings-page .ref-grid-table > tbody > tr > td:not(.button-column) a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):focus,
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr > td a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):hover,
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr > td a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):focus,
.settings-page a.propagate-diverge-info:hover,
.settings-page a.propagate-diverge-info:focus,
.settings-page .settings-summary a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):hover,
.settings-page .settings-summary a:not(.btn, .select2-choice, .ref-pill, .ref-chip-status):focus {
    /* Derived, not picked: there is no token darker than --area-ink in every area (for master and
       prices the dark step IS the ink), and a literal navy hover flipped every link on a green page
       from green to blue. brightness() darkens whatever the area's ink is. */
    color: var(--area-ink, #064a71);
    filter: brightness(0.85);
    text-decoration: underline;
}
/* x-editable already gives its trigger a dashed bottom border — take the colour, not a second
   underline. Covers the inline price cells and both attachment partials' editable cells, whose classes
   x-editable augments with .editable-click at init. */
.settings-page .settings-grid-table > tbody > tr > td a.editable-click:not(.btn),
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr > td a.editable-click:not(.btn) {
    text-decoration: none;
}

/* Bare headings inside the area fell through to Bootstrap's own scale — h3 at 24px, h4 at 18px, h5 at
   14px — which escapes the eight-step ramp entirely. Measured on the tenant configuration: an
   `h3.text-center` rendered at 24px, and three more <h3> sit in its non-active tabs. This is the hole a
   source-level guard structurally cannot see: a scan of font-size DECLARATIONS finds nothing, because
   these elements declare none — they inherit. So the ramp is applied to the elements themselves.
   h1/h2 are left alone: .settings-page-header h1 and h2.formSectionTitle already own their steps. */
.settings-page h3,
.config-tab-content h3 { font-size: 18px; }
.settings-page h4,
.config-tab-content h4 { font-size: 16px; }
.settings-page h5,
.settings-page h6,
.config-tab-content h5,
.config-tab-content h6 { font-size: 14px; }

/* Bootstrap's contextual labels ship white text, which fails AA on every one of the six — measured
   against their own fills: default #777 1.95→ no, 4.48 · primary #428bca 3.63 · success #5cb85c 2.48 ·
   info #5bc0de 2.09 · warning #f0ad4e **1.95** (the worst text in this whole area) · danger #d9534f 3.96.
   Black is better on ALL SIX: 4.69 / 5.78 / 8.47 / 10.04 / 10.79 / 5.30. One rule, so a status badge is
   readable whichever variant a page reaches for. The fills are left alone — they are Bootstrap's, other
   areas share them, and the ink is what carries the text. */
.settings-page .label.label-default,
.settings-page .label.label-primary,
.settings-page .label.label-success,
.settings-page .label.label-info,
.settings-page .label.label-warning,
.settings-page .label.label-danger { color: #000; }

/* A prose link inside a card note: same reasoning as the grid-cell links below — Bootstrap's #428bca is
   3.63:1 with colour as the only affordance. Narrow on purpose: `.settings-page .panel-body a` would
   reach the pager, the Columns customiser and every dropdown item across 97 views. A pill or a chip of the kit that is a
   link keeps its own skin here too, as in a grid cell (D-153: a template's language versions, chips in a help line). */
.settings-page .settings-card-note a:not(.btn, .ref-pill, .ref-chip-status),
.settings-page .help-block a:not(.btn, .ref-pill, .ref-chip-status) {
    color: var(--area-ink, #064a71);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.settings-page .settings-card-note a:not(.btn, .ref-pill, .ref-chip-status):hover,
.settings-page .settings-card-note a:not(.btn, .ref-pill, .ref-chip-status):focus,
.settings-page .help-block a:not(.btn, .ref-pill, .ref-chip-status):hover,
.settings-page .help-block a:not(.btn, .ref-pill, .ref-chip-status):focus { color: var(--area-ink, #064a71); filter: brightness(0.85); }

/* Hub pages (e.g. an installment plan + its rules): a summary strip + a card head with an action. */
.settings-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}
.settings-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* Opt-in variant: ONE field PER ROW (label left, value right, hairline between), for a narrow card with
   vertical room to spare — the default wrapping row leaves it half empty. Additive: the six existing
   .settings-summary consumers are untouched unless they ask for it. */
.settings-summary--rows {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
}
.settings-summary--rows > .settings-summary-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f5f8;
}
.settings-summary--rows > .settings-summary-item:first-child { padding-top: 0; }
.settings-summary--rows > .settings-summary-item:last-child { padding-bottom: 0; border-bottom: 0; }
/* WHEN THE ROW IS TOO NARROW, THE LABEL WRAPS AND THE VALUE DOES NOT. The value is the number the row
   exists to show; a label is prose and survives a second line. Both halves used to be the wrong way
   round -- the label was `flex: 0 0 auto` (unshrinkable) and the value `min-width: 0` (shrink to
   nothing) -- so on a narrow card the label pushed the amount out and then the amount itself clipped.
   Seen on the customer hub, whose third column leaves "REVERSED BY CREDIT NOTE (CANCELLATIONS
   INCLUDED)" 278px for 405px of text. No-op wherever there is room. */
.settings-summary--rows .settings-summary-label { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.settings-summary--rows .settings-summary-value { flex: 0 0 auto; white-space: nowrap; text-align: right; }
.settings-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ref-ink-2);
}
.settings-summary-value {
    color: #2d3748;
    font-size: 14px;
}
/* Empty state — a card with nothing in it must still SAY something: what would be here, and how it
   gets here. The bare form (`<p class="settings-empty">one line</p>`) still works; the richer form,
   rendered by the shared partial _shared/_empty_state.php, adds an icon, a title, a hint and an
   optional action. Never leave a header-only table or a blank card body. */
/* .settings-empty and its parts: css/ref-kit.css (one rule with .ref-empty). */

/* A one-line explanatory note at the top of a card body (what this section is for / why it is empty).
   Left-aligned and full width — unlike .settings-empty-hint, which is centred under an empty state. */
.settings-card-note {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ref-muted);
}

/* Boolean icon cells: the ok ink's check (5.23:1; the master green #27ae60 it had was 2.87:1, under the 3:1 of a
   symbol, D-56) / muted dash */
.settings-grid-table .true-icon,
.settings-grid-table .fa-check,
.settings-grid-table .fa-square-check { color: var(--ref-ok); }
.settings-grid-table .false-icon { color: #cbd5e0; }
/* …and ONLY a boolean. A check that is the glyph of something else keeps its owner's colour: a row action
   (CButtonColumn's `.button-column`, a `settings-row-*` tone, any `.btn` — a «confirm» check read as a green
   tick inside a slate button, and stayed green on the button's hover) or a chip (the «passed» chip of the
   price grid's test cases drew its check in the boolean's green beside its own label). At least (0,3,0) over the (0,2,0)
   above; `.true-icon` is a boolean by name and keeps its green. */
.settings-grid-table :is(.button-column, .btn, a[class*="settings-row-"], .settings-chip) :is(.fa-check, .fa-square-check) { color: inherit; }
/* Small read-only status badge (e.g. OTP flags) */
.settings-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: var(--ref-muted);
}
.settings-badge.is-on { background: var(--ref-ok-bg); color: var(--ref-ok); }
.settings-badge.is-off { background: var(--ref-surface-sunk); color: var(--ref-muted); }

/* ---- Detail (view) page: avatar + key/value rows ---- */
.settings-detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.settings-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ref-info-bg);
    color: var(--area-ink, #064a71);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex: 0 0 auto;
    text-transform: uppercase;
}
.settings-detail-name { font-size: 18px; font-weight: 600; color: var(--ref-ink); }
.settings-detail-sub { font-size: 13px; color: var(--ref-ink-2); }
.settings-detail {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.settings-detail th {
    text-align: left;
    font-weight: 600;
    color: var(--ref-ink-2);
    font-size: 13px;
    padding: 11px 20px 11px 0;
    white-space: nowrap;
    vertical-align: top;
    width: 180px;
    border-top: 1px solid #f2f5f8;
}
.settings-detail td {
    padding: 11px 0;
    color: var(--ref-ink);
    font-size: 14px;
    border-top: 1px solid #f2f5f8;
    vertical-align: top;
}
.settings-detail tr:first-child th,
.settings-detail tr:first-child td { border-top: none; }
/* Action row under the detail card (Working hours / Absences / Print). */
.settings-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}
.settings-detail-actions .btn { margin: 0; }
/* A detail page's own section below the everyday actions — e.g. "Security" on admin/user/view, which gathers
   what acts on the person's credential (red buttons) apart from working hours and absences. */
.settings-detail-section {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.settings-detail-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #334155;
}
.settings-detail-section-title i { color: var(--ref-danger); }
.settings-detail-section .settings-detail-actions { margin-top: 12px; }
.settings-detail-section .help-block { margin: 10px 0 0; font-size: 13px; }
/* The PrintButton widget renders a full-width .row/.col-xs-12/.btn-block block — neutralise its grid
   so it sits inline as a compact button matching the two beside it, instead of stretching the row. */
.settings-detail-actions .row { margin: 0; }
.settings-detail-actions .col-xs-12 { padding: 0; width: auto; }
.settings-detail-actions .btn-group,
.settings-detail-actions .btn-group.btn-block { width: auto; display: inline-flex; }
.settings-detail-actions .btn-block { width: auto; }
.settings-detail-actions .dropdown-toggle { text-align: left; }

/* ---- Chips (compact pills) — status flags + colour-coded roles in the grid ---- */
/* .settings-chip and its tones: css/ref-kit.css (one rule with .ref-chip-status). */
/* The colour field (`.settings-color-row` / `.settings-color-input`) lives in css/application.css:
   it is the one colour picker of the whole application, settings pages or not. */
/* Bold user name column */
.settings-grid-table td.col-user-name { font-weight: 700; color: var(--ref-ink); }
/* Grid summary + pager, quieter. `.ref-grid` is the kit's name of the wrapper (§8.1), `.settings-grid` its alias: a kit
   grid outside the settings area kept Bootstrap's summary, exports and pager under the kit's rows (D-44). */
.ref-grid .summary,
.settings-grid .summary { color: var(--ref-muted); font-size: 13px; margin-bottom: 10px; }
.ref-grid .pager,
.settings-grid .pager { margin: 10px 0 14px; }

/* Pager — reference-styled to match the settings design: separate rounded pills, soft borders, a
   dark-blue active page and a subtle hover. Scoped to .settings-page (and to a kit grid's `.ref-grid`, D-44) so the
   shared GridExcel Bootstrap-3 pager (ul.pagination) is NOT restyled app-wide. !important overrides BS3's floats,
   fused negative margins and first/last-child radii regardless of stylesheet load order. */
.ref-grid .pagination,
.settings-page .pagination {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 0;
    margin: 0;
    vertical-align: middle;
}
.ref-grid .pagination > li,
.settings-page .pagination > li { display: inline-flex; float: none; }
.ref-grid .pagination > li > a,
.ref-grid .pagination > li > span,
.settings-page .pagination > li > a,
.settings-page .pagination > li > span {
    float: none !important;
    margin: 0 !important;
    min-width: 34px;
    height: 34px;
    padding: 0 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: var(--ref-surface) !important;
    color: var(--ref-ink) !important;
    font-size: 13px;
    line-height: 1;
    transition: all 0.15s ease;
}
.ref-grid .pagination > li > a:hover,
.ref-grid .pagination > li > a:focus,
.settings-page .pagination > li > a:hover,
.settings-page .pagination > li > a:focus {
    border-color: var(--area-accent, #064a71) !important;
    color: var(--area-ink, #064a71) !important;
    background: #f2f8fc !important;
}
.ref-grid .pagination > li.active > a,
.ref-grid .pagination > li.active > span,
.ref-grid .pagination > li.active > a:hover,
.ref-grid .pagination > li.active > span:hover,
.ref-grid .pagination > li.active > span:focus,
.settings-page .pagination > li.active > a,
.settings-page .pagination > li.active > span,
.settings-page .pagination > li.active > a:hover,
.settings-page .pagination > li.active > span:hover,
.settings-page .pagination > li.active > span:focus {
    background: var(--area-ink, #064a71) !important;
    border-color: var(--area-ink, #064a71) !important;
    color: var(--ref-on-fill) !important;
    font-weight: 600;
}
.ref-grid .pagination > li.disabled > a,
.ref-grid .pagination > li.disabled > span,
.ref-grid .pagination > li.disabled > a:hover,
.ref-grid .pagination > li.disabled > span:hover,
.settings-page .pagination > li.disabled > a,
.settings-page .pagination > li.disabled > span,
.settings-page .pagination > li.disabled > a:hover,
.settings-page .pagination > li.disabled > span:hover {
    color: #cbd5e0 !important;
    background: var(--ref-surface) !important;
    border-color: #edf2f7 !important;
    cursor: not-allowed;
}
/* Export buttons (PDF / Export view / Export all columns) — align to the page's neutral button. */
.ref-grid a.btn.btn-default,
.ref-grid a.btn.btn-default.btn-sm,
.settings-grid a.btn.btn-default,
.settings-grid a.btn.btn-default.btn-sm {
    background: var(--ref-surface);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--ref-ink-2);
    font-weight: 500;
    box-shadow: none;
    margin-left: 6px;
    padding: 6px 12px;
    transition: all 0.15s ease;
}
.ref-grid a.btn.btn-default:hover,
.ref-grid a.btn.btn-default:focus,
.ref-grid a.btn.btn-default.btn-sm:hover,
.ref-grid a.btn.btn-default.btn-sm:focus,
.settings-grid a.btn.btn-default:hover,
.settings-grid a.btn.btn-default:focus,
.settings-grid a.btn.btn-default.btn-sm:hover,
.settings-grid a.btn.btn-default.btn-sm:focus {
    background: var(--ref-surface-hover);
    border-color: var(--area-accent, #064a71);
    color: var(--area-ink, #064a71);
}
.ref-grid a.btn.btn-default i,
.settings-grid a.btn.btn-default i { margin-right: 5px; color: var(--ref-glyph); }
.ref-grid a.btn.btn-default:hover i,
.settings-grid a.btn.btn-default:hover i { color: var(--area-ink, #064a71); }
/* …but in the ROW-ACTION column the icon is not decoration beside a label — it IS the control's whole
   content, so it carries the control's own colour and loses the label gap. The grey measured 2.56:1 on
   white, under even the 3:1 a graphical object needs, and on those buttons that grey was the entire
   button (two per row on admin/customer/presence).

   Anchored on `.btn-xs`, which is what separates the two populations: a grid ROW-ACTION button is
   `btn btn-default btn-xs` (PresenceRowActions.php:53 and every CButtonColumn in this module), while
   GridExcel renders its export links `btn btn-default btn-sm` (GridExcel.php:891). Two anchors were
   tried and rejected, and both failures are worth keeping:
     - `:only-child` counts ELEMENT siblings only, so it does NOT exclude a text node. The export
       captions are `<i class="fa fa-download"></i> ` + text (GridExcel.php:217, :871), which means the
       icon there IS an only-child: the rule silently stripped the gap and recoloured the icon on every
       export strip in the application, ten-odd settings grids, none of them in this perimeter.
     - `.button-column`, the class CButtonColumn puts on its cells, does not survive: a view that passes
       its own `htmlOptions` REPLACES it, and customer/presence.php does exactly that
       (`'htmlOptions' => ['style' => 'white-space: nowrap']`), so the cell carries no class at all. */
.ref-grid a.btn.btn-default.btn-xs > i,
.settings-grid a.btn.btn-default.btn-xs > i {
    margin-right: 0;
    color: inherit;
}
/* Space the export/summary strip above the top of the card footer area. */
.ref-grid .summary.pull-right,
.ref-grid .col-md-12,
.settings-grid .summary.pull-right,
.settings-grid .col-md-12 { margin-top: 6px; }

/* ---- Select2 skin (single + multi) to match #064a71, radius 8, 42px box ---- */
/* Guard: Select2 v3 copies the source element's classes (incl. form-control) onto
   its container — neutralise that so the .form-control box rule above doesn't leak. */
:where(.ref-skin) .select2-container.form-control {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    height: auto !important;
    box-shadow: none !important;
}
:where(.ref-skin) .select2-container .select2-choice,
:where(.ref-skin) .select2-container-multi .select2-choices {
    border-radius: 8px !important;
    border: 1px solid var(--ref-border-field) !important;
    padding: 6px 12px !important;
    background-image: none !important;
    background-color: var(--ref-surface) !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    height: 42px !important;
    display: flex !important;
    align-items: center;
}
:where(.ref-skin) .select2-container-multi .select2-choices {
    padding: 3px 6px !important;
    height: auto !important;
    min-height: 42px !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
}
/* Placeholder text. Select2 v3 ships `.select2-default { color: #999 !important }` = 2.85:1 on white,
   well under AA, and colour is the only thing that separates "nothing chosen yet" from a real value.
   #64748b is the §1.0 hint grey (4.76:1) — the same fix css/planning-page-chrome.css already carries.
   NOTE the selector: select2.js puts `select2-default` on the `.select2-choice` ANCHOR
   (select2.js:2374 `this.selection.addClass`), NOT on the container — a rule written as
   `.select2-container.select2-default` matches nothing and looks like it works until you measure.
   AND NOTE THE SCOPE: this stylesheet is also loaded by admin/views/orderDetail/_dialogAssets.php,
   i.e. on the ORDER page, which is outside the settings perimeter. An unscoped rule here would
   repaint every Select2 placeholder there too; the restyle is deliberately gradual (PO, 2026-09-02),
   so it stays inside `.settings-page`. */
.settings-page .select2-default .select2-chosen,
/* A MULTIPLE select writes its placeholder as the input's value, with `select2-default` on the input (the e-mail
   senders' «Who may use it», 2026-10-19: 2.85:1). */
.settings-page .select2-search-field input.select2-default,
/* …and on every page of the kit, a dialog hung outside the page frame included (D-36): the twins at the skin's weight. */
:where(.ref-skin) .select2-default .select2-chosen,
:where(.ref-skin) .select2-search-field input.select2-default,
/* A modal is appended OUTSIDE the page wrapper, so `.settings-page` cannot reach its fields: measured
   2026-09-03 on productHierarchy's "Move to…" modal, whose destination Select2 still showed the 2.85:1
   #999 placeholder. Scoped by the AREA STAMP rather than by the modal class alone, because
   `.settings-modal` is also used by admin/views/orderDetail/planningSetup.php — a Yard page that
   borrowed the scaffold (body.bs-area-yard), and the restyle is gradual (§1.1). */
body.bs-area-app .settings-modal .select2-default .select2-chosen,
body.bs-area-app .settings-columns-modal .select2-default .select2-chosen { color: var(--ref-muted) !important; }

/* `.text-muted`. Bootstrap 3.4.1 ships `.text-muted { color: #777 }` (the customizer build the layout
   links unconditionally) = 4.4781:1 on the white card — under the §1.0 4.5 floor. This area uses the
   class for real secondary copy, not only for an em-dash placeholder: the article name beside a price
   grid (priceGrid/reorder.php) and the "Not set" default (productPriceList/admin.php) both carry
   information nothing else on the row gives. #64748b is the §1.0 hint grey (4.7588:1), the same value
   and reasoning as the Select2 placeholder above. Scoped to `.settings-page` so nothing outside this
   area moves; two classes (0,2,0) beat Bootstrap's single class whatever order the sheets land in. */
.settings-page .text-muted,
/* …and in a dialog of any page of the kit, which hangs outside the page frame (D-36: the customer's e-mail dialog). */
:where(.ref-skin) .modal .text-muted { color: var(--ref-muted); }

/* …but #64748b does NOT clear the floor on this area's two TINTED grounds, so there the class steps up
   to the §1.0 label grey — exactly what .settings-page-sub and `.settings-page > .help-block` already
   do when the ground stops being a white card:
     - `td.settings-matrix-preview` (#eef4f8): 4.2900:1 at #64748b, 6.7842:1 at #4a5568. The price-grid
       calendar puts REAL text in that cell (the margin percentage), not only the em-dash.
     - `.table-striped` even rows, where Bootstrap paints the <td>, not the <tr> (#f6f6f6, from
       css/application.css), so it wins over any row background: 4.4034:1 at #64748b, 6.9636:1 at
       #4a5568. product/propagate.php's two tables render their dash there.
   Both selectors out-specify the rule above (0,3,0 and 0,4,2 vs 0,2,0), so file order does not matter.
   Measured after: white card 4.7588 · tr.odd #fcfdfe 4.6728 · thead #fafbfc 4.5933 · tr:hover #f5f9ff
   4.5043 (the tightest — darkening that hover breaks it) · .table-hover lime #f6ffcf 4.5602. */
.settings-page .settings-matrix-preview .text-muted,
.settings-page .table-striped > tbody > tr:nth-child(even) > td .text-muted { color: var(--ref-ink-2); }
:where(.ref-skin) .select2-container .select2-choice .select2-arrow {
    background: transparent !important;
    border-left: none !important;
    width: 28px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: 0 !important;
    height: 100% !important;
}
/* Replace the dated v3.5 sprite arrow with a clean CSS chevron (design-system rule). */
:where(.ref-skin) .select2-container .select2-choice .select2-arrow b,
:where(.ref-skin) .select2-container .select2-choice div b {
    display: block !important;
    position: relative !important;
    width: 18px !important;
    height: 100% !important;
    margin: 0 auto !important;
    background: none !important;
}
:where(.ref-skin) .select2-container .select2-choice .select2-arrow b::after,
:where(.ref-skin) .select2-container .select2-choice div b::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -6px 0 0 -5px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
:where(.ref-skin) .select2-dropdown-open .select2-choice .select2-arrow b::after,
:where(.ref-skin) .select2-dropdown-open .select2-choice div b::after {
    margin-top: -2px;
    transform: rotate(-135deg);
}
/* The chosen values of a multiple select: css/ref-kit.css, one skin with the page skin's (D-37). */
:where(.ref-skin) .select2-container-active .select2-choice,
:where(.ref-skin) .select2-container-multi.select2-container-active .select2-choices {
    border-color: var(--area-accent, #064a71) !important;
    box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, 0.15)) !important;
}
:where(.ref-skin) .select2-dropdown-open .select2-choice,
:where(.ref-skin) .select2-dropdown-open.select2-container-multi .select2-choices {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
:where(.ref-skin) .select2-dropdown-open.select2-drop-above .select2-choice,
:where(.ref-skin) .select2-dropdown-open.select2-drop-above.select2-container-multi .select2-choices {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}
:where(.ref-skin) .select2-drop {
    border: 1px solid var(--ref-border-field) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    background: var(--ref-surface) !important;
    padding-top: 4px !important;
    margin-top: -1px !important;
    transition: border-color 0.2s ease;
}
:where(.ref-skin) .select2-dropdown-open .select2-drop {
    border-color: var(--area-accent, #064a71) !important;
}
:where(.ref-skin) .select2-drop.select2-drop-above {
    border-top: 1px solid var(--ref-border-field) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    margin-top: 1px !important;
}
:where(.ref-skin) .select2-dropdown-open.select2-drop-above .select2-drop {
    border-color: var(--area-accent, #064a71) !important;
}
:where(.ref-skin) .select2-drop .select2-search {
    padding: 8px 12px !important;
}
/* css/select2-bootstrap.css (loaded app-wide by //layouts/main) types the closed Select2 in Helvetica, so every
   filter box of the settings area read in a different face from the Quicksand around it (measured on
   admin/ai/usage, 2026-09-30). Scoped to the area: outside `.settings-page` Select2 keeps its current face. */
.settings-page .select2-container .select2-choice,
.settings-page .select2-container .select2-choices,
.settings-page .select2-container .select2-choices .select2-search-field input,
/* …on every page of the kit (D-36): a dialog hung outside the page frame read Helvetica under Quicksand labels (the
   customer card's e-mail dialog). select2-bootstrap.css loads before this sheet, so the same weight wins. */
:where(.ref-skin) .select2-container .select2-choice,
:where(.ref-skin) .select2-container .select2-choices,
:where(.ref-skin) .select2-container .select2-choices .select2-search-field input {
    font-family: inherit;
}
/* …and the chosen value in the ink, as a text field's (D-56): select2-bootstrap.css writes it #555. The placeholder keeps
   its hint ink (`.select2-default`, above). */
:where(.ref-skin) .select2-container .select2-choice { color: var(--ref-ink); }
:where(.ref-skin) .select2-drop .select2-search input {
    /* select2.css types the search field in `sans-serif`: the one element of an open list not in the page face. */
    font-family: inherit !important;
    border-radius: 6px !important;
    border: 1px solid var(--ref-border-field) !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    background-image: none !important;
}
:where(.ref-skin) .select2-drop .select2-search input:focus {
    border-color: var(--area-accent, #064a71) !important;
    box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, 0.15)) !important;
}
:where(.ref-skin) .select2-results {
    max-height: 250px !important;
    padding: 4px !important;
}
:where(.ref-skin) .select2-results .select2-result {
    border-radius: 6px !important;
    margin-bottom: 2px !important;
}
:where(.ref-skin) .select2-results .select2-result:last-child {
    margin-bottom: 0 !important;
}
:where(.ref-skin) .select2-results .select2-highlighted {
    background-color: var(--area-ink, #064a71) !important;
    color: var(--ref-on-fill) !important;
}
:where(.ref-skin) .select2-results .select2-result-label {
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
/* The rule above flattens every row, and with it the bold and the indent select2.css gives an <optgroup>:
   a group read exactly like one of its options. The group is a heading again (the grid-header type) and its
   options sit under it. */
:where(.ref-skin) .select2-results .select2-result-with-children > .select2-result-label {
    padding-top: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ref-ink-2);
    cursor: default;
}
:where(.ref-skin) .select2-results .select2-result-sub .select2-result-label {
    padding-left: 24px !important;
}

/* Input groups and addons styling. Not inside the kit's search box (`.ref-search`, css/ref-kit.css): a component that
   draws its own field — `:where()`, so the exclusion adds no weight. */
:where(.ref-skin) .input-group:where(:not(.ref-search *)) {
    display: table !important;
    width: 100% !important;
    border-collapse: separate !important;
}
:where(.ref-skin) .input-group .form-control:where(:not(.ref-search *)) {
    display: table-cell !important;
    float: none !important;
    width: 100% !important;
}
:where(.ref-skin) .input-group-addon:where(:not(.ref-search *)) {
    display: table-cell !important;
    vertical-align: middle !important;
    background-color: var(--ref-surface-hover) !important;
    border: 1px solid var(--ref-border-field) !important;
    color: var(--ref-muted) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    white-space: nowrap;
    width: 1% !important;
}
:where(.ref-skin) .input-group .form-control:first-child:where(:not(.ref-search *)) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}
:where(.ref-skin) .input-group-addon:last-child:where(:not(.ref-search *)) {
    border-left: none !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}
:where(.ref-skin) .input-group-addon:first-child:where(:not(.ref-search *)) {
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}
/* A button joined to a field (`.input-group-btn`, D-127): as tall as the field beside it — the field's height, not the
   button's own padding, which left Bootstrap's `btn-default` at 34 px and the kit's button at 38 beside a 42 px field.
   Whatever button sits there; its label stays centred. In a grid row the field is the small control (D-32), and so is
   the button. */
:where(.ref-skin) .input-group-btn:where(:not(.ref-search *)) > .btn {
    height: var(--ref-control-h) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-btn:where(:not(.ref-search *)) > .btn {
    height: var(--ref-control-h-sm) !important;
}
/* …and a neutral one is edged like the field at rest (`--ref-border-field`, as the addons above), not with a free
   button's light edge or Bootstrap's grey, which cut the pair in two (the user, 2026-11-16). Hover and focus stay the
   button's; a filled one (primary, danger) keeps its own. */
:where(.ref-skin) .input-group-btn:where(:not(.ref-search *)) > .btn:is(.ref-btn, .btn-default, .settings-btn, .boat-rent-btn):where(:not(:hover, :focus, :active)) {
    border-color: var(--ref-border-field);
}
:where(.ref-skin) .input-group .form-control:last-child:where(:not(.ref-search *)) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}
/* A JOINED CONTROL READS AS ONE (D-157). A field BETWEEN an addon and a button («€ · amount · Save») is square on both
   sides: the rules above square a first or a last field only, so a middle one kept its corners at both seams (and a
   page squared it by hand). A button that ends a grid row's control takes the grid's 4 px on its outer corners, as the
   addon at the other end does (D-32, D-121). A neutral joined button draws the FIELD's boundary at rest: D-127's rule
   above (its own pale border drew the field's last edge at 1.2:1, under the 3:1 of a control, D-31). The save of the
   user's work joined to a field is the green save (§4.1) at the field's height (D-127): the pill's 16 px type and
   padding brought down to a field's line. Never inside the kit's search box (`.ref-search`, its alias `.boat-rent-search`): it draws its own field. */
:where(.ref-skin) .input-group .form-control:not(:first-child):not(:last-child):where(:not(.ref-search *, .boat-rent-search *)),
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group .form-control:not(:first-child):not(:last-child):where(:not(.ref-search *, .boat-rent-search *)) {
    border-radius: 0 !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-btn:last-child:where(:not(.ref-search *, .boat-rent-search *)) > .btn {
    border-top-right-radius: var(--ref-radius-inset) !important;
    border-bottom-right-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) :is(.ref-grid-table, .settings-grid-table, .boat-rent-lines-table) .input-group-btn:first-child:where(:not(.ref-search *, .boat-rent-search *)) > .btn {
    border-top-left-radius: var(--ref-radius-inset) !important;
    border-bottom-left-radius: var(--ref-radius-inset) !important;
}
:where(.ref-skin) .input-group-btn:where(:not(.ref-search *, .boat-rent-search *)) > .bs-btn-save {
    padding: 0 16px !important;
    font-size: var(--ref-fs-body) !important;
    line-height: 20px;
}
/* …and in its states (D-158): focused, the whole group says it — the addon takes the field's ink, and the field rises
   over its neighbours so its halo is not painted under them; in error (`.has-error`, D-70), the addon is framed with the
   field, and a focused field in error has the danger ring (D-31's `--ref-focus-danger`), not the area's. */
:where(.ref-skin) .input-group:where(:not(.ref-search *, .boat-rent-search *)):focus-within > .input-group-addon {
    border-color: var(--area-ink, #064a71) !important;
}
:where(.ref-skin) .input-group .form-control:where(:not(.ref-search *, .boat-rent-search *)):focus {
    position: relative;
    z-index: 3;
}
:where(.ref-skin) .has-error .input-group-addon:where(:not(.ref-search *, .boat-rent-search *)),
:where(.ref-skin) .has-error .input-group:where(:not(.ref-search *, .boat-rent-search *)):focus-within > .input-group-addon {
    border-color: var(--ref-danger-field) !important;
}
:where(.ref-skin) .has-error .form-control:where(:not(.ref-search *, .boat-rent-search *)):focus {
    border-color: var(--ref-danger-field) !important;
    box-shadow: var(--ref-focus-danger) !important;
}

/* ---- Confirm / error dialogs: css/ref-kit.css, for every page and in every area (D-18), sizes included. ---- */

/* ---- Columns customiser modal (EColumns / CJuiSortable) skinned to the settings look ----
   EColumns renders a sortable <ul> of .list-group-item (checkbox + column header) + Apply/Reset
   buttons; its own ecolumns.css is off-brand, so re-skin it here (loaded only on the cluster pages). */
.settings-columns-modal .modal-content {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.settings-columns-modal .modal-header {
    background: var(--ref-surface-head);
    border-bottom: 1px solid var(--ref-divider);
    padding: 16px 20px;
}
.settings-columns-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ref-ink);
}
.settings-columns-modal .modal-body { padding: 16px 20px; }
.settings-columns-modal .modal-footer { border-top: 1px solid var(--ref-divider); padding: 12px 20px; }
/* Intro help line above the list. */
.settings-columns-modal .modal-body > p,
.settings-columns-modal .modal-body > p small {
    color: var(--ref-ink-2);
    font-style: italic;
    font-size: 13px;
}
/* The sortable column list. */
.settings-columns-modal ul {
    list-style: none;
    margin: 12px 0;
    padding: 0;
    border: 1px solid var(--ref-hairline);
    border-radius: 8px;
    overflow: hidden;
}
.settings-columns-modal ul .list-group-item {
    border: none;
    border-bottom: 1px solid #f2f5f8;
    border-radius: 0;
    margin: 0;
    padding: 10px 14px;
    background: var(--ref-surface);
    cursor: grab;
    transition: background 0.15s ease;
}
.settings-columns-modal ul .list-group-item:active { cursor: grabbing; }
.settings-columns-modal ul .list-group-item:last-child { border-bottom: none; }
.settings-columns-modal ul .list-group-item:hover { background: var(--ref-row-hover); }
.settings-columns-modal ul .list-group-item label {
    margin: 0;
    font-weight: 500;
    color: var(--ref-ink);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
}
/* Apply (submit, was btn-primary) + Reset (was btn-warning) → settings tone. */
.settings-columns-modal .btn-primary {
    background: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    border-radius: 8px;
    color: var(--ref-on-fill);
}
.settings-columns-modal .btn-primary:hover,
.settings-columns-modal .btn-primary:focus {
    background: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.12);
}
.settings-columns-modal .btn-warning {
    background: var(--ref-surface);
    border: 1px solid #e2e8f0;
    color: var(--ref-ink-2);
    border-radius: 8px;
}
.settings-columns-modal .btn-warning:hover,
.settings-columns-modal .btn-warning:focus {
    background: var(--ref-surface-hover);
    border-color: var(--area-accent, #064a71);
    color: var(--area-ink, #064a71);
}
/* EColumns floats Apply right / Reset left in a trailing div — clear the floats.
   The `:not()` is load-bearing. The live-test modal of the pricing editor borrows this modal skin
   (`class="modal fade settings-columns-modal"`), so "the last div of the form" was matching the LAST
   INPUT GROUP of its sample-input form instead of a footer: that group got `overflow: hidden` and a
   stray 14px, and since a Bootstrap `.row` overhangs its container by the 15px gutter on each side,
   the audit reported 15px of clipped content on it at every width. Nothing visible was lost (the
   overhang is empty gutter), which is exactly why it could sit there unnoticed. */
.settings-columns-modal form:not(#pstest-inputs) > div:last-child { overflow: hidden; margin-top: 14px; }

/* Bootstrap 3 gives `.row` a clearfix but NOT `.form-group`, so a form-group holding `col-*` children
   collapses to zero height and its floats hang below it. Inside these modals that is not cosmetic: the
   rule above makes the footer row a new block formatting context, and a BFC must not overlap a float —
   so it shrinks to fit BESIDE the uncleared columns, measured at width 0, and `.modal-content`'s
   `overflow: hidden` then clips the save button clean out of the dialog. The user could not commit the
   param / variant / option modals at all, and the fields below the first row were being cut too
   (content box 324px for 415px of form). Measured 2026-09-02; the app-wide `.form-group > .col-*`
   pattern is in hundreds of views, so the clearfix stays scoped to this modal family. */
.settings-columns-modal form .form-group::before,
.settings-columns-modal form .form-group::after {
    content: " ";
    display: table;
}
.settings-columns-modal form .form-group::after { clear: both; }

/* x-editable inline-edit popover (sort_order on the Customer/Vector type lists): the widget's default
   confirm button is Bootstrap blue. On the settings pages (macro-area "app") tint it to the settings
   navy so the inline editor matches. Scoped to body.bs-area-app because the popover is body-appended,
   so this never touches x-editable on other macro-areas (priceGrid, etc.). */
body.bs-area-app .editable-buttons .editable-submit {
    background-color: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
}
body.bs-area-app .editable-buttons .editable-submit:hover,
body.bs-area-app .editable-buttons .editable-submit:focus {
    background-color: var(--area-accent-dark, #043552);
    border-color: var(--area-accent-dark, #043552);
}
/* The same editor appears INLINE (not in a popover) on the price-list detail, whose macro-area is not
   "app" — so the rule above never reached it and the pair rendered as a stock blue tick next to a BLACK
   cross. Keyed off .settings-page instead: it covers every restyled page whatever its area, and no
   legacy page carries that class. The cancel is the quiet twin of a settings-btn. */
.settings-page .editable-buttons .editable-submit {
    background-color: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    color: var(--ref-on-fill);
}
.settings-page .editable-buttons .editable-submit:hover,
.settings-page .editable-buttons .editable-submit:focus {
    background-color: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.12);
}
.settings-page .editable-buttons .editable-cancel {
    background-color: var(--ref-surface);
    border-color: var(--ref-border-soft);
    color: var(--ref-ink-2);
}
.settings-page .editable-buttons .editable-cancel:hover,
.settings-page .editable-buttons .editable-cancel:focus {
    background-color: #f6f9fc;
    border-color: #94a3b8;
    color: var(--ref-ink);
}
.settings-page .editable-buttons .btn { border-radius: 8px; }

/* =============================================================================
 * Browser-review fixes (2026-08-07): things a static/markup review missed.
 * ========================================================================== */

/* (A) Field alignment inside a card. The surgically-reskinned forms (e.g. Document
   types) keep legacy `.form-group > .col-*` groups directly in a .panel-body; unlike
   `.row`, a .form-group has no negative side margins, so its columns sat 15px inset
   from the `.row`-based cards. Give such a .form-group — one that holds COLUMNS, i.e. stands as a row — the same row
   gutter so every field aligns to the card content edge. D-143 (2026-11-12): only that one. The rule named every
   .form-group of the body, so a group INSIDE a column (`.row > .col-md-12 > .form-group`) was pulled 15px out of its
   card too (the contract wizard's settings, «Where "new contract" leads»). */
.settings-page .inner-panel .panel-body .form-group:has(> [class*="col-"]),
.settings-page .ref-card-body .form-group:has(> [class*="col-"]) {
    margin-left: -15px;
    margin-right: -15px;
}
/* A help line of a settings form sits on what it explains, 5 px under it and 10 px over what follows (Bootstrap's),
   whichever card markup holds the form. Only one set INSIDE the body's blocks (a field, a group): a note set straight
   in the card's body keeps the kit's spacing (css/ref-kit.css `.ref-card-body > .help-block`). */
.settings-page :where(.ref-card-body *) > .help-block { margin: 5px 0 10px; }

/* (B) Validation errors, aligned to the design system. Yii's default errorSummary is
   an unstyled bordered list; render it as a soft danger alert. Inline field errors
   (errorMessageCssClass="text-danger") get a little breathing room under the input. */
.settings-page .errorSummary {
    background: var(--ref-danger-bg) !important;
    border: 1px solid #f3c0c0 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    color: #a1372f !important;
}
.settings-page .errorSummary p {
    font-weight: 600 !important;
    margin: 0 0 6px !important;
}
.settings-page .errorSummary ul {
    margin: 0 !important;
    padding-left: 18px !important;
}
.settings-page .errorSummary ul li { margin: 2px 0 !important; }
.settings-page .form-control.error,
.settings-page .error .form-control,
.settings-page input.error,
.settings-page select.error,
/* …and the live (on change) validation, which ActiveForm marks on the field's column as `has-error`: the same error
   had a red frame after a save and a grey one while typing (aesthetic review, 2026-10-09). A Select2 too. */
.settings-page .has-error .form-control,
.settings-page .has-error .select2-container .select2-choice,
.settings-page .select2-container.error .select2-choice,
/* …on every page of the kit (D-70): the field skin's `border … !important` is `:where(.ref-skin)` and erased Bootstrap's
   `.has-error` frame there too, so outside the page frame — a dialog, a kit page with no frame — a field in error had
   no frame at all. The twins at the skin's weight, after its focus rule, so a focused field in error stays red. */
:where(.ref-skin) .form-control.error,
:where(.ref-skin) .error .form-control,
:where(.ref-skin) input.error,
:where(.ref-skin) select.error,
:where(.ref-skin) .has-error .form-control,
:where(.ref-skin) .has-error .select2-container .select2-choice,
:where(.ref-skin) .select2-container.error .select2-choice {
    /* The danger ink, 5.44:1 (it was #e0908a, 2.46:1: under the 3:1 of a control's boundary, §1.0) — darker than a
       resting field too, so the frame reads without its colour (D-31). */
    border-color: var(--ref-danger-field) !important;
}
/* A Select2 that cannot be used (disabled, or read-only — the birth municipality outside Italy, a fixed customer) looked
   live: white, a chevron, a placeholder to click. The read-only fill, no chevron, and its text kept at AA (#4a5568 on
   #f1f4f7: the placeholder grey would be 4.31:1). */
.settings-page .select2-container-disabled .select2-choice,
.settings-page .select2-container-multi.select2-container-disabled .select2-choices,
/* …on every page of the kit (D-70): the skin that made it look live is `:where(.ref-skin)`. */
:where(.ref-skin) .select2-container-disabled .select2-choice,
:where(.ref-skin) .select2-container-multi.select2-container-disabled .select2-choices {
    background: var(--ref-surface-sunk) !important;
    cursor: not-allowed;
}
.settings-page .select2-container-disabled .select2-chosen,
:where(.ref-skin) .select2-container-disabled .select2-chosen { color: var(--ref-ink-2) !important; }
.settings-page .select2-container-disabled .select2-arrow,
:where(.ref-skin) .select2-container-disabled .select2-choice .select2-arrow { display: none !important; } /* beats the skin's flex !important (0,3,0) */
/* The modal and the slide-in panel appended OUTSIDE `.settings-page` (js/product-hierarchy.js marks the offending field
   `.error`) had their own copy of the error frame, scoped by the app area's stamp: the twins above reach them on every
   page of the kit (D-70), so the copy went. */
.settings-page .text-danger,
.settings-page .errorMessage { margin-top: 4px; font-size: 13px; }

/* Bootstrap's `small { font-size: 85% }` over the 14px body = 11.9px, i.e. the 12px step this area's
   ramp says it ABSORBED into 13 (see the TYPE SCALE block at the top). A scan of the CSS cannot
   see it: it reads declarations, and this size comes from a framework rule applied to an HTML tag.
   Measured 2026-09-03: 8 occurrences on userAudit/api and 23 on userAudit/index, and the idiom appears
   in 9 places in that cluster and nowhere else in the area. */
.settings-page small { font-size: 13px; }

/* (C) Shared attachment uploader (/attachment/_list) embedded in a settings card
   (e.g. Port map edit). It ships legacy Bootstrap chrome (dropzone, a default `.items`
   grid, btn-info / btn-danger btn-xs buttons). Scope a modern skin to .settings-page,
   keyed off the default `.items` table (the settings scaffold/hub grids use
   .settings-grid-table, never .items) so other macro-areas are untouched. */
/* The drop box itself is the kit's drop zone since 2026-10-21 (css/ref-kit.css, `.ref-dropzone`, D-62): a settings
   page's `.dropzone` is one of its names, with the same dashes, radius, hover, readable drag state and keyboard focus. */
/* The legacy uploader (attachment/_list: a record not saved yet, and the older forms) inside the design system's pages
   (aesthetic review, 2026-10-09): a 16px green title under a 2x icon and black <small> hints became the bs-attach drop
   zone's type — title 14/600, hints 13px grey. The staged-file note under it («Remember to click on Save…») is a plain
   `.alert-warning`: it wears the kit's global skin (D-18), no restyle here. */
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-message { margin: 0; padding: 18px 12px; text-align: center; }
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-message h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-message .text-primary { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ref-ink) !important; }
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-message .fa-2x { font-size: 22px; color: var(--area-ink, #064a71); }
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-message small { font-size: 13px; color: var(--ref-muted); }
.settings-page .dropzone:not(.bs-attach-drop):not(.bs-invup-drop):not(.ref-dropzone) .dz-remove { color: var(--area-ink, #064a71); }
/* The attachment file grid: give it the same quiet, rounded look as a settings grid.
   GridExcel renders a `table.table.table-bordered.table-hover…` (NOT `.items`), while the settings
   scaffold/hub grids set itemsCssClass="settings-grid-table" — so target any grid-view table that is
   NOT the scaffold table, and neutralise Bootstrap's `table-bordered` cell borders with !important. */
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) {
    width: 100%;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px;
    border-collapse: separate !important;
    border-spacing: 0;
    background: var(--ref-surface);
    overflow: hidden;
    margin-top: 12px;
}
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > thead > tr > th {
    background: var(--ref-surface-head);
    border: none !important;
    border-bottom: 1px solid #edf2f7 !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ref-muted);
    padding: 10px 14px;
}
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr > td {
    border: none !important;
    border-top: 1px solid #f2f5f8 !important;
    padding: 10px 14px;
    vertical-align: middle;
}
.settings-page .grid-view table:not(.settings-grid-table):not(.ref-grid-table) > tbody > tr:hover > td { background: var(--ref-row-hover); }
/* Legacy row-action + "Download all" buttons -> settings pill icon buttons. Scoped to a
   grid-view inside a settings page; the settings scaffold/hub buttons use .settings-row-*
   (not .btn-info/.btn-danger), so this only catches the attachment partial's buttons.
   A KIT button that carries `btn-xs` is not one of them (D-22): caught here, its hover and its keyboard focus ring
   were frozen by these !important (the triage of the Marin.AI questions, WCAG 2.4.7). It is the kit's small button
   (css/ref-kit.css). */
.settings-page .grid-view .btn-info,
.settings-page .grid-view .btn-danger,
.settings-page .grid-view .btn-xs:not(.ref-btn, .ref-btn-primary, .ref-btn-danger, .settings-btn, .settings-btn-primary, .settings-btn-danger, .boat-rent-btn, .boat-rent-btn-primary, .boat-rent-btn-danger) {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: var(--ref-surface) !important;
    color: #475569 !important;
    box-shadow: none !important;
    padding: 5px 10px !important;
}
.settings-page .grid-view a.btn-info:hover {
    border-color: var(--area-accent, #064a71) !important;
    color: var(--area-ink, #064a71) !important;
    background: var(--ref-row-hover) !important;
}
.settings-page .grid-view a.btn-danger:hover {
    border-color: #e74c3c !important;
    color: var(--ref-danger-strong) !important;
    background: var(--ref-danger-bg) !important;
}
/* ---- A GRID'S ACTION COLUMN STAYS VISIBLE, AND ITS FOUR ACTIONS STAY TELLABLE APART ----------------
   Two defects, both reported from a browser pass on the customer list (2026-09-23), and both belonging
   to every settings grid that ends in a button column rather than to that one page.

   1. THE COLUMN SCROLLS AWAY. `.table-responsive` gives a wide table its own horizontal scroll, so the
      actions are reachable -- 1887px of table in a 985px card on the customer list, 15 columns -- but
      only after scrolling sideways and then back. The column is pinned to the right edge instead.

      Anchored with :has() on the HEADER cell, because the body cells carry no class to anchor on: the
      view passes its own `htmlOptions` to CustomButtonColumn and that REPLACES the `button-column`
      class Yii would have written (the same trap already recorded for presence.php). So the rule reads
      "a table whose last header cell is a button column" and pins that column in body and head alike.
      Where the table already fits, `right: 0` is a no-op.

      The background must be OPAQUE or the scrolled columns show through, and it has to follow the row:
      white at rest, the hover tint on hover, the head's own grey in the header. The left shadow is
      what says the column is floating over the rest.

   2. ALL FOUR READ THE SAME. The skin below deliberately flattens `btn-success|info|warning|danger` to
      one neutral pill -- right for a lone "Add a note", wrong for a row of four where colour IS how
      View is told from Delete without reading a tooltip. Worse, the icons came out WHITE ON WHITE
      (measured rgb(255,255,255) on a #fff pill): the glyph still inherited from the contextual class
      the pill no longer paints. The frame stays neutral; the GLYPH takes the semantic ink. The values
      are ones this codebase already declares (the area-tokens inks plus this sheet's own danger), each
      at or above the 3:1 a graphical object needs on white. */
.settings-page .settings-grid table:has(thead tr > th.button-column:last-child) > thead > tr > th:last-child,
.settings-page .settings-grid table:has(thead tr > th.button-column:last-child) > tbody > tr > td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--ref-surface);
    box-shadow: -8px 0 8px -8px rgba(15, 23, 42, 0.16);
}
.settings-page .settings-grid table:has(thead tr > th.button-column:last-child) > thead > tr > th:last-child {
    background: var(--ref-surface-head);
}
.settings-page .settings-grid table:has(thead tr > th.button-column:last-child) > tbody > tr:hover > td:last-child {
    background: var(--ref-row-hover);
}

.settings-page .grid-view a.btn-success > i { color: var(--ref-ok) !important; }
.settings-page .grid-view a.btn-info    > i { color: var(--area-ink, #064a71) !important; }
.settings-page .grid-view a.btn-warning > i { color: var(--ref-warn) !important; }
.settings-page .grid-view a.btn-danger  > i { color: var(--ref-danger) !important; }   /* 5.00:1 */

/* A raw Bootstrap btn-info (barcode box "Change"/"Print" from a shared formatter) or the green/orange
   bulk btn-sm in a preserved grid footer (Variants Enable/Disable) rendered inside a settings page ->
   neutral settings pill, so it stops reading off-brand. Reference pages otherwise use .settings-btn*. */
.settings-page .btn-info,
.settings-page .grid-view .btn-success,
.settings-page .grid-view .btn-warning {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: var(--ref-surface) !important;
    color: #475569 !important;
    box-shadow: none !important;
}
/* A FULL-SIZE legacy .btn-info sitting next to a settings button (the barcode Print/Change link that
   MyFormatter emits) must match it on every axis, not just the frame: measured side by side it came out
   smaller (6px 12px) and lighter (400 / #475569), so two buttons of the same role read as two different
   controls. Excludes the small variants, which are row actions inside grids and must stay compact. */
.settings-page .btn-info:not(.btn-xs):not(.btn-sm) {
    padding: 8px 16px !important;
    font-weight: 500 !important;
    color: #2d3748 !important;
}
.settings-page .btn-info:hover,
.settings-page .grid-view .btn-success:hover,
.settings-page .grid-view .btn-warning:hover {
    border-color: var(--area-accent, #064a71) !important;
    color: var(--area-ink, #064a71) !important;
    background: var(--ref-row-hover) !important;
}

/* Row-action colours for the tables that are NOT a scaffold settings-grid (the pipeline hub's drag
   list, the equipment-recipe table): same per-action colour + hover as the grid buttons, so a row
   action looks identical wherever it lives. Was duplicated per page; one rule now covers them. */
.settings-page .btn.settings-row-action,
.settings-page .btn.settings-row-move,
.settings-page .btn.settings-row-add,
.settings-page .btn.settings-row-edit,
.settings-page .btn.settings-row-danger {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    /* 8px: the control step of the radius ramp (buttons/inputs). The value promoted from the pipeline
       page's inline rule was 7px, which is off the ramp. */
    border-radius: 8px;
    background: var(--ref-surface);
    box-shadow: none;
}
.settings-page .btn.settings-row-edit { color: #c2610f; }
.settings-page .btn.settings-row-edit:hover,
.settings-page .btn.settings-row-edit:focus { border-color: var(--ref-warn); color: var(--ref-warn); background: var(--ref-warn-bg); }
.settings-page .btn.settings-row-danger { color: var(--ref-danger-strong); }
.settings-page .btn.settings-row-danger:hover,
.settings-page .btn.settings-row-danger:focus { border-color: #e74c3c; color: var(--ref-danger-strong); background: var(--ref-danger-bg); }

/* Footer row of a compact "add a line" form: the boolean sits next to its submit. */
.settings-recipe-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}
/* A read-only value the operator may need to copy (an API endpoint, a token, a generated path):
   a quiet code block on the card's own ground, not the browser's default bordered grey <pre>. Lives
   here rather than inline in the view because an inline <style> on a large page breaks Codeception's
   text extraction (docs/reference-style.md §1.1). */
.settings-page pre.settings-code-line {
    margin: 0;
    padding: 10px 12px;
    background: var(--ref-surface-hover);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Inline checkbox + label as one target, vertically centred (no spacer label, no phantom line). */
.settings-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    /* The whole label is the click target (the input is nested inside it), so this is what has to reach
       the 24px WCAG 2.2 minimum — not the 18px box of the checkbox glyph, which stays as designed. */
    min-height: 24px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
}
.settings-check input[type="checkbox"] { margin: 0; }
/* The label of a box that cannot be ticked now (D-139): its words in the muted ink, the not-allowed cursor. At the
   weight of the label's own rule (`:where`), so a page that says something else of its locked boxes keeps it (the
   role page's pointer). */
.settings-check:where(:has(input[type="checkbox"]:disabled)) { color: var(--ref-muted); cursor: not-allowed; }
/* A row of checkboxes among the rows of fields (D-149, 2026-11-12): it keeps the rhythm a field row takes from its label's
   reserve — 20px above the box, where a field's label text starts ~23px under the control above. Without it the box sat
   against the select of the row above (the contract wizard's settings, «The signature is required to finish»). */
.settings-page .row + .row > [class*="col-"] > .settings-check:first-child { margin-top: 20px; }
/* A field that means nothing while another option is off is shown DISABLED, never hidden (D-135); its label goes to the
   muted ink with it, as a disabled switch's words do (2026-11-12, the contract wizard's «usual way of signing»): a native
   select, or Select2's box, right after its label — a hidden twin that keeps its value may stand between. */
.settings-page .control-label:is(:has(+ select:disabled), :has(+ input[type="hidden"] + select:disabled),
    :has(+ .select2-container-disabled), :has(+ input[type="hidden"] + .select2-container-disabled)) { color: var(--ref-muted); }

/* A radio (or checkbox) GROUP standing where a field would stand takes the field's height band, so its
   centre lines up with the selects and inputs beside it in the row. Without it the group's short line
   box floats above them — measured 17px on product/_search, the last real row-baseline miss inside the
   perimeter (2026-09-02). The old markup put a `<br>` after the label and let the inline labels fall
   where they may; the `<br>` goes, as it did everywhere else in the restyle, and the label→control gap
   comes from the standard. */
.settings-page .settings-radio-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    min-height: 42px;
}
/* A RAW radio of the group (one no script turned into a switch) is laid out the way `.settings-check` lays out
   a checkbox: one flex line, the input in the flow, 8px to its text. This rule used to zero Bootstrap's 20px
   of label padding and leave the rest of Bootstrap's geometry in place — `.radio-inline input { position:
   absolute; margin-left: -20px }` — so every radio hung 20px to the LEFT of its own label: the first one out
   of its column, each next one over the last 4px of the previous option (16px of gap, 20px of hang). That is
   why the classic forms kept a `<br>` after the label and no group. DIRECT children only: once
   initSegmentedSwitches() has run, the labels sit one level down, inside `.segmented-switch`, whose own
   geometry (a hidden radio, the pill drawn on the span) must not be laid out again. `relative`, not `static`: in the
   flow all the same, and the frame of the dot the kit's radio draws in its `::after` (D-152). */
.settings-page .settings-radio-group > .radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* The whole label is the target: the 24px of WCAG 2.2, as `.settings-check`. */
    min-height: 24px;
    margin: 0;
    padding: 0;
}
.settings-page .settings-radio-group > .radio-inline > input[type="radio"] {
    position: relative;
    margin: 0;
}

/* =============================================================================
 * Manual reorder page (SettingsSortController + _shared/_settings_reorder.php):
 * a jQuery-UI-sortable flat list, same visual language as the pipeline states list.
 * ========================================================================== */
.settings-reorder-list { list-style: none; margin: 0; padding: 0; border: 1px solid #edf2f7; border-radius: 12px; overflow: hidden; background: var(--ref-surface); }
.settings-reorder-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--ref-surface);
    border-bottom: 1px solid #f2f5f8;
    cursor: grab;
    transition: background-color .12s ease;
}
.settings-reorder-row:last-child { border-bottom: 0; }
.settings-reorder-row:hover { background-color: var(--ref-row-hover); }
.settings-reorder-row .sr-handle { flex: 0 0 auto; color: #cbd5e0; cursor: grab; }
.settings-reorder-row:active,
.settings-reorder-row .sr-handle:active { cursor: grabbing; }
.settings-reorder-row:hover .sr-handle { color: var(--area-ink, #064a71); }
.settings-reorder-row .sr-pos {
    flex: 0 0 auto; min-width: 26px; height: 22px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--ref-muted);
    background: #edf2f7; border-radius: 999px;
}
.settings-reorder-row .sr-name { flex: 1 1 auto; min-width: 0; color: var(--ref-ink); }
.settings-reorder-row.ui-sortable-helper { box-shadow: 0 4px 14px rgba(15,23,42,0.15); cursor: grabbing; border-radius: 8px; }
.settings-reorder-row.sr-placeholder { height: 42px; background: #f3f8ff; border: 1px dashed #9ec5e8; }

/* The "Ordina tabella" button sits next to "Columns" in the settings-list filter bar. */
.settings-filter-columns .settings-btn + .settings-btn { margin-left: 6px; }

/* A wrapping row of link-buttons inside a card (e.g. the product hub "Related views"). */
.settings-linklist { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================================
 * Detail-hub pattern — a reusable record page (Products now; Contracts / Boats
 * later). Shell = header + one IDENTITY BAND (classification chips + status +
 * primary "stat" tiles, prices emphasised) + section cards (full-width or 2-up)
 * + a collapsible secondary card. Rendered by the shared partial
 * _shared/_detail_hub_head.php. Light theme only; reuses the settings tokens.
 * ========================================================================== */

/* Identity band — zone 1: classification path + status chip, divided from tiles. */
.settings-hub-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f2f5f8;
}
/* Tile-less hub: the chips live in the header itself, so no separator and no card padding around them
   (a card holding one chip row read as a near-empty box — the price-list hub). */
.settings-page-header .settings-hub-identity--inline {
    padding-bottom: 0;
    margin: 10px 0 0;
    border-bottom: 0;
}
.settings-page-header .settings-hub-identity--inline .settings-hub-status { margin-left: 6px; }
/* .settings-hub-path / .settings-hub-sep: css/ref-kit.css (.ref-path, the identity's classification path). */
.settings-hub-status { margin-left: auto; }

/* The tiles (.settings-stat-row, .settings-stat*): css/ref-kit.css (.ref-tiles, D-9). */

/* ---- Proportional bar: ONE number per row, as a length, with no chart library ----
   Promoted out of userAudit/api.php on 2026-09-03, where it lived as inline styles that hardcoded the
   area accent (#064a71) and rounded at 3px, off the ramp. The fill takes `--settings-bar-fill` (a
   percentage) so the only thing a view writes is the number; the colour is the AREA token, so the same
   bar reads teal in Marina and navy in Settings without the view knowing. */
.settings-bar {
    height: 8px;
    background: #eef2f5;
    border-radius: 999px;
    overflow: hidden;
}
.settings-bar-fill {
    height: 8px;
    width: var(--settings-bar-fill, 0%);
    background: var(--area-accent, #064a71);
    border-radius: 999px;
}
/* Section grid — let compact cards pair 2-up; full width is the default (a plain .inner-panel
   sibling outside any grid). Row rhythm comes from each card's own 24px margin-bottom. */
.settings-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    align-items: start;
}
.settings-card-grid > .settings-card-full { grid-column: 1 / -1; }
@media (max-width: 991px) {
    .settings-card-grid { grid-template-columns: 1fr; }
}

/* Choice cards — a fork in the flow ("what is this for?"): each card IS the link, so the whole area is
   the target, with an icon, a title, one explaining line and a call to action pinned at the bottom. */
.settings-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 28px;
    margin-bottom: 24px;
    background: var(--ref-surface);
    border: 1px solid var(--ref-hairline);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #2d3748;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: calc(100% - 24px);
}
.settings-choice:hover,
.settings-choice:focus {
    border-color: var(--area-accent, #064a71);
    box-shadow: 0 8px 18px rgba(6, 74, 113, 0.08);
    text-decoration: none;
    color: #2d3748;
}
.settings-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ref-info-bg);
    color: var(--area-ink, #064a71);
    font-size: 22px;
}
.settings-choice-title { font-size: 18px; font-weight: 600; color: var(--ref-ink); }
.settings-choice-desc { font-size: 13px; line-height: 1.5; color: var(--ref-muted); }
.settings-choice-cta { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--area-ink, #064a71); }

/* The hub layout and its «Actions» card (.settings-hub-layout / -main / -rail, .settings-rail-actions): css/ref-kit.css
   (.ref-hub, .ref-actions, D-7). */

/* A linklist of DESTINATIONS rather than of actions: full width, stacked, each entry a title and a
   line about it. Same geometry as the rail's list — `.settings-hub-rail .settings-linklist` below —
   but available outside the rail, which is where a landing page needs it. */
.settings-linklist--stacked { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.settings-linklist--stacked .btn.settings-btn {
    display: flex;
    align-items: flex-start;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
}
.settings-linklist--stacked .btn.settings-btn i {
    flex: 0 0 16px;
    margin-right: 10px;
    margin-top: 3px;
    text-align: center;
}
.settings-linklist--stacked .btn.settings-btn > span { min-width: 0; }

/* Media slots of the hub "Media" card (product image, barcode).
   The point is that the card looks the same WHATEVER is inside it: nothing, a wide photo, a tall
   portrait one, or a gallery. So each slot is a fixed-height frame that centres its content and scales
   it down to fit — the card height never depends on the uploaded file's aspect ratio. */
.settings-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.settings-media-item {
    flex: 1 1 160px;
    min-width: 0;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.settings-media-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 132px;
    padding: 8px;
    background: var(--ref-surface-head);
    border: 1px solid var(--ref-hairline);
    border-radius: 12px;
    overflow: hidden;
}
/* Scale to fit inside the frame, whatever the intrinsic size, and drop Bootstrap's own thumbnail
   chrome so the frame is the only border. */
.settings-media-frame img,
.settings-media-frame .img-thumbnail {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
}
.settings-media-frame a { display: inline-flex; max-width: 100%; max-height: 100%; }
/* The frame's own action button spans the slot (it is the slot's footer). */
.settings-media-item > .btn { width: 100%; margin: 0; }

/* ============================================================================
 * Price editor (the product hub "Prices & taxation" card).
 * One BLOCK per price list, grouped under a "Selling" / "Purchase" heading, with
 * the fields laid out left-to-right in CALCULATION ORDER
 * (purchase → markup → sell → discounts → net → tax → gross).
 * It replaces a single 8-column table that served both kinds of price with a
 * blank header row and a repeated <label> inside every cell.
 * ========================================================================== */

/* "Add to price list" toolbar, divided from the price blocks below. */
.settings-price-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf2f7;
}
.settings-price-toolbar-select { flex: 1 1 320px; max-width: 480px; min-width: 0; }

/* A group = all the price lists of one kind (selling / purchase). */
.settings-price-group + .settings-price-group { margin-top: 22px; }
.settings-price-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ref-ink-2);
    margin: 0 0 10px;
}
.settings-price-group-title i { color: var(--ref-glyph); }
.settings-price-group-title .settings-price-group-count {
    font-weight: 500;
    color: var(--ref-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* One price list block. */
.settings-price-block {
    background: var(--ref-surface-head);
    border: 1px solid var(--ref-hairline);
    border-radius: 12px;
    padding: 14px 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.settings-price-block + .settings-price-block { margin-top: 10px; }
/* A price still at zero — the old full-row .bg-warning, said once and calmly. */
.settings-price-block.is-zero { border-color: #f0d9a8; background: #fffdf6; }
/* Recalculated by the REST call (replaces the Bootstrap .bg-info flash). */
.settings-price-block.is-recalculated { border-color: #b8d4e8; box-shadow: 0 0 0 3px rgba(6, 74, 113, 0.08); }

.settings-price-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.settings-price-name { font-weight: 600; color: var(--ref-ink); min-width: 0; }
.settings-price-name i { color: var(--ref-glyph); margin-right: 6px; }
.settings-price-link { color: var(--ref-muted); margin-left: 2px; } /* 2.47 -> 4.3:1 */
.settings-price-link:hover, .settings-price-link:focus { color: var(--area-ink, #064a71); }
.settings-price-head-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
/* Icon-only remove button for a price list row. */
.btn.settings-price-remove {
    background: var(--ref-surface);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--ref-muted);
    padding: 5px 9px;
    line-height: 1;
}
.btn.settings-price-remove:hover, .btn.settings-price-remove:focus {
    background: var(--ref-danger-bg);
    border-color: #e8b4b4;
    color: var(--ref-danger);
}

/* The field row — flex so the fields keep their natural relative widths and wrap tidily. */
.settings-price-fields { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.settings-price-field { flex: 1 1 116px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* The % discounts: narrower than a money field, but the input still has to fit "100.00" next to
   the addon — 94px clipped the value. */
.settings-price-field--narrow { flex: 0 1 118px; }
.settings-price-field--wide { flex: 1 1 170px; }    /* the tax Select2 */
.settings-price-field > label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ref-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.settings-price-field .form-control {
    height: 36px;
    border-radius: 8px;
    border-color: var(--ref-border-field); /* a control's boundary, ≥ 3:1 (D-31) */
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}
.settings-price-field .form-control:focus { border-color: var(--area-accent, #064a71); box-shadow: none; }
.settings-price-field .input-group { width: 100%; }
.settings-price-field .input-group-addon {
    background: var(--ref-surface-hover);
    border-color: var(--ref-border-field);
    border-radius: 0 8px 8px 0;
    color: var(--ref-muted);
    font-size: 13px;
}
/* Derived, non-editable value (Net). */
.settings-price-field .form-control[readonly] { background: var(--ref-surface-sunk); color: var(--ref-ink-2); }
/* Negative markup — was an inline #ff9999. */
.settings-price-field .form-control.is-negative { background: var(--ref-danger-bg); border-color: var(--ref-danger-field); color: var(--ref-danger); }
/* The one number that matters: the gross total (was beige + bold, like four other fields). */
.settings-price-field--key .form-control {
    background: var(--ref-surface);
    border-color: var(--ref-border-field); /* a control's boundary like its neighbours (D-31): the ink and the weight say «key» */
    color: var(--area-ink, #064a71);
    font-weight: 700;
}
.settings-price-field--key > label { color: var(--area-ink, #064a71); }

.settings-price-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

/* Collapsible secondary card — native <details>; the <summary> reuses .formSectionTitle so the
   band is pixel-identical to a normal card header (only the -20/-24 bleed margin is neutralised,
   since the summary is the card's top element, not a bar inside .panel-body). */
details.inner-panel > summary.formSectionTitle {
    cursor: pointer;
    user-select: none;
    list-style: none;
    margin: 0 !important;
    border-radius: 12px;
}
details.inner-panel > summary.formSectionTitle::-webkit-details-marker { display: none; }
details.inner-panel[open] > summary.formSectionTitle { border-radius: 12px 12px 0 0; }
/* The kit's chevron (css/ref-kit.css `details.ref-card`): 8 px in the muted ink, which a control's indicator needs (3:1). */
details.inner-panel > summary.formSectionTitle::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 12px;
    border-right: 2px solid var(--ref-muted);
    border-bottom: 2px solid var(--ref-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
details.inner-panel[open] > summary.formSectionTitle::after { transform: rotate(-135deg); }

/* Legacy toggled filter panels (a `.search-form > .well` rendered by an unconverted `_search*`
   partial, e.g. Towings & launches, product sub-reports): neutralise the Bootstrap grey inset and
   present it as a clean reference filters card so it stops reading as off-brand when opened. */
.settings-page .search-form .well {
    background: var(--ref-surface);
    border: 1px solid var(--ref-hairline);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px 24px;
    margin-bottom: 24px;
}
.settings-page .search-form .well .form-group:last-child { margin-bottom: 0; }
/* A RAW Bootstrap `.btn-primary` inside a settings page. Several section pages of the customer record
   carry one that no component owns — "Recalculate customer values", "View customer activities" — and
   Bootstrap's own #428bca measures 3.63:1 against its white label, under AA. Same treatment as
   .settings-btn-primary: the area ink, whose white label clears 4.5:1 in every area by construction,
   and a 12% black inset wash for hover. On app pages ink IS #064a71, so this only deepens the blue
   (3.63:1 -> 9.44:1).
   ON EVERY PAGE OF THE KIT (D-70): the same Epson panel's «Save the numbers» was the area's ink on the Epson page
   (inside the frame) and Bootstrap's blue on the point-of-sale receipt (a kit page with no frame); a dialog hung
   outside the frame had the blue too. The twins at the skin's weight; the dialogs' own buttons
   (`.bs-dialog-popup .swal2-confirm.btn-primary`, css/ref-kit.css) weigh more and keep theirs. */
.settings-page .btn.btn-primary,
:where(.ref-skin) .btn.btn-primary {
    background: var(--area-ink, #064a71);
    border: 1px solid var(--area-ink, #064a71);
    border-radius: var(--ref-radius-control);
    color: var(--ref-on-fill);
    font-weight: var(--ref-fw-button);
    text-shadow: none;
    background-image: none;
}
.settings-page .btn.btn-primary:hover,
.settings-page .btn.btn-primary:focus,
.settings-page .btn.btn-primary:active,
:where(.ref-skin) .btn.btn-primary:hover,
:where(.ref-skin) .btn.btn-primary:focus,
:where(.ref-skin) .btn.btn-primary:active {
    background: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    box-shadow: var(--ref-wash);
    color: var(--ref-on-fill);
}
/* Disabled (the tenant switch's «Go» until a marina is picked): no wash — nothing happens there (§4). */
.settings-page .btn.btn-primary[disabled]:hover,
.settings-page .btn.btn-primary[disabled]:focus,
.settings-page .btn.btn-primary[disabled]:active,
:where(.ref-skin) .btn.btn-primary[disabled]:hover,
:where(.ref-skin) .btn.btn-primary[disabled]:focus,
:where(.ref-skin) .btn.btn-primary[disabled]:active { box-shadow: none; }

.settings-page .search-form .well .btn.btn-primary {
    background: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    border-radius: 8px;
    font-weight: 500;
}
.settings-page .search-form .well .btn.btn-primary:hover { box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.12); }

/* Bulk-action bar under a list grid (e.g. Products master data): a label + settings buttons + a
   group Select2, sitting below the grid inside the card. */
.settings-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}
.settings-bulk-bar .settings-bulk-label { font-weight: 600; color: var(--ref-ink-2); margin-right: 4px; }
.settings-bulk-bar .btn.js-bulk-danger { color: var(--ref-danger); }
.settings-bulk-bar .btn.js-bulk-danger:hover { border-color: #c0392b; color: var(--ref-danger); background: var(--ref-danger-bg); }

/* Advanced-filters disclosure inside the filter bar (full-width row that wraps its own fields). A flex row of its own
   (D-123): the pages that keep it closed write `display:none` and their toggle sets `flex`, so only a row shown from
   the start — a second line of fields, the attribution's priorities — needed the rule to say it. */
.settings-filter-bar .settings-filter-advanced { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 12px 16px; }
.settings-filter-bar .js-toggle-advanced.active { border-color: var(--area-accent, #064a71); color: var(--area-ink, #064a71); }

/* Sibling-list sub-nav (`.settings-subnav`): the kit's pills, css/ref-kit.css (D-6). */

/* Inline drag reorder on a hub rules grid (settingsGridRowReorder): a grab-handle first cell. */
.settings-grid-table td.sr-drag-cell, .settings-grid-table th.sr-drag-cell { width: 1%; white-space: nowrap; text-align: center; }
.settings-grid-table .sr-drag { color: #cbd5e0; cursor: grab; padding: 0 4px; }
.settings-grid-table .sr-drag:active { cursor: grabbing; }
.settings-grid-table tbody tr:hover .sr-drag { color: var(--area-ink, #064a71); }
tr.sr-row-placeholder { height: 44px; background: #f3f8ff; outline: 1px dashed #9ec5e8; }

/* Row-click affordance (settingsGridEnhance marks the row + wraps cell text in .sr-text): the cell
   background/padding reads as clickable (pointer) and triggers the row's "go to detail" action, while
   the text itself keeps the caret (I-beam) and stays selectable/copyable WITHOUT triggering the click.
   Only rows with a leftmost non-destructive "go to detail" action are marked. */
tr.settings-row-clickable,
tr.settings-row-clickable > td { cursor: pointer; }
tr.settings-row-clickable .sr-text { cursor: text; }

/* ---- Wider sticky rail (a rail holding blocks, not just link buttons — price-grid creation) ---- */
.settings-hub-rail.settings-hub-rail-wide { flex: 0 0 320px; width: 320px; }
@media (max-width: 1199px) { /* D-7: under 1200 px the «Actions» card is a strip above the content */
    .settings-hub-rail.settings-hub-rail-wide { flex: 1 1 auto; width: auto; }
}

/* ---- Segmented pair of buttons switching what a card lists (the preset kind) ---- */
.settings-btn-group { display: flex; gap: 8px; margin-bottom: 12px; }
.settings-btn-group .btn.settings-btn { flex: 1 1 0; justify-content: center; text-align: center; }
/* Pressed / on state. Not only inside the group: a lone toggle (the matrix Heatmap button) signals ON by
   getting `active` from its JS, and before this rule it looked identical to the off state. */
.btn.settings-btn.active,
.settings-btn-group .btn.settings-btn.active {
    background: #eef4f8;
    border-color: var(--area-accent, #064a71);
    color: var(--area-ink, #064a71);
    font-weight: 600;
}

/* ---- Totals row of a settings table (a tfoot summing the rows above) ---- */
.settings-grid-table > tfoot > tr.settings-grid-total > th,
.settings-grid-table > tfoot > tr.settings-grid-total > td {
    background: var(--ref-surface-head);
    border-top: 2px solid #e6edf3;
    padding: 10px 14px;
    color: var(--ref-ink);
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

/* A settings table used as a key/value explanation (leftmost <th> per row is the label). */
.settings-grid-table > tbody > tr > th {
    background: var(--ref-surface-head);
    border-top: 1px solid #f2f5f8;
    padding: 10px 14px;
    color: var(--ref-ink-2);
    font-size: 13px;
    font-weight: 600;
    vertical-align: middle;
}

/* ---- Dense editable matrix (the price-grid seasonal calendar and the grid matrix) ----
   A settings table whose cells hold inputs instead of text: tighter rows, compact inputs, and a row
   header that stays put while the columns scroll. The per-cell BACKGROUNDS stay inline, written by the
   page's JS (yellow = a hand-typed amount, blue = a relative rate), so nothing here may set one. */
.settings-matrix {
    width: auto;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--ref-surface);
    margin-bottom: 0;
}
.settings-matrix > thead > tr > th {
    background: var(--ref-surface-head);
    border-bottom: 1px solid #edf2f7;
    border-top: none;
    color: var(--ref-ink-2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    white-space: nowrap;
}
.settings-matrix > tbody > tr > th {
    background: var(--ref-surface-head);
    border-top: 1px solid #f2f5f8;
    color: #2d3748;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    white-space: nowrap;
    /* The row label stays readable while the season columns scroll; it needs an opaque background. */
    position: sticky;
    left: 0;
    z-index: 1;
}
.settings-matrix > tbody > tr > td {
    border-top: 1px solid #f2f5f8;
    padding: 8px 10px;
    vertical-align: middle;
}
.settings-matrix > tbody > tr:hover > th,
.settings-matrix > tbody > tr:hover > td { background-color: var(--ref-row-odd); }
/* A cell that holds a TICK (D-141) — a matrix of pairs to allow (contract types x durations): `td.settings-matrix-tick`
   around the kit's checkbox. The label fills the cell, so the whole cell is the box's target, not its 18 px, and what
   the pair counts — a chip, a link when it opens them (D-140) — sits after the box, on its line. */
.settings-matrix > tbody > tr > td.settings-matrix-tick { padding: 0; }
.settings-matrix-tick > .settings-check {
    display: flex;
    min-height: 40px; /* the label's 24 px and the cell's padding, now its own: the row keeps the pitch it had */
    padding: 8px 10px;
}
/* The chip after the box, when it is a link: a target of its own inside the label's, so 24 px tall (its 21 px were
   under WCAG 2.5.8's floor, with no spacing to make up for it). */
.settings-matrix-tick a.ref-chip-status { min-height: 24px; }
/* Headers that are NAMES somebody wrote (D-141): `settings-matrix--wrap` lets them wrap, so the columns fit a narrower
   frame before the table scrolls — at 1024 px a matrix of names lost its last column to the scroller. The row header
   keeps a floor, so a long name wraps instead of squeezing the columns. */
.settings-matrix--wrap > thead > tr > th,
.settings-matrix--wrap > tbody > tr > th { white-space: normal; }
.settings-matrix--wrap > tbody > tr > th { min-width: 180px; }
/* Compact cell input — .form-control's own padding/height carry !important, so these must too. */
.settings-matrix input.form-control {
    height: 34px !important;
    padding: 5px 9px !important;
    font-size: 13px;
    border-radius: 6px !important;
    font-variant-numeric: tabular-nums;
}
/* A dropdown INSIDE a header cell (the per-column / per-band bulk-edit caret) must not inherit the
   header's uppercase + letter-spacing: its items are ordinary menu labels. */
.settings-matrix .dropdown-menu,
.settings-matrix .dropdown-menu > li > a {
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
    font-weight: 400;
    color: #2d3748;
}
.settings-matrix .dropdown-menu > li > a:hover { color: var(--area-ink, #064a71); background: var(--ref-surface-hover); }
.settings-matrix .pg-bulk-toggle { color: var(--ref-muted); } /* 2.75 -> 4.3:1 */
.settings-matrix .pg-bulk-toggle:hover { color: var(--area-ink, #064a71); }

/* The "= resolved value" hint under a cell, and the read-only margin cell. */
.settings-matrix .cal-eff { font-size: 11px; color: var(--ref-muted); text-align: right; min-height: 14px; }
.settings-matrix .cal-margin { text-align: right; font-size: 13px; }
/* The highlighted "rate on this date" column. */
.settings-matrix th.settings-matrix-preview,
.settings-matrix td.settings-matrix-preview { background: #eef4f8; }

/* ---- A card that carries a note (`.inner-panel.settings-note-warn|info`): css/ref-kit.css, D-10. ---- */
/* The row of a settings table that IS the record being viewed (an editions lineage marking "this one"). */
.settings-grid-table > tbody > tr.settings-row-current > td,
.settings-grid-table > tbody > tr.settings-row-current > th { background: #f2f7fb; font-weight: 600; }

/* ---- Diagnostic finding (a list of problems a check found, inside its card) ----
   Replaces alert-danger / alert-warning blocks where the page REPORTS findings rather than warns about
   the page itself: a soft bordered block, tinted by tone, with a title line and a list under it. */
.settings-finding {
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: var(--ref-surface);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.settings-finding:last-child { margin-bottom: 0; }
.settings-finding--danger { border-color: var(--ref-note-danger-edge); background: var(--ref-note-danger-bg); }
.settings-finding--warn { border-color: var(--ref-note-warn-edge); background: var(--ref-note-warn-bg); }
.settings-finding-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ref-ink);
}
.settings-finding--danger .settings-finding-title i { color: var(--ref-danger); }
.settings-finding--warn .settings-finding-title i { color: var(--ref-warn); }
.settings-finding p { margin: 4px 0 0; font-size: 13px; color: var(--ref-muted); }
.settings-finding ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ref-ink-2); }
.settings-finding ul > li { margin-bottom: 2px; }
/* A field label naming a code/token (the sample-boat / sample-input fields: length, engine.hp…).
   NOT scoped to .settings-page: the live-test modal is rendered outside it (a modal is appended where the
   widget runs, after the page wrapper closes). */
/* And it must WRAP. `engine.transmission` is 19 monospace characters, wider than the col-sm-3 it sits
   in inside a 600px modal: measured 2026-09-02 in #add-testcase-modal, 11px of the name hidden behind
   `form.modal-content`'s own overflow-x, so the label read "engine.transmissio". A field PATH cannot be
   truncated — it is the thing the user has to match against their grid — and the row's 40px
   bottom-aligned reserve (§7.0) already absorbs a second label line without moving the control. */
.control-label.settings-label-code {
    font-size: 13px;
    font-family: Menlo, Consolas, monospace;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ---- Option pills (a price grid's variant options; drag-reordered) ----
   The DOM contract is .option-sortable > .option-pill[data-id] with a .drag-handle — the sortable's items
   selector reads exactly that, so only the look lives here. */
.settings-page .option-sortable { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.settings-page .option-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ref-surface);
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    color: #2d3748;
}
.settings-page .option-pill .drag-handle { cursor: grab; color: #cbd5e0; }
.settings-page .option-pill .drag-handle:active { cursor: grabbing; }
.settings-page .option-pill:hover .drag-handle { color: var(--area-ink, #064a71); }
.settings-page .option-pill-label { font-weight: 600; }
.settings-page .option-pill-value { color: var(--ref-muted); font-size: 13px; }
.settings-page .option-pill-form { display: inline-flex; margin: 0; }
.settings-page a.option-pill-act,
.settings-page button.option-pill-act {
    background: none;
    border: 0;
    padding: 0 2px;
    color: var(--ref-glyph);
    line-height: 1;
}
.settings-page a.option-pill-act:hover,
.settings-page button.option-pill-act:hover { color: var(--area-ink, #064a71); }
.settings-page button.option-pill-act:hover { color: var(--ref-danger); }

/* ---- Inline disclosure inside a card (a wall of explanatory prose the page should not open on) ---- */
.settings-disclosure { margin: 0 0 14px; }
.settings-disclosure > summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--area-ink, #064a71);
    list-style: none;
    padding: 4px 0;
}
.settings-disclosure > summary::-webkit-details-marker { display: none; }
.settings-disclosure > summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--area-accent, #064a71);
    border-bottom: 2px solid var(--area-accent, #064a71);
    transform: rotate(45deg);
    margin-left: 2px;
    margin-top: -3px;
}
.settings-disclosure[open] > summary::after { transform: rotate(-135deg); margin-top: 2px; }
.settings-disclosure > summary i { color: var(--area-ink, #064a71); }

/* ---- In-page tab strip (`.nav-tabs.settings-tabs`): the faces of a page are PILLS, css/ref-kit.css (D-6). ---- */

/* ---- Expression helper (the chip palette under an expression field) ----
   DOM contract: #<id> > .expr-helper-toggle + .expr-helper-body, and .expr-chip[data-token] — the
   insert-at-caret JS reads those, so only the look lives here. */
.expr-helper { margin: 6px 0 12px; }
/* Its look is `.settings-disclosure` (below): the two openers of one field must not be two
   components. Only the DOM contract lives on this class now. */
.expr-helper-body { margin-top: 8px; }
.expr-helper-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 6px; }
.expr-helper-group { min-width: 84px; color: var(--ref-muted); font-size: 13px; }
.expr-helper .btn.expr-chip {
    background: var(--ref-surface);
    border: 1px solid #dbe3ea;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    font-family: Menlo, Consolas, monospace;
    color: #2d3748;
    line-height: 1.7;
}
.expr-helper .btn.expr-chip:hover { border-color: var(--area-ink, #064a71); color: var(--area-ink, #064a71); background: var(--ref-surface-hover); }
.expr-helper .btn.expr-chip--own { border-color: #cfe2ee; color: var(--area-ink, #064a71); }
.expr-helper .btn.expr-chip--fn { background: #f2f7fb; border-color: #cfe2ee; color: var(--area-accent-dark, #043552); font-weight: 600; }
/* An example expression is an <a class="expr-chip"> wrapping <code> — not a button; keep it a link. */
.expr-helper a.expr-chip code { background: var(--ref-surface-hover); border: 1px solid #edf2f7; }

/* ---- Embedded PrintButton widget (protected/components/views/printButton.php) ----
   The widget is shared by many legacy pages, so its markup must not change for ours: this is a SCOPED
   skin of what it renders — the trigger reads as a settings button and its Bootstrap dropdown gets the
   card radius, a soft border and quiet headers. */
.settings-page .btn-group > .btn.btn-info.dropdown-toggle {
    background: var(--ref-surface);
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    color: var(--ref-ink);
    font-weight: 500;
    padding: 8px 14px;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-page .btn-group > .btn.btn-info.dropdown-toggle:hover,
.settings-page .btn-group > .btn.btn-info.dropdown-toggle:focus,
.settings-page .btn-group.open > .btn.btn-info.dropdown-toggle {
    background: var(--ref-surface-hover);
    border-color: var(--area-accent, #064a71);
    color: var(--area-ink, #064a71);
}
.settings-page .btn-group > .btn.btn-info.dropdown-toggle i { color: var(--area-ink, #064a71); }
.settings-page .btn-group > .btn.btn-info.dropdown-toggle .caret { margin-left: auto; }
/* The widget wraps itself in a .row/.col — inside the rail that adds gutters the card already provides. */
.settings-hub-rail .row { margin-left: 0; margin-right: 0; }
.settings-hub-rail .row > [class*="col-"] { padding-left: 0; padding-right: 0; }
.settings-hub-rail .btn-group.btn-block { margin-bottom: 0; }
/* The dropdown itself (also used by any other Bootstrap dropdown a settings page embeds). */
.settings-page .dropdown-menu {
    border: 1px solid #e6edf3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.10);
    padding: 6px;
    min-width: 220px;
}
.settings-page .dropdown-menu > li > a {
    border-radius: 6px;
    padding: 7px 10px;
    color: #2d3748;
    font-size: 13px;
    white-space: normal;
}
/* …but the list of a kit button or pill group (D-126, D-112) keeps each action on ONE line, as the catalogue shows it: the
   list grows to its longest label instead of breaking it (the user, 2026-10-29, «Attribuisci le letture ai clienti»). */
.settings-page .ref-btn-group > .dropdown-menu > li > a,
.settings-page .ref-pill-menu > li > a { white-space: nowrap; }
.settings-page .dropdown-menu > li > a:hover,
.settings-page .dropdown-menu > li > a:focus { background: var(--ref-surface-hover); color: var(--area-ink, #064a71); }
.settings-page .dropdown-menu > li.dropdown-header {
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ref-muted);
}
/* =============================================================================
 * Article hierarchy tree (admin/productHierarchy/index) — the ONE page of the
 * Departments > Divisions > Categories > Groups chain. Row language of §8.1:
 * the figures read with the name, the actions are colour-cued icon buttons on
 * the right (.settings-row-*), every one of them with a tooltip.
 * ========================================================================== */
.ph-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 14px;
}
.ph-search-field { flex: 0 1 260px; margin: 0; }
.ph-depth-field { margin: 0; }
/* The shared segmented group stretches its buttons (flex: 1) — in the toolbar it sits inline, so the
   steps size to their label instead. */
.ph-depth.settings-btn-group { margin-bottom: 0; gap: 6px; }
.ph-depth.settings-btn-group .btn.settings-btn { flex: 0 0 auto; }
.ph-toolbar-actions { display: flex; gap: 6px; }
.ph-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; color: var(--ref-muted); font-size: 13px; }
.ph-summary-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ph-summary-item i { color: var(--ref-muted); }   /* 2.51:1 -> 4.76:1, see .ph-level-icon below */
.ph-summary-item strong { color: var(--ref-ink); font-size: 14px; }

.ph-hint {
    display: flex; align-items: flex-start; gap: 8px;
    background: var(--ref-row-hover); border: 1px solid #dbe9f7; border-radius: 8px;
    padding: 8px 12px; margin: 0 0 14px; font-size: 13px; color: #4a5c6b;
}
.ph-hint i { color: var(--area-ink, #064a71); margin-top: 2px; }

/* ---- lists & nesting ---- */
.ph-list { list-style: none; margin: 0; padding: 0; }
.ph-list .ph-list { margin-left: 22px; padding-left: 10px; border-left: 1px dashed #dbe3ea; }
.ph-node > .ph-list { display: none; }
.ph-node.is-open > .ph-list { display: block; }
.ph-node.ph-hidden { display: none; }

.ph-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 10px;
    margin: 3px 0;
    background: var(--ref-surface);
    border: 1px solid var(--ref-hairline);
    border-radius: 8px;
    transition: background-color .12s ease, border-color .12s ease;
}
.ph-row:hover { background: var(--ref-row-hover); border-color: #dbe9f7; }
/* Clicking anywhere on the row opens/closes it, so the row reads as clickable — only where there is
   something to open (a leaf keeps the default cursor). The handle and the actions keep their own. */
.ph-node.ph-has-children > .ph-row { cursor: pointer; }
.ph-node.ph-has-children > .ph-row .ph-actions,
.ph-node.ph-has-children > .ph-row .ph-name { cursor: default; }
.ph-node.ph-has-children > .ph-row .ph-handle { cursor: grab; }

.ph-caret {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; padding: 0;
    color: #8492a6; font-size: 11px;
    border-radius: 4px;
}
.ph-caret:hover { background: #eaf2f8; color: var(--area-ink, #064a71); }
.ph-caret i { transition: transform .12s ease; }
.ph-node.is-open > .ph-row > .ph-caret i { transform: rotate(90deg); }
.ph-caret-leaf { visibility: hidden; }

/* The handle is not decoration: dragging is the ONLY way to change sibling order (the Move dialog
   disables the current parent and appends), and the page hint tells the user to find it. At #cbd5e0
   it measured 1.49:1 — #8492a6 is 3.16:1, and the accent still takes over on hover. */
.ph-handle { flex: 0 0 auto; color: #8492a6; cursor: grab; }
.ph-handle:active { cursor: grabbing; }
.ph-row:hover .ph-handle { color: var(--area-ink, #064a71); }

/* The level glyph is the ONLY signal separating the three levels of the tree once the indent is
   ambiguous, so it is a graphical object and §1.0 asks 3:1 of it: #94a3b8 measured 2.51:1 on white
   (~102 instances on an expanded print-template list). #64748b is 4.76:1 and is the substitution
   this sheet already made twice for the same reason (.settings-stat-label i, and the handle above).
   The measured audit cannot see it: its contrast pass reads TEXT, and these are empty <i> elements. */
.ph-level-icon { flex: 0 0 auto; width: 16px; color: var(--ref-muted); font-size: 12px; text-align: center; }
.ph-name { color: var(--ref-ink); font-weight: 500; }
span.ph-name.settings-chip { font-weight: 600; }
/* Was a third shade for a meaning the sheet already carries twice: use the catalogued
   `.settings-chip-danger` on the element instead (§5, one colour per meaning). */

/* The figures describe the NAME, so they sit next to it — not in the actions column. */
.ph-counts { display: inline-flex; align-items: center; gap: 4px; }
.ph-count {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 7px;
    font-size: 11px; font-variant-numeric: tabular-nums;
    color: var(--ref-ink-2); background: #f1f5f9; border-radius: 999px;   /* 6.4:1 — #64748b was 4.1:1 */
}
.ph-count i { color: #a3b1bf; font-size: 10.5px; }

/* ---- row actions: right-aligned, colour-cued (same tones as a settings grid row) ---- */
.ph-actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 4px; }
/* An empty action slot: the level has no such action, but the columns still line up. */
.ph-act-slot { display: inline-block; width: 30px; height: 30px; }
/* Row-action tones: geometry comes from the shared rule above, only the colour is here — each one
   reusing a hue the sheet already carries, so a row action means the same thing everywhere.
   move = the warn amber of .settings-chip-warn · add = the green of .settings-row-view. */
.settings-page .btn.settings-row-move { color: var(--ref-warn); }
.settings-page .btn.settings-row-move:hover,
.settings-page .btn.settings-row-move:focus { border-color: #9a6410; color: var(--ref-warn); background: var(--ref-warn-bg); }
/* Icon-only row actions are GRAPHICAL objects: §1.0 asks 3:1 of them, and the audit now measures
   them (it used to skip any control with no text). Measured 2026-09-03 on productHierarchy:
   add #27ae60 = 2.87:1 (x16), edit #e67e22 = 2.85:1 (x33), a blocked delete #cbd5e0 = 1.49:1 (x26).
   Hue preserved: #1a7c47 is this sheet's own `settings-chip-on` ink (5.23:1). */
.settings-page .btn.settings-row-add { color: var(--ref-ok); }
.settings-page .btn.settings-row-add:hover,
.settings-page .btn.settings-row-add:focus { border-color: var(--ref-ok); color: var(--ref-ok); background: var(--ref-ok-bg); }
.settings-page .btn.settings-row-action { color: #5a6b7b; }
.settings-page .btn.settings-row-action:hover,
.settings-page .btn.settings-row-action:focus { border-color: #5a6b7b; color: #34495e; background: #eef2f6; }
/* "There is still something inside": off-looking but still clickable, so its tooltip works and the
   click can explain itself (a real `disabled` would silence both — bootlint W006). */
/* The blocked delete is deliberately NOT `disabled` (its tooltip is the explanation), so it is an
   ACTIVE control and WCAG's inactive-component exemption does not apply: #cbd5e0 measured
   1.49:1 as an icon-only glyph, fainter than the button's own border. #8492a6 is 3.16:1.
   The state is also carried by the GLYPH now (fa-lock in _tree.php), not by colour alone. */
.settings-page .btn.settings-row-danger.is-blocked,
.settings-page .btn.settings-row-danger.is-blocked:hover,
.settings-page .btn.settings-row-danger.is-blocked:focus {
    color: #8492a6; border-color: #edf2f7; background: var(--ref-surface); cursor: not-allowed;
}

/* ---- drag feedback: every valid destination, and the one under the pointer ---- */
.ph-placeholder {
    height: 34px; margin: 3px 0;
    background: #eaf2f8; border: 1px dashed var(--area-accent, #064a71); border-radius: 8px;
}
.ph-node.ui-sortable-helper > .ph-row { box-shadow: 0 4px 14px rgba(15,23,42,.15); border-color: var(--area-accent, #064a71); }
.ph-node.ui-sortable-helper > .ph-list { display: none; }
/* A candidate list, shown while dragging: dashed outline + a tinted ground. */
.ph-tree.ph-dragging .ph-zone {
    outline: 1px dashed #9ec5e8;
    outline-offset: 2px;
    background: rgba(234, 242, 248, .55);
    border-radius: 8px;
    min-height: 30px;
}
/* …and the one the row is about to land in. */
.ph-tree.ph-dragging .ph-zone.ph-zone-active {
    outline: 2px dashed var(--area-ink, #064a71);
    background: rgba(6, 74, 113, .09);
}
.ph-drop-hint {
    padding: 5px 10px; margin: 3px 0;
    color: #5a6b7b; font-size: 13px; font-style: italic;   /* 5.3:1 — #a0aec0 was 2.4:1 */
    border: 1px dashed #e2e8ef; border-radius: 8px;
}
.ph-tree.ph-dragging .ph-drop-hint { color: var(--area-ink, #064a71); border-color: #9ec5e8; }

/* ---- nodes whose parent is gone ---- */
.ph-orphans { margin-top: 18px; padding-top: 14px; border-top: 1px solid #edf2f7; }
.ph-orphans-title { font-size: 13px; font-weight: 600; color: var(--ref-warn); margin: 0 0 6px; }
.ph-orphans-title i { margin-right: 4px; }
.ph-orphans-hint { font-weight: 400; color: #5a6b7b; margin-left: 6px; font-size: 13px; }  /* 5.3:1 */

/* ---- the node form (slide-in panel and create modal share it) ---- */
.ph-form .form-group { margin-bottom: 14px; }
.ph-form-section {
    margin: 4px 0 10px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ref-muted);
}
.ph-form-section i { color: var(--ref-glyph); margin-right: 5px; }
.ph-form-errors { margin-bottom: 12px; }
/* The size belongs to the GLYPH: this box holds nothing but `<i class="fa-circle-notch fa-spin">`,
   so 20px is icon metrics, not a step off the type ramp (§1.1). */
.ph-form-loading { padding: 30px; text-align: center; color: #8492a6; } /* 2.26:1 -> 3.16:1 */
.ph-form-loading i { font-size: 20px; }
.ph-color-row { display: flex; align-items: center; gap: 10px; }
.ph-color-input {
    width: 52px; height: 38px; padding: 2px;
    border: 1px solid #dbe3ea; border-radius: 8px; background: var(--ref-surface); cursor: pointer;
}
.ph-color-preview { min-width: 78px; text-align: center; }
.ph-kinds .settings-check { margin-bottom: 6px; }

/* =============================================================================
 * Slide-in panel — a column entering from the right, on the same page (the
 * hierarchy editor). Reusable settings-area component; two page-local copies of
 * this pattern already exist (the dependency-graph offcanvas and the calendar
 * deadline drawer), so new settings pages should use THIS one.
 * ========================================================================== */
.settings-slidein-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .35);
    z-index: 1040;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.settings-slidein-overlay.is-open { opacity: 1; visibility: visible; }
.settings-slidein {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 94vw;
    background: var(--ref-surface);
    box-shadow: -6px 0 28px rgba(15, 23, 42, .18);
    z-index: 1041;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
}
.settings-slidein.is-open { transform: translateX(0); visibility: visible; }
.settings-slidein-header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px;
    background: var(--ref-surface-head);
    border-bottom: 1px solid var(--ref-divider);
}
.settings-slidein-header h3 {
    margin: 0; font-size: 16px; font-weight: 600; color: var(--ref-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.settings-slidein-header h3 i { color: var(--area-ink, #064a71); margin-right: 6px; }
/* Same close control as the settings modals: Bootstrap's .close, reset for the flex header (no float,
   no text-shadow) and given a real hit area. No tooltip — an X does not need a label, and a tooltip
   anchored here would be clipped by the window edge. */
.settings-slidein-header .close {
    float: none;
    margin: 0;
    padding: 0 4px;
    font-size: 24px;
    line-height: 1;
    color: var(--ref-muted);
    text-shadow: none;
    opacity: .65;
}
.settings-slidein-header .close:hover,
.settings-slidein-header .close:focus { color: var(--ref-ink); opacity: 1; }
.settings-slidein-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px; }
/* «Cancel», then the save, at the bottom right (D-109). */
.settings-slidein-footer {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid var(--ref-divider);
    background: var(--ref-surface);
}

/* =============================================================================
 * Settings modal skin — the generic twin of .settings-columns-modal, for the
 * page's own modals (create a node, move a node). NO overflow:hidden here: both
 * carry a Select2, whose dropdown must be able to escape the box.
 * ========================================================================== */
/* The skin of every modal is css/ref-kit.css (D-18); a settings modal adds only its flex footer. */
.settings-modal .modal-footer {
    display: flex; gap: 8px; justify-content: flex-end;
}
.settings-modal .modal-footer .btn + .btn { margin-left: 0; }
/* Bootstrap's clearfix ::before/::after are two more flex items here (D-77): with the 8 px gap they left 28 px after the
   last button instead of the footer's 20 (measured on the boat sale's dialogs, 2026-10-22). */
.settings-modal .modal-footer::before,
.settings-modal .modal-footer::after { display: none; }

/* ============================================================================================
   §  HELP TEXT THAT IS DOCUMENTATION RATHER THAN A HINT
   ============================================================================================

   The inline `code` chip that lived here, fenced to `body.bs-area-app .settings-page code`, is the kit's since D-57
   (css/ref-kit.css, «Inline code»): the same chip on every page of the kit, whatever its area. */

/* NO MEASURE (PO, 2026-10-08; D-11). Help text, a page's introduction and the hint under a field take the WHOLE width
   of their container, like the field above them: the 78ch cap of 2026-08 left them in a narrow column on the left
   of a wide card, and page after page reset it by hand. A run of paragraphs that documents a language goes in
   `.settings-help-doc` (below); nothing caps a line's length. Guard: HelpTextFullWidthGuardTest. */

/* ...and when the block IS documentation — a stack of paragraphs explaining a language, not a hint
   under one field — it drops the italic. Italic is right for one secondary line and wrong for three
   paragraphs; the class marks the difference, so the area convention stays where it belongs. */
.settings-page .settings-help-doc .help-block { font-style: normal; margin-bottom: 8px; }
.settings-page .settings-help-doc .help-block:last-child { margin-bottom: 0; }

/* ---- The strip UNDER a field: its documentation disclosure, and its actions -------------------
   Where a field's own affordances live. The expression fields used to put their "Try live" /
   "Write with AI" buttons in the markup BEFORE the label, floated right — which is how they landed
   on the label line, and the cost of that order was invisible and real: §7.0 spaces a full-width
   row through `> .control-label:first-child`, so with a button in front of it the label was no
   longer the first child and the rule silently stopped matching. "Value expression" sat 11px under
   the Match mode select while every other row of the card had ~45px of air. One floated element,
   seven fields, no error anywhere. (Rule to keep: if a spacing rule of this area names
   `:first-child`, nothing may be placed in front of the element it names.)

   The PO's call, 2026-09-04: the actions do not belong up there at all. So the label line is bare
   and one strip under the control carries everything — the disclosure on the left, the actions
   pushed right by `margin-left: auto` so the strip is laid out the same with or without one. */
.settings-field-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 0;
}
.settings-field-foot-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* The disclosure itself: the borderless, link-like idiom `.expr-helper-toggle` already established
   in this area for exactly this job ("Available fields & functions"), so a second one would have
   been a second look for one meaning. The caret turns instead of being swapped for another glyph. */
.settings-page .btn.settings-disclosure {
    background: none;
    border: 0;
    padding: 4px 0;
    color: var(--area-ink, #064a71);
    font-size: 13px;
    font-weight: 600;
    /* It shares the strip with two 32px buttons, so it takes their line height — borderless, but not
       5px shorter than the things beside it. `.expr-helper-toggle`, which stands on a line of its
       own, keeps its natural 27px. */
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}
.settings-page .btn.settings-disclosure i {
    color: var(--area-ink, #064a71);
    margin-right: 6px;
    transition: transform .15s ease;
}
.settings-page .btn.settings-disclosure[aria-expanded="true"] i { transform: rotate(90deg); }
.settings-page .btn.settings-disclosure:hover,
.settings-page .btn.settings-disclosure:hover i { color: var(--area-ink, #064a71); filter: brightness(0.85); }
/* A REAL focus ring — but only for the keyboard. `.settings-btn:focus` can afford `outline: none`
   because it swaps its border colour instead; a borderless control has no border to swap, so
   dropping the outline outright would leave a keyboard user with no indicator at all (WCAG 2.4.7).
   It has to be `:focus-visible` and not `:focus`, though: with `:focus` the ring stays painted after
   a MOUSE click, and a 2px box around a borderless link makes it read as a bordered button — the
   very look this component exists to avoid. Caught by looking at the screenshot, not by any probe:
   every measured check was green with the ring on. */
.settings-page .btn.settings-disclosure:focus { outline: none; }
.settings-page .btn.settings-disclosure:focus-visible {
    outline: 2px solid rgba(6, 74, 113, .45);
    outline-offset: 2px;
    border-radius: 4px;
}
/* Explicit, so no later `display` rule on the wrapper can defeat the attribute. */
.settings-help-doc[hidden] { display: none; }

/* ==========================================================================================
   Customer master-data hub — see docs/customer-anagrafica/README.md
   ==========================================================================================
   The hub carries `bs-area-master` and there is NOT ONE accent override for it below. That is the
   point: this stylesheet used to have the app blue #064a71 written into it as a literal, so a page
   built out of it ignored its own area, and the first attempt at a green anagrafica was a growing list
   of per-page corrections — three of them written before it became obvious that the list was the
   defect. The literals are now var(--area-ink, …) / var(--area-accent, …), so the page follows its area
   with no rule of its own, and the `--hub-identity` custom property that used to sit here — a hand-set
   #1e8449 for the title glyph alone, from when the mechanics were still blue — is gone:
   `.settings-page-header h1 i` reads var(--area-ink), which under master IS #1e8449.

   What remains here is the two things that are about the HUB and not about its colour: a rail long
   enough to need different scroll behaviour, and a badge tone. */

/* How many documents of a section want attention (not fully invoiced, unpaid): the number on the danger fill (PO,
   2026-10-29, D-119 — it was a «!» on the amber pair). It sits in the SAME slot as .settings-nav-count, so a rail row
   always has exactly one badge column and the labels stay aligned. White on #c0392b: 5.44:1, on the active row too. */
.settings-side-nav > li > a .settings-nav-count-warn,
.settings-side-nav > li.active > a .settings-nav-count-warn {
    color: var(--ref-on-fill);
    background: var(--ref-danger);
}

/* The works dashboard's own rules, moved out of the inline <style> in yardActivityDashboard.php and
   scoped to its tab content (`.tab-content.customer-yard-dashboard`, since 2026-10-07: the strip is the design
   system's `settings-tabs` now, and its own tab and date-label rules went with the redesign). Left: the caret
   that rotates when a panel collapses, the strip that wraps (the statuses are the marina's own, any number of
   them) and the order card's heading on the body's line. A large inline <style> also breaks Codeception's see(),
   which normalises with strip_tags() (CLAUDE.md). */
.customer-hub .customer-yard-tabs {
        flex-wrap: wrap;
}
.customer-hub .customer-yard-tabs > li.is-empty:not(.active) > a { opacity: .65; }
.customer-hub .customer-yard-tabs .yard-status-dot {
        display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px;
        box-shadow: 0 0 0 1px rgba(15, 23, 42, .25);
}
.customer-yard-dashboard .inner-panel > .panel-heading[data-toggle="collapse"] {
        padding: 16px 24px;
}
.customer-yard-dashboard .yard-order-title {
        margin: 0;
        font-size: 16px;
}
.customer-yard-dashboard .panel-heading[data-toggle="collapse"].collapsed .fa-caret-down,
.customer-yard-dashboard .list-group-item .row[data-toggle="collapse"].collapsed .fa-caret-down {
        transform: rotate(-90deg);
}
.customer-yard-dashboard .panel-heading[data-toggle="collapse"] .fa-caret-down,
.customer-yard-dashboard .list-group-item .row[data-toggle="collapse"] .fa-caret-down {
        transition: transform 0.3s;
}

/* THE PRESSED STATE OF A TOGGLE, IN THIS AREA, IS FILLED.
   The shared rule above paints a pressed `.settings-btn` as `--area-ink` on the pale `#eef4f8` tint. That
   pair was chosen for the app blue, where it measures 8,3:1; the master green is 4,25:1 on the same tint —
   measured on admin/customer/admin with the Advanced search panel OPEN, which is the only state that shows
   it, and under the 4,5:1 AA asks of text.

   Filled instead of merely darker, because it is also what the rest of this page already does: the active
   rail row and the active sub-nav pill are both ink with a white label, and white on ink clears 4,5:1 in
   every area by the token's own definition.

   SCOPED to `.customer-hub` on purpose. The shared rule has about ten other consumers (product, systemTemplate,
   warehouseStock, productHierarchy, the shared settings list), all of them area `app`, where the tint pair is
   fine — whether the pressed state should be filled EVERYWHERE is a design-system decision, not a fix to make
   inside a review. */
.customer-hub .btn.settings-btn.active,
.customer-hub .settings-filter-bar .js-toggle-advanced.active {
    background: var(--area-ink, #064a71);
    border-color: var(--area-ink, #064a71);
    color: var(--ref-on-fill);
}
/* Its icon and the count of the filters it holds (2026-10-07) on the ink fill: `.btn.settings-btn i` paints the
   icon in ink, which on an ink ground is no icon at all. */
.customer-hub .btn.settings-btn.active i,
.customer-hub .settings-filter-bar .js-toggle-advanced.active i {
    color: inherit;
}
.customer-hub .settings-filter-bar .js-toggle-advanced .badge {
    margin-left: 6px;
    background: var(--ref-surface);
    color: var(--area-ink, #064a71);
}
/* A «from — to» date pair of the hub's filter bar (customer/_shared/_hub_filter_bar.php, `daterange`). */
.customer-hub .hub-filter-range {
    display: flex;
    gap: 8px;
}
.customer-hub .hub-filter-range > input {
    flex: 1 1 0;
    min-width: 0;
}

/* The Pending overview's two row markers (pending.php's rowCssClassExpression / cssClassExpression: load-bearing
   class names). `.settings-grid-table` separates its borders, where a row's own border is never painted, and
   Bootstrap's `tr.info` tint needs `.table`: painted on the cells. */
/* …at the weight of the design system's rules, not the heaviest lines on the page (aesthetic review, 2026-10-07):
   the group row is already bold, so a hairline and a quiet tint are enough to read it as a heading. */
.customer-hub .settings-grid-table > tbody > tr.borderBottom5px > td { border-bottom: 1px solid #e2e8f0; }
/* A line of the group sits indented under the group's description instead of behind a rule down its left edge (D-10;
   the class keeps its name): 14px is the cell's own padding, the other 16px the step of the indent. */
.customer-hub .settings-grid-table > tbody > tr > td.borderLeft5px { padding-left: 30px; }
.customer-hub .settings-grid-table > tbody > tr.info > td { background: var(--ref-surface-hover); }

/* Group headings inside the rail; `.settings-rail-group + .settings-rail-group` supplies the gap. */
.config-sidebar .settings-rail-group-title {
    margin-top: 0;
}

/* The Actions card of the customer hub. It borrows the detail-hub rail's vertical, full-width,
   label-wrapping buttons through the `.settings-rail-actions` alias further up, but it is a PLAIN
   card: deliberately without the rail's `overflow-y: auto`, because the Create invoice / receipt /
   proforma dropdowns open inside it and an overflow box clips a Bootstrap dropdown; and deliberately
   not sticky, because the navigation card above it in the same column already is. */
.settings-rail-actions .btn-group,
.settings-rail-actions .btn-group > .btn.settings-btn {
    width: 100%;
}
/* The dropdowns stand in the group's `.settings-linklist`, whose gap spaces them (2026-10-13: a margin between
   dropdowns left the last one glued to the Register button). A sentence in the list takes no margin of its own. */
.settings-rail-actions .settings-linklist > .help-block { margin: 0; }
.settings-rail-actions .dropdown-menu {
    width: 100%;
    min-width: 0;
}

/* Two buttons on the hub arrive from partials shared with other modules — `/hint/_grid`'s "Add note"
   and the Tags editor's Save, which is swapped in by HTMX — so they carry Bootstrap's own colours and
   are the only AA failures left on a converted section: white on #5cb85c is 2.48:1 and white on
   #428bca is 3.63:1. They are corrected HERE, scoped to the hub, rather than in the partials, because
   those partials also render on Resource and Vector pages that this restyle has not reached and that
   must keep rendering exactly as they do (the scope fence). When those pages are restyled the rules
   move down into the partials and these two go away.
   Which colour each one gets is §4.1, not taste: adding a line — a note, an identification document —
   is NOT the action that commits the user's work, so every .btn-success in here is neutral; the Tags
   editor's Save IS a save, so it takes the save green (#157347, white on it 5.87:1). The id selector
   below wins over this one whatever the order. */
.customer-hub .btn.btn-success {
    background: var(--ref-surface);
    border-color: var(--ref-border);
    color: var(--ref-ink);
}
/* The hover follows the AREA, like .btn.settings-btn:hover above. Written with the app blue as a raw
   literal it painted a blue edge on a green page -- the one claim the header of this section makes
   about itself. The fallback is the same blue, so a page outside an area is unchanged. */
.customer-hub .btn.btn-success:hover,
.customer-hub .btn.btn-success:focus {
    background: var(--ref-surface-hover);
    border-color: var(--area-accent, #064a71);
    color: var(--area-ink, #064a71);
}
.customer-hub #Tags-save.btn {
    background: #157347;
    border-color: #157347;
    color: var(--ref-on-fill);
}
.customer-hub #Tags-save.btn:hover,
.customer-hub #Tags-save.btn:focus {
    background: #115c39;
    border-color: #115c39;
    color: var(--ref-on-fill);
}

/* Two more things the hub inherits from partials shared with other modules, both on the master-data
   section: the identification grid's sortable headers and the audit-trail block.

   The sortable header is the case css/settings-pages.css already solved at `.settings-grid-table >
   thead > tr > th a` — 16px tall, under the 24px WCAG 2.2 (2.5.8) target, and Bootstrap's #428bca at
   3.51:1 on the header ground. That fix is scoped to `.settings-grid-table` and this grid is a partial
   shared with the presences section, so it does not carry that class; the same treatment is applied
   here scoped to the hub instead of changing the partial for every page that renders it. Enlarge the
   TARGET, not the type. */
.customer-hub table:not(.settings-grid-table):not(.ref-grid-table) thead > tr > th a {
    color: var(--area-ink, #064a71);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    min-width: 24px;
}

/* An inline "-- Not set --" marker. Bootstrap's .text-muted is #777777, which measures 4.48:1 on white
   and 4.29:1 on the modal's #fafafa ground — under AA on both counts once it is inside a card. #64748b
   is this area's own secondary ink (4.76:1 on white), which is what the rest of the page uses for a
   hint. */
.customer-hub .settings-summary-value .text-muted,
.customer-hub .settings-summary-value small {
    color: var(--ref-muted);
}

/* ---- The sections drawn with the hub kit (aesthetic review of 2026-10-07) ----
   The content column is half a page wide, so every grid is wider than its card and scrolls under its pinned
   actions (§8.1). With automatic table layout a grid that overflows lays its cells out at their narrowest, so every
   date, name and amount broke at every space ('Mar / 7, / 2024') and rows grew 2-4 times taller than the line they
   show. Cells stay on one line; a prose column opts into wrapping. */
.customer-hub .settings-grid-table > tbody > tr > td,
.customer-hub .settings-grid-table > tfoot > tr > td {
    white-space: nowrap;
}
.customer-hub .settings-grid-table > tbody > tr > td.hub-cell-wrap {
    white-space: normal;
    min-width: 240px;
    max-width: 28em;
}
/* The documents' money tones (green in, red out), which the table's own cell colour outranked: every amount came
   out grey, and a credit note looked like an invoice. The two inks are the chips' (both above 4.5:1). */
.customer-hub .settings-grid-table > tbody > tr > td.text-success,
.customer-hub .settings-grid-table > tfoot > tr > td.text-success { color: var(--ref-ok); }
.customer-hub .settings-grid-table > tbody > tr > td.text-danger,
.customer-hub .settings-grid-table > tfoot > tr > td.text-danger { color: var(--ref-danger); font-size: 14px; margin-top: 0; }
/* Row actions start on one edge (a closed presence has more of them than an open one), and the destructive ones stand
   apart from the rest. */
.customer-hub .settings-grid-table td.button-column { text-align: left; }
.customer-hub .settings-grid-table .button-column a:not(.settings-row-danger) + a.settings-row-danger { margin-left: 12px; }
/* The pager row: the pager and anything beside it centred on one line; the summary beside the exports. */
.customer-hub .settings-grid .grid-view > .row:has(> .div-pager) {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px;
}
.customer-hub .settings-grid .grid-view > .row:has(> .div-pager) > .div-pager { float: none; width: auto; padding: 0; }
.customer-hub .settings-grid .grid-view > .row:has(> .div-pager) > .div-pager.text-right { margin-left: auto; }
.customer-hub .settings-grid .col-md-12:has(> .summary) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.customer-hub .settings-grid .col-md-12 > .summary { float: none; margin: 0; }
.customer-hub .settings-grid .col-md-12 > .summary.pull-left { order: -1; margin-right: auto; }
/* A count inside a segmented switch (Plugs consumptions: All / To charge / Already charged) as the rail's count. */
.customer-hub .settings-btn-group .btn .badge { margin-left: 4px; top: 0; padding: 2px 8px; border-radius: 999px; background: #edf2f7; color: var(--ref-ink-2); font-size: 11px; font-weight: 600; }
.customer-hub .settings-btn-group .btn.active .badge { background: var(--ref-surface); color: var(--area-ink, #064a71); }
/* Paired cards end on one line, and stat tiles sit 2 by 2 (four) or at a tile's width (one), not 3 + 1 or a banner. */
.customer-hub .settings-card-grid { align-items: stretch; }
.customer-hub .settings-card-grid > .inner-panel,
.customer-hub .settings-card-grid > .ref-card { display: flex; flex-direction: column; }
.customer-hub .settings-card-grid > .inner-panel > .panel-body,
.customer-hub .settings-card-grid > .ref-card > .ref-card-body { flex: 1 1 auto; }
.customer-hub .config-tab-content .settings-stat-row:has(> .settings-stat:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-hub .config-tab-content .settings-stat-row:has(> .settings-stat:only-child) { grid-template-columns: minmax(0, 320px); }
/* A summary row: the label never collapses to one letter, and a long value (an address) wraps under its own width. */
.customer-hub .settings-summary--rows .settings-summary-label { min-width: 7em; }
.customer-hub .settings-summary--rows .settings-summary-value { max-width: 70%; white-space: normal; overflow-wrap: anywhere; }
/* The Actions card: every button full width, left-aligned on the icon column, carets centred at the right edge. */
.settings-rail-actions .btn-group > .btn.settings-btn.dropdown-toggle,
.settings-rail-actions .settings-linklist .btn.settings-btn-danger {
    display: flex; align-items: flex-start; justify-content: flex-start; width: 100%; text-align: left; white-space: normal; line-height: 1.35;
}
.settings-rail-actions .btn-group > .btn.settings-btn.dropdown-toggle i,
.settings-rail-actions .settings-linklist .btn.settings-btn-danger i { flex: 0 0 16px; margin-right: 8px; margin-top: 2px; text-align: center; }
.settings-rail-actions .btn > .caret { margin-left: auto; align-self: center; flex: 0 0 auto; }
/* Never glued to its label (a long label, or the dropdown at its own width on a narrow screen). */
.settings-rail-actions .dropdown-toggle > span:not(.caret) { margin-right: 8px; }
.settings-rail-actions .settings-linklist form { width: 100%; margin: 0; }
.settings-rail-actions .settings-linklist form > .btn { width: 100%; }
.settings-rail-actions .print-button-row { margin: 0; }
.settings-rail-actions .print-button-row > [class*="col-"] { padding: 0; }
.settings-rail-actions .print-button-row .btn-group.btn-block { margin: 0; }
/* The credits' balance tile, apart from the grid under it. */
.customer-hub .hub-credit-balance { margin-bottom: 16px; }
/* The statement's printed report under its figures, inside the statement card (2026-10-08). */
.customer-hub .settings-stat-row + .print-button-row { margin-top: 14px; }
/* Money lines up on its decimals; the amount a list is ranked by (receivables) stands out. */
.customer-hub .settings-grid-table td.text-right { font-variant-numeric: tabular-nums; }
.customer-hub .settings-grid-table td.hub-key-amount { font-weight: 700; color: var(--ref-ink-title); }
/* Room for a row's print menu while it is open (deposits), so the table's scroller does not clip it. */
.customer-hub .settings-grid .table-responsive.is-menu-open { min-height: 250px; }
/* The change history's own top rule (//auditTrail/list) is the card's header line already. */
.customer-hub .hub-section-card .ref-card-body > hr:first-child { display: none; }
/* Register takings and payments: one soft block per unpaid document, one checkbox line per instalment. */
.customer-hub .hub-pay-doc { padding: 12px 16px; margin-bottom: 8px; }
.customer-hub .hub-pay-summary { position: sticky; top: 16px; }
.customer-hub .hub-pay-doc .settings-finding-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.customer-hub .hub-pay-doc-chips { margin-left: auto; }
.customer-hub .hub-pay-doc .settings-finding-title a { color: var(--area-ink, #064a71); }
/* ---- The Dashboard's money cards in the app's colour code (2026-10-13; CustomerDashboard::moneyTone()) ----
   Red «Billing unpaid», green «Billing paid» — as the invoice statuses and the contracts' payment status — and only
   while the figure is above zero. The tints and borders are the findings' (settings-finding--danger) and a green twin;
   the inks are the chips' (#c0392b, #1a7c47: both above 4.5:1 — the app's #008f51 is 4.16:1, so not used as text). A
   tint and a full border (D-10: no stripe); `.inner-panel`'s own shadow is repeated so the card does not lift on hover. */
.customer-hub .inner-panel.hub-money-card--danger,
.customer-hub .inner-panel.hub-money-card--danger:hover,
.customer-hub .ref-card.hub-money-card--danger,
.customer-hub .ref-card.hub-money-card--danger:hover {
    background: var(--ref-note-danger-bg) !important;
    border-color: var(--ref-note-danger-edge) !important;
    box-shadow: var(--ref-shadow-card) !important;
}
.customer-hub .inner-panel.hub-money-card--success,
.customer-hub .inner-panel.hub-money-card--success:hover,
.customer-hub .ref-card.hub-money-card--success,
.customer-hub .ref-card.hub-money-card--success:hover {
    background: var(--ref-note-ok-bg) !important;
    border-color: var(--ref-note-ok-edge) !important;
    box-shadow: var(--ref-shadow-card) !important;
}
.customer-hub .hub-money-card--danger .formSectionTitle,
.customer-hub .hub-money-card--success .formSectionTitle,
.customer-hub .hub-money-card--danger .ref-card-header,
.customer-hub .hub-money-card--success .ref-card-header { background: transparent; }
.customer-hub .hub-money-card--danger .formSectionTitle { border-bottom-color: var(--ref-note-danger-edge) !important; }
.customer-hub .hub-money-card--success .formSectionTitle { border-bottom-color: var(--ref-note-ok-edge) !important; }
.customer-hub .hub-money-card--danger .ref-card-header { border-bottom-color: var(--ref-note-danger-edge); }
.customer-hub .hub-money-card--success .ref-card-header { border-bottom-color: var(--ref-note-ok-edge); }
.customer-hub .hub-money-card--danger .formSectionTitle > span:first-child > i,
.customer-hub .hub-money-card--danger .ref-card-header h3 > i,
.customer-hub .hub-money-card--danger .settings-stat-value,
.customer-hub .hub-money-card--danger .ref-tile-value { color: var(--ref-danger); }
.customer-hub .hub-money-card--success .formSectionTitle > span:first-child > i,
.customer-hub .hub-money-card--success .ref-card-header h3 > i,
.customer-hub .hub-money-card--success .settings-stat-value,
.customer-hub .hub-money-card--success .ref-tile-value { color: var(--ref-ok); }

/* ---- «Register takings and payments» in a dialog (2026-10-13; views/customer/_hub_pay_modal.php) ----
   The dialog: wide (the page is two columns, the documents and the transaction), as tall as the screen allows, the
   frame edge to edge in its body. */
.customer-hub-pay-modal .modal-dialog { width: auto; max-width: 1180px; margin: 24px 16px; }
@media (min-width: 768px) {
    .customer-hub-pay-modal .modal-dialog { width: calc(100vw - 48px); margin: 24px auto; }
}
.customer-hub-pay-modal .modal-title small { margin-left: 8px; color: var(--ref-muted); font-size: 14px; }
.customer-hub-pay-modal .modal-body { padding: 0; }
.customer-hub-pay-frame { display: block; width: 100%; height: calc(100vh - 130px); min-height: 420px; border: 0; border-radius: 0 0 12px 12px; }
/* The page inside the frame (`layout=modal`, column1-modal): its titled panel away — the dialog carries the title —,
   the page ground kept, the page's padding smaller. */
body:has(.hub-pay-page--modal) { background-color: var(--ref-ground) !important; }
body:has(.hub-pay-page--modal) #page > .row > .col-lg-12 > .panel { margin: 0; border: 0; box-shadow: none; background: transparent; }
body:has(.hub-pay-page--modal) #page > .row > .col-lg-12 > .panel > .panel-heading { display: none; }
body:has(.hub-pay-page--modal) #page > .row > .col-lg-12 > .panel > .panel-body { padding: 0; }
.settings-page.customer-hub.hub-pay-page--modal { max-width: none; padding: 16px 8px 96px; }
.customer-hub .hub-pay-line { margin: 6px 0 0; }
.customer-hub .hub-pay-line label { display: flex; align-items: center; gap: 8px; padding-left: 0; font-weight: 400; }
/* `relative`, never `static`: the skin draws the tick as an absolute `::after` OF THE BOX, so a static box hands it to
   the nearest positioned ancestor — Bootstrap's `div.checkbox` — and the tick appeared ~6px above the ticked box
   (2026-10-13). `!important` beats the skin's `margin-top: -2px !important`; `flex: none` keeps a two-line label from
   squeezing the box. Guard: CheckboxSkinPositionGuardTest. */
.customer-hub .hub-pay-line label input[type="checkbox"] { position: relative; margin: 0 !important; flex: none; }

/* ---- The customer lists' filter (customer/_list_filter.php: admin, inactive, debtors), 2026-10-08 ----
   On the bar's own flex wrap the eight fields left «Category» alone on a second line, and the advanced block
   laid its fields out at whatever width each took — two date ranges squeezed to 45%, the tags widget's two
   Bootstrap columns inside one narrow cell, a radio pair stretching its line (PO: «se apro ricerca avanzata è
   tutto storto»). One four-column grid for both: two even lines of fields, the «Advanced search» switch under them with
   «Reset» / «Search» on its line, and the advanced block on the same columns, between them when open (D-128). */
.customer-hub .settings-filter-bar.customer-list-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}
.customer-hub .customer-list-filter > .settings-filter-field { min-width: 0; }
.customer-hub .customer-list-filter > .js-toggle-advanced { grid-column: 1; justify-self: start; } /* with the fields it unfolds (D-128) */
/* After the advanced panel, at the card's right (D-109): from the second column to the last, so closed they share the
   switch's line, open they move under the panel. */
.customer-hub .customer-list-filter > .settings-filter-actions { grid-column: 2 / -1; }
.customer-hub .customer-list-filter > .settings-filter-columns { grid-column: 4; justify-content: flex-end; margin-left: 0; }
.customer-hub .customer-list-filter > .settings-filter-advanced {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    /* Controls on one line when a label wraps (Italian «Aliquota IVA personalizzata per i contratti»): the cells
       align at their foot, as the main grid's do — so no cell carries a hint under its control. */
    align-items: end;
}
.customer-hub .customer-list-filter .settings-filter-advanced > .settings-filter-field { min-width: 0; }
.customer-hub .customer-list-filter .customer-list-range { display: flex; gap: 8px; }
/* The filters the address holds and the bar has no field for (Marin.AI search): one line of chips under the buttons. */
.customer-hub .customer-list-filter > .customer-list-held { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.customer-hub .customer-list-filter > .customer-list-held .settings-chip a { color: inherit; margin-left: 4px; text-decoration: none; }
/* The multis' «All» and the birthday range's From/To read as the singles' «All» does (#64748b, 4.76:1), not as a
   disabled #999 (2.85:1) beside them: Select2 marks the multi's empty search input `select2-default`. */
.customer-hub .customer-list-filter .select2-search-field input.select2-default,
.customer-hub .customer-list-filter .form-control::placeholder { color: var(--ref-muted) !important; opacity: 1; }
.customer-hub .customer-list-filter .customer-list-range > .form-control,
.customer-hub .customer-list-filter .customer-list-range > input:not([type="hidden"]) { flex: 1 1 0; min-width: 0; }
/* The tags widget draws a Bootstrap row of two `col-md-6`: here they are the grid's two columns, with the filter
   bar's label look and the any/all choice on one line. */
.customer-hub .customer-list-filter .customer-list-tags { grid-column: span 2; }
/* The widget makes its row `display: flex !important` from 992px: two equal flex columns, each field as wide as its
   column (Select2 had sized them at 300px, so they wrapped one under the other at 1280). */
.customer-hub .customer-list-filter .customer-list-tags .tags-filter-row { display: flex; flex-wrap: nowrap; gap: 16px; margin: 0; }
.customer-hub .customer-list-filter .customer-list-tags .tags-filter-col { flex: 1 1 0; min-width: 0; width: auto; float: none; padding: 0; }
.customer-hub .customer-list-filter .customer-list-tags .select2-container { width: 100% !important; }
.customer-hub .customer-list-filter .customer-list-tags .tags-filter-col > label {
    margin: 0 0 9px;
    font-weight: 600;
    color: var(--ref-ink-2);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.customer-hub .customer-list-filter .customer-list-tags .tags-filter-options { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.customer-hub .customer-list-filter .customer-list-tags .tags-filter-options .radio { margin: 0; }
/* A multi-select of a fixed list (e-mail exclusions, VAT rates) wears the single selects' chevron, so it reads as a
   list to pick from and not as a text box; the tag fields, where anything can be typed, keep none. */
.customer-hub .customer-list-filter .settings-filter-advanced > .settings-filter-field:not(.customer-list-tags) .select2-container-multi .select2-choices {
    position: relative;
    padding-right: 36px;
}
.customer-hub .customer-list-filter .settings-filter-advanced > .settings-filter-field:not(.customer-list-tags) .select2-container-multi .select2-choices::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    pointer-events: none;
}
/* The main grid keeps its four columns down to 992px (at 1024 a cell is ~204px: every label fits in English, one wraps
   in Italian, the three buttons fit in three columns and Columns in the fourth): at two columns the bar was 427px
   tall at 1024 and pushed the first customer below the fold (aesthetic review, 2026-10-09). The advanced block goes to
   two columns first: its range and tag fields need the width. */
@media (max-width: 1199px) {
    .customer-hub .customer-list-filter > .settings-filter-advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .customer-hub .settings-filter-bar.customer-list-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-hub .customer-list-filter > .settings-filter-actions { grid-column: 1 / -1; }
    .customer-hub .customer-list-filter > .settings-filter-columns { grid-column: 1 / -1; }
}

/* ---- The customer record's docked menu (2026-10-13) ----
   PO: «la card di sinistra deve diventare un navigation menù fisso, collassabile a sinistra perdendo le etichette e
   lasciando le icone, e collassabile nelle varie categorie… a tutta altezza, e il contenuto della pagina deve stare
   alla sua destra» — full height UNDER BlueShell's top bar, which is never touched nor covered. The frame
   (views/customer/_hub_shell.php) is [dock | body]: the dock from the bar to the footer, on the screen's edge; in it
   the menu sticks to the top of the screen once the bar has scrolled away, and scrolls by itself when taller than the
   screen. The body: the head, then the content with Actions and Tags on its right.
   Per width (js/customer-hub.js): from 1200px the menu is expanded or folded to its icons, as the operator left it;
   from 768 to 1199px it is icons, and its button opens it over the page for a moment; below 768px it is a block on
   top, its sections opened by the button. Everything is scoped to `.customer-hub--docked`: the lists, the forms,
   `sepa` and `registerPayment` wear `.customer-hub` too and keep their layout. Replaces the 1:3:1 grid of 2026-10-08. */
.settings-page.customer-hub.customer-hub--docked {
    max-width: none;
    /* #page's gutters: the dock takes the screen's left edge. */
    margin-left: -15px;
    margin-right: -15px;
    padding: 0;
}
/* Right under the bar: the bar's own margin-bottom (Bootstrap's .navbar, read here, never changed) is taken back. The
   flashes never stand above the frame: the page prints them in its body, right of the menu (_hub_shell.php, D-118). */
#page > .settings-page.customer-hub--docked { margin-top: -20px; }
/* Nothing of the layout's loading panel above it: it pushed the page down until the scripts ran (as the wizard). */
body:has(.customer-hub--docked) #mainloading { display: none !important; }
.customer-hub-frame {
    display: grid;
    grid-template-columns: var(--hub-dock-width, 248px) minmax(0, 1fr);
    align-items: stretch;
    /* A short section still has the dock down to the footer (the top bar and the footer, about 200px). */
    min-height: calc(100vh - 200px);
}
.customer-hub-dock {
    position: relative;
    z-index: 4;
    min-width: 0;
    background: var(--ref-surface);
    border-right: 1px solid var(--ref-border);
}
/* No scroll of its own (D-118): it moves with the page. A menu that fits the screen sticks to its top; a longer one
   scrolls with the page until its last entry is in sight, then stays there — `--hub-rail-h` is its height, written by
   js/customer-hub.js (it changes with the folds and the search), so `top` is 0 or how much of it is below the screen. */
.customer-hub--docked .customer-hub-rail {
    position: sticky;
    top: min(0px, calc(100vh - var(--hub-rail-h, 0px)));
    padding: 16px 12px 24px;
    background: var(--ref-surface);
}
.customer-hub-body {
    min-width: 0;
    max-width: var(--ref-page-max-wide);
    padding: 32px 40px 0;
}
.customer-hub--docked .customer-hub-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(240px, 18vw, 320px);
    gap: 24px;
    align-items: start;
}
.customer-hub--docked .customer-hub-col-main { padding-left: 0; }

/* The rows: compact, so a long record's menu stays within the screen as long as it can. */
.customer-hub--docked .settings-side-nav > li { margin-bottom: 2px; }
.customer-hub--docked .settings-side-nav > li > a { position: relative; padding: 8px 12px !important; gap: 10px; }
.customer-hub--docked .settings-side-nav > li > a:hover { transform: none; }
.customer-hub--docked .settings-side-nav > li > a > .hub-nav-label { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.customer-hub--docked .settings-side-nav > li > a .settings-nav-count { flex: 0 0 auto; }
.customer-hub--docked .customer-hub-rail .settings-rail-group + .settings-rail-group { margin-top: 14px; }
.customer-hub--docked .customer-hub-rail .settings-rail-group-title { margin: 0 0 6px; }

/* The menu's tools (D-118): the search of its sections — the kit's `.ref-search`, 40px — and the fold beside it, an icon
   alone as tall as the search. The search shows only while the labels do (the icons-only rules below hide it). */
.customer-hub--docked .hub-nav-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.customer-hub--docked .hub-nav-search { flex: 1 1 auto; min-width: 0; }
/* The two folds: the whole menu (its button), and each group (its title). */
.customer-hub--docked .hub-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    background: var(--ref-surface-hover);
    border: 1px solid #edf2f7;
    border-radius: 8px;
    color: var(--ref-ink-2);
    cursor: pointer;
}
/* The search: an entry that does not match, a group left with none, and every folded group open while it is filled. */
.customer-hub--docked .customer-hub-rail .is-filtered-out { display: none !important; }
.customer-hub--docked .customer-hub-rail.is-filtering .settings-rail-group > .settings-side-nav { display: block !important; }
.customer-hub--docked .customer-hub-rail.is-filtering .hub-nav-chevron { visibility: hidden; }
.customer-hub--docked .hub-nav-empty { margin: 0; padding: 4px 12px; color: var(--ref-muted); font-size: var(--ref-fs-small); }
.customer-hub--docked .hub-nav-toggle:hover { background: #eef2f6; color: var(--ref-ink); }
.customer-hub--docked .hub-nav-toggle i { width: 1.5em; text-align: center; transition: transform 0.15s ease; }
.customer-hub--docked .hub-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}
.customer-hub--docked .hub-nav-group-toggle:hover { color: var(--ref-ink); }
.customer-hub--docked .hub-nav-chevron { font-size: 11px; color: var(--ref-glyph); transition: transform 0.15s ease; }
.customer-hub--docked :is(.hub-nav-toggle, .hub-nav-group-toggle):focus-visible { outline: 2px solid var(--area-ink, #064a71); outline-offset: 2px; }
/* The fold moves only after a click: a page that opens folded is drawn folded, not animated into it. */
html.bs-hubnav-animate .customer-hub-frame { transition: grid-template-columns 0.18s ease; }
@media (prefers-reduced-motion: reduce) {
    html.bs-hubnav-animate .customer-hub-frame { transition: none; }
}

/* ICONS ONLY — the same look under two conditions: folded by the operator from 1200px (remembered), and always from
   768 to 1199px unless opened for a moment (`.is-peek`). The labels stay for a screen reader (visually hidden, not
   removed), the group titles become a line, a count — the red attention number too (D-119) — a small pill on its icon. */
@media (min-width: 1200px) {
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-frame { grid-template-columns: var(--hub-dock-icons, 64px) minmax(0, 1fr); }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail { padding-left: 8px; padding-right: 8px; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .hub-nav-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-rail-group-title { display: none; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-rail-group + .settings-rail-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ref-hairline); }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-rail-group > .settings-side-nav { display: block !important; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-side-nav > li > a,
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .hub-nav-toggle { justify-content: center; padding: 10px 0 !important; gap: 0; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .hub-nav-toggle i { transform: rotate(180deg); }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .hub-nav-tools { justify-content: center; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .hub-nav-search { display: none; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-side-nav > li > a .settings-nav-count { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #ffffff; }
    html[data-bs-hubnav="collapsed"] .customer-hub--docked .customer-hub-rail .settings-side-nav > li > a .settings-nav-count[data-count="0"] { display: none; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .customer-hub--docked .customer-hub-frame { grid-template-columns: var(--hub-dock-icons, 64px) minmax(0, 1fr); }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) { padding-left: 8px; padding-right: 8px; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .hub-nav-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-rail-group-title { display: none; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-rail-group + .settings-rail-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ref-hairline); }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-rail-group > .settings-side-nav { display: block !important; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-side-nav > li > a,
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .hub-nav-toggle { justify-content: center; padding: 10px 0 !important; gap: 0; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .hub-nav-toggle i { transform: rotate(180deg); }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .hub-nav-tools { justify-content: center; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .hub-nav-search { display: none; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-side-nav > li > a .settings-nav-count { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #ffffff; }
    .customer-hub--docked .customer-hub-rail:not(.is-peek) .settings-side-nav > li > a .settings-nav-count[data-count="0"] { display: none; }
    /* Opened for a moment: over the page, its labels back; Escape, a click elsewhere or a section closes it. */
    .customer-hub--docked .customer-hub-rail.is-peek { width: 264px; box-shadow: 8px 0 24px rgba(15, 23, 42, 0.12); }
    .customer-hub-body { padding: 28px 24px 0; }
}
/* 992-1199 px: the docked hub keeps its side column, so the «Actions» card stays a COLUMN of full-width buttons that
   wrap — the kit's under-1200 strip (css/ref-kit.css: buttons in a row, nowrap) is for a card ABOVE the content, and
   here it pushed «Register takings and payments» out of the card and the window (review, 2026-10-19). */
@media (min-width: 992px) and (max-width: 1199px) {
    .customer-hub--docked .customer-hub-aside .settings-rail-actions .settings-linklist { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
    .customer-hub--docked .customer-hub-aside .settings-rail-actions .settings-linklist .btn.settings-btn { align-items: flex-start; justify-content: flex-start; width: 100%; white-space: normal; }
    .customer-hub--docked .customer-hub-aside .settings-rail-actions .settings-linklist .btn.settings-btn i { flex: 0 0 16px; margin-top: 2px; margin-right: 8px; }
    .customer-hub--docked .customer-hub-aside .settings-rail-actions .settings-linklist > .btn-group,
    .customer-hub--docked .customer-hub-aside .settings-rail-actions .settings-linklist > .btn-group > .btn.settings-btn { width: 100%; }
}
@media (max-width: 991px) {
    /* The content column's own 120px of clearance would stand between it and the Actions now below it. */
    .customer-hub--docked .customer-hub-col-main { padding-bottom: 0; }
    .customer-hub--docked .customer-hub-aside { padding-bottom: 40px; }
}
@media (min-width: 768px) and (max-width: 991px) {
    /* The aside under the content, Actions and Tags side by side. */
    .customer-hub--docked .customer-hub-grid { grid-template-columns: minmax(0, 1fr); }
    .customer-hub--docked .customer-hub-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
}
@media (max-width: 767px) {
    .customer-hub-frame { display: block; min-height: 0; }
    .customer-hub-dock { border-right: 0; border-bottom: 1px solid var(--ref-border); }
    .customer-hub--docked .customer-hub-rail { position: static; }
    .customer-hub--docked .customer-hub-rail:not(.is-open) .hub-nav-groups,
    .customer-hub--docked .customer-hub-rail:not(.is-open) .hub-nav-search { display: none; }
    .customer-hub--docked .hub-nav-tools { margin-bottom: 0; }
    .customer-hub--docked .customer-hub-rail.is-open .hub-nav-tools { margin-bottom: 14px; }
    .customer-hub--docked .customer-hub-rail .hub-nav-toggle i { transform: rotate(-90deg); }
    .customer-hub-body { padding: 20px 16px 0; }
    .customer-hub--docked .customer-hub-grid { grid-template-columns: minmax(0, 1fr); }
}
/* The record's identity on the title's line (_detail_hub_head `identityInTitle`): the band of figures went, the
   chips and the status stay beside the name. */
.settings-page-title-row > .settings-hub-identity--inline { margin: 0; }

/* ---- The customer Dashboard (views/customer/_detail_cards.php, 2026-10-08) ----
   The activity tiles are links to the section each one counts: a tile that is a link says so on hover. The attention
   blocks are the design system's findings with their way out on the title's line; a card title that leads to its
   section carries a quiet arrow. */
/* (0,5,0), later in the sheet: over the hub's «four tiles sit 2 by 2» rule, whose :has() weighs (0,5,0) too — that
   rule was for the half-page column. */
.customer-hub .config-tab-content .settings-stat-row.hub-activity:has(> .hub-activity-tile),
.customer-hub .config-tab-content .ref-tiles.hub-activity:has(> .hub-activity-tile) { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 1199px) {
    .customer-hub .config-tab-content .settings-stat-row.hub-activity:has(> .hub-activity-tile),
    .customer-hub .config-tab-content .ref-tiles.hub-activity:has(> .hub-activity-tile) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The split of the «not invoiced and unpaid» total, in that tile's last row (RefUi::tiles `footHtml`). */
.customer-hub .hub-debt-split { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--ref-hairline); }
.customer-hub a.hub-activity-tile { color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.customer-hub a.hub-activity-tile:hover,
.customer-hub a.hub-activity-tile:focus { border-color: var(--area-accent, #064a71); box-shadow: 0 0 0 3px var(--area-accent-ring, rgba(6, 74, 113, .15)); text-decoration: none; }
/* The keyboard focus is an ink outline: the accent border alone measures 2.87:1, under the 3:1 a focus needs. */
.customer-hub a.hub-activity-tile:focus-visible { outline: 2px solid var(--area-ink, #064a71); outline-offset: 2px; }
.customer-hub .hub-attention .settings-finding-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.customer-hub .hub-attention .hub-attention-link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--area-ink, #064a71); }
/* A block with two ways out (the inactive customer: its fiscal code, its master data): the second sits beside the first. */
.customer-hub .hub-attention .hub-attention-link + .hub-attention-link { margin-left: 16px; }
/* A card title that leads to its section: css/ref-kit.css (.ref-card-title-link, RefUi::cardBegin() `titleUrl`). */
/* A card whose figure is not named as its section: the way there, at the header's right, names the section
   (reference-style §2.5b: a link's label is the title of the page it opens). */
.customer-hub .ref-card-header a.hub-card-go,
.customer-hub .formSectionTitle a.hub-card-go { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; font-size: 13px; font-weight: 600; color: var(--area-ink, #064a71); text-decoration: none; }
/* The tenant-coloured type and category chips in the hub's grids: the catalogue's `tenant-colour-data-badge` geometry
   (11px / 600 / 4px radius), not MyFormatter's inline 100% — forty saturated 14px blocks outshouted the names.
   One line: a wrapping chip («NON RESIDENTE») grew every row by 9px. */
.customer-hub .settings-grid-table td .label {
    display: inline-block;
    font-size: 11px !important;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .01em;
    padding: 3px 8px;
    border-radius: 4px;
    text-shadow: none;
    white-space: nowrap;
}
/* A hub grid's totals row reads as one (aesthetic review, 2026-10-09): it was a 20px unpadded line of bold #000
   against the table's edge — at the default scroll an empty band. Only a footer that carries deferred totals: the
   documents grids' footer holds the merge and XML buttons. */
.customer-hub .settings-grid-table > tfoot:has(.bs-grid-footer) > tr > td {
    background: var(--ref-surface-head);
    border-top: 2px solid #e6edf3;
    padding: 10px 14px;
    color: var(--ref-ink);
    font-weight: 700;
}
.customer-hub .formSectionTitle a.hub-card-go:hover,
.customer-hub .formSectionTitle a.hub-card-go:focus,
.customer-hub .ref-card-header a.hub-card-go:hover,
.customer-hub .ref-card-header a.hub-card-go:focus { text-decoration: underline; }
.customer-hub .hub-dashboard-ai { margin-bottom: 20px; }

