/* =====================================================================
   AHLABOT THEME / LIGHT MODE
   Built on top of Quasar (Vue) for the Moqui webroot.

   Architecture (sections in order):
     1. Design tokens (CSS variables) ...... single source of truth
     2. Base & typography .................. body, headings, links, images
     3. Layout ............................. page container, drawer, header
     4. Components ......................... buttons, fields, tables,
                                             cards, tabs, menus, dialogs
     5. Page-specific patterns ............. dashboards, elegant header,
                                             token table
     6. Utilities & safety ................. global wraps, scrollbars
     7. Responsive overrides ............... tablet & mobile breakpoints
   ===================================================================== */

/* The theme is ONE registered stylesheet, this one, and it pulls in the rest.

   The alternative, registering brand.css and shell.css as their own
   ScreenThemeResource rows, means the theme only works after a seed data load
   and a cache clear. Miss that step and --q-color-primary is undefined, which
   is not a missing colour but a wrong one: Quasar declares every utility twice,
       .text-primary { color:#1976d2!important; color:var(--q-color-primary)!important }
   so an unloaded brand file turns the entire UI Material blue.

   Importing them here keeps the cascade in the right order, brand tokens, then
   shell, then the rules in this file, and makes the theme work from a file copy
   alone with no database state. */
@import url('brand.css');
@import url('shell.css');

/* Nunito for Latin text, Tajawal for Arabic (2026-10-05). Listed together in --font-family-base: the browser takes
   each character from the first font that has it, so Arabic falls through to Tajawal. The PDFs use the same two
   (moqui-fop fop.xconf, files in runtime/component/theme/fonts). */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* =====================================================================
   1. DESIGN TOKENS
   ===================================================================== */
/* No BRAND colour is defined here. The brand, its states, tints, shell
   palette and the semantic state colours all live in brand.css, which is the
   single file a deployment edits to re-skin. What stays here is the neutral
   scale, surfaces, borders and text greys, which a re-skin does not change.

   A few brand literals still sit inline in the rules below rather than in
   tokens. They are on the list for the component pass and should be replaced
   with var() as each component is worked on, not left to spread. */

:root {
    --surface-page: #f8fafc;
    --surface-canvas: #f4f7fa;
    --surface-card: #ffffff;
    --surface-soft: #fafbfc;

    --border-soft: #f1f5f9;
    --border-default: #e2e8f0;
    --border-strong: #cbd5e1;

    --text-strong: #1e293b;
    --text-primary: #334155;
    --text-secondary: #475569;
    /* #94a3b8 was 2.56:1 on a card and 2.45:1 on the page, both well under the
       4.5:1 AA needs for body text. #64748b is 4.76:1 and 4.55:1. It is the
       lightest grey in the ramp that passes on BOTH surfaces. */
    --text-muted: #64748b;
    --text-on-brand: #ffffff;
    --text-heading: #1a202c;
    --text-subtitle: #718096;


    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 48px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-menu: 0 8px 24px rgba(26, 37, 80, 0.12);
    --shadow-brand-sm: 0 4px 10px var(--brand-tint-25);
    --shadow-brand-md: 0 12px 30px var(--brand-tint-8);

    --font-family-base: 'Nunito', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --transition-fast: all 0.15s ease;
    --transition-base: all 0.2s ease;
    --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    --control-height-sm: 36px;
    --control-height-md: 44px;
    --control-height-lg: 54px;
}

/* Dark mode parity for the neutral ramp. A shadow built from black is
   invisible on a dark surface, so the whole ramp is re-stated here rather
   than inherited from the light values above. */
body.body--dark {
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.48);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.52);
    --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.55);
    --text-muted: #94a3b8;
}

/* =====================================================================
   2. BASE & TYPOGRAPHY
   ===================================================================== */
body {
    font-family: var(--font-family-base) !important;
    background-color: var(--surface-page) !important;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--text-heading); }

/* =====================================================================
   3. LAYOUT
   ===================================================================== */
.q-page-container { background-color: var(--surface-canvas) !important; }

.q-page-container > div:first-child .app-contain img {
    max-height: 100px !important;
    max-width: 100% !important;
    height: auto;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.q-header .q-toolbar img,
.q-header .q-btn img {
    max-height: 28px !important;
    width: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =====================================================================
   4. COMPONENTS
   ===================================================================== */

/* ---------- 4.1 Pill button group ---------- */
body .q-btn-group {
    background: var(--surface-card) !important;
    border-radius: var(--radius-lg) !important;
    padding: 5px !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: var(--space-5);
}

body .q-btn-group .q-btn {
    text-transform: none !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--text-muted) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-2) var(--space-4) !important;
    transition: var(--transition-base) !important;
}

body .q-btn-group .q-btn--active,
body .q-btn-group .bg-primary {
    background: var(--brand-primary) !important;
    color: var(--text-on-brand) !important;
    box-shadow: var(--shadow-brand-sm) !important;
}

/* ---------- 4.2 Form / dialog primary buttons ----------

   Button geometry belongs to section 8.2 and nowhere else. This block used
   to restate it here — 44px tall, 24px of side padding, a 14px radius and
   weight 700 — and because `.q-dialog .q-btn.bg-primary` is three classes
   deep it outranked `body .q-btn`, so a form's submit button came out as a
   bold pill twice the weight of every other control on the screen while
   section 8 quietly lost. Section 8.2 already carries the same three
   selectors, prefixed with `body`, for the fill; it deliberately does not
   restate size, because the size is `body .q-btn`'s job.

   There is nothing left to say here. The rule is kept as a comment so the
   next person to reach for a dialog-only button override reads this first.
   --------------------------------------------------------------------- */

/* Outline buttons: colour only.

   The border is drawn by Quasar on the :before pseudo-element, which is
   what section 8.2 styles. A border on the element itself does not replace
   that one, it sits outside it, so this rule used to put a second ring
   around every outlined button. Radius and height are section 8.2's. */
body .q-btn--outline {
    color: var(--text-secondary) !important;
    background: var(--surface-card) !important;
}

/* ---------- 4.3 Tables ---------- */
body .q-table__container {
    background: var(--surface-card) !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-xs) !important;
}

body .q-table thead th {
    background-color: var(--surface-soft) !important;
    color: var(--text-muted) !important;
    font-weight: var(--font-weight-bold) !important;
    text-transform: uppercase !important;
    font-size: var(--font-size-xs) !important;
    letter-spacing: 0.05em !important;
    padding: var(--space-4) var(--space-5) !important;
    border-bottom: 1px solid var(--border-soft) !important;
}

body .q-table tbody td {
    padding: var(--space-4) var(--space-5) !important;
    font-size: var(--font-size-base) !important;
    border-bottom: 1px solid var(--surface-page) !important;
}

body .q-table tbody tr:hover { background-color: var(--brand-tint-3) !important; }

/* Tables auto-size their columns to content. For wide tables (10+ cols),
   the container scrolls horizontally instead of crushing each column to
   an equal narrow share (which caused the cache-stats grid overlap). */
.q-table {
    width: 100% !important;
    min-width: 100%;
}

/* Allow long string values to soft-wrap at word boundaries.
   We intentionally DO NOT use `overflow-wrap: anywhere` because it
   would break inside identifier-style names
   (e.g. `entity.record.count.moqui.basic.Enumeration`) and visually
   overlap with the next column. */
.q-table td,
.q-table th {
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

.q-table__container,
.q-table__middle {
    overflow-x: auto;
    max-width: 100%;
}

/* Last cell containing only a single button (the typical trash / edit
   action column) is right-aligned so the action sits flush with the
   row's right edge, regardless of how many data columns the form-list
   declares. This makes 2-col (label + trash) and 3-col
   (label + value + trash) form-lists render consistently. */
.q-table tbody td:last-child:has(> .q-btn:only-child),
.q-table tbody td:last-child:has(> .q-btn--outline:only-child),
.q-table tbody td:last-child:has(.q-btn:only-child) {
    text-align: right;
}

.q-table__container:hover,
.q-card:has(.q-table):hover {
    box-shadow: var(--shadow-lg) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    transform: none !important;
}

/* ---------- 4.4 Tabs ---------- */
/* The bar's extra height is inside the tabs, not padding on the bar: padding on .q-tabs left a white strip above
   each tab that its hover and focus background did not cover. */
body .q-tabs {
    background: var(--surface-card) !important;
    border-bottom: 1px solid var(--border-default) !important;
}

body .q-tab {
    min-height: calc(var(--control-height-lg) + var(--space-2)) !important;
    padding: 0 var(--space-5) !important;
}

body .q-tab__label {
    text-transform: none !important;
    font-weight: var(--font-weight-bold) !important;
    font-size: var(--font-size-sm) !important;
    letter-spacing: -0.2px;
}

body .q-tab--active { color: var(--brand-primary) !important; }

body .q-tab__indicator {
    height: 4px !important;
    width: 32px !important;
    border-radius: 4px 4px 0 0 !important;
    background: var(--brand-primary) !important;
    margin: 0 auto;
}

/* ---------- 4.5 Cards ---------- */
.q-card,
.q-expansion-item {
    background: var(--surface-card) !important;
    border-radius: var(--radius-2xl) !important;
    padding: var(--space-6) !important;
    margin-bottom: var(--space-6) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: var(--shadow-md) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.q-card:hover,
.q-expansion-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-brand-md) !important;
    border-color: var(--brand-tint-15) !important;
}

/* No lift on a dialog, or on a card holding a focused field: an open dropdown
   is teleported outside the card, so moving onto it ends the hover, the card
   drops 4px, and the menu anchored to the field jumps with it. */
.q-dialog .q-card:hover,
.q-card:focus-within:hover,
.q-expansion-item:focus-within:hover { transform: none; }

.q-card .q-item__label--caption {
    font-size: var(--font-size-xs) !important;
    font-weight: var(--font-weight-bold) !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    margin-bottom: var(--space-1);
}

.q-card .q-item__label {
    font-size: var(--font-size-md) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--text-strong) !important;
}

.q-page .q-card img:not(.no-portrait),
form img:not(.no-portrait) {
    border-radius: var(--radius-2xl) !important;
    border: 4px solid var(--surface-card) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    /* 250px is the target, but a portrait in a 4-wide field-col (EditEmployee)
       gets ~200px and spilled over the inputs beside it. Shrink to the column
       and stay square. */
    width: 250px !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    display: block !important;
    margin: 0 auto var(--space-3) auto !important;
    object-fit: cover !important;
}

.q-page .q-card img:not(.no-portrait):hover,
form img:not(.no-portrait):hover { transform: scale(1.03); }

/* ---------- 4.6 Menus ---------- */
.q-menu {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-menu) !important;
    box-shadow: var(--shadow-menu) !important;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.q-menu .q-item {
    font-size: var(--font-size-sm);
    color: #4d5a6d;
    border-radius: 0;
}

.q-menu .q-item:hover {
    background: var(--surface-hover) !important;
    color: var(--brand-primary) !important;
}

.q-menu .q-item .q-icon { color: var(--brand-primary) !important; }

.q-menu::-webkit-scrollbar { width: 8px; }
.q-menu::-webkit-scrollbar-thumb {
    background: var(--brand-tint-25);
    border-radius: var(--radius-sm);
}
.q-menu::-webkit-scrollbar-thumb:hover { background: rgba(3, 4, 84, 0.45); }
.q-menu::-webkit-scrollbar-track { background: transparent; }

/* ---------- 4.7 Fields ---------- */
.q-field--outlined .q-field__label {
    top: 12px !important;
    transform: none !important;
    transition: all 0.2s ease-in-out !important;
}

.q-field--focused .q-field__label,
.q-field--float .q-field__label {
    top: -10px !important;
    transform: scale(0.75) !important;
    font-weight: var(--font-weight-semibold) !important;
    z-index: 10 !important;
}

.q-field { margin-bottom: var(--space-4) !important; }

.q-field--outlined .q-field__control {
    min-height: var(--control-height-md) !important;
}

.q-field__native:not(textarea):not(.q-field__native--wrap),
.q-field__input:not(textarea) {
    padding: 0 !important;
    min-height: var(--control-height-md) !important;
    display: flex !important;
    align-items: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-field--auto-height .q-field__control,
.q-select.q-select--multiple .q-field__control {
    height: auto !important;
    min-height: var(--control-height-md) !important;
    flex-wrap: wrap;
}

.q-field--auto-height .q-field__native,
.q-select.q-select--multiple .q-field__native {
    flex-wrap: wrap !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    height: auto !important;
    padding: var(--space-1) 0 !important;
    gap: 4px;
}

body:not(.body--dark) .q-field--focused .q-field__label,
body:not(.body--dark) .q-field--float .q-field__label {
    background-color: var(--surface-card) !important;
    padding: 0 var(--space-1) !important;
}

.q-field.q-textarea:not(.q-textarea--autogrow):not(.q-field--readonly) textarea {
    min-height: 120px !important;
    resize: vertical !important;
    overflow: auto !important;
}

textarea.q-field__native {
    min-height: 120px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    resize: both !important;
    overflow: auto !important;
}

.q-field__control:has(textarea.q-field__native),
.q-field__control-container:has(textarea.q-field__native) {
    width: 100% !important;
    height: auto !important;
    min-height: 120px !important;
}

.q-field.q-textarea--autogrow.q-field--readonly .q-field__native,
.q-field.q-textarea--autogrow.q-field--readonly textarea.q-field__native {
    min-height: var(--control-height-md) !important;
    max-height: var(--control-height-md) !important;
    height: var(--control-height-md) !important;
    resize: none !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 24px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    cursor: default !important;
    display: block !important;
    transform: translateY(-5px) !important;
}

.q-field.q-textarea--autogrow.q-field--readonly .q-field__control {
    min-height: var(--control-height-md) !important;
    max-height: var(--control-height-md) !important;
    height: var(--control-height-md) !important;
}

/* A dense display field sits beside dense inputs (Age next to Birth Date on
   EditEmployee), and those are 40px, so it has to be too, not 44. */
.q-field.q-field--dense.q-textarea--autogrow.q-field--readonly .q-field__control {
    min-height: var(--ctl-h-dense) !important;
    max-height: var(--ctl-h-dense) !important;
    height: var(--ctl-h-dense) !important;
}

.q-field.q-textarea--autogrow.q-field--readonly textarea { resize: none !important; }

/* ---------- 4.8 Dialogs ---------- */
/* m-dialog renders q-dialog > q-card, so this selector is the dialog's card,
   and Quasar makes it the scroll container: it pairs overflow:auto here with
   max-height:100% on .q-dialog__inner. Setting overflow:hidden clipped both
   axes, so any dialog taller than the viewport, such as a find form with a
   long header-dialog, could not be scrolled to its buttons. Only the
   horizontal axis was meant to be clamped. */
.q-dialog__inner > div {
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
}

.q-dialog .q-card__section,
.q-dialog .q-card {
    max-width: 100%;
    overflow-x: hidden;
}

.q-dialog .q-card-actions {
    justify-content: flex-end;
    padding: var(--space-3) var(--space-4) !important;
    gap: var(--space-2);
}

/* =====================================================================
   5. PAGE-SPECIFIC PATTERNS
   ===================================================================== */
.q-btn.btn-app-list {
    background: var(--surface-card) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: var(--radius-2xl) !important;
    padding: var(--space-6) !important;
    transition: var(--transition-bounce) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
    height: auto !important;
    min-height: 120px;
}

.q-btn.btn-app-list:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: var(--shadow-xl) !important;
    border-color: var(--brand-primary) !important;
}

.q-btn.btn-app-list .q-icon {
    font-size: 32px !important;
    color: var(--brand-primary) !important;
    margin-bottom: var(--space-3);
}

.q-btn.btn-app-list .q-btn__content div {
    font-weight: var(--font-weight-bold) !important;
    color: var(--text-primary) !important;
    font-size: var(--font-size-base) !important;
}

/* The module name and blurb on the /qapps Applications screen. These carried
   their colours inline in AppList.xml (#2d3a6b and #7a86b8, a navy and a
   periwinkle) while the rule above forces the card to --surface-card with
   !important, which outranks the inline light gradient on the same element.
   In dark mode that left navy text on a dark card. Tokens now, and the same
   treatment the dashboard launcher tiles use, so the two screens read alike.

   Specificity matches body .q-btn from section 8.2, which would otherwise win. */
body .q-btn.btn-app-list .app-list-title {
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--text-heading) !important;
    margin-top: var(--space-3) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
}

body .q-btn.btn-app-list .app-list-desc {
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-regular) !important;
    color: var(--text-muted) !important;
    margin-top: var(--space-1) !important;
    line-height: 1.4 !important;
}

/* q-btn sets white-space:nowrap; both labels have to be free to wrap. */
body .q-btn.btn-app-list .app-list-title,
body .q-btn.btn-app-list .app-list-desc {
    white-space: normal !important;
    text-align: center !important;
    max-width: 100% !important;
}

/* A launcher tile: the card a dashboard uses to send you into a section.

   Laid out horizontally -- icon chip on the left, title and description
   stacked beside it, all flush to a common left edge. A dashboard tile is a
   wide box (a quarter of the page, ~140px of height when centred), and
   centred text in a wide box leaves ragged edges on both sides and nothing
   for the eye to run down. Left-aligned, the titles of a row line up as a
   column you can scan, and the icon has the horizontal space it was wasting
   above the text. It also lets the card come down to the height its content
   actually needs.

   All 49 tiles across the dashboards emit the same three flat children, so
   the layout is a 2x2 grid with the icon spanning both rows -- no wrapper
   div, and no screen file changes.

   Every selector is body .q-btn.system-dash-btn, not .system-dash-btn.
   Section 8.2 styles every button through body .q-btn, which is more
   specific and lands later in the file, so a bare class rule loses: the tile
   was getting --ctl-h (34px), zero vertical padding and a 15px icon, which is
   why it rendered as a squat control instead of a card. */
body .q-btn.system-dash-btn {
    width: 100% !important;
    min-height: 92px !important;
    height: auto !important;
    /* Vertical padding has to be restated: body .q-btn sets padding 0 --ctl-px. */
    padding: var(--space-5) !important;
    /* row-col emits q-px-xs, an 8px horizontal gutter; match it vertically so
       a wrapped grid has even gaps. */
    margin: 0 0 var(--space-2) !important;
    background: var(--surface-card) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-default) !important;
    box-shadow: none !important;
    transition: border-color 0.18s ease, background-color 0.18s ease !important;
}

/* The hover signal is carried mostly by the chip below; the card itself only
   brightens its border and takes the faintest tint, so a grid of tiles does
   not flash a large block of colour on every mouse move. */
body .q-btn.system-dash-btn:hover {
    border-color: var(--brand-primary) !important;
    background: var(--brand-tint-3) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Quasar lays a .q-focus-helper over every q-btn and fades it in at opacity
   .15 of currentColor on hover. On a white card that is a grey wash reading
   as disabled, and it sat on top of the brand tint. The focus ring is a
   box-shadow from section 8.1, not this element, so hiding it costs nothing
   -- but the ring is restated below, because this rule is more specific than
   the one that draws it. */
body .q-btn.system-dash-btn .q-focus-helper { display: none !important; }

body .q-btn.system-dash-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring) !important;
    border-color: var(--brand-primary) !important;
}

/* Icon, title and description are placed explicitly rather than by auto-flow,
   so the grid does not shift if Quasar ever emits another child. */
body .q-btn.system-dash-btn .q-btn__content {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center !important;
    justify-content: start !important;
    column-gap: var(--space-4) !important;
    row-gap: 2px !important;
    width: 100% !important;
    height: 100% !important;
    flex-wrap: nowrap !important;
    text-align: left !important;
}

