/* Gen3 look for the Gen2 back office (global reskin layer).

   Linked LAST in the four master pages (onlineMaster / Epos_Shop/MasterPage /
   Epos_Shop/MasterPageForUploadPic / Union/UnionMaster), after layout*.css and the
   jQuery UI theme, so it only overrides and never has to edit the legacy sheets.
   Removing the <link> restores the old look completely.

   Tokens are copied from backoffice-ever-dish-v3/src/index.css (:root block); keep
   the two in step by hand, Gen2 cannot consume the Tailwind build.

   Rules for anything added here:
   - Generic element rules are wrapped in :where(#right, .boPopup, .boStandalone) so their specificity stays
     at one class/attribute. That beats the legacy bare element rules (fieldset div
     input ...) but loses to page level design systems such as .bo2 (Viva,
     UpdateManage, ShopConsole), which keep their own component styles and are
     recoloured through their variables instead (see the .bo2 block at the end).
   - GridView colours are written inline by the control, so those rules need
     !important. They match the handful of stock colour schemes by value, so a
     colour a page sets on purpose (red row for a locked shop ...) is left alone. */

/* COMPATIBILITY GATE - read before editing.

   The POS opens some back office pages in embedded browsers:
   - a WinForms WebBrowser control, i.e. the Internet Explorer engine
     (EposCS AccountForm / WebBackoffice ...);
   - CefSharp, an embedded Chromium that is years older than desktop Chrome
     (ShopRegister/AccountInfo, ShopAddService/*, WebAPI/InvoicePay ...).

   The whole skin sits inside one @supports block that asks for custom
   properties. IE has neither @supports nor custom properties, so it skips the
   block as a unit and shows the page exactly as it looked before this skin
   existed. Keep EVERY rule inside the block.

   The embedded Chromium passes the gate and gets the skin, so on the stand-alone
   pages it opens (body.boStandalone) do not RELY on newer features for layout:
   no overflow: clip, and display: flow-root needs the clearfix fallback next to
   it. Rules whose selector uses :where() / :is() / :has() are simply dropped by
   that engine, which must only cost polish, never break the page.

   The font @import cannot live inside @supports, so it is gated with a media
   query instead: "hover" is a Media Queries 4 feature that IE does not know, so
   IE ignores the import, while every modern browser matches one of the two. */
@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap") screen and (hover: hover), screen and (hover: none);

@supports (--bo: 0) {
/* Surfaces are deliberately NOT pure white. Staff keep pages such as the menu
   editor open for hours, and a full screen of #fff next to dark text is tiring to
   look at. The gen3 tokens are kept for hue and hierarchy (page darker than card,
   card darker than nothing) but every surface is pulled down a few steps; text
   contrast on the card stays above 13:1. Change surfaces here, not per page. */
:root {
    --bo-bg: #eaecef;
    --bo-fg: #212121;
    --bo-card: #f6f7f9;
    /* Editable fields are one step LIGHTER than the surface they sit on. On the old
       white card they could share the card colour; on a grey card a grey field reads
       as disabled (disabled / read-only ones use --bo-muted, which is darker). */
    --bo-field: #fdfefe;
    /* the darker stripe of striped grids: between a field and the card, so the
       stripes read as rows without the grey bands looking heavy */
    --bo-row-alt: #fbfcfd;
    --bo-primary: #f57c00;
    --bo-primary-fg: #ffffff;
    --bo-primary-hover: #e65100;
    --bo-primary-light: #ffe0b2;
    --bo-primary-lighter: #fff3e0;
    --bo-secondary: #e7eaed;
    --bo-muted: #edeff2;
    --bo-muted-fg: #757575;
    --bo-hint: #9e9e9e;
    --bo-border: #e6e9ed;
    /* outline of a data grid and the line under its header. Lighter than --bo-input
       on purpose: an input needs a firm edge to look editable, a grid only needs
       enough of one to hold its shape. */
    --bo-table-edge: #d5dae0;
    /* page frame lines (top bar, left menu, footer): structure, not controls, so quieter than --bo-input */
    --bo-frame: #e5e8ec;
    --bo-input: #bfc6ce;
    --bo-destructive: #f44336;
    --bo-destructive-text: #c62828;
    --bo-success-text: #2e7d32;
    --bo-info-text: #1565c0;
    --bo-radius: 8px;
    --bo-radius-sm: 6px;
    --bo-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --bo-modal-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --bo-font: "Public Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --bo-top-h: 52px;
    /* the copyright footer bar is hidden (see .foot): the work area runs to the bottom edge */
    --bo-foot-h: 0px;
}

/* ---------------------------------------------------------------- page frame */

body {
    background: var(--bo-bg);
    color: var(--bo-fg);
    font-family: var(--bo-font);
    font-size: 13px;
}

input, select, textarea, button {
    font-family: var(--bo-font);
}

/* ---- top bar: white, logo left, user right ---- */
.topBanner {
    display: flex;
    align-items: center;
    height: var(--bo-top-h);
    padding: 0 24px 0 20px !important;
    line-height: normal !important;
    text-align: left;
    background: var(--bo-card);
    border-bottom: 1px solid var(--bo-frame);
}

/* decorative green swooshes of the old banner */
.topBanner .topleftBg,
.topBanner .topRightBg {
    display: none;
}

.topBanner .topLogo {
    float: none;
    margin: 0;
    width: 120px;
}

.topBanner .topTable {
    float: none !important;
    width: auto;
    margin: 0 0 0 auto;
    color: var(--bo-fg);
}

.topBanner .topTable td {
    padding: 0 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.topBanner .topTable img {
    display: block;
    opacity: 0.55;
}

.topBanner .topUserName {
    font-weight: 500;
}

.topBanner .topRightSpan {
    float: none;
    width: auto;
    margin: 0 0 0 8px;
    padding: 0;
}

.topBanner a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    color: var(--bo-fg);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.topBanner a:hover {
    border-color: var(--bo-primary);
    color: var(--bo-primary-hover);
    background: var(--bo-primary-lighter);
    text-decoration: none;
}

/* ---- footer: hidden. It only carried the copyright line and cost a row of height
   plus one more frame line on every page. The rest of the rule is kept so the bar
   comes back intact if display is restored. ---- */
.foot {
    display: none;
    height: var(--bo-foot-h);
    line-height: var(--bo-foot-h);
    background: var(--bo-card);
    border-top: 1px solid var(--bo-frame);
    font-size: 12px;
    color: var(--bo-muted-fg);
}

.foot .sec_menu {
    border: 0;
    background: transparent;
}

.foot b {
    font-weight: normal;
}

.foot a {
    color: var(--bo-muted-fg);
    text-decoration: none;
}

/* ---- middle area follows the new bar heights ---- */
.divMiddle {
    top: var(--bo-top-h);
    bottom: var(--bo-foot-h);
}

/* ---------------------------------------------------------------- left menu */

#left {
    height: calc(100vh - var(--bo-top-h) - var(--bo-foot-h));
    background: var(--bo-card);
    border-right: 1px solid var(--bo-frame);
}

#left .lefttop {
    margin: 0;
    padding: 14px 16px 10px;
    background: transparent;
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: 0.02em;
}

#left .lefttop span,
#left .lefttop div {
    color: inherit;
}

#left .lefttop a {
    color: var(--bo-primary-hover);
    text-decoration: none;
}

#left .leftmiddle {
    margin-top: 0;
    padding: 0 8px 16px;
}

#left .treeview {
    background: transparent;
}

#left .treeview td {
    padding: 0;
    font-size: 13px;
    line-height: 18px;
}

#left .treeview a {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--bo-radius-sm);
    color: var(--bo-fg);
    text-decoration: none;
}

#left .treeview a:hover {
    background: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
    text-decoration: none;
}

/* the expand / collapse arrow is its own link: no pill, and the red arrow image
   is toned down to a neutral grey */
#left .treeview a:has(> img) {
    padding: 3px 2px;
    background: transparent;
}

#left .treeview img {
    -webkit-filter: grayscale(1) opacity(0.55);
    filter: grayscale(1) opacity(0.55);
    vertical-align: middle;
}

#left .treeview .selectedNode,
#left .treeview a.selectedNode {
    background: var(--bo-primary-lighter) !important;
    color: var(--bo-primary) !important;
    font-weight: 600;
}

#leftFoldBtn {
    top: 10px;
    margin: 10px 10px 0 4px;
    width: 24px;
    height: 24px;
    line-height: 21px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    color: var(--bo-muted-fg);
    font-weight: normal;
}

#leftFoldBtn:hover {
    background: var(--bo-primary-lighter);
    border-color: var(--bo-primary);
    color: var(--bo-primary-hover);
}

#leftUnfoldBar {
    background: var(--bo-card);
    border-right: 0;
    color: var(--bo-muted-fg);
}

#leftUnfoldBar:hover {
    background: var(--bo-primary-lighter);
}

#leftUnfoldBar span {
    margin-top: 10px;
    border: 1px solid var(--bo-primary);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-primary);
    font-weight: normal;
}

#leftUnfoldBar:hover span {
    background: var(--bo-primary-hover);
}

#leftUnfoldBar:after {
    color: var(--bo-primary-hover);
}

/* ---------------------------------------------------------------- content column */

#right {
    background: var(--bo-bg);
    text-align: left;
}

/* page title strip: plain text on the page background, like the Gen3 page header */
#right .righttop {
    margin: 0;
    padding: 16px 24px 0;
    background: transparent;
    color: var(--bo-fg);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    min-height: 22px;
}

#right .righttop a.tooltip {
    color: var(--bo-primary-hover) !important;
}

#right .righttop font {
    color: var(--bo-muted-fg) !important;
    font-weight: 500;
}

/* the page body sits on a white card; flow-root keeps legacy floats inside it and
   fit-content lets the card grow with pages that are wider than the column */
#right .rightmiddle {
    display: flow-root;
    margin: 12px 24px 24px;
    padding: 16px;
    min-width: -webkit-fit-content;
    min-width: fit-content;
    background: var(--bo-card);
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-card-shadow);
}

/* ---------------------------------------------------------------- typography helpers */

.divTitle,
.titleTop,
.titleGreenFont,
.popupTitle,
.divTitleNew span {
    color: var(--bo-fg);
}

.divTitle {
    padding: 2px 0 8px;
    border-bottom: 1px solid var(--bo-input);
    font-size: 15px;
    font-weight: 600;
}

.titleDiv {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    overflow: hidden;
}

.titleTop {
    background: var(--bo-muted);
    border-bottom: 1px solid var(--bo-border);
}

.divNewTitle {
    border-top-color: var(--bo-border);
}

.divMsg {
    color: var(--bo-success-text);
}

.linkNew,
.highlightFont {
    color: var(--bo-info-text);
}

.contentFont {
    color: var(--bo-muted-fg);
}

.lineVertical {
    background: var(--bo-input);
}

hr {
    color: var(--bo-input);
    background: var(--bo-input);
}

fieldset,
.fieldsetNew {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
}

legend {
    padding: 0 6px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- form controls */

/* :not(.bo2 *) everywhere below: .bo2 pages bring their own input styles, and a
   min-height / line-height from here mixed into them misaligns their toolbars. */

:where(#right, .boPopup, .boStandalone) input[type="text"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="password"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="number"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="email"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="tel"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="search"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="date"]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) select:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) textarea:not(.bo2 *) {
    box-sizing: border-box;
    min-height: 28px;
    padding: 3px 6px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-field);
    color: var(--bo-fg);
    font-size: 13px;
    line-height: 18px;
    outline: none;
}

:where(#right, .boPopup, .boStandalone) select:not(.bo2 *) {
    padding-right: 4px;
}

:where(#right, .boPopup, .boStandalone) select[multiple]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) select[size]:not(.bo2 *) {
    padding: 2px;
}

:where(#right, .boPopup, .boStandalone) input[type="text"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="password"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="number"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="email"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="tel"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="search"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[type="date"]:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) select:focus:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) textarea:focus:not(.bo2 *) {
    border-color: var(--bo-primary);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

:where(#right, .boPopup, .boStandalone) input[disabled]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) select[disabled]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) textarea[disabled]:not(.bo2 *),
:where(#right, .boPopup, .boStandalone) input[readonly]:not(.bo2 *) {
    background: var(--bo-muted);
    color: var(--bo-hint);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--bo-primary);
}

/* ---------------------------------------------------------------- buttons */

/* default = outline button (Gen3 "outline" variant).

   Applied ONLY to buttons a page left completely unstyled:
   - no class attribute: a class (.bo2-btn, .st-btn, red "Go Offline" ...) comes with
     its own padding / line-height, and mixing a fixed height from here into it is
     what pushed the label off centre on VivaMerchantManage and friends;
   - not inside .bo2, whose unclassed buttons are styled through descendant rules;
   - not the zero-height helper buttons the masters and some pages keep in the DOM
     as the form's default button (style="height:0"), which a border would reveal;
   - not buttons that draw themselves with an inline background or border, e.g. the
     15px icon buttons in grid cells (WebOrderInfo Details / Process): padding from
     here widened them and the icon image tiled across the box.
   The size comes from padding + line-height, never from height, so a button that
   carries its own inline padding or height still centres its label.
   Everything sits inside :where(), i.e. no specificity. */
:where(:is(#right, .boPopup, .boStandalone) :is(input[type="submit"], input[type="button"], input[type="reset"], button):not([class]):not(.bo2 *):not([style*="background" i]):not([style*="border" i]):not([style*="height:0" i]):not([style*="height: 0" i])) {
    box-sizing: border-box;
    padding: 5px 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-card);
    color: var(--bo-fg);
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    cursor: pointer;
}

:where(:is(#right, .boPopup, .boStandalone) :is(input[type="submit"], input[type="button"], input[type="reset"], button):not([class]):not(.bo2 *):not([style*="background" i]):not([style*="border" i]):hover) {
    border-color: var(--bo-primary);
    background-color: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
}

/* the stock legacy button class: fixed 80x23 with a gradient image */
.buttonstyle {
    box-sizing: border-box;
    width: auto;
    min-width: 80px;
    height: 28px;
    padding: 0 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-card);
    background-image: none;
    color: var(--bo-fg);
    font-size: 13px;
    font-weight: 500;
    line-height: normal;
    cursor: pointer;
}

.buttonstyle:hover {
    border-color: var(--bo-primary);
    background-color: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
}

/* primary = the old green / image buttons */
.btnBg,
.btnBgWide,
.btnBigBg {
    box-sizing: border-box;
    width: auto;
    min-width: 96px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid var(--bo-primary);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-primary);
    background-image: none;
    color: var(--bo-primary-fg);
    font-size: 13px;
    font-weight: 600;
    line-height: normal;
}

.btnBgWide {
    min-width: 150px;
}

.btnBg:hover,
.btnBgWide:hover,
.btnBigBg:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
    color: var(--bo-primary-fg);
}

/* secondary = the old grey image buttons */
.btnGreyBg,
.btnGreyBgWide,
.btnBigBgEnabled {
    box-sizing: border-box;
    width: auto;
    min-width: 96px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-secondary);
    background-image: none;
    color: var(--bo-fg);
    font-size: 13px;
    font-weight: 600;
    line-height: normal;
}

