/* ============================================================================
   COREX till - the other screens (UI upgrade, Wave C)
   ----------------------------------------------------------------------------
   Products, Offers, Receive, Suppliers, Repairs, Reports, Insights, Team,
   Settings, the sign-in, the receipt and the toasts, drawn with the design
   system's tokens (ui.css). Loaded after app.css and corex-v2.css, so where an
   older rule disagrees this one wins; nothing here names a colour literal,
   and every side is a logical property (the till reads right to left too).
   Phone = max-width 760px, the same line ui.css and app.css draw.
   ========================================================================= */

/* a hidden thing stays hidden whatever display an older rule gave it */
.pfix-row[hidden], .prod-lensbar [hidden], .cx-seg [hidden] { display: none !important; }

/* ---------------------------------------------------------------- PRODUCTS */
.prod-bar { align-items: center; }
.prod-bar .search-cam { flex: 1 1 260px; }
@media (max-width: 760px) { .prod-bar .search-cam { flex: 1 1 100%; } }
.prod-filters-btn { display: none; }                  /* a computer shows the filters itself */
.prod-filters.lens-off { display: none; }

.prod-lensbar { display: flex; align-items: center; gap: var(--cx-space-3); flex-wrap: wrap; margin-block: var(--cx-space-2) var(--cx-space-3); }
.prod-lensbar .cx-seg { min-height: 50px; }
.prod-lensbar .cx-seg > button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: var(--cx-space-1); }
.fix-total {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding-inline: 6px;
  margin-inline-start: var(--cx-space-1); border-radius: var(--cx-radius-pill);
  background: var(--cx-warning-soft); color: var(--cx-warning); font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-bold);
}

/* the Fix list: one row for each way the catalogue says something is wrong */
.prod-fix { display: flex; flex-direction: column; gap: var(--cx-space-2); margin-block-end: var(--cx-space-4); }
.pfix-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t n" "d n"; align-items: center; column-gap: var(--cx-space-3);
  min-height: var(--cx-hit); padding: var(--cx-space-3) var(--cx-space-4); text-align: start; cursor: pointer;
  background: var(--cx-surface); color: var(--cx-text); border: 1px solid var(--cx-border); border-radius: var(--cx-radius-lg);
  font: inherit;
}
.pfix-row:hover { background: var(--cx-surface-2); }
.pfix-t { grid-area: t; font-weight: var(--cx-fw-semibold); }
.pfix-d { grid-area: d; font-size: var(--cx-fs-sm); color: var(--cx-text-muted); }
.pfix-row b {
  grid-area: n; min-width: 36px; text-align: center; padding: 2px 10px; border-radius: var(--cx-radius-pill);
  background: var(--cx-surface-2); font-size: var(--cx-fs-lg); font-variant-numeric: tabular-nums;
}
.pfix-row.has-warn b { background: var(--cx-warning-soft); color: var(--cx-warning); }
.pfix-row.active { border-color: var(--cx-accent); background: var(--cx-accent-soft); }

/* A table as card rows on a phone (data-pri, components §4): one identity and
   one amount on the first line, up to four quiet lines under it, one status or
   quantity at the end. A table says which cell is which with a class:
   c-name (identity), c-amt (the amount), c-line (a quiet line; data-l is its
   label), c-end (status / quantity, bottom end), c-hide (not on a phone). */