/* The chip. body .q-btn .q-icon forces 15px, which also overrode the
   size="2rem" the screens set inline; a bare glyph at either size floats in a
   card this wide, where a filled chip gives it an anchor. --brand-primary,
   not --brand-accent: the accent is the bright brand green and at this size
   on every tile it was the loudest thing on the page. */
body .q-btn.system-dash-btn .dash-btn-icon,
body .q-btn.system-dash-btn .q-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-soft) !important;
    color: var(--brand-secondary-ink) !important; /* the brand green icons of the Administration cards (user, 2026-10-10) */
    font-size: 20px !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
}

/* White on --brand-primary measures 5.05:1, so the filled chip stays legible. */
body .q-btn.system-dash-btn:hover .dash-btn-icon,
body .q-btn.system-dash-btn:hover .q-icon {
    background: var(--brand-primary) !important;
    color: var(--brand-secondary) !important; /* bright green on navy, never white on green */
}

body .q-btn.system-dash-btn .dash-btn-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--text-heading) !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.35 !important;
}

body .q-btn.system-dash-btn .dash-btn-desc {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    font-size: var(--font-size-sm) !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    font-weight: var(--font-weight-regular) !important;
    line-height: 1.4 !important;
}

/* q-btn sets white-space:nowrap and centres its content; both labels have to
   wrap or a description clips as the column narrows. */
body .q-btn.system-dash-btn .dash-btn-title,
body .q-btn.system-dash-btn .dash-btn-desc {
    white-space: normal !important;
    text-align: left !important;
    max-width: 100% !important;
}

/* Tiles in one row share the height of the tallest. The .row stretches its
   columns to the tallest one; the column then lets the tile grow into that
   height instead of keeping its own (height: auto above). A tile with a
   description that wraps to a third line no longer stands taller than its
   neighbours. The tile is a direct child of the column: row-col emits the
   column div and neither section nor render-mode adds a wrapper. */
body .row > [class*="col"]:has(> .q-btn.system-dash-btn) {
    display: flex;
    flex-direction: column;
}
body .row > [class*="col"] > .q-btn.system-dash-btn {
    flex: 1 1 auto;
}

.elegant-header {
    display: flex !important;
    align-items: center !important;
    padding: 1.5rem 0 !important;
    margin: var(--space-5) 0 30px 0 !important;
    background: transparent !important;
    position: relative;
}

.elegant-header .accent-line {
    width: 3px !important;
    height: 50px !important;
    background: linear-gradient(180deg, var(--brand-accent) 0%, rgba(17, 209, 103, 0) 100%) !important;
    border-radius: var(--radius-md) !important;
    margin-right: var(--space-5) !important;
}

.elegant-header .elegant-title {
    font-size: 1.6rem !important;
    font-weight: 300 !important;
    color: var(--text-heading) !important;
    margin: 0 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.elegant-header .elegant-title::first-line { font-weight: var(--font-weight-bold) !important; }

.elegant-header .elegant-subtitle {
    font-size: 0.85rem !important;
    color: var(--text-subtitle) !important;
    margin: var(--space-1) 0 0 0 !important;
    font-style: italic !important;
    opacity: 0.8;
}

.elegant-header:hover .accent-line {
    height: 60px !important;
    transition: height 0.4s ease;
}

.elegant-header:hover {
    background: radial-gradient(circle at left, rgba(17, 209, 103, 0.04) 0%, transparent 70%) !important;
}

/* Token table keeps fixed layout for its custom ellipsis behaviour. */
.token-table .q-table,
.token-table .q-table tbody {
    table-layout: fixed !important;
    width: 100% !important;
}

.token-table .q-table td { vertical-align: middle !important; }

.token-table .q-table td:nth-child(1) {
    width: 200px !important;
    white-space: normal !important;
    color: var(--brand-ink) !important;
    font-weight: var(--font-weight-semibold);
}

.token-table .q-table td:nth-child(2) {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 0 !important;
}

.token-table .q-table td:nth-child(3) {
    width: 60px !important;
    text-align: right !important;
}

.token-table .q-table td:nth-child(2):hover {
    white-space: normal !important;
    word-break: break-all !important;
    overflow: visible !important;
    cursor: help;
    background: var(--surface-hover) !important;
}

/* =====================================================================
   6. UTILITIES & SAFETY
   ===================================================================== */

/* Utility shims.
   Tailwind used to be loaded on every page, 2.9MB of it, to serve the five
   classes below. Quasar already provides everything else the screens use
   (flex, justify-center, text-center, text-white, text-black, text-bold),
   so Tailwind was dropped and only what was actually used is kept here. */
.text-lg { font-size: var(--font-size-lg); }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: 1.25rem; }

/* Was lg:mx-32, the app-list gutter above the large breakpoint */
@media (min-width: 1024px) {
    .app-list-inset { margin-left: 8rem; margin-right: 8rem; }
}

span.String {
    word-break: break-word;
    overflow-wrap: anywhere;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

/* =====================================================================
   7. RESPONSIVE OVERRIDES
   ===================================================================== */
@media (max-width: 1024px) {
    .q-card,
    .q-expansion-item {
        padding: var(--space-5) !important;
        border-radius: var(--radius-xl) !important;
    }

    body .q-btn.system-dash-btn {
        padding: var(--space-4) !important;
        min-height: 84px !important;
    }

    body .q-btn.system-dash-btn .dash-btn-icon,
    body .q-btn.system-dash-btn .q-icon {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        font-size: 17px !important;
    }

    body .q-btn.system-dash-btn .q-btn__content {
        column-gap: var(--space-3) !important;
    }

    body .q-table thead th,
    body .q-table tbody td { padding: var(--space-3) var(--space-4) !important; }
}

@media (max-width: 600px) {
    .q-card,
    .q-expansion-item {
        padding: var(--space-4) !important;
        margin-bottom: var(--space-4) !important;
        border-radius: var(--radius-lg) !important;
    }

    .q-card:hover,
    .q-expansion-item:hover {
        transform: none;
        box-shadow: var(--shadow-md) !important;
    }

    .q-page .q-card img:not(.no-portrait),
    form img:not(.no-portrait) {
        width: 160px !important;
        border-width: 3px !important;
    }

    body .q-btn-group {
        flex-wrap: wrap !important;
        gap: var(--space-1);
    }

    body .q-btn-group .q-btn {
        padding: 6px var(--space-3) !important;
        font-size: var(--font-size-xs) !important;
    }

    body .q-tab {
        min-height: 48px !important;
        padding: 0 var(--space-4) !important;
    }

    .q-btn.btn-app-list {
        padding: var(--space-4) !important;
        min-height: 96px;
        border-radius: var(--radius-xl) !important;
    }

    .q-btn.btn-app-list .q-icon {
        font-size: 26px !important;
        margin-bottom: var(--space-2);
    }

    .elegant-header {
        padding: 1rem 0 !important;
        margin: var(--space-3) 0 var(--space-5) 0 !important;
    }

    .elegant-header .elegant-title { font-size: 1.25rem !important; }
    .elegant-header .accent-line { height: 36px !important; margin-right: var(--space-3) !important; }

    .q-table__container,
    .q-table__middle { overflow-x: auto; }

    body .q-table thead th,
    body .q-table tbody td {
        padding: var(--space-2) var(--space-3) !important;
        font-size: var(--font-size-sm) !important;
    }

    form .q-btn.bg-primary,
    .q-card-actions .q-btn.bg-primary { width: 100% !important; }
}

/* =====================================================================
   8. ERP COMPONENT SYSTEM

   This section is the design system proper. It comes last so it is the
   authority on the components it covers: buttons, fields, dropdowns,
   tables, dialogs and boxes.

   It is written for a dense, data-heavy product. An ERP is not a consumer
   app: the screen is a working surface, so spacing is tight but never
   cramped, colour is used to mean something rather than to decorate, and
   the brand appears on the primary action and almost nowhere else.

   Every value is a token. No colour literal belongs below this line.
   ===================================================================== */

:root {
    /* Dense control sizing. The stock Quasar dense is still airy for a grid
       of twenty rows, so the system sets its own scale. */
    --ctl-h: 34px;
    --ctl-h-sm: 28px;
    /* Quasar's own dense field height, and what a q-input actually measures
       today, because `.q-field--dense .q-field__control { height: 40px }`
       is a fixed height that nothing in section 8 overrides. It is not
       --ctl-h: the migration of fields onto the section 8 scale has not
       happened yet, and section 4.7 still holds field sizing at 40/44px.
       Named so that a dropdown can be told to match a text field without
       a bare 40 appearing in the middle of the dropdown rules. When fields
       do move to --ctl-h, this goes with them. */
    --ctl-h-dense: 40px;
    --ctl-px: 12px;
    --row-h: 38px;
    --row-h-dense: 32px;

    /* Flat elevation. Borders carry structure, shadows only float things
       that genuinely overlay the page, like menus and dialogs. */
    --elev-flat: none;
    --elev-raised: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --elev-overlay: 0 10px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.08);

    --table-header-bg: var(--surface-soft);
    --table-stripe: rgba(15, 23, 42, 0.018);

    /* A tooltip needs its own pair rather than borrowing --text-heading for the
       fill: that token is near black in light mode but #ffffff in dark, so a
       tooltip built from it turned white on white and vanished. In dark the
       tooltip goes lighter than the page, the usual convention for something
       floating above it. */
    --tooltip-bg: #1a202c;
    --tooltip-ink: #ffffff;
}

body.body--dark {
    --elev-raised: 0 1px 2px rgba(0, 0, 0, 0.4);
    --elev-overlay: 0 10px 32px rgba(0, 0, 0, 0.55);
    --table-header-bg: rgba(255, 255, 255, 0.04);
    --table-stripe: rgba(255, 255, 255, 0.022);
    --tooltip-bg: #3b444e;
    --tooltip-ink: #ffffff;
}

/* ---------------------------------------------------------------------
   8.1 Focus, for every interactive thing at once

   Quasar's own focus affordance is a faint ripple, which disappears
   against a saturated brand. :focus-visible keeps it off mouse clicks.
   --------------------------------------------------------------------- */
body .q-btn:focus-visible,
body .q-item:focus-visible,
body .q-tab:focus-visible,
body .q-checkbox:focus-visible,
body .q-radio:focus-visible,
body .q-toggle:focus-visible,
body a:focus-visible,
body .m-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
    z-index: 1;
}

body .q-field--outlined.q-field--focused .q-field__control {
    box-shadow: var(--focus-ring-inset);
    border-color: transparent;
}

/* ---------------------------------------------------------------------
   8.2 Buttons

   The macros emit every button the same way, q-btn dense outline no-caps,
   and colour it from the screen's type attribute. So the hierarchy has to
   be built from the colour class Quasar lands on the element:

     bg-primary / text-primary .... the primary action, solid
     text-positive ................ a confirming action, solid
     text-negative ................ a destructive action, outlined until hover
     everything else .............. secondary, neutral outline

   That turns one undifferentiated control into a real hierarchy without
   touching a single screen file.
   --------------------------------------------------------------------- */
body .q-btn {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-semibold) !important;
    font-size: var(--font-size-sm) !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    min-height: var(--ctl-h) !important;
    padding: 0 var(--ctl-px) !important;
    border-radius: var(--radius-sm) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease !important;
}

body .q-btn .q-icon { font-size: 15px !important; }
body .q-btn .on-left { margin-right: 6px !important; }

/* Secondary, the default. A neutral outline reads as available without
   competing with the primary action. */
body .q-btn--outline:not(.text-primary):not(.text-positive):not(.text-negative):before {
    border: 1px solid var(--border-strong) !important;
}
body .q-btn--outline:not(.text-primary):not(.text-positive):not(.text-negative) {
    color: var(--text-secondary) !important;
    background: var(--surface-card) !important;
}
body .q-btn--outline:not(.text-primary):not(.text-positive):not(.text-negative):hover {
    background: var(--surface-soft) !important;
    color: var(--text-strong) !important;
}

/* Primary. Solid, and the only saturated fill on a normal screen. */
body .q-btn.bg-primary,
body .q-btn--standard.text-primary,
body .q-dialog .q-btn.bg-primary,
body .q-card-actions .q-btn.bg-primary,
body form .q-btn.bg-primary {
    background: var(--brand-primary) !important;
    color: var(--text-on-brand) !important;
    border: 1px solid var(--brand-primary) !important;
    box-shadow: var(--elev-raised) !important;
}
body .q-btn.bg-primary:hover,
body form .q-btn.bg-primary:hover {
    background: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
}
body .q-btn.bg-primary:active,
body form .q-btn.bg-primary:active {
    background: var(--brand-primary-active) !important;
    box-shadow: none !important;
}

/* An outlined primary is a secondary-weight brand action. */
body .q-btn--outline.text-primary { color: var(--brand-ink) !important; }
body .q-btn--outline.text-primary:before { border: 1px solid var(--brand-primary) !important; }
body .q-btn--outline.text-primary:hover { background: var(--surface-hover) !important; }

/* Confirming actions. The submit macro flips a button out of outline mode
   once a form is dirty, so this is what there-are-changes-to-save looks
   like, and it should look decisive. */
body .q-btn--standard.text-positive,
body .q-btn.bg-positive {
    background: var(--color-success) !important;
    color: var(--brand-on-secondary) !important; /* navy: white on the brand green is under AA */
    border: 1px solid var(--color-success) !important;
    box-shadow: var(--elev-raised) !important;
}
body .q-btn--outline.text-positive { color: var(--color-success-ink) !important; }
body .q-btn--outline.text-positive:before { border: 1px solid var(--color-success) !important; }

/* Destructive. Outlined at rest so it is never the thing you hit by
   accident, solid red only once you are on it. */
body .q-btn--outline.text-negative { color: var(--color-danger-ink) !important; }
body .q-btn--outline.text-negative:before { border: 1px solid var(--color-danger) !important; }
body .q-btn--outline.text-negative:hover {
    background: var(--color-danger) !important;
    color: var(--text-on-brand) !important;
}
body .q-btn.bg-negative {
    background: var(--color-danger) !important;
    color: var(--text-on-brand) !important;
}

body .q-btn--flat { color: var(--brand-ink) !important; }
body .q-btn--flat:hover { background: var(--surface-hover) !important; }

body .q-btn.disabled,
body .q-btn[disabled] {
    opacity: 1 !important;
    background: var(--surface-soft) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
}
body .q-btn.disabled:before { border-color: var(--border-default) !important; }

/* ---------------------------------------------------------------------
   8.3 Form fields

   One height, one radius, one focus treatment, and error text that
   reserves its space so the layout does not jump when validation fires.
   --------------------------------------------------------------------- */
body .q-field--outlined .q-field__control {
    border-radius: var(--radius-sm) !important;
    min-height: var(--ctl-h) !important;
    background: var(--surface-card);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
body .q-field--outlined .q-field__control:before { border: 1px solid var(--border-default) !important; }
body .q-field--outlined:hover .q-field__control:before { border-color: var(--border-strong) !important; }

body .q-field__native,
body .q-field__input {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base) !important;
    color: var(--text-strong) !important;
}

/* Autofill (2026-10-05, measured in the browser on Edit Merchant > Contact > Add address).

   Two things drew Chrome's autofill fill as a misaligned box:
   - The input is taller than its field: a dense q-input's control is 40px but its inner `.q-field__native` carries
     `min-height: 44px` (section 4.7, see "A dropdown is a field" below), so it hangs 4px below the bottom border. Nothing
     showed until something painted the input - which autofill does. Capped here to the control's height; min-height only,
     so textareas and selects, which have rules of their own, are untouched.
   - Chrome paints its fill on the input alone, with an !important background no author rule can beat. A field that was
     changed also gets Moqui's own background on the whole control (bg-blue-1 / bg-blue-10, the "changed" highlight), so
     the two blues never matched.

   So the input is painted with whatever colour its control has - the card colour, or the changed-field blue - by a large
   inset shadow (the one paint the autofill background cannot override), and keeps the field's text colour. Autofill
   itself stays on. --field-fill is set on the control and inherited by the input. */
body .q-field__control { --field-fill: var(--surface-card); }
body .q-field__control.bg-blue-1 { --field-fill: var(--brand-soft-2); }
body .q-field__control.bg-blue-10 { --field-fill: var(--brand-primary); }

/* Quasar's fixed palette tints used as soft highlights in screens (step trackers, the
   "Recurring" tag). Quasar sets them as literal hexes, so they would stay blue and
   purple under any brand: they follow the brand's soft tint instead. */
body:not(.body--dark) .bg-blue-1:not(.q-field__control),
body:not(.body--dark) .bg-purple-1 { background: var(--brand-soft-2) !important; }

/* White on the brand green is under AA, so anything Quasar fills green (a q-badge,
   q-chip or q-btn with color="positive" / "secondary" / "accent") carries navy text. */
body .bg-positive.text-white, body .bg-secondary.text-white, body .bg-accent.text-white,
body .bg-positive .text-white, body .bg-secondary .text-white, body .bg-accent .text-white {
    color: var(--brand-on-secondary) !important;
}

body .q-field--dense:not(.q-field--auto-height) .q-field__native:not(textarea) {
    min-height: 0 !important;
    max-height: 100%;
}

body .q-field__native:-webkit-autofill,
body .q-field__native:-webkit-autofill:hover,
body .q-field__native:-webkit-autofill:focus,
body .q-field__native:-webkit-autofill:active,
body .q-field__native:autofill,
body .q-field__input:-webkit-autofill,
body .q-field__input:-webkit-autofill:hover,
body .q-field__input:-webkit-autofill:focus,
body .q-field__input:-webkit-autofill:active,
body .q-field__input:autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--field-fill) inset !important;
    box-shadow: 0 0 0 1000px var(--field-fill) inset !important;
    -webkit-text-fill-color: var(--text-strong) !important;
    caret-color: var(--text-strong);
}

body .q-field__label {
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-medium) !important;
    color: var(--text-secondary) !important;
}

body .q-field--error .q-field__control:before { border-color: var(--color-danger) !important; }
body .q-field__bottom {
    font-size: var(--font-size-xs) !important;
    color: var(--text-muted) !important;
    padding-top: 4px !important;
}
body .q-field--error .q-field__bottom { color: var(--color-danger-ink) !important; }

body .q-field--readonly .q-field__control,
body .q-field--disabled .q-field__control { background: var(--surface-soft) !important; }

body form .q-field { margin-bottom: var(--space-3) !important; }

/* A dropdown is a field, and has to be the height of one.

   Measured in the browser, in the Advanced Search dialog on Merchants:
   every q-select's control came out 44px while the q-input beside it was
   40px. The cause is a disagreement between two heights, and it only ever
   shows on a select:

   - Quasar fixes a dense field at `height: 40px`. On a q-input that is the
     end of it, so the input is 40 and its 44px inner `.q-field__native`
     simply overflows a box that is never going to grow.
   - `.q-field--auto-height .q-field__control { height: auto }` takes that
     clamp off, and Quasar sets auto-height on every q-select. The select's
     control therefore grows to whatever is inside it, and what is inside
     it is a `.q-field__native` (or, on a select with `use-input`, a
     `.q-field__input`) carrying `min-height: var(--control-height-md)`,
     44px, from section 4.7.

   So the 44px was always there on every field; the select is just the only
   one honest enough to show it. The two numbers come from different eras
   of this stylesheet and were never reconciled.

   Fixed by making the select's floor the dense height and stopping the
   inner elements from pushing past it. `min-height`, never `height`, so a
   multiple select still grows when its chips wrap — `height:auto` from 4.7
   is deliberately left in place for that.

   Verified: all six fields in that dialog now measure 40px. */
body .q-field--auto-height .q-field__control,
body .q-select.q-select--multiple .q-field__control { min-height: var(--ctl-h-dense) !important; }

body .q-select .q-field__native { min-height: 0 !important; }

