/* POS: colours come from the DevExtreme custom themes (wwwroot/css/devextreme/dx.fluent.custom-{light|dark}.blue.css,
   swapped by shell.js). Every template token below is derived from the --dx-* variables of the loaded theme,
   so the whole app follows the DevExtreme light/dark theme. Loaded after theme.css, before dx-overrides.css. */
:root, [data-theme=dark] {
    --bg: var(--dx-color-main-bg); --fg: var(--dx-color-text); --card: var(--dx-component-color-bg); --border: var(--dx-color-border); --input: var(--dx-color-border);
    --muted: color-mix(in srgb, var(--dx-color-text) 6%, var(--dx-component-color-bg)); --muted-fg: color-mix(in srgb, var(--dx-color-text) 62%, var(--dx-component-color-bg));
    --primary: var(--dx-color-primary); --primary-h: color-mix(in srgb, var(--dx-color-primary) 82%, #000); --primary-mid: var(--dx-color-link); --primary-fg: #fff;
    --primary-soft: color-mix(in srgb, var(--dx-color-primary) 9%, var(--dx-component-color-bg)); --primary-soft2: color-mix(in srgb, var(--dx-color-primary) 18%, var(--dx-component-color-bg));
    --ring: color-mix(in srgb, var(--dx-color-primary) 40%, transparent); --navy: color-mix(in srgb, var(--dx-color-primary) 85%, #000);
    --success: var(--dx-color-success); --success-fg: var(--dx-color-success); --success-soft: color-mix(in srgb, var(--dx-color-success) 13%, var(--dx-component-color-bg));
    --warning: var(--dx-color-warning); --warning-fg: color-mix(in srgb, var(--dx-color-warning) 55%, var(--dx-color-text)); --warning-soft: color-mix(in srgb, var(--dx-color-warning) 16%, var(--dx-component-color-bg));
    --danger: var(--dx-color-danger); --danger-fg: var(--dx-color-danger); --danger-soft: color-mix(in srgb, var(--dx-color-danger) 13%, var(--dx-component-color-bg));
    --info: var(--dx-color-primary); --info-fg: var(--dx-color-primary); --info-soft: color-mix(in srgb, var(--dx-color-primary) 10%, var(--dx-component-color-bg));
    --sb-grad: var(--dx-component-color-bg);
}
/* The dark primary (#154182) is too dim on dark surfaces: lighten it for text, links and buttons. */
[data-theme=dark] {
    --primary: color-mix(in srgb, var(--dx-color-primary) 55%, #fff); --primary-h: color-mix(in srgb, var(--dx-color-primary) 40%, #fff); --primary-mid: color-mix(in srgb, var(--dx-color-primary) 40%, #fff);
    --primary-fg: #0b1a33; --info: var(--primary); --info-fg: var(--primary); --warning-fg: var(--dx-color-warning);
}

/* Small DevExtreme buttons (same size as the template .btn-sm). */
.dx-button { height: 30px !important; min-height: 30px !important; font-size: .8125rem !important; }
.dx-button .dx-button-content { height: 100%; padding: 0 .75rem !important; display: flex; align-items: center; justify-content: center; }
.dx-button .dx-button-text { font-size: .8125rem !important; line-height: 1 !important; text-transform: none; }
.dx-button .dx-icon { font-size: 14px !important; width: 14px !important; height: 14px !important; line-height: 14px !important; }
.dx-button.dx-button-has-icon:not(.dx-button-has-text) .dx-button-content { padding: 0 !important; width: 30px; }

/* Narrower side menu (template default is 18rem). */
:root { --sb-w: 14.5rem; }

/* Style adopted from FCRevSys: sentence-case table headers, single-line cells, compact stat values. */
.table th { font-size: .8125rem; text-transform: none; letter-spacing: normal; }
.table td, .table th { white-space: nowrap; }
.stat .val { font-size: 1.35rem; white-space: nowrap; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.p-6 { padding: 1.5rem; }
.mt-5 { margin-top: 1.25rem; }
.pt-4 { padding-top: 1rem; }
.text-base { font-size: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Page title section stays visible under the top bar while the page content scrolls. */
.page-head { position: sticky; top: var(--hd-h); z-index: 30; background: var(--bg); display: flex; justify-content: flex-end; align-items: center; margin: -1rem -1rem .75rem; padding: .5rem 1rem; border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .page-head { margin: -1.5rem -1.5rem 1rem; padding: .5rem 1.5rem; } }

/* Current page title shown in the top bar. */
.hd-title { margin-left: .25rem; padding-left: 1rem; border-left: 1px solid rgba(255, 255, 255, .25); font-size: 1rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 639px) { .hd-title { padding-left: .5rem; font-size: .9375rem; } }
.brand-logo { height: 34px; width: auto; border-radius: 4px; display: block; }

/* Image upload box (Tailwind-style: dashed rounded drop zone, preview, hover and drag states). Ported from FCRevSys. */
.pd { margin-top: .25rem; }
.pd-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pd-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 170px; padding: 1.25rem; border: 2px dashed var(--border); border-radius: .75rem; background: var(--muted); cursor: pointer; text-align: center; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.pd-zone:hover, .pd.drag .pd-zone { border-color: var(--primary); background: var(--primary-soft); }
.pd.drag .pd-zone { box-shadow: 0 0 0 4px var(--primary-soft2); }
.pd-ph { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.pd-icon { width: 2.5rem; height: 2.5rem; color: var(--primary); }
.pd-title { font-size: .875rem; color: var(--muted-fg); }
.pd-title b { color: var(--primary); font-weight: 600; }
.pd-hint { font-size: .75rem; color: var(--muted-fg); }
.pd-img { display: none; width: 8rem; height: 8rem; border-radius: .75rem; object-fit: cover; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--primary), 0 4px 10px rgba(0, 0, 0, .15); background: var(--card); }
.pd-over { display: none; font-size: .75rem; color: var(--muted-fg); }
.pd.has-img .pd-img { display: block; }
.pd.has-img .pd-ph { display: none; }
.pd.has-img .pd-over { display: block; }
.pd-bar { display: none; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; padding: .4rem .5rem .4rem .75rem; border: 1px solid var(--border); border-radius: .5rem; font-size: .8rem; }
.pd-bar.pd-bar-on { display: flex; }
.pd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-fg); }

[hidden] { display: none !important; }

/* General Sales (Sales/GeneralSales). */
.gs-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.gs-bar .dx-texteditor-input, .gs-bar .dx-placeholder, .gs-bar .dx-placeholder::before, .gs-bar .dx-dropdowneditor-input-wrapper .dx-texteditor-input { font-size: .8125rem !important; }
.gs-bar .dx-dropdowneditor-icon::before { font-size: 16px; }
.gs-filter-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .25rem 1rem; align-items: end; }
.gs-filter-b .field { margin-bottom: 0; }
.gs-type { display: inline-flex; }
.gs-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .gs-grid { grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr); } }
.gs-add { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: end; }
.gs-add .gs-qty { width: 110px; }
.gs-add .grow { min-width: 220px; margin-bottom: 1rem; }
.gs-basket .input { width: 100%; text-align: right; padding: .3rem .5rem; }
.gs-basket .basket-price::-webkit-inner-spin-button, .gs-basket .basket-price::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gs-basket .basket-price { -moz-appearance: textfield; }
.gs-empty { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 2.5rem 1rem; color: var(--muted-fg); text-align: center; }
.gs-empty .ic { width: 2.5rem; height: 2.5rem; opacity: .5; }
.gs-side { display: grid; gap: 1rem; min-width: 0; }
.gs-total { border-radius: .75rem; padding: 1rem 1.25rem; color: #fff; background: linear-gradient(135deg, var(--navy), var(--primary)); text-align: center; }
.gs-total-lbl { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.gs-total-val { font-size: 2.4rem; font-weight: 700; line-height: 1.15; }
.gs-total-sub { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; opacity: .85; margin-top: .35rem; }
.gs-customer { display: flex; gap: .5rem; align-items: stretch; }
.gs-customer > :first-child { flex: 1 1 auto; min-width: 0; }
.field.fi { display: flex; align-items: center; gap: .75rem; }
label, .label, .dx-field-item-label-text, .dx-field-label { font-weight: 700; }
.field.fi > .label { flex: 0 0 6.5rem; margin: 0; }
.field.fi > :not(.label) { flex: 1 1 auto; min-width: 0; }
.gs-sec { margin: .75rem 0 .5rem; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-fg); }
.gs-check { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; font-weight: 600; font-size: .875rem; cursor: pointer; }
.gs-pay-h { display: flex; align-items: center; justify-content: space-between; }
.gs-pay-h .btn { padding: .15rem .4rem; }
.gs-addpay { margin-top: .5rem; }
.gs-sum { margin: 1rem 0; padding: .5rem .85rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--muted); }
.gs-save { width: 100%; height: 2.75rem; justify-content: center; font-size: 1rem; }