@media (max-width: 760px) {
  .prod-filters-btn { display: inline-flex; align-items: center; }
  .prod-filters { display: none; flex-direction: column; align-items: stretch; width: 100%; }
  .prod-filters.open { display: flex; }
  .prod-filters .select, .prod-filters .month-pick { width: 100%; }
  .prod-filters .month-pick { justify-content: space-between; }
  .prod-bar .btn-ghost, .prod-bar .btn-primary { min-height: var(--cx-hit); }

  table.data.cx-cards { display: block; font-size: var(--cx-fs-body); min-width: 0; }
  table.data.cx-cards thead { display: none; }
  table.data.cx-cards tbody { display: flex; flex-direction: column; gap: var(--cx-space-2); }
  table.data.cx-cards tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--cx-space-3); row-gap: 2px;
    min-height: var(--cx-hit); padding: var(--cx-space-3) var(--cx-space-4);
    background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius-lg);
  }
  table.data.cx-cards tbody tr:hover { background: var(--cx-surface-2); }
  table.data.cx-cards tbody td { display: block; padding: 0; border: 0; min-width: 0; text-align: start; }
  table.data.cx-cards td.chk { grid-column: 1 / -1; }
  table.data.cx-cards td.c-name { grid-column: 1; grid-row: 1; font-weight: var(--cx-fw-semibold); overflow-wrap: anywhere; }
  table.data.cx-cards td.c-amt { grid-column: 2; grid-row: 1; text-align: end; font-weight: var(--cx-fw-bold); }
  table.data.cx-cards td.c-line { grid-column: 1; font-size: var(--cx-fs-sm); color: var(--cx-text-muted); overflow-wrap: anywhere; }
  table.data.cx-cards td.c-end { grid-column: 2; grid-row: 2 / span 3; align-self: end; text-align: end; }
  table.data.cx-cards td[data-l]::before { content: attr(data-l) ": "; color: var(--cx-text-muted); font-weight: var(--cx-fw-regular); font-size: var(--cx-fs-sm); }
  table.data.cx-cards td.c-hide, table.data.cx-cards td.is-empty { display: none; }
  body.hide-cost table.data.cx-cards td.cost-col { display: none; }
  /* a colspan row (the empty line) is one plain block */
  table.data.cx-cards tbody tr:has(> td[colspan]) { display: block; }
}

/* ------------------------------------------------- OFFERS and INSIGHTS: parts */
/* a part of a merged tab has no tab of its own (its button stays in the DOM, hidden) */
.cx-hubtab[data-into] { display: none; }
.ofr-parts, .ins-parts { margin-block-end: var(--cx-space-3); }
.ofr-parts > button, .ins-parts > button { white-space: nowrap; }
.ofr-parts[hidden], .ins-parts[hidden] { display: none; }
/* a switch with more options than fit in a phone's width scrolls inside itself */
.cx-seg--scroll { display: flex; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.cx-seg--scroll::-webkit-scrollbar { display: none; }
.cx-seg--scroll > button { flex: 0 0 auto; white-space: nowrap; }
.ins-lists { margin-block-end: var(--cx-space-3); }

/* figures' labels are sentences, not shouting (the design system: no capitals, no tracking) */
#view-reports .kpi-label, #view-insights .kpi-label, #view-marketing .kpi-label, #view-buy .kpi-label,
#view-suppliers .kpi-label, #view-maintenance .kpi-label {
  text-transform: none; letter-spacing: 0; font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-semibold);
}

/* ---------------------------------------------------------- RECEIVE, SUPPLIERS */
.recv-meta span, .receive .cart-head h2 { text-transform: none; letter-spacing: 0; font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-semibold); color: var(--cx-text-muted); }
.receive .cart-head h2 { font-size: var(--cx-fs-lg); color: var(--cx-text); }
#recvLines .cline-del, #clearRecv, #purchasesBtn, #purchasesBtn2 { min-width: var(--cx-hit); min-height: var(--cx-hit); }
#recvLines .cline-ctl { flex-wrap: wrap; row-gap: var(--cx-space-2); }
#recvLines input[data-rc]::placeholder { color: var(--cx-text-muted); font-weight: var(--cx-fw-regular); }
.sup-pos { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius-lg); }
.sup-pos-cell span { text-transform: none; letter-spacing: 0; font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-semibold); color: var(--cx-text-muted); }
#supAcctModal .mini-btn, #supAcctModal .btn-ghost, #supAcctModal .btn-primary { min-height: var(--cx-hit); }

/* ------------------------------------------------------------------ REPAIRS */
/* a finished job: the sign is a tick in a neutral pill (never colour alone) */
.cx-pill--done::before { content: "✓"; }
.cx-pill--done { background: var(--cx-surface-2); color: var(--cx-text-muted); }
#repTable tr[data-rep] { cursor: pointer; }
#view-maintenance .toolbar { align-items: center; }
@media (max-width: 760px) {
  #view-maintenance .toolbar > .cx-seg { flex: 1 1 100%; }
  #view-maintenance #addRepair { flex: 1 1 100%; min-height: var(--cx-hit); }
}

/* ------------------------------------------- LABELS: sentences, not shouting */
/* The design system has no capitals, no tracking, nothing under 12 px. The
   older sheets set 10-11 px capitals on labels, table heads and tiles; on the
   screens of this wave they read as sentences. (Arabic never had capitals: this
   also stops the tracking that broke Arabic letters apart.) */