/* A single select keeps its value on one line. Quasar sets auto-height on every q-select, so the wrapping meant for
   a multiple select's chips (section 4.7) applied to single ones too: a long value ("Inventory - Finished Good",
   "United States Dollar [USD]") plus the select's search input did not fit one line, the input wrapped under it, and
   the value rose into the floating label. Now the value is cut with an ellipsis and the input takes what is left. */
body .q-select.q-select--single .q-field__native {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body .q-select.q-select--single .q-field__native > span {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body .q-select.q-select--single .q-field__native > .q-field__input {
    flex: 1 1 8px;
    min-width: 8px !important;
}

/* The search input inside a select keeps Quasar's own height, restated because the
   44px above would otherwise apply to it too.

   Restating it is not optional. Quasar sizes this element with `height: 0` plus
   `min-height: 24px`, so min-height *is* its height. Zeroing it along with the native
   collapsed the input to nothing, and `border-bottom-width: medium` on a zero-height box
   drew a hairline straight across every dropdown from the text to the arrow. */
body .q-select .q-field__input { min-height: 24px !important; }

/* The stray line across a focused dropdown.

   WebrootVue.qvt.css:84 draws `border-bottom: var(--q-color-primary) solid 1px`
   on `.q-field--focused .q-field__input`. That is Moqui's own focus cue, and it
   makes sense in the stock theme, where a field has no outline of its own and
   the underline is the only thing marking focus.

   Here it is not the only thing. Section 8.3 already marks focus with the 2px
   brand ring on `.q-field__control::after`, so the underline is a second cue
   drawn *inside* the ring - and on a select it starts 8px past the chosen value
   and runs to the arrow, which reads as a hairline struck through the middle of
   the dropdown rather than as an underline. The auto-focused first field of
   every dialog opened wearing one.

   Only the border is dropped. The `margin-left: 8px` from the same rule keeps
   the search caret off the selected text and is left alone.

   Selects only, because they are the only fields this reaches: a q-input puts
   its `<input>` in `.q-field__native`, and `.q-field__input` exists only as the
   search box of a select built with `use-input`. */
body .q-field--focused .q-field__input { border-bottom: 0 !important; }

/* A date field in a stacked form has to be as wide as the fields around it.

   m-date-time writes `style="max-width: max-content"` inline on its q-input
   (WebrootVue.qvt.js), which makes the field hug its own text. In a form
   row that is fine. In a form-single it is not: the field came out 226px
   in a column of 646px fields, narrow enough that the floating label was
   wider than the box it notches into, so the outline broke around it.

   Scoped to `.q-ma-sm >`, which is the wrapper the form-single macro puts
   around each field. The inline variants — `big-row-item` for a field-row
   and the plain `.row` that m-date-period lays its from/thru pair out in —
   do not match, so a date in a find row keeps its natural width.

   An inline style normally outranks a stylesheet, but not one marked
   important, which is why this works at all and why it has to say so. */
body .q-ma-sm > .q-field[style*="max-content"] { max-width: none !important; }

/* The Offset and Period dropdowns on a date period had nowhere to put their
   own value.

   m-date-period builds the whole widget as one q-input and hangs those two
   q-selects in its `before` slot. That slot is a `q-field__marginal`, laid
   out as a flex row, and the selects carry no width of their own, so they
   shrink to min-content: 12px of padding either side plus a 30px arrow,
   which is 54px of control and, measured, **0px** of text. Pick "30 Days"
   and the field shows nothing at all. Offset fared no better; it grew to
   30px once it held a value, just enough for "Last" and not enough for
   anything longer.

   116px is measured, not picked: rendered in the field's own font the
   widest option either list can hold is "30 Days" at 53.7px, and 116px
   leaves 62px of text area. The row still fits — 590px of the 631px it has
   in a find dialog — so nothing needs to wrap to buy it.

   `.q-field__before` holding a select is unique to this widget; the only
   other mentions of the slot in WebrootVue.qvt.js are TODO comments. */
body .q-field__before > .q-select { min-width: 116px !important; }

/* ---------------------------------------------------------------------
   8.4 Dropdowns and menus

   Quasar teleports q-menu to the body element, outside the page container,
   so these rules must stay at body level. Anything scoped under .q-page or
   a theme wrapper simply never matches the popup.
   --------------------------------------------------------------------- */
body .q-menu {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-menu) !important;
    box-shadow: var(--elev-overlay) !important;
    background: var(--surface-card) !important;
}

/* The 2px gap between items is transparent borders (1px each side), not a vertical margin:
   q-select lists are virtual-scrolled and Quasar sizes them by offsetHeight,
   which leaves margins out, so a margin made long dropdowns jump on hover and
   scroll. background-clip keeps the hover fill inside the border. */
body .q-menu .q-item {
    min-height: calc(var(--ctl-h) + 2px) !important;
    font-size: var(--font-size-base) !important;
    color: var(--menu-ink) !important;
    padding: 0 var(--space-4) !important;
    border-radius: var(--radius-sm);
    margin: 0 6px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    background-clip: padding-box;
}
body .q-menu .q-item:hover { background: var(--surface-hover) !important; }
body .q-menu .q-item--active,
body .q-menu .q-item.q-manual-focusable--focused {
    background: var(--brand-tint-8) !important;
    color: var(--brand-ink) !important;
    font-weight: var(--font-weight-semibold) !important;
}
body .q-menu .q-item__section--side .q-icon { color: var(--brand-primary) !important; }

/* Header breadcrumb dropdown (WebrootVue.qvt.ftl), same greens as the side menu (.ab-nav__icon): the deep green
   ink on white; hover and the current page fill navy with white text and the bright brand green icon. */
body .q-menu.ab-crumb-menu .q-item i,
body .q-menu.ab-crumb-menu .q-item img { color: var(--brand-secondary-ink) !important; }
body .q-menu.ab-crumb-menu .q-item:hover,
body .q-menu.ab-crumb-menu .q-item.ab-crumb-menu__item--active {
    background: var(--brand-primary) !important;
    color: #ffffff !important;
}
body .q-menu.ab-crumb-menu .q-item:hover a,
body .q-menu.ab-crumb-menu .q-item.ab-crumb-menu__item--active a { color: #ffffff !important; }
body .q-menu.ab-crumb-menu .q-item:hover i,
body .q-menu.ab-crumb-menu .q-item.ab-crumb-menu__item--active i { color: var(--brand-secondary) !important; }
body .q-menu.ab-crumb-menu .q-focus-helper { display: none; } /* Quasar's hover tint would wash the navy out */

body .q-select__dropdown-icon { color: var(--text-muted) !important; }
body .q-select .q-chip {
    background: var(--brand-tint-8) !important;
    color: var(--brand-ink) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: var(--font-weight-medium);
}

/* ---------------------------------------------------------------------
   8.5 Data tables

   The centre of an ERP. These are not q-table components, they are divs
   with display:table carrying q-table class names, so this styles the grid
   directly.

   The header is sticky. position:sticky does not work on a
   table-header-group, but it does work on the cells inside it, which is
   why the rule targets .th and not .thead.
   --------------------------------------------------------------------- */
body .q-table__container,
body .q-table__card {
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--elev-flat) !important;
    background: var(--surface-card) !important;
    /* Not plain overflow:hidden: that beat the overflow-x:auto in 4.3 and
       clipped every list wider than a phone screen with no way to scroll to
       the rest (FindEmployee's action column). auto still clips the corners. */
    overflow-x: auto;
    overflow-y: hidden;
}

body .q-table { font-size: var(--font-size-base); }

/* Numbers line up, so every figure is comparable at a glance. */
body .q-table .td,
body .q-table .th { font-variant-numeric: tabular-nums; }

body .q-table .thead .th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--table-header-bg) !important;
    color: var(--text-secondary) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: var(--font-weight-bold) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-strong) !important;
    padding: var(--space-3) var(--space-4) !important;
    vertical-align: middle;
}

body .q-table .tbody .td {
    color: var(--text-primary) !important;
    padding: 0 var(--space-4) !important;
    height: var(--row-h) !important;
    border-bottom: 1px solid var(--border-soft) !important;
}

body .q-table .tbody .tr:nth-of-type(even) { background: var(--table-stripe); }
body .q-table .tbody .tr:last-child .td { border-bottom: none !important; }

/* Quasar's ported hover uses a ::before overlay on each cell. Recolour it
   rather than fighting it with a background. */
body.desktop .q-table .tbody .tr:hover .td:before { background: var(--brand-tint-8) !important; }
body .q-table .tbody .tr.selected .td:after { background: var(--brand-tint-15) !important; }

/* The sort affordance in the header, and the find row under it. */
body .q-table .form-order-by .q-icon,
body .q-table .form-order-by i { color: var(--text-muted); font-size: 11px; }
body .q-table .form-order-by a:hover i,
body .q-table .form-order-by .m-link:hover i { color: var(--brand-primary); }

body .q-table .form-header-field .q-field--outlined .q-field__control { min-height: var(--ctl-h-sm) !important; }
body .q-table .form-header-field .q-field { margin-bottom: 0 !important; }

body .form-list-nav-row,
body .q-table .form-list-nav-row {
    background: var(--surface-soft) !important;
    border-bottom: 1px solid var(--border-default);
}

/* Actions in the last column stay quiet until the row is hovered. */
body .q-table .tbody .td .q-btn--flat { color: var(--text-secondary) !important; }
body.desktop .q-table .tbody .tr:hover .td .q-btn--flat { color: var(--brand-ink) !important; }

/* ---------------------------------------------------------------------
   8.6 Dialogs and boxes
   --------------------------------------------------------------------- */
body .q-dialog .q-card {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--elev-overlay) !important;
    border: 1px solid var(--border-default);
}
body .q-dialog .q-card__section--vert { padding: var(--space-5) var(--space-6) !important; }
body .q-dialog .q-card__actions {
    padding: var(--space-4) var(--space-6) !important;
    border-top: 1px solid var(--border-soft);
    background: var(--surface-soft);
}

body .q-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-default) !important;
    box-shadow: var(--elev-flat) !important;
}

/* ---------------------------------------------------------------------
   8.7 Trees

   The `tree` widget renders through m-tree-item in WebrootVue.qvt.js, which
   is a base component file and therefore not ours to change. Every rule
   here works against the markup it already emits:

     ul.tree-list > li > i            the toggle, fa-chevron-right/down on a
                                      branch, fa-square-o on a leaf
                    > span > a        the label, an m-link
                    > ul              the children, v-show toggled

   The only styling it arrives with is `list-style:none` and a 20px left
   pad from the webroot stylesheet, which is why an untouched tree reads as
   a bulleted list that lost its bullets. Two things are outright broken
   rather than plain, and both are fixed below:

   - `fa-square-o` is a Font Awesome 4 name. It is not in the FA5 bundle, so
     every leaf renders an empty box of nothing and the labels at one depth
     fail to line up with each other. A leaf gets a drawn dot instead.
   - The selected node is marked with `text-success`, a Bootstrap 3 class.
     Bootstrap is not loaded on /qapps, so selection had no appearance at
     all. In a tree that class means "this is the one you are on", not
     "this is good news", so it is given the brand rather than the success
     colour.

   The hover and selected treatment sits on the label, not on the whole
   row, for the reason the dashboard band puts a link on the figure rather
   than the tile: the hit target should be the thing that looks clickable.
   --------------------------------------------------------------------- */
body ul.tree-list,
body ul.tree-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body ul.tree-list { padding: var(--space-2) 0; }

/* The children of a node, indented behind a guide rail. The rail is what
   lets someone read which accounts sit under which at four levels deep,
   and it costs one border. It lines up with the middle of the toggle
   above it: 9px is half of the toggle's 18px box. */
body ul.tree-list ul {
    margin-left: 9px;
    padding-left: var(--space-4);
    border-left: 1px solid var(--border-default);
}

/* A node is a row: toggle and label on one line, children on their own
   full-width line below. Nothing sets `display` on the child list, because
   v-show writes display:none inline to collapse it and a stylesheet rule
   here would fight it. */
body ul.tree-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 26px;
}
body ul.tree-list li > ul { flex: 0 0 100%; }

/* The toggle. A real affordance: a square, centred target with its own
   hover state, rather than a stray glyph sitting next to the text. */
body ul.tree-list li > i {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: var(--space-1);
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
body ul.tree-list li > i.fa-chevron-right:hover,
body ul.tree-list li > i.fa-chevron-down:hover {
    background: var(--surface-hover);
    color: var(--brand-ink);
}
body ul.tree-list li > i.fa-chevron-down { color: var(--brand-ink); }

/* A leaf. fa-square-o has no glyph in FA5, so the box is empty and draws a
   dot of its own. Not a pointer: there is nothing to expand. */
body ul.tree-list li > i.fa-square-o {
    cursor: default;
    font-size: 0;
}
body ul.tree-list li > i.fa-square-o:before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-strong);
}

/* The label, which is the hit target. */
body ul.tree-list li > span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.15s ease;
}
body ul.tree-list li > span:hover { background: var(--surface-hover); }

body ul.tree-list li > span a,
body ul.tree-list li > span > span {
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: var(--text-primary);
    text-decoration: none;
    /* Account codes are the first thing on every label in a chart of
       accounts, and they only line up as a column if the figures are. */
    font-variant-numeric: tabular-nums;
}
body ul.tree-list li > span a:hover { color: var(--brand-ink); text-decoration: none; }

/* Selection. text-success is the marker m-tree-item sets; here it means
   selected. The label carries a tint so the row is findable after the page
   has scrolled, and the text carries the brand. */
body ul.tree-list .text-success {
    color: var(--brand-ink) !important;
    font-weight: var(--font-weight-semibold);
}
body ul.tree-list li > span:has(.text-success) { background: var(--brand-tint-8); }

/* The top level reads as the sections of the chart rather than as more
   rows, so it is the one level that gets weight. */
body ul.tree-list > li > span a { font-weight: var(--font-weight-semibold); }

body ul.tree-list li > span a:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   8.8 Date and time pickers

   The calendar popup was rendering with four and a half of its seven
   columns visible, the rest cut off at the edge of the panel. Measured:
   the panel is 290px, and the day grid inside it had grown to 427px.

   Quasar sizes a day cell exactly, `.q-date__calendar-item button
   { width: 30px; height: 30px; border-radius: 50% }`, and the grid is laid
   out in percentages off that. Section 8.2's `body .q-btn` is one class and
   one element, the same weight as that selector, but it is marked important
   and so wins: every day in the month was being given `min-height: 34px`
   and `padding: 0 12px` as though it were a toolbar button. Seven of those
   do not fit in 290px, so the grid overflowed and the panel clipped it.

   This is the cost of styling every button through one selector, which
   section 8.2 does deliberately because the macros give buttons no
   distinguishing markup. The pickers are the one place that needs to be
   undone: their buttons are not buttons in the design system's sense, they
   are cells in a grid that Quasar measures itself.

   So the geometry is handed back, and only the geometry — the brand colour
   on the header and the selected day comes through --q-color-primary and is
   already right. Verified: the grid measures 283.7px inside a 290px panel
   and all seven weekdays are visible. */
body .q-date .q-btn,
body .q-time .q-btn {
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
}

body .q-date__calendar-item button,
body .q-date__calendar-item > div {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
}

/* The year and month lists are the one part of a picker that really is a
   list of buttons, so they keep a readable target. */
body .q-date__years-item .q-btn,
body .q-date__months-item .q-btn {
    min-height: 28px !important;
    padding: 0 var(--space-2) !important;
    border-radius: var(--radius-sm) !important;
}

/* The year's forward arrow was falling off the right edge of the panel.

   The navigation row holds six cells — arrow, month, arrow, arrow, year,
   arrow — and Quasar sizes the first and last of them differently from the
   ones in between: `width: 8%; min-width: 24px` on the outer two, content
   width on the inner two. That is sized for Quasar's own arrow button. The
   buttons in this theme come out at 31.2px, so the last cell's button was
   7px wider than the 24px cell holding it, and the panel clipped what
   spilled out. Measured: the arrow's right edge at 776.2px against a panel
   ending at 768.5px, and 9px of overflow inside the row.

   Both halves have to be fixed. Letting the outer cells size to their
   content the way the inner ones do takes the row's own overflow to zero,
   but the row is still wider than a 290px panel leaves room for, so the
   arrow stays outside it. The panel's floor goes up to 336px, which puts
   the arrow 18px inside the edge and leaves the day grid comfortable
   rather than merely fitting.

   Verified at 336px: no overflow in the navigation row, both month and
   both year arrows fully inside the panel, seven weekday columns, and the
   header stacked as Quasar draws it. */
body .q-date { min-width: 336px !important; }

body .q-date__navigation > div:first-child,
body .q-date__navigation > div:last-child {
    width: auto !important;
    min-width: 0 !important;
}

/* ---------------------------------------------------------------------
   8.9 Density below desktop

   Tables are the thing that breaks first on a narrow screen. Let the grid
   scroll sideways inside its own container, with the page itself still
   behaving, and tighten the row height.
   --------------------------------------------------------------------- */
@media (max-width: 1023px) {
    body .q-table__middle { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    body .q-table .tbody .td { height: var(--row-h-dense) !important; }
    body .q-table .thead .th,
    body .q-table .tbody .td { padding: var(--space-2) var(--space-3) !important; }
}

@media (max-width: 599px) {
    body .q-dialog .q-card__section--vert { padding: var(--space-4) !important; }
    body .q-dialog .q-card__actions { padding: var(--space-3) var(--space-4) !important; }
}

/* =====================================================================
   9. REFINEMENT

   The pass that separates "styled" from "designed". Nothing here changes
   what the UI does. It is rhythm, weight, spacing and restraint: the box
   that every screen is built from, the nav, the popups, and the small
   moments of motion that make the product feel considered rather than
   assembled.

   The rule followed throughout: one idea per surface. A header is a
   header because of type and a hairline, not because of a fill, a shadow
   and a border all at once.
   ===================================================================== */

/* ---------------------------------------------------------------------
   9.1 Typographic rhythm

   Lexend is a well-drawn face and was being used at default metrics. Tight
   tracking on headings and a slightly open body line-height is most of the
   difference between "a webpage" and "a product".
   --------------------------------------------------------------------- */
body {
    line-height: 1.55;
    font-feature-settings: "cv05" 1, "ss01" 1;
    text-rendering: optimizeLegibility;
}

body h1, body h2, body h3,
body h4, body h5, body h6 {
    letter-spacing: -0.015em;
    line-height: 1.25;
    font-weight: var(--font-weight-semibold);
    color: var(--text-heading);
}

/* Small caps labels: the quiet workhorse of a dense UI. */
body .text-caption,
body .q-item__label--caption {
    font-size: var(--font-size-xs) !important;
    letter-spacing: 0.02em;
    color: var(--text-muted) !important;
}

/* ---------------------------------------------------------------------
   9.2 The container box

   Every screen in the product is a stack of these, so this is the single
   highest-leverage surface in the theme. The header earns its separation
   from a hairline and type weight alone, and the collapse chevron stays
   out of the way until it is wanted.
   --------------------------------------------------------------------- */
body .m-container-box {
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-card) !important;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body .m-container-box:hover { border-color: var(--border-strong) !important; }
body .m-container-box:focus-within {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px var(--brand-tint-8);
}

body .m-container-box > .q-card__actions {
    padding: var(--space-3) var(--space-4) !important;
    min-height: 48px;
    border-bottom: 1px solid var(--border-soft);
    background: transparent !important;
    gap: var(--space-2);
}

body .m-container-box > .q-card__actions h5 {
    margin: 0 !important;
    font-size: var(--font-size-md) !important;
    font-weight: var(--font-weight-semibold) !important;
    line-height: 1.3 !important;
    color: var(--text-heading) !important;
    letter-spacing: -0.01em;
}

/* The collapse chevron: present, not prominent. */
body .m-container-box > .q-card__actions > .q-btn--round {
    color: var(--text-muted) !important;
    opacity: 0.7;
    transition: opacity 0.15s ease, color 0.15s ease;
}
body .m-container-box:hover > .q-card__actions > .q-btn--round { opacity: 1; }
body .m-container-box > .q-card__actions > .q-btn--round:hover { color: var(--brand-primary) !important; }

body .m-container-box > div > .q-card__section { padding: var(--space-4) !important; }

/* A box whose body is a table should let the table meet the edges. */
body .m-container-box .q-table__container {
    border: none !important;
    border-radius: 0 !important;
}
body .m-container-box > div > .q-card__section:has(.q-table__container) { padding: 0 !important; }

body.body--dark .m-container-box > .q-card__actions { border-bottom-color: rgba(255, 255, 255, 0.08); }

/* ---------------------------------------------------------------------
   9.3 Navigation: the side menu is <ab-side-menu> (Assets/js/AbSideMenu.js), styled in .ab-nav below
   --------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   9.4 Popovers, chips and badges
   --------------------------------------------------------------------- */
body .q-tooltip {
    background: var(--tooltip-bg) !important;
    color: var(--tooltip-ink) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: var(--font-weight-medium);
    padding: 5px 9px !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--elev-overlay) !important;
    letter-spacing: 0.01em;
}