/* User Settings: groups list beside the roles grid. */
.ug-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .ug-grid { grid-template-columns: 340px 1fr; } }

/* My Profile page (Auth/Profile). */
.pf-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1000px) { .pf-grid { grid-template-columns: 320px 1fr; } }
.pf-main { display: grid; gap: 1.25rem; min-width: 0; }
.pf-cover { height: 96px; border-radius: .75rem .75rem 0 0; background: linear-gradient(135deg, var(--navy), var(--primary) 70%, color-mix(in srgb, var(--primary) 70%, #fff)); }
.pf-side-b { text-align: center; padding-top: 0; }
.pf-avatar { width: 96px; height: 96px; margin: -48px auto .75rem; border-radius: 50%; background: var(--primary-soft2); color: var(--primary); border: 4px solid var(--card); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; }
.pf-name { margin: 0 0 .15rem; font-size: 1.25rem; }
.pf-sub { font-size: .85rem; color: var(--muted-fg); margin-bottom: .6rem; }
.pf-badges { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-bottom: 1rem; }
.pf-facts { margin: 0; text-align: left; border-top: 1px solid var(--border); }
.pf-facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.pf-facts dt { color: var(--muted-fg); }
.pf-facts dd { margin: 0; font-weight: 600; text-align: right; }
.pf-facts-flat { border-top: 0; }
.pf-signout { margin-top: 1rem; width: 100%; justify-content: center; }
.pf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.pf-fields .pf-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .pf-fields { grid-template-columns: 1fr; } }
.pf-pw { position: relative; }
.pf-pw .input { padding-right: 2.4rem; width: 100%; }
.pw-toggle { position: absolute; right: .35rem; top: 1.85rem; background: none; border: 0; padding: .3rem; color: var(--muted-fg); cursor: pointer; display: inline-flex; border-radius: .4rem; }
.pw-toggle:hover { color: var(--fg); background: var(--muted); }
.pw-toggle .ic { width: 1rem; height: 1rem; }
.pf-meter { height: 6px; border-radius: 9999px; background: var(--muted); overflow: hidden; margin-top: .4rem; }
.pf-meter span { display: block; height: 100%; width: 0; border-radius: 9999px; background: var(--danger); transition: width .2s, background-color .2s; }
.pf-meter span.s2 { background: var(--warning); }
.pf-meter span.s3 { background: var(--info); }
.pf-meter span.s4 { background: var(--success); }
.pf-meter-text { margin: .3rem 0 .4rem; font-size: .75rem; color: var(--muted-fg); }
.pf-rules { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem 1rem; font-size: .8rem; color: var(--muted-fg); }
.pf-rules li::before { content: "\25CB"; display: inline-block; width: 1.2rem; }
.pf-rules li.ok { color: var(--success-fg); }
.pf-rules li.ok::before { content: "\2713"; color: var(--success); font-weight: 700; }

/* Sign-in page (Auth/Login). */
.lg-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 900px) { .lg-wrap { grid-template-columns: minmax(380px, 5fr) 6fr; } }
.lg-brand { display: none; position: relative; flex-direction: column; justify-content: space-between; padding: 2.5rem; color: #fff; background: linear-gradient(150deg, var(--navy), var(--primary) 70%, color-mix(in srgb, var(--primary) 70%, #fff)); overflow: hidden; }
@media (min-width: 900px) { .lg-brand { display: flex; } }
.lg-brand::before, .lg-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.lg-brand::before { width: 26rem; height: 26rem; right: -9rem; top: -8rem; }
.lg-brand::after { width: 18rem; height: 18rem; left: -6rem; bottom: -6rem; }
.lg-brand > * { position: relative; z-index: 1; }
.lg-brand-top { display: flex; align-items: center; gap: .75rem; font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; }
.lg-logo { background: #fff; color: var(--primary); padding: .2rem .65rem; border-radius: .4rem; font-size: .95rem; }
.lg-brand-body h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 1rem; color: #fff; }
.lg-brand-body p { font-size: 1.05rem; opacity: .85; max-width: 26rem; }
.lg-points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .85rem; }
.lg-points li { display: flex; align-items: center; gap: .75rem; font-size: .95rem; }
.lg-points .ic { width: 2.1rem; height: 2.1rem; padding: .5rem; border-radius: .6rem; background: rgba(255, 255, 255, .15); flex: none; }
.lg-brand-foot { font-size: .8rem; opacity: .7; }
.lg-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.lg-theme { position: absolute; top: 1rem; right: 1rem; color: var(--fg); }
.lg-theme:hover { color: var(--primary); background: var(--muted); }
.lg-card { width: 100%; max-width: 26rem; }
.lg-head { margin-bottom: 1.5rem; }
.lg-head .ico-box { margin-bottom: 1rem; }
.lg-head h2 { font-size: 1.75rem; margin: 0 0 .35rem; }
.lg-head p { color: var(--muted-fg); margin: 0; }
.lg-alert { margin-bottom: 1rem; }
.lg-input { position: relative; }
.lg-input > .ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 1.05rem; height: 1.05rem; color: var(--muted-fg); pointer-events: none; }
.lg-input .input { width: 100%; padding-left: 2.5rem; padding-right: 2.6rem; height: 2.75rem; }
.lg-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .45rem; border-radius: .4rem; color: var(--muted-fg); display: inline-flex; cursor: pointer; }
.lg-eye:hover { color: var(--fg); background: var(--muted); }
.lg-eye .ic { position: static; transform: none; width: 1.05rem; height: 1.05rem; }
.lg-err { min-height: 1.1rem; margin-top: .25rem; font-size: .78rem; color: var(--danger); }
.field.has-error .input { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.lg-caps { margin-top: .15rem; font-size: .78rem; color: var(--warning-fg); display: flex; align-items: center; gap: .3rem; }
.lg-caps .ic { width: .9rem; height: .9rem; }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .5rem 0 1.25rem; font-size: .85rem; }
.lg-check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.lg-submit { width: 100%; height: 2.75rem; justify-content: center; font-size: .95rem; }
.lg-submit.loading { opacity: .8; cursor: progress; }
.lg-foot { margin-top: 1.5rem; text-align: center; font-size: .8rem; color: var(--muted-fg); }
.lg-shake { animation: lg-shake .45s; }
@keyframes lg-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* Summary panels of the Add Stock popup. */
.sp-card { border: 1px solid var(--border); border-radius: .75rem; padding: .9rem 1rem; background: var(--muted); }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 0; font-size: .875rem; border-bottom: 1px dashed var(--border); }
.sp-row:last-child { border-bottom: 0; }