#view-products *, #view-bundles *, #view-promos *, #view-insights *, #view-buy *, #view-marketing *,
#view-receive *, #view-suppliers *, #view-maintenance *, #view-reports *, #view-settings *,
#view-staff *, #view-watchdog *, #view-kwintake *, #view-stock *, #view-floor *,
#prodModal *, #repModal *, #supModal *, #supAcctModal *, #dupModal *, #chkModal * {
  text-transform: none; letter-spacing: 0;
}
:is(#view-products, #view-bundles, #view-promos, #view-insights, #view-buy, #view-marketing, #view-receive,
    #view-suppliers, #view-maintenance, #view-reports, #view-settings, #view-staff, #view-watchdog, #view-stock)
  :is(th, .fld label, .set-row label, .comm-fld label, .hist-head, .hist-kpis span, .biz-tile-l, .mk-score-l, .tlx-stat span, .acct-kpi span, .acct-section-label) {
  font-size: var(--cx-fs-xs);
}

/* ------------------------------------------------------------- TIMELINE */
.tlx-arrow, .tlx-csv { min-width: var(--cx-hit); min-height: var(--cx-hit); display: inline-flex; align-items: center; justify-content: center; }
.tlx-crumb { min-width: var(--cx-hit); min-height: var(--cx-hit); }
.tlx-nav { gap: var(--cx-space-1); }
/* the arrows point the way time goes: earlier is to the left of the line in
   both languages (the time axis never flips), so they do not mirror either */
.tlx-nav, .tlx-plot { direction: ltr; }
[dir="rtl"] .tlx-crumbs { direction: rtl; }

/* ------------------------------------------------------------- REPORTS */
.cmp-tools { gap: var(--cx-space-3); align-items: center; }
#cmpMonths, #cmpDay { min-height: var(--cx-hit); min-width: var(--cx-hit); }
#cmpMonths { min-width: 72px; }
.cmp-tools label { display: flex; align-items: center; gap: var(--cx-space-2); flex-wrap: wrap; }

/* ------------------------------------------------------------- SETTINGS */
.set-seg { margin-block-end: var(--cx-space-4); }
.set-card input:not([type="checkbox"]):not([type="range"]), .set-card select, .set-card textarea { min-height: var(--cx-hit); }
.set-card .btn-primary, .set-card .mini-btn { min-height: var(--cx-hit); }
/* a phone number is read left to right in both languages */
input[type="tel"], .ltr-num { direction: ltr; unicode-bidi: plaintext; }
[dir="rtl"] input[type="tel"] { text-align: end; }
.mono, .pole-code { unicode-bidi: isolate; }
.users-table input.u-name-ar { min-height: var(--cx-hit); width: 100%; }

@media (max-width: 760px) {
  table.data.cx-cards td.c-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--cx-space-2); padding-block-start: var(--cx-space-2); }
  table.data.cx-cards td.c-actions .mini-btn { min-height: var(--cx-hit); }
  table.data.cx-cards td.c-wide { grid-column: 1 / -1; }
  table.data.cx-cards td.u-trust label { display: flex; align-items: center; gap: var(--cx-space-2); min-height: var(--cx-hit); }
  table.data.cx-cards.users-table td.c-end { grid-row: 1; align-self: start; }
  table.data.cx-cards.users-table td.c-name { padding-inline-end: var(--cx-space-2); }
  .users-table input.u-name-ar { width: 100%; }
  table.data.cx-cards tr[hidden] { display: none; }
  .users-table td.c-line select { min-height: var(--cx-hit); width: 100%; }
  .user-add { display: grid; grid-template-columns: 1fr; gap: var(--cx-space-2); }
  .user-add input, .user-add select, .user-add .btn-primary { min-height: var(--cx-hit); width: 100%; }
  .comm-box { display: grid; grid-template-columns: 1fr; gap: var(--cx-space-2); }
}

/* -------------------------------------------------------------- SIGN-IN
   The approved look (design/mock-login.html): the till's own tokens, a
   brand mark with the cyan X, the language as a two-part switch, a visible
   label over each box (16 px, 48 px high, a border you can see), one big
   button, the error in words with a sign, and the person's look (light or
   dark) already on it before anyone types. */
