/* App-level overrides on top of Tabler*/

/* Brand font (own/css/font.css) — same stack the Metronic build was compiled with. */
:root, [data-bs-theme=light], [data-bs-theme=dark] {
    --tblr-font-sans-serif: CeraPro-Medium, CeraPro-Light, CeraPro-Bold, Helvetica, sans-serif;
}

[data-bs-navbar-theme="dark"] header.navbar { --tblr-navbar-bg: var(--app-header-bg); }

/* Global search palette */
.gsearch-results { max-height: 60vh; overflow-y: auto; }
@media (max-width: 575.98px) { .gsearch-results { max-height: none; } }   /* full screen there: the dialog's body scrolls */
.gsearch-results mark { background: #fff3c4; padding: 0 1px; border-radius: 2px; }
.gsearch-tab-count:empty { display: none; }
#global_search_tabs .nav-link { white-space: nowrap; }

/* Tabler gives every .ts-dropdown z-index 1070 so body-appended ones (dropdownParent: 'body') clear modals;
   one that stays inside its wrapper (in-page) goes back to the normal dropdown layer, under the sticky headers. */
.ts-wrapper > .ts-dropdown { z-index: var(--tblr-dropdown-zindex, 1000) !important; }
/* A disabled Tom Select greys like a disabled input or select (--tblr-bg-forms-disabled): Tabler's vendor CSS gives it
   --tblr-secondary-bg, a darker grey (2026-11-17, Bogdan: a Boards list filter under ∅ beside Number's). */
.ts-wrapper.disabled .ts-control { background-color: var(--tblr-bg-forms-disabled); color: var(--tblr-secondary); }
/* A long single-select value ellipsizes instead of running under the clear × and the caret. */
.ts-wrapper.single .ts-control > .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The clear × (Tom Select's clear_button) is in place before it shows - opacity 0 until the pointer is over the
   select - at the right end, by the arrow. A finger is never over it: the first tap there cleared the value and the
   second opened the list (2026-11-15). Where nothing hovers it takes a tap once the select has the focus and it shows. */
@media (hover: none) {
    .plugin-clear_button .clear-button { pointer-events: none; }
    .plugin-clear_button.focus.has-items .clear-button { pointer-events: auto; }
}
/* core/pick.js, touch screens: a plain <select> opens the app's menu, never the phone's picker - so it takes no tap
   itself, the tap reaches what holds it. The menu is a dropdown-menu on <body>, rows a thumb's height. */
.app-pick-on select:not([multiple]):not([size]):not(.tomselected) { pointer-events: none; }
.app-pick .dropdown-item { min-height: 44px; white-space: normal; }

/* DataTables without a header row (dashboard notifications) */
.dt-headless thead { display: none; }

/* Page width: header, content and footer (container-xl) and the wide modals (modal-xl: record modal, global search,
   policies) share one width: full width on phones and tablets, and from 1200px everything but a 1rem margin each side,
   the same on every screen (2026-11-06; fixed 1140 / 1640px boxes had left up to 130px empty each side, and 4K 80px).
   A modal is as wide as the page's content (the container minus its padding). The quotation builder's modal-xxl
   stays wider (below). */
:root { --app-page-width: 100%; }
@media (min-width: 1200px) { :root { --app-page-width: calc(100% - 2rem); } }
.container-xl { max-width: var(--app-page-width); }
.modal-xl { --tblr-modal-width: calc(var(--app-page-width) - 2 * var(--tblr-page-padding)); }
/* A <form> around a scrollable modal's body and footer (user edit/new): Bootstrap scrolls only a .modal-body that is a
   direct child of .modal-content, so the form passes the dialog's height down - without it the body was cut off. */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* Entity detail iframe modal */
.modal-detail .modal-content { height: calc(90vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: hidden; }   /* the insets: App shell, below */
.modal-detail .modal-iframe { width: 100%; height: 100%; border: 0; }

/* A PDF preview drawn by pdf.js on phones and tablets (file_preview.js): the pages scroll in their own box, as the
   <embed> did, on the modal's grey; on a phone the modal is full screen and the box fills it. */
.pdf-pages { height: 80vh; overflow-y: auto; padding: .5rem; background: var(--tblr-bg-surface-secondary); }
@media (max-width: 575.98px) { .pdf-pages { height: 100%; } }
.pdf-page { margin: 0 auto .5rem; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.pdf-page canvas { display: block; width: 100%; height: auto; }

/* Lists (crm_list.js): nowrap cells capped in width, actions never clipped */
.crm-list-table th, .crm-list-table td { white-space: nowrap; }
.crm-list-table td:not([colspan]):not(.crm-actions-cell) { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
/* Column resize (crm_list.js): a grip on each header's right edge. Pinned widths switch the table to
   fixed layout, so the 420px cap no longer applies and header titles truncate like the cells. */
.crm-list-table thead th { position: relative; }
.col-resizer { position: absolute; top: 0; right: 0; bottom: 0; width: 7px; cursor: col-resize; touch-action: none; }
.col-resizer:hover, .col-resizer:active { box-shadow: inset -2px 0 0 var(--tblr-primary); }
.crm-list-table.col-fixed { table-layout: fixed; }
.crm-list-table.col-fixed > tbody > tr > td:not([colspan]) { max-width: none; }
.crm-list-table.col-fixed > thead .dt-column-title, table.dt-resizable.col-fixed > thead .dt-column-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The same for a table that does not save its widths (core/table.js resizable(): a record's related tabs, the quotation
   cart). The grip is no element: a strip on the right edge of every header but the last. */
@media (min-width: 768px) {
    table.dt-resizable > thead > tr > th:not(:last-child) { position: relative; }
    table.dt-resizable > thead > tr > th:not(:last-child)::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 7px; cursor: col-resize; }
    table.dt-resizable > thead > tr > th:not(:last-child):hover::after { box-shadow: inset -2px 0 0 var(--tblr-primary); }
}
table.dt-resizable.col-fixed { table-layout: fixed; }
table.dt-resizable.col-fixed > :is(thead, tbody) > tr > :not([colspan]) { max-width: none; overflow: hidden; text-overflow: ellipsis; }
.crm-list-table .crm-child-expand { width: 1px; }   /* as narrow as the chevron; inline widths win when resized */
td.crm-child-expand { cursor: pointer; }
.crm-list-table .crm-row-select-cell { width: 1px; cursor: pointer; }   /* the tick box of a list with bulkActions (crm_list.js): the cell ticks it too */
@media (pointer: coarse) { .crm-row-select, .crm-select-all { width: 1.375rem; height: 1.375rem; } }
.merge-table td, .merge-table thead th { min-width: 12rem; vertical-align: top; }   /* the Merge wizard (crm_merge.js) */
/* On a phone the Actions float above the bottom bar, where the thumb ticks the rows, and the wizard is a column:
   each field's label, then its values one under another, each with its record. */
@media (max-width: 767.98px) {
    #bulk_actions:not([hidden]) { position: fixed; z-index: 1030; left: 50%; transform: translateX(-50%);
        bottom: calc(1.25rem + max(var(--app-bottom-bar-h, 0px), env(safe-area-inset-bottom))); }
    #bulk_actions > .btn { background: var(--tblr-bg-surface); box-shadow: var(--tblr-box-shadow-dropdown); }
    .merge-table, .merge-table :is(thead, tbody, tr, th, td) { display: block; min-width: 0; }
    .merge-table thead th.w-1, .merge-table tr[data-field] td:not(:has(input)) { display: none; }
    .merge-table thead th, .merge-table tbody th { border: 0; padding-bottom: .25rem; }
    .merge-table td { border: 0; padding-top: .25rem; padding-bottom: .25rem; }
    .merge-table tr { border-bottom: 1px solid var(--tblr-border-color); padding-bottom: .5rem; }
    .merge-table td[data-rec]::before { content: attr(data-rec); display: block; font-size: .75rem; color: var(--tblr-secondary); }
    .merge-table :is(th, td) { padding-inline: 1rem; }
    .merge-table .form-check { min-height: 44px; display: flex; align-items: center; gap: .5rem; padding-left: 0; }
    .merge-table .form-check-input { float: none; margin: 0; flex: none; }
}
.crm-child-chevron { transition: transform .15s ease-in-out; }
tr.shown .crm-child-chevron { transform: rotate(90deg); }
.crm-child-wrap { padding: .75rem 1.5rem; background: var(--tblr-bg-surface-tertiary); }
#column_list .column-item { cursor: grab; }
#column_list .column-item.dragging { opacity: .4; }

/* ── Dynamic form (dynamic_form.js): view / edit switching ─────────────── */
.field-input, .field-input-group, .checkbox-container { display: none; }
.edit-mode .field-group:not(.readonly-field-group) .field-value { display: none; }
.edit-mode .field-input { display: block; }
.edit-mode .field-input-group { display: flex; }
.edit-mode .checkbox-container { display: block; }
.edit-mode input[type="checkbox"].field-input { display: inline-block; }   /* Tabler sizes the box; width/height auto collapsed it to 0 */
.edit-mode textarea.field-input.quill-host { display: none; }   /* Quill replaces the textarea */
.edit-mode .field-input.readonly-field { background-color: var(--tblr-bg-surface-secondary); }   /* schema readonly / readonlyWhen lock */
.readonly-hint { display: none; font-style: italic; } .edit-mode .readonly-hint { display: block; }   /* readonlyWhen message_* under a locked input */
.field-group .form-hint { font-style: italic; }   /* schema helpText, same voice as the readonly hint */
/* Lines field (fields/lines.php, lines_field.js): the lookup and its stack in edit mode, the table otherwise. */
.lines-edit { display: none; }
.edit-mode .field-group:not(.readonly-field-group) .lines-edit { display: flex; }
.lines-stack { max-height: 24rem; overflow-y: auto; }
/* list relation filters: the typeahead wrapper is a div inside an input-group, so it must take the flex share a .form-control would */
.input-group > .typeahead-wrapper { flex: 1 1 auto; width: 1%; min-width: 0; }
.field-value { min-height: 1.5rem; }
.field-value .description-content { white-space: pre-wrap; word-break: break-word; }
.field-value.pre-line { white-space: pre-line; }   /* a text value's own line breaks show (a bundle's description, typed in the old composer's textarea) */
.image-dropzone.dropzone-hover, .signature-dropzone.dropzone-hover { background: var(--tblr-primary-lt); border-color: var(--tblr-primary) !important; }
/* Profile signature: the bordered pane is exactly the drawing area, 460x180 as quotations expect */
.signature-pad { max-width: 460px; }
.signature-pad canvas { display: block; width: 100%; height: 180px; }
.quill-editor { min-height: 200px; background: var(--tblr-bg-forms, #fff); }
/* The typing area fills the box. Quill gives .ql-editor height: 100%, which needs a definite height to
   resolve against - with only a min-height above it collapsed to one line, and a click below that line
   left no caret (and no selection, so @-mentions never opened). */
.quill-editor.ql-container { display: flex; flex-direction: column; }
.quill-editor.ql-container > .ql-editor { flex: 1 1 auto; height: auto; }
.ql-toolbar.ql-snow { border-radius: var(--tblr-border-radius) var(--tblr-border-radius) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--tblr-border-radius) var(--tblr-border-radius); }
.ql-file-attachment .file-attachment-link { display: inline-block; padding: 0 .35rem; border-radius: .25rem; background: var(--tblr-primary-lt); color: var(--tblr-primary); }
.note-content-preview, .note-content-full { white-space: pre-wrap; word-break: break-word; }
.note-content-full img { max-width: 100%; height: auto; border-radius: var(--tblr-border-radius); cursor: zoom-in; }
.crm-orders-lines-wrap { padding: .75rem 1.5rem; background: var(--tblr-bg-surface-tertiary); }
td.crm-orders-expand, td.crm-orders-number { cursor: pointer; }
.crm-orders-chevron { transition: transform .15s ease-in-out; }
tr.shown .crm-orders-chevron { transform: rotate(90deg); }

/* bundles + quotation detail */
.qd-long-desc { font-size: .82rem; max-width: 220px; white-space: pre-wrap; word-break: break-word; display: inline-block; vertical-align: middle; }

/* quotations */
.modal-xxl { --tblr-modal-width: 92vw; }
#quote_create_table tbody tr.quote-optional-row td { background: var(--tblr-bg-surface-secondary); }
#quote_create_table thead th { white-space: pre; }   /* the long headings break where their label has a \n (quotations_lang), the rest stay one line */
#quote_create_table > thead > tr > th:first-child { width: 60px; }   /* the arrows; here, as a DataTables `width` could not be dragged wider */
#quote_create_table tr.header-row td { background: var(--tblr-bg-surface-tertiary); border-top: 2px solid var(--tblr-primary); }
.qty-display { cursor: pointer; min-width: 28px; text-align: center; padding: 1px 4px; border-bottom: 1px dashed var(--tblr-border-color); border-radius: 3px; }
.qty-display:hover { background: var(--tblr-primary-lt); border-bottom-color: var(--tblr-primary); color: var(--tblr-primary); }
.discount-edit-container { min-width: 160px; }
.header-input.is-saved { border-color: var(--tblr-success); }
.header-input.is-failed { border-color: var(--tblr-danger); }

/* auth (login / reset / mobile login / errors) */
.auth-logo { display: inline-block; line-height: 0; }
.auth-logo img { height: 64px; width: auto; }
.auth-cookie-consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1030; }
@media (min-width: 768px) { .auth-cookie-consent { right: auto; max-width: 40rem; } }   /* a compact card bottom-left, clear of the reCAPTCHA badge bottom-right */
.grecaptcha-badge { visibility: hidden; }   /* Google allows this only with the auth_recaptcha_notice text on the page */

/* ---- UI polish 2026-09-19: header, mobile, list card, DataTables footer ---- */
.navbar-brand-image { width: auto; height: 2.5rem; }   /* as tall as the header's buttons (2026-11-06; was 4rem) */
header.navbar { --tblr-navbar-padding-y: .25rem; }
@media (max-width: 767.98px) { .navbar-brand-image { height: 2.75rem; } header.navbar { --tblr-navbar-padding-y: .9rem; } header.navbar .navbar-brand { padding-right: 0; } .page-header { margin-top: 1.5rem; } }
/* The header row is space-between over three items - burger, logo, actions - which parks the logo in
   the middle of a narrow screen. The logo takes the free space to its right instead, so it stays
   beside the burger and the actions stay hard right. */
@media (max-width: 767.98px) { .app-header-top .navbar-brand { margin-inline-end: auto; } }
@media (max-width: 379.98px) {
    .navbar-brand-image { height: 2.25rem; }   /* 375px and narrower: the header row has no room for the 2.75rem logo */
    /* ...and at 360px it was still ~6px over, so the row wrapped and the actions dropped to a second
       line. The action icons give the pixels back: tighter padding and spacing between them. */
    .app-header-top .navbar-nav.flex-row > .nav-item { margin-inline-end: .125rem !important; }
    .app-header-top .hdr-action { padding-inline: .375rem !important; }
}
/* 320px (an old iPhone SE) needs the last few pixels: the header row gives up half its side gutter. */
@media (max-width: 339.98px) { .app-header-top > .container-xl { padding-inline: .25rem; } .navbar-brand-image { height: 1.75rem; } .app-header-top .hdr-action { padding-inline: .25rem !important; } }
@media (max-width: 767.98px) {
    .nav-tabs, .card-header-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
    .nav-tabs .nav-link { white-space: nowrap; }
    .page-header .page-title { font-size: 1.25rem; }
}
#crm_card > .card-body { padding: 0; }
/* The strip that holds a table's bar, the table flush under it (the list's #crm_filters_block; an admin page's). */
#crm_filters_block, .crm-filter-block { padding: .75rem 1.25rem; border-bottom: 1px solid var(--tblr-border-color); }
/* The filter bar (crm/list.php, 2026-10-26): one line from a tablet up - search, views, Filters, then the table's
   tools at the far end; the fields fold under it (#crm_filter_panel). A phone stacks the bar, and its panel is always
   open: the whole block folds behind its own button there. */
.crm-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
/* One height for what stands in the bar (2026-11-18): the search and the views were 41px, the buttons 40. Not a menu's
   own fields and buttons (the column picker). */
.crm-filter-bar :is(.form-control, .form-select, .btn):not(.dropdown-menu *) { height: 2.5rem; }
.crm-filter-search { flex: 1 1 10rem; max-width: 18rem; }   /* narrows before the bar wraps (a tablet) */
.crm-list-toolbar { display: flex; gap: .5rem; margin-inline-start: auto; }
.tab-pane:not(#list_panel) .crm-list-toolbar { display: none; }   /* the Calendar tab has no table */
/* The filter drawers (.crm-filter-panel: the list's, a record's related tabs') are non-modal, the table stays usable beside
   them, so one opens under the pinned header (--app-header-h, app.js) and leaves search, bell and chat reachable. It
   pushes the page over rather than covering it (body.crm-filters-open, app.js filterDrawers), so the toolbar and the last
   columns stay in reach; the table scrolls sideways. */
@media (min-width: 768px) {
    :root { --crm-filter-w: 22.5rem; }   /* the drawer's width and the push that makes room for it */
    .crm-filter-panel { top: var(--app-header-h, 0px); --tblr-offcanvas-width: var(--crm-filter-w); }
    body:has(.crm-filter-panel) .page-wrapper { transition: padding-right .3s ease-in-out; }
    .crm-filters-open .page-wrapper { padding-right: var(--crm-filter-w); }
}
/* "+ Filter"'s menu (include/tabler/filter_add.php) is as wide as its column, 20rem at most, and wraps a long name: at
   377px it ran past a phone's 334px drawer and slid the fields sideways, and past a phone's screen on Statistics. */
.crm-filter-add-menu { min-width: 0; width: min(100%, 20rem); }
.crm-filter-add-menu .dropdown-item { white-space: normal; }
/* The body keeps its scrollbar's room: a menu opening made it scroll, its column narrowed after the menu was placed and
   the menu sat 24px off. */
.crm-filter-panel .offcanvas-body { scrollbar-gutter: stable; }
/* Under the scrolling body, so Reset/OK stay in view (the drawer is a flex column). */
.crm-filter-footer { flex-shrink: 0; padding: .75rem var(--tblr-offcanvas-padding-x, 1.5rem); border-top: 1px solid var(--tblr-border-color);
                     padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }   /* clear an installed iPhone's home indicator */
#preset_select { min-width: 16rem; }
@media (max-width: 767.98px) {
    /* A phone: a drawer is modal (app.js), full height and as wide as the side menu's (.app-side.offcanvas-lg). */
    .crm-filter-panel { --tblr-offcanvas-width: min(22.5rem, 85vw); }
    /* Two lines (2026-11-17): the search, then the views and Filters - the save actions and Filters as icons (list.php),
       the modified mark the select's border alone. */
    .crm-filter-search { flex: 1 1 100%; max-width: none; }
    .crm-filter-views { flex: 1 1 0; min-width: 0; }
    .crm-filter-views > .d-flex { flex-wrap: nowrap !important; }
    #preset_select { flex: 1 1 0; min-width: 0; }
    #view_modified_badge { display: none; }
    /* A bar without views (a related tab's, an admin page's): its search shares the line with Filters and the actions. */
    .crm-filter-bar:not(:has(.crm-filter-views)) .crm-filter-search { flex: 1 1 0; min-width: 0; }
}
.card .dt-container > .row { --tblr-gutter-x: 0; margin: 0 !important; }
.card .dt-container > .row > * { padding: 0; }
.card .dt-container > .row:last-child { padding: .5rem 1.25rem; border-top: 1px solid var(--tblr-border-color); }
.card .dt-container > .row:last-child > * { display: flex; align-items: center; gap: 1rem; }
.card .dt-container > .row:last-child .dt-length, .card .dt-container > .row:last-child .dt-info { margin: 0; }
.dt-container .dt-info, .dt-container .dt-length label { color: var(--tblr-secondary); font-size: .875rem; }
.dt-container .dt-length select { width: auto; display: inline-block; }
.dt-container .pagination { margin: 0; }
/* Horizontal scroll: one table scrolled natively by its layout cell (header moves with the body).
   DataTables' scrollX splits head/body into two tables synced by JS a frame late, which wobbles. */
.dt-container .dt-layout-table > div { overflow-x: auto; }
/* That pane's own bar sits at its bottom *edge*, which on a 100-row list is a long way down, and is the browser's: it
   is hidden (.app-slides) and the app's slide bar, in a band stuck to the bottom of the window, drives the same
   scroller (core/table.js; the band: .app-slide-band). z-index below the phone save footer (.crm-sticky-actions, also
   bottom: 0), which must stay on top where they meet. */
.dt-hscroll-bar { z-index: 2; }
/* In a wrapper that scrolls itself (.table-responsive: the quotation cart) the band sticks to that wrapper, not to the
   window - where a phone's bottom-bar offset lifted it over the table's last rows. There it stays under its table. */
.table-responsive > .dt-hscroll-bar { bottom: 0; }
.dt-container table.card-table { margin-bottom: 0; }
/* One header on every DataTable. The tint is already global; the rounded top corners came from
   Tabler's .card-table, which only the CRM list and the related tabs carry - cart, the admin lists,
   hub and the quotation tables read square. Rounding by container covers them all without each view
   having to be restructured to sit flush in its card. */
.dt-container table.dataTable > thead > tr > th:first-child { border-start-start-radius: var(--tblr-card-border-radius); }
.dt-container table.dataTable > thead > tr > th:last-child  { border-start-end-radius: var(--tblr-card-border-radius); }

/* Icon fonts: both Tabler stylesheets declare `.ti { font-family }` with !important and the
   filled one loads last, which sent every outline icon to the filled font. Pin them. */
.ti { font-family: "tabler-icons" !important; }
.ti[class*="-filled"] { font-family: "tabler-icons-filled" !important; }
.ti-heart-filled:before { content: "\f67c"; }   /* filled set reuses outline names; expose the one filled glyph the app uses */
/* The filled webfont css is NOT loaded (it reuses the outline class names and would
   override their codepoints); declare its face here for the filled glyphs we use. */
@font-face { font-family: "tabler-icons-filled"; font-style: normal; font-weight: 400; font-display: block;
             src: url("../../vendor/tabler-icons/fonts/tabler-icons-filled.woff2?v3.46.0") format("woff2"), url("../../vendor/tabler-icons/fonts/tabler-icons-filled.woff?v3.46.0") format("woff"); }

/* ---- Typography (2026-09-19): one CeraPro family with real weights, so Tabler's 600/700
   picks the Bold face instead of synthesising bold from CeraPro-Medium (bulky/blurry). ---- */
@font-face { font-family: "CeraPro-Medium"; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/webFonts/CeraProLight/font.woff2') format('woff2'), url('../fonts/webFonts/CeraProLight/font.woff') format('woff'); }
@font-face { font-family: "CeraPro-Medium"; font-weight: 400 500; font-style: normal; font-display: swap; src: url('../fonts/webFonts/CeraProMedium/font.woff2') format('woff2'), url('../fonts/webFonts/CeraProMedium/font.woff') format('woff'); }
@font-face { font-family: "CeraPro-Medium"; font-weight: 600 800; font-style: normal; font-display: swap; src: url('../fonts/webFonts/CeraPROBold/font.woff2') format('woff2'), url('../fonts/webFonts/CeraPROBold/font.woff') format('woff'); }
:root, [data-bs-theme] {
    --tblr-font-sans-serif: "CeraPro-Medium", Helvetica, Arial, sans-serif;
    --tblr-body-font-size: 0.8125rem;      /* 13px, as the legacy theme */
    --tblr-body-line-height: 1.5;
    --tblr-font-weight-medium: 500;
    --tblr-font-weight-semibold: 500;      /* no SemiBold cut: "semibold" renders Medium, Bold is for page titles and KPI numbers (2026-09-22) */
    --tblr-font-weight-headings: 700;
}
/* Bold in written text (2026-11-02): the app's strong is Medium (above), the face the text is already in, so a word made
   bold in an editor looked like the rest. Where people write - every Quill editor, Boards' rendered text (.brich), a CRM
   note, a notification's body - it is the Bold face, as the KB's prose has it (kb.css .kb-prose strong). */
:is(.ql-editor, .brich, .note-content-preview, .note-content-full, #show_notification_modal_body) :is(strong, b) { font-weight: var(--tblr-font-weight-bold); }
.section-header h4 { font-weight: var(--tblr-font-weight-medium); }
/* Dynamic forms: small grey labels over values in body colour, so the values lead (view and edit mode). */
.field-label { color: var(--tblr-secondary); font-size: .75rem; font-weight: var(--tblr-font-weight-medium); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Card-header tabs: Bootstrap pulls the list 20px below the header, which has no bottom
   padding here, so the card body painted over the lower half of every tab. */
.card-header > .card-header-tabs { margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.card-header > .card-header-tabs .nav-link { white-space: nowrap; }
/* Tabs: Tabler colours inactive tabs with a fixed #6b7280 (3:1 on dark cards) and draws them with the dark theme's
   border colour, which barely shows on its cards; use the theme's grey text and a stronger grey border there. */
.nav-tabs { --tblr-nav-link-color: var(--tblr-secondary); }
[data-bs-theme="dark"] .nav-tabs { --tblr-border-color: var(--tblr-gray-600); }

/* Brand colours: the defaults (Tabler's data-bs-theme-primary switch is not used: its cyan is too light for text on
   white). Admin > Settings > Branding's go over them, --app-brand and --app-header-bg with the shades worked out from them
   (brand_colors(), tabler_helper.php); appconf's brand_color / brand_dark are these two. Each colour as hex and as r, g, b
   (the r, g, b feed the tints).
   - --app-brand, the brand cyan: the dark header row, the accents (menu, tab and card icons, card and section bars)
     and, in the dark theme, the primary (with dark text on filled buttons: white on it was 2.9:1);
   - --tblr-primary in the light theme: text, links and filled buttons use a darker shade of the brand, 5.6:1 on
     white (the brand cyan is 3:1).
   Grey text #5f6673: Tabler's #6b7280 fell to 4.45:1 on the tinted page background; light-dark() keeps Tabler's
   light grey in the dark theme and in the dark header bar (color-scheme: dark). */
:root {
    --app-brand: #17a2b8; --app-brand-rgb: 23, 162, 184;
    --app-header-bg: #0f2a3a; --app-header-bg-rgb: 15, 42, 58;   /* the header bar, the chat dock windows' headers, and every dark panel header (.app-dark-head); also the app's
                                   status bar (the manifest and brand_icons(): appconf's brand_dark, or Branding's) */
    /* What sits on that navy (.app-dark-head): its text, and the lighter tones of the brand and of red that stay readable on
       it (outlined and tinted buttons), each also as r, g, b for the see-through shades. */
    --app-header-ink: #dce1e7; --app-header-ink-rgb: 220, 225, 231;
    --app-header-accent: #7fdbe9; --app-header-accent-rgb: 127, 219, 233;
    --app-header-danger: #ff9a9a; --app-header-danger-rgb: 255, 154, 154;
    --tblr-primary: #0b7285; --tblr-primary-rgb: 11, 114, 133;
    --tblr-primary-darken: color-mix(in srgb, var(--tblr-primary) 85%, #000);   /* hover; Tabler's was a lighter, see-through primary */
    --tblr-secondary: light-dark(#5f6673, var(--tblr-gray-400)); --tblr-secondary-rgb: 95, 102, 115;
    --tblr-secondary-color: light-dark(#5f6673, rgba(229, 231, 235, .75)); --tblr-muted: light-dark(#5f6673, var(--tblr-gray-400));
}
[data-bs-theme="dark"] {
    --tblr-primary: var(--app-brand); --tblr-primary-rgb: var(--app-brand-rgb);
    --tblr-primary-darken: color-mix(in srgb, var(--tblr-primary) 85%, #fff);   /* hover lightens on dark */
    --tblr-primary-fg: var(--tblr-gray-900);
}
/* Dark theme: Tabler's menus were the cards' colour with a black shadow too faint to see, so they melted into the page.
   A lifted surface is lighter on dark, with a thin light edge and a deeper shadow (the chat windows' shadow likewise, below).
   The edge is a ring in the shadow, as Tabler draws it: its menus have no border. :root only - a dark band in the light
   theme (the header bar) keeps its own menus. */
:root[data-bs-theme="dark"] .dropdown-menu {
    --tblr-dropdown-bg: #2b3544;
    --tblr-dropdown-box-shadow: 0 0 0 1px #435064, 0 8px 24px rgba(0, 0, 0, .5);   /* solid: a see-through white on the dark page came out the menu's own colour */
}
.app-header-top { --tblr-primary: var(--app-brand); --tblr-primary-rgb: var(--app-brand-rgb); }
/* Tabler's .bg-light is near-white in both themes, so in the dark theme its light text vanished (section headers,
   quotation totals, stat tiles, log viewers). Use the theme's secondary surface: the same #f9fafb in the light theme. */
.bg-light { background-color: var(--tblr-bg-surface-secondary) !important; }
/* Same fix, other half: <pre> hardcodes Tabler's dark-code-block foreground (--tblr-light), which on a
   re-surfaced .bg-light is invisible in the light theme. `pre code { color: inherit }`, so one rule covers both. */
pre.bg-light { color: var(--tblr-body-color); }
/* Alerts: Tabler 1.5 writes the whole text in the alert's colour, which on its own tint is below 4.5:1 (info: 4.3:1
   in the dark theme); the text uses the normal text colour, the icon keeps the alert colour. */
.alert { --tblr-alert-color: var(--tblr-body-color); }
.alert-icon { color: var(--tblr-alert-variant-color); }
/* A flex child only clips with .text-truncate if it may shrink below its content, and
   neither Bootstrap 5.3 nor Tabler ships .min-w-0 - so every "flex-fill min-w-0" + truncate
   pair (attachment names, bundle rows) grew past the card instead, which on a phone pushed
   the page sideways. One utility, every such element fixed. */
.min-w-0 { min-width: 0; }
/* Notification viewer: the body is written in Quill, whose .ql-editor gives <p> no margin at
   all and spaces lines by line-height alone. Render it the same way - with Bootstrap's 1rem on
   every paragraph the text came out noticeably looser than what the admin wrote. An empty <p>
   (how bodies written before the editor kept the <br> store a blank line) gets a line box of
   its own, so the blank line is there and is exactly one line, as in the editor. */
#show_notification_modal_body p { margin: 0; }
#show_notification_modal_body p:empty::before { content: "\200b"; }

/* Banner notifications (own/js/banners.js): the whole band opens the notification. It sits
   above the page header, so the host must take no room at all on the pages without one, and
   inside the shell the last band must not hold the page title away from it. Stacked bands,
   and the login page's band above the sign-in card, keep their gap. */
#app_banners:not(:empty) { padding-top: 1rem; }
/* "Install eddy" on a phone, under the banners (top.php #app_install, app.js installHint). */
.app-install:not([hidden]) { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 0; }
.app-install img { flex: none; }
main #app_banners .app-banner:last-child { margin-bottom: 0; }
.app-banner-link { cursor: pointer; }
.app-banner-link:hover { filter: brightness(0.98); }
/* The bell rings: the shared pulse ring (see "Pulse ring for icons"), in the band's own colour
   whatever variant the admin picked - .pulse-warning and friends only cover three of them. */
.app-banner .pulse { --pulse-color: var(--tblr-alert-variant-color); }
/* Same knob again, for badges: Tabler paints badge text in --tblr-badge-color (= --tblr-secondary) and the .bg-*
   utilities set only a background, so every SOLID badge came out grey on colour - 1.04:1 on danger, which is the
   "no access" pill, and 2.27:1 on warning, the "not verified" one. Pair the foreground per hue; Tabler's own
   --tblr-*-fg is #f9fafb throughout, which measures 4.46:1 on danger and fails. The .bg-*-lt tints set their own
   !important colour, so this reaches only the five solid badges: these two, the order status, and the cart count. */
.badge.bg-danger, .badge.bg-red      { --tblr-badge-color: #fff; }
.badge.bg-warning, .badge.bg-success { --tblr-badge-color: var(--tblr-dark); }
/* Mentions in notes (Quill mention plugin): its pills are a fixed 65 x 24px (longer names spilled out) in a light blue
   that ignores the theme; size them to the name, in the primary tint. */
.mention { width: auto; height: auto; padding: 0 .3rem; background: var(--tblr-primary-lt); color: var(--tblr-primary); white-space: nowrap; }
.mention > span { margin: 0; }
/* Its dropdown is light-only and grows with the list; every colleague is in it before anything is typed,
   so it scrolls, sizes itself to the names and follows the theme. */
.ql-mention-list-container { max-height: 16rem; width: auto; min-width: 14rem; max-width: 22rem; background: var(--tblr-bg-surface); border-color: var(--tblr-border-color); }
.ql-mention-list-item { font-size: .875rem; line-height: 2.25rem; padding: 0 .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-mention-list-item.selected { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); }
/* Upcoming steps (record stage bar) were Tabler's 40% "disabled" text (2.1:1); the theme's grey still reads as muted. */
.steps { --tblr-disabled-color: var(--tblr-secondary); }
/* Ghost primary buttons (linked record names) sit on a primary tint; in the dark theme the cyan text on it was 4.1:1,
   so they take the dark theme's lighter link colour. */
[data-bs-theme="dark"] .btn-ghost-primary { --tblr-btn-color: var(--tblr-link-color); }
:root:not([data-bs-theme="dark"]) ::placeholder { color: var(--tblr-gray-500); }   /* Tabler's gray-400: 2.5:1 */
.footer { color: var(--tblr-secondary); }
.navbar .nav-link-icon, .dropdown-item-icon { color: var(--app-brand); }
.page-pretitle { color: var(--tblr-primary); }
/* The brand line on a card's edge: a strip on an overlay cut to the card's outline, as Tabler's .card-status-top, so the
   rounded corner clips it straight. As a border it met the card's other sides (1px, transparent in the light theme) at
   the corners and tapered into a hook. Two kinds:
   - On top, --app-card-edge (its width): the overlay's own border, which bends with the card's corners at an even
     width, masked to the top band as tall as the corner, so it ends where the curve meets the sides. Set here and in
     boards.css / kb.css.
   - On a side, --app-card-line (a background): the tiles' own colour on the left (.app-tile, below), a straight band
     the corners clip.
   The overlay is the card's padding box with its inner radius, as a dark header is (below), and the card's background
   stops there too: no 1px arithmetic against the border, which the browser snaps to device pixels, so at 125-150%
   scaling the line and the navy drifted apart by a fraction either way. */
.card { --app-card-edge: 0px; --app-card-line: none; background-clip: padding-box; }   /* per card: custom properties inherit, and a card inside a lined one would draw it too */
.page-body > [class*="container"] > .card:first-child, #kt_content > .card:first-child, #crm_card, .card:has(> .app-dark-head) { --app-card-edge: 2px; }
.card::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    border: var(--app-card-edge) solid var(--app-brand); border-radius: var(--tblr-card-inner-border-radius); background: var(--app-card-line);
    mask: linear-gradient(#000 0 0) top / 100% var(--tblr-card-inner-border-radius) no-repeat border-box, linear-gradient(#000 0 0) padding-box;
}
/* Opaque (the tint mixed into the card's surface): a header that sticks over the rows, or a pinned column under it,
   must not let them show through (Board layout, below). */
.table thead th, .table > :not(caption) > * > th { background: color-mix(in srgb, var(--tblr-primary) 6%, var(--tblr-bg-surface)); }
/* DataTables' bootstrap5 stylesheet paints every cell with var(--bs-table-bg), which Tabler never sets and which
   outranks the rule above, so its headers stayed untinted: give its header rows the same tint through that variable. */
table.dataTable > thead { --bs-table-bg: color-mix(in srgb, var(--tblr-primary) 6%, var(--tblr-bg-surface)); }
.card-header .card-title, .page-title { letter-spacing: -.01em; }
.hub-tile .subheader { color: var(--tblr-secondary); }
/* Tile icons are the glyph alone, in the brand colour: no avatar chip, circle or tinted square. */
.hub-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--app-brand); line-height: 1; }
.hub-icon .icon { width: 1.75rem; height: 1.75rem; font-size: 1.75rem; }
/* Tiles inside a card: Bootstrap's bare .col keeps every one of them on a single row whatever the
   width, so four tiles in a narrow card got ~136px each on a desktop and ~77px on a phone, where
   the Greek labels broke mid-word and ran to nine lines. A flex-basis lets the row wrap instead -
   as many tiles as fit at a readable width, the rest on the next line. */
.hub-tile.col { flex: 1 1 14rem; }
.section-header { border-left: 3px solid var(--app-brand); }
.nav-tabs .nav-link .icon, .card-title .icon { color: var(--app-brand); }

/* ---- Density (2026-09-19): restore the legacy Metronic vertical rhythm (root 13px: form-group 1.75rem,
   card body 2rem, inputs ~38px, table cells .75rem, tabs .85rem) on top of Tabler's tighter defaults. ---- */
.card { --tblr-card-spacer-y: 2rem; --tblr-card-spacer-x: 2rem; --tblr-card-cap-padding-y: 1.25rem; --tblr-card-cap-padding-x: 2rem; }
.card-sm { --tblr-card-spacer-y: 1rem; --tblr-card-spacer-x: 1rem; }
.page, .page-wrapper { --tblr-page-padding-y: 1.5rem; }
/* Tabler keeps the scrollbar's room on every page (html { scrollbar-gutter: stable }): on a page that does not scroll
   it was an empty strip beside the dark header (2026-11-07). The page takes the whole width instead; ponytail: it
   shifts by the scrollbar's width between a page that scrolls and one that does not. */
html { scrollbar-gutter: auto; }
.page-header { margin-bottom: .25rem; }
/* One page header on every page (2026-11-07, as compact as a board's; 2026-11-18 no breadcrumbs): the heading - the
   title, a link to its page, and under it where the page sits (top.php) - as tall as a button (2.5rem), so it lines up
   with the actions and the sidebar's buttons (the row aligns to the top) and sits at the same height with or without
   them. Two lines fit in it: the title on one line, cut with "…" (24px), the place under it (15px). From a tablet up
   .75rem above the header and below it, as a board's (a phone keeps Tabler's 1.5rem). */
.page-heading { flex: 1 1 auto; min-width: 0; min-height: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.page-heading-line { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.page-header .page-title { min-width: 0; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title-link { color: inherit; text-decoration: none; }
.page-title-link:hover { color: var(--tblr-primary); }
.page-context { font-size: .75rem; line-height: 1.25; color: var(--tblr-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-context > * + *::before { content: "/"; margin-inline: .375rem; opacity: .6; }
.page-context a { color: inherit; text-decoration: none; }
.page-context a:hover { color: var(--tblr-primary); text-decoration: underline; }
@media (min-width: 768px) { .page-wrapper .page-header, .page-body { margin-top: .75rem; } }
.form-control, .form-select, .ts-wrapper.form-select .ts-control, .ts-wrapper.form-control .ts-control, .ts-wrapper .ts-control { padding-top: .625rem; padding-bottom: .625rem; }
.input-group-text { padding-top: .625rem; padding-bottom: .625rem; }
.nav-tabs .nav-link { padding: 1rem 1.25rem; }
.field-group { margin-bottom: 2rem; }
.field-label { margin-bottom: .6rem; }
.field-value { padding: .5rem 0; min-height: 2.5rem; line-height: 1.6; font-size: .875rem; }
.section-header { padding: .9rem 1rem; margin: 1rem 0 1.5rem; }
.tab-pane > .section-header:first-child, #dynamicForm > .section-header:first-child, .card-body > .section-header:first-child { margin-top: 0; }
/* A record's sections and fields (dynamic_form/_field_sections.php, 2026-10-29): a section is a small title over a
   hairline with a short brand stroke, not a navy band - the card's header is the page's one dark band - and a field's
   label sits close over its value. Edit mode keeps the old rhythm: a read-only value there stands beside 2.5rem inputs.
   The space between sections is under each one's fields, not over its title: the first title starts at the top, two
   side by side alike. */
.section-header.form-section {
    border-left: 0; padding: 0 0 .5rem; margin: 0 0 1rem; border-bottom: 1px solid var(--tblr-border-color);
    background: linear-gradient(var(--app-brand), var(--app-brand)) left bottom / 2rem 2px no-repeat;
}
.form-section h4 { font-size: .75rem; font-weight: var(--tblr-font-weight-bold); text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-secondary); }
/* The Hub's record (hub/dynamic_form/form.php, .hub-record) takes the same rhythm. */
:is(#dynamicForm, .hub-record) .form-section + .row { margin-bottom: 1.25rem; }
:is(#dynamicForm, .hub-record) .field-group { margin-bottom: 1.25rem; }
/* Empty fields while reading a record (dynamic_form.js markEmpty, the switch in form.php): hidden, and a section of
   nothing but empty fields with them; edit mode shows them all. The switch sits in the Edit row, which edit mode
   hides; a row left with nothing to show (who may only read a record without empty fields) goes too. The Hub's
   record marks its empty fields on the server (hub/dynamic_form/form.php). */
.hide-empty:not(.edit-mode) :is(.field-container.is-empty, .section-header.is-empty, .section-header.is-empty + .row) { display: none; }
.crm-stacked-actions:not(:has(> :not([hidden]))) { display: none; }
.crm-empty-toggle { align-self: center; }   /* on the buttons' middle, not the top of their line */
/* A switch that is off reads as a switch, app-wide (2026-10-30): Tabler draws it as a white track with a white knob
   and a hairline, nothing on a white card. The track takes the surface grey, the knob and edge the muted text colour. */
.form-switch .form-check-input.form-check-input:not(:checked) {   /* the doubled class: as specific as Tabler's :not(:checked):not(:focus), and later */
    background-color: var(--tblr-bg-surface-secondary); border-color: color-mix(in srgb, var(--tblr-secondary) 45%, transparent);
    --tblr-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2398a2b3'/%3e%3c/svg%3e");
}
#dynamicForm .field-label, .hub-record .field-label { margin-bottom: .125rem; }
#dynamicForm .field-value, .hub-record .field-value { padding: .125rem 0; min-height: 1.5rem; line-height: 1.5; }
.edit-mode #dynamicForm .field-label { margin-bottom: .6rem; }
.edit-mode #dynamicForm .field-value { padding: .5rem 0; min-height: 2.5rem; }
/* Reading a record on a desktop (2026-11-11): tighter - less space under a field and a section, a smaller label. Edit and
   create (.edit-mode on the [data-mode] container) keep their rhythm, as a phone or a tablet does. */
@media (min-width: 992px) {
    :is([data-mode]:not(.edit-mode) #dynamicForm, .hub-record) .field-group { margin-bottom: .5rem; }
    :is([data-mode]:not(.edit-mode) #dynamicForm, .hub-record) .field-label { font-size: .7rem; }
    :is([data-mode]:not(.edit-mode) #dynamicForm, .hub-record) .form-section + .row { margin-bottom: .75rem; }
    :is([data-mode]:not(.edit-mode) #dynamicForm, .hub-record) .section-header.form-section { margin-bottom: .5rem; }
}
/* The record's key facts under its name (form.php .record-highlights, dynamic_form.js initHighlights): label over
   value, as many to a line as fit. A relation's link reads as a link here, not as the field's button. */
.record-highlights:not([hidden]) {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem 1.5rem;
    padding: .875rem var(--tblr-card-cap-padding-x); border-bottom: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface-secondary);
}
.record-highlight-label { font-size: .75rem; color: var(--tblr-secondary); }
.record-highlight-value { font-weight: var(--tblr-font-weight-medium); overflow-wrap: anywhere; }
.record-highlight-value .btn { padding: 0; min-height: 0; border: 0; font-weight: inherit; background: none; }
.record-highlight-value .btn .icon { display: none; }
/* An avatar is a fixed circle: in a flex row beside a long name (a user field's value) it would shrink into an oval. */
.avatar { flex-shrink: 0; }
#crm_filters_block .form-label { margin-bottom: .5rem; }
#calendar_panel, #statistics_panel { padding: 2rem; }   /* Recent and a tab of its own (drafts) are tables: flush in the card, as the list */
#statistics_panel .dt-container { margin-inline: -2rem; }   /* and so are Statistics' tables, under its padded filters and chart */
.card .dt-container > .row:last-child { padding: 1rem 2rem; }
.datagrid { --tblr-datagrid-spacing: 1.5rem; }
.modal-body { padding: 1.5rem; }
.dropdown-item { padding-top: .625rem; padding-bottom: .625rem; }
/* Roomier menus. The header row keeps its height (only the sides grow); on a phone, where the
   collapsed list IS the menu, rows go to ~48px - a comfortable tap target. */
#navbar-menu .navbar-nav > .nav-item > .nav-link, .app-hub-menu .navbar-nav > .nav-item > .nav-link { padding-inline: 1rem; }
/* Tighter on a narrow wide menu (2026-11-13): with every grant, Calendar's entry made the row 23px wider than a 992px
   screen in Greek, and every page scrolled sideways. ponytail: ~50px to spare there now; one more entry needs a shorter
   label or a "More" menu. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #navbar-menu .navbar-nav > .nav-item > .nav-link { padding-inline: .75rem; }
}
@media (max-width: 767.98px) {
    #navbar-menu .navbar-nav > .nav-item > .nav-link { padding-block: .875rem; }
    #navbar-menu .dropdown-item { padding-block: .75rem; }
}

/* No auto-capitalisation (2026-09-19): Tabler uppercases table headers, subheaders, pretitles,
   datagrid titles, dropdown headers and hr-text; the legacy UI never did. */
.table thead th, .subheader, .page-pretitle, .datagrid-title, .dropdown-header, .hr-text, .list-group-header, .page-item-subtitle,
.table-mobile td[data-label]::before, .table-mobile-md td[data-label]::before { text-transform: none; letter-spacing: normal; }
.table thead th { font-size: .8125rem; }

/* ---- Header colour + hover (2026-09-19): one accent per action, tinted hover pill, small lift. ---- */
.navbar .hdr-action { border-radius: .5rem; transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease; }
/* The icon links (theme, chat, bell, cart, language) are 40px squares with the icon in the middle, like the search
   button: a nav-link lays its icon out from the left and is taller than the row's buttons. */
.app-header-top .nav-link.hdr-action:not(.hdr-user) { justify-content: center; min-width: 2.5rem; height: 2.5rem; padding-block: 0; }
.navbar .hdr-action .icon { transition: transform .2s ease; }
.navbar .hdr-action:hover { transform: translateY(-1px); }
.navbar .hdr-search { color: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); }
.navbar .hdr-search .icon { color: var(--tblr-primary); }
/* Tabler gives .btn .icon an asymmetric margin (-1/4 left, +1/2 right of the button's padding) to
   sit next to a label. Below lg the label is hidden, so that margin just pushes the glyph off
   centre in its box - 13px one side, 25px the other. */
@media (max-width: 991.98px) { .navbar .hdr-search .icon { margin: 0; } }
.navbar .hdr-search:hover { color: #fff; background: rgba(var(--tblr-primary-rgb), .22); border-color: rgba(var(--tblr-primary-rgb), .5); }
.navbar .hdr-search kbd { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); }
/* In the hub as a partner user (navbar.php): the pill takes what its line of the top row has left - beside the logo on
   a phone, where the actions wrap under it - and cuts the name short rather than push anything off the row. The hub's
   menu is a row of its own under the staff member's (after the collapse, in .app-header-menu, so it is pinned with
   it), told from it by a tint of the brand laid over the row's own background, whichever that is (either theme,
   pinned or not). Looking, not acting (MY_Controller::_hub_act_as): a favourite's heart shows and takes no click. */
.app-hub-as { display: flex; flex: 1 1 0; justify-content: flex-end; min-width: 7rem; }
.app-hub-as .btn-group, .app-hub-as .btn:first-child { min-width: 0; }
.app-hub-as .btn:first-child { color: var(--app-header-accent); border-color: rgba(var(--app-header-accent-rgb), .45); }
@media (min-width: 768px) { .app-hub-as { margin-inline-end: 1rem; } .app-hub-as .btn-group { max-width: 24rem; } }
#navbar-menu + .app-hub-menu { background-image: linear-gradient(rgba(var(--tblr-primary-rgb), .06), rgba(var(--tblr-primary-rgb), .06)); }   /* under the staff member's own menu only: a partner's row is their one menu */
#navbar-menu { position: relative; z-index: 1; }   /* its Tools menu opens over the hub's row under it, not behind it */
body:has(.app-hub-as) .hub-fav-prod { pointer-events: none; }
/* On a phone the pill is a tag beside the logo - round and tinted, so it does not read as a second search box over the
   real one. A menu row is a line of links there (.app-menu-line, navbar.php), and there is no burger: the staff
   member's own menu, a partner's, and - in the hub as a partner - the staff member's own with the partner's under it,
   two lines. Round links to slide, a tap each, the open one filled; the line fades at
   the edge where more follow, and a bar under it shows that it slides and where it is (app.js menuLines draws the bar
   and brings the open link into view). A menu inside the line (Tools) opens under the row, as wide as the screen. A
   menu label's line break is for the wide menu only. */
@media (max-width: 767.98px) {
    .app-hub-as { margin-inline-start: .5rem; }
    .app-hub-as .btn { background: rgba(var(--app-header-accent-rgb), .12); border-color: rgba(var(--app-header-accent-rgb), .35); }
    .app-hub-as .btn:first-child { border-radius: 999px 0 0 999px; font-size: .875rem; }
    .app-hub-as .btn:last-child { border-radius: 0 999px 999px 0; color: var(--app-header-accent); }
    .app-hub-as .btn .icon { color: inherit; }
    .app-menu-line.navbar, .app-menu-line > .navbar { --tblr-navbar-padding-y: .25rem; }   /* the class is on the row, or on what wraps it (#navbar-menu) */
    .app-menu-line nav { min-width: 0; }   /* a flex item is as wide as its content otherwise: the line would push the page wide instead of sliding */
    /* It fades at both edges; the padding keeps the first and the last link clear of the fade when the line is at its end. */
    .app-menu-line .navbar-nav { flex-direction: row; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding-inline: .75rem 1.5rem;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 .75rem, #000 calc(100% - 1.5rem), transparent);
        mask-image: linear-gradient(to right, transparent, #000 .75rem, #000 calc(100% - 1.5rem), transparent); }
    /* :is() so both lines outrank the menu row's own rules for these links, which name #navbar-menu */
    :is(#navbar-menu, .app-hub-menu).app-menu-line .navbar-nav > .nav-item > .nav-link { padding: .5rem .875rem; border-radius: 999px; font-size: .9375rem; white-space: nowrap; }
    :is(#navbar-menu, .app-hub-menu).app-menu-line .navbar-nav > .nav-item.active > .nav-link { color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .14); }
    .app-menu-line .navbar-nav > .nav-item.active::after { content: none; }   /* Tabler's bar beside the open entry: the fill says it here */
    /* A menu inside the line (Tools): under the row, as wide as the screen. The row is its anchor, not its entry
       (position: static), so the line's own box does not cut it; and the fade, which would, is off while it is open. */
    .app-menu-line .navbar-nav > .dropdown { position: static; }
    .app-menu-line .navbar-nav .dropdown-menu { position: absolute; top: 100%; inset-inline: .5rem; margin: 0; }
    .app-menu-line .navbar-nav:has(.dropdown-menu.show) { -webkit-mask-image: none; mask-image: none; }
    .app-header-menu .nav-link-title br { display: none; }
}
/* The bar under a line that slides sideways (ui.slideBar: the menu line, tabs, a record's highlights): the one hint the
   app gives that there is more, and where the line is - never the browser's scrollbar, hidden on every such line.
   Hidden while it all fits. Under a card header's tabs it sits under the header, in the card's inset. */
.app-slides, .nav-tabs { scrollbar-width: none; }
:is(.app-slides, .nav-tabs)::-webkit-scrollbar { display: none; }
.app-slide-bar { position: relative; height: 4px; margin: .25rem .75rem 0; border-radius: 4px; background: rgba(var(--tblr-primary-rgb), .16); }
.app-slide-bar::before { content: ""; position: absolute; inset: -7px 0; }   /* a mouse's grab is wider than 4px */
/* The down bar of a pane that scrolls both ways (from lg up, the list's and a board's): over the pane's right edge,
   placed by ui.slideBar from the pane's box, above its sticky headings and pinned cells. */
.app-slide-bar-y { position: absolute; width: 4px; margin: 0; z-index: 7; }
.app-slide-bar-y::before { inset: 0 -7px; }
:has(> .app-slide-bar-y) { position: relative; }
.app-slide-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tblr-primary); }
.card-header + .app-slide-bar { margin: .375rem var(--tblr-card-cap-padding-x) 0; }
/* A table's and a board's bar (core/table.js, boards.js): in a band stuck to the bottom of the window, over the phone's
   bottom bar, so it is in reach from any row; it settles under its table or board at the end. 19px with its border: it
   passes under the shell's round button (fixed 1.25rem up). Gone with its bar. */
.app-slide-band { position: sticky; bottom: var(--app-bottom-bar-h, 0px); padding: 7px 1.25rem; background: var(--tblr-bg-surface); border-top: 1px solid var(--tblr-border-color); }
.app-slide-band > .app-slide-bar { margin: 0; }
.app-slide-band:not(:has(> .app-slide-bar:not([hidden]))) { display: none; }   /* nor before it has one (a board's) */
.navbar .nav-link.hdr-theme[data-theme-toggle="dark"]  { color: #c4b5fd; }
.navbar .nav-link.hdr-theme[data-theme-toggle="dark"]:hover  { color: #ddd6fe; background: rgba(139, 92, 246, .22); }
.navbar .nav-link.hdr-theme[data-theme-toggle="dark"]:hover .icon { transform: rotate(-25deg) scale(1.1); }
.navbar .nav-link.hdr-theme[data-theme-toggle="light"] { color: #fbbf24; }
.navbar .nav-link.hdr-theme[data-theme-toggle="light"]:hover { color: #fde68a; background: rgba(245, 158, 11, .22); }
.navbar .nav-link.hdr-theme[data-theme-toggle="light"]:hover .icon { transform: rotate(40deg) scale(1.1); }
.navbar .nav-link.hdr-cart { color: #4ade80; }
.navbar .nav-link.hdr-cart:hover { color: #86efac; background: rgba(34, 197, 94, .2); }
.navbar .nav-link.hdr-cart:hover .icon { transform: scale(1.12); }
.navbar .nav-link.hdr-chat { color: #7dd3fc; }
.navbar .nav-link.hdr-chat:hover { color: #bae6fd; background: rgba(56, 189, 248, .22); }
.navbar .nav-link.hdr-bell { color: #fda4af; }
.navbar .nav-link.hdr-bell:hover { color: #fecdd3; background: rgba(244, 63, 94, .22); }
.navbar .nav-link.hdr-bell:hover .icon { transform: rotate(-15deg) scale(1.1); }
.navbar .nav-link.hdr-lang { color: #fb923c; }
.navbar .nav-link.hdr-lang:hover, .navbar .nav-link.hdr-lang.show { color: #fdba74; background: rgba(249, 115, 22, .22); }
.navbar .nav-link.hdr-lang:hover .icon { transform: scale(1.12); }
.navbar .hdr-user .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); transition: box-shadow .15s ease; }
.navbar .hdr-user:hover .avatar { box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), .6); }
.navbar .hdr-user:hover { background: rgba(255, 255, 255, .06); }
/* menu row */
#navbar-menu .navbar-nav > .nav-item > .nav-link, .app-hub-menu .navbar-nav > .nav-item > .nav-link { border-radius: .5rem .5rem 0 0; transition: background-color .15s ease; }
#navbar-menu .navbar-nav > .nav-item > .nav-link:hover, .app-hub-menu .navbar-nav > .nav-item > .nav-link:hover { background: rgba(var(--tblr-primary-rgb), .08); }
#navbar-menu .navbar-nav > .nav-item > .nav-link:hover .nav-link-icon, .app-hub-menu .navbar-nav > .nav-item > .nav-link:hover .nav-link-icon { transform: scale(1.1); }
#navbar-menu .nav-link-icon, .app-hub-menu .nav-link-icon { transition: transform .15s ease; }
#navbar-menu .dropdown-item:hover .dropdown-item-icon { transform: translateX(2px); }
#navbar-menu .dropdown-item-icon { transition: transform .15s ease; }
/* Cart with items: badge shows products/items; app.js adds .pulse to the icon wrapper (green ring, twice). */
/* top: Tabler hangs the count half above the link's top edge (top: 0 !important, translate -50%), and the header's icons
   sit 8px below the window's top, so the window cut its top off (2026-11-13). Lowered by half its height: its top on the
   link's, still on the icon's corner. */
.navbar .hdr-action .badge-notification { font-size: .625rem; padding: .2rem .35rem; top: .5rem !important; }
/* A tag in a menu title (Tuesday's BETA) sits after the word, on its line: Tabler pins every .badge in a nav link
   to the link's corner, which suits a counter but on phones put the tag at the far edge of the full-width row. */
#navbar-menu .nav-link-title .badge { position: static; transform: none; font-size: .625rem; line-height: 1; padding: .2rem .35rem; vertical-align: .1em; }
/* The same pin caught the presence dot on my header avatar (live.js): back to the avatar's bottom right, as Tabler draws it. */
.navbar .navbar-nav .nav-link .avatar .badge { top: auto; bottom: 0; inset-inline-end: 0; transform: none; }

/* ---- DataTables (2026-09-19): compact rows, controls under the table (core/table.js's layout), pill pagination,
   phones show only the link column + actions. ---- */
.dt-container table.dataTable > tbody > tr > td, .dt-container table.dataTable > thead > tr > th { padding-top: .45rem; padding-bottom: .45rem; }
.card .dt-container > .row:first-child:not(.dt-layout-table) { padding: .75rem 2rem; row-gap: .5rem; }
.card .dt-container > .row:first-child:not(.dt-layout-table) > * { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .75rem; }
/* Top controls. "Show [10] entries" on one centred line; the search box shows an icon and a placeholder, and its
   label stays for screen readers only; the list's column picker joins the row (crm_list.js). */
.dt-container .dt-length label { display: inline-flex; align-items: center; gap: .5rem; margin: 0; white-space: nowrap; }
.dt-container .dt-length select { margin: 0; }
.dt-container .dt-search { position: relative; }
.dt-container .dt-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dt-container .dt-search input { width: 16rem; max-width: 100%; margin: 0 !important; padding-inline-start: 2rem; }
.dt-container .dt-search::before { content: "\eb1c"; font-family: "tabler-icons"; position: absolute; inset-inline-start: .625rem; top: 50%; transform: translateY(-50%); color: var(--tblr-secondary); pointer-events: none; }
.dt-container .pagination { gap: .2rem; }
.dt-container .pagination .page-link { min-width: 2rem; height: 2rem; padding: 0 .5rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: .375rem; background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color); font-weight: 500; }
.dt-container .pagination .page-link:hover { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); }
.dt-container .pagination .page-item.active .page-link { background: var(--tblr-primary); color: var(--tblr-primary-fg); }
.dt-container .pagination .page-item.disabled .page-link { background: transparent; color: var(--tblr-disabled-color); }
.dt-container .pagination .page-link .ti { font-size: 1rem; }
/* A collapsed section keeps its header; the fields below it are what folds away. Its own class,
   not [hidden], which the conditional-display rules already own. */
.section-collapsed { display: none !important; }
/* Statistics KPI value: one line, and a long one shrinks to its card instead of wrapping out of it.
   crm_statistics.js stamps --len (characters); .5em per character - measured .47-.48 on currency values. */
#stats_kpis .card-body { container-type: inline-size; }
#stats_kpis .h1 { white-space: nowrap; font-size: min(var(--tblr-font-size-h1), 100cqi / (var(--len, 1) * .5)); }

@media (max-width: 767.98px) {
    /* Type: 13px is the legacy theme's desktop size and reads as fine print on a phone held at
       arm's length. One step up across the board - the body var carries most of it (body copy,
       tables, nav links, form text), and the rules under it are the places that pin a size of
       their own. Inputs stay at 16px: below that iOS zooms the page on focus. */
    :root, [data-bs-theme] { --tblr-body-font-size: .9375rem; }     /* 15px */
    .btn { --tblr-btn-font-size: .9375rem; }
    #navbar-menu .nav-link { font-size: 1rem; }                     /* the menu itself, thumb-sized */
    .dropdown-item { font-size: .9375rem; }
    .card-title { font-size: 1.0625rem; }
    /* A section title sits one step above body copy, as it does on a desktop - at 14px against
       15px body it was reading as a caption. */
    .section-header h4 { font-size: 1rem; }
    .table thead th { font-size: .875rem; }
    /* Both classes: a detail-view label carries .form-label too, and would otherwise take the
       larger size below and flatten the label/value hierarchy. */
    .form-label.field-label { font-size: .8125rem; }
    .field-value { font-size: .9375rem; }
    .form-label { font-size: .9375rem; }
    .form-control, .form-select, .ts-control, .ql-editor { font-size: 1rem; }   /* the 16px above: Tabler's fields are 14px, and iOS zoomed into every one tapped */
    .dt-container .dt-info, .dt-container .dt-length label { font-size: .875rem; }

    /* Tap targets. A row action was 28px and a pager button 32px on a screen used with a thumb;
       40px is the smallest that reads as a button. */
    .crm-actions-cell .btn, .dt-container .btn-icon { min-width: 2.5rem; min-height: 2.5rem; }
    .dt-container .pagination .page-link { min-width: 2.5rem; height: 2.5rem; }
    /* The same floor for the other small buttons under a thumb: a delete's Undo (ui.toast), an open chat sheet's
       header actions, a field's Change / Clear / Save while editing (relation, image, signature). */
    #app_toasts [data-toast-action], .chat-dock-actions .btn-action, .edit-mode .field-group .btn-sm { min-width: 2.5rem; min-height: 2.5rem; }
    /* The record's name fills its cell, so the row itself is the target rather than the text. */
    .crm-list-table td a.fw-medium { display: block; padding-block: .375rem; }
    /* The chevron into the child rows is a thumb target, not a 16px glyph. */
    .crm-list-table td.crm-child-expand { min-width: 2.5rem; }
    /* Second line under the name: the columns the phone has no room for. */
    /* overflow-wrap: anywhere, not break-word: it also shrinks the min-content width, so a long
       customer name on the second line cannot widen the whole table inside a narrow card. */
    .crm-list-sub { font-size: .8125rem; color: var(--tblr-secondary); line-height: 1.4; overflow-wrap: anywhere; }
    .crm-list-sub .badge { font-size: .75rem; }

    /* A section that folds says so: the header becomes the control, with a chevron that turns. */
    .section-header.section-toggle { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
    .section-header.section-toggle::after { content: "\ea61"; font-family: "tabler-icons"; font-size: 1.25rem; color: var(--tblr-secondary); transition: transform .15s ease; }
    .section-header.section-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
    /* A record's sections fold, so each is a row of the list a phone scrolls: a thumb-high title in the body's case
       and colour, between hairlines; the brand stroke and the top margins are a desktop's. */
    .section-header.form-section { margin: 0; padding: .875rem 0; background: none; }
    .form-section h4 { text-transform: none; letter-spacing: 0; color: var(--tblr-body-color); }
    .form-section[aria-expanded="true"] + .row { padding-top: .75rem; }
    :is(#dynamicForm, .hub-record) .form-section + .row { margin-bottom: 0; }
    /* One line swiped sideways (2026-11-17), however many there are, with the app's slide bar (ui.slideBar) drawn
       in the strip's bottom padding (its negative top margin, the bottom one giving the room back). A fact is at most
       75% wide: a person's name with its avatar fits (45% cut it, 2026-11-17), a long account name is cut. */
    .record-highlights:not([hidden]) { display: flex; gap: 1.25rem; overflow-x: auto;
        padding: .625rem var(--tblr-card-cap-padding-x) 1rem; }
    .record-highlights + .app-slide-bar { position: relative; margin: calc(-.5rem - 4px) var(--tblr-card-cap-padding-x) .5rem; }
    .record-highlight { flex: 0 0 auto; max-width: 75%; }
    .record-highlight-label, .record-highlight-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .record-highlight-value .btn { white-space: nowrap; max-width: 100%; }   /* a relation's link: cut too, not wrapped */
    .record-highlight-value .btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

    /* The collapsed menu is the menu on a phone, and its items are nowrap by default: one long
       label (Utilities' pricing calculator) set the width of the whole dropdown, 425px on a
       390px screen. Let them wrap to the width that is there. */
    #navbar-menu .dropdown-menu { max-width: 100%; }
    #navbar-menu .dropdown-item { white-space: normal; }

    /* The form's Save/Cancel on a phone: full width, one per line, rather than long Greek labels crowding (and
       overflowing) the right edge. */
    .crm-form-actions { width: 100%; }
    .crm-form-actions .btn { flex: 1 1 100%; justify-content: center; margin: 0; padding-block: .6rem; }
    /* A row of actions (.crm-stacked-actions: a record's, a quotation's, an admin page's footer) stays one line at the
       end, as from a tablet up - they were full width, one per line (2026-11-17). Their labels sit in d-md-inline spans
       and a phone shows the icons (the front end's CLAUDE.md); a lone one keeps its words. Such a button is square, as
       a .btn-icon (unless it shows a count), its icon without the gap it kept for the words - anywhere (a filter bar's). */
    .crm-stacked-actions > .btn:only-child > .d-none.d-md-inline { display: inline !important; }
    .btn:has(> .d-none.d-md-inline):not(.crm-stacked-actions > :only-child) > .icon { margin: 0; }
    .btn:has(> .d-none.d-md-inline):not(.crm-stacked-actions > :only-child, :has(> .badge:not([hidden]))) {
        padding-inline: 0; min-width: calc(var(--tblr-btn-line-height) + var(--tblr-btn-padding-y) * 2 + var(--tblr-btn-border-width) * 2);   /* Tabler's .btn-icon */
    }
    /* Dashboards (CRM boards and the Hub's): a KPI was a full-width card of its own, 73px of
       chrome around one number - nine of them above the fold on the partnership board. Each
       section becomes a two-column grid on a phone where the KPI tiles pair up and everything
       else (charts, lists, the profile card) still spans the row, and the tiles themselves get
       the density the rest of the app has: smaller icon, tighter padding, one line of value. */
    /* The sections themselves are the rows of the board: zeroing the cards' own mb-3 below
       left them touching, so the spacing moves to the grid gap and a row-gap here. */
    #dashboard_row { row-gap: 1rem; }
    #dashboard_row > [class*="col-xl"] {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem; align-items: stretch;   /* the card rhythm everywhere else is mb-3 */
    }
    #dashboard_row > [class*="col-xl"] > * { grid-column: span 2; margin-bottom: 0 !important; }
    #dashboard_row > [class*="col-xl"] > .hub-tile.card-sm,
    #dashboard_row > [class*="col-xl"] > .hub-tile-link { grid-column: span 1; }
    #dashboard_row .hub-tile-link, #dashboard_row .hub-tile-link > .card { height: 100%; }
    #dashboard_row .hub-tile.card-sm .card-body { padding: .5rem .625rem !important; }
    #dashboard_row .hub-tile.card-sm .card-body > .row { flex-wrap: nowrap; --tblr-gutter-x: .5rem; }
    /* One scale for every tile on a board: the label is the 13px the list subline and the Hub's
       keyvalue rows use, the value one step above body, and both tile types share an icon size. */
    #dashboard_row .hub-icon .icon { width: 1.5rem; height: 1.5rem; font-size: 1.5rem; }
    #dashboard_row .hub-tile.card-sm .subheader { font-size: .8125rem; line-height: 1.3; }
    /* :not(.small) — the profile card's address line is a .hub-tile-value too, and it is
       secondary text, not a number. */
    #dashboard_row .hub-tile-value:not(.small) { font-size: 1.0625rem; }

    /* The Statistics tab's KPI cards: a card's full 2rem padding and an .h1 around one number,
       190px each and nineteen of them on an opportunities report. They read like the dashboard
       tiles now - tighter padding, the report number a step above them, the 13px label. */
    #stats_kpis .card-body { padding: .625rem .75rem; }
    #stats_kpis .h1 { font-size: min(1.25rem, 100cqi / (var(--len, 1) * .5)); margin-bottom: .125rem !important; }
    #stats_kpis .text-secondary { font-size: .8125rem; line-height: 1.3; }

    /* A dropdown (the quotation's Word export) puts a wrapper between the row and the button:
       the wrapper is the flex item, so it takes the stretch and hands it on. */
    .crm-form-actions > .dropdown { flex: 1 1 100%; }
    .crm-form-actions > .dropdown > .btn { width: 100%; }
    /* A record page runs to thousands of pixels, and the action that matters was pinned to one
       end of it: Edit at the top, Save at the bottom. Both stick to the edge they are already
       at, so neither scrolls away. The card is the scroll container's child, so plain sticky
       does it - no fixed bar, no layout shift, nothing to unstick on resize. */
    .tab-pane > :is(.crm-stacked-actions, .crm-rel-bar) {
        position: sticky; top: var(--app-header-h, 0px); z-index: 3;   /* under the pinned header (app.js), not behind it */
        background: var(--tblr-card-bg, var(--tblr-bg-surface));
        padding-block: .5rem; margin-top: -.5rem;
    }
    .card-footer.crm-sticky-actions {
        position: sticky; bottom: var(--app-bottom-bar-h, 0px); z-index: 3;   /* on the bottom bar (App shell, Phones) */
        background: var(--tblr-card-bg, var(--tblr-bg-surface));
        box-shadow: 0 -.25rem .5rem -.25rem rgba(0, 0, 0, .12);
        /* viewport-fit=cover lets the page run under the iPhone home indicator (and a wrapper app
           draws edge-to-edge), so keep the buttons above it - unless the bottom bar already is.
           env() is 0 everywhere else. */
        padding-bottom: max(var(--tblr-card-cap-padding-y, .75rem), env(safe-area-inset-bottom) - var(--app-bottom-bar-h, 0px));
    }
    /* A record's Save and Cancel (form.php $formActions) are two round buttons instead, where the round + button is -
       it steps aside, below. As a bar across the screen they took half of what a keyboard leaves of it, in front of
       the field being typed in (2026-11-15). One row, Save at the edge: under the chat dock's button, not on it. */
    .card-footer.crm-sticky-actions:has(.crm-form-actions) {
        position: fixed; z-index: 1030; right: calc(1.25rem + env(safe-area-inset-right));
        bottom: calc(1.25rem + max(var(--app-bottom-bar-h, 0px), env(safe-area-inset-bottom)));
        padding: 0; border: 0; background: none; box-shadow: none;
    }
    .crm-sticky-actions .crm-form-actions { width: auto; flex-wrap: nowrap; gap: .75rem; }
    .crm-sticky-actions .crm-form-actions .btn {
        flex: 0 0 auto; width: 3rem; height: 3rem; padding: 0; border-radius: 50%;
        box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .25);
    }
    .crm-sticky-actions .crm-form-actions .cancel-edit-btn { background: var(--tblr-bg-surface); border-color: var(--tblr-border-color); }
    .crm-sticky-actions .crm-form-actions .btn .icon { margin: 0; }
    .crm-sticky-actions .crm-form-actions .btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    /* The round button (footer.php: the + menu, or the lone .app-fab) sat on the right half of Save while a save bar
       is up - create pages, a record in edit mode (dynamic_form.js drops .d-none), admin settings. It steps aside
       until the bar goes; the bar is the one thing to tap then (2026-10-19). */
    body:has(.crm-sticky-actions:not(.d-none), .page-actions-sticky) :is([data-quick-menu], .app-fab) { display: none; }

    /* The exports too: a phone's tables show the name column only, and the file takes its columns from what is shown.
       The ticked rows' Actions stay (crm_list.js). */
    .crm-list-toolbar > :not(#bulk_actions), #stats_export_btn { display: none; }
    .crm-list-table td, .crm-list-table th { white-space: normal; }
    .card .dt-container > .row:first-child:not(.dt-layout-table), .card .dt-container > .row:last-child { padding-left: 1rem; padding-right: 1rem; }
    /* A row above the table, where one is kept (History's search, a child row's): one line, the search taking the rest. */
    .card .dt-container > .row:first-child:not(.dt-layout-table) { flex-wrap: nowrap; column-gap: .5rem; }
    .card .dt-container > .row:first-child:not(.dt-layout-table) > * { width: auto; }
    .card .dt-container > .row:first-child:not(.dt-layout-table) > :has(.dt-search) { flex: 1 1 0; min-width: 0; }
    .card .dt-container > .row:first-child:not(.dt-layout-table) .dt-search { flex: 1; }
    .card .dt-container > .row:first-child:not(.dt-layout-table) .dt-search input { width: 100%; }
    /* The footer is one line (2026-11-17): the length and the count at the start, the pager's previous and next at
       the end - the count already says which rows are shown. The length wears the pager's look. DataTables gives the
       cells .justify-content-between, which carries !important, so this has to as well. */
    .card .dt-container > .row:last-child { flex-wrap: nowrap; align-items: center; column-gap: .75rem; padding-block: .5rem; }
    .card .dt-container > .row:last-child > * { width: auto; gap: .75rem; justify-content: flex-start !important; }
    .card .dt-container > .row:last-child > .dt-layout-start { flex: 1 1 0; min-width: 0; }
    .card .dt-container > .row:last-child .dt-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dt-container .pagination .page-item:not(:has(> .previous, > .next)) { display: none; }
    .dt-container .dt-length select { height: 2.5rem; border: 0; background-color: var(--tblr-bg-surface-secondary); }
}

/* The offline bar (app.js): above everything, out of the way of the thumb on a phone - it sits
   under the content, not over the action row at the bottom. */
.app-offline-bar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 1080;
    display: flex; align-items: center; max-width: calc(100vw - 2rem);
    padding: .5rem .875rem; border-radius: 999px;
    background: var(--tblr-danger); color: #fff; font-size: .875rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
}

/* Leaving a page (2026-10-12; app.js leavingBar): a thin brand bar along the top of the screen while the next page
   loads - the top edge, not under the header, so a phone's open menu or an open dialog (Ctrl+K) never hides it.
   It waits .15s, so a quick page never shows it, then runs fast and slows towards 90%: it never says "done" before
   the new page does. Under "less motion" it stands still at its end (the reduced-motion block below). */
html.app-leaving body::after {
    content: ""; position: fixed; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 1100; height: 2px; pointer-events: none;
    background: var(--app-brand); transform-origin: 0 50%;
    animation: app-leaving 10s .15s cubic-bezier(.1, .7, .2, 1) both;
}
@keyframes app-leaving { from { transform: scaleX(0); } 10% { transform: scaleX(.4); } to { transform: scaleX(.9); } }

/* A Tom Select with a save error (dynamic_form.js showFieldErrors): the vendor CSS colours .ts-wrapper's border with
   --bs-form-invalid-color, which Tabler never defines, so it fell back to the text colour beside the red message
   (2026-10-19). The .field-container prefix outranks the vendor rule wherever it loads. */
.field-container .ts-wrapper.is-invalid { border-color: var(--tblr-form-invalid-color, var(--tblr-danger)); }

/* ---- Buttons (2026-09-19): ghost buttons get a resting tint so actions are visible before hover;
   hover keeps Tabler's stronger fill. ---- */
.btn-ghost-primary   { background: rgba(var(--tblr-primary-rgb), .1);  border-color: rgba(var(--tblr-primary-rgb), .15); }
.btn-ghost-secondary { background: var(--tblr-bg-surface-secondary);   border-color: var(--tblr-border-color-translucent); color: var(--tblr-body-color); }
.btn-ghost-danger    { background: rgba(var(--tblr-danger-rgb), .1);   border-color: rgba(var(--tblr-danger-rgb), .15); }
.btn-ghost-success   { background: rgba(var(--tblr-success-rgb), .1);  border-color: rgba(var(--tblr-success-rgb), .15); }
.btn-ghost-warning   { background: rgba(var(--tblr-warning-rgb), .12); border-color: rgba(var(--tblr-warning-rgb), .18); }
/* Page header buttons (2026-10-12): a white button's edge almost vanishes on the grey page (a #e5e7eb hairline on
   #f3f6f8), so beside a filled one of the same 40px it looks smaller. A firmer border for the plain ones only: the
   coloured, outline and ghost buttons set their own border colour and do not read this one. */
.page-header .btn { --tblr-border-color: light-dark(#c4cbd5, #4b5563); }
/* Phones and small tablets, every page: the title keeps most of the row, and actions that need more than what is
   left go under it (a page of the KB with its five buttons), instead of squeezing the title into a column of words. */
@media (max-width: 767.98px) { .page-header .row > .col { min-width: 60%; } }
/* A button whose text is an .app-btn-label (the KB's and Boards' page headers, the KB Trash's Restore): only its icon on
   a phone, the size of a .btn-icon (Tabler's rules), so the actions fit beside a title or a name; the text stays for
   screen readers. */
@media (max-width: 575.98px) {
    .app-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .btn:has(> .app-btn-label) { min-width: calc(var(--tblr-btn-line-height) + var(--tblr-btn-padding-y) * 2 + var(--tblr-btn-border-width) * 2); padding-inline: 0; }
    .btn:has(> .app-btn-label) .icon { margin: calc(-1 * var(--tblr-btn-padding-x)); }
}
.btn-ghost-info      { background: rgba(var(--tblr-info-rgb), .1);     border-color: rgba(var(--tblr-info-rgb), .15); }
.btn-ghost-secondary:hover { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); border-color: rgba(var(--tblr-primary-rgb), .3); }
.btn-ghost-secondary.text-danger:hover, .btn-ghost-danger:hover { background: var(--tblr-danger); color: #fff; }
.crm-actions-cell .btn, .note-actions .btn { margin-left: .2rem; }
.btn-primary { box-shadow: 0 1px 2px rgba(var(--tblr-primary-rgb), .35); }
.navbar .hdr-search { background: rgba(255, 255, 255, .06); }

/* Quotation header: four buttons wrap to two rows, and Tabler's negative card-actions margin-block then presses the top row onto the card border. */
@media (min-width: 768px) { #base_card > .card-header .card-actions { margin-block: 0; } }

/* ---- Quotation form on phones (2026-09-19): breathing room between sections, full-width button grids. ---- */
@media (max-width: 767.98px) {
    #basic_container .quote-section { margin-top: 2rem; }
    #basic_container .quote-actions, #basic_container .quote-add-buttons { width: 100%; display: flex; flex-wrap: wrap; gap: .5rem; }
    #basic_container .quote-add-buttons .btn { flex: 1 1 calc(50% - .5rem); justify-content: center; margin: 0; }
    #basic_container .quote-actions .btn { flex: 1 1 100%; justify-content: center; margin: 0; white-space: normal; }
    #basic_container .quote-actions .btn { padding-top: .7rem; padding-bottom: .7rem; }
    #basic_container .datagrid { gap: 1rem; }
}
/* Card header actions on phones: drop below the title, full width, stacked buttons (bundle/quotation/detail headers). */
@media (max-width: 767.98px) {
    .card-header { flex-wrap: wrap; }
    .card-header .card-actions { margin-left: 0; margin-inline-start: 0; width: 100%; margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .5rem; }
    .card-header .card-actions .btn { flex: 1 1 100%; justify-content: center; margin: 0; }
    .card-header .card-actions .btn.btn-link { flex-basis: auto; }
    /* The actions may be wrapped (the detail header toggles them, and they come as one btn-list):
       the wrapper has to span the row too, or the buttons inside it stay content-width. */
    .card-header .card-actions .crm-form-actions,
    .card-header .card-actions .action-buttons-container { flex: 1 1 100%; width: 100%; }
    /* Create/edit pages: the sticky card footer (.crm-sticky-actions) carries the same Save/Cancel
       and never leaves the screen here, so the header copy is just a second set above the fold. */
    .card-header .card-actions:has(.crm-form-actions) { display: none; }
}
/* Modals on phones (2026-10-06, app-wide - CRM, Hub and admin): footer buttons stack full width like
   .crm-form-actions. Dialogs stay floating - Bootstrap's .5rem margin already makes them near full screen. */
@media (max-width: 767.98px) {
    .modal-footer > .btn { flex: 1 1 100%; justify-content: center; margin: .25rem 0; }
    /* Page-header actions opted into a phone save bar (email template editor): the header can't hold a
       sticky child, so the same buttons go fixed to the bottom - no second copy, the page JS binds by id.
       The page body gets the bar's height back so the last content isn't hidden under it.
       z-index 99: just under GrapesJS' own modals (.gjs-mdl-container, 100 - asset manager, code/import). */
    .page-actions-sticky {
        position: fixed; left: 0; right: 0; bottom: var(--app-bottom-bar-h, 0px); z-index: 99; margin: 0;   /* on the bottom bar */
        padding: .75rem var(--tblr-page-padding, 1rem) max(.75rem, env(safe-area-inset-bottom) - var(--app-bottom-bar-h, 0px));
        background: var(--tblr-bg-surface); box-shadow: 0 -.25rem .5rem -.25rem rgba(0, 0, 0, .12);
    }
    .page-actions-sticky .btn { flex: 1 1 100%; justify-content: center; margin: 0; }
    body:has(.page-actions-sticky) .page-body { padding-bottom: 7.5rem; }
}

/* ---- Create/edit pages (2026-09-20): actions in the card header and in a card footer; the inline
   form buttons are hidden on the full page (they still serve the create-related modal). ---- */

/* Relation field: selected-record block lays out via its own class (no d-flex utility, so `hidden` works).
   The change button keeps its width; the record link takes the rest and wraps (rule below). */
.relation-display-container { display: flex; align-items: flex-start; gap: .5rem; }
.relation-clear-btn { flex: 0 0 auto; }
/* Tabler buttons are nowrap. A link styled as a button carries a record name (relation pills in view
   and edit mode, the quotation header, whatever comes next), and every one of them overflowed until
   it got its own rule (r2262, r2318, contracts). One rule instead: a link that looks like a button
   wraps inside its box; real buttons (actions) stay nowrap. */
a.btn { white-space: normal; text-align: start; max-width: 100%; overflow-wrap: anywhere; }

/* Quotation form sections (desktop rhythm; the phone block above adds more). */
#basic_container .quote-section { margin-top: 1.5rem; }
#basic_container .quote-section:first-child { margin-top: 0; }
.quote-pane .quill-editor { min-height: 6rem; }   /* a custom line's long description: a few lines, not a record field's 200px */
#basic_container .quote-toolbar { padding-top: 1.5rem; margin-bottom: 1rem; }
#quote_totals { padding: 1.25rem; }
.quote-footer { display: flex; justify-content: flex-end; }

/* CRM form actions (dynamic_form): the same block at the top and the bottom of the card, in
   create as in edit. Inside the toggled .action-buttons-container it has to fill the row, or its
   own justify-content-end has nothing to push against and the buttons sit left. */
.crm-form-actions { flex: 1 1 auto; }
/* A `form-select w-auto` in a flex row (automation match/action selects) is a flex item, whose min-width:auto
   holds it at its longest option - on a phone it ran out of its box. Let it shrink; the text truncates. */
.form-select { min-width: 0; }

/* Cards (2026-09-20): one content gutter everywhere = the card spacer (2rem). Flush lists and tables
   inside `card-body p-0` align their items to it instead of Tabler's 1.25rem defaults. */
.card > .card-body.p-0 .list-group-flush > .list-group-item { padding-left: var(--tblr-card-spacer-x); padding-right: var(--tblr-card-spacer-x); }
.card > .card-body.p-0 > .dt-container table.dataTable > tbody > tr > td { padding-top: .75rem; padding-bottom: .75rem; }
.card > .card-body.p-0 > .dt-container table.dataTable > tbody > tr > td:first-child, .card > .card-body.p-0 > .dt-container table.dataTable > tbody > tr > td.dtr-control { padding-left: var(--tblr-card-spacer-x); }
.card > .card-body.p-0 > .dt-container table.dataTable > tbody > tr > td:last-child { padding-right: var(--tblr-card-spacer-x); }

/* ---- Pulse ring for icons (2026-09-21): <span class="pulse pulse-success"><i class="ti ..."></i></span> ---- */
.pulse { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.pulse::before {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 3px solid var(--pulse-color, var(--tblr-primary));
    opacity: 0; animation: pulse-ring 2.4s ease-out infinite;
}
.pulse-success { --pulse-color: var(--tblr-success); }
.pulse-warning { --pulse-color: var(--tblr-warning); }
.pulse-danger  { --pulse-color: var(--tblr-danger); }
.pulse-once::before { animation-iteration-count: 2; }
@keyframes pulse-ring {
    0%   { transform: scale(.4); opacity: .9; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ---- Date pickers (Litepicker, core/dates.js) in the app's card look: one bordered surface with the
   footer inside it (Litepicker drew a grey inset strip below the calendar), a light primary range,
   rounded days, app-style buttons, "Today" and "Clear". Litepicker injects its <style> first in
   <head>, so these rules win at equal specificity. ---- */
.litepicker {
    --litepicker-day-width: 36px;
    --litepicker-is-in-range-color: rgba(var(--tblr-primary-rgb), .12);
    --litepicker-is-start-color: var(--tblr-primary-fg);
    --litepicker-is-end-color: var(--tblr-primary-fg);
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius-lg);
    box-shadow: var(--tblr-box-shadow-dropdown);
    overflow: hidden;
}
.litepicker .container__main { border: 0; border-radius: 0; }
.litepicker .container__months { background: var(--tblr-bg-surface); border-radius: 0; padding: .25rem .5rem; }
.litepicker .container__months .month-item-header { padding: .625rem .25rem; }
.litepicker .container__months .month-item-header select { border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface); color: var(--tblr-body-color); font: inherit; font-weight: var(--tblr-font-weight-medium); padding: .125rem .375rem; cursor: pointer; }
@media (max-width: 767.98px) { .litepicker .container__months .month-item-header select { font-size: 1rem; } }   /* 16px: iOS zooms the page into a smaller select */
.litepicker .container__months .month-item-header .ti { font-size: 1.125rem; vertical-align: middle; }
.litepicker .container__months .month-item-header > div { white-space: nowrap; }
.litepicker .container__days .day-item { border-radius: var(--tblr-border-radius); transition: background-color .15s, color .15s; }
.litepicker .container__days .day-item:hover { box-shadow: none; background: rgba(var(--tblr-primary-rgb), .08); color: var(--tblr-primary); }
.litepicker .container__days .day-item.is-in-range { --litepicker-day-color: var(--tblr-body-color); }
.litepicker .container__days .day-item.is-today { font-weight: 700; }
.litepicker .container__footer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: .625rem .75rem; background: var(--tblr-bg-surface); box-shadow: none; border-top: 1px solid var(--tblr-border-color); text-align: left; container-type: inline-size; }
.litepicker .container__footer .footer-tools,
.litepicker .container__footer .footer-actions { display: flex; gap: .5rem; }
.litepicker .container__footer .footer-actions { margin-left: auto; }
.litepicker .container__footer .preview-date-range { flex: 1 1 0; min-width: 0; margin: 0; color: var(--tblr-secondary); font-size: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 26rem) {   /* one-month picker (phones): the range on its own line, tighter buttons */
    .litepicker .container__footer .preview-date-range { flex-basis: 100%; order: -1; }
    .litepicker .container__footer .footer-tools button,
    .litepicker .container__footer .footer-actions button { padding-left: .5rem; padding-right: .5rem; }
}
.litepicker .container__footer .button-today,
.litepicker .container__footer .button-clear,
.litepicker .container__footer .button-cancel,
.litepicker .container__footer .button-apply { margin-right: 0; padding: .375rem .75rem; border: 0; border-radius: var(--tblr-border-radius); font: inherit; font-weight: var(--tblr-font-weight-medium); line-height: 1.25; cursor: pointer; transition: background-color .15s, color .15s; }
.litepicker .container__footer .button-today { margin-left: 0; color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .08); }
.litepicker .container__footer .button-today:hover { background: rgba(var(--tblr-primary-rgb), .16); }
.litepicker .container__footer .button-clear { color: var(--tblr-secondary); background: transparent; }
.litepicker .container__footer .button-clear:hover { color: var(--tblr-danger); background: rgba(var(--tblr-danger-rgb), .08); }
.litepicker .container__footer .button-cancel { color: var(--tblr-secondary); background: var(--tblr-bg-surface-secondary); }
.litepicker .container__footer .button-cancel:hover { color: var(--tblr-body-color); }
.litepicker .container__footer .button-apply { margin-left: 0; color: var(--tblr-primary-fg); background: var(--tblr-primary); }
.litepicker .container__footer .button-apply:hover { background: color-mix(in srgb, var(--tblr-primary) 85%, #000); }

/* ---- Skeleton loaders (2026-09-22): grey shimmering bars while data loads instead of a spinner over the
   card (core/table.js skeleton rows, dashboard tiles, statistics KPIs). ---- */
.skeleton { display: inline-block; vertical-align: middle; width: 100%; height: .75rem; border-radius: var(--tblr-border-radius); background: linear-gradient(90deg, var(--tblr-bg-surface-secondary) 25%, var(--tblr-border-color) 50%, var(--tblr-bg-surface-secondary) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; }
.skeleton-lg { height: 1.5rem; }
.skeleton-block { display: block; height: 10rem; }
@keyframes skeleton-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---- Pinned header (2026-09-22; navbar.php .app-header-top / .app-header-menu, app.js pinnedHeader): both rows
   stay on top; once the page scrolls they turn slightly see-through with a blur (at rest they keep their solid
   colours) and the top row condenses. They are sticky one by one because they
   must stay direct children of .page (Tabler's dark navbar theme is keyed on .page > .navbar). ---- */
.app-header-top, .app-header-menu { position: sticky; z-index: 1020; }
.app-header-top { top: 0; transition: padding .2s ease, box-shadow .2s ease; }
.app-header-top .navbar-brand-image { transition: height .2s ease; }
.app-header-menu { top: var(--app-header-top-h, 0px); z-index: 1019; }
.app-header-menu .navbar { transition: box-shadow .2s ease; }
.header-condensed .app-header-top, .header-condensed .app-header-menu .navbar { backdrop-filter: saturate(160%) blur(10px); }
html[data-bs-navbar-theme="dark"].header-condensed header.app-header-top { --tblr-navbar-bg: rgba(var(--app-header-bg-rgb), .92); }   /* both on <html> */
.header-condensed .app-header-menu .navbar { background-color: color-mix(in srgb, var(--tblr-bg-surface) 88%, transparent); }
@media (min-width: 768px) { .header-condensed .app-header-menu .navbar { box-shadow: 0 4px 16px rgba(16, 24, 40, .08); } }
/* Compact rows from a tablet up (2026-11-06): the two rows took 152px. First only for windows under 900px tall
   (2026-10-27), now on every screen; the top row no longer shrinks on scroll, it starts at that size. */
@media (min-width: 768px) {
    .app-header-top .navbar-brand { padding-block: 0; }   /* Tabler's 8px above and below the logo */
    .app-header-menu :is(.navbar, .navbar-nav) { min-height: 0; }   /* Tabler holds the list at 48px */
    .app-header-menu .navbar { --tblr-navbar-padding-y: .125rem; }
    .app-header-menu .navbar-nav > .nav-item > .nav-link { min-height: 2rem; padding-block: .25rem; }   /* Tabler's 40px links */
}
@media (max-width: 767.98px) {
    .header-condensed .app-header-top { --tblr-navbar-padding-y: .4rem; box-shadow: 0 4px 16px rgba(16, 24, 40, .12); }
    .header-condensed .app-header-top .navbar-brand-image { height: 2.25rem; }
}

/* ---- Surfaces (2026-09-22): rounder cards on a softly tinted page, lifted by a shadow instead of a border
   in the light theme (dark keeps its borders, a shadow barely shows there); nested cards stay flat. ---- */
.card { --tblr-card-border-radius: .75rem; --tblr-card-inner-border-radius: calc(.75rem - 1px); }
:root { --app-page-bg: var(--tblr-body-bg); }
:root:not([data-bs-theme="dark"]) { --app-page-bg: #f3f6f8; }   /* also for what must match the page, like a sticky band */
:root:not([data-bs-theme="dark"]) body { background-color: var(--app-page-bg); }
:root:not([data-bs-theme="dark"]) .card { --tblr-card-border-color: transparent; --tblr-card-box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06); }
:root:not([data-bs-theme="dark"]) .card .card { --tblr-card-border-color: var(--tblr-border-color); --tblr-card-box-shadow: none; }

/* ---- Keyboard focus (2026-09-22): one visible ring in the primary colour on anything reached with Tab;
   mouse clicks don't show it (:focus-visible). Form fields keep Tabler's focus glow. ---- */
a:focus-visible, button:focus-visible, .btn:focus-visible, .nav-link:focus-visible, .dropdown-item:focus-visible,
.page-link:focus-visible, [role="button"]:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--tblr-primary); outline-offset: 2px; box-shadow: none;
}

/* ---- Accessibility (2026-09-22) ---- */
/* Skip link (top.php): Tabler's .skip-link, hidden until reached with Tab (visually-hidden-focusable). */
#main-content:focus { outline: 0; }   /* the skip link moves focus here; no ring round the whole page */
/* People who ask the system for less motion: no animations or transitions (skeleton shimmer, pulse, header, menus). */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- Chat (2026-10-05; views/chat/index.php, Tabler's chat page): the card fills the screen under the header and
   each pane scrolls on its own. Phones show one pane at a time: the list, or the open thread (chat.js .chat-open). ---- */
.chat-app { height: calc(100dvh - var(--app-header-top-h, 4rem) - 14.5rem); min-height: 22rem; }   /* the window, without scrolling: 13rem left the page 24px taller */
.chat-app > .row, .chat-app .scrollable { min-height: 0; }   /* flex children: shrink to the card and scroll, not grow past it */
:is(.chat-app, .chat-dock) .chat-bubble-body p { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Only people you have talked to, and the one open now (picked from the people picker); unread ones in bold. */
.chat-list [data-conv="0"]:not(.active) { display: none; }
.chat-list [data-unread]:not([data-unread="0"]) :is(.chat-name, .chat-preview) { font-weight: var(--tblr-font-weight-bold); color: var(--tblr-body-color); }
:is(.chat-app, .chat-dock) .chat-input { resize: none; height: calc(1.25rem + 1.125rem + var(--tblr-border-width) * 2); max-height: 8rem; overflow-y: hidden; }   /* one line (Tabler's own sum; Chrome gave rows=1 two beside the send button), growing as typed (chat_dock.js) */
body:has(.chat-app) .app-fab { display: none; }   /* the floating button (footer.php) would sit on the composer; the page has its own picker */
@media (max-width: 767.98px) {
    .chat-app { height: calc(100dvh - var(--app-header-top-h, 4rem) - var(--app-bottom-bar-h, 0px) - 9rem); }
    .chat-app:not(.chat-open) .chat-thread, .chat-app.chat-open .chat-list { display: none !important; }
}

/* ---- Chat dock (include/tabler/chat_dock.php, chat_dock.js): message windows along the bottom edge, left of the
   floating button, the newest on the right - three on a wide screen, two on a laptop, one on a phone (chat_dock.js
   max()). LinkedIn-style, a window minimises to its header bar (the name or the chevron). Cards as elsewhere in the
   app (rounded, lifted by a shadow, no border in the light theme) with the brand line on top; Tabler's chat bubbles,
   made compact for a narrow window. ---- */
.chat-dock { position: fixed; right: 4.75rem; bottom: 0; z-index: 1018;   /* under the header bars (1020, 1019), so their menus open over a window */ display: flex; flex-direction: row-reverse; align-items: flex-end; gap: .75rem; pointer-events: none; }
.chat-dock-win { --tblr-card-spacer-x: .75rem;   /* the narrow window's content gutter: lists line up with the search box (app rule above) */
    width: 21rem; height: 28rem; max-height: calc(100dvh - var(--app-header-h, 6rem) - .5rem);   /* under the pinned header, which sits over the dock (z-index) */ margin: 0; pointer-events: auto; overflow: hidden;
    --app-card-edge: 2px; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    box-shadow: 0 -1px 4px rgba(16, 24, 40, .04), 0 8px 32px rgba(16, 24, 40, .18); }
[data-bs-theme="dark"] .chat-dock-win { box-shadow: 0 8px 32px rgba(0, 0, 0, .5); }   /* the menus' deep shadow (above); no ring - the card has its own border and brand line, a ring doubled them. A phone's sticker sets its own, below */
.chat-dock-win.collapsed { height: auto; }
.chat-dock-win.collapsed > :not(.chat-dock-head) { display: none; }
/* Header: avatar + name (the toggle) and Tabler's quiet card actions, on the header bar's navy so a window stands out
   from the page as part of the app's own chrome; tinted towards the brand while it holds unread messages. */
.chat-dock-head { gap: .25rem; min-height: 3.25rem; padding: .5rem .5rem .5rem .75rem; background: var(--app-header-bg); }   /* the header bar's colour; data-bs-theme="dark" on it (chat_dock.php) turns Tabler's text, actions and avatars light */
.chat-dock-win:not([data-unread="0"]):not(.chat-dock-new) .chat-dock-head { background: color-mix(in srgb, var(--app-brand) 35%, var(--app-header-bg)); }
.chat-dock-toggle { display: flex; align-items: center; gap: .5rem; flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none;
    color: var(--tblr-body-color); font-weight: var(--tblr-font-weight-medium); text-align: start; }
.chat-dock-toggle .chat-unread { margin-inline-start: auto; }
.chat-dock-actions { display: flex; flex-shrink: 0; }
.chat-dock-actions .btn-action { --tblr-btn-padding-y: .25rem; }   /* 32px squares */
.chat-dock-search { padding: .5rem .75rem; border-bottom: var(--tblr-border-width) solid var(--tblr-border-color); }
.chat-dock-body { flex: 1 1 auto; min-height: 0; }
.chat-dock-win:not(.chat-dock-new) .chat-dock-body { padding: .75rem; }
.chat-dock-new .list-group-item { padding-block: .5rem; }
/* Compact bubbles, on the chat page and in the dock: no author line (1:1 - the header says who; group chats will
   want it back) and no own avatar; each bubble as wide as its text, the time small under it. */
:is(.chat-app, .chat-dock) .chat { --tblr-chat-bubbles-gap: .5rem; --tblr-chat-bubble-padding: .5rem .75rem; --tblr-chat-bubble-title-margin-bottom: 0; }
:is(.chat-app, .chat-dock) .chat-bubbles .row { --tblr-gutter-x: .5rem; }
:is(.chat-app, .chat-dock) .chat-bubbles .col-lg-6 { flex: 0 1 auto; width: auto; max-width: min(85%, 36rem); }
:is(.chat-app, .chat-dock) .chat-bubble { display: flex; flex-direction: column-reverse; }
:is(.chat-app, .chat-dock) .chat-bubble-title .row { justify-content: flex-end; }
:is(.chat-app, .chat-dock) .chat-bubbles .justify-content-end > .col-auto { display: none; }   /* own avatar (decorative); the author line is visually-hidden, still read */
:is(.chat-app, .chat-dock) .chat-bubble-date { font-size: .6875rem; }
:is(.chat-app, .chat-dock) .chat-bubbles .avatar { --tblr-avatar-size: 1.75rem; font-size: .625rem; }
/* Composer: the send button's cell no taller than the one-line box, the button at the bottom as the box grows. */
:is(.chat-app, .chat-dock) .chat-input + .input-group-text { padding-block: .25rem; align-items: flex-end; }
:is(.chat-app, .chat-dock) .chat-input + .input-group-text .btn { --tblr-btn-padding-y: .25rem; }   /* 32px: the cell takes the box's height, never its own, so the bottom borders meet */
.chat-dock-form { padding: .5rem .75rem; }
/* The emoji menu (chat_dock.js): eight to a row, each a square the size of a finger tip. */
.chat-emoji-menu.show { display: grid; grid-template-columns: repeat(8, 2.25rem); min-width: 0; padding: .25rem; }
.chat-emoji-menu .dropdown-item {   /* min-width: Tabler's 11rem item */
    display: flex; align-items: center; justify-content: center; width: 2.25rem; min-width: 0; height: 2.25rem;
    padding: 0; border-radius: var(--tblr-border-radius); font-size: 1.25rem; line-height: 1;
}
@media (max-width: 767.98px) {
    /* Phones: chat heads. A minimised conversation is a round sticker - the person's avatar, the unread count on its
       corner, a brand ring while it has unread messages - stacked on the right edge above the floating button, the
       newest at the bottom. A new message arrives as a sticker (chat_dock.js), so nothing covers the page uninvited.
       Tapping one opens it as a sheet from under the header to the bottom edge; one sheet at a time. */
    .chat-dock { left: auto; right: 1rem; bottom: calc(4.5rem + max(var(--app-bottom-bar-h, 0px), env(safe-area-inset-bottom))); flex-direction: column-reverse; align-items: flex-end; gap: .625rem; }
    .chat-dock { z-index: 1029; }   /* stickers: under the round button (1030) and the bottom bar (1031), so their menus open over them */
    .chat-dock:has(> .chat-dock-win:not(.collapsed)) { z-index: 1035; }   /* an open sheet covers the bottom bar */
    .chat-dock-win:not(.collapsed) { position: fixed; inset: auto 0 0 0; width: auto; height: calc(100dvh - var(--app-header-top-h, 4rem) - .5rem);
        max-height: none; padding-bottom: env(safe-area-inset-bottom); }
    .chat-dock-win.collapsed { --app-card-edge: 0px; width: 3rem; height: 3rem; overflow: visible; border: 0; border-radius: 50%;   /* a sticker: no brand line on top */
        box-shadow: 0 0 0 2px var(--tblr-bg-surface), 0 4px 14px rgba(16, 24, 40, .28); transition: transform .15s ease; }
    .chat-dock-win.collapsed:not([data-unread="0"]):not(.chat-dock-new) { box-shadow: 0 0 0 2px var(--app-brand), 0 4px 14px rgba(16, 24, 40, .28); }
    .chat-dock-win.collapsed:active { transform: scale(.94); }
    .chat-dock-win.collapsed .chat-dock-head { height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 50%; }
    .chat-dock-win.collapsed .chat-dock-actions { display: none; }
    .chat-dock-win.collapsed .chat-dock-toggle > .text-truncate { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* the name: off screen, still the sticker's label */
    .chat-dock-win.collapsed .chat-dock-toggle { position: relative; justify-content: center; width: 100%; height: 100%; }
    .chat-dock-win.collapsed .chat-dock-toggle .avatar { --tblr-avatar-size: 3rem; font-size: .9375rem; color: #fff !important; }   /* navy like the headers: white initials (Tabler's bg-*-lt colours are !important) */
    .chat-dock-win.collapsed .chat-unread { position: absolute; top: -.25rem; right: -.25rem; margin: 0; }
    /* With one open, the other stickers line up in a row above it - a switcher, as in Messenger - and the sheet
       starts below them. */
    .chat-dock:has(> .chat-dock-win:not(.collapsed)) { inset: calc(var(--app-header-top-h, 4rem) + .5rem) .75rem auto .75rem; flex-direction: row-reverse; align-items: center; }
    .chat-dock:has(> .chat-dock-win:not(.collapsed)) .chat-dock-win.collapsed { width: 2.5rem; height: 2.5rem; }
    .chat-dock:has(> .chat-dock-win:not(.collapsed)) .chat-dock-win.collapsed .avatar { --tblr-avatar-size: 2.5rem; font-size: .8125rem; }
    .chat-dock:has(> .chat-dock-win.collapsed) > .chat-dock-win:not(.collapsed) { height: calc(100dvh - var(--app-header-top-h, 4rem) - 3.5rem); }
    /* ...over a dimmed page; tapping it puts the conversation back to a sticker (chat_dock.js). */
    .chat-dock:has(> .chat-dock-win:not(.collapsed))::before { content: ""; position: fixed; inset: var(--app-header-top-h, 4rem) 0 0; pointer-events: auto; background: rgba(16, 24, 40, .3); backdrop-filter: blur(2px); }
    body:has(.chat-dock-win:not(.collapsed)) .app-fab { display: none; }
}

/* ---- Sidebar and home, shared (2026-10-12): the CRM's (views/crm/_side.php, crm/home.php), in the look the KB and
   Boards have (kb.css .kb-side* / .kb-card-head / .kb-col-card, boards.css .bside* / .bhome*: the same values, under
   their own names there for now). include/tabler/top.php opens .app-shell for a page that declares $app_side and puts
   the sidebar's two buttons in the page header; app.js sideFold() folds the column. ---- */
@media (min-width: 992px) {
    /* Folding slides (2026-10-29), as the list's filter drawer does: the column narrows to 0 rather than going (a
       change of track count or display: none can't animate). The menu keeps its width and is clipped meanwhile, so
       its labels don't wrap; hidden once shut, so it leaves the tab order as before. */
    .app-shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 2rem; align-items: start;
                 transition: grid-template-columns .3s ease-in-out, column-gap .3s ease-in-out; }
    .app-shell.is-folded { grid-template-columns: 0 minmax(0, 1fr); column-gap: 0; }
    .app-shell.is-folded > .app-side { visibility: hidden; transition: visibility 0s .3s; }
    .app-side { position: sticky; top: calc(var(--app-header-h, 0px) + 1rem); max-height: calc(100vh - var(--app-header-h, 0px) - 2rem);
                overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
    /* The column clips, the body scrolls: its scrollbar then comes out of the body's own width, not off the menu's right edge. */
    .app-side > .offcanvas-body { width: 15.5rem; min-height: 0; overflow-y: auto; }
    .app-side .offcanvas-body { display: block; padding: 0; }   /* Bootstrap's flex row sized the nav to its longest label */
    /* Firefox (Windows 11, by default) draws an overlay scrollbar, which takes no width: the active entry's background ran
       under it (2026-11-13). A lane for it, Firefox only - Chrome's scrollbar already comes out of the body's width. */
    @supports (-moz-appearance: none) { .app-side > .offcanvas-body { padding-right: .625rem; } }
}
@media print { .app-shell { display: block; } }   /* the sidebar is d-print-none: the page takes the sheet */
.app-shell-main { min-width: 0; }

/* ---- Board layout (2026-10-26), after Monday's: body.layout-board (crm/list.php, boards/view.php), from lg up. The
   page is the window's height and does not scroll: the header, the page title and the sidebar stay put, and one pane -
   the list's table here, a board's .bscroll in boards.css - scrolls both ways. Its column headings stick to its top and
   both its scrollbars sit on the window's edges, so core/table.js's stand-in bar is not needed. Every box between the
   page and the pane passes the height down (flex: 1 with min-height: 0 - without it a box grows with its content).
   Below lg the page scrolls as every other - and below 650px of height too, where the bands above the pane would leave
   fewer than ~9 rows. It was 800px while those bands took 417px (2-5 rows on a laptop); "Short windows" and "Compact
   bands" cut them to ~290 (2026-10-27). Keep boards.css's query the same. ---- */
@media (min-width: 992px) and (min-height: 650px) {
    .layout-board .page { height: 100dvh; }
    .layout-board .footer { display: none; }
    .layout-board :is(.page-wrapper, main, .page-body) { min-height: 0; }
    .layout-board .page-body { margin-block: .75rem 1rem; }
    .layout-board .page-body > [class*="container"], .layout-board .app-shell-main,
    .layout-board :is(#crm_list_content, #crm_card, #crm_card > .card-body, #crm_card > .card-body > .tab-content) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .layout-board .app-shell { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
    .layout-board .app-shell-main { align-self: stretch; }
    /* The sidebar's own cap (100vh less the header) counted from the header, not from under the page title where it
       starts here, so it ran past the window and the whole page scrolled, the card riding up off an empty strip
       (2026-10-27). Its grid row is the room it has; it scrolls inside that. */
    .layout-board .app-side { max-height: 100%; }
    /* The list. A tab taller than the room scrolls on its own (Statistics; the list with the filter fields open); the
       table takes what the filters leave, never less than a few rows. */
    .layout-board #crm_card .tab-content > .active { flex: 1; min-height: 0; overflow: auto; }
    .layout-board :is(#list_panel, #recent_panel, .crm-extra-panel).active { display: flex; flex-direction: column; }   /* Recent and a tab of its own (drafts) are tables too */
    .layout-board :is(#list_panel, #recent_panel, .crm-extra-panel) .dt-container { flex: 1 1 0; min-height: 14rem; display: flex; flex-direction: column; }
    .layout-board :is(#list_panel, #recent_panel, .crm-extra-panel) .dt-layout-table { flex: 1; min-height: 0; display: block; }
    /* The pane scrolls both ways here: the slide bar's band under the table, as everywhere, and its down bar over the
       pane's right edge (core/table.js). */
    .layout-board :is(#list_panel, #recent_panel, .crm-extra-panel) .dt-layout-table > div { height: 100%; overflow: auto; }
    .layout-board :is(#list_panel, #recent_panel, .crm-extra-panel) table.dataTable > thead > tr > th { position: sticky; top: 0; z-index: 2; }
    .layout-board #list_panel table.dataTable > thead > tr > th.crm-pin { z-index: 3; }
    /* Statistics scrolls as a whole (filters, KPIs or a chart above its table), so its table's pager sticks to the
       card's foot instead: the same place as the list's. */
    .layout-board #statistics_panel { padding-bottom: 0; }
    .layout-board #statistics_panel .dt-container > .row:last-child { position: sticky; bottom: 0; z-index: 4; background: var(--tblr-bg-surface); }
}

/* ---- Compact bands (2026-10-27): what stands above the rows of a list or a board, from lg up at any height. On a
   1536x730 laptop window 417px came before a list's first row (Monday's: ~180) and 596px before a board's: 8 rows, and
   3. The list's tabs, filter bar and pager
   lose padding the rest of the app keeps (a board's own bands: boards.css). ---- */
@media (min-width: 992px) {
    .layout-board #crm_card .card-header-tabs .nav-link { padding-block: .625rem; }
    #crm_filters_block { padding-block: .5rem; }
    .crm-filter-bar :is(.form-control, .form-select) { padding-block: .375rem; }
    :is(#list_panel, #recent_panel, .crm-extra-panel, #statistics_panel) .dt-container > .row:last-child { padding: .375rem 1.25rem; }   /* every table of the list page */
}

/* ---- Grid tables (2026-10-26, Monday's density): the lists and a record's related tables (.dt-grid). 32px rows (a
   row's icon buttons set the height), a line between columns, and the record's name pinned left while the other
   columns scroll under it (.crm-pin: crm_list.js, related_entities.js). From a tablet up; a phone shows two columns.
   table.dataTable in the selectors: DataTables' own header rules (sort icon room, position: relative) outrank less. ---- */
@media (min-width: 768px) {
    /* Separate: collapsed borders belong to the table's grid, so a pinned cell left its edge behind as it stuck. */
    table.dataTable.dt-grid { border-collapse: separate; border-spacing: 0; }
    .dt-container table.dataTable.dt-grid > :is(thead, tbody) > tr > * { padding-block: .25rem; padding-left: .625rem; border-inline-end: 1px solid var(--tblr-border-color); }
    .dt-container table.dataTable.dt-grid > tbody > tr > td { padding-right: .625rem; }
    /* A row's icon buttons are what set its height: 24px buttons make 32px rows (2026-10-27; 28px made 38). */
    table.dataTable.dt-grid > tbody > tr > td .btn-sm { min-height: 1.5rem; padding-block: 0; }   /* the size of an icon button is its min-height (Tabler: 28px) */
    /* One line a row, as the list's own (.crm-list-table, top of this file): a long value ends in an ellipsis. Not a
       child row's cell (colspan), which holds a table of its own. */
    table.dt-grid > :is(thead, tbody) > tr > :not([colspan]) { white-space: nowrap; }
    table.dt-grid > tbody > tr > td:not([colspan], .crm-actions-cell) { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
    .dt-container table.dataTable.dt-grid > :is(thead, tbody) > tr > :first-child { padding-left: 1.25rem; }
    .dt-container table.dataTable.dt-grid > :is(thead, tbody) > tr > :last-child { border-inline-end: 0; }
    table.dataTable.dt-grid > tbody > tr > td.crm-pin { position: sticky; left: 0; z-index: 1; background-color: var(--tblr-bg-surface); }
    table.dataTable.dt-grid > thead > tr > th.crm-pin { position: sticky; left: 0; z-index: 3; }
}

/* ---- Status cells (2026-10-26; core/table.js dt.status, a schema column's render "status"): the cell in the value's
   colour, as Monday's. The text is white or dark ink, whichever reads at 4.5:1 or better on that colour (measured
   against Tabler's values). Where it is not a cell - a phone's second line under the name - the same span is a pill. ---- */
.dt-st-blue   { --st: var(--tblr-blue);   --st-ink: #fff; }
.dt-st-indigo { --st: var(--tblr-indigo); --st-ink: #fff; }
.dt-st-purple { --st: var(--tblr-purple); --st-ink: #fff; }
.dt-st-pink   { --st: var(--tblr-pink);   --st-ink: #fff; }
.dt-st-red    { --st: var(--tblr-red);    --st-ink: #fff; }
.dt-st-azure  { --st: var(--tblr-azure);  --st-ink: #1f2937; }
.dt-st-orange { --st: var(--tblr-orange); --st-ink: #1f2937; }
.dt-st-yellow { --st: var(--tblr-yellow); --st-ink: #1f2937; }
.dt-st-lime   { --st: var(--tblr-lime);   --st-ink: #1f2937; }
.dt-st-green  { --st: var(--tblr-green);  --st-ink: #1f2937; }
.dt-st-teal   { --st: var(--tblr-teal);   --st-ink: #1f2937; }
.dt-st-cyan   { --st: var(--tblr-cyan);   --st-ink: #1f2937; }
.dt-container table.dataTable > tbody > tr > td.dt-status-cell {
    background-color: var(--st); color: var(--st-ink); text-align: center; font-weight: var(--tblr-font-weight-medium);
    border-inline-end-color: var(--tblr-bg-surface);   /* a gap between two coloured cells, not a grey line */
}
.dt-status { display: inline-block; padding: 0 .375rem; border-radius: var(--tblr-border-radius-sm); background: var(--st); color: var(--st-ink); }
td.dt-status-cell > .dt-status { display: inline; padding: 0; background: none; color: inherit; }
/* A list column edited in place (crm_list.js openInline): its picklist as Tuesday's status menu, two columns from 7. */
td.crm-inline-edit { cursor: pointer; }
.crm-inline-menu.dropdown-menu { display: grid; gap: 4px; padding: 6px; min-width: 12rem; z-index: 1080; }
.crm-inline-menu.is-cols { grid-template-columns: 1fr 1fr; min-width: 24rem; }
.crm-inline-menu .dt-status { border: 0; padding: .375rem .75rem; font-weight: var(--tblr-font-weight-medium); }
.crm-inline-menu .dt-status:hover { filter: brightness(1.08); }
.crm-inline-menu .is-current { outline: 2px solid var(--tblr-body-color); outline-offset: 1px; }
.app-side.offcanvas-lg { --tblr-offcanvas-width: min(20rem, 85vw); }
.app-side-nav { display: flex; flex-direction: column; gap: .125rem; }
.app-side-link, .app-side-tree-link {
    display: flex; align-items: center; gap: .5rem; min-height: 2.25rem; padding: .375rem .625rem;
    border-radius: var(--tblr-border-radius); color: var(--tblr-body-color); text-decoration: none; min-width: 0;
}
.app-side-link:hover, .app-side-tree-link:hover { background: var(--tblr-bg-surface-secondary); text-decoration: none; }
.app-side-link.active, .app-side-tree-link.active { background: var(--tblr-primary-lt); color: var(--tblr-primary); font-weight: var(--tblr-font-weight-medium); }
.app-side-link .icon { flex-shrink: 0; }
.app-side-head {
    display: flex; align-items: center; justify-content: space-between; margin: 1rem 0 .25rem; padding-left: .625rem;
    font-size: .75rem; font-weight: var(--tblr-font-weight-bold); text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-secondary);
}
@media (max-width: 991.98px) { .app-side-link, .app-side-tree-link { min-height: 2.75rem; } }   /* touch targets */
/* Under the open entry, what belongs to it (the CRM list's views), as Boards' views hang under the open board. */
.app-side-sub { margin: .125rem 0 .5rem .875rem; padding-left: .5rem; border-left: 1px solid var(--tblr-border-color); }
.app-side-sub:not(:has(.app-side-tree:not(:empty))) { display: none; }   /* nothing to list (a record page; before the page's script has run) */
.app-side-sub-head:has(+ .app-side-tree:empty) { display: none; }   /* one of two lists empty (a board without groups) */
.app-side-caret { transition: transform .2s ease; }
.app-side-link.collapsed .app-side-caret { transform: rotate(-90deg); }   /* the open board's views and groups folded away (boards/_side.php) */
.app-side-sub-head {
    margin: .25rem 0 .125rem; padding-left: .625rem; font-size: .6875rem; font-weight: var(--tblr-font-weight-bold);
    text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-secondary);
}
.app-side-sub-head:not(:first-child) { margin-top: .5rem; }   /* a second list under the same entry (Boards' groups) */
.app-side-tree { list-style: none; margin: 0; padding: 0; }
button.app-side-link, button.app-side-tree-link { width: 100%; border: 0; background: none; text-align: start; }   /* the KB's Search, Boards' groups */
.app-side-link kbd { font-size: .6875rem; }
.app-side-tree-link .ti { flex-shrink: 0; color: var(--tblr-secondary); }
.app-side-tree-link.active .ti { color: inherit; }
/* The page header's sidebar buttons (top.php), in front of the heading. */
.app-title-row { display: flex; align-items: flex-start; gap: .75rem; }
.app-side-tools { display: flex; align-items: center; gap: .5rem; flex: none; }

/* The home's lists: titled panels (their header: .app-dark-head, below) in a grid, a record per row; then a heading and a
   tile per entity. */
.app-home-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; align-items: start; margin-bottom: 2rem; }
.app-home-lists:not(:has(*)) { display: none; }   /* :empty never matches: the markup leaves white space in it */
.app-count {
    min-width: 1.375rem; padding: .081rem .366rem; border-radius: .813rem; text-align: center;
    font-size: .625rem; font-weight: 600; color: var(--tblr-secondary); background: color-mix(in srgb, var(--tblr-secondary) 12%, transparent);
}
.app-home-card .card-body { padding: .75rem 1.25rem 1rem; }
.app-home-list { display: flex; flex-direction: column; margin: 0 -.625rem; padding: 0; list-style: none; }
.app-home-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .625rem; border-radius: var(--tblr-border-radius); color: inherit; text-decoration: none; }
.app-home-row:hover { background: var(--tblr-bg-surface-secondary); text-decoration: none; }
.app-home-icon { flex: none; font-size: 1.25rem; color: var(--tblr-secondary); }
.app-home-text { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.app-home-title { font-weight: var(--tblr-font-weight-medium); }
.app-home-meta { font-size: .8125rem; }
.app-section-title {
    display: flex; align-items: center; gap: .625rem; margin: 0 0 1.125rem; padding-bottom: .625rem;
    font-size: var(--tblr-body-font-size); font-weight: var(--tblr-font-weight-medium); color: var(--tblr-emphasis-color);
    border-bottom: 2px solid var(--tblr-border-color);
}
.row-cards + .app-section-title { margin-top: 1.25rem; }   /* a second section (Boards: shared with me) starts further down */
.app-tile { height: 100%; --app-card-line: linear-gradient(var(--app-tile-c, var(--tblr-primary)), var(--app-tile-c, var(--tblr-primary))) left / 4px 100% no-repeat; text-decoration: none; transition: box-shadow .15s, transform .15s; }   /* --app-tile-c: a tile's own colour */
.app-tile:hover { text-decoration: none; }
@media (hover: hover) { .app-tile:hover { box-shadow: 0 8px 20px rgba(24, 28, 50, .12); transform: translateY(-2px); } }   /* a tap would leave it lifted */
.app-tile > .card-body { display: flex; align-items: flex-start; gap: .75rem; padding: 1.016rem; }
.app-tile-icon {
    display: flex; align-items: center; justify-content: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 8px;
    font-size: 1.25rem; color: var(--app-tile-c, var(--tblr-primary)); background: color-mix(in srgb, var(--app-tile-c, var(--tblr-primary)) 12%, transparent);
}
.app-tile-name { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: var(--tblr-font-weight-medium); color: var(--tblr-emphasis-color); }
.app-tile:hover .app-tile-name { color: var(--tblr-link-color); }
.app-tile-desc { margin: .125rem 0 0; font-size: .8125rem; color: var(--tblr-secondary); }
.app-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* two lines, then an ellipsis */
.app-tile-meta { display: flex; flex-wrap: wrap; gap: .125rem .875rem; margin-top: .375rem; font-size: .75rem; color: var(--tblr-secondary); }
.app-tile-meta .ti { margin-right: .25rem; }
@media (prefers-reduced-motion: reduce) { .app-tile { transition: none; } .app-tile:hover { transform: none; } }
.min-w-0 { min-width: 0; }

/* ── The icon and colour pickers of a new / settings dialog (include/tabler/_icon_color.php; ui.iconPicker):
   a KB collection's, a board's ── */
.app-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.app-swatch {
    display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
    border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); cursor: pointer;
}
.app-swatch:has(input:checked) { border-color: var(--tblr-primary); box-shadow: 0 0 0 .2rem var(--tblr-primary-lt); color: var(--tblr-primary); }
.app-swatch:has(input:focus-visible) { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
.app-dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; }
.app-more-icons { margin-top: .75rem; }
.app-more-icons > summary { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--tblr-primary); cursor: pointer; }   /* a finger's worth */
.app-icon-grid { max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; padding: .25rem; }   /* 5,000 icons: the list scrolls inside the dialog */
.app-icon-grid .app-swatch { content-visibility: auto; contain-intrinsic-size: 2.75rem; }   /* only the icons in view are laid out and drawn */

/* An access dialog's search results (a KB collection's, a board's): framed only when there are any. */
.app-member-results:not(:empty) { margin-top: .5rem; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); }

/* ── The dark header of a titled panel: the top bar's navy with light text. ONE definition, for every place that has it:
   the homes' list cards (CRM, KB, Boards) and the KB's panels, a record's card and its sections in the CRM (the form's,
   a quotation's, a bundle's) and in the Hub, the dashboards' titled cards (hub/dashboard_tiles/*, the CRM's and the
   Hub's), and a card with its tabs (a list's, crm/list.php, the CRM's and the Hub's; Admin's Email templates and
   Automation). A panel takes it with the class alone, .app-dark-head (no data-bs-theme, no page named here): what its
   content reads its colours from is set here, from the colour set at the top. ── */
/* Admin > Settings > Branding: what shows now, each logo on the ground it is drawn on (the menu bar's: .app-dark-head). */
.brand-preview { display: flex; align-items: center; height: 4rem; padding: .5rem .75rem; border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary); }
.brand-preview img { max-width: 100%; max-height: 100%; }
.brand-swatch { display: block; width: 1.25rem; height: 1.25rem; border-radius: var(--tblr-border-radius-sm); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.app-dark-head {
    background: var(--app-header-bg); color: var(--app-header-ink);   /* every colour here is from the colour set at the top (:root) */
    --tblr-body-color: var(--app-header-ink); --tblr-emphasis-color: var(--app-header-ink); --tblr-card-title-color: var(--app-header-ink);
    --tblr-secondary: rgba(var(--app-header-ink-rgb), .75); --tblr-secondary-rgb: var(--app-header-ink-rgb);   /* .text-secondary, .link-secondary */
    --tblr-bg-surface-secondary: rgba(var(--app-header-ink-rgb), .1); --tblr-border-color-translucent: rgba(var(--app-header-ink-rgb), .2);   /* the quiet buttons on it (Cancel) */
}
.app-dark-head :where(h1, h2, h3, h4, h5, h6, .card-title) { color: inherit; }
.app-dark-head .card-title .icon { color: var(--app-brand); }
.app-dark-head .app-count { font-size: .6875rem; color: var(--app-header-ink); background: rgba(var(--app-header-ink-rgb), .14); }   /* readable on the navy */
/* The outlined and tinted buttons that sit on it (a bundle's Copy, a quotation's Save draft and Clear): their text in a
   lighter tone, or the page's teal and red are too dark to read on the navy. Filled buttons need nothing. */
.app-dark-head :is(.btn-outline-primary, .btn-ghost-primary) { --tblr-btn-color: var(--app-header-accent); --tblr-btn-border-color: rgba(var(--app-header-accent-rgb), .45); }
.app-dark-head :is(.btn-outline-danger, .btn-ghost-danger) { --tblr-btn-color: var(--app-header-danger); --tblr-btn-border-color: rgba(var(--app-header-danger-rgb), .45); }
/* As a card's header: its height and title, and the card's own corners. */
.card-header.app-dark-head {
    gap: .5rem; min-height: 3.25rem; padding: .5rem 1.25rem;
    border-top-left-radius: var(--tblr-card-inner-border-radius); border-top-right-radius: var(--tblr-card-inner-border-radius);   /* the brand line's curve (.card::before); also when it is not the card's first child (a ribbon before it) */
}
.card-header.app-dark-head .card-title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .9375rem; }
/* As a card's header that holds the card's tabs (a list's views, an Admin page's parts): the strip is the navy, with
   no light band of its own and nothing under the tabs - a narrow screen slides them, the slide bar under the header
   (ui.slideBar); the open tab
   is the card's own colour, joined to the body, in the page's text colour (Tabler's --tblr-body-color, which is the
   ink in here). */
.card-header.app-dark-head:has(> .card-header-tabs) { padding-bottom: 0; }
/* No corners of its own (2026-11-18): Tabler gives the strip the card's, for running to the card's edges - inset here, and
   scrolling sideways (.app-slides), those clipped the first tab to the card's 12px beside the others' 6px. */
.app-dark-head > .card-header-tabs { margin: 0; padding: 0; background: none; scrollbar-width: none; border-radius: 0; --tblr-nav-link-hover-color: var(--app-header-ink); --tblr-nav-tabs-link-hover-border-color: transparent; }
.app-dark-head > .card-header-tabs .nav-link { background: none; border-color: transparent; }
.app-dark-head > .card-header-tabs .nav-link:hover:not(.active) { background: rgba(var(--app-header-ink-rgb), .1); }
.app-dark-head > .card-header-tabs .nav-link.active { color: light-dark(var(--tblr-gray-700), var(--tblr-gray-200)); background: var(--tblr-bg-surface); }
/* As a form section's band (.section-header): a phone's fold arrow. */
.section-header.app-dark-head.section-toggle::after { color: rgba(var(--app-header-ink-rgb), .7); }

/* ---- Files (2026-10-28; views/files/index.php, own/js/files.js): one card per view - the search and the chips above
   a grid table of files, each with its picture or its kind's icon. The library's card also takes files dropped on the
   page (.is-dropping shows the overlay) and lists the uploads under way. ---- */
.files-card { position: relative; }
.files-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .625rem 1rem; border-bottom: 1px solid var(--tblr-border-color); }
.files-search { flex: 0 1 18rem; min-width: 12rem; }
.files-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.files-chips:empty { display: none; }
.files-uploads { padding: .75rem 1rem; max-height: 15rem; overflow-y: auto; border-bottom: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface-secondary); }
.files-up + .files-up { margin-top: .625rem; }
.files-up .progress { transition: opacity .3s; }
.files-up.is-done .progress { opacity: .4; }
.files-drop {
    position: absolute; inset: 0; z-index: 5; display: none; place-items: center; text-align: center; pointer-events: none;
    border: 2px dashed var(--tblr-primary); border-radius: inherit; color: var(--tblr-primary);
    background: color-mix(in srgb, var(--tblr-bg-surface) 88%, var(--tblr-primary));
}
.files-drop .ti-cloud-upload { font-size: 2.5rem; }
.files-card.is-dropping .files-drop { display: grid; }
/* A file: its picture or icon (in its kind's colour), and its name, which opens it. */
.files-name { display: flex; align-items: center; gap: .5rem; min-width: 0; max-width: 34rem; }
.files-name-cell { min-width: 14rem; }
.files-ico {
    --k: var(--tblr-secondary); flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; overflow: hidden;
    border-radius: var(--tblr-border-radius); color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); font-size: 1rem;
}
.files-ico img { width: 100%; height: 100%; object-fit: cover; }
.files-k-image { --k: var(--tblr-azure); } .files-k-pdf { --k: var(--tblr-red); } .files-k-doc { --k: var(--tblr-blue); }
.files-k-sheet { --k: var(--tblr-green); } .files-k-slides { --k: var(--tblr-orange); } .files-k-cad { --k: var(--tblr-purple); }
.files-k-video { --k: var(--tblr-pink); } .files-k-archive { --k: var(--tblr-yellow); }
.files-open { min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.files-open:hover { color: var(--tblr-primary); text-decoration: underline; }
.files-shared { display: inline-flex; align-items: center; gap: .125rem; flex: none; border: 0; cursor: pointer; }
.files-where { max-width: 22rem; }
.files-use { min-width: 12rem; }
/* The row's actions, pinned to the right edge of the table's pane: a table wider than the screen (a phone; the Links and
   Users views on a tablet) scrolls under them, so Share, Download, Revoke... never sit off-screen. The cell paints the
   card's colour; a row's hover tint is Bootstrap's inset shadow, drawn over it. */
.files-act { width: 1%; white-space: nowrap; }
.files-act .btn { white-space: nowrap; overflow-wrap: normal; }   /* a.btn wraps anywhere, and a 1% cell is as narrow as its content allows */
#files_table :is(th, td).files-act { position: sticky; right: 0; z-index: 1; background-color: var(--tblr-bg-surface); border-inline-start: 1px solid var(--tblr-border-color); }
/* Each pinned cell is its own layer (sticky + z-index), so the menu it opens stayed under whatever is painted after it
   on a level as high: the next rows' cells, and the paging below the table (the current page's button is z-index 3).
   The cell with the open menu goes up to a dropdown's own level. */
#files_table td.files-act:has(.dropdown-menu.show) { z-index: var(--tblr-dropdown-zindex, 1000); }
.files-card .card-title { white-space: nowrap; }
/* Phones: the name and the actions, without the columns files.js marks .files-wide (sizes, dates, counts); the name
   truncates instead of widening the table. The intro under the title wraps rather than being cut, and the page ends
   below the round + button (footer.php), which would otherwise sit on the last rows. */
@media (max-width: 575.98px) {
    #files_table .files-wide { display: none; }
    .files-name-cell { min-width: 0; }
    .files-name { max-width: calc(100vw - 12rem); }   /* the page's gutters, the cell's padding and the actions' ~7rem */
    #files_app { padding-bottom: 4.5rem; }
}
@media (max-width: 767.98px) {
    .files-card > .card-header { flex-wrap: wrap; row-gap: .125rem; }
    .files-card > .card-header .card-subtitle { flex-basis: 100%; margin-inline-start: 0 !important; white-space: normal; }
}
/* Fingers' room (2.5rem) on a phone and on any touch screen - a tablet too, where .dt-grid's density (above: 24px row
   buttons from 768px up) is for a mouse. #files_table outranks that rule's table.dataTable... selector. */
@media (max-width: 767.98px), (pointer: coarse) {
    #files_table td.files-act .btn, #files_table .files-shared, .files-chips .btn, #files_share_list .btn, #files_uploads_close { min-height: 2.5rem; min-width: 2.5rem; }
    #files_table .files-open { min-height: 2.5rem; }
}
/* Above the card: whose files an admin is in, and the way back. In the warning colour, plainly: Tabler 1.6's
   .alert-warning is a 16% tint that hardly shows, and its solid .alert-important puts white text on yellow. */
.files-owner {
    flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .625rem 1rem; margin-bottom: 1rem;
    background: color-mix(in srgb, var(--tblr-warning) 26%, var(--tblr-bg-surface));
    border: 1px solid color-mix(in srgb, var(--tblr-warning) 60%, transparent); border-inline-start: 4px solid var(--tblr-warning);
}
.files-owner .alert-icon { margin: 0; color: var(--tblr-warning); font-size: 1.25rem; }
.files-owner strong { font-weight: var(--tblr-font-weight-bold); }
/* The sidebar: the library's room under the views. */
.files-room { margin-top: 1.5rem; padding: 0 .625rem; }

/* ---- Calendar (2026-11-05; views/calendar/index.php, own/js/calendar.js): the user's Outlook calendar. Colours by
   show_as (calendar-booking-roadmap D1), through FullCalendar's own variables: the Tabler theme sets them pale for every
   event. Text on a filled primary is --tblr-primary-fg, dark in the dark theme (as the buttons above). */
#calendar .cal-busy { --fc-event-bg-color: var(--tblr-primary); --fc-event-border-color: var(--tblr-primary); --fc-event-text-color: var(--tblr-primary-fg); }
#calendar .cal-tentative { --fc-event-bg-color: var(--tblr-primary-lt); --fc-event-border-color: var(--tblr-primary); --fc-event-text-color: var(--tblr-primary); }
#calendar .cal-oof { --fc-event-bg-color: var(--tblr-purple); --fc-event-border-color: var(--tblr-purple); --fc-event-text-color: #fff; }
#calendar .cal-free, #calendar .cal-workingElsewhere { --fc-event-bg-color: transparent; --fc-event-border-color: var(--tblr-primary); --fc-event-text-color: var(--tblr-primary); }
#calendar .cal-cancelled { text-decoration: line-through; opacity: .6; }
/* "All day" on one line; a long link in a title would widen a phone's page. */
#calendar .fc-timegrid-axis-cushion { max-width: none; }
#calendar .fc-list-event-title { overflow-wrap: anywhere; }
/* Phones: the toolbar's buttons wrap under the title. (Its size is tabler-vendors' h3, !important.) */
@media (max-width: 767.98px) {
    #calendar .fc-header-toolbar { flex-wrap: wrap; gap: .5rem; }
}
/* Fingers' room (2.5rem) on a phone and on any touch screen, as Files': FullCalendar's buttons are about 34px. */
@media (max-width: 767.98px), (pointer: coarse) {
    #calendar .fc-button { min-height: 2.5rem; min-width: 2.5rem; }
}

/* ---- App shell (2026-10-16): installed from the browser or wrapped as a phone app (the manifest: Auth::manifest; sw.js and its
   offline.html (Auth::offline); the head tags in tabler_helper.php brand_icons()). Drawn edge to edge - viewport-fit=cover under iOS's
   see-through status bar, or a wrapper's full-screen web view - the page runs under the status bar, a notch and the home
   indicator: the status bar and Android's navigation buttons get a navy band each, over whatever is open (the system
   draws their icons white, from the manifest's navy - on the light page they vanished), and the header, dialogs,
   drawers, the sign-in pages, the gutters and what is pinned to the bottom move clear of them. env() is 0 in a browser
   tab: nothing here changes there. app.js reads the top band's width for the status bar's height. ---- */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 1090; pointer-events: none;
    border-top: env(safe-area-inset-top) solid var(--app-header-bg); border-bottom: env(safe-area-inset-bottom) solid var(--app-header-bg);
}
.app-header-top { padding-top: calc(var(--tblr-navbar-padding-y) + env(safe-area-inset-top)); }   /* app.js measures it: the menu row and the sheets follow */
.offcanvas-header { padding-top: calc(var(--tblr-offcanvas-padding-y) + env(safe-area-inset-top)); }
.page-center { padding-top: env(safe-area-inset-top); }
.modal { padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom); }
.container, .container-fluid, .container-xl {   /* a phone on its side: the notch */
    padding-inline: max(calc(var(--tblr-gutter-x) * .5), env(safe-area-inset-left)) max(calc(var(--tblr-gutter-x) * .5), env(safe-area-inset-right));
}
/* What floats at the bottom: over a phone's bottom bar (below), or else over the home indicator. */
.app-offline-bar, .auth-cookie-consent { bottom: calc(1rem + max(var(--app-bottom-bar-h, 0px), env(safe-area-inset-bottom))); }
#app_toasts { margin-bottom: calc(3rem + max(var(--app-bottom-bar-h, 0px), env(safe-area-inset-bottom))); }   /* + over the round button (footer.php), not on it: a delete's Undo stays 20s */
/* A toast with an action (ui.toast: a delete's Undo): the time left, as a line along its bottom that drains and then
   closes the toast (its animationend); paused while the toast is hovered or focused. */
.toast:has(> .app-toast-timer) { position: relative; overflow: hidden; }
.app-toast-timer { position: absolute; inset: auto 0 0; height: 3px; background: rgba(255, 255, 255, .75); transform-origin: left; animation: app-toast-timer linear forwards; }
.toast:is(:hover, :focus-within) > .app-toast-timer { animation-play-state: paused; }
@keyframes app-toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* No grey box flashed over whatever is tapped: buttons, links and rows have their own pressed and hover states. */
html { -webkit-tap-highlight-color: transparent; }

/* ---- Phones (2026-10-16): the header's top row is a bar along the bottom edge, as in a phone app - its icons spread
   over the width, no logo - and the menu row stays on top, under the status bar. app.js pinnedHeader measures both:
   --app-header-top-h is then only the status bar, --app-bottom-bar-h the bar, which lifts what is pinned to the bottom
   (save bars, the round button, toasts, chat heads, the tables' scrollbar). While a field is typed in, the bar steps
   aside: the keyboard is not topped by it. ---- */
@media (max-width: 767.98px) {
    .app-header-top, .header-condensed .app-header-top {
        position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 1031;   /* its menus over the round button (1030) */
        padding: .375rem 0 calc(.375rem + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .08);
    }
    /* iOS 26 Safari's floating toolbar: the bar is pinned above it and the page scrolled on below - navy to the edge. */
    .app-header-top::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; background: var(--app-header-bg); pointer-events: none; }
    .app-header-top .navbar-brand { display: none; }
    /* Chat, search, notifications, cart, you: the theme and language buttons are items of your menu here (navbar.php). */
    .app-header-top .nav-item:has(> :is(.hdr-theme, .hdr-lang)) { display: none !important; }   /* !important: over the theme pair's d-flex */
    .app-header-top .nav-item:has(> .hdr-chat) { order: -1; }
    .app-header-top .navbar-nav.flex-row { flex: 1 1 100%; justify-content: space-around; }
    .app-header-top .navbar-nav.flex-row > .nav-item { margin: 0 !important; }
    .app-header-top .hdr-search { border-color: transparent; background: none; }   /* an icon among icons */
    /* Its menus (language, user) open upwards, from the bar itself, at the right edge; Tabler leaves a phone's navbar
       menus in the flow (position: static). */
    .app-header-top .dropdown { position: static; }
    .app-header-top .dropdown-menu { position: absolute; top: auto; right: .5rem; bottom: calc(100% + .25rem); margin: 0; max-height: 70vh; overflow-y: auto; }
    .app-header-top .dropdown-menu-arrow::before, .app-header-top .dropdown-menu-arrow::after { display: none; }
    .app-hub-as { order: -1; flex: 1 1 100%; justify-content: center; margin: 0 0 .375rem; }   /* in the hub as someone: a line above the icons */
    .page { padding-bottom: var(--app-bottom-bar-h, 0px); }
    /* A record's Call · Email · Map (dynamic_form/form.php .record-reach): one row of equal, finger-sized buttons. */
    .record-reach:not([hidden]) { display: flex; gap: .5rem; }
    .record-reach .btn { flex: 1 1 0; justify-content: center; min-height: 2.75rem; padding-inline: .5rem; white-space: nowrap; }   /* nowrap: over a.btn's wrap-anywhere */
    body:has(:is(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"]), textarea, [contenteditable="true"]):focus) .app-header-top { display: none; }
    /* A side drawer (filters, the side menu) and the keyboard (2026-11-18): Android shrinks the window in one step
       (top.php interactive-widget=resizes-content), and a drawer pinned top and bottom jumped with it - its foot snapped
       up and its body re-laid. Held at the top and as tall as the window instead, in dvh: a computed length, so a new
       window height is a change the transition runs - the foot glides with the keyboard, the content stays put. iOS
       lays its keyboard over the page and shrinks nothing: there app.js keyboardView sets what shows (--app-vv-h,
       --app-vv-top) while it is up, and the drawer is held to that instead. */
    /* No dvh (iOS < 15.4, Chrome < 108): vh, else a var() whose fallback is not understood leaves the height auto. */
    :is(.offcanvas, .offcanvas-lg):is(.offcanvas-start, .offcanvas-end) {
        top: var(--app-vv-top, 0px); bottom: auto; height: var(--app-vv-h, 100vh);
        transition: var(--tblr-offcanvas-transition), height .25s ease-out;
    }
    @supports (height: 100dvh) {
        :is(.offcanvas, .offcanvas-lg):is(.offcanvas-start, .offcanvas-end) { height: var(--app-vv-h, 100dvh); }
    }
    /* iOS (html.app-kb-over, app.js keyboardView): its top follows Safari's pan at once, and a height that glided after
       it would leave the foot out of place for the glide - the keyboard lies over the page there, nothing to follow. */
    .app-kb-over :is(.offcanvas, .offcanvas-lg):is(.offcanvas-start, .offcanvas-end) { transition: var(--tblr-offcanvas-transition); }
    /* Less motion: no slide, as Tabler has it - this rule's weight is over Tabler's. */
    @media (prefers-reduced-motion: reduce) {
        :is(.offcanvas, .offcanvas-lg):is(.offcanvas-start, .offcanvas-end),
        .app-kb-over :is(.offcanvas, .offcanvas-lg):is(.offcanvas-start, .offcanvas-end) { transition: none; }
    }
}