/* Store view card (View Store popup). */
.sv-head { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.sv-logo { position: relative; flex: none; width: 5rem; height: 5rem; border-radius: .75rem; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--primary-soft2); color: var(--primary); font-weight: 700; font-size: 1.5rem; border: 1px solid var(--border); }
.sv-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sv-title { font-size: 1.2rem; font-weight: 700; margin-bottom: .25rem; }
.sv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.25rem; }
.sv-wide { grid-column: 1 / -1; }
.sv-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); margin-bottom: .15rem; }
.sv-value { font-size: .9rem; word-break: break-word; }
.sv-actions { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (max-width: 560px) { .sv-grid { grid-template-columns: 1fr; } }

/* Transaction details: three columns, field names highlighted with the primary colour (no badge). */
.sv-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sv-grid3 .sv-label { color: var(--primary); font-weight: 700; }
@media (max-width: 760px) { .sv-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sv-grid3 { grid-template-columns: 1fr; } }

/* DevExtreme Form labels are bold. */
.dx-form .dx-field-item-label-text, .dx-form .dx-field-item-label-content, .dx-field-item-label-text { font-weight: 700 !important; }

/* DevExtreme draws its own placeholder (.dx-placeholder); hide the native one so it is not shown twice (search box of lookups). */
.dx-texteditor-input::placeholder, .dx-texteditor-input::-moz-placeholder { color: transparent !important; opacity: 0 !important; }

/* Cancelled rows of a grid keep their colour when hovered, focused or selected (Sales/SalesTransactions). */
.dx-datagrid-rowsview .dx-row.row-cancelled > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-state-hover > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td.dx-focused,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-selection > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-selection.dx-state-hover > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-alt > td { background-color: var(--danger-soft) !important; color: var(--fg) !important; }
/* No focus border around a focused cancelled row or its cells. */
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td.dx-focused,
.dx-datagrid-rowsview .dx-row.row-cancelled > td.dx-focused { outline: none !important; box-shadow: none !important; border-color: transparent !important; }
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td::before,
.dx-datagrid-rowsview .dx-row.row-cancelled.dx-row-focused > td::after,
.dx-datagrid-rowsview .dx-row.row-cancelled > td.dx-focused::before,
.dx-datagrid-rowsview .dx-row.row-cancelled > td.dx-focused::after { display: none !important; }

/* General Sales basket: only the icon of the remove button is red (the button keeps the ghost style). */
.gs-basket .basket-del i, .gs-basket .basket-del svg { color: var(--danger) !important; stroke: var(--danger) !important; }

/* Sales/EndOfDay: the chosen session (details, figures, payments, sales) and the close panel on the right. */
.eod-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1.1fr); gap: 1rem; align-items: start; }
.eod-side { position: sticky; top: 5.5rem; }
@media (max-width: 1100px) { .eod-grid { grid-template-columns: minmax(0, 1fr); } .eod-side { position: static; } }
.eod-who { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.eod-avatar { flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary); color: var(--primary-fg); font-weight: 700; font-size: 1.2rem; }
.eod-who-text { flex: 1 1 10rem; min-width: 0; }
.eod-pay { display: grid; gap: .85rem; }
.eod-pay-top { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.eod-pay-name { flex: 1 1 auto; font-weight: 600; }
.eod-pay-total { padding-top: .75rem; border-top: 1px solid var(--border); }
.eod-pay-total .eod-pay-amt { font-size: 1.05rem; }
.eod-sum { display: grid; gap: .5rem; }
.eod-net { padding: .5rem .75rem; border-radius: .5rem; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 1.05rem; }
.eod-warn { margin-top: .75rem; padding: .5rem .75rem; border-radius: .5rem; background: var(--warning-soft); color: var(--warning-fg); font-size: .8125rem; }

/* Inventory/StockRequest: two fields side by side in the request popup. */
.sr-top { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.25rem; }
@media (max-width: 560px) { .sr-top { grid-template-columns: 1fr; } }
.sr-readonly { padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); font-weight: 600; min-height: 2.25rem; }