.login-screen {
  background:
    radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--cx-accent-brand) 22%, transparent), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--cx-accent-brand) 12%, transparent), transparent 60%),
    var(--cx-nav-bg);
}
.login-card {
  width: min(400px, 100%); background: var(--cx-surface); color: var(--cx-text);
  border-radius: var(--cx-radius-xl); box-shadow: var(--cx-shadow-3);
  padding: var(--cx-space-6) var(--cx-space-6) var(--cx-space-5);
}
.login-brand { text-align: start; margin-block-end: var(--cx-space-5); padding-inline-end: 128px; min-height: 52px; }
.login-mark { font-size: 34px; font-weight: var(--cx-fw-heavy); line-height: 1; letter-spacing: 0; color: var(--cx-text);
  background: none; -webkit-text-fill-color: currentColor; direction: ltr; text-align: start; }
.login-mark span { color: var(--cx-accent-brand); }
.login-shop { font-size: var(--cx-fs-body); letter-spacing: 0; font-weight: var(--cx-fw-regular); color: var(--cx-text-muted); margin-top: var(--cx-space-1); }
.login-lang {
  inset-block-start: var(--cx-space-6); inset-inline-end: var(--cx-space-6); top: auto; padding: 2px; gap: 2px;
  min-height: 50px; background: var(--cx-surface-2); border: 1px solid var(--cx-border); border-radius: var(--cx-radius-md);
}
.login-lang:hover { background: var(--cx-surface-2); }
.login-lang .lang-sep { display: none; }
.login-lang .lang-en, .login-lang .lang-ar {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; padding: 0 var(--cx-space-3);
  border-radius: 8px; color: var(--cx-text-muted); font-weight: var(--cx-fw-medium);
}
body:not(.ar) .login-lang .lang-en, body.ar .login-lang .lang-ar {
  background: var(--cx-surface); color: var(--cx-accent-ink); font-weight: var(--cx-fw-bold); box-shadow: var(--cx-shadow-1);
}
.login-form { gap: var(--cx-space-4); }
.login-form .cx-field { display: flex; flex-direction: column; gap: 6px; }
.login-form .cx-label { font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-semibold); color: var(--cx-text); text-align: start; }
#loginUser, #loginPass, #loginCode {
  width: 100%; min-height: 48px; padding: 0 var(--cx-space-3); text-align: start; letter-spacing: 0;
  background: var(--cx-surface); color: var(--cx-text); border: 1px solid var(--cx-border-strong); border-radius: var(--cx-radius-md);
  font-size: var(--cx-fs-input);
}
#loginUser:focus, #loginPass:focus, #loginCode:focus { border-color: var(--cx-focus); box-shadow: none; outline: 2px solid var(--cx-focus); outline-offset: 1px; }
#loginCode { text-align: center; font-size: var(--cx-fs-xl); font-feature-settings: var(--cx-num); }
#loginUser::placeholder, #loginPass::placeholder, #loginCode::placeholder { color: var(--cx-text-muted); opacity: 1; }
.login-pw { position: relative; direction: ltr; }
.login-pw #loginPass { padding-inline-end: 52px; }
.login-eye {
  position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; border: 0; border-radius: var(--cx-radius-md); background: transparent;
  color: var(--cx-text-muted); cursor: pointer;
}
.login-eye[aria-pressed="true"] { color: var(--cx-accent-ink); background: var(--cx-accent-soft); }
.login-caps { color: var(--cx-warning); font-size: var(--cx-fs-sm); font-weight: var(--cx-fw-semibold); }
.login-caps::before { content: "! "; font-weight: var(--cx-fw-bold); }
.login-err {
  display: flex; gap: var(--cx-space-2); align-items: flex-start; background: var(--cx-danger-soft); color: var(--cx-danger);
  border-inline-start: 4px solid var(--cx-danger); border-radius: var(--cx-radius-md); padding: var(--cx-space-3);
  font-size: var(--cx-fs-body); font-weight: var(--cx-fw-semibold); text-align: start;
}
.login-err::before { content: "✕"; font-weight: var(--cx-fw-bold); }
.login-err[hidden] { display: none; }
.login-card .btn-complete {
  background: var(--cx-accent); background-image: none; color: var(--cx-accent-text); box-shadow: none; border-radius: var(--cx-radius-md);
  min-height: 56px; font-size: var(--cx-fs-lg); font-weight: var(--cx-fw-bold); letter-spacing: 0; text-transform: none;
}
.login-card .btn-complete:hover { background: var(--cx-accent-hover); }
.login-card .btn-complete:disabled { background: var(--cx-surface-2); color: var(--cx-text-muted); }
.login-card #loginSetupToggle { color: var(--cx-accent-ink); font-size: var(--cx-fs-body); font-weight: var(--cx-fw-semibold); letter-spacing: 0; }
.login-foot { margin-block-start: var(--cx-space-5); padding-block-start: var(--cx-space-4); border-block-start: 1px solid var(--cx-border); color: var(--cx-text-muted); font-size: var(--cx-fs-sm); text-align: center; }
.login-card .credit { color: var(--cx-text-muted); font-size: var(--cx-fs-xs); text-transform: none; letter-spacing: 0; margin-top: var(--cx-space-2); text-align: center; }
.login-card .credit b { color: var(--cx-text); font-weight: var(--cx-fw-semibold); }
.login-setup { background: var(--cx-info-soft); color: var(--cx-info); border-radius: var(--cx-radius-md); padding: var(--cx-space-3); font-size: var(--cx-fs-sm); }