body .q-badge {
    border-radius: var(--radius-pill) !important;
    font-weight: var(--font-weight-semibold);
    font-size: 10px !important;
    letter-spacing: 0.02em;
    padding: 3px 7px !important;
}

body .q-chip {
    border-radius: var(--radius-sm) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm) !important;
}

body .q-separator { background: var(--border-soft) !important; }

/* ---------------------------------------------------------------------
   9.5 Table finish

   Small alignment details. The first and last cells line up with the box
   padding instead of the grid, which is what makes a table look set into
   the page rather than dropped onto it.
   --------------------------------------------------------------------- */
body .q-table .thead .th:first-child,
body .q-table .tbody .td:first-child { padding-left: var(--space-5) !important; }
body .q-table .thead .th:last-child,
body .q-table .tbody .td:last-child { padding-right: var(--space-5) !important; }

body .q-table .tbody .tr { transition: background-color 0.12s ease; }

/* Links inside a grid read as data first, action second. */
body .q-table .tbody .td a,
body .q-table .tbody .td .m-link {
    color: var(--brand-ink);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
body .q-table .tbody .td a:hover,
body .q-table .tbody .td .m-link:hover { border-bottom-color: var(--brand-primary); }

/* ...but only for links that are actually text. A link-type="anchor-button",
   which is what a View Details cell is, renders m-link wrapping a q-btn, and
   m-link resolves to <a class="q-link"> while the macro puts class="m-link" on
   the q-btn itself. So both elements matched the rule above and the hover drew
   a brand coloured rule across the bottom edge of the button. A button already
   carries its own outline and hover state; the underline affordance belongs to
   text links alone.

   :has() covers the wrapping anchor. Where it is unsupported the selector is
   dropped and the .q-btn half still does most of the work. */
body .q-table .tbody .td .m-link.q-btn,
body .q-table .tbody .td a:has(.q-btn) {
    border-bottom: 0 !important;
}

/* ---------------------------------------------------------------------
   9.6 Motion

   Fast, short, and only on things the pointer is on. Anything longer than
   200ms in a tool people use all day becomes a tax.
   --------------------------------------------------------------------- */
body .q-card,
body .q-item,
body .q-btn { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
    body *,
    body *:before,
    body *:after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------
   9.7 Scrollbars and the loading bar
   --------------------------------------------------------------------- */
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-track { background: transparent; }
body ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-pill);
    border: 3px solid transparent;
    background-clip: content-box;
}
body ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }
body { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

body .q-loading-bar { background: var(--brand-primary) !important; height: 2px !important; }
body .q-spinner { color: var(--brand-primary); }

/* ---------------------------------------------------------------------
   9.8 Page rhythm
   --------------------------------------------------------------------- */
body .q-page { padding: var(--space-4) !important; }

@media (max-width: 599px) {
    body .q-page { padding: var(--space-3) !important; }
    body .m-container-box > .q-card__actions { padding: var(--space-3) !important; }
    body .m-container-box > div > .q-card__section { padding: var(--space-3) !important; }
    body .q-table .thead .th:first-child,
    body .q-table .tbody .td:first-child { padding-left: var(--space-3) !important; }
    body .q-table .thead .th:last-child,
    body .q-table .tbody .td:last-child { padding-right: var(--space-3) !important; }
}

/* ---------------------------------------------------------------------
   9.9 Statistics

   A figure that matters should be readable from across a desk. These are
   theme-level classes, not app-level ones, so any screen in any product
   built on this theme gets the same treatment by using stat-row,
   stat-tile, stat-value and stat-label.

   On the plain HTML render path these classes are not styled at all and
   the markup degrades to ordinary divs, which still read correctly.
   --------------------------------------------------------------------- */
/* The band runs full width across the top of a dashboard, outside any box,
   and carries its own bottom margin so the content below does not need to
   know it is there. Tiles share the width equally and wrap to their own
   rows on narrow screens rather than shrinking into unreadability. */
body .stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: 0 var(--space-2) var(--space-4);
}

body .stat-tile {
    flex: 1 1 170px;
    min-width: 150px;
    padding: var(--space-5);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

body .stat-tile:hover {
    border-color: var(--brand-primary);
    background: var(--brand-tint-3);
}

body .stat-value {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    font-variant-numeric: tabular-nums;
}

body .stat-label {
    margin-top: 4px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* An amount in more than one currency: the base currency is the stat-value,
   each other currency a smaller line under it (never added together, never
   squeezed onto one line). A short note under the label (a count, a "since")
   is stat-sub, in sentence case. */
body .stat-value-more {
    margin-top: 2px;
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    color: var(--text-heading);
    font-variant-numeric: tabular-nums;
}
body .stat-sub {
    margin-top: 2px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* A tile that is reporting something the user should notice. The colour is
   carried by the figure and a rail, never by the whole fill, so a row of
   tiles stays scannable. */
body .stat-tile-warn {
    border-color: var(--color-warning);
    background: var(--surface-card);
}
body .stat-tile-warn .stat-value, body .stat-tile-warn .stat-value-more { color: var(--color-warning-ink); }
body .stat-tile-warn:hover { border-color: var(--color-warning); background: var(--surface-soft); }

@media (max-width: 1023px) {
    /* Two across on a tablet reads better than four squeezed ones. */
    body .stat-tile { flex: 1 1 calc(50% - var(--space-4)); }
}

@media (max-width: 599px) {
    body .stat-row { gap: var(--space-3); margin: 0 0 var(--space-3); }
    body .stat-tile { flex: 1 1 100%; padding: var(--space-4); }
    body .stat-value { font-size: 26px; }
}

/* Item table on the purchase order detail (Procurement › Purchase Orders): rows built from containers, so the
   number and action columns get fixed widths here to line up with the header row. */
body .ab-item-seq { width: 56px; flex: 0 0 56px; }
body .ab-item-actions { width: 150px; flex: 0 0 150px; }
@media (max-width: 1023px) {
    body .ab-item-actions { width: 100%; flex: 1 1 100%; margin-top: var(--space-3); }
}

/* Header card of the one-party pages (Party › Merchant, Customer, Employee, Carrier; Procurement › Supplier;
   commons template/party/PartyHeaderStart/End.qvt.ftl): avatar, kind, name and status, stat tiles on the right, then a strip
   of contact and facts. Sits above the page's tab bar. */
body .ab-party-header {
    margin: 0 var(--space-2) var(--space-4);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    box-shadow: var(--elev-raised);
    overflow: hidden;
}
body .ab-party-header__main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-5); }
body .ab-party-header__avatar-wrap { position: relative; flex: 0 0 64px; width: 64px; height: 64px; }
body .ab-party-header__avatar {
    display: block; width: 64px; height: 64px; border-radius: var(--radius-md);
    border: 1px solid var(--border-default); background: var(--surface-soft); object-fit: contain;
}
/* the change-image dialog's button, small, on the avatar's corner */
body .ab-party-header__avatar-wrap .q-btn {
    position: absolute; right: -8px; bottom: -8px;
    width: 26px !important; height: 26px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important;
    border-radius: var(--radius-pill) !important; background: var(--surface-card) !important; font-size: 11px !important;
    box-shadow: var(--elev-raised);
}
body .ab-party-header__title { flex: 1 1 240px; min-width: 0; }
body .ab-party-header__kind {
    font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-muted);
}
body .ab-party-header__name-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 2px 0; }
body .ab-party-header__name { font-size: 22px; font-weight: var(--font-weight-bold); color: var(--text-heading); line-height: 1.2; overflow-wrap: anywhere; }
body .ab-party-header__status {
    display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--radius-sm);
    font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: #ffffff;
}
body .ab-party-header__status.ab-tone-success { background: var(--color-success); color: var(--brand-on-secondary); }
body .ab-party-header__status.ab-tone-danger { background: var(--color-danger); }
body .ab-party-header__status.ab-tone-warning { background: var(--color-warning); }
body .ab-party-header__status.ab-tone-muted { background: var(--text-muted); }
body .ab-party-header__id { font-size: var(--font-size-sm); color: var(--text-muted); }
body .ab-party-header__stats { display: flex; flex-wrap: wrap; gap: var(--space-3); }
body .ab-party-header__stat {
    width: 112px; padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-soft);
}
body .ab-party-header__stat-label { font-size: var(--font-size-xs); color: var(--text-muted); }
body .ab-party-header__stat-value { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--text-heading); overflow-wrap: anywhere; }
body .ab-party-header__stat-sub { font-size: var(--font-size-xs); color: var(--text-muted); }
/* a stat tile with a tone (only the carrier's Duty tile today): tinted, a coloured value with a dot before it */
body .ab-party-header__stat.ab-tone-success { border-color: var(--color-success); background: rgba(17, 209, 103, 0.10); }
body .ab-party-header__stat.ab-tone-danger { border-color: var(--color-danger); background: rgba(239, 80, 112, 0.10); }
body .ab-party-header__stat.ab-tone-success .ab-party-header__stat-value { color: var(--color-success-ink); }
body .ab-party-header__stat.ab-tone-danger .ab-party-header__stat-value { color: var(--color-danger-ink); }
body .ab-party-header__stat.ab-tone-success .ab-party-header__stat-value::before,
body .ab-party-header__stat.ab-tone-danger .ab-party-header__stat-value::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%;
    vertical-align: middle; background: currentColor;
}
body .ab-party-header__facts {
    display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border-soft); background: var(--surface-soft);
    font-size: var(--font-size-base); color: var(--text-primary);
}
body .ab-party-header__fact { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; overflow-wrap: anywhere; }
body .ab-party-header__fact i { color: var(--text-muted); }
body .ab-party-header__fact a { color: var(--brand-primary); text-decoration: none; }
body .ab-party-header__fact a:hover { text-decoration: underline; }
@media (max-width: 599px) {
    body .ab-party-header__main { padding: var(--space-4); }
    body .ab-party-header__stats { width: 100%; }
    body .ab-party-header__stat { flex: 1 1 calc(50% - var(--space-3)); width: auto; }
    body .ab-party-header__facts { padding: var(--space-3) var(--space-4); }
}

/* Status pills in the party lists (Find Wholesaler, Find Merchant, ...): a soft tinted pill with a dot, coloured by tone. */
body .status-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill);
    font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); line-height: 1.6; white-space: nowrap;
    background: rgba(100, 116, 139, 0.12); color: var(--text-muted);
}
body .status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body .status-pill.tone-success { background: rgba(17, 209, 103, 0.12); color: var(--color-success-ink); }
body .status-pill.tone-danger { background: rgba(239, 80, 112, 0.12); color: var(--color-danger-ink); }
body .status-pill.tone-warning { background: rgba(245, 158, 11, 0.14); color: var(--color-warning-ink); }
body .status-pill.tone-info { background: rgba(47, 58, 168, 0.12); color: var(--brand-info); }
/* more tones, for statuses with many steps (purchase orders): blue, purple, orange, and an explicit grey */
body .status-pill.tone-primary { background: var(--brand-tint-8); color: var(--brand-ink); }
body .status-pill.tone-purple { background: rgba(47, 58, 168, 0.12); color: #2f3aa8; }
body .status-pill.tone-orange { background: rgba(234, 88, 12, 0.12); color: #c2410c; }
body .status-pill.tone-grey { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }
body.body--dark .status-pill.tone-primary { background: rgba(120, 130, 255, 0.22); color: #a9b0ff; }
body.body--dark .status-pill.tone-purple { background: rgba(124, 58, 237, 0.22); color: #c4a5fa; }
body.body--dark .status-pill.tone-orange { background: rgba(234, 88, 12, 0.22); color: #fdba74; }
body .status-pill-sub { display: block; margin-top: 2px; font-size: var(--font-size-xs); color: var(--text-muted); white-space: nowrap; }

/* A restyled form-list (LIST-SCREEN-DESIGN.md; every list of the ahlabot modules and commons): status tabs above it, then the list inside
   <container style="list-modern">, which gives it taller rows, a hover highlight and a soft header. Scoped to the
   wrapper so the other lists keep the stock look until they opt in. */
body .list-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-3); }
body .list-tabs a.list-tab {
    display: inline-flex; align-items: center; padding: 5px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-primary);
    font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); text-decoration: none;
    transition: var(--transition-fast);
}
body .list-tabs a.list-tab:hover { border-color: var(--brand-primary); color: var(--brand-ink); }
body .list-tabs a.list-tab.is-active { background: var(--brand-primary); border-color: var(--brand-primary); color: #ffffff; }

/* A month strip (Finance › Expenses, EXPENSES.md): round arrows either side of six month chips, each with the month and
   its total; the chosen month filled navy, a month with nothing muted. Scrolls sideways on a phone. */
body .month-strip { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); }
body .month-strip-chips {
    display: flex; flex: 1 1 auto; gap: 4px; padding: 4px; overflow-x: auto; scrollbar-width: none;
    background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg);
}
body .month-strip-chips::-webkit-scrollbar { display: none; }
body .month-strip a.month-chip {
    flex: 1 0 96px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px;
    border-radius: var(--radius-md); color: var(--text-primary); text-decoration: none; transition: var(--transition-fast);
}
body .month-strip a.month-chip:hover { background: var(--surface-soft); }
body .month-strip .month-chip-name { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
body .month-strip .month-chip-total { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); white-space: nowrap; }
body .month-strip a.month-chip.is-empty .month-chip-total { color: var(--text-muted); font-weight: normal; }
body .month-strip a.month-chip.is-active { background: var(--brand-primary); box-shadow: 0 2px 8px rgba(3, 4, 84, 0.18); }
body .month-strip a.month-chip.is-active .month-chip-name { color: rgba(255, 255, 255, 0.75); }
body .month-strip a.month-chip.is-active .month-chip-total { color: #ffffff; }
body .month-strip .month-strip-arrow {
    flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-primary); text-decoration: none;
    transition: var(--transition-fast);
}
body .month-strip a.month-strip-arrow:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
body .month-strip .month-strip-arrow.is-disabled { opacity: 0.35; cursor: default; }
body.body--dark .month-strip a.month-chip.is-active { box-shadow: none; }

body .list-modern .q-table__container { border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
body .list-modern .q-table .thead .tr:last-child .th {
    background: var(--surface-soft); color: var(--text-muted); font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase;
    padding-top: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border-default);
}
body .list-modern .q-table .tbody .td { padding-top: var(--space-3); padding-bottom: var(--space-3); vertical-align: middle; }
body .list-modern .q-table .tbody .tr:hover .td { background: var(--brand-tint-3) !important; }
body .list-modern .q-table .tbody .td .form-group { margin: 0; }
body .list-modern a.list-primary { font-weight: var(--font-weight-bold); color: var(--brand-ink); text-decoration: none; }
body .list-modern a.list-primary:hover { text-decoration: underline; }
body .list-modern .list-sub { display: block; margin-top: 2px; font-size: var(--font-size-xs); color: var(--text-muted); }
body .list-modern .list-tag {
    display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: var(--radius-sm);
    background: var(--brand-tint-8); color: var(--brand-ink); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold);
}
body .list-modern .list-tag.is-muted { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }

/* list-modern, continued: a column that holds several fields shows one header (the first field's), tags sit on one
   line, rows have no zebra stripes, the wholesaler gets an initials avatar, the card count a bar of how many are active,
   and the open button is a quiet icon that fills on hover. */
body .list-modern .q-table .thead .th > div:not(:first-child) { display: none; }
body .list-modern .q-table .tbody .tr,
body .list-modern .q-table .tbody .tr .td { background: transparent !important; }
body .list-modern .q-table .tbody .tr .td { border-bottom: 1px solid var(--border-soft); }
body .list-modern .q-table .tbody .tr:last-child .td { border-bottom: none; }
body .list-modern .q-table .tbody .tr:hover .td { background: var(--brand-tint-3) !important; }
body .list-modern .q-table .tbody .td:has(.list-tag) > .form-group { display: inline-block; }
body .list-modern .q-table .tbody .td:has(.list-avatar) > .form-group { display: inline-flex; align-items: center; gap: var(--space-2); }
body .list-modern .list-avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 30px;
    border-radius: var(--radius-pill); background: var(--brand-tint-8); color: var(--brand-ink);
    font-size: 11px; font-weight: var(--font-weight-bold); letter-spacing: 0.02em;
}
body .list-modern .list-name { font-weight: var(--font-weight-semibold); color: var(--text-primary); }
body .list-modern .list-bar {
    position: relative; width: 120px; margin-top: 4px; padding-bottom: 7px;
    font-size: var(--font-size-xs); color: var(--text-muted); white-space: nowrap;
}
body .list-modern .list-bar::before,
body .list-modern .list-bar::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 4px; border-radius: var(--radius-pill);
}
body .list-modern .list-bar::before { width: 100%; background: var(--border-soft); }
body .list-modern .list-bar::after { width: var(--bar, 0%); background: var(--color-success); }
body .list-modern .list-bar.p-0 { --bar: 0%; }
body .list-modern .list-bar.p-5 { --bar: 5%; }
body .list-modern .list-bar.p-10 { --bar: 10%; }
body .list-modern .list-bar.p-15 { --bar: 15%; }
body .list-modern .list-bar.p-20 { --bar: 20%; }
body .list-modern .list-bar.p-25 { --bar: 25%; }
body .list-modern .list-bar.p-30 { --bar: 30%; }
body .list-modern .list-bar.p-35 { --bar: 35%; }
body .list-modern .list-bar.p-40 { --bar: 40%; }
body .list-modern .list-bar.p-45 { --bar: 45%; }
body .list-modern .list-bar.p-50 { --bar: 50%; }
body .list-modern .list-bar.p-55 { --bar: 55%; }
body .list-modern .list-bar.p-60 { --bar: 60%; }
body .list-modern .list-bar.p-65 { --bar: 65%; }
body .list-modern .list-bar.p-70 { --bar: 70%; }
body .list-modern .list-bar.p-75 { --bar: 75%; }
body .list-modern .list-bar.p-80 { --bar: 80%; }
body .list-modern .list-bar.p-85 { --bar: 85%; }
body .list-modern .list-bar.p-90 { --bar: 90%; }
body .list-modern .list-bar.p-95 { --bar: 95%; }
body .list-modern .list-bar.p-100 { --bar: 100%; }
body .list-modern .q-btn.list-open {
    width: 32px; height: 32px; min-height: 0 !important; padding: 0 !important; border-radius: var(--radius-pill) !important;
    border: 1px solid var(--border-default) !important; background: transparent !important; color: var(--text-muted) !important;
}
body .list-modern .q-btn.list-open:before { border: none !important; }
/* a labelled row action beside list-open's place (Expenses' Pay): a small filled navy pill */
body .list-modern .q-btn.list-pay {
    min-height: 32px !important; padding: 0 14px !important; border-radius: var(--radius-pill) !important;
    background: var(--brand-primary) !important; color: #ffffff !important; font-weight: var(--font-weight-semibold);
}
body .list-modern .q-btn.list-pay:before { border: none !important; }
body .list-modern .q-btn.list-pay .q-icon { font-size: 14px; margin-right: 6px; }
body .list-modern .q-table .tbody .tr:hover .q-btn.list-open {
    background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #ffffff !important;
}