/* Stock Transfer: grouped transfer, requested items and delivery details. */
.st-form { display: grid; gap: 1rem; }
.st-section { padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--card); min-width: 0; }
.st-section-head { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: 1rem; }
.st-section-head h3 { margin: 0; font-size: .9375rem; font-weight: 700; }
.st-section-head p { margin: .2rem 0 0; font-size: .8125rem; color: var(--muted-fg); }
.st-section .text-danger { color: var(--danger); }
.st-section .field { min-width: 0; margin-bottom: 0; }
.st-request-context { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: .75rem; margin-top: 1rem; border-radius: .5rem; background: var(--primary-soft); font-size: .8125rem; overflow-wrap: anywhere; }
.st-request-context .sv-label { color: var(--primary); font-weight: 700; }
.st-request-option { display: grid; gap: .2rem; padding: .25rem 0; white-space: normal; overflow-wrap: anywhere; }
.st-items-wrap { max-height: 300px; overflow: auto; }
.st-items { min-width: 700px; }
.st-items th { position: sticky; top: 0; z-index: 1; background: var(--muted); }
.st-items .ti-name { min-width: 170px; max-width: 250px; white-space: normal; overflow-wrap: anywhere; }
.st-items .ti-qty { width: 110px; text-align: right; }
.st-items .ti-qty:disabled { opacity: .5; cursor: not-allowed; }
.st-item-summary:not(:empty) { margin-top: .75rem; padding: .65rem .75rem; border-radius: .5rem; background: var(--primary-soft); color: var(--primary); font-size: .875rem; font-weight: 700; }
@media (max-width: 560px) { .st-section { padding: .75rem; } .st-request-context { grid-template-columns: 1fr; } }