/* a remove/edit button inside a table cell is as big as everywhere else */
td .cline-del { min-width: var(--cx-hit); min-height: var(--cx-hit); }
.login-form .cx-label { display: flex; align-items: flex-end; min-height: var(--cx-hit); }

/* ---------------------------------------- dark: notes and chips on tokens */
.ins-explain, .comm-explain, #commExplain {
  background: var(--cx-accent-soft); color: var(--cx-text); border: 1px solid var(--cx-border);
}
.wd-bar button { min-height: var(--cx-hit); min-width: var(--cx-hit); }

/* ------------------------------------------- EDITORS (modals) AT 360 (round 2)
   A modal is a phone sheet: its form is as wide as the sheet, never wider, so
   nothing is cut and nothing scrolls sideways; every control 44 px / 16 px;
   buttons on tokens so dark is readable. Product, repair, supplier, bundle,
   promotion, brands, duplicates and the Check list all use these. */
.modal-body { overflow-x: hidden; }
.modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal .fld, .modal .fld > *, .modal .sku-row, .modal .cat-row, .modal .money-in { min-width: 0; max-width: 100%; }
.modal .fld input:not([type="checkbox"]):not([type="radio"]), .modal .fld select, .modal .fld textarea { min-height: var(--cx-hit); width: 100%; }
.modal .cam-btn, .modal .xb-plus, .modal .mini-btn, .modal .btn-ghost {
  min-width: var(--cx-hit); min-height: var(--cx-hit); background: var(--cx-surface-2); color: var(--cx-text);
  border: 1px solid var(--cx-border-strong);
}
.modal .xb-plus { color: var(--cx-accent-ink); }
.modal .mini-btn.danger, .modal .btn-ghost.danger-btn { color: var(--cx-danger); }
.modal .mini-btn.ok { color: var(--cx-success); }
.modal .chk-row, .modal label.chk-row, .modal .fld > label:has(> input[type="checkbox"]) { min-height: var(--cx-hit); align-items: center; }
.modal .fld-hint { color: var(--cx-text-muted); font-size: var(--cx-fs-sm); overflow-wrap: anywhere; }
.modal .brand-pick { min-height: var(--cx-hit); display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  .modal .form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal .form-grid .span2 { grid-column: auto; }
  .modal.wide, .modal { max-width: 100%; }
  .modal .sku-row { flex-wrap: wrap; }
  .modal .sku-row input { flex: 1 1 160px; }
}