/* list-modern, the list's top bar (Find Options, Columns, CSV / XLS on the left; page size, go to page and paging on
   the right): Find Options is a tinted pill as the main action, Columns an outlined pill, CSV and XLS one segmented
   export control with a download icon, and the pages round buttons. CSS only: the markup is Moqui's own. */
body .list-modern .form-list-nav-row > th { padding: var(--space-3) var(--space-4) !important; background: var(--surface-card); border-bottom: 1px solid var(--border-default); }
body .list-modern .form-list-nav-row .col-sm-6 > .row { align-items: center; gap: var(--space-2); }
/* the actions half takes the room it needs and the paging half only its own width, so Select Find, Search, Columns,
   Saved Finds and Export stay on one line (two equal halves pushed Export onto a second line, 2026-10-12) */
body .form-list-nav-row th > .row { flex-wrap: nowrap; align-items: center; column-gap: var(--space-3); }
body .form-list-nav-row th > .row > .col-sm-6:first-child { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; }
body .form-list-nav-row th > .row > .col-sm-6:last-child:not(:first-child) { flex: 0 0 auto; width: auto; max-width: none; }
@media (max-width: 900px) { body .form-list-nav-row th > .row { flex-wrap: wrap; } body .form-list-nav-row th > .row > .col-sm-6 { flex: 1 1 100% !important; } }
/* the paging half only: on a list without paging the actions half is also :last-child, and right-aligning it without
   wrapping pushed its first buttons off the left edge */
body .list-modern .form-list-nav-row .col-sm-6:last-child:not(:first-child) > .row { justify-content: flex-end; flex-wrap: nowrap; }
/* the top bar's buttons and "No results found" keep their text on one line (Quasar's q-btn--wrap let a long
   "Advanced Search - TimeEntryList" break in two); a crowded bar wraps whole buttons onto the next line instead */
body .list-modern .form-list-nav-row .q-btn__content .block,
body .list-modern .form-list-nav-row .text-warning,
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > span { white-space: nowrap; }
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > span { flex-shrink: 0; }
body .list-modern .form-list-nav-row .q-btn {
    min-height: 32px !important; height: 32px; padding: 0 var(--space-3) !important; border-radius: var(--radius-pill) !important;
    font-size: var(--font-size-sm) !important; font-weight: var(--font-weight-semibold) !important; text-transform: none !important;
    color: var(--text-primary) !important; background: var(--surface-card) !important; box-shadow: none !important;
}
body .list-modern .form-list-nav-row .q-btn:before { border: 1px solid var(--border-default) !important; border-radius: inherit !important; }
body .list-modern .form-list-nav-row .q-btn:hover:before { border-color: var(--brand-primary) !important; }
body .list-modern .form-list-nav-row .q-btn .q-icon { font-size: 16px !important; color: var(--text-muted) !important; }
/* Find Options: the first button on the left */
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > span:first-of-type .q-btn {
    background: var(--brand-tint-8) !important; color: var(--brand-ink) !important;
}
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > span:first-of-type .q-btn:before { border-color: var(--brand-tint-15) !important; }
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > span:first-of-type .q-btn .q-icon { color: var(--brand-primary) !important; }
/* CSV and XLS: one segmented control */
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > a.q-btn:first-of-type {
    margin-left: var(--space-2); margin-right: 0 !important; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
}
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > a.q-btn:first-of-type .q-btn__content:before {
    content: "\f019"; font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free"; font-weight: 900; font-size: 12px;
    margin-right: 6px; color: var(--text-muted);
}
body .list-modern .form-list-nav-row .col-sm-6:first-child .row > a.q-btn:last-of-type {
    margin-left: -9px !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
}
/* paging */
body .list-modern .form-list-nav-row .q-pagination .q-btn { min-width: 30px !important; width: auto; padding: 0 8px !important; }
body .list-modern .form-list-nav-row .q-pagination .q-btn:before { border-color: transparent !important; }
body .list-modern .form-list-nav-row .q-pagination .q-btn:hover { background: var(--brand-tint-8) !important; }
body .list-modern .form-list-nav-row .q-pagination > span,
body .list-modern .form-list-nav-row .q-pagination .text-weight-bold { font-size: var(--font-size-sm); color: var(--text-muted); }
body .list-modern .form-list-nav-row .q-field--outlined .q-field__control { border-radius: var(--radius-pill) !important; min-height: 32px; height: 32px; }
body .list-modern .form-list-nav-row .q-field__control:before { border-color: var(--border-default) !important; }
body .list-modern .form-list-nav-row .q-field__native, body .list-modern .form-list-nav-row .q-field__marginal { min-height: 30px; height: 30px; font-size: var(--font-size-sm); }

/* list-modern cell helpers: a primary value that is not a link, a monospaced value (card numbers), an amount */
body .list-modern .list-primary-text { font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .list-modern .list-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--font-size-sm); color: var(--text-primary); letter-spacing: 0.02em; }
body .list-modern .list-amount { font-weight: var(--font-weight-bold); color: var(--text-heading); font-variant-numeric: tabular-nums; }
body .list-modern .list-amount.is-credit { color: var(--color-success-ink); }
body .list-modern .list-tag.is-warning { background: rgba(245, 158, 11, 0.14); color: var(--color-warning-ink); }
body .list-modern .list-tag.is-danger { background: rgba(239, 80, 112, 0.12); color: var(--color-danger-ink); }

/* list-modern, more helpers: secondary text that may wrap (descriptions, values), and a delete button like the open
   one that turns red on hover */
body .list-modern .list-sub-text { font-size: var(--font-size-sm); color: var(--text-muted); line-height: 1.45; }
body .list-modern .q-btn.list-delete {
    width: 32px; height: 32px; min-height: 0 !important; padding: 0 !important; border-radius: var(--radius-pill) !important;
    background: transparent !important; color: var(--text-muted) !important;
}
body .list-modern .q-btn.list-delete:before { border: 1px solid var(--border-default) !important; }
body .list-modern .q-btn.list-delete:hover { background: var(--color-danger) !important; color: #ffffff !important; }
body .list-modern .q-btn.list-delete:hover:before { border-color: var(--color-danger) !important; }
/* a secondary row action shown as an icon only ("Make primary"): the same round outlined button as list-delete, turning
   navy on hover; its tooltip names the action. Icon-only so it fits narrow side boxes without wrapping */
body .list-modern .q-btn.list-icon {
    width: 32px; height: 32px; min-height: 0 !important; padding: 0 !important; border-radius: var(--radius-pill) !important;
    background: transparent !important; color: var(--text-muted) !important; margin-right: 6px;
}
body .list-modern .q-btn.list-icon:before { border: 1px solid var(--border-default) !important; box-shadow: none !important; }
body .list-modern .q-btn.list-icon .q-icon { font-size: 13px; margin: 0 !important; }
body .list-modern .q-btn.list-icon:hover { background: var(--brand-primary) !important; color: #ffffff !important; }
body .list-modern .q-btn.list-icon:hover:before { border-color: var(--brand-primary) !important; }

/* list-settings: an editable list of settings (Configuration screens). The setting and its description take the room,
   the value editor fills its column, the default sits as a tag and Save at the end of the row. */
body .list-modern.list-settings .q-table .tbody .td { vertical-align: middle; }
body .list-modern.list-settings .q-table .tbody .td:first-child { width: 42%; min-width: 260px; }
body .list-modern.list-settings .q-table .tbody .td:first-child .list-sub-text { margin-top: 3px; max-width: 560px; }
body .list-modern.list-settings .q-table .tbody .td:nth-child(2) { width: 30%; min-width: 220px; }
body .list-modern.list-settings .q-table .tbody .td:nth-child(2) .q-field { width: 100%; }
body .list-modern.list-settings .q-table .tbody .td:nth-child(3) { white-space: nowrap; }
body .list-modern.list-settings .q-table .tbody .td:has(.list-tag.is-warning) > .form-group:first-of-type { display: block; }

/* list-all-headers: for a list whose shared columns stack fields that each need their label (order items, asset
   search), show every field's title in the header instead of only the first, the later ones a step quieter. */
body .list-modern.list-all-headers .q-table .thead .th > div:not(:first-child) { display: block; margin-top: 2px; opacity: 0.75; }

/* The app launcher (theme screen/napps/AppList.xml): a hero banner in the header's gradient (greeting, date, logo on a
   white chip), a section head, then a grid of application cards: a blue icon chip, the name, the sections inside it,
   and an arrow that slides in on hover. */
body .app-home { max-width: 1180px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8, 48px); }
body .app-home__hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
    padding: 36px 40px; border-radius: 20px; color: #ffffff;
    background: var(--brand-hero-gradient);
    box-shadow: 0 12px 32px rgba(3, 4, 84, 0.22);
}
body .app-home__hero::after {
    content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%); pointer-events: none;
}
body .app-home__hero-text { position: relative; z-index: 1; min-width: 0; }
body .app-home__date { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
body .app-home__greeting { margin: 6px 0 4px; font-size: 30px; line-height: 1.2; font-weight: var(--font-weight-bold); color: #ffffff; letter-spacing: -0.01em; }
body .app-home__lead { margin: 0; font-size: var(--font-size-base); opacity: 0.85; }
body .app-home__logo {
    position: relative; z-index: 1; flex: 0 0 auto; padding: 14px 20px; border-radius: 14px; background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
body .app-home__logo img { display: block; height: 44px; width: auto; }
/* the banner shows the active organization's logo (downloadLogoImage): beat shell.css's 180px rule for that image */
body .app-home__logo img[src*="downloadLogoImage"] { width: auto !important; height: 44px !important; max-width: 160px !important; }

body .app-home__section-head { display: flex; align-items: center; gap: var(--space-2); margin: 32px 2px 14px; }
body .app-home__section-title { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
body .app-home__section-count {
    min-width: 22px; padding: 1px 8px; border-radius: var(--radius-pill); text-align: center;
    background: var(--brand-tint-8); color: var(--brand-ink); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold);
}

body .app-home__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); }
body .app-home a.app-tile {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 20px 18px; min-height: 96px;
    border: 1px solid var(--border-default); border-radius: 16px; background: var(--surface-card);
    color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
body .app-home a.app-tile:hover { transform: translateY(-3px); border-color: var(--brand-primary); box-shadow: 0 12px 28px var(--brand-tint-15); }
body .app-home a.app-tile:focus-visible { outline: none; box-shadow: var(--focus-ring); }
body .app-home .app-tile__icon {
    flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    border-radius: 14px; background: var(--surface-soft); color: var(--brand-secondary-ink); font-size: 22px;
    transition: background-color 0.18s ease, color 0.18s ease;
}
body .app-home .app-tile__icon img { max-width: 30px; max-height: 30px; }
body .app-home a.app-tile:hover .app-tile__icon { background: var(--brand-primary); color: var(--brand-secondary); }
body .app-home .app-tile__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
/* the name stays on one line (Bookings & Scheduling, Customers & Partners); "…" only on a card too narrow for it */
body .app-home .app-tile__title { font-size: 15px; font-weight: var(--font-weight-bold); color: var(--text-heading); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .app-home .app-tile__desc {
    font-size: var(--font-size-sm); color: var(--text-muted); line-height: 1.4; margin-right: 18px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body .app-home .app-tile__arrow {
    position: absolute; right: 10px; top: 50%; transform: translate(-6px, -50%); opacity: 0;
    color: var(--brand-primary); font-size: 14px; transition: opacity 0.18s ease, transform 0.18s ease;
}
body .app-home a.app-tile:hover .app-tile__arrow { opacity: 1; transform: translate(0, -50%); }

@media (max-width: 599px) {
    body .app-home { padding: var(--space-4) var(--space-3); }
    body .app-home__hero { flex-direction: column-reverse; align-items: flex-start; padding: 24px; }
    body .app-home__greeting { font-size: 24px; }
    body .app-home__logo img, body .app-home__logo img[src*="downloadLogoImage"] { height: 34px !important; }
}

/* The header's home button (moqui-theme screen/includes/WebrootVue.qvt.ftl), in place of the logo image: a rounded
   square on the header gradient that takes you back to the app list. */
body #top a.header-home {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 38px; height: 38px; margin: 0 var(--space-3) 0 var(--space-2); border-radius: 10px;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--shell-ink); font-size: 17px; text-decoration: none; /* the header's ink, like its other icons (shell.css) */
    transition: background-color 0.15s ease, transform 0.15s ease;
}
body #top a.header-home:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
body #top a.header-home:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
@media (max-width: 599px) { body #top a.header-home { width: 32px; height: 32px; margin: 0 4px; font-size: 15px; } }

/* The side menu (Assets/js/AbSideMenu.js, <ab-side-menu> in includes/WebrootVue.qvt.ftl): every application as a row
   with its icon; the current one sits in a soft card, opened on its sections, the active section a raised pill with a
   brand bar and its sub-sections on a thread below it. A collapse button at the bottom turns it into an icon rail
   (ab-nav--mini) with tooltips. These are the only drawer styles; the old q-drawer / q-item rules are gone. */
/* content-class="ab-nav-drawer" lands on .q-drawer__content; the aside itself is the one with the menu inside */
body .q-drawer:has(.ab-nav),
body .q-drawer__content.ab-nav-drawer { background: var(--surface-card) !important; }
body .q-drawer:has(.ab-nav) { border-right: 1px solid var(--border-default) !important; }
body .q-drawer__content.ab-nav-drawer { overflow: hidden !important; }
body .ab-nav { display: flex; flex-direction: column; height: 100%; }
body .ab-nav__scroll { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; padding: 10px 12px 14px; scrollbar-width: thin; }
/* the app list row, pinned at the top: the header's home icon in a tinted chip */
body .ab-nav__top { flex: 0 0 auto; padding: 12px 12px 10px; border-bottom: 1px solid var(--border-default); }
body .ab-nav a.ab-nav__item--home { color: var(--text-primary); font-weight: var(--font-weight-semibold); }
body .ab-nav a.ab-nav__item--home .ab-nav__icon { background: var(--surface-soft); color: var(--brand-secondary-ink); font-size: 15px; }
body .ab-nav a.ab-nav__item--home.is-active { background: var(--brand-tint-8); color: var(--brand-ink); }
/* .ab-nav__top in the selector: the general item hover (icon in brand colour) would otherwise win and leave a brand
   icon on a brand chip */
body .ab-nav .ab-nav__top a.ab-nav__item--home.is-active .ab-nav__icon,
body .ab-nav .ab-nav__top a.ab-nav__item--home:hover .ab-nav__icon { background: var(--brand-primary); color: var(--brand-secondary); }
body .ab-nav__label {
    padding: 2px 10px 8px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
body .ab-nav a.ab-nav__item {
    position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 10px;
    border-radius: 10px; color: var(--text-secondary); font-size: 13.5px; font-weight: 500; text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
body .ab-nav a.ab-nav__item:hover { background: var(--brand-tint-8); color: var(--brand-ink); }
body .ab-nav a.ab-nav__item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
body .ab-nav__icon {
    flex: 0 0 30px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; color: var(--brand-secondary-ink); font-size: 14px; transition: background-color 0.15s ease, color 0.15s ease;
}
body .ab-nav__icon img { max-width: 16px; max-height: 16px; }
body .ab-nav__letter { font-size: 12px; font-weight: var(--font-weight-bold); }
body .ab-nav a.ab-nav__item:hover .ab-nav__icon { color: var(--brand-secondary-ink); }
body .ab-nav__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .ab-nav__caret { flex: 0 0 auto; font-size: 10px; color: var(--text-muted); }

/* the current application: a soft card holding its row and its sections */
body .ab-nav__app.is-active {
    margin: 6px 0; padding: 4px; border-radius: 12px;
    background: var(--brand-tint-3); border: 1px solid var(--brand-tint-8);
}
body .ab-nav a.ab-nav__item--app.is-active { color: var(--brand-ink); font-weight: var(--font-weight-bold); }
body .ab-nav a.ab-nav__item--app.is-active .ab-nav__icon { background: var(--brand-primary); color: var(--brand-secondary); }
body .ab-nav__sections { padding: 2px 0 4px; }
body .ab-nav a.ab-nav__item--section { min-height: 34px; padding-left: 12px; font-size: 13px; }
body .ab-nav a.ab-nav__item--section .ab-nav__icon { flex-basis: 24px; width: 24px; height: 24px; font-size: 13px; }
body .ab-nav a.ab-nav__item--section.is-active {
    background: var(--surface-card); color: var(--brand-ink); font-weight: var(--font-weight-semibold);
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}
body .ab-nav a.ab-nav__item--section.is-active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand-primary);
}
body .ab-nav a.ab-nav__item--section.is-active .ab-nav__icon { color: var(--brand-secondary-ink); }
/* the active section's sub-sections, on a thread */
body .ab-nav__children { margin: 2px 0 4px 24px; padding-left: 8px; border-left: 1px solid var(--border-default); }
body .ab-nav a.ab-nav__item--child { min-height: 30px; padding: 3px 8px; font-size: 12.5px; color: var(--text-muted); }
body .ab-nav a.ab-nav__item--child.is-active { color: var(--brand-ink); font-weight: var(--font-weight-semibold); }
body .ab-nav__dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.45; }
body .ab-nav a.ab-nav__item--child.is-active .ab-nav__dot { background: var(--brand-primary); opacity: 1; }

/* the collapse button at the bottom */
body .ab-nav__collapse {
    display: flex; align-items: center; gap: 10px; flex: 0 0 auto; width: 100%; min-height: 44px; padding: 0 22px;
    border: none; border-top: 1px solid var(--border-default); background: transparent; cursor: pointer;
    color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 500; text-align: left;
}
body .ab-nav__collapse:hover { color: var(--brand-ink); background: var(--brand-tint-3); }
body .ab-nav__collapse:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
body .ab-nav__collapse i { width: 24px; text-align: center; font-size: 14px; }

/* the icon rail */
body .ab-nav--mini .ab-nav__scroll { padding: 10px 8px 12px; }
body .ab-nav--mini .ab-nav__top { padding: 12px 8px 10px; }
body .ab-nav--mini .ab-nav__scroll { scrollbar-width: none; }
body .ab-nav--mini .ab-nav__scroll::-webkit-scrollbar { display: none; }
body .ab-nav--mini .ab-nav__label,
body .ab-nav--mini .ab-nav__text,
body .ab-nav--mini .ab-nav__caret { display: none; }
body .ab-nav--mini a.ab-nav__item { justify-content: center; padding: 4px; }
body .ab-nav--mini .ab-nav__app.is-active { padding: 3px; }
body .ab-nav--mini a.ab-nav__item--section { padding-left: 4px; }
body .ab-nav--mini a.ab-nav__item--section.is-active::before { top: 6px; bottom: 6px; }
body .ab-nav--mini .ab-nav__collapse { justify-content: center; padding: 0; }

/* My Account: profile and contact screens (ahlabot-nucleus screen/MyAccount: User/Account.xml, User/ContactInfo.xml).
   Account: the profile header reuses the ab-party-header card with an initials avatar in place of the image; the Profile
   card's two field-group sections (Personal details, Preferences) get a small-caps title and a rule between them, the
   Update button sits bottom right; the single-use codes are a monospace grid in a muted box under a one-line warning.
   Contact Info: one row per email / phone / address (value in bold, purpose tag, round edit and trash buttons that
   fill on hover) and a muted line when a card is empty. */
body .ab-profile-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 64px; width: 64px; height: 64px;
    border-radius: var(--radius-pill); background: var(--brand-tint-15); color: var(--brand-ink);
    font-size: 22px; font-weight: var(--font-weight-bold); letter-spacing: 0.02em; user-select: none;
}
body .ab-profile-form > .q-my-md { margin-top: 0 !important; margin-bottom: 0 !important; }
body .ab-profile-form .ab-profile-section + .ab-profile-section {
    margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border-soft);
}
body .ab-profile-form .ab-profile-section > h5 {
    margin: 0 0 var(--space-2); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); line-height: 1.4;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
body .ab-profile-form .big-row {
    justify-content: flex-end; margin-top: var(--space-4) !important; padding-top: var(--space-3); border-top: 1px solid var(--border-soft);
}

body .ab-security-intro { font-size: var(--font-size-sm); color: var(--text-muted); }
body .ab-codes {
    margin-top: var(--space-3); padding: var(--space-4); border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md); background: var(--surface-soft);
}
body .ab-codes__warning {
    display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3);
    font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-warning-ink);
}
body .ab-codes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
body .ab-codes__code {
    display: block; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-sm);
    background: var(--surface-card); color: var(--text-heading); text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--font-size-md); letter-spacing: 0.08em;
    user-select: all;
}