.btnGreyBgWide {
    min-width: 130px;
}

.btnBigBgEnabled {
    color: var(--bo-hint);
    cursor: default;
}

input[disabled].btnBg,
input[disabled].btnBigBg,
input[disabled].buttonstyle,
:where(:is(#right, .boPopup, .boStandalone) input[type="submit"][disabled]:not([class]):not(.bo2 *)),
:where(:is(#right, .boPopup, .boStandalone) input[type="button"][disabled]:not([class]):not(.bo2 *)) {
    opacity: 0.5;
    cursor: default;
}

/* ---------------------------------------------------------------- data grids */

/* Two ways to recognise an asp:GridView, because GridLines decides its markup:
   - GridLines="Both" (default): <table rules="all" border="1">
   - GridLines="None" (DepositConfigManage, VatConfigManage, most "config list"
     pages): no rules attribute at all, but the header cells still carry
     scope="col", which nothing hand-written in this code base uses.
   Every rule below is written for both, so the two kinds of grid look the same. */

/* PERFORMANCE - .boBigTable, read before adding a table:has(...) rule.

   A selector such as  table:has(> tbody > tr > th[scope="col"]) > tbody > tr > td
   is tested against EVERY cell of EVERY table, and on a table that does not match
   the :has() has to walk the whole table before it can say no. Once anything in
   the table changes in a way a :has() argument cares about (an inline style, a
   node), the browser restyles all the cells and repeats that walk for each one:
   the cost grows with the square of the row count. On OrderOperate (Remove Faulty
   Order) one tick of a checkbox took 0.8 s with 300 orders and 6 s with 800, which
   the shops reported as "the checkbox cannot be ticked" (EDBUG-40).

   So every table:has() selector below starts with a cheap class test that turns
   it down before the :has() runs:
   - a table rendered with hundreds of rows by a DataList / Repeater / script gets
     class="tableGridView boBigTable". It keeps the .tableGridView look and skips
     the GridView header detection and the checkbox list detection, neither of
     which it needs;
   - the checkbox / radio list rules also skip every .tableGridView, which is never
     a RadioButtonList / CheckBoxList.
   The tests sit inside :where() so no specificity changes anywhere. */

/* asp:GridView renders <table rules="all" border="1" style="border-collapse:collapse">
   with the header / row / pager colours inline. Gen3 tables are borderless with a
   hairline under every row and a muted header. */
:where(#right, .boPopup, .boStandalone) table[rules],
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]),
.tableGridView {
    border: 1px solid var(--bo-input) !important;
    border-collapse: collapse;
    background: var(--bo-card);
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > th,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > th,
.tableGridView > tbody > tr > th {
    padding: 8px 10px;
    border: 0 !important;
    border-bottom: 1px solid var(--bo-table-edge) !important;
    background: var(--bo-muted) !important;
    color: var(--bo-muted-fg) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > th a,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > th a,
.tableGridView > tbody > tr > th a {
    color: inherit !important;
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > td,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > td,
.tableGridView > tbody > tr > td {
    padding: 7px 10px;
    border: 0 !important;
    border-bottom: 1px solid var(--bo-border) !important;
    line-height: 18px;
}

.tableGridView tr {
    border: 0;
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr:hover > td,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr:hover > td,
.tableGridView > tbody > tr:hover > td {
    background-color: var(--bo-muted);
}

/* stock row / alternating row schemes -> one quiet stripe, body text colour */
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#F7F6F3" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#EFF3FB" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#f9f9f9" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#DFF9FF" i],
.tableGridView tr:nth-child(odd),
.tableGridView .AlternatingRow,
.gdvAlternatingRow {
    background-color: var(--bo-row-alt) !important;
}

:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="color:#333333" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="color:#284775" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="color:#003399" i] {
    color: var(--bo-fg) !important;
}

/* stock selected / edit row schemes */
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#E2DED6" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#009999" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#D1DDF1" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#999999" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#2461BF" i],
.tableGridView .SelectedRow,
.tableGridView .EditRow {
    background-color: var(--bo-primary-lighter) !important;
    color: var(--bo-fg) !important;
    font-weight: normal !important;
}

/* stock pager / footer schemes */
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#284775" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#a1aede" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#99CCCC" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#5D7B9D" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#507CD1" i],
:where(#right, .boPopup, .boStandalone) table > tbody > tr[style*="background-color:#1C5E55" i],
.tableGridView .tablePageFoot td {
    background-color: var(--bo-muted) !important;
    color: var(--bo-muted-fg) !important;
}

/* pager: page numbers live in a nested table */
:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > td > table td,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > td > table td {
    padding: 2px 6px;
    border: 0;
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > td > table td a,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > td > table td a {
    color: var(--bo-primary-hover);
    text-decoration: none;
}

:where(#right, .boPopup, .boStandalone) table[rules] > tbody > tr > td > table td span,
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) > tbody > tr > td > table td span {
    color: var(--bo-fg);
    font-weight: 600;
}

/* other legacy table flavours */
.generaltable,
.generalreporttable,
.CopDishInShoptable,
.addupdateshoptable,
.changeaddtable,
.welcomeinfotable {
    border-color: var(--bo-input);
}

.generaltable tr td,
.CopDishInShoptable tr td {
    border: 1px solid var(--bo-border);
}

.generalreporttable tr td {
    border-bottom: 1px solid var(--bo-border);
}

.welcomeinfotable tr th {
    background: var(--bo-muted);
    color: var(--bo-fg);
}

.tableNew tr td,
.newtable td,
.changeaddtable tr td,
.changeaddtable tr th {
    border-color: var(--bo-input);
}

.tdGreay {
    background-color: var(--bo-muted);
}

.orderdetailscenterNew,
.popupDivNew,
.dataListDefault {
    border-color: var(--bo-input);
    border-radius: var(--bo-radius);
}

/* ---------------------------------------------------------------- dialogs, tabs */

.ui-widget {
    font-family: var(--bo-font) !important;
    font-size: 13px !important;
}

.ui-dialog.ui-widget-content,
.ui-dialog {
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--bo-radius) !important;
    box-shadow: var(--bo-modal-shadow);
    overflow: hidden;
}

.ui-dialog .ui-dialog-titlebar,
.ui-widget-header {
    padding: 12px 16px !important;
    border-radius: 0 !important;
    background-color: var(--bo-card) !important;
    border-bottom: 1px solid var(--bo-border) !important;
    color: var(--bo-fg) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.ui-dialog .ui-dialog-content.ui-widget-content {
    border: 0 !important;
}

.ui-widget-overlay {
    background-color: #000000 !important;
    opacity: 0.4 !important;
}

.modalBackground {
    background-color: #000000;
    opacity: 0.4;
}

.modalPopup {
    border: 0;
    border-radius: var(--bo-radius);
    background-color: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
}

.ajax__tab_Default .ajax__tab_tab {
    border-color: var(--bo-input);
    border-bottom-color: var(--bo-primary);
    background-color: var(--bo-muted);
}

.ajax__tab_Default .ajax__tab_active .ajax__tab_tab,
.ajax__tab_Default .ajax__tab_hover .ajax__tab_tab {
    border-color: var(--bo-primary);
    color: var(--bo-primary-hover);
}

.ajax__tab_Default .ajax__tab_active .ajax__tab_tab {
    border-bottom-color: var(--bo-card);
}

.ajax__tab_Default .ajax__tab_hover .ajax__tab_tab span,
.ajax__tab_Default .ajax__tab_active .ajax__tab_tab span {
    color: var(--bo-primary-hover);
}

.ajax__tab_Default .ajax__tab_body {
    border-top-color: var(--bo-primary);
}

a.tooltip:hover div {
    border: 0;
    border-radius: var(--bo-radius-sm);
    background-color: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
    color: var(--bo-fg);
    font-weight: normal;
}

/* ---------------------------------------------------------------- .bo2 pages */

/* Viva / UpdateManage / ShopConsole are built on the .bo2 variables: repoint the
   green family to the Gen3 orange instead of restyling their components.
   "html" lifts the specificity above the page's own .bo2{} block, which is linked
   after this file. */
html .bo2 {
    --green: #f57c00;
    --green-dark: #e65100;
    --green-border: #e65100;
    --link: #1565c0;
    --text: #212121;
    --text2: #757575;
    /* surfaces and lines follow the skin tokens: these pages had their own literal
       whites and light greys, which neither dimmed nor kept their grid lines visible */
    --bg: var(--bo-bg);
    --alt: var(--bo-row-alt);
    --bd: var(--bo-input);
    --bd-light: var(--bo-border);
    --font: var(--bo-font);
}

/* the shared .bo2 grid header is a solid bar in the brand colour; Gen3 grids use a
   muted header, same as the GridView rules above */
html .bo2 .bo2-table th {
    border: 0;
    border-bottom: 1px solid var(--bo-table-edge);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
}

html .bo2 .bo2-table td {
    border: 0;
    border-bottom: 1px solid var(--bo-border);
}

html .bo2 .bo2-table {
    border: 1px solid var(--bo-input);
}

/* .bo2 controls keep their own size and padding (see the buttons section); the
   only thing borrowed from Gen3 is the corner radius, which cannot move a label.
   :not(.dlg__x) is there for the specificity as much as for the close button:
   the .bo2 component rules are two classes deep and would otherwise win. */
html .bo2 :is(button, select, textarea, input[type="text"], input[type="number"], input[type="search"]):not(.dlg__x) {
    border-radius: var(--bo-radius-sm);
}

/* ---------------------------------------------------------------- filter / form panel */

/* .orderdetailstop + .orderdetailscenter + .orderdetailsbottom is the legacy
   "rounded box": a fixed 800px column whose corners are two background images.
   About thirty pages use it, mostly as the search box above a grid
   (WebOrderInfo, SearchWebOrder, SmsHistory, the withdraw / top-up pages ...).
   Here it becomes a Gen3 filter panel: muted surface, hairline border, real
   radius, and it shrinks or grows with its content instead of staying 800px. */
.orderdetailstop,
.orderdetailsbottom,
.orderdetailstopNew,
.orderdetailsbottomNew {
    display: none;
}

.orderdetailscenter,
.orderdetailscenterNew {
    box-sizing: border-box;
    width: -webkit-fit-content;
    width: fit-content;
    min-width: 560px;
    max-width: 100%;
    margin-top: 0;
    padding: 14px 18px 16px;
    /* told apart by a lighter fill than the card it sits on (a darker fill made it
       the heaviest block on the page); the outline is only a hairline */
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    background: var(--bo-field);
}

/* panel heading: a quiet caption, not a ruled title bar */
.orderdetailscenter > .divTitle,
.orderdetailscenterNew > .divTitle {
    margin: 0 0 6px;
    padding: 0;
    border-bottom: 0;
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* label / control pairs are laid out with a plain table: give the cells air and
   mute the labels so the controls carry the row */
.orderdetailscenter table td,
.orderdetailscenterNew table td {
    padding: 4px 6px 4px 0;
    color: var(--bo-muted-fg);
    vertical-align: middle;
}

.orderdetailscenter table td:nth-child(odd),
.orderdetailscenterNew table td:nth-child(odd) {
    padding-left: 14px;
    white-space: nowrap;
}

.orderdetailscenter table td:first-child,
.orderdetailscenterNew table td:first-child {
    padding-left: 0;
}

/* the action row (a single cell spanning the table): buttons to the right, and
   the panel's main button becomes the primary one */
.orderdetailscenter table td[colspan][align="center"],
.orderdetailscenterNew table td[colspan][align="center"] {
    padding: 10px 0 0;
    text-align: right;
}

.orderdetailscenter .buttonstyle,
.orderdetailscenterNew .buttonstyle {
    min-width: 96px;
    height: 30px;
    margin: 0 0 0 8px;
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.orderdetailscenter .buttonstyle:hover,
.orderdetailscenterNew .buttonstyle:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
    color: var(--bo-primary-fg);
}

/* ---------------------------------------------------------------- links, iframe dialogs */

/* plain content links (pager "Next / Last", inline actions) */
:where(:is(#right, .boPopup, .boStandalone) a:not([class]):not(.bo2 *)) {
    color: var(--bo-info-text);
}

/* A dialog whose body is an <iframe> (WebOrderInfo detail / process ...): the page
   gives the iframe a fixed pixel size a little smaller than the dialog, so as soon
   as the title bar height changes the dialog body scrolls AND the iframe scrolls.
   Let the iframe fill the dialog body and be the only scroll container. */
.ui-dialog .ui-dialog-content:has(> iframe) {
    padding: 0 !important;
    overflow: hidden !important;
}

.ui-dialog .ui-dialog-content > iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: 0;
}

/* ---------------------------------------------------------------- account menu (shop master) */

/* Epos_Shop/MasterPage builds "<shop name> / Account No:<id>" plus a list of
   account links (.shopRegisterInfo) that used to unfold inline as a grey block and
   push the whole menu down. It is now a floating menu anchored under the header:
   the tree below does not move. Opening / closing stays in the master's script. */
#left .lefttop {
    position: relative;
}

#left .lefttop a.linkNew {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px 2px 0;
    font-size: 13px;
    font-weight: 600;
}

/* caret: tells the user the account number opens something */
#left .lefttop a.linkNew:after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom-width: 0;
    vertical-align: middle;
}

#left .shopRegisterInfo {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    z-index: 20;
    margin-top: -4px;
    padding: 6px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
    letter-spacing: 0;
}

#left .shopRegisterInfo a {
    display: block;
    padding: 7px 10px;
    border-radius: var(--bo-radius-sm);
    color: var(--bo-fg);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    text-decoration: none;
}

#left .shopRegisterInfo a:hover {
    background: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
}

/* the links are separated by <br/> in the generated markup */
#left .shopRegisterInfo br {
    display: none;
}

/* ---------------------------------------------------------------- report pages */

/* ajaxToolkit tab body (Day / Week / Month ... on the report pages): once the page
   background turned white the body lost its outline and ran into what follows */
.ajax__tab_Default .ajax__tab_body {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--bo-input);
    border-top: 1px solid var(--bo-primary);
    border-radius: 0 0 var(--bo-radius) var(--bo-radius);
}

/* Microsoft ReportViewer toolbar: its page number / find boxes and zoom / export
   selects are sized for a 24px strip and carry an inline 8pt Verdana font, which is
   the only stable way to recognise them. Give them back their compact size so they
   stop overflowing the strip. */
#right input[type="text"][style*="font-size:8pt" i],
#right input[type="text"][style*="font-size: 8pt" i],
#right select[style*="font-size:8pt" i],
#right select[style*="font-size: 8pt" i] {
    min-height: 0;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: normal;
    box-shadow: none;
}

/* ---------------------------------------------------------------- radio / checkbox lists */

