/*
*     Project: SportsHub
*        Item: styles.css
* Description: The app's styles - every page and view uses this one file (linked from html/index.html and the
*              pages built in html/common.prg: company selection, error pages - utils/ViewFunc.prg).
*    Includes:
 *  1. Palette & Bootstrap overrides
 *  2. App shell: sidebar, content area
 *  3. Busy spinner & confirm popup (files/uhttpd2/uhttpd2.js)
 *  4. Account editor header & tabs (html/account/account_edit.html)
 *  5. Account tabs
 *  6. Pages outside the app shell (company selection, error pages)
 *  7. Phones / narrow screens
 */

/* ===== 1. Palette & Bootstrap overrides =====
   Official palette - header/sidebar and headings: primary; buttons and active navigation:
   primary-variant; page background: secondary; text on dark backgrounds: white */
:root {
  --color-primary: #180034;
  --color-primary-variant: #330072;
  --color-secondary: #F8F9FA;

  /* neutrals and effects shared by every part of the app (Bootstrap's greys) */
  --sh-surface: #FFFFFF;          /* cards, panels, dropdowns */
  --sh-on-primary: #FFFFFF;       /* text on primary backgrounds */
  --sh-text: #212529;
  --sh-muted: #5F6870;
  --sh-border: #DEE2E6;
  --sh-border-input: #CED4DA;
  --sh-subtle: #EEF1F4;           /* table heads, separators, ID chips */
  --sh-hover: #F3F0F6;            /* highlighted list items */
  --sh-row-hover: #F7F5F9;        /* table rows under the mouse */
  --sh-overlay: rgba(24,0,52,.45); /* behind popups and the phone menu drawer */
  --sh-shadow: 0 1px 3px rgba(24,0,52,.06);
  --sh-shadow-lg: 0 8px 24px rgba(24,0,52,.18);
  --sh-focus-ring: 0 0 0 3px rgba(51,0,114,.5);

  --sh-qs-h: 52px;                /* the quick search bar at the bottom of every page */

  /* spacing - one scale for the whole app: the page's side margin (header, tabs, cards and lists line up
     on it) and the gaps between sections and between controls */
  --sh-gutter: 20px;
  --sh-gap: 1rem;
  --sh-gap-sm: .5rem;
}
@media (max-width: 767.98px) { :root { --sh-gutter: 12px; } }

/* cards (the tabs' and the dealer editor's sections): spaced apart, and no extra space under the last
   row of a card - the card's own padding is the space */
.card { margin-bottom: var(--sh-gap); }
.card-body > :last-child, .card-body > .form-group.row:last-child { margin-bottom: 0; }
.card-header .h6 { font-weight: 600; }

/* One text size for the whole app: Bootstrap and these styles size everything in rem, so the app's
   root size sets body text, fields, labels, buttons, tables, menus and dialogs alike - headings and
   small print scale with it. (The company selection and error pages keep their own larger type.) */
html:not(.sh-page) { font-size: 12.5px; }
body { overflow-x: hidden; background: var(--color-secondary); }
/* The UI font: Inter (400 / 500 / 600 / 700), served with Hub's own files (fonts/inter - SIL Open Font License, OFL.txt)
   - Font Awesome keeps its own. Nothing is smaller than 11px: small print (Bootstrap's small / .small, helper lines,
   second lines in tables, the pills) is a fixed 11px, status pills and title badges 12px */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter/inter-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter/inter-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter/inter-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
html:not(.sh-page) body, html:not(.sh-page) .btn, html:not(.sh-page) .form-control, html:not(.sh-page) .custom-select,
html:not(.sh-page) .tabulator, html:not(.sh-page) .tooltip, html:not(.sh-page) .popover, html:not(.sh-page) input,
html:not(.sh-page) select, html:not(.sh-page) textarea, html:not(.sh-page) button, html:not(.sh-page) label,
html:not(.sh-page) .custom-control-label, html:not(.sh-page) .dropdown-item, html:not(.sh-page) .badge {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
/* every small button (btn-sm, a small button group's) one fixed size - the header toggles, the cards' buttons */
html:not(.sh-page) .btn-sm, html:not(.sh-page) .btn-group-sm > .btn, html:not(.sh-page) .input-group-sm > .input-group-append > .btn,
html:not(.sh-page) .input-group-sm > .input-group-prepend > .btn { font-size: 11.5px; }
html:not(.sh-page) small, html:not(.sh-page) .small, html:not(.sh-page) .form-text, html:not(.sh-page) .dropdown-header,
html:not(.sh-page) ::placeholder { font-size: 11px; }
.tabulator { font-size: 1rem; }                 /* Tabulator lists size themselves in px */
/* a table filter's / editor's drop-down list (Tabulator's popup, outside the table): the page's font and size, compact
   rows, the menus' hover colour, no wider than it needs */
.tabulator-edit-list { font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 12.5px !important;
                       line-height: 1.4; border: 1px solid var(--sh-border); border-radius: .25rem; box-shadow: var(--sh-shadow-lg); width: auto !important; min-width: 8rem; }
.tabulator-edit-list .tabulator-edit-list-item { padding: 4px 8px; white-space: nowrap; }
.tabulator-edit-list .tabulator-edit-list-item:hover, .tabulator-edit-list .tabulator-edit-list-item.focused,
.tabulator-edit-list .tabulator-edit-list-item.active { background: var(--sh-hover); color: var(--sh-text); outline: none; }
.tabulator-edit-list .tabulator-edit-list-notice { padding: 4px 8px; font-size: 11px; color: var(--sh-muted); }
/* a column whose cells are monospace (cssClass text-monospace) keeps its heading in the headings' font */
.tabulator .tabulator-header .tabulator-col.text-monospace { font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important; }
/* TWeb's "sm" forms (cSizing "sm") keep their tighter padding but not a smaller text size */
.form-control-sm, .custom-select-sm, .btn-sm, .input-group-sm > .form-control, .input-group-sm > .input-group-append > .btn,
.input-group-sm > .input-group-prepend > .input-group-text { font-size: 1rem; }
/* a TWeb GET with a SPAN (a unit after the value) in an "sm" form: TWeb sizes the input form-control-sm but
   not its input-group, so the unit gets Bootstrap's input-group-sm metrics - the same height as the input */
.input-group > .form-control-sm ~ .input-group-append > .input-group-text,
.input-group > .form-control-sm ~ .input-group-append > .btn { height: calc(1.5em + .5rem + 2px); padding: .25rem .5rem; font-size: 1rem;
                                                                line-height: 1.5; border-radius: 0 .2rem .2rem 0; }
.input-group > .form-control-sm ~ .input-group-append { align-items: stretch; }
.badge { font-size: 12px; }
.table td, .table th { padding: .35rem .5rem; vertical-align: middle; }
label { margin-bottom: .2rem; }
h1, h2, h3, h4, h5, h6, .h6 { color: var(--color-primary); }
a { color: var(--color-primary-variant); }
a:hover { color: var(--color-primary); }
.text-primary { color: var(--color-primary-variant) !important; }
.bg-light { background-color: var(--color-secondary) !important; }
.btn-primary { background-color: var(--color-primary-variant); border-color: var(--color-primary-variant); color: var(--sh-on-primary); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--color-primary) !important; border-color: var(--color-primary) !important; color: var(--sh-on-primary) !important; }
.btn-outline-dark, .btn-outline-primary { color: var(--color-primary-variant); border-color: var(--color-primary-variant); }
.btn-outline-dark:hover, .btn-outline-dark:focus, .btn-outline-dark:active,
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--color-primary-variant) !important; border-color: var(--color-primary-variant) !important; color: var(--sh-on-primary) !important; }
.btn-link { color: var(--color-primary-variant); }
.btn-link.active { color: var(--color-primary-variant); font-weight: 600; border-bottom: 2px solid var(--color-primary-variant); }
.card { background-color: var(--sh-surface); }
.card-header { background-color: var(--color-secondary); }


/* ===== 2. App shell (html/index.html) =====
   Full window height: the sidebar stays put, only the content area scrolls (vertically) */
html, body { height: 100%; overflow: hidden; }
.sh-layout { display: flex; height: 100vh; overflow: hidden; }

.sh-sidebar { width: 210px; flex: 0 0 210px; height: 100vh; display: flex; flex-direction: column; background: var(--color-primary);
              color: rgba(255,255,255,.85); transition: width .2s, flex-basis .2s; overflow: hidden; }
.sh-sidebar.collapsed { width: 56px; flex-basis: 56px; }
.sh-brand { display: flex; align-items: center; height: 52px; padding: 0 8px; border-bottom: 1px solid rgba(255,255,255,.15); white-space: nowrap; }
.sh-toggle { background: none; border: 0; color: rgba(255,255,255,.8); width: 40px; height: 40px; font-size: 1.1rem; flex: 0 0 40px; cursor: pointer; }
.sh-toggle:hover, .sh-toggle:focus { color: var(--sh-on-primary); outline: none; }
.sh-title { font-weight: 600; margin-left: 6px; color: var(--sh-on-primary); }
.sh-db { display: block; font-size: 11px; color: rgba(255,255,255,.6); margin-left: 6px; }
/* the SportsHub logo (files/sportshub/icons/logo.png) - next to the title; hidden with it when the sidebar is collapsed */
.sh-brand-logo { flex: 0 0 auto; display: flex; align-items: center; margin-left: 2px; }
.sh-logo { width: 28px; height: 28px; display: block; }
/* the company's database (ShDbInfo): its flag (a test database: a flask), its name as a coloured pill, and a band of
   that colour along the top of the sidebar / phone bar - Canada red, USA blue, a test or dev database amber */