body .ab-contact-empty { padding: var(--space-2) 0; font-size: var(--font-size-sm); color: var(--text-muted); }
body .ab-contact-row {
    display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--border-soft); border-radius: var(--radius-sm); transition: var(--transition-fast);
}
body .ab-contact-row:last-child { border-bottom: none; }
body .ab-contact-row:hover { background: var(--brand-tint-3); }
body .ab-contact-row__main { flex: 1 1 auto; min-width: 0; }
body .ab-contact-row__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
body .ab-contact-row__line .list-tag { margin: 0; }
body .ab-contact-row__value { font-weight: var(--font-weight-bold); color: var(--text-heading); overflow-wrap: anywhere; }
body .ab-contact-row__actions { display: flex; flex: 0 0 auto; align-items: center; gap: var(--space-2); }
body .ab-contact-row__actions form { display: inline-flex; margin: 0; }
body .list-modern .ab-contact-row:hover .q-btn.list-open {
    background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #ffffff !important;
}

/* A submit with an icon (Moqui puts the icon after its label, e.g. "Update" + check): give the icon a gap from the
   label instead of letting it touch the text. */
body .q-btn__content > .block + i,
body .q-btn__content > .block + .q-icon { margin-left: 6px; }

/* "Change status" menu (My Account message screens): a q-btn-dropdown holding the status hidden-form links; each
   link is a full-width, left-aligned flat row in the menu instead of an outlined button. The long selectors beat the
   theme's outlined-button rule (body .q-btn--outline:not(.text-primary):not(...):not(...)). */
body .ab-status-menu__list { min-width: 220px; border-radius: var(--radius-md, 10px); }
body .ab-status-menu__list form { display: block; margin: 0; }
body .q-menu.ab-status-menu__list .q-btn.q-btn--outline.ab-status-menu__item {
    width: 100%; justify-content: flex-start; min-height: 36px; padding: 0 var(--space-3) !important;
    border-radius: 8px !important; background: transparent !important; color: var(--text-primary) !important;
    font-weight: 500; text-align: left; box-shadow: none !important;
}
body .q-menu.ab-status-menu__list .q-btn.q-btn--outline.ab-status-menu__item:before,
body .q-menu.ab-status-menu__list .q-btn.q-btn--outline.ab-status-menu__item .q-btn__wrapper:before { border: none !important; }
body .q-menu.ab-status-menu__list form { width: 100%; }
body .q-menu.ab-status-menu__list .q-btn.q-btn--outline.ab-status-menu__item .q-btn__content { justify-content: flex-start; }
body .q-menu.ab-status-menu__list .q-btn.q-btn--outline.ab-status-menu__item:hover { background: var(--brand-tint-8) !important; color: var(--brand-ink) !important; }

/* The chosen one of a row of choice buttons (e.g. the store picker on a product's Pricing tab): filled, white text.
   bg-primary + text-white on a link's q-btn does not work, as the outline button forces text-primary on top. */