/* Home dashboard: the chart beside a column of figure cards. */
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 1rem; align-items: stretch; }
.dash-side { display: grid; gap: 1rem; align-content: start; }
@media (max-width: 1023px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dash-side { grid-template-columns: minmax(0, 1fr); } }

/* SystemAdmin/UserSettings, Change User Store popup: Unassigned Stores and Assigned Stores grids side by side. */
.us-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.us-grid .card-h .btn { flex: none; }
@media (max-width: 720px) { .us-grid { grid-template-columns: 1fr; } }

/* Orange DevExtreme button (no orange button type in DevExtreme): SystemAdmin/UserSettings, Reset Password. */
.dx-button.dx-btn-orange { color: #ea580c; border-color: #ea580c; }
.dx-button.dx-btn-orange .dx-icon { color: #ea580c; }
.dx-button.dx-btn-orange.dx-state-hover, .dx-button.dx-btn-orange.dx-state-focused { background-color: rgba(234, 88, 12, .1); }
.dx-button.dx-btn-orange.dx-state-active { background-color: rgba(234, 88, 12, .2); }

/* Item image thumbnail in the item grids (ItemThumbHtml in Globals.js). */
.item-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: .5rem; overflow: hidden; background: var(--primary-soft2); color: var(--primary); font-weight: 700; font-size: .75rem; }
.item-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.item-cell { display: flex; align-items: center; gap: .75rem; }