.sh-flag { width: 30px; height: 30px; display: block; border-radius: 6px; }
.sh-flag-test { display: flex; align-items: center; justify-content: center; background: #F2A900; color: #3D2A00; font-size: 1rem; }
.sh-dbpill { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
             letter-spacing: .02em; line-height: 1.5; white-space: nowrap; }
.sh-dbpill-ca { background: #D52B1E; color: #FFFFFF; }
.sh-dbpill-us { background: #2D4A9A; color: #FFFFFF; }
.sh-dbpill-test { background: #F2A900; color: #3D2A00; text-transform: uppercase; }
.sh-dbmark-ca { border-top: 4px solid #D52B1E; }
.sh-dbmark-us { border-top: 4px solid #2D4A9A; }
.sh-dbmark-test { border-top: 4px solid #F2A900; }
.sh-sidebar .sh-db { margin-left: 6px; }
.sh-topbar .sh-dbbox { margin-left: 8px; }
/* collapsed: the company's flag instead of the three bars - clicking it expands the sidebar (ShBrandClick) */
.sh-sidebar.collapsed #sh-navtoggle { display: none; }
.sh-sidebar.collapsed .sh-brand-logo { margin: 0 auto; cursor: pointer; }
.sh-sidebar.collapsed .sh-brand-logo:hover .sh-flag { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }

.sh-menu { list-style: none; padding: 8px 0; margin: 0; }
.sh-menu-main { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.sh-menu-bottom { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.15); }
/* the sidebar's footer - the signed-in user (ShUserFooter, utils/UiFunc.prg): initials in a circle, the name, an up arrow;
   its menu (pHQ, Change password, Logout) opens above it - beside the initials when the sidebar is collapsed (ShUserMenu) */
.sh-menu .sh-user-btn { gap: 0; }
.sh-avatar { flex: 0 0 28px; width: 28px; height: 28px; margin-left: -2px; border-radius: 50%; display: inline-flex; align-items: center;
             justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--color-primary);
             background: var(--sh-on-primary); }
.sh-menu .sh-user-btn .sh-user-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-left: 10px; }
.sh-menu .sh-user-btn .sh-user-caret { flex: 0 0 auto; width: auto; font-size: 11px; opacity: .75; transition: transform .15s; }
.sh-menu .sh-user-btn.open .sh-user-caret { transform: rotate(180deg); }
.sh-menu .sh-user-btn.open { background: var(--color-primary-variant); color: var(--sh-on-primary); }
.sh-sidebar.collapsed .sh-user-caret { display: none; }
/* What's new: a small dot on the initials and on the menu item while a release note is unread (ShWhatsNewDot) */
.sh-avatar { position: relative; }
.sh-new-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: #e0a800; box-shadow: 0 0 0 2px var(--color-primary); }
.sh-avatar .sh-new-dot { position: absolute; top: -1px; right: -1px; }
#sh-menu-new .sh-new-dot { margin-left: auto; box-shadow: none; }
.sh-user.sh-has-new .sh-new-dot { display: inline-block; }
/* the What's new window: each release's date, then its lines */
.sh-wn-entry + .sh-wn-entry { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--sh-border); }
.sh-wn-date { font-weight: 600; margin-bottom: .25rem; }
.sh-wn-lines { margin: 0; padding-left: 1.2em; }
.sh-sidebar.collapsed .sh-menu .sh-user-btn { padding-left: 14px; padding-right: 14px; }
.sh-user-menu { display: none; position: fixed; z-index: 1060; min-width: 200px; padding: 4px 0; background: var(--color-primary);
                border: 1px solid rgba(255,255,255,.15); border-radius: .4rem .4rem 0 0; box-shadow: var(--sh-shadow-lg); }
.sh-user-menu.show { display: block; }
.sh-sidebar.collapsed .sh-user-menu { border-radius: 0 .4rem .4rem 0; }
.sh-user-menu-name { display: none; padding: 6px 16px; font-weight: 600; color: var(--sh-on-primary); white-space: nowrap;
                     border-bottom: 1px solid rgba(255,255,255,.15); }
/* collapsed: the menu says whose it is, and its items keep their labels (the sidebar's collapsed rule hides item labels) */
.sh-sidebar.collapsed .sh-user-menu-name { display: block; }
.sh-sidebar.collapsed .sh-menu .sh-user-menu .sh-menu-item > span { display: inline; }
/* the menu items are TWeb buttons (html/index.html) - full width rows, no button look */
.sh-menu .sh-menu-item { display: flex; align-items: center; width: 100%; padding: 10px 16px; color: rgba(255,255,255,.8); text-decoration: none;
             white-space: nowrap; border: 0; border-left: 3px solid transparent; border-radius: 0; background: none; font-size: 1rem;
             text-align: left; box-shadow: none; }
.sh-menu .sh-menu-item i { width: 24px; text-align: center; font-size: 1.05rem; flex: 0 0 24px; }
.sh-menu .sh-menu-item span { margin-left: 12px; }
.sh-menu .sh-menu-item:hover, .sh-menu .sh-menu-item:focus { background: var(--color-primary-variant); color: var(--sh-on-primary); box-shadow: none; }
.sh-menu .sh-menu-item.active { background: var(--color-primary-variant); color: var(--sh-on-primary); border-left-color: var(--sh-on-primary); }
.sh-menu .sh-menu-item.disabled { opacity: .45; pointer-events: none; }
/* (only the items' own labels hide - a SAY's wrapper is a span too, and hiding every span would hide the submenu groups
   and pHQ) */
.sh-sidebar.collapsed .sh-title, .sh-sidebar.collapsed .sh-db, .sh-sidebar.collapsed .sh-menu .sh-menu-item > span { display: none; }
.sh-sidebar.collapsed .sh-menu .sh-menu-item { padding: 10px 16px; }
/* an item with a submenu (UiMenuGroup - Merchants, Users): the item, its caret (opens / closes the list under it), the list
   indented under the item's label. Collapsed sidebar: no caret - the list pops out next to the icon (ShSubPop sets where;
   fixed, as the sidebar clips what sticks out of it), with the item's name as its title */
.sh-menu-row { display: flex; align-items: stretch; }
.sh-menu-row .sh-menu-item { flex: 1 1 auto; min-width: 0; }
.sh-menu .sh-menu-caret { flex: 0 0 36px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: rgba(255,255,255,.7); font-size: 11px; }
.sh-menu .sh-menu-caret:hover, .sh-menu .sh-menu-caret:focus { background: var(--color-primary-variant); color: var(--sh-on-primary); box-shadow: none; }
.sh-menu .sh-menu-caret i { transition: transform .15s; }
.sh-menu-group.open .sh-menu-caret i { transform: rotate(180deg); }
.sh-submenu { display: none; padding: 2px 0 6px; }
.sh-menu-group.open .sh-submenu { display: block; }
.sh-submenu-title { display: none; }
.sh-submenu-item { display: block; padding: 6px 16px 6px 55px; color: rgba(255,255,255,.75); font-size: .92rem; white-space: nowrap; text-decoration: none; }
.sh-submenu-item:hover, .sh-submenu-item:focus { background: var(--color-primary-variant); color: var(--sh-on-primary); text-decoration: none; outline: none; }
.sh-submenu-item.active { color: var(--sh-on-primary); font-weight: 600; }
/* a submenu's pages after its filters (eg Merchants' logos and Quick Form): a line between */
.sh-submenu-item.sh-submenu-sep { border-top: 1px solid rgba(255,255,255,.2); margin-top: 4px; padding-top: 8px; }
.sh-sidebar.collapsed .sh-menu-caret, .sh-sidebar.collapsed .sh-menu-group.open .sh-submenu { display: none; }
.sh-sidebar.collapsed .sh-menu-group.pop .sh-submenu { display: block; position: fixed; z-index: 1060; min-width: 170px; padding: 4px 0;
                                                       background: var(--color-primary); border-radius: 0 .4rem .4rem 0; box-shadow: var(--sh-shadow-lg); }
.sh-sidebar.collapsed .sh-menu-group.pop .sh-submenu-title { display: block; padding: 6px 16px; font-weight: 600; color: var(--sh-on-primary);
                                                             border-bottom: 1px solid rgba(255,255,255,.15); white-space: nowrap; }
.sh-sidebar.collapsed .sh-submenu-item { padding-left: 16px; }

/* the page's frame is TWeb forms without an id (html/index.html): their container takes no box, and the
   control wrappers TWeb adds (col-*, input-group) neither pad nor position */
.sh-shell { display: contents; }
/* the wrappers a TWeb form's extra closing '</div>' closes (SH_FORM_WRAP in html/index.html, UiFragHtml in
   utils/UiFunc.prg) take no box - and, unlike sh-shell, leave the controls inside them alone */
.sh-wrap { display: contents; }
.sh-shell .tweb_say, .sh-qs > [class*="col-"] { padding: 0; position: static; flex: 0 0 auto; max-width: none; width: auto; }
.sh-qs > [class*="col-"] { display: block; }
.sh-qs .input-group { display: block; }
.sh-qs .input-group > .sh-qs-input { width: 100%; }        /* bootstrap's input-group sizes it 1% */
.btn.sh-toggle { padding: 0; line-height: 1; border-radius: 0; box-shadow: none; }

/* content sits flush against the sidebar: no padding/margin on the main area, the parent form's
   container-fluid (#index) or its content column - the views inside keep their own spacing */
.sh-main { flex: 1 1 auto; min-width: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; padding: 0; margin: 0; }
#index.container-fluid { padding: 0; margin: 0; max-width: none; }
#index > [data-group="index-content"] { padding: 0; margin: 0; }

/* Dropdowns (Bootstrap .dropdown-menu / .dropdown-item - the quick search list, the quick actions menu)
   in the palette: the highlighted item is the hover tint, not Bootstrap's blue */
.dropdown-menu { border-color: var(--sh-border); border-radius: .4rem; box-shadow: var(--sh-shadow-lg); }
.dropdown-item { color: var(--sh-text); }
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active, .dropdown-item:active { background: var(--sh-hover); color: var(--sh-text); }
.dropdown-header { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-muted); }

/* Quick merchant search on every page (files/sportshub/sportshub.js ShQs*) - as tall as the sidebar's brand row */
/* at the bottom of the page: .sh-main is a column, the bar goes last (order) and down to the bottom edge
   on short pages (margin-top: auto) - sticky, so it stays in view while a long page scrolls */
.sh-main { display: flex; flex-direction: column; }
.sh-main > * { flex: 0 0 auto; }
/* flex: 0 0 auto here, as ".sh-main > *" doesn't reach it - it sits in display:contents wrappers (the TWeb form,
   SH_FORM_WRAP), so otherwise it is a shrinkable flex item and shrinks on a page taller than the window */
.sh-qs-bar { order: 2; flex: 0 0 auto; margin-top: auto; height: var(--sh-qs-h); display: flex; align-items: center; padding: 0 12px; background: var(--sh-surface);
             border-top: 1px solid var(--sh-border); position: sticky; bottom: 0; z-index: 1020; box-shadow: 0 -2px 6px rgba(0,0,0,.04); }
.sh-qs { position: relative; flex: 0 1 560px; min-width: 0; }
.sh-qs-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sh-muted); pointer-events: none; }
.sh-qs .sh-qs-input { width: 100%; height: 34px; padding: 0 64px 0 34px; border: 1px solid var(--sh-border-input); border-radius: 17px; background: var(--color-secondary);
               color: var(--sh-text); font-size: 11px; outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.sh-qs .sh-qs-input::-webkit-search-cancel-button { display: none; }
.sh-qs .sh-qs-input:focus { background: var(--sh-surface); border-color: var(--color-primary-variant); box-shadow: var(--sh-focus-ring); }
.sh-qs-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; padding: 1px 6px;
             background: var(--sh-surface); color: var(--sh-muted); border: 1px solid var(--sh-border-input); border-radius: 4px; box-shadow: none; pointer-events: none; }
.sh-qs:focus-within .sh-qs-kbd, .sh-qs.busy .sh-qs-kbd { display: none; }
.sh-qs-spin { position: absolute; right: 12px; top: 50%; margin-top: -.5rem; color: var(--color-primary-variant); display: none; }
.sh-qs.busy .sh-qs-spin { display: inline-block; }
.sh-qs-list { top: auto; bottom: calc(100% + 6px); right: 0; max-height: min(420px, 70vh); overflow-y: auto; }    /* opens upwards */
.sh-qs.open .sh-qs-list { display: block; }
.sh-qs-list .sh-qs-item { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "id name st phq" "id dlr st phq"; column-gap: 10px;
                          align-items: center; padding: 7px 12px; white-space: normal; cursor: pointer; }
.sh-qs-id { grid-area: id; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; font-weight: 600; color: var(--color-primary);
            background: var(--sh-subtle); border-radius: 4px; padding: 2px 6px; }
.sh-qs-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-qs-dlr { grid-area: dlr; font-size: 11px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-qs-dlr:empty { display: none; }
/* a result's pHQ globe, at the row's right end */
.sh-qs-phq { grid-area: phq; font-size: 1.05rem; padding: 2px 6px; }
.sh-qs-st { grid-area: st; }

/* After the search box: Note / task, always (sh-qs-note), then the open merchant's quick actions, and Close at
   the bar's right end (html/index.html, ShActDo / ShMerchClose) - those two only while a merchant is open
   (body.sh-merch-open, set with UT_MERCH). The labels give way to the icons when the bar gets narrow; the
   actions scroll sideways rather than wrap. */
.sh-qs-note { margin-left: 12px; }
.sh-qs-acts { display: none; }
body.sh-merch-open .sh-qs-acts { display: flex; align-items: center; gap: 6px; margin-left: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body.sh-merch-open .sh-qs-acts::-webkit-scrollbar { display: none; }
.sh-qs-act { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap; }
.sh-qs-act i { color: var(--color-primary-variant); }
.sh-qs-act:hover i, .sh-qs-act:focus i { color: inherit; }
@media (max-width: 1399.98px) { .sh-qs-actlbl { display: none; } }
/* the live update banner's entrance (services/LiveService.prg) */
@keyframes sh-fab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* a short notice at the bottom of the window, above the search bar (ShToast) */
.sh-toast { position: fixed; left: 50%; bottom: calc(var(--sh-qs-h) + 16px); transform: translate(-50%, 12px); z-index: 1060; padding: 8px 16px; border-radius: 18px;
            background: var(--sh-text); color: var(--sh-on-primary); font-size: .95rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.sh-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phone-only parts (section 7) */
.sh-topbar, .sh-backdrop { display: none; }


/* ===== 3. Busy spinner & confirm popup (files/uhttpd2/uhttpd2.js) ===== */
.ut-busy { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 20000;
           background: rgba(255,255,255,.45); cursor: progress; }
.ut-busy-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.ut-busy-spinner { width: 3rem; height: 3rem; }

.ut-confirm { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 21000; background: var(--sh-overlay); }
.ut-confirm-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 92%; max-width: 440px;
                  background: var(--sh-surface); border-radius: .4rem; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.3); overflow: hidden; }
.ut-confirm-title { background: var(--color-primary); color: var(--sh-on-primary); padding: .75rem 1rem; font-weight: 600; display: flex; align-items: center; }
/* its X, as every other pop-up's - Cancel */
.ut-confirm-title .ut-confirm-x { margin-left: auto; color: var(--sh-on-primary); opacity: .85; text-shadow: none; font-size: 1.4rem; line-height: 1; padding: 0 0 0 .75rem; }
.ut-confirm-title .ut-confirm-x:hover, .ut-confirm-title .ut-confirm-x:focus { color: var(--sh-on-primary); opacity: 1; }
/* the question moves by its title bar (UTConfirm) */
.ut-confirm-title { cursor: move; user-select: none; }
.ut-confirm-title .ut-confirm-x { cursor: pointer; }
.ut-confirm-msg { padding: 1.25rem 1rem; color: var(--color-primary); white-space: pre-wrap; }
.ut-confirm-foot { padding: .75rem 1rem; background: var(--sh-surface); display: flex; flex-wrap: wrap; align-items: center;
                   justify-content: flex-end; gap: 16px; }
/* every question's buttons full-size, one weight for every confirm in Hub, 16px apart */
html:not(.sh-page) .ut-confirm-foot .btn { font-size: 1rem; padding: .375rem .75rem; line-height: 1.5; }
/* the Finance and Settings forms (sh-fin-form - charges, recurring charges, balance adjustment, terminal IDs): the
   same full-size Cancel / Save 16px apart, a check box on the row of the field it belongs to (level with the boxes,
   under their labels), the explanations as small grey hint lines */
html:not(.sh-page) .sh-fin-form .sh-dlg-buttons { gap: 16px; }
html:not(.sh-page) .sh-fin-form .sh-dlg-buttons .btn { font-size: 1rem; padding: .375rem .75rem; line-height: 1.5; }
/* every window's footer (Cancel, then its action - bottom right): the same full-size buttons 16px apart; the task
   windows' footer bar (sh-footbar) keeps its own layout */
html:not(.sh-page) .sh-modal-dialog .sh-dlg-buttons:not(.sh-footbar) { gap: 16px; }
html:not(.sh-page) .sh-modal-dialog .sh-dlg-buttons:not(.sh-footbar) .btn { font-size: 1rem; padding: .375rem .75rem; line-height: 1.5; }
.sh-fin-form [data-group]:has(.sh-inline-chk) { padding-top: 1.9rem; }
.sh-fin-form [data-group]:has(.sh-inline-chk) label { white-space: nowrap; }
.sh-fin-form .sh-fin-hint { margin: 0 0 1rem; }
/* Finance > Fees & Pricing: the User Fees row on the card's grid - its label level with the boxes (under their labels),
   the Enabled box beside it */
.sh-uf-lbl { padding-top: 1.9rem; }
.sh-uf-row [data-group$="-billingAutoUserFee"] { padding-top: 1.9rem; white-space: nowrap; }
/* Fees & Pricing on a desktop screen: Pricing Model (25% - its longest name whole) and six fee boxes (12.5% each) on
   one line, 16px apart; the User Fees label + Enabled take Pricing Model's 25%, so Rate $ / Rate % stay under
   Tx Rate $ / Tx Rate % */
@media (min-width: 992px) {
  .sh-fee-grid { margin-left: -8px; margin-right: -8px; }
  .sh-fee-grid > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
  .sh-fee-grid > .col-3 { flex: 0 0 25%; max-width: 25%; }
  .sh-fee-grid > .col-2 { flex: 0 0 12.5%; max-width: 12.5%; }
  .sh-fee-grid > .col-1 { flex: 0 0 11%; max-width: 11%; }
  .sh-fee-grid > .col-2:has([id$="billingAutoUserFee"]) { flex: 0 0 14%; max-width: 14%; }
  .sh-fee-grid label { white-space: nowrap; }
}
/* the User Fees row without its Rate $ box (not ticked, or a plan with no user fee rates): the label and Enabled sit at
   the row's top - no room kept for the boxes' labels */
.sh-uf-row:not(:has([data-group$="-billingDBTXRATE"]:not([style*="none"]))) .sh-uf-lbl,
.sh-uf-row:not(:has([data-group$="-billingDBTXRATE"]:not([style*="none"]))) [data-group$="-billingAutoUserFee"] { padding-top: 0; }
/* a narrow window for these forms (about 560px), 16px between the rows, the Charge | Credit switch and the recurring
   charge's First charge choice; the Anniversary only for Annual (ShRecBillType sets sh-annual) */
.sh-modal-dialog .modal-dialog:has(.sh-fin-form) { max-width: 560px; }
.sh-fin-form [data-group] { margin-bottom: 1rem; }
/* (not the buttons row: Cancel and Save level) and a hint on one line, past its field's column when longer */
.sh-fin-form .sh-dlg-buttons [data-group], .sh-fin-form .sh-dlg-buttons > * { margin-bottom: 0; margin-top: 0; }
.sh-fin-form .sh-fin-hint { white-space: nowrap; }
.sh-fin-form [data-group]:has(> .sh-fin-hint), .sh-fin-form :has(> .sh-fin-hint) { overflow: visible; }
.sh-cc-switch { margin-bottom: 1rem; }
.sh-cc-switch .btn { min-width: 6rem; }
.sh-fin-form [data-group$="-recBillAnniv"] { display: none; }
.sh-fin-form.sh-annual [data-group$="-recBillAnniv"] { display: block; }
.sh-first-charge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 1rem; }
.sh-first-lbl { font-weight: 600; }
.sh-first-opt { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: normal; }
.sh-fin-form .sh-fin-hint-side { margin: 1.9rem 0 0; }
.ut-confirm-no { color: var(--color-primary-variant); border: 1px solid var(--color-primary-variant); background: var(--sh-surface); }
.ut-confirm-yes { color: var(--sh-on-primary); background: var(--color-primary-variant); border: 1px solid var(--color-primary-variant); }
.ut-confirm-yes:hover, .ut-confirm-yes:focus { color: var(--sh-on-primary); background: var(--color-primary); border-color: var(--color-primary); }

/* every other popup looks like the confirm popup: messages and errors (UModal) and form dialogs
   (bootbox, SetDialog) - title bar, body, buttons at the bottom on the window's white */
.modal-backdrop { background-color: var(--color-primary); }
.modal-backdrop.show { opacity: .45; }
.sh-modal .modal-content { border: 0; border-radius: .4rem; overflow: hidden; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.3); }
.sh-modal .modal-header { background: var(--color-primary); color: var(--sh-on-primary); padding: .75rem 1rem; border-bottom: 0; border-radius: 0; align-items: center; }
.sh-modal .modal-title, .sh-modal .bootbox-title { color: var(--sh-on-primary); font-size: 1.1rem; font-weight: 600; margin: 0; line-height: 1.5; }
.sh-modal .modal-header .close, .sh-modal .bootbox-close-button { color: var(--sh-on-primary); opacity: .8; text-shadow: none; padding: .5rem 1rem; margin: -.5rem -1rem -.5rem auto; font-size: 1.4rem; font-weight: 400; }
.sh-modal .modal-header .close:hover, .sh-modal .bootbox-close-button:hover { color: var(--sh-on-primary); opacity: 1; }
.sh-modal .modal-body { padding: 1.25rem 1rem; color: var(--color-primary); }
.sh-modal .modal-footer { background: var(--sh-surface); padding: .75rem 1rem; border-top: 0; }
.sh-modal .modal-footer > * { margin: 0 0 0 .5rem; }
.sh-modal-error .modal-header { background: #8A1C1C; }
/* a window moves by its title bar only (UBootbox) - its body's text can be selected and copied */
.sh-modal-dialog .modal-header { cursor: move; }
.sh-modal-dialog .modal-header .close, .sh-modal-dialog .modal-header button { cursor: pointer; }
.sh-modal .modal-body { user-select: text; }
.sh-modal-info .modal-body, .sh-modal-error .modal-body { word-wrap: break-word; }

/* form dialogs: TWeb puts the buttons in the form - the last row of buttons gets the footer look, flush with the
   window's bottom edge; a window without buttons (a text, a list, a history) keeps its bottom padding */
.sh-modal-dialog .modal-body { color: inherit; }
.sh-modal-dialog .modal-body:has(.sh-dlg-buttons) { padding-bottom: 0; }
.sh-modal-dialog .modal-body form, .sh-modal-dialog .modal-body > div > .container-fluid { padding-left: 0; padding-right: 0; }
/* one footer layout for every dialog: the main action far right, Cancel / Close directly left of it, a destructive one
   far left (.sh-foot-start); in a .sh-footbar the right-hand group starts at .sh-foot-push. Pinned to the window's bottom
   (sticky) so it stays in view in a long window. (!important: the .btn margin reset beside it is more specific - it had
   kept .sh-foot-push from pushing anything right) */
.sh-modal-dialog .sh-dlg-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin: 1rem -1rem 0;
                                   padding: .75rem 1rem; background: var(--sh-surface); position: sticky; bottom: 0; z-index: 3; }