/* ------------------------------------------------------- ROUND 2 (tester) */
/* M4: Sales attribution wraps: every box and the Save button reachable at 360 */
.sku-row { flex-wrap: wrap; }
.sku-row > span { flex: 1 1 100%; }
.sku-row select, .sku-row input, .sku-row .btn-primary, .sku-row .btn-ghost, .sku-row .mini-btn { min-height: var(--cx-hit); }
.sku-row select { flex: 1 1 140px; min-width: 0; }
.sku-row input[type="date"] { flex: 1 1 150px; min-width: 150px; }
.sku-row .btn-primary, .sku-row .btn-ghost { flex: 1 1 100%; }
.u-trust .muted, .u-trust .sm { overflow-wrap: anywhere; }
/* M10: the Timeline's hint on its always-dark card reads on the nav tokens (>= 4.5:1) */
.tlx-hint, .tlx-legend, .tlx-crumbs, .tlx-stat i, .tlx-axis { color: var(--cx-nav-text); fill: var(--cx-nav-text); }
.tlx-stat span { color: var(--cx-nav-text); }
.tlx-ghostlab, .tlx-coldlab { fill: var(--cx-nav-text); }
/* M11: Discounts note on tokens; the slider is a 44 px hit area */
.disc-note { background: var(--cx-accent-soft); color: var(--cx-text); border: 1px solid var(--cx-border); }
.disc-slide input[type="range"] { height: var(--cx-hit); accent-color: var(--cx-accent); }
.disc-scale span { color: var(--cx-text-muted); }
/* M12: a ticked line is a 44 px row (Staff, Users and the like) */
#view-staff label:has(> input[type="checkbox"]), #view-settings label:has(> input[type="checkbox"]) {
  display: flex; align-items: center; gap: var(--cx-space-2); min-height: var(--cx-hit);
}
/* M13: Vouchers: a group heading is a name, not capitals, and reads in dark (the brand colour stays on its rule) */
#view-telecom *, #view-printing * { text-transform: none; letter-spacing: 0; }
.tel-group-head span { color: var(--cx-text); font-weight: var(--cx-fw-bold); }
/* the sign-in's credit line on tokens */
.login-card .credit, .login-card .credit span { color: var(--cx-text-muted); }

/* ------------------------------------------- ROUND 2b (the visual tool's editors) */
/* tiles that were four fixed columns now fit the width they have */
.acct-status, .hist-kpis { grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); }
.acct-kpi, .hist-kpis > div { min-width: 0; overflow-wrap: anywhere; }
.acct-kpi b, .hist-kpis b { overflow-wrap: anywhere; }
.acct-status.stock .acct-kpi { background: var(--cx-accent-soft); border-color: var(--cx-border); }
.acct-kpi.big { background: var(--cx-warning-soft); border-color: var(--cx-border); }
.wide-card { max-width: 980px; }
.u-trust .muted, .u-trust .sm, .u-trust > div { white-space: normal; max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
/* a note on tokens, in both looks */
.panel-note, .panel-note.subtle { background: var(--cx-accent-soft); color: var(--cx-text); border-color: var(--cx-border); }
.panel-note.subtle { background: var(--cx-surface-2); color: var(--cx-text-muted); }
#view-buy .toolbar label, #view-buy .month-pick { color: var(--cx-text); }
/* a button in an editor does not fade from its old colour (it is read mid-fade otherwise) */
.modal .btn-primary, .modal .btn-ghost, .modal .mini-btn { transition: none; }
/* ticks and choices in the editors are 44 px boxes, like the shell's */
.modal input[type="checkbox"], .view input[type="checkbox"] { width: var(--cx-hit); height: var(--cx-hit); min-width: var(--cx-hit); padding: 0; margin: 0; }
#vchModal input[type="radio"], #telModal input[type="radio"], #repModal input[type="radio"], #supModal input[type="radio"], #prodModal input[type="radio"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: var(--cx-hit); height: var(--cx-hit); margin: 0; padding: 0; background: transparent; border: 0; cursor: pointer;
}
#vchModal input[type="radio"]::before, #telModal input[type="radio"]::before, #repModal input[type="radio"]::before, #supModal input[type="radio"]::before, #prodModal input[type="radio"]::before {
  content: ""; position: absolute; inset: 11px; border: 2px solid var(--cx-border-strong); border-radius: 50%; background: var(--cx-surface);
}
#vchModal input[type="radio"]:checked::before, #telModal input[type="radio"]:checked::before, #repModal input[type="radio"]:checked::before, #supModal input[type="radio"]:checked::before, #prodModal input[type="radio"]:checked::before {
  background: var(--cx-accent); border-color: var(--cx-accent); box-shadow: inset 0 0 0 3px var(--cx-surface);
}
.chk-label, .modal .chk-label { display: flex; align-items: center; gap: var(--cx-space-2); min-height: var(--cx-hit); }
@media (max-width: 760px) {
  .set-row > label { display: flex; align-items: flex-end; min-height: var(--cx-hit); }
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--cx-accent-hover); color: var(--cx-accent-text); }
.modal input[type="checkbox"], .view input[type="checkbox"] { flex: none; min-height: var(--cx-hit); box-sizing: border-box; }

/* The owner's Kuwait buttons (U-019): a hit area on every width, not only on a phone. */
.kwm-setcost, .kwm-setprice, .kwm-release, .kwm-retire, .kwm-del, [data-kwo-del] { min-height: var(--cx-hit); min-width: var(--cx-hit); }