/* HOW THE LIST IS RECOGNISED (keep it this strict): a table with no header cells
   that has an "<input><label>" cell, and in which NO cell holds any element other
   than one input and its label. (Written as two flat :has() tests - :has() cannot
   be nested; a nested version silently invalidated this whole rule once.) An earlier, looser version
   ("some cell has a checkbox followed by a label") also matched ordinary data
   tables that carry checkboxes - the printer mapping matrix on
   PT_WinPrinterLogicPrinterMappingSet was turned into a flex row and collapsed.

   asp:RadioButtonList / CheckBoxList render a one-row <table> with an option per
   cell. When the row is wider than the page the browser squeezes the cells and
   breaks INSIDE a label ("Cash in" / "Till" on ReportView). Turn the row into a
   wrapping flex line instead: an option never breaks, whole options move to the
   next line. A vertical list (one option per row) is unaffected.
   The control writes Height / Width inline on the table; the height has to give
   way once the options take two lines. */
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)),
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) {
    display: block;
    height: auto !important;
    max-width: 100%;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody {
    display: block;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 4px 0;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    white-space: nowrap;
}

/* inside such a list the cell's flex gap does the spacing; a lone
   "<input><label>" pair in an ordinary table cell is NOT covered here on purpose,
   it gets its gap from the general radio / checkbox rule further down */
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td > input,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td > input {
    margin: 0;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td > label,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) > tbody > tr > td > label {
    margin: 0;
}

/* keep whatever follows a filter panel (pager, totals) off its bottom edge */
.orderdetailscenter,
.orderdetailscenterNew {
    margin-bottom: 12px;
}

/* Same lists in RepeatLayout="Flow": a <span> holding input, label, input, label ...
   with no cell around each pair (the report type list on ReportView). A line may
   break only BETWEEN options, never inside a label and never between a radio and
   its own label. There is no wrapper to hang that on, so: the whole span is
   nowrap, and each label ends with a normal, breakable space - the only places
   left where the line can wrap. */
:where(#right, .boPopup, .boStandalone) span:has(> input[type="radio"] + label),
:where(#right, .boPopup, .boStandalone) span:has(> input[type="checkbox"] + label) {
    /* block, not the control's inline-block: on a wide screen the options fit on
       one line and the text that follows the list ("Select start date and end
       date" on ReportView) would otherwise continue on that same line.
       !important because the control writes display:inline-block inline. */
    display: block !important;
    height: auto !important;
    margin-bottom: 6px;
    line-height: 26px;
    white-space: nowrap;
}

:where(#right, .boPopup, .boStandalone) span > input[type="radio"] + label,
:where(#right, .boPopup, .boStandalone) span > input[type="checkbox"] + label {
    margin: 0 12px 0 5px;
}

:where(#right, .boPopup, .boStandalone) span > input[type="radio"] + label:after,
:where(#right, .boPopup, .boStandalone) span > input[type="checkbox"] + label:after {
    content: " ";
    white-space: normal;
}

:where(#right, .boPopup, .boStandalone) span > input[type="radio"],
:where(#right, .boPopup, .boStandalone) span > input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

/* Buttons that carry an inline width (asp:Button Width="70px") were sized for the
   old 12px font with 2px padding; with the new padding the label no longer fits
   ("View Order" on OrderOperate). Let those buttons size to their label. */
.buttonstyle[style*="width" i] {
    width: auto !important;
}

/* ---------------------------------------------------------------- page: OrderOperate summary */

/* Epos_Shop/Report/OrderOperate.aspx, the "Date / Sales / Voided" box next to the
   day picker. It used DarkGray / #c0ffc0 / Violet cell backgrounds; the three rows
   keep their meaning with the Gen3 status tints instead:
   original = neutral, suspected faulty = destructive, current = success. */
.ooSummary {
    width: 100%;
    border: 1px solid var(--bo-input);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    font-size: 13px;
    text-align: left;
    overflow: hidden;
}

.ooSummary th {
    padding: 6px 12px;
    border-bottom: 1px solid var(--bo-input);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

/* "Sales" / "Voided" sit over their Num + Cost pair */
.ooSummary th[colspan] {
    border-bottom-color: var(--bo-border);
    border-left: 1px solid var(--bo-border);
    text-align: center;
}

.ooSummary td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bo-border);
    line-height: 18px;
}

.ooSummary tbody tr:last-child td {
    border-bottom: 0;
}

.ooSummary .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* left column: which business day the figures belong to */
.ooSummary td.ooDay {
    width: 150px;
    border-right: 1px solid var(--bo-border);
    border-bottom: 0;
    color: var(--bo-muted-fg);
    text-align: center;
    vertical-align: middle;
}

.ooSummary td.ooDay span,
.ooSummary td.ooDay strong {
    display: block;
}

.ooSummary td.ooDay strong {
    margin: 2px 0;
    color: var(--bo-fg);
    font-size: 16px;
    font-weight: 600;
}

.ooSummary .ooFaulty td:not(.ooDay) {
    background: #ffebee;
    color: var(--bo-destructive-text);
    font-weight: 600;
}

.ooSummary .ooCurrent td:not(.ooDay) {
    background: #e8f5e9;
    color: var(--bo-success-text);
    font-weight: 600;
}

.ooSummary tbody td {
    white-space: nowrap;
}

/* ---------------------------------------------------------------- controls inside dialogs */

/* jQuery UI moves a dialog's content to <body>, i.e. out of #right, so the form
   control rules above do not reach it (the Master Code box on BusinessReport kept
   its black default border). Same look, scoped to the dialog. */
:where(.ui-dialog) input[type="text"]:not(.bo2 *),
:where(.ui-dialog) input[type="password"]:not(.bo2 *),
:where(.ui-dialog) input[type="number"]:not(.bo2 *),
:where(.ui-dialog) select:not(.bo2 *),
:where(.ui-dialog) textarea:not(.bo2 *) {
    box-sizing: border-box;
    min-height: 28px;
    padding: 3px 6px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-field);
    color: var(--bo-fg);
    font-size: 13px;
    line-height: 18px;
    outline: none;
}

:where(.ui-dialog) input[type="text"]:focus:not(.bo2 *),
:where(.ui-dialog) input[type="password"]:focus:not(.bo2 *),
:where(.ui-dialog) input[type="number"]:focus:not(.bo2 *),
:where(.ui-dialog) select:focus:not(.bo2 *),
:where(.ui-dialog) textarea:focus:not(.bo2 *) {
    border-color: var(--bo-primary);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

/* ---------------------------------------------------------------- page: Google Partner Management */

/* GoogleFoodOrdering/GoogleShopList.aspx has its own design system scoped to
   #gfo-page (variables + component classes in the page's <style>). Same approach as
   .bo2: repoint its variables, then flatten the few components that are drawn with
   Gen2 gradients / hard borders. "html" lifts these above the page's own rules,
   which are declared after this file. */
html #gfo-page {
    --gfo-green: #f57c00;
    --gfo-green-dark: #e65100;
    --gfo-link: #1565c0;
    --gfo-red: #c62828;
    --gfo-border: var(--bo-input);
    --gfo-border-light: var(--bo-border);
    --gfo-section: var(--bo-muted);
    font-family: var(--bo-font);
    color: var(--bo-fg);
}

html #gfo-page .page-title {
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: 0;
    color: var(--bo-fg);
    font-size: 18px;
    font-weight: 600;
}

html #gfo-page .card,
html #gfo-page .stat-card,
html #gfo-page .alert,
html #gfo-page .import-bar,
html #gfo-page .link-list {
    border-radius: var(--bo-radius);
}

html #gfo-page .card {
    overflow: hidden;
}

/* The page paints its panels with literal #fff and its own border grey. Put them on
   the skin's surfaces so the page dims with the rest: panels on the field colour
   (they sit on the page card, one step lighter reads as "panel"), outlined like
   the data grids rather than like inputs. */
html #gfo-page .card,
html #gfo-page .stat-card {
    border-color: var(--bo-table-edge);
    background: var(--bo-field);
}

html #gfo-page .card__title {
    color: var(--bo-fg);
    font-weight: 600;
}

html #gfo-page .stat-card__label {
    color: var(--bo-muted-fg);
    font-weight: 500;
}

html #gfo-page .import-bar {
    border-color: var(--bo-table-edge);
    background: var(--bo-field);
}

html #gfo-page .btn,
html #gfo-page .filter-btn,
html #gfo-page .page-btn,
html #gfo-page .search-input,
html #gfo-page .form-input,
html #gfo-page .review-select,
html #gfo-page .link-card,
html #gfo-page .field-reset {
    border-radius: var(--bo-radius-sm);
}

html #gfo-page .btn {
    font-weight: 500;
}

html #gfo-page .btn--primary {
    font-weight: 600;
}

/* grey gradient buttons -> flat outline buttons */
html #gfo-page .btn--secondary,
html #gfo-page .filter-btn {
    border-color: var(--bo-input);
    background: var(--bo-card);
    color: var(--bo-fg);
}

html #gfo-page .btn--secondary:hover,
html #gfo-page .filter-btn:hover {
    border-color: var(--bo-primary);
    background: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
}

html #gfo-page .filter-btn {
    min-height: 26px;
    padding: 4px 12px;
}

html #gfo-page .filter-btn.active {
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

html #gfo-page .search-input:focus,
html #gfo-page .form-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

/* status pills */
html #gfo-page .badge {
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* grid: muted header, hairlines, no zebra */
html #gfo-page .table th {
    border: 0;
    border-bottom: 1px solid var(--bo-table-edge);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
}

html #gfo-page .table tbody tr:nth-child(even) td {
    background: var(--bo-row-alt);
}

html #gfo-page .table tbody tr:hover td {
    background: var(--bo-muted);
}

html #gfo-page .link-item.selected {
    background: var(--bo-primary-lighter);
}

html #gfo-page .modal-box {
    border: 0;
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-modal-shadow);
    overflow: hidden;
}

/* ---------------------------------------------------------------- .bo2 components */

/* The .bo2 design system (Viva, UpdateManage, ShopConsole) was recoloured through
   its variables near the top of this file. That left its component SHAPES in the
   Gen2 idiom: grey filled buttons, square boxes, coloured title bars. This block
   brings them to the Gen3 shapes. Sizes and paddings are left alone on purpose
   (see the buttons section: mixing sizes is what broke label alignment). */
html .bo2 {
    --link-red: #c62828;
}

html .bo2 h2 {
    font-weight: 600;
}

/* buttons */
html .bo2 .bo2-btn,
html .bo2 .pager button {
    border-color: var(--bo-input);
    background: var(--bo-card);
    color: var(--bo-fg);
    font-weight: 500;
}

html .bo2 .bo2-btn:hover,
html .bo2 .pager button:hover:not(:disabled) {
    border-color: var(--bo-primary);
    background: var(--bo-primary-lighter);
    color: var(--bo-primary-hover);
}

html .bo2 .bo2-btn--submit,
html .bo2 .bo2-btn--danger {
    font-weight: 600;
}

/* inputs */
html .bo2 .bo2-search {
    border-radius: var(--bo-radius-sm);
}

html .bo2 .bo2-input:focus,
html .bo2 .bo2-select:focus {
    border-color: var(--bo-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

html .bo2 .bo2-search:focus-within {
    border-color: var(--bo-primary);
}

/* KPI tiles. viva-bo2.css reserves the "selected" bar as a 3px TRANSPARENT bottom
   border, so an unselected tile had three sides and no bottom edge - with rounded
   corners it looked cut off. The tile now has a normal 1px edge all round and the
   selected bar is an inset shadow; 2px of extra bottom padding keeps the height. */
html .bo2 .bo2-kpi {
    padding-bottom: 13px;
    border: 1px solid var(--bo-table-edge);
    border-radius: var(--bo-radius);
    background: var(--bo-field);
}

html .bo2 .bo2-kpi.active {
    box-shadow: inset 0 -3px 0 var(--bo-primary-hover);
}

/* dialogs: white title bar instead of a filled one */
html .bo2 .dlg {
    border: 0;
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-modal-shadow);
    overflow: hidden;
}

html .bo2 .dlg__title {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-card);
    color: var(--bo-fg);
    font-size: 15px;
    font-weight: 600;
}

html .bo2 .dlg__x {
    color: var(--bo-muted-fg);
    font-size: 18px;
}

html .bo2 .dlg__x:hover {
    color: var(--bo-fg);
}

/* ---------------------------------------------------------------- page: ShopConsole */

/* ShopConsole/shop-console.css (sc- classes on top of .bo2). */

/* "back to list" strip: a filled bar -> a quiet breadcrumb strip */
html .bo2 .sc-backbar {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
    color: var(--bo-fg);
}

html .bo2 .sc-backbar a {
    color: var(--bo-primary-hover);
    font-weight: 600;
}

html .bo2 .sc-backbar b {
    color: var(--bo-fg);
}

/* section navigation */
html .bo2 .sc-side {
    border-color: var(--bo-input);
    border-radius: var(--bo-radius);
    overflow: hidden;
}