body .q-btn.ab-btn-active,
body .q-btn.ab-btn-active .q-btn__content { background: var(--brand-primary) !important; color: #fff !important; }
/* stays filled on hover: the outline hover (body .q-btn--outline.text-primary:hover) outranks the rule above and
   lightened the button around the navy content */
body .q-btn.q-btn--outline.ab-btn-active:hover { background: var(--brand-primary) !important; }
body .q-btn.ab-btn-active > .q-focus-helper { display: none; }

/* The Availability card on a product's Overview (ahlabot-catalog EditProduct/Overview.xml, ProductStatus): an icon
   disc, what the state means, and the one action that changes it. Green edge and disc when the product is for sale,
   red when it is disabled; the card tints faintly with the same colour. */
body .ab-availability {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    border-left-width: 5px;
    background: var(--surface-card);
    box-shadow: var(--shadow-xs);
}
body .ab-availability.is-active {
    border-left-color: var(--color-success);
    background: linear-gradient(90deg, rgba(17, 209, 103, 0.07), transparent 60%), var(--surface-card);
}
body .ab-availability.is-disabled {
    border-left-color: var(--color-danger);
    background: linear-gradient(90deg, rgba(239, 80, 112, 0.09), transparent 60%), var(--surface-card);
}
body .ab-availability__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
body .ab-availability.is-active .ab-availability__icon { background: var(--color-success); }
body .ab-availability.is-disabled .ab-availability__icon { background: var(--color-danger); }
body .ab-availability__body { flex: 1 1 auto; min-width: 0; }
body .ab-availability__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
body .ab-availability__title { font-size: 17px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
body .ab-availability.is-disabled .ab-availability__title { color: var(--color-danger); }
body .ab-availability__text { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
body .ab-availability__action { flex: 0 0 auto; }
body .q-btn.ab-availability__btn { border-radius: var(--radius-pill) !important; padding: 4px 16px !important; font-weight: 600; }
body .q-btn.ab-availability__btn.is-disable,
body .q-btn.ab-availability__btn.is-disable .q-btn__content {
    color: var(--color-danger) !important;
    border-color: var(--color-danger) !important;
    background: transparent !important;
}
body .q-btn.ab-availability__btn.is-disable:before { border: 1px solid var(--color-danger) !important; }
body .q-btn.ab-availability__btn.is-disable:hover { background: rgba(239, 80, 112, 0.08) !important; }
body .q-btn.ab-availability__btn.is-enable,
body .q-btn.ab-availability__btn.is-enable .q-btn__content {
    color: var(--brand-on-secondary) !important;
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
}
@media (max-width: 599px) {
    body .ab-availability { flex-wrap: wrap; }
    body .ab-availability__action { width: 100%; }
}

/* Store › Promotions (STORE-SCREEN-REDESIGN.md): the promotion page's title strip, codes in a fixed-width face, banner previews */
body .ab-promo-strip {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    background: var(--surface-card, #fff);
}
body .ab-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
body .ab-banner-thumb { min-height: 140px; }
body .ab-banner-thumb img { max-width: 100%; max-height: 140px; object-fit: contain; }

/* button-menu (a page's "More" menu): the macro gives the popup content-class="ab-button-menu". Its entries are links,
   hidden-form links and dialog buttons, each rendered as an outlined button; here they read as one plain menu: full
   width, left aligned, no border, a tint on hover, and the warning / danger ones in their colour (ACCOUNTING-SCREEN-REDESIGN.md). */
body .ab-button-menu { min-width: 220px; padding: 6px 0; }
body .ab-button-menu .q-item { min-height: 0 !important; padding: 0 !important; margin: 0 6px !important; }
body .ab-button-menu .q-item:hover { background: transparent !important; }
body .ab-button-menu .q-item__section { width: 100%; }
body .ab-button-menu .q-item__section > a,
body .ab-button-menu .q-item__section > form,
body .ab-button-menu .q-item__section > span,
body .ab-button-menu .q-item__section > div { display: block; width: 100%; }
body .ab-button-menu .q-btn {
    display: flex; width: 100%; min-height: 36px !important; padding: 0 var(--space-3) !important;
    justify-content: flex-start; text-align: left; border-radius: var(--radius-sm) !important;
    background: transparent !important; box-shadow: none !important;
    color: var(--menu-ink, #334155) !important; font-size: var(--font-size-sm) !important; font-weight: var(--font-weight-medium, 500) !important;
}
body .ab-button-menu .q-item .q-btn:before,
body .ab-button-menu .q-item .q-btn .q-btn__wrapper:before { border: none !important; }
body .ab-button-menu .q-btn .q-btn__content,
body .ab-button-menu .q-btn .q-btn__wrapper { justify-content: flex-start; text-align: left; }
body .ab-button-menu .q-btn .q-icon { display: none; }
body .ab-button-menu .q-btn:hover { background: var(--brand-tint-8) !important; color: var(--brand-ink) !important; }
body .q-menu.ab-button-menu .q-item .q-btn.text-warning,
body .q-menu.ab-button-menu .q-item .q-btn.text-negative { color: var(--color-danger-ink) !important; }
body .q-menu.ab-button-menu .q-item .q-btn.text-warning:hover,
body .q-menu.ab-button-menu .q-item .q-btn.text-negative:hover { background: rgba(239, 80, 112, 0.08) !important; }

/* Finance pages (ACCOUNTING-SCREEN-REDESIGN.md). ab-ledger: a transaction and its entries, or an account summary, as a
   small bordered table: a tinted head, then Account | Debit | Credit (| Balance) rows, credits indented the way a
   journal entry reads, and a total row. ab-apply-row: a payment or credit note that can be applied, with its actions. */
body .ab-ledger { border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-card); }
body .ab-ledger__head {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
    padding: 10px var(--space-4); background: var(--surface-soft); border-bottom: 1px solid var(--border-default);
}
body .ab-ledger__row { display: flex; align-items: flex-start; padding: 8px var(--space-4); border-bottom: 1px solid var(--border-soft); font-size: var(--font-size-sm); }
body .ab-ledger__row:last-child { border-bottom: none; }
body .ab-ledger__account { flex: 1 1 auto; min-width: 0; color: var(--text-primary); }
body .ab-ledger__account.is-credit { padding-left: var(--space-6, 24px); }
body .ab-ledger__amount { flex: 0 0 130px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-heading); font-weight: var(--font-weight-semibold); }
body .ab-ledger__amount.is-empty { color: var(--text-muted); font-weight: 400; }
body .ab-ledger__amount.is-strong { font-weight: var(--font-weight-bold); }
body .ab-ledger__cols { padding-top: 6px; padding-bottom: 6px; background: var(--surface-card); }
body .ab-ledger__cols > div { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
body .ab-ledger__total { background: var(--surface-soft); font-weight: var(--font-weight-bold); }
body .ab-ledger__total .ab-ledger__account { font-weight: var(--font-weight-bold); }
@media (max-width: 600px) { body .ab-ledger__amount { flex-basis: 96px; } }

body .ab-apply-row { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-soft); }
body .ab-apply-row:first-child { padding-top: 0; }
body .ab-apply-row:last-child { border-bottom: none; padding-bottom: 0; }
/* the apply row's two actions (Other amount opens a dialog, Apply is a hidden form): each comes in its own wrapper,
   so they are lined up here on one baseline, at one height */
body .ab-apply-row__actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-2); margin-top: 6px; }
body .ab-apply-row__actions > *,
body .ab-apply-row__actions form { display: inline-flex; align-items: center; margin: 0 !important; padding: 0 !important; }
body .ab-apply-row__actions .q-btn { min-height: 32px !important; height: 32px; margin: 0 !important; vertical-align: middle; }
body .ab-apply-row__actions > *, body .ab-apply-row__actions form { flex: 0 0 auto !important; width: auto !important; }
body .ab-apply-row__actions .q-btn, body .ab-apply-row__actions .q-btn__content { white-space: nowrap; flex-wrap: nowrap !important; }
body .ab-ledger__date { flex: 0 0 110px; color: var(--text-muted); }
body .ab-ledger__actions { flex: 0 0 120px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
body .ab-ledger__actions > * { display: inline-flex; align-items: center; margin: 0 !important; }

/* ab-tree: the chart of accounts as an expandable tree (Finance › Chart of accounts › Tree view): group > class > account
   > sub-account, each row the name (a link on an account), its code, and the balance at the right. */
body .ab-tree { border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
body .ab-tree__group + .ab-tree__group { border-top: 1px solid var(--border-default); }
body .ab-tree__group-header { background: var(--surface-soft); min-height: 44px; }
body .ab-tree__row { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 34px; font-size: var(--font-size-sm); }
body .ab-tree__group-name { font-weight: var(--font-weight-bold); color: var(--text-heading); font-size: var(--font-size-base, 14px); }
body .ab-tree__class-name { font-weight: var(--font-weight-semibold); color: var(--text-primary); }
body .ab-tree__name { font-weight: var(--font-weight-semibold); color: var(--brand-ink); text-decoration: none; }
body .ab-tree__name:hover { text-decoration: underline; }
body .ab-tree__code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--font-size-xs); color: var(--text-muted); }
body .ab-tree__balance { margin-left: auto; font-weight: var(--font-weight-bold); font-variant-numeric: tabular-nums; color: var(--text-heading); white-space: nowrap; }
body .ab-tree__leaf { padding: 4px var(--space-4) 4px 0; border-top: 1px solid var(--border-soft); }
body .ab-tree__depth-1 { padding-left: 28px !important; }
body .ab-tree__depth-2 { padding-left: 56px !important; }
body .ab-tree__depth-3 { padding-left: 80px !important; }
body .ab-tree__depth-4 { padding-left: 104px !important; }
/* inside the tree the expansion items are rows, not the theme's cards */
body .ab-tree .q-expansion-item,
body .ab-tree .q-expansion-item .q-expansion-item { margin: 0 !important; padding: 0 !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
body .ab-tree .q-expansion-item__container > .q-item { min-height: 36px !important; padding-top: 2px !important; padding-bottom: 2px !important; border-top: 1px solid var(--border-soft); }
body .ab-tree .ab-tree__group > .q-expansion-item__container > .q-item { border-top: none; }
body .ab-tree .q-expansion-item__content { padding: 0 !important; }
body .ab-tree .q-item__section--side { padding-right: 8px; min-width: 0; }
/* the tree's column titles (Periods: Period / Net income), like the ledger tables' column row */
body .ab-tree__headrow {
    display: flex; align-items: center; padding: 8px var(--space-4); background: var(--surface-soft);
    border-bottom: 1px solid var(--border-default);
    font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
body .ab-tree__headrow-right { margin-left: auto; }
/* ab-notice: a one-line note above a page's tabs (Finance settings: "uses the settings of …", "not set up yet") */
body .ab-notice {
    margin-top: var(--space-3); padding: 10px var(--space-4); border-radius: var(--radius-md);
    background: var(--surface-soft); border: 1px solid var(--border-default); color: var(--text-secondary); font-size: var(--font-size-sm);
}
body .ab-notice.is-warning { background: #fff7e6; border-color: #f5d49a; color: #8a5a00; }
body .ab-notice.is-danger { background: #fdecec; border-color: #f3b4b4; color: #9b1c1c; }
body.body--dark .ab-notice.is-danger { background: rgba(220, 38, 38, 0.15); border-color: rgba(220, 38, 38, 0.4); color: #fca5a5; }
/* ab-aging: open invoices of one currency by how late they are (Finance Overview) */
body .ab-aging + .ab-aging { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border-soft); }
body .ab-aging__head { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-2); }
body .ab-aging__total { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--text-strong); }
body .ab-aging__cur { font-size: var(--font-size-xs); color: var(--text-muted); letter-spacing: 0.06em; }
body .ab-aging__bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-soft); }
body .ab-aging__seg { height: 100%; }
body .ab-aging__legend { margin-top: var(--space-3); }
body .ab-aging__band { display: flex; align-items: center; gap: var(--space-2); padding: 3px 0; font-size: var(--font-size-sm); }
body .ab-aging__band.is-zero { color: var(--text-muted); }
body .ab-aging__label { flex: 1 1 auto; }
body .ab-aging__amt { font-variant-numeric: tabular-nums; font-weight: var(--font-weight-semibold); }
body .ab-aging__band.is-zero .ab-aging__amt { font-weight: var(--font-weight-regular); }
body .ab-aging__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
body .ab-aging--current { background: var(--color-success); }
body .ab-aging--late1 { background: #e9b949; }
body .ab-aging--late2 { background: #e8883a; }
body .ab-aging--late3 { background: #d9622b; }
body .ab-aging--late4 { background: #c0392b; }
/* a stat tile that is a link (Finance Overview): no underline, the tile's own hover */
body a.ab-stat-link, body .ab-stat-link { text-decoration: none; color: inherit; cursor: pointer; }
/* rows of a dashboard list: a hairline between them */
body .ab-dash-row + .ab-dash-row { border-top: 1px solid var(--border-soft); }
/* ab-tree columns on the right (Administration › Business categories): fixed-width cells so each column lines up
   under its title in the head row */
body .ab-tree__cells { margin-left: auto; display: flex; align-items: center; flex: 0 0 auto; }
body .ab-tree__cell { width: 90px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
body .ab-tree__cell--wide { width: 120px; }
body .ab-tree__cell--strong { font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .ab-tree__headrow .ab-tree__cell { color: inherit; }
body .ab-tree__ar { color: var(--text-muted); font-size: var(--font-size-sm); }
/* the head row's titles start where the rows' names do (after the expand chevron) */
body .ab-tree__headrow { padding-left: 56px; }
/* the tree's open (view) button, in its own narrow column */
body .ab-tree__cell--open { width: 48px; text-align: right; }
/* the button itself is the lists' list-open (round, outlined); it lights up on the row's hover like a list row */
body .list-modern .ab-tree__row:hover .q-btn.list-open {
    background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #ffffff !important;
}
/* ab-code-line: a value to copy, such as a webhook URL (Administration › Payment gateways) */
body .ab-code-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--font-size-sm); word-break: break-all;
    padding: 10px var(--space-3); border-radius: var(--radius-md); background: var(--surface-soft); border: 1px solid var(--border-default);
    color: var(--text-heading); user-select: all;
}
/* ab-code-block: a block of received text to read, such as a webhook body (Administration › Webhook deliveries) */
body .ab-code-block {
    margin: 0; padding: var(--space-3); max-height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--font-size-xs); line-height: 1.5;
    background: var(--surface-soft); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-heading);
}
/* message previews (Administration › Notification template › Preview): an email in a sandboxed frame, a push card, an
   SMS bubble */
body .ab-preview-mail { border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; max-width: 720px; }
body .ab-preview-mail__subject { padding: 10px var(--space-4); background: var(--surface-soft); border-bottom: 1px solid var(--border-default); font-weight: var(--font-weight-semibold); }
body .ab-preview-mail__frame { width: 100%; min-height: 360px; border: 0; background: #fff; display: block; }
body .ab-preview-push { max-width: 380px; padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--border-default); box-shadow: var(--shadow-sm); }
body .ab-preview-push__title { font-weight: var(--font-weight-bold); margin-bottom: 2px; }
body .ab-preview-sms { max-width: 360px; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: #e9e9eb; color: #111; line-height: 1.45; }
/* ab-matrix: rows by columns of marks (Administration › Notifications › messages by event and channel) */
body .ab-matrix { border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
body .ab-matrix__row { display: flex; align-items: center; min-height: 40px; padding: 4px var(--space-4); }
body .ab-matrix__row + .ab-matrix__row { border-top: 1px solid var(--border-soft); }
body .ab-matrix__head { background: var(--surface-soft); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
body .ab-matrix__name { flex: 1 1 auto; font-weight: var(--font-weight-medium); }
body .ab-matrix__head .ab-matrix__name { font-weight: inherit; }
body .ab-matrix__cell { flex: 0 0 120px; text-align: center; }
/* ab-rate-card: one currency's exchange rate (Administration › Finance › Exchange rates) */
body .ab-rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); margin-top: var(--space-3); }
body .ab-rate-card { padding: var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); }
body .ab-rate-card.is-missing { border-color: #f5d49a; background: #fffaf0; }
body .ab-rate-card__code { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .ab-rate-card__name { font-size: var(--font-size-sm); color: var(--text-muted); }
body .ab-rate-card__rate { margin-top: var(--space-3); font-size: 22px; font-weight: var(--font-weight-bold); font-variant-numeric: tabular-nums; color: var(--text-heading); }
body .ab-rate-card__rate.is-missing { font-size: var(--font-size-sm); color: #8a5a00; }
body .ab-rate-card__meta { font-size: var(--font-size-sm); color: var(--text-muted); margin-top: 2px; }
body .ab-rate-card__change { display: inline-block; margin-top: var(--space-2); padding: 1px 8px; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); background: var(--surface-soft); color: var(--text-muted); }
body .ab-rate-card__change.is-up { background: rgba(239, 80, 112, 0.12); color: var(--color-danger-ink); }
body .ab-rate-card__change.is-down { background: rgba(17, 209, 103, 0.14); color: var(--color-success-ink); }
/* settings page (Administration › Server › application › Configuration): groups down the left, the open group's
   settings as rows on the right (name and what it does | its control, its default and Reset) */
body .ab-settings-nav { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2); border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); position: sticky; top: 72px; }
body .ab-settings-nav__item { display: flex; align-items: center; gap: var(--space-2); padding: 8px var(--space-3); border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; font-size: var(--font-size-sm); }
body .ab-settings-nav__item:hover { background: var(--surface-soft); color: var(--text-heading); }
body .ab-settings-nav__item.is-active { background: var(--surface-soft); color: var(--brand-ink, var(--text-heading)); font-weight: var(--font-weight-semibold); box-shadow: inset 3px 0 0 var(--brand-accent); }
body .ab-settings-nav__name { flex: 1 1 auto; }
body .ab-settings-nav__count { font-size: var(--font-size-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
body .ab-settings-nav__changed { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(245, 158, 11, 0.18); color: var(--color-warning-ink); font-size: 11px; font-weight: var(--font-weight-bold); display: inline-flex; align-items: center; justify-content: center; }
body .ab-settings-nav__sep { height: 1px; background: var(--border-soft); margin: var(--space-1) 0; }
body .ab-settings-panel { border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); overflow: hidden; }
body .ab-settings-panel__head { padding: var(--space-4); border-bottom: 1px solid var(--border-default); background: var(--surface-soft); }
body .ab-settings-panel__title { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .ab-settings-panel__desc { font-size: var(--font-size-sm); color: var(--text-muted); margin-top: 2px; }
body .ab-setting-row { display: flex; gap: var(--space-5); padding: var(--space-4); align-items: flex-start; }
body .ab-setting-row + .ab-setting-row { border-top: 1px solid var(--border-soft); }
body .ab-setting-row.is-changed { box-shadow: inset 3px 0 0 #f0b44c; }
body .ab-setting-row__about { flex: 1 1 45%; min-width: 0; }
body .ab-setting-row__name { font-weight: var(--font-weight-semibold); color: var(--text-heading); }
body .ab-setting-row__desc { font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 2px; }
body .ab-setting-row__id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
body .ab-setting-row__edit { flex: 1 1 55%; min-width: 0; }
body .ab-setting-row__edit .q-field { margin: 0; }
body .ab-setting-row__default { display: flex; align-items: center; gap: var(--space-3); margin-top: 4px; font-size: var(--font-size-xs); color: var(--text-muted); }
@media (max-width: 1023px) { body .ab-settings-nav { position: static; margin-bottom: var(--space-3); } }
@media (max-width: 700px) { body .ab-setting-row { flex-direction: column; gap: var(--space-2); } }
body .ab-setting-row__default { justify-content: flex-start; text-align: left; }
body .ab-setting-row__edit form .row { margin: 0; }
body .ab-setting-row__default .q-btn { min-height: 24px !important; padding: 0 10px !important; font-size: var(--font-size-xs) !important; }
/* Administration › Overview: the attention counts and the section cards */
body .ab-attention-count { min-width: 36px; height: 28px; padding: 0 10px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--font-weight-bold); font-variant-numeric: tabular-nums; }
body .ab-attention-count.is-danger { background: rgba(239, 80, 112, 0.14); color: var(--color-danger-ink); }
body .ab-attention-count.is-warning { background: rgba(245, 158, 11, 0.18); color: var(--color-warning-ink); }
body .ab-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); margin-top: var(--space-4); }
body .ab-section-card { border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); padding: var(--space-4); }
body .ab-section-card__head { display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3); }
body .ab-section-card__icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-soft); color: var(--brand-secondary-ink); font-size: 18px; }
body .ab-section-card__title { font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .ab-section-card__desc { font-size: var(--font-size-sm); color: var(--text-muted); }
body .ab-section-card__pages { display: flex; flex-direction: column; }
body .ab-section-card__page { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; border-top: 1px solid var(--border-soft); color: var(--text-primary); text-decoration: none; font-size: var(--font-size-sm); }
body .ab-section-card__page:hover { color: var(--brand-secondary-ink); }
body .ab-section-card__page i { font-size: 10px; color: var(--text-muted); }
body .ab-attention-row { color: inherit; text-decoration: none; }
body .ab-attention-row:hover { background: var(--surface-soft); }
/* ======================================================================== reports (REPORTS-REDESIGN.md) */
body .ab-report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-2) 0 var(--space-3); }
body .ab-report-head__title { font-size: 24px; line-height: 1.2; font-weight: var(--font-weight-bold); color: var(--text-heading); margin: 0; }
body .ab-report-head__subtitle { margin: 4px 0 0; color: var(--text-muted); font-size: var(--font-size-sm); }
body .ab-report-head__period { text-align: right; }
body .ab-report-head__range { font-weight: var(--font-weight-semibold); color: var(--text-heading); }
body .ab-report-head__range i { color: var(--brand-secondary-ink); margin-right: 4px; }
body .ab-report-head__cmp { font-size: var(--font-size-xs); color: var(--text-muted); }
body .ab-report-filters { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
body .ab-report-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body .ab-report-filters__row--minor { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border-soft); }
body .ab-report-filters__label { font-size: var(--font-size-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-right: 2px; }
body .ab-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-secondary); font-size: var(--font-size-sm); text-decoration: none; cursor: pointer; line-height: 1.4; }
body .ab-chip:hover { border-color: var(--brand-accent); color: var(--brand-secondary-ink); }
body .ab-chip.is-active { background: var(--brand-accent); border-color: var(--brand-accent); color: var(--brand-on-secondary); font-weight: var(--font-weight-semibold); }
body .ab-chip--minor { padding: 2px 10px; font-size: var(--font-size-xs); }
body .q-btn.ab-chip { min-height: 0; }
body .ab-report-custom form { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
body .ab-report-custom label { display: flex; flex-direction: column; font-size: var(--font-size-xs); color: var(--text-muted); gap: 2px; }
body .ab-report-custom input[type=date] { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 4px 8px; font: inherit; }
/* equal tiles at least --ab-kpi-min wide: the report header sets it from its longest value, so a long amount (LBP
   billions) widens every tile rather than spilling or wrapping */
body .ab-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--ab-kpi-min, 180px)), 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
body .ab-kpi { display: block; min-width: 0; padding: var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); text-decoration: none; color: inherit; }
body a.ab-kpi:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-sm); }
body .ab-kpi__label { font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
body .ab-kpi__value { font-size: 24px; font-weight: var(--font-weight-bold); color: var(--text-heading); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
body .ab-kpi__foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: var(--font-size-xs); }
body .ab-kpi__delta { padding: 1px 6px; border-radius: var(--radius-pill); font-weight: var(--font-weight-semibold); }
body .ab-kpi__delta.is-good { background: rgba(17, 209, 103, 0.14); color: var(--color-success-ink); }
body .ab-kpi__delta.is-bad { background: rgba(239, 80, 112, 0.14); color: var(--color-danger-ink); }
body .ab-kpi__delta.is-flat { background: var(--surface-soft); color: var(--text-muted); }
body .ab-kpi__cmp { color: var(--text-muted); }
body .ab-report-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
body .ab-report-card { grid-column: span 12; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); padding: var(--space-4); min-width: 0; }
body .ab-report-card.is-12 { grid-column: span 12; } body .ab-report-card.is-8 { grid-column: span 8; } body .ab-report-card.is-6 { grid-column: span 6; } body .ab-report-card.is-4 { grid-column: span 4; } body .ab-report-card.is-3 { grid-column: span 3; }
body .ab-report-card__title { font-weight: var(--font-weight-bold); color: var(--text-heading); }
body .ab-report-card__sub { font-size: var(--font-size-xs); color: var(--text-muted); margin-bottom: var(--space-3); }
/* Customers report: segment cards and the cohort retention table */
body .ab-segments { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-3); }
body .ab-segment { display: block; padding: var(--space-3); border: 1px solid var(--border-default); border-left: 4px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: inherit; text-decoration: none; }
body .ab-segment:hover { box-shadow: var(--shadow-sm); }
body .ab-segment.is-good { border-left-color: var(--color-success); } body .ab-segment.is-info { border-left-color: var(--brand-info); }
body .ab-segment.is-warn { border-left-color: #f0a030; } body .ab-segment.is-bad { border-left-color: #e2557a; }
body .ab-segment.is-active { border-color: var(--brand-accent); box-shadow: 0 0 0 2px var(--brand-accent-soft); }
body .ab-segment__label { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
body .ab-segment__count { font-size: 1.6rem; font-weight: var(--font-weight-bold); color: var(--text-heading); line-height: 1.3; }
body .ab-segment__meta { font-size: var(--font-size-xs); color: var(--text-body); }
body .ab-segment__text { margin-top: 4px; font-size: var(--font-size-xs); color: var(--text-muted); line-height: 1.35; }
body .ab-cohort { overflow-x: auto; }
@media (max-width: 1100px) { body .ab-segments { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
body .ab-cohort table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: var(--font-size-sm); }
body .ab-cohort th { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 6px; text-align: center; white-space: nowrap; }
body .ab-cohort td { text-align: center; padding: 7px 6px; border-radius: 4px; min-width: 52px; white-space: nowrap; }
body .ab-cohort td.is-empty { background: transparent; }
body .ab-cohort .ab-cohort__name { text-align: left; font-weight: var(--font-weight-medium); color: var(--text-heading); }
body .ab-cohort td.ab-cohort__size { color: var(--text-muted); }
body .ab-report-note { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: var(--font-size-sm); background: var(--surface-soft); }
body .ab-report-note i { color: var(--brand-secondary-ink); }
body .ab-report-section-title { margin: var(--space-5) 0 var(--space-3); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
/* Finance reports: a statement (Profit & loss, Balance sheet) - sections, groups, accounts, subtotals, totals */
body .ab-statement-card { margin-top: var(--space-4); }
body .ab-statement { overflow-x: auto; }
body .ab-statement table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); font-variant-numeric: tabular-nums; }
body .ab-statement th { padding: 8px 10px; text-align: right; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-default); white-space: nowrap; }
body .ab-statement td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border-soft); }
body .ab-statement .ab-statement__label { text-align: left; min-width: 220px; white-space: normal; }
body .ab-statement th:not(.ab-statement__label), body .ab-statement td:not(.ab-statement__label) { width: 118px; }
body .ab-statement th.ab-statement__note, body .ab-statement td.ab-statement__note { width: 34%; min-width: 260px; text-align: left; white-space: normal; }
body .ab-statement td.ab-statement__note { color: var(--text-muted); font-size: var(--font-size-xs); line-height: 1.4; }
body .ab-statement .ab-statement__code { margin-left: 6px; font-size: var(--font-size-xs); color: var(--text-muted); }
body .ab-statement td.is-total, body .ab-statement th.is-total { font-weight: var(--font-weight-bold); background: var(--surface-soft); }
body .ab-statement td.is-prev { color: var(--text-muted); }
body .ab-statement tr.is-section td { padding-top: 16px; text-align: left; font-weight: var(--font-weight-bold); color: var(--text-heading); border-bottom: 1px solid var(--border-default); }
body .ab-statement tr.is-group td { text-align: left; padding-left: 18px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
body .ab-statement tr.is-note td { text-align: left; padding-left: 18px; color: var(--text-muted); font-style: italic; }
body .ab-statement tr.is-account td.ab-statement__label { padding-left: 28px; }
body .ab-statement tr.is-subtotal td { font-weight: var(--font-weight-bold); border-top: 1px solid var(--border-default); }
body .ab-statement tr.is-total td { font-weight: var(--font-weight-bold); color: var(--text-heading); background: var(--brand-tint-3); }
body .ab-statement tr.is-ratio td { color: var(--text-muted); font-size: var(--font-size-xs); }
body .ab-statement tr.is-net td { font-weight: var(--font-weight-bold); font-size: 1rem; color: var(--text-heading); border-top: 2px solid var(--text-heading); border-bottom: 3px double var(--text-heading); }
/* the report's export control: one neutral segmented group (label, then a button per format), grey icons */
/* the report's Export: the list bar's Export button (same menu, ab-xmenu: theme "Export menu"); it replaced the old
   segmented EXPORT | Excel | PDF group (2026-10-12) */
body .q-btn.ab-report-export {
    min-height: 32px !important; height: 32px; margin-bottom: var(--space-2); padding: 0 var(--space-3) !important; border-radius: var(--radius-pill) !important;
    font-size: var(--font-size-sm) !important; font-weight: var(--font-weight-semibold) !important;
    color: var(--text-primary) !important; background: var(--surface-card) !important; box-shadow: none !important;
}
body .q-btn.ab-report-export:before { border: 1px solid var(--border-default) !important; border-radius: inherit !important; }
body .q-btn.ab-report-export:hover:before { border-color: var(--brand-primary) !important; }
body .q-btn.ab-report-export .q-icon { font-size: 16px !important; color: var(--text-muted) !important; }
body .ab-report-head__period { display: flex; flex-direction: column; align-items: flex-end; }
/* the Analytics overview's short lists: rank, name with a small line, value; alerts open their report */
body .ab-glance-list { display: flex; flex-direction: column; gap: 2px; }
body .ab-glance-item { display: flex; align-items: center; gap: var(--space-3); padding: 8px 6px; border-radius: var(--radius-md); color: inherit; text-decoration: none; }
body .ab-glance-item + .ab-glance-item { border-top: 1px solid var(--border-soft); }
body .ab-glance-item small { color: var(--text-muted); font-size: var(--font-size-xs); }
body .ab-glance-item.is-alert { border-left: 3px solid #e2557a; background: rgba(226,85,122,0.05); }
body .ab-glance-item.is-alert:hover { background: rgba(226,85,122,0.1); }
body .ab-glance-item.is-alert i { color: #e2557a; width: 18px; text-align: center; }
body .ab-glance-rank { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--surface-soft); color: var(--text-muted); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); display: inline-flex; align-items: center; justify-content: center; }
body .ab-glance-name { flex: 1 1 auto; min-width: 0; }
body .ab-glance-value { font-weight: var(--font-weight-bold); white-space: nowrap; }
body .ab-report-card__title a { color: inherit; text-decoration: none; }
body .ab-report-card__title a:hover { color: var(--brand-secondary-ink); }
body .ab-report-empty { padding: var(--space-6) 0; text-align: center; color: var(--text-muted); font-size: var(--font-size-sm); }
@media (max-width: 1100px) { body .ab-report-card.is-8, body .ab-report-card.is-6, body .ab-report-card.is-4, body .ab-report-card.is-3 { grid-column: span 12; } }
@media print { body .ab-report-filters, body .ab-nav-drawer { display: none !important; } }

/* Columns dialog (theme Assets/js/AbColumnConfig.js, <ab-form-column-config>): the shown columns as numbered cards, the
   hidden fields under them, Save / Undo / Restore default. Tokens only, so dark mode follows. */
body .ab-colcfg__intro { margin: 0 0 var(--space-4); color: var(--text-muted); font-size: var(--font-size-sm); }
body .ab-colcfg__section-title {
    display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2);
    font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
body .ab-colcfg__count {
    min-width: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--brand-tint-8); color: var(--brand-ink);
    font-size: var(--font-size-xs); line-height: 18px; text-align: center; letter-spacing: 0;
}
body .ab-colcfg__cols { display: flex; flex-direction: column; gap: var(--space-2); }
body .ab-colcfg__col { display: flex; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); overflow: hidden; }
/* the column number in a narrow gutter on the left, beside its stacked fields */
body .ab-colcfg__col-head {
    flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
    background: var(--surface-soft); border-right: 1px solid var(--border-soft);
}
body .ab-colcfg__col-num {
    width: 22px; height: 22px; border-radius: 50%; background: var(--brand-primary); color: #fff;
    font-size: 11px; font-weight: var(--font-weight-bold); display: inline-flex; align-items: center; justify-content: center;
}
body .ab-colcfg__col-fields { flex: 1; min-width: 0; }
body .ab-colcfg__col-empty { padding: 9px var(--space-3); font-size: var(--font-size-xs); color: var(--text-muted); font-style: italic; }
body .ab-colcfg__field {
    display: flex; align-items: center; gap: var(--space-2); min-height: 38px; padding: 2px var(--space-2) 2px var(--space-3);
}
body .ab-colcfg__col .ab-colcfg__field + .ab-colcfg__field { border-top: 1px solid var(--border-soft); }
body .ab-colcfg__field:hover { background: var(--brand-tint-3); }
body .ab-colcfg__label { flex: 1; min-width: 0; font-size: var(--font-size-sm); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .ab-colcfg__label.is-muted { color: var(--text-secondary); }
body .ab-colcfg__actions { display: inline-flex; gap: 2px; flex-shrink: 0; }
body .ab-colcfg__actions .q-btn { color: var(--text-muted) !important; }
body .ab-colcfg__actions .q-btn:not([disabled]):hover { color: var(--brand-ink) !important; }
body .ab-colcfg__actions .q-btn.ab-colcfg__hide:hover { color: var(--color-danger-ink, #b91c1c) !important; }
body .ab-colcfg__actions .q-btn[disabled] { opacity: .25 !important; }
body .ab-colcfg__hidden { border: 1px dashed var(--border-default); border-radius: var(--radius-md); }
body .ab-colcfg__hidden .ab-colcfg__field + .ab-colcfg__field { border-top: 1px dashed var(--border-soft); }
body .ab-colcfg__show { color: var(--brand-ink) !important; }
body .ab-colcfg__none { padding: var(--space-3); border: 1px dashed var(--border-default); border-radius: var(--radius-md); color: var(--text-muted); font-size: var(--font-size-sm); text-align: center; }
body .ab-colcfg__footer {
    display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-5); padding-top: var(--space-4);
    border-top: 1px solid var(--border-soft); position: sticky; bottom: 0; background: var(--surface-card);
}
body .ab-colcfg__footer .ab-colcfg__reset { color: var(--text-muted) !important; }
body .ab-colcfg__footer .ab-colcfg__reset:hover { color: var(--color-danger-ink, #b91c1c) !important; }

/* Advanced Search dialog (list macro DefaultScreenMacros.qvt.ftl, header-dialog="true"): an intro line, the filters in a
   two-column grid (a field with match options or a date/number range spans both), Sort by, then Search / Clear all in a
   footer that stays in view. The shared section titles match the Columns dialog. */
body .ab-search__intro { margin: 0 0 var(--space-3); color: var(--text-muted); font-size: var(--font-size-sm); }
body .ab-search__section-title {
    margin: var(--space-4) 0 var(--space-2); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold);
    letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
body .ab-search__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-3); row-gap: var(--space-1); }
@media (max-width: 640px) { body .ab-search__grid { grid-template-columns: minmax(0, 1fr); } }
body .ab-search__grid > div { margin: 0 !important; min-width: 0; }
/* a field with match options (text-find) or a from/to pair (date-find, range-find): the whole row */
body .ab-search__grid > div:has(.q-checkbox), body .ab-search__grid > div:has(.q-field__before .q-field) { grid-column: 1 / -1; }
body .ab-search__grid > div > .row { flex-wrap: nowrap; }
/* every field fills its cell (a text input's size attribute would stop it short) */
body .ab-search__grid > div > .q-field, body .ab-search__grid > div > .row > .q-field { width: 100%; flex: 1 1 auto; }
/* text-find: its options (Exclude, match, Ignore case) on the same line, right after the input, kept compact so the
   input keeps most of the row */
body .ab-search__grid .q-input:has(> .q-field__after .q-checkbox) > .q-field__inner { flex: 1 1 auto; min-width: 140px; }
body .ab-search__grid .q-input:has(> .q-field__after .q-checkbox) > .q-field__after {
    flex: 0 0 auto; padding-left: var(--space-2); height: auto; align-self: center; gap: var(--space-2);
}
body .ab-search__grid .q-input > .q-field__after > * { margin: 0 !important; }
body .ab-search__grid .q-input > .q-field__after .q-field .q-field__control { min-height: 32px !important; height: 32px !important; }
body .ab-search__grid .q-input > .q-field__after .q-field__native,
body .ab-search__grid .q-input > .q-field__after .q-checkbox__label { font-size: var(--font-size-xs) !important; color: var(--text-secondary); }
/* the checkbox options read as plain toggles, not boxed fields */
body .ab-search__grid .q-input > .q-field__after .q-field:has(.q-checkbox) .q-field__control:before,
body .ab-search__grid .q-input > .q-field__after .q-field:has(.q-checkbox) .q-field__control:after { border: 0 !important; }
body .ab-search__grid .q-input > .q-field__after .q-field:has(.q-checkbox) .q-field__control { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
body .ab-search__grid .q-input > .q-field__after .q-select { min-width: 130px; }
/* the list's own header Find button is replaced by the footer's Search */
body .ab-search__grid > div:has(> button[type=submit]), body .ab-search__grid > div:has(> .q-btn[type=submit]) { display: none; }
body .ab-search__sort { max-width: 100%; }
body .ab-search__footer {
    position: sticky; bottom: calc(-1 * var(--space-5)); z-index: 2; display: flex; align-items: center; gap: var(--space-2);
    margin: var(--space-5) calc(-1 * var(--space-6)) calc(-1 * var(--space-5)); padding: var(--space-3) var(--space-6);
    background: var(--surface-card); border-top: 1px solid var(--border-soft);
}
body .ab-search__footer .q-btn.q-btn--flat { color: var(--text-muted) !important; }

/* Saved Finds dialog (list macro DefaultScreenMacros.qvt.ftl, saved-finds="true"): the find open now with its email
   schedule, "Save this search" (current filters, a name, navy Save), then "Your saved searches" as rows with Open,
   default (star), replace with current filters, delete. Same section titles as the Columns and Search dialogs. */
body .ab-sfind__intro { margin: 0 0 var(--space-3); color: var(--text-muted); font-size: var(--font-size-sm); }
body .ab-sfind__section-title {
    display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2);
    font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
body .ab-sfind__count {
    min-width: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--brand-tint-8); color: var(--brand-ink);
    font-size: var(--font-size-xs); line-height: 18px; text-align: center; letter-spacing: 0;
}
body .ab-sfind__name { font-weight: var(--font-weight-semibold); color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
body .ab-sfind__empty { padding: var(--space-3); border: 1px dashed var(--border-default); border-radius: var(--radius-md); color: var(--text-muted); font-size: var(--font-size-sm); }
/* open now */
body .ab-sfind__active { border: 1px solid var(--brand-tint-25); border-radius: var(--radius-md); background: var(--brand-tint-3); padding: var(--space-3); }
body .ab-sfind__active-head { display: flex; align-items: center; gap: var(--space-2); color: var(--brand-ink); }
body form.ab-sfind__sched { display: flex !important; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--brand-tint-8); }
body .ab-sfind__sched-label { flex: 0 0 100%; font-size: var(--font-size-sm); color: var(--text-secondary); }
body form.ab-sfind__sched .q-field { min-width: 150px; flex: 0 1 180px; }
body .ab-sfind__sched-on { margin-top: var(--space-2); font-size: var(--font-size-sm); color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-1); }
/* save this search */
body .ab-sfind__summary {
    margin-bottom: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
    background: var(--surface-soft); font-size: var(--font-size-sm); color: var(--text-secondary);
}
body form.ab-sfind__new { display: flex !important; align-items: flex-start; gap: var(--space-2); }
body form.ab-sfind__new .q-input { flex: 1; }
body form.ab-sfind__new .q-btn { height: 40px; }
/* your saved searches */
body .ab-sfind__list { display: flex; flex-direction: column; border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
body .ab-sfind__list:empty { display: none; }
body form.ab-sfind__row {
    display: flex !important; align-items: center; gap: var(--space-2); min-height: 48px; padding: 4px var(--space-2) 4px var(--space-3);
}
body .ab-sfind__row + .ab-sfind__row { border-top: 1px solid var(--border-soft); }
body .ab-sfind__row:hover { background: var(--brand-tint-3); }
body .ab-sfind__row.is-active { background: var(--brand-tint-8); }
body .ab-sfind__row-icon { color: var(--brand-ink); font-size: 18px; }
body .ab-sfind__row-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
/* Open: the row's main action, a soft navy pill with the arrow after the label */
body .ab-sfind__row-actions .q-btn.ab-sfind__open {
    background: var(--brand-tint-8) !important; color: var(--brand-ink) !important; border-radius: var(--radius-pill) !important;
    padding: 0 6px 0 12px !important; min-height: 30px; font-weight: var(--font-weight-semibold); margin-right: var(--space-1);
}
body .ab-sfind__row-actions .q-btn.ab-sfind__open:before { border: 0 !important; }
body .ab-sfind__row-actions .q-btn.ab-sfind__open .q-icon { font-size: 16px; margin-left: 4px; transition: transform var(--transition-fast, .15s); }
body .ab-sfind__row-actions .q-btn.ab-sfind__open:hover { background: var(--brand-primary) !important; color: #fff !important; }
body .ab-sfind__row-actions .q-btn.ab-sfind__open:hover .q-icon { transform: translateX(2px); }
body .ab-sfind__row-actions .q-btn--flat { color: var(--text-muted) !important; }
body .ab-sfind__row-actions .q-btn--flat:hover { color: var(--brand-ink) !important; }
body .ab-sfind__row-actions .q-btn.ab-sfind__star-on { color: var(--color-warning, #d97706) !important; }
body .ab-sfind__row-actions .ab-sfind__delete:hover { color: var(--color-danger-ink, #b91c1c) !important; }

/* Export menu (list macro, show-csv/xlsx-button; ab-xmenu, NOT ab-export: that is the Analytics header's export group,
   ahlabot-reports ReportHeader.qvt.ftl): a teleported q-menu (content-class ab-xmenu-pop). What is
   downloaded, then Excel and CSV as two choices with a file name each. Grey icons: export controls stay neutral. */
body .ab-xmenu-pop { border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-menu, var(--shadow-lg)) !important; border: 1px solid var(--border-default); }
body .ab-xmenu { display: block !important; width: 320px; max-width: 90vw; padding: var(--space-3) 0 var(--space-2); }
body .ab-xmenu > .q-list { display: block !important; }
body .ab-xmenu__title { padding: 0 var(--space-4); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-strong); }
body .ab-xmenu__sub { padding: 2px var(--space-4) var(--space-2); font-size: var(--font-size-xs); color: var(--text-muted); line-height: 1.4; border-bottom: 1px solid var(--border-soft); }
body .ab-xmenu .q-list { padding-top: var(--space-1); }
/* the theme styles every menu item with !important (app.css "body .q-menu .q-item"): these are scoped to this menu */
body .q-menu.ab-xmenu-pop .q-item.ab-xmenu__item {
    min-height: 54px !important; padding: 6px var(--space-3) !important; margin: 0 6px !important; color: var(--text-primary) !important;
    border-radius: var(--radius-md);
}
body .q-menu.ab-xmenu-pop .q-item.ab-xmenu__item:hover { background: var(--brand-tint-3) !important; }
body .q-menu.ab-xmenu-pop .ab-xmenu__item .q-item__section--avatar { min-width: 44px; padding-right: 0; }
body .q-menu.ab-xmenu-pop .ab-xmenu__item .q-item__section--avatar .q-icon {
    width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--surface-soft); border: 1px solid var(--border-default);
    color: var(--text-secondary) !important; font-size: 18px;
}
body .q-menu.ab-xmenu-pop .ab-xmenu__item .q-item__label { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-strong); line-height: 1.3; }
body .q-menu.ab-xmenu-pop .ab-xmenu__item .q-item__label--caption { font-weight: var(--font-weight-regular); color: var(--text-muted); font-size: var(--font-size-xs); margin-top: 2px !important; }
body .q-menu.ab-xmenu-pop .ab-xmenu__item .q-item__section--side:not(.q-item__section--avatar) .q-icon { color: var(--text-muted) !important; opacity: 0; transition: opacity var(--transition-fast, .15s); }
body .q-menu.ab-xmenu-pop .ab-xmenu__item:hover .q-item__section--side:not(.q-item__section--avatar) .q-icon { opacity: 1; color: var(--brand-ink) !important; }

/* List pager: Go to [page] → (theme Assets/js/AbListNav.js, <ab-form-go-page>), one small field with its arrow inside,
   matching the page-size button beside it; red outline for a page that does not exist. */
body .ab-gopage {
    display: inline-flex !important; align-items: center; gap: 4px; height: 30px; padding: 0 2px 0 10px; margin: 0 var(--space-2);
    border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card);
    transition: border-color var(--transition-fast, .15s);
}
body .ab-gopage:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-tint-8); }
body .ab-gopage.is-bad { border-color: var(--color-danger, #dc2626); box-shadow: none; }
body .ab-gopage__label { font-size: var(--font-size-xs); color: var(--text-muted); white-space: nowrap; }
body .ab-gopage__input {
    width: 44px; border: 0; outline: 0; background: transparent; padding: 0; text-align: center;
    font: inherit; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-strong);
}
body .ab-gopage__input::placeholder { color: var(--text-muted); font-weight: var(--font-weight-regular); opacity: .7; }
body .ab-gopage__go { color: var(--brand-ink) !important; }
body .ab-gopage__go[disabled] { color: var(--text-muted) !important; opacity: .35 !important; }
body .list-modern .form-list-nav-row .ab-gopage .q-btn { min-width: 26px !important; height: 26px; padding: 0 !important; }
body .list-modern .form-list-nav-row .ab-gopage .q-btn:before { border: 0 !important; }
body .list-modern .form-list-nav-row .ab-gopage .q-btn .q-icon { color: inherit !important; }

/* <ab-live-log> (Assets/js/AbLiveLog.js): a background job's log, followed as it is written */
.ab-live-log { margin-top: 6px; border: 1px solid rgba(3, 4, 84, .14); border-radius: 8px; overflow: hidden; }
.ab-live-log-head { display: flex; align-items: center; gap: 8px; padding: 4px 10px; font-size: 12px; font-weight: 500;
    color: #030454; background: rgba(3, 4, 84, .05); border-bottom: 1px solid rgba(3, 4, 84, .10); }
.ab-live-log-count { margin-left: auto; color: #757575; font-weight: 400; }
.ab-live-log-dot { width: 8px; height: 8px; border-radius: 50%; background: #11d167; animation: ab-live-log-pulse 1.2s ease-in-out infinite; }
@keyframes ab-live-log-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ab-live-log-box { margin: 0; padding: 8px 10px; overflow: auto; font-family: Consolas, Menlo, monospace; font-size: 12px;
    line-height: 1.45; white-space: pre; color: #1d1d1d; background: #fafafa; }
body.body--dark .ab-live-log-box { color: #e0e0e0; background: #1d1d1d; }
body.body--dark .ab-live-log-head { color: #e0e0e0; background: rgba(255, 255, 255, .05); }

/* the demo seed's Logins section on each run (ahlabot-demo screen/DemoData.xml) */
.ab-demo-logins { width: 100%; }
.ab-demo-logins-head { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 6px; }
.ab-demo-logins-title { font-size: 12px; font-weight: 600; color: #030454; }
/* the CSV / Excel downloads: one neutral segmented group, grey icons (as the lists' Export) */
.ab-demo-logins-export { display: inline-flex; margin-left: auto; border: 1px solid rgba(3, 4, 84, .16); border-radius: 6px; overflow: hidden; }
.ab-demo-logins-export .q-btn { color: #424242; padding: 2px 10px; }
.ab-demo-logins-export .q-btn + .q-btn { border-left: 1px solid rgba(3, 4, 84, .16); }
.ab-demo-logins-export .q-icon { color: #757575; font-size: 13px; }
body.body--dark .ab-demo-logins-export .q-btn { color: #e0e0e0; }
.ab-demo-logins code { font-size: 12px; background: transparent; padding: 0; }
body.body--dark .ab-demo-logins-title { color: #e0e0e0; }

/* Order totals (TAXES.md: an order's Overview tab, Totals box): the total row under a rule */
.ab-totals-grand { border-top: 1px solid var(--border-soft); margin-top: var(--space-1, 4px); }

/* =====================================================================
   Row selection (LIST-SCREEN-DESIGN.md, "Row selection"; DefaultScreenMacros.qvt.ftl formListSelectionBar): a form-list
   with <row-selection> gets branded rounded checkboxes in a narrow first column, and - once a row is ticked - a navy
   bar floating at the top of the page, under the app header, with the count, each action as a white pill opening its
   dialog, and Clear (user, 2026-10-19: not at the bottom).
   ===================================================================== */
body .ab-row-check-cell { width: 44px; min-width: 44px; padding-left: var(--space-4, 16px) !important; padding-right: 0 !important; }
body .ab-row-check .q-checkbox__inner { font-size: 40px; }
body .ab-row-check .q-checkbox__bg { width: 18px; height: 18px; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-radius: 4px; border: 1.5px solid currentColor; }
body .ab-row-check .q-checkbox__inner:not(.q-checkbox__inner--truthy):not(.q-checkbox__inner--indet) { color: #a3abb8 !important; }
body .ab-row-check .q-checkbox__inner--truthy .q-checkbox__bg,
body .ab-row-check .q-checkbox__inner--indet .q-checkbox__bg { background: var(--brand-primary); border-color: var(--brand-primary); }
body .ab-row-check .q-checkbox__svg { color: #ffffff; padding: 1px; }
body .ab-row-check:hover .q-checkbox__inner:not(.q-checkbox__inner--truthy) { color: var(--brand-primary) !important; }
/* a ticked row reads as selected */
body .list-modern .tr:has(.ab-row-check .q-checkbox__inner--truthy) > .td { background: var(--brand-tint-8) !important; }

.ab-selbar {
    position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 2500;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; max-width: calc(100vw - 32px);
    background: var(--brand-primary); color: #ffffff; border-radius: var(--radius-pill, 999px);
    box-shadow: 0 12px 32px rgba(3, 4, 84, 0.35), 0 2px 6px rgba(3, 4, 84, 0.2);
    font-size: var(--font-size-sm, 13px);
}
.ab-selbar__count { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.ab-selbar__count .q-icon { color: var(--brand-ink-bright, #11d167); }
.ab-selbar__divider { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.25); margin: 0 4px; }
/* each action: a white pill (navy text: never white on green, brand-palette rule) */
.ab-selbar .ab-selbar__action.q-btn {
    background: #ffffff !important; color: var(--brand-primary) !important; border-radius: var(--radius-pill, 999px) !important;
    min-height: 32px; padding: 0 14px !important; font-weight: 600; text-transform: none;
}
.ab-selbar .ab-selbar__action.q-btn:before { border: none !important; }
.ab-selbar .ab-selbar__action.q-btn .q-icon { font-size: 14px; color: var(--brand-primary); }
.ab-selbar .ab-selbar__action.q-btn:hover { background: #eef0ff !important; }
.ab-selbar__clear.q-btn { color: rgba(255, 255, 255, 0.8) !important; border-radius: var(--radius-pill, 999px) !important; padding: 0 10px !important; }
.ab-selbar__clear.q-btn:hover { color: #ffffff !important; background: rgba(255, 255, 255, 0.12) !important; }
.ab-selbar-fade-enter-active, .ab-selbar-fade-leave-active { transition: opacity .18s ease, transform .18s ease; }
.ab-selbar-fade-enter, .ab-selbar-fade-leave-to { opacity: 0; transform: translate(-50%, -12px); }
body.body--dark .ab-selbar { background: #1e2060; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
@media (max-width: 599px) { .ab-selbar { top: 56px; padding-left: 14px; } }

/* ===================================================================== Push preview
   A push campaign as a phone's lock screen shows it (ahlabot-admin Campaign/PushPreview.qvt.ftl, PUSH-AUDIENCES.md WP6):
   a navy-to-green screen, the notification as a frosted card. */
.ab-push-preview { display: flex; justify-content: center; padding: 8px 0; }
.ab-push-preview__screen { width: 300px; max-width: 100%; min-height: 360px; border-radius: 34px; padding: 22px 14px;
    background: linear-gradient(160deg, #030454 0%, #1b1f7a 55%, #0e8f5a 100%); box-shadow: 0 10px 30px rgba(3, 4, 84, 0.25);
    border: 6px solid #10122e; box-sizing: border-box; }
.ab-push-preview__time { color: #ffffff; text-align: center; font-size: 44px; font-weight: 300; margin: 6px 0 22px; letter-spacing: 1px; }
.ab-push-preview__card { background: rgba(255, 255, 255, 0.86); border-radius: 16px; padding: 10px 12px 12px; color: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.ab-push-preview__app { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #4b5563; letter-spacing: .4px; margin-bottom: 4px; }
.ab-push-preview__icon { width: 18px; height: 18px; border-radius: 5px; background: #030454; color: #11d167; display: inline-flex;
    align-items: center; justify-content: center; font-size: 10px; }
.ab-push-preview__now { margin-left: auto; }
.ab-push-preview__title { font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ab-push-preview__body { font-size: 13px; line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; white-space: pre-line; }
.ab-push-preview__image { display: block; width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.ab-push-preview__opens { color: rgba(255, 255, 255, 0.8); font-size: 12px; text-align: center; margin-top: 14px; }
body.body--dark .ab-push-preview__card { background: rgba(30, 32, 50, 0.9); color: #f3f4f6; }
body.body--dark .ab-push-preview__app { color: #cbd5e1; }

/* ===================================================================== Action row
   A row of record actions mixing hidden-form buttons (their form is display: contents) and a container-dialog's
   button (wrapped in a block span). Quasar's q-gutter spaces by child margins, which the form ignores and the span
   takes, so a dialog button sat lower than its neighbours (push campaign page, 2026-11-20). A flex gap spaces them all
   the same. */
.ab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ab-actions > * { margin: 0 !important; }
.ab-actions .q-btn { margin-top: 0 !important; }