.sh-modal-dialog .sh-dlg-buttons .btn { margin: 0; }
.sh-modal-dialog .sh-dlg-buttons > [class*="col"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
.sh-dlg-buttons .sh-foot-start, .sh-footbar .sh-foot-start { margin-right: auto !important; }
.sh-dlg-buttons .sh-foot-push, .sh-footbar .sh-foot-push, .sh-postrow .sh-foot-push { margin-left: auto !important; }

/* wide dialogs (sh-modal-wide - DlgWide() in utils/ViewFunc.prg): 2/3 of the screen on desktops, almost all of
   it below, the content using the whole width - tables and text scroll inside instead of overflowing */
.sh-modal-wide .modal-dialog { max-width: 66.667vw; width: 66.667vw; margin-left: auto; margin-right: auto; }
.sh-modal-wide .modal-body { overflow-x: hidden; }
.sh-modal-wide .modal-body form, .sh-modal-wide .modal-body .container-fluid { width: 100%; max-width: none; }
.sh-modal-wide .modal-body table { width: 100%; }
.sh-modal-wide .modal-body pre { width: 100%; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 991.98px) {
  .sh-modal-wide .modal-dialog { max-width: calc(100vw - 1rem); width: calc(100vw - 1rem); margin: .5rem auto; }
}


/* ===== 4. Account editor header & tabs (html/account/account_edit.html) =====
   TWeb ROWGROUP/DIV/SAY/BUTTON elements laid out with flex instead of the col-n grid */
.sh-acct-head.row, .sh-acct-tabsrow.row, .sh-acct-crumbbar.row { margin: 0; }
/* the header, the tab bar and the tab's content all start at the page gutter: the editor's own form takes
   no padding, and the tab's column (15px) plus the tab's form (15px) are brought down to it */
#account_edit.container-fluid, .sh-dlr.container-fluid { padding-left: 0; padding-right: 0; }
#account_edit > [data-group="account_edit-merch_tab_content"] { padding: 0 max(0px, calc(var(--sh-gutter) - 15px)) var(--sh-gutter); }
/* the breadcrumb bar, flush at the top and full width (Merchants / the name) */
/* one height everywhere, as short as its small text allows - a page drawn without one still keeps its room
   (sh-page-nocrumb) */
:root { --sh-crumb-h: 24px; }      /* (the text's line plus ~4px above and below) */
.sh-acct-crumbbar { height: var(--sh-crumb-h); flex-wrap: nowrap; align-items: center; padding: 0 var(--sh-gutter);
                    background: var(--color-secondary); border-bottom: 1px solid var(--sh-border); }
/* on the list pages (their form on the page gutter - UiCrumbBar, utils/UiFunc.prg): flush to the page's edges too */
.sh-page-crumbbar.row { margin: 0 calc(-1 * var(--sh-gutter)); }
.sh-acct-crumbbar .sh-acct-crumb { padding: 0; max-width: 100%; flex: 1 1 auto; min-width: 0; }
/* the breadcrumb line's right end (the merchant and partner records): who else has the record open and its last
   change, as small pills on one line - the crumb shortens first; on a narrow window the Updated pill goes (the Logs tab
   keeps the history) */
.sh-acct-crumbbar > .sh-crumb-side { flex: 0 1 auto; min-width: 0; margin-left: auto; padding: 0 0 0 12px; overflow: hidden; }
.sh-crumb-presence { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; white-space: nowrap; }
.sh-crumb-presence .sh-presence-busy, .sh-crumb-presence .sh-presence-last { font-size: 11px; font-weight: 500; padding: 0 8px;
                                                                              line-height: 1.5; box-shadow: none; }
@media (max-width: 991.98px) { .sh-crumb-presence .sh-presence-upd { display: none; } }
.sh-acct-crumbbar .breadcrumb.sh-crumbs { margin: 0 !important; font-size: 11px; line-height: 1.2; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.sh-acct-crumbbar .breadcrumb-item.active { overflow: hidden; text-overflow: ellipsis; color: var(--sh-muted); }
/* the header: one full-width row - logo, name and its badges on the left; who has it open and the last update on the right
   (below them when the row is too narrow) */
.sh-acct-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
                padding: 12px var(--sh-gutter); background: var(--sh-surface); }
.sh-acct-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 420px; }
.sh-acct-avatar, .sh-acct-name, .sh-acct-meta, .sh-acct-crumb { padding: 0; }
.sh-acct-avatar { flex: 0 0 auto; }
.sh-acct-logo { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 8px; object-fit: contain; border: 1px solid #E2E6EA; background: var(--sh-surface); }
.sh-acct-initials { display: flex; align-items: center; justify-content: center; background: var(--color-primary-variant);
                    color: var(--sh-on-primary); font-weight: 600; font-size: .95rem; border: 0; }
/* the name and its badges on one line - a long name is shortened (...), the badges stay whole */
.sh-acct-text { min-width: 0; flex: 1 1 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.sh-acct-name { margin: 0; flex: 0 1 auto; min-width: 0; font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--color-primary);
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-acct-meta { font-size: .9rem; color: var(--sh-muted); }
.sh-acct-text > .sh-acct-meta { flex: 0 0 auto; }
.sh-acct-meta > span { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 10px; white-space: nowrap; }
.sh-meta-item i { opacity: .7; margin-right: 2px; }
/* who else has it open / the last update - at the row's right end */
.sh-acct-side { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; }
.sh-acct-side > div { padding: 0; }
.sh-acct-presence { margin-top: 0; }
.sh-presence-busy { color: #8A5A00; font-weight: 600; }

/* chips: SportsPay ID and status */
.sh-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.sh-chip-id { font-family: SFMono-Regular, Menlo, Consolas, monospace; background: var(--color-secondary); color: var(--color-primary);
              border: 1px solid #D6DCE1; letter-spacing: .03em; }
/* the merchant's (and dealer's) ID in the editor's header - bigger than the other chips */
.sh-acct-head .sh-chip-id { font-size: 1.05rem; padding: 2px 12px; }
.sh-st-active { background: #E3F4EA; color: #1E7B45; }
.sh-st-classa { background: #E2EEF6; color: #1D5F8A; }
.sh-st-app    { background: #FFF4DB; color: #8A5A00; }
.sh-st-cancel { background: #ECEEF0; color: #5A6268; }

.sh-acct-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* tab bar: one line, scrolls sideways when it doesn't fit */
.sh-acct-tabs { width: 100%; padding: 0 max(0px, calc(var(--sh-gutter) - 14px)); background: var(--sh-surface); border-bottom: 1px solid var(--sh-border);
                margin-bottom: var(--sh-gap);
                overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
/* the tabs row (merchant editor, partner editor, Admin Functions): one flex line with one full-width bottom border - the
   tabs (sh-acct-tabs) shrink and scroll sideways, the open tab's Edit / Save / Cancel after them (sh-tab-actions) stay
   whole and pinned at the right, so they never scroll out of view on narrow screens */
.sh-acct-tabsrow.row { display: flex; flex-wrap: nowrap; align-items: stretch; margin: 0 0 var(--sh-gap); background: var(--sh-surface);
                       border-bottom: 1px solid var(--sh-border); }
.sh-acct-tabsrow > .sh-acct-tabs { flex: 1 1 auto; width: auto; min-width: 0; border-bottom: 0; margin-bottom: 0; }
.sh-tab-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 4px var(--sh-gutter) 4px 8px; }
.sh-tab-actions:empty { display: none; }
.sh-tab-actions .btn { margin: 0 !important; white-space: nowrap; }
.sh-acct-tabs .sh-tabgroup { display: flex; flex-wrap: nowrap; gap: 2px; white-space: nowrap; }
/* the held batch review is a page of its own (ShAdmReview): no Admin Tools title or tab strip above it - it
   has its own title block */
#admin.sh-adm-review .sh-page-head:not(.sh-adm-revhead), #admin.sh-adm-review .sh-acct-tabsrow { display: none !important; }
/* its card / invoice links: as the other in-table links - purple, underlined on hover */
.sh-tran-link { color: var(--color-primary-variant); text-decoration: none; }
.sh-tran-link:hover, .sh-tran-link:focus { text-decoration: underline; }
/* the Admin Tools and Reports pages' tabs wrap to a second line on a narrower window - every tab stays in view, no sideways
   scrollbar. The merchant / partner records keep one scrolling line,
   their Edit / Save pinned at its end */
#admin .sh-acct-tabs, #reports .sh-acct-tabs { overflow-x: visible; }
#admin .sh-acct-tabs .sh-tabgroup, #reports .sh-acct-tabs .sh-tabgroup { flex-wrap: wrap; }
/* below 1200px their tabs sit closer, so more of them fit on the first line before any wraps */
@media (max-width: 1199.98px) { #admin .sh-acct-tabs .btn.sh-tab, #reports .sh-acct-tabs .btn.sh-tab { padding-left: 9px; padding-right: 9px; } }
.sh-acct-tabs .btn.sh-tab { flex: 0 0 auto; background: none; border: 0; border-radius: 0; border-bottom: 3px solid transparent;
                            padding: 7px 14px 6px; font-size: 1rem; line-height: 1.4; color: #5A6268; box-shadow: none; }
.sh-acct-tabs .btn.sh-tab:hover { color: var(--color-primary-variant); background: none; }
.sh-acct-tabs .btn.sh-tab:focus { outline: none; box-shadow: inset 0 0 0 2px var(--color-primary-variant); }
.sh-acct-tabs .btn.sh-tab.active { color: var(--color-primary); font-weight: 600; border-bottom-color: var(--color-primary-variant); background: none; }


/* the workflow task window (WorkBodyHtml, html/task_view.prg): a labelled header, the Instructions box, the sections of
   the right column and what the step still needs; the history scrolls inside its box, so the window never outgrows
   the screen; Cancel task apart at the bottom left */
/* ===== Shared window pieces (the Workflow Task Manager, the TODO / Note window, Add Note / Task, the Unsaved changes
   question) - their HTML helpers are UiSec, UiHeadRow, UiPicker / UiPickItem (utils/UiFunc.prg) ===== */
/* section heading: one style everywhere, sentence case */
.sh-sec { font-weight: 600; color: var(--color-primary); font-size: .95rem; margin-bottom: .35rem; }
/* cards: one radius, border and padding - .sh-panel-muted the light gray admin card, .sh-panel-accent the purple edge
   (Instructions: gray with the edge; Finish this step: white with the edge) */
.sh-panel { border: 1px solid var(--sh-border); border-radius: .4rem; padding: .6rem .75rem; background: #FFFFFF; }
.sh-panel-muted { background: var(--color-secondary); }
.sh-panel-accent { border-left: 3px solid var(--color-primary-variant); }
.sh-panel > [class*="col-"], .sh-panel > .row { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
.sh-panel-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .35rem; }
.sh-panel-btns > div { padding: 0; flex: 0 0 auto; width: auto; max-width: none; }
/* labeled header row: the label, then the value - anything in the value wraps under the value, never under the label */
.sh-hrow { display: flex; align-items: baseline; gap: 4px 8px; margin-bottom: .3rem; }
.sh-hlabel { flex: 0 0 5.5rem; color: var(--sh-muted); font-size: .9rem; }
.sh-hval { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; color: var(--color-primary); }
.sh-hname { min-width: 0; overflow-wrap: anywhere; }
/* a pair of buttons that always stays together (Open Merchant + pHQ) */
.sh-btnpair { display: inline-flex; flex: 0 0 auto; gap: 4px; white-space: nowrap; font-weight: normal; }
/* footer bar: minor / destructive actions first, the right-hand group from .sh-foot-push, the main action last */
.sh-footbar, .sh-modal-dialog .sh-dlg-buttons.sh-footbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .5rem; }
.sh-footbar > [class*="col"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
.sh-footbar .btn { margin: 0; }
.sh-footbar .sh-foot-push, .sh-postrow .sh-foot-push { margin-left: auto; }
/* a comment's buttons: Attach File on the left, Post on the box's right edge */
.sh-postrow { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.sh-postrow > [class*="col"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
/* the files attached in this step / to this TODO task, by Attach File (TaskHeldFiles, html/task_view.prg): a chip each -
   its name (shortened when long, whole in its tooltip) and an x that removes it; they wrap, Post stays at the right */
/* (the files take the room between Attach File and Post and wrap inside it - Post stays on the line at the right) */
.sh-postrow { flex-wrap: nowrap; }
.sh-postrow > [class*="col"]:has(.sh-att-list) { flex: 1 1 0; min-width: 0; }
/* the workflow window keeps one width from task to task (not as wide as its content, so it doesn't change between tasks
   and Sleep stays beside the priority); phones use the screen as every window */
/* (centred in the page beside the left menu, never over it: the task windows at most 1000px, a plain note's one
   column 740px - Change to Task redraws it as a task, so it grows) */
@media (min-width: 992px) {
  .modal-dialog:has(#taskWrap .sh-work) { --sh-taskw: min(1000px, calc(100vw - 210px - 2rem)); width: var(--sh-taskw); max-width: var(--sh-taskw);
                                          margin-left: auto; margin-right: auto; }
  .modal-dialog:has(#taskWrap .sh-todo-note) { --sh-taskw: min(740px, calc(100vw - 210px - 2rem)); }
}
/* the same inner space on both sides: the window's own padding, the outer columns' outer edges flush with it */
#dlg_task .modal-body:has(#taskWrap .sh-work) { padding-left: 24px; padding-right: 24px; }
#taskWrap .sh-work .row.sh-work-top, #taskWrap .sh-work .row.sh-work-cols { margin-left: 0; margin-right: 0; }
#taskWrap .sh-work .row.sh-work-top > [class*="col"]:first-child, #taskWrap .sh-work .row.sh-work-cols > [class*="col"]:first-child { padding-left: 0; }
.sh-work .sh-prio-row { flex-wrap: nowrap; }
@media (max-width: 575.98px) { .sh-work .sh-prio-row { flex-wrap: wrap; } }
.sh-att-list { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.sh-att-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 16rem; padding: .15rem .25rem .15rem .55rem;
               border: 1px solid var(--sh-border); border-radius: 999px; background: var(--sh-subtle); color: var(--sh-text); font-size: .9rem; }
.sh-att-chip > .fa-paperclip { color: var(--color-primary-variant); }
.sh-att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sh-att-x { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; padding: 0;
            border: 0; border-radius: 50%; background: none; color: var(--sh-muted); line-height: 1; cursor: pointer; }
.sh-att-x:hover, .sh-att-x:focus { background: #F8D7DA; color: #8A1C1C; outline: none; }
.sh-att-x:focus-visible { box-shadow: var(--sh-focus-ring); }
/* buttons: the app's purple primary also when disabled (not Bootstrap's own disabled blue) - faded, not-allowed */
.btn-primary:disabled, .btn-primary.disabled { background-color: var(--color-primary-variant); border-color: var(--color-primary-variant);
                                               color: var(--sh-on-primary); opacity: .45; cursor: not-allowed; }
.btn-outline-secondary { color: var(--sh-muted); border-color: var(--sh-border); background: #FFFFFF; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus { color: var(--color-primary); background: var(--color-secondary); border-color: var(--sh-muted); }

/* ===== The Workflow Task Manager (WorkBodyHtml) ===== */
/* the fields straight in the two columns (the comment box, Priority, the checklist ...) on the columns' own edge - TWeb's
   GET MEMO / SELECT / CHECKBOX put their CLASS on the input, so the column wrapper kept its padding (indented) */
.sh-work .row > .sh-work-head > [class*="col-"], .sh-work .row > .sh-work-left > [class*="col-"], .sh-work .sh-panel [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-work .sh-work-top { margin-bottom: .75rem; }
.sh-work .sh-work-instr { margin-bottom: .75rem; max-width: 100%; min-width: 0; box-sizing: border-box; overflow-wrap: anywhere; word-break: break-word; }
/* (its column too, so a long line of Instructions wraps instead of running past the window's edge) */
.sh-work [class*="col"]:has(> .sh-work-instr) { min-width: 0; max-width: 100%; }
/* "Write a comment" starts level with "Finish this step" (the card's border and padding) */
.sh-work .sh-work-left > div:first-child label { padding-top: calc(.6rem + 1px); }
.sh-work .sh-work-files { margin-top: .4rem; font-size: .9rem; }
.sh-work .sh-work-file { display: inline-block; margin-right: .75rem; }
.sh-work .sh-work-btnrow > div:last-child { padding: 0 0 0 .4rem; flex: 0 0 auto; width: auto; max-width: none; }
.sh-work .sh-work-reqhead { font-size: 11px; color: var(--sh-muted); margin-bottom: .25rem; }
/* Finish this step's sub-headings (Checklist, Result) - small and bold, as the Assignment card's labels */
.sh-work .sh-work-subhead { font-size: 11px; font-weight: 600; color: var(--color-primary); margin-bottom: .25rem; }
.sh-work .sh-req { padding: 2px 0; }
.sh-work .sh-req i { width: 1.1rem; text-align: center; margin-right: 2px; }
.sh-work .sh-req-ok { color: #1E7B45; }
.sh-work .sh-req-todo { color: #8A5A00; }
.sh-work .sh-req-todo a { color: #8A5A00; text-decoration: underline; }
/* the header: the task first - the step in the title size, the workflow after it in normal weight; under it the merchant
   / partner in the Assigned-to text's size, with its buttons */
/* (three labelled lines - Step, Workflow, Merchant - each label small and gray, as "Assigned to:", a clear gap, one
   value edge; in a band of the light accent tint) */
.sh-work .sh-work-headband { background: #F3EFFA; border: 1px solid #E2D9F3; border-radius: .4rem; padding: .55rem .75rem .45rem; }
.sh-work .sh-work-hrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-bottom: .3rem; }
.sh-work .sh-work-hrow:last-child { margin-bottom: 0; }
.sh-work .sh-work-hrow > .sh-ilabel { flex: 0 0 4.5rem; }
.sh-work .sh-work-step { font-size: 1.25rem; font-weight: 600; color: var(--color-primary); overflow-wrap: anywhere; min-width: 0; }
.sh-work .sh-work-flow { font-size: .95rem; font-weight: 400; color: var(--sh-text); min-width: 0; }
.sh-work .sh-work-linked { align-items: center; font-size: .95rem; color: var(--sh-text); }
.sh-work .sh-work-linkname { min-width: 0; overflow-wrap: anywhere; }
/* Finish this step: its title a size up (the card has the Instructions band's tint and accent edge) */
.sh-work .sh-work-finish > [class*="col"]:first-child .sh-sec, .sh-work .sh-work-finish .sh-sec:first-child { font-size: 1.1rem; }
/* the Instructions band under the header, in the left column (beside the Assignment card - no empty block) */
.sh-work .sh-work-head .sh-work-instr { margin-top: .75rem; margin-bottom: 0; }
/* the Comment heading starts level with "Finish this step" (the card's border and padding) */
.sh-work .sh-work-comhead .sh-sec { padding-top: calc(.6rem + 1px); }
.sh-work .sh-work-left label:empty { display: none; }
/* the right column's cards end on the window's right edge, as the full-width rows */
.sh-work .row.sh-work-top > [class*="col"]:last-child, .sh-work .row.sh-work-cols > [class*="col"]:last-child { padding-right: 0; }
/* Before finishing: read-only checkboxes that tick themselves (WorkReqBox) - ticked ones in green */
.sh-work .sh-req-box { margin: 2px 0; }
.sh-work .sh-req-box .custom-control-input:disabled ~ .custom-control-label { color: var(--sh-text); }
.sh-work .sh-req-box .custom-control-input:disabled ~ .custom-control-label::before { background-color: #FFFFFF; }
.sh-work .sh-req-box .custom-control-input:checked ~ .custom-control-label { color: #1E7B45; }
.sh-work .sh-req-box .custom-control-input:checked ~ .custom-control-label::before { background-color: #1E7B45; border-color: #1E7B45; }
/* a result while the step still needs something: plainly gray (fill and text, not a faded purple) - the window's only
   purple buttons are the results that can be picked; its wrapper carries the tooltip (a disabled button shows none) */
.sh-work .sh-work-blocked .btn-primary:disabled { background-color: #E9ECEF; border-color: #DEE2E6; color: #6C757D; opacity: 1; }
.sh-work .sh-work-blocked { cursor: not-allowed; }
.sh-work .sh-work-blocked > div { padding: 0; width: 100%; max-width: none; flex: 1 1 auto; }
.sh-work .sh-work-blocked .btn:disabled { pointer-events: none; }
.sh-work .sh-work-cancel { margin-top: .75rem; padding-top: .5rem; border-top: 1px solid var(--sh-border); }
.sh-work .sh-panel { font-size: .9rem; }
.sh-work .sh-panel .sh-sec { font-size: .95rem; }
.sh-work .sh-panel-accent { font-size: inherit; }
.sh-work .sh-work-inline { display: flex; align-items: center; gap: 6px; margin: .15rem 0; }
.sh-work .sh-work-inline > div { padding: 0; flex: 0 0 auto; width: auto; max-width: none; }
.sh-work .sh-work-inline select { width: auto; }
@media (max-width: 767.98px) {
  .sh-work .sh-work-top .sh-panel { margin-top: .5rem; }
  .sh-work .sh-work-right { margin-top: .75rem; }
  .sh-work .sh-work-left > div:first-child label { padding-top: .25rem; }
}

/* ===== The TODO / Note window (TodoBodyHtml) ===== */
/* the top line: who has it open, when it changed, and its type badge */
.sh-task-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: .5rem; }
.sh-task-topline .sh-presence { margin-bottom: 0 !important; }
.sh-task-topline > div { flex: 0 1 auto; }
/* every label and field on one left edge */
.sh-todo .sh-task-top { margin-bottom: .5rem; }
.sh-todo .sh-task-head > [class*="col-"], .sh-todo .sh-panel > [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-todo .sh-title-row { margin-left: 0; margin-right: 0; margin-bottom: .4rem; }
.sh-todo .sh-title-row > [class*="col-"]:first-child { padding-left: 0; }
.sh-todo .sh-title-row > [class*="col-"]:last-child { padding-right: 0; }
.sh-todo .sh-panel input[type="date"] { max-width: 12rem; }
@media (max-width: 767.98px) { .sh-todo .sh-task-top .sh-panel { margin-top: .5rem; } }
/* (the workflow window's layout - sh-work: the header band's labelled lines on one edge, a gap between them, the
   Comment heading a clear gap under the band) */
.sh-todo .sh-work-headband [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-todo .sh-work-headband > * + * { margin-top: .3rem; }
.sh-todo .sh-work-headband .sh-work-hrow { margin-bottom: 0; }
.sh-todo .sh-work-headband .sh-title-edit .sh-postrow { margin-top: .3rem; }
.sh-todo .sh-work-title { align-items: center; }
.sh-todo .sh-title-editbtn { color: var(--sh-muted); }
.sh-todo .sh-work-comhead .sh-sec { padding-top: 0; margin-top: .9rem; }
.sh-todo .sh-due-val { font-weight: 600; }
/* both task windows: the section headings small purple caps (one heading style), the occasional actions (Reassign, Take
   ownership, Escalate now, Sleep, Wake now) small and quiet, the priority list the same height - the result button and
   Complete Task stay the window's one loud button */
#taskWrap .sh-work .sh-sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #4b2d83; }
#taskWrap .sh-work .sh-btnpair .btn, #taskWrap .sh-work .sh-prio-row .btn:not(.btn-primary) {
  font-size: 11.5px; font-weight: 400; line-height: 20px; padding: 2px 8px; border-color: #c9c4d6; color: #3d3a4a; background: #fff; }
#taskWrap .sh-work .sh-btnpair .btn:hover, #taskWrap .sh-work .sh-btnpair .btn:focus,
#taskWrap .sh-work .sh-prio-row .btn:not(.btn-primary):hover, #taskWrap .sh-work .sh-prio-row .btn:not(.btn-primary):focus { background: #f3f1f7; color: #1d1b26; border-color: #a9a2bd; }
#taskWrap .sh-work .sh-btnpair .btn i, #taskWrap .sh-work .sh-prio-row .btn:not(.btn-primary) i { color: #8a85a0; font-size: 11px; font-weight: 900; }
#taskWrap .sh-work .sh-prio-row select { height: 26px; font-size: 11.5px; padding-top: 0; padding-bottom: 0; }
/* the header band's merchant / partner name: the link to its record (a small jump-out arrow after it), the pHQ globe beside */
.sh-work .sh-task-linkname { color: var(--color-primary); font-weight: 500; text-decoration: none; }
.sh-work .sh-task-linkname:hover, .sh-work .sh-task-linkname:focus { text-decoration: underline; }
.sh-work .sh-task-linkname .sh-jump { font-size: .7em; margin-left: .3rem; color: var(--sh-muted); vertical-align: .1em; }
.sh-work .sh-task-phq { margin-left: .6rem; color: var(--color-primary-variant); }
/* a presence pill that just appeared or changed (ShPresencePulse): three soft amber glows over about three seconds;
   with reduced motion, one brief darker highlight instead */
.sh-pulse { animation: sh-pulse 1s ease-out 3; }
@keyframes sh-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(194, 124, 0, .6); }
  70%  { box-shadow: 0 0 0 5px rgba(194, 124, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 124, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .sh-pulse { animation: sh-pulse-still 1.5s step-end 1; }
  @keyframes sh-pulse-still { 0% { filter: brightness(.85); } 100% { filter: none; } }
}
/* an X-only action greyed for a user without X (UiSuperOff): the wrapper takes the hover for its tooltip */
.sh-super-off { cursor: not-allowed; }
.sh-super-off > .btn:disabled { pointer-events: none; }
/* a history entry's key / value dump (TaskHistText): small monospace, its columns lined up */
.sh-hist-kv { margin: .25rem 0 0; padding: .4rem .5rem; font-size: 11px; line-height: 1.35; background: #FFFFFF; border: 1px solid #E9ECEF;
              border-radius: .3rem; white-space: pre; overflow-x: auto; color: var(--sh-text); }
/* the Super User marks (X users only - UiSuKey, UiSuHiddenTip): a small key before every X-only action's label; an
   action hidden from other staff is also outlined in the one Super User gold (used nowhere else, darker than the amber
   Also open pill) */
.sh-su-key { font-size: .85em; margin-right: 2px; }
.sh-su-btn { color: #7A5200; background: #FFFFFF; border: 1px solid #A87400; }
#ut-confirm-yes.sh-su-btn, #ut-confirm-yes.sh-su-btn:hover, #ut-confirm-yes.sh-su-btn:focus { color: #7A5200; background: #FFFFFF; border-color: #A87400; }
.sh-su-btn:hover, .sh-su-btn:focus { color: #5C3D00; background: #FFF6E0; border-color: #8A5F00; }
.sh-su-btn .sh-su-key, .sh-su-link .sh-su-key { color: #A87400; }
a.sh-su-link { color: #7A5200; }
a.sh-su-link:hover { color: #5C3D00; }
/* the Terminal IDs card: one line per Terminal ID - its uses as small pills (a gateway pill links to its gateway terminal's
   row), a copy icon beside the number; the row a link jumps to is highlighted for a moment (ShRowJump) */
.sh-use-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
/* (every wrapper TWeb puts round the pills and the Dejavoo unassign sizes to its content, so the x stays right after
   the pills on the same line) */
.sh-use-cell > * { flex: 0 0 auto !important; width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
.sh-use-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px;
               background: #EEF0F3; border: 1px solid #DDE1E6; color: var(--sh-text); white-space: nowrap; text-decoration: none; }
a.sh-use-pill:hover { background: #E2E6EB; text-decoration: none; color: var(--sh-text); }
.sh-use-none { color: #6C757D; background: transparent; }
.sh-copy-tid { padding: 0 4px; font-size: 11px; color: #6C757D; vertical-align: baseline; }
.sh-tid-card .sh-icon-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
/* a Dejavoo TPN's unassign x: its own square size right after its pill, whatever else is on the row */
.sh-use-cell .sh-icon-btn { width: 26px !important; height: 22px; flex: 0 0 26px !important; font-size: 11px; }
/* a Terminal ID's actions: one small "..." button, as high as the pills, opening its menu (ShBtnMenu) */
.sh-tid-acts > * { width: auto; max-width: none; padding: 0; }
.sh-kebab { height: 22px; padding: 0 8px; line-height: 1; font-size: 12px; }
.sh-kebab-menu { min-width: 15rem; }
/* (one plain list: every item the same size and padding, enabled or greyed, its text and its grey reason on one left edge) */
.sh-kebab-menu { padding: 4px 0; }
.sh-kebab-menu .dropdown-item, .sh-kebab-menu .dropdown-item.btn { display: block; width: 100%; white-space: normal; text-align: left;
                                                                  font-size: 12.5px; line-height: 1.35; padding: 6px 12px; border: 0; border-radius: 0; }
.sh-kebab-menu > :not(.dropdown-item) { margin: 0 !important; padding: 0 !important; width: 100%; max-width: none; }
.sh-menu-why { display: block; font-size: 11px; color: var(--sh-muted); white-space: normal; margin: 1px 0 0; }
.sh-menu-off, .sh-menu-off:hover { color: #9AA0A6; background: transparent; cursor: not-allowed; }
.dropdown-item.sh-su-item, .dropdown-item.sh-su-item:hover { color: #7A5200; }
.sh-row-flash { animation: sh-row-flash 2s ease-out; }
@keyframes sh-row-flash { 0%, 30% { background: #FFF3CD; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .sh-row-flash { animation: none; background: #FFF3CD; } }
/* a change note in a history (TaskChangeHtml): the system-written lines in a grey monospace block marked System, the
   user's Reason under it in the normal font with its own small label */
.sh-chg-head { font-weight: 600; margin-bottom: .25rem; }
.sh-chg-sys { margin: .25rem 0 0; background: #F1F3F5; border: 1px solid #E2E5E9; border-radius: .3rem; padding: .3rem .5rem .4rem; }
.sh-chg-sys-lbl { font-size: 11px; color: #6C757D; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.sh-chg-lines { margin: 0; font-size: 11px; line-height: 1.4; white-space: pre-wrap; color: var(--sh-text); background: transparent; border: 0; padding: 0; }
.sh-chg-reason { margin-top: .4rem; white-space: pre-wrap; }
.sh-chg-reason-lbl { display: block; font-size: 11px; color: #6C757D; text-transform: uppercase; letter-spacing: .04em; }
/* the merchant / partner picker (Link / Relink): the search over merchants and partners, each choice tagged */
.sh-link-menu { min-width: 20rem; max-width: 92vw; padding-top: 0; }
.sh-link-head { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: .5rem .75rem; background: #FFFFFF;
                border-bottom: 1px solid var(--sh-border); }
.sh-link-list { max-height: 260px; overflow-y: auto; }
.sh-link-tag { margin-left: .4rem; font-weight: 500; background: var(--sh-subtle); color: var(--sh-muted); }

/* ===== The Unsaved changes question (ShUnsavedAsk) ===== */
.sh-unsaved-list { margin: .35rem 0 .5rem; padding-left: 1.25rem; }
.ut-confirm-foot.sh-footbar { text-align: left; }
/* Reassign's long list of users and groups scrolls; Sleep's Custom... days box */
.sh-btnmenu .dropdown-menu.sh-menu-scroll { max-height: 260px; overflow-y: auto; }
.sh-btnmenu .sh-sleep-custom { display: flex; gap: 4px; padding: .25rem 1rem .4rem; }
.sh-btnmenu .sh-sleep-custom.d-none { display: none !important; }
.sh-btnmenu .sh-sleep-custom input { width: 5rem; }

/* the Notes & Files tab's drop zone (account_files.html, ShFileDrop): files dragged over it light it up */
.sh-drop { border: 2px dashed var(--sh-border-input); border-radius: .4rem; padding: 1rem; margin-bottom: var(--sh-gap); text-align: center;
           color: var(--sh-muted); background: var(--color-secondary); cursor: pointer; transition: background .15s, border-color .15s; }
.sh-drop:hover { border-color: var(--color-primary-variant); }
.sh-drop.sh-drop-over { border-color: var(--color-primary-variant); background: var(--sh-hover); color: var(--color-primary); }

/* Add Note / Task (TaskStartDialog): every label and field on one left edge, the two-column rows as wide as the rest */
.sh-task-start .row { margin-left: 0; margin-right: 0; }
.sh-task-start [class*="col-"] { padding-left: 0; padding-right: 0; }
@media (min-width: 576px) { .sh-task-start .sh-task-pair > [class*="col-"]:first-child { padding-right: .75rem; } }
/* its Link to: Merchant | Dealer | None as one segmented toggle; locked by a workflow, the chosen one still reads */
.sh-task-link .btn { min-width: 6rem; }
.sh-task-link .btn:disabled:not(.active) { opacity: .45; }
.sh-task-link .btn.active:disabled { opacity: .8; }

/* the Bank Hold badge by the Dashboard title (ShDashHolds) - a button that reads as a badge */
.sh-hold-badge { font-size: 11px; font-weight: 600; vertical-align: middle; margin-left: .5rem; padding: .3em .6em; border: 0; cursor: pointer; }
.sh-hold-badge:focus { outline: 2px solid var(--color-primary-variant); outline-offset: 1px; }
/* its panel: more than 5 merchants scroll inside it */
.sh-hold .list-group.sh-hold-scroll { max-height: 15rem; overflow-y: auto; }
/* the dashboard's bank holds panel (DashBankHoldHtml): a merchant per line - ID, name, since / balance on the right */
.sh-hold .list-group-item { display: flex; flex-wrap: wrap; align-items: center; padding: .45rem .75rem; text-align: left; }
.sh-hold-name { flex: 1 1 12rem; min-width: 0; }
.sh-hold-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--sh-muted); font-size: .9rem; }

/* the minimized task window's bar (ShTaskMinimize): bottom right, above the quick search; amber when the task was
   changed meanwhile. The window's minimize button sits next to its X. */
.sh-task-min { position: fixed; right: 16px; bottom: calc(var(--sh-qs-h) + 12px); z-index: 1060; max-width: min(360px, calc(100vw - 32px));
               display: flex; align-items: center; border-radius: 999px; padding: .5rem 1rem; }
.sh-task-min-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* while a task is minimized, the page's content ends above the bar, so the bar never covers a table's Page Size and
   page buttons */
body.sh-has-taskmin #index > [data-group="index-content"] { padding-bottom: 64px !important; }
.sh-task-min.sh-task-min-changed { background: #8A5A00; border-color: #8A5A00; }
/* (Bootstrap gives every .close margin-left auto - two of them would split the space and put the minimize button in the
   middle: it takes the auto margin, the X sits right after it) */
.modal-header .close.sh-task-minbtn { margin: -1rem 0 -1rem auto; padding: 1rem .6rem; font-size: 1rem; line-height: 1.5; }
.modal-header .close.sh-task-minbtn + .close { margin-left: 0; }

/* Report site tab (logged in as the merchant) and the email view dialog (app/account/account_edit.prg) */
.sh-webframe { display: block; width: 100%; height: 80vh; border: 0; }
/* a task's own action (Complete Task, Uncomplete) on its line in the Assignment card */
.sh-assign-action { margin-top: .5rem; }
/* the toggles over a pHQ frame (UiPhqToggles) */
.sh-phq-toggles { margin: 0 0 .5rem; }
.sh-mail-frame { width: 100%; height: 380px; border: 0; }
.sh-mail-body { max-height: 400px; overflow-y: auto; }

/* Staff help (UiCardTitle's ?, the help popup - html/help_view.prg, ShHelp* in sportshub.js) */
.sh-help-btn { color: var(--sh-muted); line-height: 1; }
.sh-help-btn:hover, .sh-help-btn:focus { color: var(--color-primary-variant); }
.sh-help-view { max-height: 60vh; overflow-y: auto; overflow-wrap: anywhere; }
.sh-help-view img { max-width: 100%; height: auto; }
.sh-help-view table { border-collapse: collapse; margin-bottom: .5rem; }
.sh-help-view th, .sh-help-view td { border: 1px solid #dee2e6; padding: .25rem .5rem; }
.sh-help-text { white-space: pre-wrap; }
.sh-help-rich { height: auto; min-height: 14rem; max-height: 50vh; overflow-y: auto; }


/* ===== Tables - one look and spacing for every list: the Tabulator lists (Merchants, Users, Dealers, the
   Notes tab), the TWeb row tables (UiTableHead + sh-trow rows, utils/UiFunc.prg) and the dashboard-style
   grids (sh-dash-grid). Every header label can carry a hint (UiHint) - a popover (sportshub.js). */
.sh-thead { margin-bottom: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--sh-border); font-weight: 600; font-size: .9rem;
            color: var(--sh-muted); }
.sh-trow { padding: .45rem 0; border-bottom: 1px solid #EEF0F2; align-items: center; }
.sh-trow:hover { background: var(--sh-row-hover); }
.sh-trow:last-child { border-bottom: 0; }
/* TWeb rows are "form-group row": no form spacing under a table's rows - the row's padding is the spacing */
.sh-thead.form-group, .sh-trow.form-group { margin-bottom: 0; }
/* a TWeb row table under a full list (the Notes & Files tab's Documents under Notes): headings in the lists' style */
.sh-thead.sh-thead-list { font-size: 12.5px; font-weight: 700; color: #212529; border-bottom: 2px solid #dee2e6; }
/* a header label with a hint: dotted underline, help cursor, and a focus ring for keyboard users */
.sh-hint { cursor: help; text-decoration: underline dotted; text-decoration-color: rgba(108,117,125,.6); text-underline-offset: 3px; }
.sh-hint:focus { outline: none; box-shadow: var(--sh-focus-ring); border-radius: 2px; }
.sh-hint-pop { max-width: 300px; font-size: .9rem; border-color: var(--sh-border); box-shadow: var(--sh-shadow-lg); }
.sh-hint-pop .popover-body { padding: .5rem .7rem; color: var(--sh-text); }
/* Tabulator's pager in the palette (its Bootstrap theme makes the current page and the links blue) */
.tabulator .tabulator-footer .tabulator-page { color: var(--color-primary-variant); border-color: var(--sh-border); }
.tabulator .tabulator-footer .tabulator-page.active { background: var(--color-primary-variant); border-color: var(--color-primary-variant); color: var(--sh-on-primary); }
.tabulator .tabulator-footer .tabulator-page:not(.disabled):not(.active):hover { background: var(--sh-hover); color: var(--color-primary); }
.tabulator .tabulator-footer .tabulator-page:focus { outline: none; box-shadow: var(--sh-focus-ring); }
.tabulator .tabulator-footer .tabulator-page.disabled { color: var(--sh-muted); }
.tabulator .tabulator-footer .tabulator-paginator label { color: var(--color-primary-variant); }
.tabulator .tabulator-footer .tabulator-page-size:focus { outline: none; border-color: var(--color-primary-variant); box-shadow: var(--sh-focus-ring); }
/* a task's status pill (ShStatusBadge): pale background, dark text of the same hue - solid colour is kept for the
   Dashboard cards and the title-bar badges */
.badge.sh-stat { border: 1px solid transparent; font-weight: 600; }
.sh-stat-red { background: #fbe3e4; color: #8a1c24; border-color: #f1c2c6; }
.sh-stat-amber { background: #fdf1d6; color: #7a4f00; border-color: #f3dca3; }
.sh-stat-green { background: #ddf3e4; color: #1d5e32; border-color: #b9e2c6; }
.sh-stat-teal { background: #d9f1f3; color: #0d5b63; border-color: #b2dfe4; }
.sh-stat-gray { background: #e9ecef; color: #495057; border-color: #d6dade; }
.sh-stat-dark { background: #dee0e3; color: #212529; border-color: #c6c9cd; }
.sh-stat-light { background: #f8f9fa; color: #495057; border-color: #dee2e6; }
/* a table whose rows fit on one page (sh-one-page - ShDashTable): Page Size only, no page buttons */
.tabulator.sh-one-page .tabulator-footer .tabulator-page, .tabulator.sh-one-page .tabulator-footer .tabulator-pages { display: none; }
/* Bootstrap pagers, if any page uses one */
.page-link { color: var(--color-primary-variant); }
.page-link:hover { color: var(--color-primary); background-color: var(--sh-hover); }
.page-link:focus { box-shadow: var(--sh-focus-ring); }
.page-item.active .page-link { background-color: var(--color-primary-variant); border-color: var(--color-primary-variant); color: var(--sh-on-primary); }
/* a list page's toggle buttons over its table (UiPickGroup - Merchants, Users): the count of rows in a pill on each */
.sh-list-pick .btn { display: inline-flex; align-items: center; gap: 6px; }
.sh-list-pick .sh-pick-n { background: var(--sh-subtle); color: var(--color-primary); font-weight: 600; min-width: 1.6em; }
.sh-list-pick .sh-pick-n:empty { display: none; }
/* every page header's toggle group looks the same - the Dashboard's: grey text and
   border, a light grey hover, the chosen one dark grey with white text. The Dashboard's Everyone's / My tasks (sh-dash-who)
   the list toggles (UiPickGroup - Merchants, Users) and the Activity Log's Latest 1,000 / 5,000: any button group in a page
   header. (!important: the app's purple .btn-outline-dark hover / focus above) */
.sh-page-head .btn-group > .btn { color: #495057; border-color: #6C757D; background-color: transparent; }
.sh-page-head .btn-group > .btn:hover, .sh-page-head .btn-group > .btn:focus {
  color: #343A40 !important; background-color: #E9ECEF !important; border-color: #6C757D !important; }
.sh-page-head .btn-group > .btn.active, .sh-page-head .btn-group > .btn.active:hover, .sh-page-head .btn-group > .btn.active:focus {
  background-color: #343A40 !important; border-color: #343A40 !important; color: #FFF !important; }
/* in the page header's actions (left of Add Merchant / Add User): the group keeps its own size, and wraps under the title on
   narrow screens */
.sh-page-actions:has(.sh-list-pick) { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.sh-page-actions .sh-list-pick { flex: 0 1 auto; align-self: center; }
.sh-page-actions .sh-list-pick .btn { padding: .3rem .6rem; }
.sh-list-pick .btn.active .sh-pick-n { background: rgba(255,255,255,.22); color: #FFF; }
.sh-list-pick .sh-pick-n { color: #343A40; }
/* a table whose rows are being loaded again (eg the dashboard's Everyone's / My tasks - ShDashShow): dimmed, no clicks */
.tabulator.sh-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
/* an empty table ("No tasks to show"): just its message - no scrollbars around it (the columns' minimum widths would make
   the empty body scroll sideways and down) */
.tabulator .tabulator-tableholder:has(.tabulator-placeholder) { overflow: hidden !important; }
.tabulator .tabulator-placeholder { width: 100% !important; }
/* Tabulator: the same cell spacing as the other tables */
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: .5rem .6rem; }
.tabulator .tabulator-row .tabulator-cell { padding: .45rem .6rem; }
.tabulator .tabulator-header .tabulator-col .sh-hint { cursor: help; }
/* a header's date range filter (ShDateRangeEditor, sportshub.js): jQuery UI's calendar above the list, and the
   picked day or range in the app's colours - Bootstrap has nothing for jQuery UI */
.ui-datepicker { z-index: 1060 !important; font-size: .9rem; box-shadow: var(--sh-shadow-lg); }
/* (its box fits a narrow column: the date / range shown short, the clear x small) */
.tabulator .tabulator-header-filter .input-group > .form-control[readonly] { min-width: 0; padding-left: .3rem; padding-right: .3rem; text-overflow: ellipsis; }
.tabulator .tabulator-header-filter .input-group-append .btn { padding: 0 .35rem; }
.ui-datepicker td.sh-dr-in a.ui-state-default { background: var(--color-primary-variant); border-color: var(--color-primary-variant);
                                                 color: var(--sh-on-primary); }


/* ===== 5. Account tabs ===== */
/* section headings in the tabs (card headers) */
#account_edit-merch_tab_content .h6 { font-weight: 600; }
/* Logs, Files and Users use the full width */
#acct_logs_edit.container, #acct_files_edit.container, #acct_users_edit.container { max-width: 100%; padding-left: 0; padding-right: 0; }
/* Finance: one time charges list */
.acct-fin-scroll { max-height: 400px; overflow-y: auto; }
/* scrolling lists (Logs audit/email, Settings terminal IDs) and clickable rows */
.sh-scroll-400 { max-height: 400px; overflow-y: auto; }
.sh-scroll-300 { max-height: 300px; overflow-y: auto; overflow-x: hidden; }
/* Settings tab's Terminal IDs (html/account/account_settings.html): a terminal ID is at most 15 characters, so its
   column is just that wide; under a Terminal ID, indented, the gateway terminals and Dejavoo TPNs that use it */
.sh-tid { flex: 0 0 11.5rem; max-width: 11.5rem; }
.sh-tid-proc { flex: 0 0 11rem; max-width: 11rem; }
.sh-trow.sh-tid-sub { padding: .15rem 0 .15rem 1.5rem; border-bottom: 0; }
.sh-trow.sh-tid-sub + .sh-trow:not(.sh-tid-sub) { border-top: 1px solid #EEF0F2; }
/* what a Terminal ID is assigned to, under it: an elbow from the TermID, then the icon, the kind and the value */
.sh-tid-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.sh-tid-link::before { content: ""; width: .6rem; height: .7rem; margin-top: -.6rem; border-left: 1px solid var(--sh-border);
                       border-bottom: 1px solid var(--sh-border); }
.sh-tid-link > .fas { color: var(--sh-muted); }
.sh-trow.sh-tid-sub .sh-icon-btns { padding: 0; }
/* a button's menu of choices (ShBtnMenu - the Settings tab's Assign): the choices are TWeb buttons (.btn), listed
   as menu items */
.sh-btnmenu .dropdown-menu { min-width: 11rem; }
/* Add Note / Task's Type menu (TaskTypePicker): Start a Workflow opens its workflows to its right - on hover, or opened
   by a click / the keyboard (sh-open); on a phone under it */
.sh-type-flow { position: relative; }
.sh-type-flowbtn { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sh-type-sub { display: none; position: absolute; top: -.5rem; left: 100%; min-width: 14rem; max-height: 60vh; overflow-y: auto; padding: .5rem 0;
               background: var(--sh-surface); border: 1px solid rgba(0,0,0,.15); border-radius: .25rem; box-shadow: 0 .25rem .75rem rgba(0,0,0,.15); z-index: 1; }
.sh-type-flow:hover > .sh-type-sub, .sh-type-flow.sh-open > .sh-type-sub { display: block; }
@media (max-width: 575.98px) { .sh-type-sub { position: static; box-shadow: none; border: 0; padding-left: 1rem; max-height: 40vh; } }
.sh-btnmenu .dropdown-item.btn { text-align: left; border: 0; padding: .4rem 1rem; }
.sh-row-link { cursor: pointer; }
/* Users: square icon buttons, right aligned in the last column (html/account/account_users.html) */
.sh-users td { vertical-align: middle; }
/* a row's icon buttons: they wrap onto a second line when the column is too narrow - the wrappers TWeb puts
   around a SAY or BUTTON (col-0, tweb_say) keep their content's width instead of shrinking it out of sight */
.sh-icon-btns { display: flex; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
/* (a row's buttons that stay on one line - Documents: open, download, info, delete) */
.sh-icon-btns.sh-icon-btns-1line, .sh-icon-btns-1line .sh-icon-btns { flex-wrap: nowrap; }
.sh-icon-btns > * { flex: 0 0 auto; width: auto; max-width: none; padding: 0; position: static; }
/* (a labelled button placed straight in the row - no TWeb wrapper - keeps a small button's padding) */
.sh-icon-btns > .btn:not(.sh-icon-btn) { padding: .25rem .5rem; }
.sh-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; padding: 0; flex: 0 0 32px; }
.sh-icon-btn.disabled, .sh-icon-btn:disabled { opacity: .35; pointer-events: none; }
/* Dashboard (html/dashboard.html) - InterPayAdm's main window: two panels filling the screen (Tasks &
   Notes, Activity Log), each with its filters on the left and its list on the right */
.sh-dash { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - var(--sh-qs-h)); height: calc(100dvh - var(--sh-qs-h));
           padding: 10px; box-sizing: border-box; }
.sh-dash-panel { flex: 1 1 0; min-height: 0; display: flex; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: .4rem;
                 overflow: hidden; box-shadow: var(--sh-shadow); }
.sh-dash-side { flex: 0 0 220px; display: flex; flex-direction: column; gap: 6px; padding: 12px 0; overflow-y: auto;
                background: var(--color-secondary); border-right: 1px solid var(--sh-border); }
.sh-dash-side > div { flex: 0 0 auto; max-width: none; width: 100%; padding: 0 12px; margin: 0; }
.sh-dash-side .form-group { margin-bottom: 0; }
.sh-dash-side > .sh-dash-push { margin-top: auto; padding-top: 10px; }
.sh-dash-title { font-weight: 700; color: var(--color-primary); font-size: 1.1rem; margin-bottom: 2px; }
.sh-dash-title i { opacity: .75; margin-right: 4px; }
.sh-dash-hint { font-size: 11px; color: var(--sh-muted); text-align: right; }
.sh-dash-brand { text-align: center; }
.sh-dash-region { font-size: 1.35rem; font-weight: 600; color: var(--color-primary); }
.sh-dash-brand img { max-width: 150px; max-height: 50px; margin-top: 4px; }
.sh-dash-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sh-dash-main > .sh-dash-fill { flex: 1 1 auto; min-height: 0; max-width: none; padding: 0; }
.sh-dash-fill > span { display: block; height: 100%; }
.sh-dash-list { height: 100%; overflow: auto; }
.sh-dash-table { margin: 0; }
.sh-dash-table thead th { position: sticky; top: 0; z-index: 1; background: var(--sh-subtle); color: var(--color-primary);
                          border-bottom: 1px solid #D6DCE1; border-top: 0; font-weight: 600; white-space: nowrap; }
.sh-dash-table td { border-top: 1px solid #F0F2F4; }
.sh-dash-table tbody tr:hover td { background: var(--sh-row-hover); }
/* task rows coloured as InterPayAdm: green ready, red late/urgent, blue waiting or a reminder,
   black not yours/notes/done */
.sh-task-green, .sh-task-green td { color: #1E7B45; }
.sh-task-red, .sh-task-red td { color: #B42318; }
.sh-task-blue, .sh-task-blue td { color: #1D5F8A; }
.sh-task-special td { color: var(--color-primary); font-weight: 600; background: #FFF8E1; }
/* the dashboard lists and special lists as TWeb rows (DashTaskHtml, DashActHtml, DashSpecialHtml - UiFrag) */
.sh-frag.container-fluid, .sh-dash-grid.container-fluid { padding-left: 0; padding-right: 0; }
.sh-frag > [class*="col-"] { padding-left: 0; padding-right: 0; }
/* the list's heading in the card tables' style (.sh-thead); white behind it, as it stays put while the rows scroll */
.sh-dash-grid .sh-dash-head { position: sticky; top: 0; z-index: 1; margin: 0; padding: .5rem 0; background: var(--sh-surface);
                              color: var(--sh-muted); font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--sh-border); }
.sh-dash-grid .sh-dash-row { margin: 0; padding: .45rem 0; border-top: 1px solid #EEF0F2; align-items: center; }
.sh-dash-grid .sh-dash-row:hover { background: var(--sh-row-hover); }
.sh-dash-grid .sh-dash-row > [class*="col-"], .sh-dash-grid .sh-dash-head > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
.sh-dash-row.sh-task-special { color: var(--color-primary); font-weight: 600; background: #FFF8E1; }
@media (max-width: 767.98px) {
  .sh-dash { height: auto; }
  .sh-dash-panel { flex: 0 0 auto; flex-direction: column; }
  .sh-dash-side { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--sh-border); }
  .sh-dash-side > .sh-dash-push { display: none; }
  .sh-dash-list { height: auto; max-height: 60vh; }
}/* Users page (html/users.html) - the user list (InterPayAdm's tree) on the left, the user window on the right */
.sh-users-page .sh-dash-panel { flex: 1 1 auto; }
.sh-users-side { flex: 0 0 340px; }
.sh-users-side > .sh-users-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0; margin-top: 4px; border-top: 1px solid var(--sh-border); background: var(--sh-surface); }
.sh-users-list > span { display: block; }
.sh-ulist-sec { position: sticky; top: 0; z-index: 2; padding: 6px 12px; background: var(--color-primary); color: var(--sh-on-primary); font-weight: 600; }
.sh-ulist-grp { padding: 5px 12px 3px; font-weight: 600; color: var(--color-primary); background: var(--sh-subtle); border-top: 1px solid #E2E6EA; }
.sh-ulist-item { padding: 5px 12px 5px 20px; cursor: pointer; border-top: 1px solid #F3F4F6; }
.sh-ulist-item:hover { background: var(--sh-row-hover); }
.sh-ulist-item.active { background: var(--color-primary-variant); color: var(--sh-on-primary); }
.sh-ulist-item.active .sh-ulist-id { color: rgba(255,255,255,.75); }
.sh-ulist-id { color: var(--sh-muted); font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.sh-users-main { overflow-y: auto; }
.sh-users-editor { padding: 16px 20px; }
.sh-users-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8A949E; gap: 8px; }
.sh-users-empty i { font-size: 3rem; opacity: .5; }
.sh-user-access { background: var(--color-secondary); height: auto; min-height: calc(1.5em + .5rem + 2px); }
/* every permission code of the user's type shows (no scroll box) - in columns (sh-check-grid) */
.sh-user-perms.sh-check-grid { padding: .5rem .75rem; }
/* the Edit User / Add User window: a set width (not its content's), room for three permission columns */
@media (min-width: 992px) {
  .modal-dialog:has(#userWrap) { width: min(860px, calc(100vw - 210px - 2rem)); max-width: min(860px, calc(100vw - 210px - 2rem)); }
}
/* the TWeb windows (user, task, dealer - DEFINE FORM ... CLASS): no extra padding round the form, and a
   row of buttons (sh-btn-row) spaced out and wrapping */
.sh-user.container-fluid, .sh-task-form.container-fluid, .sh-dlr.container-fluid, .sh-dlr-dlg.container-fluid { padding-left: 0; padding-right: 0; }
/* the forms in windows (inventory, help, permission codes - INIT FORM .. CLASS "sh-dlg-form"): flush with the window's
   title, an even gap between the fields of a row */
.sh-dlg-form.container-fluid { padding-left: 0; padding-right: 0; }
.sh-dlg-form > [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-dlg-form .row > [class*="col-"] { padding-left: .375rem; padding-right: .375rem; }
.sh-dlg-form .row > [class*="col-"]:first-child { padding-left: 0; }
.sh-dlg-form .row > [class*="col-"]:last-child { padding-right: 0; }
/* a button beside a field (sh-btn-field - Gateway Terminal ID Edit): under an empty label the height of
   the field's, so its top lines up with the box beside it; the button the box's height (the "sm" box's) */
.sh-btn-field .btn { height: calc(1.5em + .5rem + 2px); }
/* the Send email window (sh-mail-form): each field's hint right under it, then the standard 16px to the next row */
.sh-mail-form [data-group] { margin-bottom: 2px; }
.sh-mail-form .sh-mail-hint { margin-bottom: 16px; }
.sh-mail-form .sh-mail-hint:empty, .sh-mail-form .sh-mail-hint:has(> :empty) { margin-bottom: 14px; }
/* a compact label / value list (sh-kv - the Gateway Terminal Created window): each value right after its label */
.sh-kv { display: grid; grid-template-columns: max-content auto; gap: 6px 16px; align-items: center; }
.sh-kv dt { font-weight: 600; margin: 0; }
.sh-kv dd { margin: 0; }
@media (min-width: 992px) {
  .modal-dialog:has(.sh-kv) { width: min(520px, calc(100vw - 210px - 2rem)); min-width: 0; }
}
/* a PAPI field with its hint under it (sh-papi-cell): the cell spaced as the row's other fields, its content flush */
.sh-dlg-form .sh-papi-cell > [class*="col"] { padding-left: 0; padding-right: 0; }
/* a control straight in such a form (not in a ROWGROUP) lines up with the rows' controls */
.sh-user > [class*="col-"], .sh-task-form > [class*="col-"], .sh-dlr-dlg > [class*="col-"],
.sh-user-perms > [class*="col-"] { padding-left: 0; padding-right: 0; }
/* the user windows' field rows (sh-user-fields): the first field on the window's left edge, the last on its right, an
   even gap between them - as the heading, Account actions and Permissions */
.sh-user-fields > [class*="col"] { padding-left: .375rem; padding-right: .375rem; }
.sh-user-fields > [class*="col"]:first-child { padding-left: 0; }
.sh-user-fields > [class*="col"]:last-child { padding-right: 0; }
.sh-user-fields > .sh-uadd-m, .sh-user-fields > .sh-uadd-d { padding-right: 0 !important; }
.sh-user-fields .sh-uadd-m > [class*="col"], .sh-user-fields .sh-uadd-d > [class*="col"] { padding-left: .375rem; padding-right: 0; }
.sh-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sh-btn-row > [class*="col"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
.sh-users-editor .sh-dlg-buttons { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
/* (the buttons' column wrappers shrink to the buttons, so the buttons sit at the right) */
.sh-dlg-buttons > [class*="col"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
/* (any wrapper TWeb puts round a button - a [data-group] div, not only a col) - the row always ends at the right, unless
   it lays out its own groups (sh-footbar) */
/* (!important: TWeb's ROWGROUP adds Bootstrap's justify-content-start, which is !important and would beat every rule
   here) */
.sh-dlg-buttons:not(.sh-footbar) { display: flex; flex-wrap: wrap; justify-content: flex-end !important; align-items: center; gap: .5rem; }
.sh-dlg-buttons > * { flex: 0 0 auto; max-width: none; width: auto; }
@media (max-width: 767.98px) {
  .sh-users-side { flex: 0 0 auto; }
  .sh-users-side > .sh-users-list { max-height: 50vh; }
}

/* the task window (app/task.prg) - wider than the other dialogs */
/* (pop-up widths: see the end of this file) */
/* the task and user windows fit the screen: title bar fixed, the window's content scrolls inside */
#dlg_task.modal-dialog, #dlg_user.modal-dialog { margin-top: 1rem; margin-bottom: 1rem; min-height: 0; }
#dlg_task .modal-content, #dlg_user .modal-content { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
#dlg_task .modal-body, #dlg_user .modal-body { overflow-y: auto; }
#dlg_task .sh-scroll-300 { max-height: 30vh; }
.sh-task .sh-dlg-buttons { margin-top: 1rem; }
.sh-task-side { border-left: 1px solid #E9ECEF; }
@media (max-width: 767.98px) { .sh-task-side { border-left: 0; border-top: 1px solid #E9ECEF; padding-top: .75rem; margin-top: .75rem; } }
/* note text, email text: keep the line breaks */
.sh-pre { white-space: pre-wrap; }


/* ===== 6. Pages outside the app shell: company selection (html/common.prg), error pages ===== */
html.sh-page, html.sh-page body { height: auto; min-height: 100%; overflow: auto; margin: 0;
                                 font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sh-co-wrap, .sh-co-wrap div, .sh-co-btn { box-sizing: border-box; }
.sh-co-wrap { display: flex; min-height: 100vh; }
.sh-co-brand { flex: 1 1 50%; background: var(--color-primary); color: var(--sh-on-primary); display: flex; flex-direction: column; justify-content: center; padding: 5vw; }
.sh-co-brand h2 { margin: 0 0 .5rem; font-size: 1.6rem; font-weight: 400; text-transform: uppercase; letter-spacing: .05em; color: var(--sh-on-primary); }
.sh-co-brand h1 { margin: 0; font-size: 3rem; line-height: 1; color: var(--sh-on-primary); }
.sh-co-logo { display: block; width: 96px; height: 96px; margin-bottom: 1.5rem; }
.sh-co-pick { flex: 1 1 50%; background: var(--color-secondary); display: flex; align-items: center; justify-content: center; padding: 5vw; }
.sh-co-box { width: 100%; max-width: 400px; }
.sh-co-box h3 { color: var(--color-primary); margin: 0 0 1.5rem; font-size: 1.6rem; }
.sh-co-btn { display: block; width: 100%; padding: .9rem 1rem; margin-bottom: 1rem; text-align: center; font-size: 1.15rem;
             color: var(--sh-on-primary); background: var(--color-primary-variant); border: 1px solid var(--color-primary-variant);
             border-radius: .4rem; text-decoration: none; box-shadow: 0 .125rem .25rem rgba(0,0,0,.1); }
.sh-co-btn:hover, .sh-co-btn:focus { color: var(--sh-on-primary); background: var(--color-primary); border-color: var(--color-primary); outline: none; text-decoration: none; }
.sh-co-btn-test { background: var(--sh-surface); color: var(--color-primary-variant); }
/* plain text in a dialog (DlgText): scrolls inside the dialog, long lines wrap */
.sh-dlg-text { max-height: 65vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
/* the TWeb page (CompanySelectPage): its form wrapper adds no padding, and a LINK button is <a><button> */
.sh-co-form { padding: 0; }
.sh-co-wrap [class^="col-"] { padding: 0; }
.sh-co-box a { display: block; text-decoration: none; }
.sh-co-box a + a .sh-co-btn, .sh-co-box .sh-co-btn { width: 100%; }


/* error pages: 404, 500, not logged in, unknown company (ErrorPage, utils/ViewFunc.prg) */
.sh-err-page { background: var(--color-secondary); color: #343A40; }
.sh-err { box-sizing: border-box; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.sh-err-brand { display: flex; align-items: center; gap: 8px; color: var(--color-primary); font-weight: 600; letter-spacing: .08em;
                text-transform: uppercase; font-size: 11px; margin-bottom: 16px; }
.sh-err-card { box-sizing: border-box; width: 100%; max-width: 520px; background: var(--sh-surface); border-top: 4px solid var(--color-primary);
               border-radius: .5rem; box-shadow: var(--sh-shadow-lg); padding: 36px 32px 28px; text-align: center; }
.sh-err-code { font-size: 4.5rem; font-weight: 700; line-height: 1; color: var(--color-primary-variant); opacity: .9; letter-spacing: .02em; }
.sh-err-title { margin: 12px 0 8px; font-size: 1.5rem; font-weight: 600; color: var(--color-primary); }
.sh-err-msg { margin: 0 auto 24px; max-width: 400px; color: #5A6268; line-height: 1.5; }
.sh-err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sh-err-btn { display: inline-block; padding: .6rem 1.2rem; border-radius: .4rem; text-decoration: none; font-weight: 500;
              color: var(--sh-on-primary); background: var(--color-primary-variant); border: 1px solid var(--color-primary-variant); }
.sh-err-btn:hover, .sh-err-btn:focus { color: var(--sh-on-primary); background: var(--color-primary); border-color: var(--color-primary); text-decoration: none; }
.sh-err-btn-alt { color: var(--color-primary-variant); background: var(--sh-surface); }
.sh-err-ref { margin: 20px 0 0; font-size: 11px; color: var(--sh-muted); }
.sh-err-ref code { color: var(--color-primary); background: var(--color-secondary); padding: 1px 6px; border-radius: 4px; }
.sh-err-detail { margin-top: 20px; text-align: left; font-size: 11px; }
.sh-err-detail summary { cursor: pointer; color: var(--color-primary-variant); }
.sh-err-detail iframe { display: block; width: 100%; height: 360px; margin-top: 8px; border: 1px solid var(--sh-border); border-radius: 4px; background: var(--sh-surface); }
@media (max-width: 767.98px) {
  .sh-err-card { padding: 28px 18px 22px; }
  .sh-err-code { font-size: 3.5rem; }
  .sh-err-title { font-size: 1.25rem; }
  .sh-err-btn { flex: 1 1 100%; }
}

/* ===== 7. Phones / narrow screens ===== */
@media (max-width: 767.98px) {

  /* top bar with the menu button; the sidebar becomes a slide-in drawer */
  .sh-topbar { display: flex; align-items: center; position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 1030;
               background: var(--color-primary); color: var(--sh-on-primary); padding: 0 8px; }
  .sh-topbar .sh-db { display: inline; }
  .sh-layout { display: block; height: auto; }
  .sh-sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 1050; width: 260px; height: 100vh; height: 100dvh;
                transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 1rem rgba(0,0,0,.35); }
  .sh-sidebar.open { transform: translateX(0); }
  .sh-sidebar.collapsed { width: 260px; }
  .sh-sidebar.collapsed .sh-title, .sh-sidebar.collapsed .sh-db, .sh-sidebar.collapsed .sh-menu .sh-menu-item > span { display: inline; }
  .sh-sidebar.collapsed .sh-brand-logo { display: flex; margin: 0 0 0 2px; cursor: default; }
  .sh-sidebar.collapsed #sh-navtoggle { display: inline-block; }       /* phones: the drawer keeps its button */
  /* the drawer is never collapsed: the submenus open under their item (caret), never pop out */
  .sh-sidebar.collapsed .sh-menu-caret { display: block; }
  .sh-sidebar.collapsed .sh-menu-group.open .sh-submenu { display: block; position: static; box-shadow: none; }
  .sh-sidebar.collapsed .sh-submenu-title { display: none !important; }
  .sh-sidebar.collapsed .sh-submenu-item { padding-left: 55px; }
  .sh-submenu-item { padding-top: 10px; padding-bottom: 10px; }
  .sh-sidebar .sh-db { display: block; }
  .sh-menu .sh-menu-item { padding: 13px 16px; }
  .sh-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1040; background: var(--sh-overlay); }
  .sh-backdrop.open { display: block; }
  .sh-main { margin-top: 52px; height: calc(100vh - 52px); height: calc(100dvh - 52px); }
  .sh-dash { height: calc(100vh - 52px - var(--sh-qs-h)); height: calc(100dvh - 52px - var(--sh-qs-h)); }
  .sh-qs-bar { padding: 0 8px; }
  .sh-qs { flex: 1 1 auto; }
  .sh-qs .sh-qs-input { font-size: 16px; }                 /* no iOS zoom on focus */
  .sh-qs-kbd { display: none; }
  .sh-qs-list .sh-qs-item { grid-template-columns: auto 1fr auto; grid-template-areas: "id name phq" "st dlr phq"; row-gap: 3px; }
  .sh-qs-st { justify-self: start; }
  body.sh-merch-open .sh-qs { min-width: 140px; }            /* the search keeps room - the actions scroll instead */
  .sh-qs-note { margin-left: 8px; flex: 0 0 auto; }
  body.sh-merch-open .sh-qs-acts { margin-left: 4px; gap: 4px; flex: 0 1 auto; }
  .sh-qs-act { min-height: 34px; }             /* bigger touch targets */

  /* TWeb lays fields out as fixed col-1..col-11 - stack them full width instead */
  .sh-main .col-1, .sh-main .col-2, .sh-main .col-3, .sh-main .col-4, .sh-main .col-5, .sh-main .col-6,
  .sh-main .col-7, .sh-main .col-8, .sh-main .col-9, .sh-main .col-10, .sh-main .col-11,
  .modal .col-1, .modal .col-2, .modal .col-3, .modal .col-4, .modal .col-5, .modal .col-6,
  .modal .col-7, .modal .col-8, .modal .col-9, .modal .col-10, .modal .col-11 { flex: 0 0 100%; max-width: 100%; }
  .sh-main .w-50 { width: 100% !important; }

  /* 16px inputs: smaller text makes iOS zoom in on focus */
  .sh-main .form-control, .modal .form-control, .sh-main select, .modal select { font-size: 16px; }

  /* wide tables scroll sideways instead of overflowing the screen */
  .sh-main table.table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }

  .sh-main .text-right { text-align: left !important; }
  .sh-main h4 { font-size: 1.2rem; }

  /* account editor header */
  .sh-acct-head { padding: 10px var(--sh-gutter); gap: 8px; }
  .sh-acct-text { flex-wrap: wrap; gap: 4px 10px; }
  .sh-acct-meta > span { flex-wrap: wrap; white-space: normal; }
  .sh-acct-side { margin-left: 0; flex-basis: 100%; }
  .sh-acct-logo { flex-basis: 32px; width: 32px; height: 32px; }
  .sh-acct-name { font-size: 1.05rem; }
  .sh-btn-label { display: none; }
  .sh-acct-actions .btn, .sh-tab-actions .btn { width: 36px; height: 36px; padding: 0; }
  .sh-tab-actions { padding-right: 8px; gap: 4px; }
  .sh-acct-tabs .btn.sh-tab { padding: 10px 12px 9px; }

  /* company selection page */
  .sh-co-wrap { flex-direction: column; }
  .sh-co-brand, .sh-co-pick { flex: 0 0 auto; }
}

/* who else has a user/task window open, and its last change (PresenceHtml, html/common.prg) */
.sh-presence { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--sh-muted); }
.sh-presence i { opacity: .7; margin-right: 2px; }
.sh-presence .sh-presence-busy { color: #8A5A00; font-weight: 600; }

/* no sideways scrolling in any popup (dialogs, messages, task and user windows): the content fits the
   window's width - long words/emails/links wrap, tables and frames shrink to fit, grid rows don't spill */
/* pop-ups are as wide as their content - at least a third and at most three quarters of the screen
   (phones: the screen width) */
.modal-dialog { width: fit-content; width: -moz-fit-content; min-width: 33vw; max-width: 75vw; }
@media (max-width: 767.98px) { .modal-dialog { width: auto; min-width: 0; max-width: calc(100vw - 1rem); } }
.modal-content, .modal-body { max-width: 100%; }
/* on a large screen every window is centred in the page beside the left menu (210px, 56px folded), never over it */
@media (min-width: 992px) {
  body:has(.sh-sidebar) .modal { padding-left: 210px !important; }
  body:has(.sh-sidebar.collapsed) .modal { padding-left: 56px !important; }
  body:has(.sh-sidebar) .modal-dialog { max-width: min(75vw, calc(100vw - 210px - 2rem)); }
}
.modal-body { overflow-x: hidden; overflow-wrap: anywhere; word-break: break-word; }
.modal-body .row { margin-left: 0; margin-right: 0; }
.modal-body .row > [class*="col"] { min-width: 0; }
.modal-body img, .modal-body iframe, .modal-body video, .modal-body pre, .modal-body textarea { max-width: 100%; }
.modal-body pre, .modal-body .sh-pre { white-space: pre-wrap; }
.modal-body .table-responsive { overflow-x: visible; }
.modal-body table { width: 100%; table-layout: auto; }
.modal-body table td, .modal-body table th { white-space: normal; overflow-wrap: anywhere; }
.modal-body .form-control, .modal-body select { max-width: 100%; min-width: 0; }
.modal-body .d-flex > * { min-width: 0; }
.ut-confirm-msg { overflow-wrap: anywhere; }
/* a merchant save's changes to confirm (ShSaveChanges): wider popup, the list scrolls */
.ut-confirm-box:has(.sh-changes) { max-width: 640px; }
.ut-confirm-msg .sh-changes { max-height: 50vh; overflow-y: auto; white-space: normal; font-size: 11px; border: 1px solid #dee2e6; border-radius: .25rem; }
.ut-confirm-msg .sh-changes th { position: sticky; top: 0; background: var(--sh-surface); }

/* Dealer maintenance editor (app/dealers.prg): the account editor's header and tabs, then the tab panes */
.sh-dlr .sh-presence { margin: 4px 0 0; }
.sh-dlr-body { padding: 0 var(--sh-gutter) var(--sh-gutter); }
/* a pane's sections are TWeb cards over the whole width (DCardBegin), as the account editor's tabs */
.sh-dlr .h6 { font-weight: 600; }
.sh-dlr-sub { font-weight: 600; color: var(--color-primary); margin: 0 0 8px; }
.sh-dlr-desc { padding-bottom: .55rem; }
/* a residual block (Class A, Rev Share, Flat Rate, dealer charge fees) - two side by side on wide screens */
.sh-dlr-resblock { padding-top: 4px; padding-bottom: 4px; }
.sh-dlr-resrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.sh-dlr-reslabel { flex: 0 0 150px; color: #5A6268; }
/* a row of numbers with their units (DNum - TWeb GETs with a SPAN) */
.sh-dlr-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-dlr-nums > [class*="col"], .sh-dlr-resrow > [class*="col"] { flex: 0 0 auto; width: auto; max-width: none; padding: 0; }
.sh-dlr-nums .form-group, .sh-dlr-resrow .form-group { margin-bottom: 0; }
.sh-num-in { width: 80px !important; flex: 0 0 80px !important; }
.sh-dlr-resrow > .sh-dlr-reslabel { flex: 0 0 150px; }
@media (max-width: 767.98px) { .sh-dlr-resrow > .sh-dlr-reslabel { flex-basis: 100%; } }
/* GRID 0 controls (a button, a link in a SAY) take no column padding */
.col-0 { padding-left: 0; padding-right: 0; }
/* a card header with its title on the left and the section's buttons on the right (DCardBegin, app/dealers.prg) */
.sh-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 1.25rem; }
.sh-card-title > .tweb_say { flex: 1 1 auto; }
/* checkboxes in columns as wide as the space allows - TWeb's CHECKBOX only takes a numeric GRID, so each
   one is GRID 12 in a DIV of this class */
.sh-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 24px; padding: 2px 0; margin-bottom: var(--sh-gap-sm); }
.sh-check-grid > [class*="col-"] { max-width: none; width: auto; padding: 0; }
.sh-dlr-tiers { padding-left: 12px; border-left: 3px solid #E2EEF6; margin: 4px 0 10px; }
@media (max-width: 767.98px) {
  .sh-dlr-reslabel { flex-basis: 100%; }
}
.sh-dealer-link { color: inherit; text-decoration: none; }
.sh-dealer-link:hover, .sh-dealer-link:focus { color: var(--color-primary-variant); text-decoration: underline; }

/* list pages (Merchants, Users, Dealers): a header with the title and what the page is for on the
   left and its main action on the right, spaced from the top and from the table */
.sh-page-head.row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px;
                    margin: 0 0 var(--sh-gap); padding: 8px 0 14px; border-bottom: 1px solid var(--sh-border); }
/* (no bar on title-line pages - the head starts 8px from the top, then the breadcrumb line's
   16px, so the title sits ~24px from the top on every page) */
/* the parents of the page, one small grey line inside the title block right above the title (UiPageHead): its height is
   kept when it's empty (a first-level page), so the title never moves */
.sh-page-crumbline { display: block; height: 16px; line-height: 16px; font-size: 11px; color: var(--sh-muted);
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-page-crumbline a { color: var(--sh-muted); text-decoration: none; }
.sh-page-crumbline a:hover, .sh-page-crumbline a:focus { color: var(--color-primary-variant); text-decoration: underline; }
.sh-page-crumbline .sh-crumb-sep { margin: 0 .35rem; }
/* a top-level page (no breadcrumb bar): its title where the others' is, under the bar's room */
.sh-page-head.row.sh-page-nocrumb { margin-top: var(--sh-crumb-h); }
/* the list pages' forms sit on the page gutter (the header and the table line up with the account editor's) */
#merchsel.container-fluid, #users.container-fluid, #dealers.container-fluid, #dashboard.container-fluid, #actlog.container-fluid,
#reports.container-fluid, #rptView.container-fluid, #admin.container-fluid,
#inventory.container-fluid { padding-left: var(--sh-gutter); padding-right: var(--sh-gutter); }

/* Reports (app/reports.prg, utils/ReportFunc.prg): Bootstrap tables - numbers line up (tabular figures),
   a blank row is a small gap, a text row is a section heading, totals stand out */
.sh-rpt-table .sh-rpt-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh-rpt-table td, .sh-rpt-table th { vertical-align: middle; }
/* report and lookup results: their headings in the card tables' style (.sh-thead) - no band */
.sh-rpt-table thead th { white-space: nowrap; font-size: .9rem; font-weight: 600; color: var(--sh-muted); background: transparent; border-top: 0;
                         border-bottom: 1px solid var(--sh-border); }
.sh-rpt-table .sh-rpt-gap td { padding: .2rem; border-top: 0; }
.sh-rpt-table .sh-rpt-text td { padding-top: .6rem; color: var(--color-primary); }
.sh-rpt-table .sh-rpt-total td { background: var(--sh-subtle); }
.sh-rpt-wrap { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: .4rem; box-shadow: var(--sh-shadow); }
.sh-rpt-pre { white-space: pre-wrap; font-size: .9rem; }
.sh-rpt-dlg.container-fluid { padding-left: 0; padding-right: 0; }

/* printing a report: only the report - no menu, search bar or buttons - over the whole page */
@media print {
  .sh-sidebar, .sh-topbar, .sh-backdrop, .sh-qs-bar, .sh-toast, .sh-page-actions, .popover { display: none !important; }
  html, body, .sh-layout, .sh-main { height: auto !important; overflow: visible !important; display: block !important; background: #fff !important; }
  .sh-rpt-wrap { overflow: visible !important; border: 0; box-shadow: none; }
  .sh-rpt-table { font-size: 9pt; }
  .sh-rpt-table thead { display: table-header-group; }
  .sh-rpt-table tr { page-break-inside: avoid; }
  .sh-page-head.row { padding-top: 0; }
  .sh-page-crumbbar { display: none !important; }
  .sh-page-head.row.sh-page-nocrumb { margin-top: 0; }
}
.sh-page-head .sh-page-titlebox { flex: 1 1 auto; min-width: 0; padding: 0; max-width: none; }
.sh-page-title { margin: 0; font-size: 1.55rem; font-weight: 600; color: var(--color-primary); line-height: 1.25; }
.sh-page-title i { color: var(--color-primary-variant); opacity: .85; margin-right: 6px; font-size: .9em; }
/* an icon on a coloured badge or pill takes the badge's text colour (white on red / green, dark on amber) */
.badge i, .sh-page-title .badge i { color: inherit; opacity: 1; margin-right: 3px; font-size: inherit; }
.sh-page-sub { margin-top: 3px; color: var(--sh-muted); font-size: .95rem; }
.sh-page-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.sh-page-actions .btn { padding: .4rem .9rem; }
#merchsel .tabulator, #users .tabulator, #dealers .tabulator, #dashboard .tabulator, #actlog .tabulator { border: 1px solid var(--sh-border); border-radius: .4rem; overflow: hidden;
                                                              box-shadow: var(--sh-shadow); margin-bottom: var(--sh-gutter); }
/* a table in a card (TWeb's BROWSE: div.card > div.card-body.tabulator) ends at the card's bottom edge - the pager bar last,
   with the card's rounded corners on it; the space under it goes on the card, not inside it */
.card > .tabulator { margin-bottom: 0 !important; }
.card:has(> .tabulator) { margin-bottom: var(--sh-gutter); overflow: hidden; }
@media (max-width: 767.98px) {
  .sh-page-head.row { padding-top: 8px; }
  .sh-page-title { font-size: 1.25rem; }
  .sh-page-actions { flex: 1 1 100%; }
  .sh-page-actions .btn { flex: 1 1 auto; }
}

/* who else has it open / last change - pills that stand out: amber when someone else has it open,
   green when only you do, blue for the last change */
.sh-presence, .sh-acct-presence > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sh-presence-busy, .sh-presence-none, .sh-presence-last {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .9rem; line-height: 1.4; }
.sh-presence-busy { background: #FFF1CC; color: #7A4B00; border: 1px solid #F2C14E; font-weight: 600;
                    box-shadow: 0 0 0 3px rgba(242,193,78,.18); }
.sh-presence-busy i { color: #C27C00; opacity: 1; }
.sh-presence-none { background: #E6F4EC; color: #1E6B40; border: 1px solid #BFE3CC; }
.sh-presence-last { background: #E8F1F8; color: #1D4F72; border: 1px solid #C7DCEC; }
.sh-presence-nolog { background: #F1F3F5; color: var(--sh-muted); border-color: var(--sh-border); }
.sh-presence-busy i, .sh-presence-none i, .sh-presence-last i { margin: 0; opacity: .9; }
/* Live updates (files/sportshub/sportshub.js ShLiveBanner): changed elsewhere while being edited */
.sh-live-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 12px;
                  animation: sh-fab-in .2s ease-out; }
.sh-live-msg { flex: 1 1 260px; font-weight: 600; }
.sh-live-msg i { margin-right: 4px; }
.sh-live-actions { display: flex; gap: 4px; flex: 0 0 auto; }

/* Dashboard (html/dashboard.html): the summary cards filter the task table - the one filtering shows as pressed */
.sh-dash-card { padding: .6rem .8rem; border-width: 1px; border-left-width: 4px !important; box-shadow: var(--sh-shadow); }
.sh-dash-card:hover, .sh-dash-card:focus { box-shadow: var(--sh-shadow-lg); }
.sh-dash-card.active { background: var(--sh-hover) !important; }
#dashboard .tabulator-row { cursor: pointer; }
/* a table cell whose text wraps to two lines, then ends in "..." (ShCell2Lines - the Dashboard's Description) */
.tabulator .tabulator-cell .sh-clamp2 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
                                        overflow: hidden; line-height: 1.3; word-break: break-word; }
/* Activity Log (html/actlog.html): a message that opens its details */
.sh-act-open { text-decoration: underline dotted; cursor: pointer; }

/* notices that stay until closed (ShNotify - live updates: what someone else did): bottom right, clear of every
   page's header buttons; the newest on top */
.sh-notices { position: fixed; bottom: 16px; right: 16px; z-index: 1060; width: 360px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow-y: auto; }
.sh-notice-text { overflow-wrap: anywhere; }
.sh-notice { animation: sh-fab-in .2s ease-out; }

/* breadcrumbs (UiBreadcrumb, utils/UiFunc.prg): Bootstrap's, without its box; "lead" ends in a separator - the title follows */
.breadcrumb.sh-crumbs { background: none !important; padding: 0 !important; margin: 0 0 2px; font-size: .9rem; border-radius: 0; }
.breadcrumb.sh-crumbs a { color: var(--color-primary-variant); }
.sh-crumbs-lead { margin: 0 !important; font-size: 1.05rem !important; }
.sh-crumbs-lead .breadcrumb-item:last-child::after { content: "/"; padding: 0 0 0 .5rem; color: #6C757D; }
@media (max-width: 767.98px) { .sh-notices { bottom: 8px; right: 8px; max-width: calc(100vw - 16px); } }

/* ===== UI fixes (UI-FIXES.md): task windows' hierarchy, header, rows, history; dialogs ===== */
/* confirm boxes: the confirming button red for a destructive action (UiAsk "||danger") */
.ut-confirm-yes.ut-confirm-danger { background: #B02A37; border-color: #B02A37; color: #FFFFFF; }
.ut-confirm-yes.ut-confirm-danger:hover, .ut-confirm-yes.ut-confirm-danger:focus { background: #8E1F2B; border-color: #8E1F2B; color: #FFFFFF; }
/* the top line: the type flush left (UiTypeLabel), the status pills (who has it open, last updated) on the right */
.sh-task-topline { justify-content: space-between; }
.sh-task-topline > .sh-typelabel { margin: 0; }
.sh-task-topline > :last-child { margin-left: auto; min-width: 0; overflow: hidden; }
/* its pills never wrap: in a narrow window (minimised / floating) the Updated pill goes, the names are already +n */
#dlg_task .sh-task-topline { container-type: inline-size; }
@container (max-width: 520px) { .sh-task-topline .sh-presence-upd { display: none; } }
/* (the Started pill goes next, in a narrower window still) */
@container (max-width: 380px) { .sh-task-topline .sh-presence-start { display: none; } }
/* the header: what the task is linked to - the window's biggest text - with its buttons (UiLinkHead) */
.sh-linkhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 .35rem; }
.sh-linkhead-name { font-size: 1.35rem; font-weight: 700; line-height: 1.25; color: var(--color-primary); min-width: 0; overflow-wrap: anywhere; }
.sh-notlinked { font-size: 1.1rem; font-weight: 400; color: var(--sh-muted); }
/* Workflow and Step: medium, bold values */
.sh-hrows-mid .sh-hval { font-size: 1rem; font-weight: 600; }
/* the type: a small muted label with its icon (a completed task's gray, so it stands out) */
.sh-typelabel { font-size: 11px; color: var(--sh-muted); margin-bottom: .15rem; }
.sh-typelabel i { margin-right: 2px; }
.sh-typelabel-done { display: inline-block; background: #E9ECEF; border-radius: .25rem; padding: 0 .45rem; }
/* the Notes / Tasks window's Title: a heading, Edit beside it */
.sh-title-view { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-bottom: .4rem; }
/* (its own class - .sh-title is the sidebar brand's "SportsHub") */
.sh-task-title { font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--color-primary); overflow-wrap: anywhere; }
.sh-title-editbtn { padding: 0; font-size: 11px; }
.sh-title-edit { margin-bottom: .5rem; }
.sh-title-edit > [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-count { font-size: 11px; color: var(--sh-muted); text-align: right; margin-top: 2px; }
/* Assignment / Due / Priority: each one row - its buttons a pair that wraps whole */
.sh-assign-row, .sh-due-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: .2rem; }
.sh-assign-who { color: var(--color-primary); }
/* (one width for the person and the people icon, centred, so every name starts on the same line) */
.sh-who-ico { display: inline-block; width: 1.3em; text-align: center; color: #ADB5BD; font-size: .85em; margin-right: .4rem; }
.sh-ilabel { color: var(--sh-muted); font-size: 11px; }
.sh-overdue { color: #B02A37; font-weight: 600; font-size: 11px; }
.sh-due-edit { margin-top: .3rem; }
.sh-due-edit > [class*="col-"] { padding-left: 0; padding-right: 0; }
.sh-due-edit input { max-width: 12rem; }
.sh-prio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sh-prio-row > div { padding: 0; flex: 0 0 auto; width: auto; max-width: none; }
.sh-prio-row select { width: auto; }
.sh-helper { font-size: 11px; color: var(--sh-muted); }
/* the history of both windows: the date and person small and muted, the text below, a little space between */
.sh-hist { border: 1px solid var(--sh-border); border-radius: .4rem; background: var(--color-secondary); padding: .25rem .75rem; }
.sh-hist-item { padding: .4rem 0; border-bottom: 1px solid #E9ECEF; }
.sh-hist-item:last-child { border-bottom: 0; }
.sh-hist-meta { font-size: 11px; color: var(--sh-muted); }
.sh-hist-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* field labels in the task windows: muted gray, not link blue */
.sh-task label, .sh-task .col-form-label, .sh-task .col-form-label-sm { color: var(--sh-muted); }
.sh-task .custom-control-label, .sh-task .sh-req-check label { color: var(--color-primary); }
/* a selected toggle in the brand colour */
.sh-task-link .btn.active { background: var(--color-primary-variant); border-color: var(--color-primary-variant); color: var(--sh-on-primary); }
/* Add Note / Task's Link to: the merchant / partner chosen (or Not linked), its x, then Link (the picker) */
.sh-linkpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: .4rem; }
.sh-linkpick-chosen { font-weight: 600; color: var(--color-primary); }
.sh-linkpick-clear { padding: 0 .25rem; color: var(--sh-muted); }
/* a result opened up by a typed comment (ShTaskCommentGate) */
.sh-work .sh-work-blocked.sh-unblocked { cursor: auto; }
.sh-work .sh-work-blocked.sh-unblocked .btn { pointer-events: auto; }
/* the task window's history scrolls on its own (newest first, so the newest is in view on open): at most about two
   fifths of the window's height, a thin scrollbar only when it's longer - the buttons and the comment box stay in view */
#dlg_task .sh-hist { max-height: 40vh; overflow-y: auto; overscroll-behavior: contain;
                     scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.25) transparent; }
#dlg_task .sh-hist::-webkit-scrollbar { width: 6px; }
#dlg_task .sh-hist::-webkit-scrollbar-track { background: transparent; }
#dlg_task .sh-hist::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 3px; }
#dlg_task .sh-hist:focus { outline: 2px solid var(--color-primary-variant); outline-offset: 1px; }

/* Notes & Files: a deleted file (a Super User's view - MerchFileDelete) faded; the documents' pages */
.sh-file-deleted { opacity: .7; background: #FBF1F2; }
/* (the documents' pager is the standard one - UiPagerHtml) */
/* A hidden value (data-sh-mask - the Authorized Signer date of birth): a text field drawn as dots until its eye shows it (ShReveal) */
input[data-sh-mask]:not(.sh-shown){-webkit-text-security:disc;text-security:disc}

/* The Settings tab's Gateway Terminals table (account_gateway.html): on a large screen it keeps a width its columns fit in and scrolls sideways when the page is narrower; stacked rows on smaller screens are unchanged */
/* the Gateway Terminals table on a large screen: header and rows on one grid of columns sized to what they hold - IDs,
   handler names and dates never break, the flexible columns (handler, platform) take what is left */
@media(min-width:992px){
  .sh-gw-scroll{overflow-x:auto}
  .sh-gw-table{min-width:842px}
  .sh-gw-table .sh-thead, .sh-gw-table .sh-trow { display:grid !important; margin:0;
      grid-template-columns: 92px 72px 100px minmax(88px,1fr) minmax(56px,1fr) 118px 84px 176px; column-gap:8px; align-items:center; }
  .sh-gw-table .sh-thead > *, .sh-gw-table .sh-trow > * { width:auto; max-width:none; flex:none; padding:0; min-width:0; white-space:nowrap; }
  .sh-gw-table .sh-trow > :nth-child(4), .sh-gw-table .sh-trow > :nth-child(5) { overflow:hidden; text-overflow:ellipsis; }
}

/* The Merchants list's globe (ShPhqCell): a quiet icon that darkens on hover, the row's own click left alone */
.sh-phq-link { color: #6c757d; display: inline-block; padding: 0 4px; }
/* its column: just the globe - no cell padding, no ".." (the column is narrower than a padded globe) */
.tabulator .tabulator-cell.sh-phq-col { padding: 4px 0; text-overflow: clip; text-align: center; }
.sh-phq-link:hover, .sh-phq-link:focus { color: var(--color-primary); }

/* The sidebar: a thin dark scrollbar matching the menu - no white track, a faint white handle a little
   brighter on hover - only when the menu is taller than the window (.sh-menu-main overflow-y: auto); and a little less
   space between items, so the whole menu with one submenu open fits a laptop's 727px. Phones keep their larger items. */
.sh-menu-main { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.sh-menu-main:hover { scrollbar-color: rgba(255,255,255,.4) transparent; }
.sh-menu-main::-webkit-scrollbar { width: 6px; }
.sh-menu-main::-webkit-scrollbar-track { background: transparent; }
.sh-menu-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.sh-menu-main::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.4); }
@media (min-width: 768px) {
  .sh-menu { padding: 4px 0; }
  .sh-menu .sh-menu-item, .sh-sidebar.collapsed .sh-menu .sh-menu-item { padding-top: 7px; padding-bottom: 7px; }
  .sh-submenu-item { padding-top: 4px; padding-bottom: 4px; }
}

/* A report column left off the screen's table (ReportFunc "ScreenHide" - eg Gateway Log's Batch); Print shows it */
@media screen { .sh-rpt-table .sh-rpt-screenhide { display: none; } }

/* A report table's rows of other pages (ShRptPages): hidden on screen only - Print shows every row */
@media screen{.sh-rpt-table tr.sh-rpt-off{display:none}}

/* A report's / lookup's results (app/reports.prg RptShow): the page's standard title line (the same size,
   spacing and line as every page), what it shows in small text after the title */
#rptView .sh-rpt-sub { font-size: 11px; font-weight: 400; color: var(--sh-muted, #6c757d); margin-left: .4rem; }
/* a lookup: one white card - the search fields a strip in its header (one line: each field's name inside its
   box - ShRptBar; checkboxes on the line; Search at its end), the results below across the card's full width */
.sh-rpt-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sh-rpt-strip .row, .sh-rpt-strip .sh-check-grid { display: contents; }
.sh-rpt-strip [data-group], .sh-rpt-strip [class*="col-"] { flex: 0 0 auto; width: auto; max-width: 100%; padding: 0; margin: 0; display: flex; align-items: center; gap: 4px; }
.sh-rpt-strip [data-group] > label { margin: 0; white-space: nowrap; }
.sh-rpt-strip .input-group { width: auto; flex-wrap: nowrap; }
.sh-rpt-strip select.form-control { width: auto; }
.sh-rpt-strip .form-group, .sh-rpt-strip .custom-control, .sh-rpt-strip .form-check { margin: 0; }
.sh-rpt-strip .mb-3 { margin-bottom: 0 !important; }
/* its checkboxes: lined up with the boxes and the button, the usual gap between the tick and its label, the
   label in the text's grey - blue reads as a link */
.sh-rpt-strip .custom-control { display: flex; align-items: center; min-height: calc(1.5em + .5rem + 2px); padding-left: 1.5rem; }
.sh-rpt-strip .custom-control-label { color: #495057; line-height: 1.5; white-space: nowrap; }
.sh-rpt-card .sh-rpt-wrap { border: 0; border-radius: 0; box-shadow: none; margin: 0 !important; }
/* its table fits the card: the columns take their shares of the width
   (the report's <col> widths), a long value - header or cell - cut short with "..." (its full text on hover - ShRptPages) */
@media screen and (min-width: 768px) {
  .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table { table-layout: fixed; width: 100%; font-size: 11px; }
  /* (smaller type and tighter cells, so more of each column shows) */
  .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table th, .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table td { padding: .3rem .25rem; }
  .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table .btn-sm { font-size: 11px; padding: 0 .4rem; }
  .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table th, .sh-rpt-card:not(.sh-rpt-card-wide) .sh-rpt-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; }
}
/* a report's results in the same card: its own column widths - a wide one scrolls sideways inside the card; its
   paragraphs and text blocks keep a margin from the card's edges */
.sh-rpt-card-wide > .card-body { overflow-x: auto; }
.sh-rpt-card .sh-rpt-body > p, .sh-rpt-card .sh-rpt-body > pre { margin: .75rem 1.25rem; }
.sh-rpt-card .sh-rpt-body > pre { border: 0 !important; padding: 0 !important; }
/* the standard pager outside a Tabulator table (ShPagerBar / UiPagerHtml): just the tables' footer bar - no
   outer border of its own (the footer keeps its top line) */
.sh-pagerbar.tabulator { border: 0; background: transparent; overflow: visible; margin: 0; }
.sh-rpt-pager { margin-bottom: 1rem; }
.sh-rpt-card .sh-rpt-pager { margin-bottom: 0; }
.sh-rpt-card .sh-rpt-body > .text-muted { padding: .75rem 1.25rem !important; }
/* the results fit the page: long text stays on one line, cut short (its full text on hover - ShRptPages) */
@media screen and (min-width: 768px) {
  #rptView .sh-rpt-table { font-size: 11px; }
  #rptView .sh-rpt-table td { white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
}