html .bo2 .sc-side__title {
    padding: 9px 14px;
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html .bo2 .sc-side a {
    padding: 8px 14px;
    cursor: pointer;
}

html .bo2 .sc-side a:hover {
    background: var(--bo-muted);
    text-decoration: none;
}

html .bo2 .sc-side a.active {
    background: var(--bo-primary-lighter);
    box-shadow: inset 3px 0 0 var(--bo-primary);
    color: var(--bo-primary-hover);
    font-weight: 600;
}

/* lifecycle nodes */
html .bo2 .sc-node {
    border-color: var(--bo-input);
    border-radius: var(--bo-radius);
}

html .bo2 .sc-node:hover {
    background: var(--bo-muted);
}

/* cards */
html .bo2 .sc-card {
    border-color: var(--bo-input);
}

html .bo2 .sc-card__h {
    background: var(--bo-muted);
    font-weight: 600;
}

/* union group: green framed box with a gradient header -> plain card whose
   header carries the brand tint */
html .bo2 .sc-union {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
}

html .bo2 .sc-union__h {
    border-bottom: 1px solid var(--bo-primary-light);
    background: var(--bo-primary-lighter);
    color: var(--bo-fg);
    font-weight: 600;
}

html .bo2 .sc-union__h .bo2-badge {
    border-color: var(--bo-primary-light);
    background: var(--bo-card);
    color: var(--bo-primary-hover);
}

/* greenish neutral surfaces -> the Gen3 muted surface */
html .bo2 .sc-precheck,
html .bo2 .sc-verify,
html .bo2 .sc-note,
html .bo2 .sc-dz,
html .bo2 .sc-hours th {
    background: var(--bo-muted);
}

html .bo2 .sc-hours th {
    color: var(--bo-muted-fg);
    font-weight: 600;
}

html .bo2 .sc-hours input[type="text"] {
    border-radius: 4px;
}

/* green hover / selected tints -> the brand tint */
html .bo2 .sc-dz:hover,
html .bo2 .sc-dz.dz-over,
html .bo2 .sc-dzpaste:hover,
html .bo2 .sc-mgres > div:hover,
html .bo2 .sc-mgpick,
html .bo2 .sc-sug li:hover {
    background: var(--bo-primary-lighter);
}

html .bo2 .sc-mgres > div.none:hover {
    background: var(--bo-card);
}

html .bo2 .sc-ots {
    border-color: var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
}

html .bo2 .bo2-kpi--click:hover {
    background: var(--bo-muted);
}

html .bo2 .bo2-kpi.active {
    background: var(--bo-primary-lighter);
}

/* the union header was a dark bar, so the site URL in it is written inline in white */
html .bo2 .sc-union__h .hint {
    color: var(--bo-muted-fg) !important;
}

/* .bo2 text inputs are often written without a type attribute */
html .bo2 input.bo2-input,
html .bo2 input:not([type]):not(.dlg__x) {
    border-radius: var(--bo-radius-sm);
}

/* ---------------------------------------------------------------- tinted default buttons */

/* White outline buttons on a white card were hard to tell from plain text boxes.
   Every "ordinary" button now carries a light brand tint (a tonal button): still
   clearly below the solid primary button, but readable as a button at a glance.
   One place to tune it: the three variables below. */
:root {
    --bo-btn-bg: #fff3e0;
    --bo-btn-border: #ffe0b2;
    --bo-btn-fg: #e65100;
    --bo-btn-bg-hover: #ffe0b2;
}

:where(:is(#right, .boPopup, .boStandalone) :is(input[type="submit"], input[type="button"], input[type="reset"], button):not([class]):not(.bo2 *):not([style*="background" i]):not([style*="border" i]):not([style*="height:0" i]):not([style*="height: 0" i])),
.buttonstyle,
html .bo2 .bo2-btn,
html #gfo-page .btn--secondary {
    border-color: var(--bo-btn-border);
    background: var(--bo-btn-bg);
    color: var(--bo-btn-fg);
}

:where(:is(#right, .boPopup, .boStandalone) :is(input[type="submit"], input[type="button"], input[type="reset"], button):not([class]):not(.bo2 *):not([style*="background" i]):not([style*="border" i]):hover),
.buttonstyle:hover,
html .bo2 .bo2-btn:hover,
html #gfo-page .btn--secondary:hover {
    border-color: var(--bo-primary);
    background: var(--bo-btn-bg-hover);
    color: var(--bo-btn-fg);
}

/* chips / pager / header actions are controls rather than actions: a neutral grey
   tint keeps them visible without competing with the brand-tinted buttons */
html #gfo-page .filter-btn,
html #gfo-page .page-btn,
html .bo2 .pager button,
.topBanner a,
#leftFoldBtn {
    /* --bo-muted, not --bo-bg: the page background was pulled down for the dimmed
       palette and made these chips the darkest thing in the card */
    background: var(--bo-muted);
}

html #gfo-page .filter-btn.active,
html #gfo-page .page-btn.active {
    background: var(--bo-primary);
}

/* a second, quieter button inside a filter panel (e.g. "All" next to "Search") */
.orderdetailscenter .buttonstyle.btnPlain,
.orderdetailscenterNew .buttonstyle.btnPlain {
    border-color: var(--bo-btn-border);
    background: var(--bo-btn-bg);
    color: var(--bo-btn-fg);
}

.orderdetailscenter .buttonstyle.btnPlain:hover,
.orderdetailscenterNew .buttonstyle.btnPlain:hover {
    border-color: var(--bo-primary);
    background-color: var(--bo-btn-bg-hover);
    color: var(--bo-btn-fg);
}

.orderdetailscenter table td strong {
    font-weight: 500;
}

/* ---------------------------------------------------------------- page: SelectShop */

/* SelectShop.aspx: every shop is a card (picture / name + facts / status + actions)
   instead of a 950px table block closed by a grey rule. */
/* The page follows the width of the content column: the search fields wrap, the
   shops flow into as many columns as fit, and a card that gets narrow drops its
   status / actions under the facts. Nothing here has a fixed width. */
.orderdetailscenter.ssSearch {
    min-width: 0;
}

.ssSearch__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.ssSearch__field {
    display: flex;
    flex: 1 1 220px;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--bo-muted-fg);
    font-weight: 500;
    white-space: nowrap;
}

.ssSearch__field input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.ssSearch__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
}

.ssSearch__actions .buttonstyle {
    margin: 0;
}

/* the DataList renders in Flow layout: one <span> per shop with a <br> between */
.ssList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
    gap: 10px;
}

.ssList > br {
    display: none;
}

.ssList > span {
    display: block;
    min-width: 0;
    container-type: inline-size;
}

.ssCard {
    display: flex;
    align-items: stretch;
    gap: 16px;
    box-sizing: border-box;
    height: 100%;
    padding: 14px 16px;
    /* a lighter fill than the card it sits on sets each shop apart; the outline is
       only a hairline */
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    background: var(--bo-field);
    text-align: left;
}

.ssCard:hover {
    border-color: var(--bo-primary-light);
    box-shadow: var(--bo-card-shadow);
}

.ssCard__img {
    flex: 0 0 112px;
    width: 112px;
    height: 84px;
    border-radius: var(--bo-radius-sm);
    background: var(--bo-muted);
    overflow: hidden;
}

.ssCard__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssCard__body {
    flex: 1;
    min-width: 0;
}

.ssCard__title {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
}

.ssCard__no {
    display: inline-block;
    margin-left: 8px;
    /* plain text, no pill: a grey fill made the account number read as disabled */
    color: var(--bo-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}

.ssCard__row {
    display: flex;
    gap: 8px;
    line-height: 20px;
    overflow-wrap: anywhere;
}

.ssCard__row > span:first-child {
    flex: 0 0 70px;
    color: var(--bo-muted-fg);
}

.ssCard__side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.ssCard__status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bo-muted-fg);
    font-size: 12px;
    white-space: nowrap;
}

/* Online / Offline used to be two PNGs with a white background baked in, which
   showed as a white box once the card stopped being white. Text follows the card. */
.ssCard__state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.ssCard__state:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.ssCard__state--on {
    color: var(--bo-success-text);
}

.ssCard__state--off {
    color: var(--bo-destructive-text);
}

/* Account/AccountControl.aspx: balance overdue, POS not locked yet */
.ssCard__state--warn {
    color: var(--bo-primary-hover);
}

.ssCard__actions {
    white-space: nowrap;
}

.ssCard__actions .buttonstyle {
    margin: 0 0 0 8px;
}

/* "Enter" is what the page is for */
.ssCard__actions .buttonstyle.ssCard__enter {
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.ssCard__actions .buttonstyle.ssCard__enter:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
}

/* narrow card: status and actions move to a row of their own under the facts */
@container (max-width: 620px) {
    .ssCard {
        flex-wrap: wrap;
    }

    .ssCard__body {
        flex: 1 1 0;
    }

    .ssCard__side {
        flex: 1 0 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    /* keeps the buttons on the right edge when they wrap under the status */
    .ssCard__actions {
        margin-left: auto;
    }
}

@container (max-width: 380px) {
    .ssCard__img {
        flex-basis: 72px;
        width: 72px;
        height: 54px;
    }
}

/* a grid usually follows a "New" button or a filter row directly */
:where(#right, .boPopup, .boStandalone) table[rules],
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]) {
    margin-top: 10px;
}

/* ---------------------------------------------------------------- menu editor (NewMenu) */

/* Epos_Shop/NewMenu/style/NewMenu.css: MenuManager, PizzaManager, CommentManager.
   These pages are spreadsheet-style editors: script/tableForm.js builds .dataTable
   grids with pixel column widths and edits cells in place. So cell padding and
   widths are NOT touched here (that would break the column maths); only the
   surfaces change: image gradients -> flat muted headers, grey grid -> hairlines,
   grey / lime state colours -> the brand tints.
   NewMenu.css is linked from the page body, i.e. after this file, so every
   selector carries "html body" to outrank it. */
html body .titleHead,
html body .continerHead,
html body .continerHeadLeft,
html body .continerHeadCenter,
html body .continerHeadRight,
html body .containerFoot {
    background: var(--bo-muted);
    color: var(--bo-fg);
    font-weight: 600;
}

html body .titleHead {
    height: 38px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    line-height: 36px;
}

/* the "cuttle" / "min" buttons float inside the 38px title strip */
html body .titleHead input[type="button"] {
    margin: 5px 0 0 6px !important;
    padding: 3px 10px;
    font-size: 12px;
}

html body #menuControl,
html body #dishClassControl,
html body #dishControl {
    padding: 8px 0 4px;
    line-height: 22px;
}

html body #menuControl input[type="button"],
html body #dishClassControl input[type="button"],
html body #dishControl input[type="button"] {
    margin: 4px 4px 2px 0;
}

/* collapsed column strip ("M E N U"): inline background:gray */
html body #menuHideContext,
html body #dishClassHideContext,
html body #dishHideContext {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted) !important;
    color: var(--bo-muted-fg);
    font-weight: 600;
    line-height: 20px;
    padding-top: 10px;
}

html body .dataTable {
    border: 1px solid var(--bo-input);
    background: var(--bo-card);
}

/* Rounded tables. The grids keep border-collapse: collapse (their cell rules
   depend on it), and a collapsed table ignores border-radius on its own border.
   So the table's own border is hidden and redrawn as a 1px box-shadow ring, which
   does follow the radius, and overflow: hidden trims the square corners of the
   header and first / last cells. Only paint changes: sizes and cell borders stay. */
html body .dataTable,
:where(#right, .boPopup, .boStandalone) table[rules],
:where(#right, .boPopup, .boStandalone) table:not(:where(.boBigTable)):has(> tbody > tr > th[scope="col"]),
.tableGridView,
html .bo2 .bo2-table {
    border-style: hidden !important;
    border-radius: var(--bo-radius);
    box-shadow: 0 0 0 1px var(--bo-table-edge);
    overflow: hidden;
    /* the ring is drawn OUTSIDE the table box, so a table that sits flush against a
       scrolling / clipping parent lost an edge (left / right in the menu editor,
       the bottom one in the list pages). One pixel of margin keeps the ring inside
       the parent. No margin-top here: several of these tables set their own. */
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 1px;
    max-width: calc(100% - 2px);
}

/* tr.row-warn marks a row that needs attention (ShopConsole: the shop has an
   alert). In viva-bo2.css the zebra rule for even rows is more specific than the
   row-warn rule, so every second flagged row silently lost its tint and the list
   looked striped orange / white. A flagged row is tinted whatever its position. */
html .bo2 .bo2-table tbody tr.row-warn td {
    background: #fff6e9;
}

/* the .bo2 grids are width: 100% too (viva-bo2.css / update-manage.css) */
html .bo2 .bo2-table {
    width: calc(100% - 2px);
    background: var(--bo-field);
}

/* NewMenu.css gives .dataTable width: 100%, which with the margins would overflow */
html body .dataTable {
    width: calc(100% - 2px);
}

html body .dataTable th {
    border: 1px solid var(--bo-table-edge);
    border-bottom: 1px solid var(--bo-table-edge);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-weight: 600;
}

html body .dataTable td {
    /* was a literal #ececec, which all but vanished once the card stopped being white */
    border: 1px solid var(--bo-border);
}

/* in-cell editors stay borderless: the cell is the box */
:is(#right, .boPopup, .boStandalone) .dataTable input[type="text"],
:is(#right, .boPopup, .boStandalone) .dataTable select {
    min-height: 0;
    padding: 1px 2px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    box-shadow: none;
    line-height: normal;
}

:is(#right, .boPopup, .boStandalone) .dataTable input[type="text"]:focus,
:is(#right, .boPopup, .boStandalone) .dataTable select:focus {
    outline: 2px solid var(--bo-primary);
    outline-offset: -1px;
    background: var(--bo-field);
}

/* row / cell states */
html body .selectTd,
html body .selectTxt {
    background: var(--bo-primary-lighter) !important;
}

html body .nowSelectTxt {
    background: var(--bo-primary-light) !important;
}

html body .editControl {
    background: #fff8e1 !important;
}

html body .deleteTd,
html body .deleteTd input {
    background: var(--bo-secondary) !important;
    color: var(--bo-hint);
}

html body .errorTd {
    background: #ffcdd2 !important;
}

html body .subDish td {
    background: var(--bo-muted);
}

html body .partOfBundleDish td {
    background: #f1f6fb;
}

/* confirm box drawn by script/common.js */
html body .confirmOverlay {
    background-color: rgba(0, 0, 0, 0.4);
}

html body .confirmBox {
    border: 0;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
    overflow: hidden;
}

html body .confirmBox h1 {
    padding: 12px 20px;
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-card);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

html body .confirmBox p {
    padding: 14px 20px 0;
}

html body .confirmBox .btn {
    border: 1px solid var(--bo-btn-border);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-btn-bg);
    color: var(--bo-btn-fg);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

html body .confirmBox .btn.blue {
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

html body .batchObject {
    border-bottom-color: var(--bo-input);
}

html body .selectObject {
    color: var(--bo-primary-hover);
}

/* ---------------------------------------------------------------- shared page helpers */

/* Helper classes for pages whose markup was tidied for the new look. They live
   here (not in a page stylesheet) so the next page can reuse them. */

/* the main action among several .buttonstyle buttons */
.buttonstyle.btnMain {
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.buttonstyle.btnMain:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
    color: var(--bo-primary-fg);
}

/* a row of actions above a grid */
.pageToolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    text-align: left;
}

.pageToolbar .buttonstyle {
    margin: 0;
}

/* a grid that should use the room it has instead of shrinking to its content */
:where(#right, .boPopup, .boStandalone) table.gridWide {
    width: 100%;
    max-width: 880px;
}

/* dual list ("move items between two lists"): DishClassArea */
.dualList {
    max-width: 640px;
    text-align: left;
}

.dualList__menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--bo-muted-fg);
}

.dualList__menu select {
    min-width: 220px;
}

.dualList__body {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.dualList__col {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
}

.dualList__cap {
    margin-bottom: 6px;
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#right .dualList__col select {
    width: 100%;
    height: 280px;
    padding: 6px;
    border-radius: var(--bo-radius);
}

.dualList__col option {
    padding: 5px 8px;
    border-radius: 4px;
}

.dualList__mid {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-top: 22px;
}

.dualList__mid .buttonstyle {
    min-width: 48px;
    margin: 0;
    padding: 0 10px;
}

.dualList__foot {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.dualList__foot .buttonstyle {
    margin: 0;
}

/* ---------------------------------------------------------------- settings sections */

/* A page made of stacked "title strip + a few controls + a button" boxes
   (Epos_Shop/Dish/MenuManage.aspx). Each box is a card with a muted header. */
.setCard {
    max-width: 880px;
    margin: 0 0 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    text-align: left;
    overflow: hidden;
}

.setCard__h {
    padding: 9px 16px;
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-muted);
    color: var(--bo-fg);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.setCard__b {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 14px 16px;
}

.setCard__b .buttonstyle,
.setCard__foot .buttonstyle {
    margin: 0;
}

.setCard__field {
    flex: 0 1 300px;
    color: var(--bo-muted-fg);
    line-height: 22px;
}

.setCard__field select {
    margin-left: 6px;
}

.setCard__foot {
    padding: 0 16px 14px;
}

.setCard__hint {
    padding: 0 16px 14px;
    color: var(--bo-hint);
    font-size: 12px;
}

.setCard__pic {
    display: block;
    width: 120px;
    height: 70px;
    margin-top: 6px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    object-fit: cover;
    cursor: pointer;
}

.setCard__pic:hover {
    border-color: var(--bo-primary);
}

/* ---------------------------------------------------------------- legacy "rounded box" (shop*) */

/* .shoptop / .shopcenter / .shopbottom + .RoundedCorner: a 500px box whose corners
   are background images, with a title built from nested <b> slivers
   (WebsiteAndMenu, CompanyDetails, ShopManange, ServicesContract). Same treatment
   as the .orderdetails* box: one real card, real radius. */
.shoptop,
.shopbottom {
    display: none;
}

.shopcenter {
    box-sizing: border-box;
    width: auto;
    min-width: 500px;
    max-width: 640px;
    margin: 0 0 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    overflow: hidden;
}

/* the title carries inline width / margin / background / font-size */
.RoundedCorner {
    width: auto !important;
    margin: 0 !important;
    padding: 6px 10px;
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-muted) !important;
    color: var(--bo-fg) !important;
    font-size: 14px !important;
    font-weight: 600;
}

.RoundedCorner b.rtop,
.RoundedCorner b.rbottom {
    display: none;
}

/* one .shopmanagetable per row on WebsiteAndMenu: keep the rows close together */
.shopmanagetable {
    margin-top: 2px;
    margin-bottom: 2px;
    color: var(--bo-fg);
    font-size: 13px;
}

.shopmanagetable tr td {
    padding: 2px 16px 2px 0;
    line-height: 28px;
}

/* ---------------------------------------------------------------- MasterPageForUploadPic */

/* The upload master (PaperMenu, DishPicManage, AddShopPic) has an extra block in
   its top bar - the session timeout notice - sitting after the user table. In the
   flex bar that pushed the user table next to the logo; give the notice the middle
   and keep the user table on the right, as in the other masters. */
.topBanner > div {
    order: 2;
    flex: 1 1 auto;
    width: auto !important;
    margin: 0 16px !important;
    text-align: center;
}

.topBanner .topTable {
    order: 3;
}

#right .righttop a.tooltip {
    text-decoration: none;
}

#right .righttop .spanLeft,
#right .righttop .spanRight {
    padding: 0;
    margin: 0;
}

/* ---------------------------------------------------------------- iframe popups (NewMenu/control/*.htm) */

/* The menu editor opens its dialogs (Meal/Bundle Edit, Import, Batch Edit, Select
   Dish ...) as stand-alone .htm documents inside fixed iframes. They are separate
   documents, so nothing above reached them until each got this stylesheet linked
   and class="boPopup" on its <body>. .boPopup stands in for #right in the generic
   control rules (see the :where(#right, .boPopup, .boStandalone) selectors), and the rules below
   lay the document out as a dialog. */
body.boPopup {
    margin: 0;
    padding: 0 16px 16px;
    /* Every one of these documents carries style="background: white" on its <body>
       (and AutoComplete.htm also width: 360px), hence the !important pair:
       - the sheet follows the card colour like the rest of the dimmed palette;
       - the body always fills its iframe. A fixed 360px body in a 400px frame left a
         strip down the right-hand side that the title bar and the content never
         reached - invisible while everything was white, an odd blank column now. */
    width: auto !important;
    background: var(--bo-card) !important;
    color: var(--bo-fg);
    font-family: var(--bo-font);
    font-size: 13px;
    text-align: left;
}

/* title strip -> dialog title bar, flush with the iframe edges */
html body.boPopup .titleHead {
    height: auto;
    margin: 0 -16px 12px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid var(--bo-border);
    border-radius: 0;
    background: var(--bo-card);
    font-size: 15px;
    line-height: 22px;
    text-align: left;
}

html body.boPopup .titleHead img {
    margin: 3px 0 0 !important;
    cursor: pointer;
    opacity: 0.7;
}

html body.boPopup .titleHead img:hover {
    opacity: 1;
}

.boPopup input[type="button"] {
    margin: 2px 4px 2px 0;
}

/* Meal / Bundle parts: one card per part */
.boPopup #mealList {
    border-top: 0 !important;
}

.boPopup .mealPart {
    margin: 0 0 14px;
    padding: 12px 14px 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    line-height: 30px;
}

.boPopup .mealPart > span:first-child {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    font-weight: 600;
}

.boPopup .mealPart > input[type="text"] {
    margin: 0 10px 0 4px;
}

.boPopup .mealPart .dataTable {
    margin-top: 8px;
    line-height: normal;
}

/* the iframes themselves, in the parent page: script/menu.js gives them
   "border: 1px grey solid" when it opens them. A collapsed one (height: 0) must
   stay invisible, so the frame look is only for opened ones. */
.mainDiv > div > iframe:not([style*="height: 0"]) {
    border: 0 !important;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
}

#disableLayer {
    background: #000000 !important;
}

/* ---------------------------------------------------------------- menu editor, second pass */

/* column header strip: the title was centred in a strip thousands of pixels wide
   (the strip is as wide as the grid under it), i.e. off screen. Keep it next to
   the two small column buttons. */
html body .mainDiv .titleHead {
    text-align: left;
}

html body .mainDiv .titleHead input[type="button"] {
    margin: 6px 8px 0 6px !important;
    padding: 2px 10px;
    border-color: var(--bo-input);
    background: var(--bo-card);
    color: var(--bo-muted-fg);
    font-size: 12px;
}

/* "show active / deactivated / all" filter: one line of options instead of a
   stack of loose radios.

   DO NOT wrap these radios in a <label> or an extra <div>: script/tableForm.js
   bindHideFilter() finds the grid to filter with $(radio).parent().parent(), so
   the radio has to stay a direct child of the element it was in. That is why the
   markup is "input + sibling <label for>", why MenuManager lays out the whole
   #xxxControl block as a flex row with a .nmBreak spacer before the buttons, and
   why PizzaManager puts .nmRadios on the group <div> that was already there. */
#menuControl,
#dishClassControl,
#dishControl,
.nmRadios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--bo-fg);
}

.nmRadios {
    margin: 2px 0 10px;
}

#menuControl > input[type="radio"],
#dishClassControl > input[type="radio"],
#dishControl > input[type="radio"],
#dishControl > input[type="checkbox"],
.nmRadios > input[type="radio"] {
    margin: 0;
}

#menuControl > label,
#dishClassControl > label,
#dishControl > label,
.nmRadios > label {
    margin-right: 14px;
    cursor: pointer;
    white-space: nowrap;
}

/* forces the buttons onto their own line after the options */
.nmBreak {
    flex: 0 0 100%;
    height: 0;
}

html body #menuControl input[type="button"],
html body #dishClassControl input[type="button"],
html body #dishControl input[type="button"] {
    margin: 0;
}

/* the inline panels of the dish column take a full row each */
#dishControl > div {
    flex: 0 0 100%;
}

/* a checkbox option after the radios reads as a separate switch */
#dishControl > input[type="checkbox"] {
    margin-left: 4px;
}

/* drop-downs inside grid cells: a borderless select looked like plain text and
   its label ran into the arrow. Give it a light box of its own and let a long
   label end in an ellipsis instead of being cut mid-letter. */
:is(#right, .boPopup, .boStandalone) .dataTable select {
    box-sizing: border-box;
    width: 96%;
    height: 24px;
    padding: 0 2px 0 6px;
    border: 1px solid var(--bo-input);
    border-radius: 4px;
    background-color: var(--bo-field);
    font-size: 12px;
    text-overflow: ellipsis;
}

:is(#right, .boPopup, .boStandalone) .dataTable select:hover {
    border-color: var(--bo-hint);
}

/* the inline panels the dish column opens (Add Advance / Advance Search / Find &
   Replace): inline "border-top/bottom: solid 1px grey" */
#dishAdd,
#dishSearch,
#dishFind {
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--bo-input) !important;
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
    line-height: 32px;
}

/* the import dialog host is see-through (inline opacity: 0.9) */
#importDiv {
    opacity: 1 !important;
}

/* ---------------------------------------------------------------- iframe popups, second pass */

.boPopup h1 {
    margin: 4px 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

.boPopup b {
    font-weight: 600;
}

.boPopup input[type="file"] {
    font-family: var(--bo-font);
    font-size: 13px;
}

.boPopup input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 5px 12px;
    border: 1px solid var(--bo-btn-border);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-btn-bg);
    color: var(--bo-btn-fg);
    font-family: var(--bo-font);
    cursor: pointer;
}

.boPopup hr {
    height: 1px;
    border: 0;
    background: var(--bo-input);
}

/* SetImage: the "pick an image from another shop" box */
.boPopup #selectImg {
    box-sizing: border-box;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--bo-input) !important;
    border-radius: var(--bo-radius);
}

.boPopup #selectDiv span {
    margin: 0 4px 0 12px;
    color: var(--bo-muted-fg);
}

.boPopup #imgUpload {
    border-radius: var(--bo-radius);
    object-fit: cover;
}

/* SetImage: OK / DEL sit in a 100px floated box, too narrow for two padded
   buttons, so they stacked */
.boPopup div[style*="float:right"] {
    width: auto !important;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Import popup (ImportDish.htm) */

/* Scrollbars: the result list is a fixed 540x400 box with its own overflow, inside
   a 560px iframe that scrolls as well - so the popup showed a horizontal bar (540
   + padding does not fit) and a vertical one even with no results, and a second
   pair once results arrived. Let the list take the available width and its
   natural height; the iframe is then the only thing that scrolls, and only when
   there is something to scroll. */
.boPopup #resultDiv {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.boPopup #searchDiv {
    width: auto !important;
}

/* the "Filter" caption and the grey rule under it */
.boPopup #searchDiv > div:first-child > span {
    margin-left: 0 !important;
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.boPopup #searchDiv > div:first-child > br {
    display: none;
}

.boPopup #searchDiv > div[style*="border-top"] {
    padding-top: 8px;
    border-top: 0 !important;
}

.boPopup #searchDiv table {
    width: 100% !important;
    margin: 4px 0;
}

.boPopup #searchDiv td {
    padding: 3px 12px 3px 0;
    line-height: 18px;
    vertical-align: bottom;
}

.boPopup #searchDiv td > input[type="text"] {
    width: 100%;
}

/* option check boxes: a label per option, so the box and its text stay together
   and whole options wrap */
.boPopup label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.boPopup label > input {
    margin: 0;
}

.boPopup .boCheckLine {
    display: flex;
    margin: 4px 0 6px;
}

.boChecks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 6px 0 2px;
}

/* ---------------------------------------------------------------- page: PizzaManager */

/* Epos_Shop/NewMenu/PizzaManager.aspx: easytabs "folder tab" strip (grey boxes with
   a 1px frame, declared in the page's own <style>) -> Gen3 underline tabs. The
   page's <style> comes after this file, hence "html body". */
html body .etabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 14px;
    padding: 0;
    border-bottom: 1px solid var(--bo-input);
    list-style: none;
}

html body .tab {
    position: static;
    margin: 0 0 -1px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
}

html body .tab a {
    padding: 0 16px;
    color: var(--bo-muted-fg);
    font-size: 13px;
    font-weight: 500;
    line-height: 36px;
    text-decoration: none;
}

html body .tab a:hover {
    color: var(--bo-fg);
    text-decoration: none;
}

html body .tab.active {
    top: 0;
    padding-top: 0;
    border-bottom-color: var(--bo-primary);
    background: transparent;
}

html body .tab a.active {
    color: var(--bo-primary-hover);
    font-weight: 600;
}

html body .tab-container .panel-container {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.tab-container .pageToolbar {
    margin-bottom: 8px;
}

.tab-container .pageToolbar input[type="button"] {
    margin: 0;
}

/* the Import popup host on this page is not inside .mainDiv */
#importDiv > iframe:not([style*="height: 0"]) {
    border: 0 !important;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
}

/* ---------------------------------------------------------------- popups: standing out from the page */

/* confirm box (script/common.js): NewMenu.css pulls the close icon 18px into the
   right padding, so without a scrollbar next to it the icon touched the corner */
html body .confirmBox h1 img {
    margin: 1px 0 0;
    cursor: pointer;
}

/* iframe popups: a white sheet over a white page with a faint shadow was hard to
   tell from the page (the Justeat verification box opens without the grey
   overlay). They now get what the other dialogs have:
   - a dimmed page behind them - drawn as a very large box-shadow spread, because
     these popups are opened by several different scripts and not all of them
     show #disableLayer. It is only paint: it does not block clicks on the page;
   - a real edge (hairline + deeper shadow);
   - a tinted title bar. */
.mainDiv > div > iframe:not([style*="height: 0"]),
#importDiv > iframe:not([style*="height: 0"]) {
    border: 1px solid var(--bo-input) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), 0 0 0 100vmax rgba(0, 0, 0, 0.32);
}

/* AutoComplete is not a dialog: it is the suggestion list that appears beside the
   grid WHILE the user is typing a dish name, and they keep typing in the row
   underneath it. Dimming the page there greys out the very cell being edited, so
   it keeps the edge and the shadow but not the dimmed page. */
#autoCompleteDiv > iframe {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

html body.boPopup .titleHead {
    border-bottom-color: var(--bo-input);
    background: var(--bo-muted);
}

/* the page's own grey overlay would stack with the dim above */
#disableLayer {
    opacity: 0 !important;
}

/* ---------------------------------------------------------------- left column header */

/* shop name / account number (or the "Function Menu" caption) at the top of the
   menu column: on a white column it floated with nothing to hold it. A muted band
   with a hairline separates it from the tree below. */
#left .lefttop {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--bo-frame);
    background: var(--bo-muted);
}

#left .leftmiddle {
    padding-top: 8px;
}

#leftFoldBtn {
    background: var(--bo-card);
}

/* ---------------------------------------------------------------- page: CommentManager */

/* Two columns (Catalog / Comment), each: title strip, filter row, toolbar, grid.
   Here the radios sit one level deeper than before (inside .nmRadios); that is
   safe on this page because bindHideFilter()'s parent().parent() then lands on
   the column context, which still holds the column's grid. */
.mainDiv .pageToolbar {
    margin-bottom: 8px;
}

html body .mainDiv .pageToolbar input[type="button"] {
    margin: 0;
}

/* the title strip is the first thing in the column: give the filter row air */
.mainDiv .titleHead + .nmRadios {
    margin-top: 10px;
}

/* a strip with no column buttons in it still needs its inner padding */
html body .mainDiv .titleHead {
    padding-left: 12px;
}

html body .mainDiv .titleHead input[type="button"]:first-child {
    margin-left: -6px !important;
}

/* space between the two columns */
#commentClassDiv {
    margin-right: 20px;
}

/* ---------------------------------------------------------------- filter options that wrap as a unit */

/* The filter radios are "input + sibling label" (see the bindHideFilter note
   above), and in a flex row those are two separate items: in a narrow column the
   line could break between a radio and its own text. So the real input is taken
   out of the layout (still there, still focusable, still what the scripts read)
   and the label draws the control itself. Each option is then one flex item. */
#menuControl > input[type="radio"],
#dishClassControl > input[type="radio"],
#dishControl > input[type="radio"],
#dishControl > input[type="checkbox"],
.nmRadios > input[type="radio"] {
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    opacity: 0;
}

#menuControl > input + label,
#dishClassControl > input + label,
#dishControl > input + label,
.nmRadios > input + label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

#menuControl > input + label:before,
#dishClassControl > input + label:before,
#dishControl > input + label:before,
.nmRadios > input + label:before {
    content: "";
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--bo-hint);
    border-radius: 50%;
    background: var(--bo-field);
}

#menuControl > input:checked + label:before,
#dishClassControl > input:checked + label:before,
#dishControl > input[type="radio"]:checked + label:before,
.nmRadios > input:checked + label:before {
    border-color: var(--bo-primary);
    background: radial-gradient(circle, var(--bo-primary) 0, var(--bo-primary) 3.5px, var(--bo-card) 4px);
}

#dishControl > input[type="checkbox"] + label:before {
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    line-height: 11px;
    text-align: center;
}

#dishControl > input[type="checkbox"]:checked + label:before {
    content: "\2713";
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
}

#menuControl > input:focus-visible + label:before,
#dishClassControl > input:focus-visible + label:before,
#dishControl > input:focus-visible + label:before,
.nmRadios > input:focus-visible + label:before {
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.25);
}

/* ---------------------------------------------------------------- matrix table (printer mapping) */

/* Epos_Shop/Print/PT_WinPrinterLogicPrinterMappingSet.aspx: logic printers down,
   physical printers across, three check boxes per cell. Was a bare
   <table border="1">. */
.matrixHead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
    color: var(--bo-muted-fg);
}

.matrixHead select {
    max-width: 100%;
}

.matrixTable {
    border: 1px solid var(--bo-input);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    overflow: hidden;
}

.matrixTable > tbody > tr > td {
    height: auto !important;
    padding: 8px 12px;
    border-right: 1px solid var(--bo-border);
    border-bottom: 1px solid var(--bo-border);
    line-height: 22px;
    vertical-align: top;
    white-space: nowrap;
}

.matrixTable > tbody > tr > td:last-child {
    border-right: 0;
}

.matrixTable > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* row 1: the two axis captions; row 2: one block per physical printer */
.matrixTable > tbody > tr:first-child > td {
    border-right: 0;
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.matrixTable > tbody > tr:nth-child(2) > td {
    background: var(--bo-muted);
    border-bottom-color: var(--bo-input);
}

/* first column: logic printer names */
.matrixTable > tbody > tr > td:first-child {
    font-weight: 600;
}

/* the physical printer block is a small nested table: name / last online / driver */
.matrixTable td table td {
    padding: 0;
    font-size: 12px;
    line-height: 18px;
    white-space: normal;
}

.matrixTable td table {
    width: 150px;
}

.matrixTable input[type="checkbox"] {
    margin: 0 5px 0 0;
    vertical-align: -2px;
}

.matrixTable label {
    cursor: pointer;
}

.matrixTable + .buttonstyle {
    margin: 14px 0 0;
}

/* ---------------------------------------------------------------- hand-written border="1" tables */

/* <table border="1" cellspacing="1"> (PrintConfig's four setting grids and a few
   other pages): the attribute draws a doubled, bevelled grid. Collapse it to
   hairlines with a muted header. GridViews are excluded - they carry rules="all"
   and have their own block above. */
:where(#right, .boPopup, .boStandalone) table[border="1"]:not([rules]) {
    border: 1px solid var(--bo-input);
    border-collapse: collapse;
    background: var(--bo-card);
}

:where(#right, .boPopup, .boStandalone) table[border="1"]:not([rules]) > tbody > tr > th,
:where(#right, .boPopup, .boStandalone) table[border="1"]:not([rules]) > thead > tr > th {
    padding: 8px 10px;
    border: 1px solid var(--bo-input);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

:where(#right, .boPopup, .boStandalone) table[border="1"]:not([rules]) > tbody > tr > td {
    padding: 5px 10px;
    border: 1px solid var(--bo-border);
    vertical-align: middle;
}

/* ---------------------------------------------------------------- page: PrintConfig */

/* logic printer name above the buttons */
#right span[id$="_lbPrinter"] {
    display: block;
    height: auto !important;
    margin-bottom: 10px;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.pcTemplateBar {
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 10px 0 4px;
}

.pcTemplateBar .pageToolbar {
    margin: 0;
}

/* "this row is not printed" marker next to an unticked box: a solid red block.
   Matched by position (the div after the checkbox's own div), not by its colour:
   ChangeDiv() rewrites the inline style when a box is clicked and the browser then
   serialises the colour as rgb(...), which a [style*="#CA3737"] test misses. */
#divCT td > div + div,
#divPR td > div + div {
    width: 52px !important;
    height: 16px !important;
    margin-top: 2px;
    border-radius: 4px;
    background-color: #ffcdd2 !important;
}

/* the font picker cells are read-only boxes that open the picker */
#divContentTable input[type="text"] {
    cursor: pointer;
}

/* ---------------------------------------------------------------- radio / checkbox next to its text */

/* Everywhere in the content area: the same box size, the same gap to the text,
   and the text clickable-looking when it is a real label. Left alone: the menu
   editor grids (boxes are centred in their cell there), a box that is alone in
   its cell or wrapper (nothing to space it from), the oversized .checkBoxZoom
   boxes, and the pages with their own design system. */
:where(:is(#right, .boPopup, .boStandalone) input[type="checkbox"]:not(:only-child):not(.dataTable *):not(.bo2 *):not(#gfo-page *):not(.checkBoxZoom *)),
:where(:is(#right, .boPopup, .boStandalone) input[type="radio"]:not(:only-child):not(.dataTable *):not(.bo2 *):not(#gfo-page *)) {
    width: 15px;
    height: 15px;
    margin: 0 5px 0 0;
    vertical-align: -2px;
}

:where(:is(#right, .boPopup, .boStandalone) input:is([type="checkbox"], [type="radio"]):not(.dataTable *):not(.bo2 *):not(#gfo-page *) + label) {
    margin-right: 14px;
    cursor: pointer;
}

/* ---------------------------------------------------------------- dialog form pages (boPopup--form) */

/* The small stand-alone forms that jQuery UI dialogs load in an iframe
   (Get...Info.aspx and friends: no master page, only css/layout.css, a body with
   an inline pixel width). They are separate documents, so they kept the 2012 look
   inside a restyled dialog. Each now links this file and carries
   class="boPopup boPopup--form" on <body>.

   Unlike the menu editor popups these bodies have a fixed inline width that the
   dialog was sized for, so NO padding is added here - it would push the form past
   the iframe and bring back a horizontal scrollbar. Controls are also kept a
   little more compact than on full pages, for the same reason (height). */
body.boPopup.boPopup--form {
    margin: 10px auto 0;
    padding: 0;
    background: var(--bo-card);
    text-align: center;
}

/* Cell padding stays at 1-2px and no line-height is forced: these forms keep an
   empty row under most fields for a validation message, and any padding there
   turns six invisible rows into 100px of extra height - enough to cut the OK
   button off at the bottom of the dialog. */
.boPopup--form td {
    padding: 1px 2px;
    vertical-align: middle;
}

:where(.boPopup--form) input[type="text"],
:where(.boPopup--form) input[type="password"],
:where(.boPopup--form) select,
:where(.boPopup--form) textarea {
    min-height: 24px;
    padding: 1px 6px;
    line-height: 16px;
}

body.boPopup.boPopup--form {
    font-size: 12.5px;
}

.boPopup--form fieldset {
    margin: 0 0 8px;
    padding: 10px 12px;
}

.boPopup--form fieldset div label {
    color: var(--bo-muted-fg);
    font-weight: 500;
}

.boPopup--form .buttonstyle {
    height: 26px;
    margin: 4px 4px 0;
}

/* the form's own submit button is the dialog's main action */
.boPopup--form input[type="submit"].buttonstyle {
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.boPopup--form input[type="submit"].buttonstyle:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
}

/* ---------------------------------------------------------------- filter toolbar */

/* "label, control, Search" in one line above a grid (RevoluteTransfer). */
.pageToolbar--filter {
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
    width: -webkit-fit-content;
    width: fit-content;
}

.pageToolbar__label {
    color: var(--bo-muted-fg);
    font-weight: 500;
}

.pageToolbar .btnBg,
.pageToolbar .btnBgWide,
.pageToolbar .btnBigBg {
    margin: 0;
}

/* hand-written grids use <thead>: same header as the GridView ones */
.tableGridView > thead > tr > th {
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--bo-input);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

:where(#right) table.gridWide.tableGridView {
    max-width: 1100px;
}

/* ---------------------------------------------------------------- page: RevoluteTransfer */

#batchTransferDetail .pageToolbar {
    margin-bottom: 12px;
}

/* "Execute" starts real bank transfers: make it look like the action it is */
#batchTransferList .tableGridView a[onclick^="startCheckTransfer"] {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--bo-primary);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
    text-decoration: none;
}

#batchTransferList .tableGridView a[onclick^="startCheckTransfer"]:hover {
    border-color: var(--bo-primary-hover);
    background: var(--bo-primary-hover);
}

#batchTransferList .tableGridView span[id^="lblStatus_"] {
    color: var(--bo-muted-fg);
}

#dtTransferDetail .btnBigBg {
    min-width: 0;
    height: 26px;
    margin: 4px 0 0;
    padding: 0 12px;
}

/* ---------------------------------------------------------------- page heading helper */

.pageHeading {
    margin: 0 0 12px;
    color: var(--bo-fg);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

/* ---------------------------------------------------------------- page: Union/ShopDishSync */

/* long option sentences: the box stays at the top-left of its own text block */
.syncOpts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 900px;
    margin: 6px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
    text-align: left;
}

.syncOpts label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 19px;
    cursor: pointer;
}

.syncOpts label > input {
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.syncOpts__warn {
    padding: 0;
    color: var(--bo-destructive-text);
    font-style: normal;
    font-weight: normal;
}

.syncSelectAll {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 12px 6px 0;
    cursor: pointer;
}

.syncSelectAll > input {
    margin: 0;
}

/* Lock / Unlock: the script paints the state with an inline background-color
   (#7db271 = unlocked, "red" = locked), so the two states are matched by that. */
.buttonstyle.syncLock {
    margin: 10px 8px 10px 0;
    border-color: transparent;
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.buttonstyle.syncLock[style*="rgb(125, 178, 113)"],
.buttonstyle.syncLock[style*="#7db271" i] {
    border-color: var(--bo-primary);
    background-color: var(--bo-primary) !important;
}

.buttonstyle.syncLock[style*="red"] {
    border-color: var(--bo-destructive);
    background-color: var(--bo-destructive) !important;
}

#dvMenu table td {
    padding: 2px 0;
    line-height: 22px;
}

/* selected store rows: the page's own .selectBg is green, and the odd-row reset in
   the grid block (background !important) was wiping it on every other row */
html body .tableGridView tr.selectBg,
html body tr.selectBg {
    background-color: var(--bo-primary-lighter) !important;
    color: var(--bo-fg);
}

/* "Except Dish" picker: an iframe in a fixed box */
#selectDishDiv > iframe {
    border: 1px solid var(--bo-input) !important;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), 0 0 0 100vmax rgba(0, 0, 0, 0.32);
}

/* sync check report modal (Union/ShopDishSyncReport.css) */
html body .sr-box {
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-modal-shadow);
}

html body .sr-head {
    border-bottom-color: var(--bo-border);
    color: var(--bo-fg);
    font-weight: 600;
}

html body .sr-btn {
    border-radius: var(--bo-radius-sm);
    background-color: var(--bo-primary);
}

html body .sr-tab-on {
    color: var(--bo-primary-hover);
}

html body .sr-table th {
    border-bottom-color: var(--bo-input);
    background: var(--bo-muted);
    color: var(--bo-muted-fg);
    font-weight: 600;
}

html body .sr-shop {
    background: var(--bo-muted);
}

/* ---------------------------------------------------------------- option lists laid out in several rows */

/* RepeatColumns="2" (or more) makes the control emit several <tr>, so three
   options showed as "two, then one underneath" (Sales Type on SearchGroupReport).
   When a list has rows with more than one cell it is a horizontal list: let all
   of its options flow in one wrapping line. A list with one cell per row is a
   vertical list and is left as it is. */
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):not(:has(> tbody > tr:nth-child(3))) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):not(:has(> tbody > tr:nth-child(3))) > tbody {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 4px 0;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):not(:has(> tbody > tr:nth-child(3))) > tbody > tr,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):not(:has(> tbody > tr:nth-child(3))) > tbody > tr {
    display: contents;
}

/* ---------------------------------------------------------------- jQuery UI tabs */

/* $("#tabs").tabs() (Union/Report/Invoice and the MainReport twins): boxed widget
   with grey folder tabs -> underline tabs, no frame around the panels. !important
   throughout because the jQuery UI theme and css/layoutNew.css both set these with
   !important. */
.ui-tabs.ui-widget-content {
    padding: 0 !important;
    border: 0 !important;
    background: transparent;
}

.ui-tabs .ui-tabs-nav.ui-widget-header {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--bo-input) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.ui-tabs .ui-tabs-nav li {
    top: 0;
    margin: 0 2px -1px 0;
    padding: 0;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0;
    background: transparent !important;
}

.ui-tabs .ui-tabs-nav li a {
    padding: 9px 16px;
    color: var(--bo-muted-fg) !important;
    font-size: 13px;
    font-weight: 500;
}

.ui-tabs .ui-tabs-nav li a:hover {
    color: var(--bo-fg) !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-selected,
.ui-tabs .ui-tabs-nav li.ui-state-active {
    border-bottom-color: var(--bo-primary) !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,
.ui-tabs .ui-tabs-nav li.ui-state-active a {
    color: var(--bo-primary-hover) !important;
    font-weight: 600;
}

.ui-tabs .ui-tabs-panel.ui-widget-content {
    padding: 12px 0 0 !important;
    border: 0 !important;
    background: transparent;
}

/* ---------------------------------------------------------------- full pages shown in an iframe (boPopup--page) */

/* The invoice pages loaded inside those tabs are whole pages of their own
   (css/layout.css + layoutNew.css, body.bodyNew / .bodySubPage). Same story as the
   dialog forms: separate documents, so they link this file and carry
   class="boPopup boPopup--page". No dialog chrome here: they sit inside a tab
   panel of the host page, so no padding and no centring. */
body.boPopup.boPopup--page {
    box-sizing: border-box;
    width: 100% !important;
    margin: 0;
    padding: 0 2px;
    background: var(--bo-card);
    text-align: left;
}

/* The control also writes Width inline (Width="300px" on SearchGroupReport's Sales
   Type list): too narrow for the options once they have their gaps, so they
   wrapped although the row had room. A list is as wide as its options. */
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)),
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)) {
    width: auto !important;
}

/* ---------------------------------------------------------------- sync check report modal, second pass */

/* 1. The modal's z-index (200) is below the fixed top bar (900), and it starts
      40px from the top: the bar covered the modal's title row. Lift it above the
      bar and start it clear of it.
   2. Header cells are left-aligned by ShopDishSyncReport.css but the data cells
      inherited "center" from the page, so the columns did not line up. */
html body .sr-modal {
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
}

html body .sr-box {
    top: 72px;
    max-height: calc(100% - 100px);
    text-align: left;
    overflow: hidden;
}

html body .sr-head {
    padding: 12px 16px;
    font-size: 15px;
    line-height: 22px;
    text-align: left;
}

html body .sr-close {
    line-height: 22px;
}

html body .sr-body {
    padding: 12px 16px 16px;
}

html body .sr-table th,
html body .sr-table td {
    padding: 7px 10px;
    text-align: left;
    vertical-align: middle;
}

html body .sr-table th {
    font-size: 12px;
}

html body .sr-table td:last-child {
    text-align: right;
}

html body .sr-btn {
    padding: 3px 12px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- findings of the full-site sweep */

/* VoucherGlobalConfigManage: a "silver thin ridge" box with a fixed pixel height.
   Rows are a little taller now, the last one spilled out of the box and the
   Submit button sat on top of it. Let the box grow with its rows. */
:where(#right) div[style*="thin ridge" i] {
    box-sizing: border-box;
    height: auto !important;
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid var(--bo-input) !important;
    border-radius: var(--bo-radius);
}

:where(#right) div[style*="thin ridge" i] > table {
    height: auto !important;
}

/* ShopTipsConfig: page <style> gives its table a solid black frame */
html body .tipTable {
    border: 1px solid var(--bo-input);
    border-collapse: collapse;
}

html body .tipTable td {
    border-color: var(--bo-border);
}

/* CheckInvoice / InvoicePay: ticked rows get .SelectedRowNew (grey, !important);
   the odd-row reset in the grid block is !important too, so only every other
   ticked row showed as selected. One selected look, same as elsewhere. */
html body .tableGridView tr.SelectedRowNew,
html body tr.SelectedRowNew {
    background-color: var(--bo-primary-lighter) !important;
}

/* DeliveryCharge: five setting rows painted with an inline grey bar */
:where(#right) tr[style*="background-color: #CCCCCC" i],
:where(#right) tr[style*="background-color:#CCCCCC" i],
:where(#right) tr[bgcolor="#CCCCCC" i] {
    background-color: var(--bo-muted) !important;
}

/* ---------------------------------------------------------------- stand-alone pages (boStandalone) */

/* ShopAddService/*, ShopRegister/*, WebAPI/TopUp*: the shop self-service and
   registration pages. No master page - a single centred column (body.newbody >
   .divBody) with a title strip (.divTitleNew: back arrow, title, language
   button), styled by css/layoutNew.css plus a <style> block in each page.
   Each page now links this file and carries class="boStandalone" on <body>;
   .boStandalone also stands in for #right in the generic control rules above.
   Selectors start with "html body" because the pages' own <style> blocks come
   after this file. */
html body.newbody.boStandalone {
    max-width: none;
    margin: 0;
    padding: 24px 16px 40px;
    background: var(--bo-bg);
    color: var(--bo-fg);
    font-family: var(--bo-font);
    font-size: 13px;
}

html body.boStandalone .divBody {
    max-width: 1000px;
    min-height: 0;
    margin: 0 auto;
    padding-bottom: 24px;
    border: 0;
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-card-shadow);
    /* Two requirements pull in different directions here:
       - the card must CONTAIN its floated content (several of these pages float
         their whole form). "overflow: hidden" used to do that as a side effect;
       - it must NOT be a scroll container, or the position:sticky Save bar on the
         landing page editor never sticks - which rules "overflow: hidden" out.
       display: flow-root contains floats without clipping or scrolling, so
       nothing is clipped at all. (An earlier "overflow: clip" here did not
       contain the floats: the card collapsed to its title bar and clipped the
       whole form away - ShopRegister/AccountInfo showed as a blank page.) */
    display: flow-root;
    overflow: visible;
}

/* float containment for engines without display: flow-root (the Chromium embedded
   in the POS): there the card collapsed to its title bar and the form sat below it */
html body.boStandalone .divBody::after {
    content: "";
    display: table;
    clear: both;
}

html body.boStandalone .divTitleNew {
    height: auto;
    min-height: 48px;
    max-width: none;
    border-bottom: 1px solid var(--bo-input);
    background: var(--bo-card);
}

html body.boStandalone .divTitleNew span {
    margin: 0;
    color: var(--bo-fg);
    font-size: 15px;
    font-weight: 600;
    line-height: 48px;
}

/* back arrow and language button sit in the 48px strip */
html body.boStandalone .divTitleNew > a {
    margin-top: 11px !important;
}

html body.boStandalone .divTitleNew input[type="image"] {
    opacity: 0.7;
}

html body.boStandalone .divTitleNew input[type="image"]:hover {
    opacity: 1;
}

/* language switch: css/layoutNew.css paints it with a grey bevelled bitmap
   (images/language-en.png / language-ch.png). Same button, same two classes, but
   drawn as a flat two-segment control: the active language is the tinted half.
   The Chinese label lives URL-encoded inside the SVG so this file stays ASCII. */
html body .LanguageButtonStyleEN,
html body .LanguageButtonStyleCH {
    width: 92px;
    height: 30px;
    margin: 9px 14px 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--bo-radius-sm);
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

html body .LanguageButtonStyleEN {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='30' viewBox='0 0 92 30'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Crect x='0.5' y='0.5' width='91' height='29' rx='6'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url%28%23c%29'%3E%3Crect x='0' y='0' width='46' height='30' fill='%23fff3e0'/%3E%3Crect x='46' y='0' width='46' height='30' fill='%23ffffff'/%3E%3C/g%3E%3Crect x='0.5' y='0.5' width='91' height='29' rx='6' fill='none' stroke='%23e0e0e0'/%3E%3Cline x1='46' y1='1' x2='46' y2='29' stroke='%23e0e0e0'/%3E%3Ctext x='23' y='19.5' text-anchor='middle' font-family='Public Sans,Segoe UI,Arial,sans-serif' font-size='12' font-weight='600' fill='%23e65100'%3EEN%3C/text%3E%3Ctext x='69' y='19.5' text-anchor='middle' font-family='Microsoft YaHei,PingFang SC,sans-serif' font-size='12' font-weight='400' fill='%23757575'%3E%E4%B8%AD%E6%96%87%3C/text%3E%3C/svg%3E");
}

html body .LanguageButtonStyleCH {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='30' viewBox='0 0 92 30'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Crect x='0.5' y='0.5' width='91' height='29' rx='6'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url%28%23c%29'%3E%3Crect x='0' y='0' width='46' height='30' fill='%23ffffff'/%3E%3Crect x='46' y='0' width='46' height='30' fill='%23fff3e0'/%3E%3C/g%3E%3Crect x='0.5' y='0.5' width='91' height='29' rx='6' fill='none' stroke='%23e0e0e0'/%3E%3Cline x1='46' y1='1' x2='46' y2='29' stroke='%23e0e0e0'/%3E%3Ctext x='23' y='19.5' text-anchor='middle' font-family='Public Sans,Segoe UI,Arial,sans-serif' font-size='12' font-weight='400' fill='%23757575'%3EEN%3C/text%3E%3Ctext x='69' y='19.5' text-anchor='middle' font-family='Microsoft YaHei,PingFang SC,sans-serif' font-size='12' font-weight='600' fill='%23e65100'%3E%E4%B8%AD%E6%96%87%3C/text%3E%3C/svg%3E");
}

html body .LanguageButtonStyleEN:hover,
html body .LanguageButtonStyleCH:hover {
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

/* section inside the column: grey caption strip + bordered body */
html body.boStandalone .divSubContent {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    overflow: hidden;
}

html body.boStandalone .divSubTitle {
    border-bottom: 1px solid var(--bo-border);
    background: var(--bo-muted);
    color: var(--bo-fg);
    font-weight: 600;
}

html body.boStandalone .content_area_title {
    border-bottom-color: var(--bo-input);
    color: var(--bo-fg);
    font-size: 14px;
    font-weight: 600;
}

html body.boStandalone .contentTable .tdLeft,
html body.boStandalone .content_rows_lable {
    color: var(--bo-muted-fg);
    font-weight: 500;
}

html body.boStandalone .contentTable td {
    padding: 4px 0;
}

html body.boStandalone .contentTable .tdRight span,
html body.boStandalone .discribeFont {
    color: var(--bo-hint);
}

html body.boStandalone .content_rows_notice,
html body.boStandalone .form-error {
    color: var(--bo-destructive-text);
}

html body.boStandalone .divMsg,
html body.boStandalone .lblResult {
    color: var(--bo-success-text);
}

html body.boStandalone .titleGreenFont {
    color: var(--bo-fg);
}

html body.boStandalone a {
    color: var(--bo-info-text);
}

html body.boStandalone a.btnBg,
html body.boStandalone a.btnBigBg {
    color: var(--bo-primary-fg);
    text-decoration: none;
}

/* controls that set their own size through a class */
html body.boStandalone .contentTextBox,
html body.boStandalone .contentSelect,
html body.boStandalone .contentTextBoxMul {
    box-sizing: border-box;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-field);
    color: var(--bo-fg);
    font-family: var(--bo-font);
    font-size: 13px;
    outline: none;
}

html body.boStandalone .contentTextBox {
    height: 30px;
    padding: 0 8px;
}

html body.boStandalone .contentSelect {
    height: 30px;
}

html body.boStandalone .contentTextBoxMul {
    padding: 6px 8px;
}

html body.boStandalone .contentTextBox:focus,
html body.boStandalone .contentSelect:focus,
html body.boStandalone .contentTextBoxMul:focus {
    border-color: var(--bo-primary);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

/* registration steps (ShopRegister): green step colour -> brand colour */
html body.boStandalone #progress ul .active a,
html body.boStandalone #progress ul .actived a,
html body.boStandalone #progress ul li.active span em,
html body.boStandalone #reSend em {
    color: var(--bo-primary-hover);
}

html body.boStandalone #progress-bar div.active {
    background: var(--bo-primary);
}

html body.boStandalone #triangle-left {
    border-right-color: var(--bo-primary);
}



/* primary / secondary button classes on a link (<a class="btnBg">): an anchor
   does not centre its text vertically the way an <input> does, so the label sat
   at the top of the 32px box ("View Detail" / "Renewal" on ServiceList) */
a.btnBg,
a.btnBgWide,
a.btnBigBg,
a.btnGreyBg,
a.btnGreyBgWide {
    display: inline-block;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
}

/* the rule under the intro sentence on the stand-alone forms */
html body.boStandalone hr {
    height: 1px;
    border: 0;
    background: var(--bo-input);
}

/* ---------------------------------------------------------------- back arrow (stand-alone pages) */

/* images/NewVer/iconBack.png is a 23x22 opaque bitmap drawn on the old light grey
   strip, so on the white title bar it showed as a blurry arrow in a grey box.
   The image button keeps its src (and its server click handler); its bitmap is
   pushed out of the box with padding and a vector arrow is drawn as background.
   Three pages (AccountInfo, SetDelivery, OrderConfirmation) build the same arrow
   differently - an empty <asp:Button> inside the back link, painted with the
   bitmap as a background by the page's own <style> - hence the second selector. */
html body input[type="image"][src*="iconBack" i],
html body.boStandalone .divTitleNew > a > input[type="submit"],
html body.boStandalone .divTitleNew > a > input[type="button"] {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 0 0 0 32px;
    border-radius: var(--bo-radius-sm);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23616161' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M12 19l-7-7 7-7'/%3E%3C/svg%3E") no-repeat center;
    opacity: 1;
    overflow: hidden;
    cursor: pointer;
}

html body input[type="image"][src*="iconBack" i]:hover,
html body.boStandalone .divTitleNew > a > input[type="submit"]:hover,
html body.boStandalone .divTitleNew > a > input[type="button"]:hover {
    background-color: var(--bo-secondary);
    opacity: 1;
}

html body.boStandalone .divTitleNew > a {
    margin-top: 8px !important;
    margin-left: 12px !important;
}

/* a title strip without a back link (account info pages): the title is the first
   thing in the strip and needs its own inset */
html body.boStandalone .divTitleNew > span:first-child {
    margin-left: 20px;
}

/* ---------------------------------------------------------------- ON / OFF switch */

/* images/NewVer/iconTriggerOn.png / iconTriggerOff.png: an 80x30 green "ON" /
   grey "OFF" bitmap used as a switch (image buttons with a server click handler,
   and two plain <img> toggled by script on the landing page editors).
   Same replacement as the back arrow: the element keeps its src and behaviour,
   the bitmap is pushed out of the box and a Gen3 switch is drawn instead -
   orange track with the knob on the right = on, grey track with the knob on the
   left = off. Width / height are !important because some carry inline sizes. */
html body :is(input[type="image"], img)[src*="iconTriggerOn" i],
html body :is(input[type="image"], img)[src*="iconTriggerOff" i] {
    box-sizing: border-box;
    width: 44px !important;
    height: 24px !important;
    padding: 0 0 0 44px;
    border: 0;
    border-radius: 12px;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    overflow: hidden;
    cursor: pointer;
}

html body :is(input[type="image"], img)[src*="iconTriggerOn" i] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='24' viewBox='0 0 44 24'%3E%3Crect x='0' y='0' width='44' height='24' rx='12' fill='%23f57c00'/%3E%3Ccircle cx='32' cy='12' r='9' fill='%23ffffff'/%3E%3C/svg%3E");
}

html body :is(input[type="image"], img)[src*="iconTriggerOff" i] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='24' viewBox='0 0 44 24'%3E%3Crect x='0' y='0' width='44' height='24' rx='12' fill='%23bdbdbd'/%3E%3Ccircle cx='12' cy='12' r='9' fill='%23ffffff'/%3E%3C/svg%3E");
}

html body :is(input[type="image"], img)[src*="iconTrigger" i]:hover {
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.18);
}

/* StoreLandingPage / StoreLandingPageDetail also link css/layout.css, whose
   "body { width: 1050px }" stayed in force: the body was a fixed 1050px box at the
   left edge of the window, so the card inside it was not centred. */
html body.newbody.boStandalone {
    box-sizing: border-box;
    width: auto;
}

/* ---------------------------------------------------------------- floating action bar (.content_footer) */

/* The landing page editors (StoreLandingPageDetail, UnionLandingPage) are several
   screens long and end with .content_footer: a result message + the Save button.
   css/layoutNew.css already declares it position:sticky; it now reads as a
   floating bar: pinned to the bottom of the window while the form scrolls, on its
   own surface with a shadow so it stays readable over the form. */
html body .content_footer {
    position: -webkit-sticky;
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-sizing: border-box;
    width: -webkit-fit-content;
    width: fit-content;
    min-width: 320px;
    max-width: 90%;
    margin: 20px auto 0;
    padding: 10px 16px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
}

html body .content_footer_msg {
    float: none;
    width: auto;
}

html body .content_footer_msg:empty,
html body .content_footer_msg:not(:has(span:not(:empty))) {
    display: none;
}

html body .content_footer input {
    width: auto;
    min-width: 200px;
    height: 34px;
    margin: 0;
}

/* a card nested in the card (StoreLandingPage): only the outer one is a card */
html body.boStandalone .divBody .divBody {
    padding-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ---------------------------------------------------------------- option lists that are real grids */

/* RepeatColumns="4" with a dozen options (Navigation Manage: 14 link types in 4
   columns) is a grid, not a line: three or more rows. Flowing those freely gave
   ragged rows, so they are laid out as a CSS grid with as many columns as the
   control declared (read off the first row), which keeps the columns aligned. */
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)) > tbody {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px 28px;
    padding: 4px 0;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)) > tbody > tr,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)) > tbody > tr {
    display: contents;
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(3):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(3):last-child) > tbody {
    grid-template-columns: repeat(3, max-content);
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(4):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(4):last-child) > tbody {
    grid-template-columns: repeat(4, max-content);
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(5):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(5):last-child) > tbody {
    grid-template-columns: repeat(5, max-content);
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(6):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(6):last-child) > tbody {
    grid-template-columns: repeat(6, max-content);
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(7):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(7):last-child) > tbody {
    grid-template-columns: repeat(7, max-content);
}

:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="radio"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(8):last-child) > tbody,
:where(#right, .boPopup, .boStandalone) table:not([rules]):not([border="1"]):not(:where(.tableGridView, .boBigTable)):not(:has(th)):has(> tbody > tr > td > input[type="checkbox"]:first-child + label:last-child):not(:has(> tbody > tr > td > :not(input):not(label))):not(:has(> tbody > tr > td > input ~ input)):has(> tbody > tr > td + td):has(> tbody > tr:nth-child(3)):has(> tbody > tr:first-child > td:nth-child(8):last-child) > tbody {
    grid-template-columns: repeat(8, max-content);
}

/* ---------------------------------------------------------------- dialog pages built from .content_rows */

/* LandingPageLinkConfig / LandingPageImage / LandingPageIntroductionConfig: the
   forms the landing page editors open in a dialog (Navigation Manage ...). */
body.boPopup.boPopup--dialog {
    padding: 14px 18px 18px;
    font-family: var(--bo-font);
    font-size: 13px;
    color: var(--bo-fg);
}

.boPopup--dialog .content_rows {
    grid-template-columns: 160px minmax(0, 1fr) auto;
    padding: 7px 0;
}

.boPopup--dialog .content_rows_lable {
    color: var(--bo-muted-fg);
    font-size: 13px;
    font-weight: 500;
}

.boPopup--dialog .content_rows_input {
    width: auto !important;
}

.boPopup--dialog .content_rows_input input[type="text"],
.boPopup--dialog .content_rows_input textarea {
    width: 100%;
    max-width: 460px;
}

.boPopup--dialog .content_rows_notice {
    color: var(--bo-destructive-text);
}

.boPopup--dialog .btnBigBg {
    margin-top: 14px;
}

/* ---------------------------------------------------------------- native file picker */

/* <input type="file">: the browser's own "choose file" button was the last grey
   bevelled control left next to the restyled ones */
:where(#right, .boStandalone) input[type="file"] {
    font-family: var(--bo-font);
    font-size: 13px;
    color: var(--bo-muted-fg);
}

:where(#right, .boStandalone) input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 4px 12px;
    border: 1px solid var(--bo-btn-border);
    border-radius: var(--bo-radius-sm);
    background: var(--bo-btn-bg);
    color: var(--bo-btn-fg);
    font-family: var(--bo-font);
    font-size: 13px;
    cursor: pointer;
}

/* ---------------------------------------------------------------- legacy "rounded box" (notification*) */

/* .notificationtop / .notificationcenter / .notificationbottom: the third variant
   of the image-cornered box (701px wide, corners are two background images, ridge
   side borders). Used as the search box above a report on the four Prepaid history
   pages (CustomerPaymentsHistory, AngencyFund, TopUpHistory, WithdrawHistory).
   Same filter panel as .orderdetailscenter. */
.notificationtop,
.notificationbottom {
    display: none;
}

.notificationcenter {
    box-sizing: border-box;
    width: -webkit-fit-content;
    width: fit-content;
    min-width: 520px;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 14px 18px 12px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-muted);
    text-align: left;
}

.notificationcenter > .divtitle {
    margin: 0 0 6px;
    color: var(--bo-muted-fg);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* the form table carries an inline margin-left and fixed cell widths */
.notificationcenter > table {
    margin-left: 0 !important;
}

.notificationcenter > table td {
    width: auto !important;
    padding: 3px 14px 3px 0;
    color: var(--bo-muted-fg);
    white-space: nowrap;
    vertical-align: middle;
}

.notificationcenter .buttonstyle {
    min-width: 96px;
    height: 30px;
    margin: 0 0 0 10px;
    border-color: var(--bo-primary);
    background: var(--bo-primary);
    color: var(--bo-primary-fg);
    font-weight: 600;
}

.notificationcenter .buttonstyle:hover {
    border-color: var(--bo-primary-hover);
    background-color: var(--bo-primary-hover);
    color: var(--bo-primary-fg);
}

/* date picker icon next to a text box */
:where(#right) input[type="image"][src*="Calendar_scheduleHS" i] {
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.75;
}

/* the report area that follows the filter: these pages wrap the viewer in a
   fixed 780px div with an inline margin */
.notificationbottom + div {
    margin-top: 0 !important;
}

/* ---------------------------------------------------------------- date box + calendar icon */

/* A date text box is followed by its calendar icon in the same cell. The cells
   carry fixed inline widths sized for the old, narrower text boxes, so the icon
   dropped onto a second line under the box (Statement, the Prepaid history
   pages ...). Keep the pair on one line and let the cell be as wide as it needs. */
:where(#right, .boStandalone) td:has(> input[type="image"][src*="Calendar" i]),
:where(#right, .boStandalone) td:has(> img[src*="Calendar" i]) {
    width: auto !important;
    white-space: nowrap;
}

:where(#right, .boStandalone) input[type="image"][src*="Calendar" i],
:where(#right, .boStandalone) img[src*="Calendar" i] {
    margin-left: 4px;
    vertical-align: middle;
}

/* The pop-up calendar has no z-index of its own, and the dimmed calendar icons
   (opacity < 1) each form a layer: the icon of the NEXT date box was painted on
   top of the open calendar. Lift the calendar above everything in the form. */
html body .ajax__calendar_container {
    z-index: 1000;
}

/* ---------------------------------------------------------------- ReportViewer toolbar */

/* The toolbar strip of the Microsoft ReportViewer is painted with a beige gradient
   image served by the control. Flat muted strip instead; the report body below it
   is generated from the .rdlc templates and is not touched here. */
:where(#right) div[style*="ReportViewerWebControl.axd" i][style*="background-image" i] {
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius-sm);
    background-image: none !important;
    background-color: var(--bo-muted) !important;
}

/* ---------------------------------------------------------------- page: Members/GlobalConfig */

/* The TextFlag column holds long unbroken values (keys, tokens, URL lists). They
   cannot wrap, so the grid grew to several screens wide, the page scrolled
   sideways, and the Comment column was squeezed into three-line cells.
   Let that one column break anywhere and give Comment a readable width; the grid
   then fits the card. Scoped to this page's two grids by id. */
:where(#right) table[id$="gv_GlobalConfig"],
:where(#right) table[id$="dv_GlobalConfig"] {
    width: 100% !important;
    max-width: 1100px;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > td {
    vertical-align: top;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > :is(td, th):nth-child(1) {
    min-width: 220px;
    text-align: left;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > :is(td, th):nth-child(2),
:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > :is(td, th):nth-child(3) {
    white-space: nowrap;
    text-align: right;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > :is(td, th):nth-child(4) {
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-all;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > td:nth-child(4) {
    color: var(--bo-muted-fg);
    font-family: Consolas, "Roboto Mono", monospace;
    font-size: 12px;
}

:where(#right) table[id$="gv_GlobalConfig"] > tbody > tr > td:last-child {
    white-space: nowrap;
}

:where(#right) table[id$="dv_GlobalConfig"] > tbody > tr > td {
    text-align: left;
    overflow-wrap: anywhere;
}

:where(#right) table[id$="dv_GlobalConfig"] > tbody > tr > td:first-child {
    width: 160px;
    color: var(--bo-muted-fg);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- dialog form pages, second pass */

/* Insert VatConfig (GetVatInfo.aspx) still scrolled and lost its OK button:
   1. a text box followed by something in the same cell (the "%" unit, a "*"
      validator) no longer fitted the fixed-width cell, so the unit wrapped under
      the box and added a line;
   2. rows that only hold validation messages take a full line even while the
      messages are hidden (ASP.NET hides them with visibility:hidden, which keeps
      their space);
   3. two <br> in a row are used as a spacer above the button. */
.boPopup--form td:has(> input[type="text"] + *),
.boPopup--form td:has(> input[type="password"] + *) {
    white-space: nowrap;
}

.boPopup--form td > input[type="text"]:has(+ *),
.boPopup--form td > input[type="password"]:has(+ *) {
    width: 140px;
}

/* a cell whose only content is hidden validators: no height until one shows
   (the inline style flips to visibility:visible and this stops matching) */
.boPopup--form td:has(> span[style*="visibility:hidden" i]):not(:has(> :not(span[style*="visibility:hidden" i]))) {
    padding: 0;
    font-size: 0;
    line-height: 0;
}

.boPopup--form td:has(> span[style*="visibility:hidden" i]):not(:has(> :not(span[style*="visibility:hidden" i]))) > span {
    font-size: 0 !important;
}

.boPopup--form br + br {
    display: none;
}

/* ---------------------------------------------------------------- shop name popover (page title strip) */

/* Hovering the shop name in the title strip shows "Shop Name / Address /
   Telphone". The master builds it as <em>label</em><br>value<br>... inside the
   link, so it inherited the link's large bold italic look and sat on top of the
   name. It is now a small info card: muted caption labels, normal-weight values,
   opened just under the name. */
#right .righttop a.tooltip:hover div {
    top: 100%;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 280px;
    margin-top: 6px;
    padding: 12px 14px 14px;
    border: 1px solid var(--bo-input);
    border-radius: var(--bo-radius);
    background: var(--bo-card);
    box-shadow: var(--bo-modal-shadow);
    color: var(--bo-fg);
    font-size: 13px;
    font-weight: 400;
    line-height: 19px;
    overflow-wrap: anywhere;
}

#right .righttop a.tooltip div em {
    display: block;
    margin: 10px 0 2px;
    padding: 0;
    color: var(--bo-muted-fg);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 16px;
    text-transform: uppercase;
}

#right .righttop a.tooltip div em:first-child {
    margin-top: 0;
}

/* the <br> right after a label and right before the next one only existed to
   put label and value on separate lines; the labels are blocks now */
#right .righttop a.tooltip div em + br,
#right .righttop a.tooltip div br:has(+ em) {
    display: none;
}

/* the name itself: a dotted underline says "there is more on hover" */
#right .righttop a.tooltip {
    border-bottom: 1px dotted currentColor;
    cursor: default;
}

/* ---------------------------------------------------------------- page skin: selectable (menu editor) */

/* The menu editor pages (Epos_Shop/NewMenu: MenuManager, PizzaManager,
   CommentManager) are where staff sit for hours. A light grey-white screen all day
   is tiring, so these pages offer softer working-area colours, picked with a small
   switch in the top-right corner: Default (the standard palette), Warm (the cream
   of the selected row - what was asked for) and Green (the usual "eye care" tint).
   script/pageTheme.js puts class "boWarm" / "boGreen" on <html> and remembers the
   choice in localStorage; the three pages share one setting.

   The tokens are re-declared on #right, so only the working area changes: the top
   bar and the left menu are outside #right and keep the standard palette.

   The editor's dialogs (Meal / Bundle Edit, AutoComplete, Import ...) are iframes,
   i.e. separate documents that inherit nothing from this page. The page script
   copies the theme class onto each iframe's <html>, and the same tokens are
   declared on body.boPopup there, so a dialog opens in the colour of the page
   behind it.

   .confirmBox (script/common.js: Select Landing Page, delete confirmations ...) and
   jQuery UI dialogs are appended straight to <body>, outside #right, so they are
   listed too - otherwise they are the one grey sheet left on a tinted page.

   Because the card itself is now the old "selected" tint, every tint that used to
   mean something against it moves one step deeper: selected row, current cell,
   buttons. Keep that ladder if a value here is changed. */
.boWarm #right,
.boWarm body.boPopup,
.boWarm .confirmBox,
.boWarm .ui-dialog {
    --bo-bg: #f3e6cf;
    --bo-card: #fdf3e3;
    --bo-field: #fffaf0;
    --bo-row-alt: #faedd9;
    --bo-secondary: #f1e1c6;
    --bo-muted: #f5e7cf;
    --bo-muted-fg: #6f6456;
    --bo-hint: #9a8f80;
    --bo-border: #eedfc4;
    --bo-table-edge: #e2cfab;
    --bo-frame: #e8d8ba;
    --bo-input: #d6c19a;
    --bo-primary-lighter: #ffe0b0;
    --bo-primary-light: #ffcc85;
    --bo-btn-bg: #ffe3ba;
    --bo-btn-border: #f6c98a;
    --bo-btn-bg-hover: #ffd08f;
}

.boGreen #right,
.boGreen body.boPopup,
.boGreen .confirmBox,
.boGreen .ui-dialog {
    --bo-bg: #dde8d6;
    --bo-card: #ecf4e6;
    --bo-field: #f8fcf5;
    --bo-row-alt: #e5efde;
    --bo-secondary: #dae6d1;
    --bo-muted: #dfead7;
    --bo-muted-fg: #5b6956;
    --bo-hint: #889483;
    --bo-border: #d3e0ca;
    --bo-table-edge: #c0d1b5;
    --bo-frame: #cbdac1;
    --bo-input: #afc3a3;
}

/* the switch itself: three round swatches after "Currency" in the page header.
   It shows each theme's own card colour, so it reads without labels (titles on hover). */
.boThemeSwitch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    vertical-align: middle;
}

.boThemeSwitch button {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    cursor: pointer;
}

.boThemeSwitch button[data-theme="default"] {
    background: #f6f7f9;
}

.boThemeSwitch button[data-theme="warm"] {
    background: #fdf3e3;
}

.boThemeSwitch button[data-theme="green"] {
    background: #ecf4e6;
}

.boThemeSwitch button.active {
    border-color: var(--bo-primary);
    box-shadow: 0 0 0 2px rgba(245, 124, 0, 0.35);
}

/* the cell being edited was a pale yellow that disappears on cream */
.boWarm #right .editControl,
.boWarm body.boPopup .editControl {
    background: #fffdf6 !important;
}

.boWarm #right .partOfBundleDish td,
.boWarm body.boPopup .partOfBundleDish td {
    background: #f6ecd8;
}

} /* end of the @supports compatibility gate */
