/* =====================================================================
   LAUNDRY
   This app's own stylesheet. Nothing here is shared with Dinero, so a
   client who wants a different counter gets a different counter without
   anybody touching the accounts.

   Written for the machine it runs on: a touch screen at a counter, used
   standing up, with one hand, often in bright light. Hence the large
   targets, the clear contrast and nothing that only works on hover.

   Everything is laid out with logical properties, so Arabic gets a real
   right-to-left screen rather than a mirrored guess.
   ===================================================================== */

:root {
  --bg:         #F2F5F3;
  --card:       #FFFFFF;
  --panel:      #EDF2EF;
  --line:       #DCE4DF;
  --ink:        #15221B;
  --ink-soft:   #4F5F57;
  --ink-mute:   #7B8A82;

  /* Laundry green. Deliberately not Dinero's palette. */
  --brand:      #176B4A;
  --brand-dark: #0F5037;
  --brand-tint: #DCEFE5;

  --side:       #0F3B2B;
  --side-2:     #14503A;
  --side-ink:   #CFE4D9;
  --side-mute:  #8FB3A2;

  --good:       #1E7F4F;  --good-tint: #DBF1E4;
  --warn:       #A8620A;  --warn-tint: #FBEBD2;
  --bad:        #B4322A;  --bad-tint:  #F9DEDB;
  --info:       #2458A6;  --info-tint: #DEE8F7;
  --violet:     #6A45A8;  --violet-tint: #EAE2F6;

  --radius:     12px;
  --tap:        46px;          /* nothing tappable is smaller than this */
  --shadow:     0 1px 2px rgba(16,40,28,.06), 0 6px 20px rgba(16,40,28,.07);

  /* kept for older rules */
  --paper:      var(--bg);
  --good-tint2: var(--good-tint);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Figtree", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Noto Sans Arabic", "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand-dark); }
h1, h2, h3 { text-wrap: balance; }

/* =============================================================== SHELL
   A dark side bar with the screens grouped the way the shop works. On a
   phone it folds into one scrolling row across the top. */

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.side {
  background: var(--side); color: var(--side-ink);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 12px;
  position: sticky; inset-block-start: 0; height: 100vh; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 4px; text-decoration: none; color: inherit; }
.side__brand svg { flex: none; }
.side__brand b { display: block; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.side__brand small { display: block; color: var(--side-mute); font-size: 12px; }

.side__nav { display: flex; flex-direction: column; gap: 1px; }
.side__grp {
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--side-mute); padding: 12px 10px 4px;
}
.side__item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  border-radius: 9px; color: var(--side-ink); font-weight: 600; text-decoration: none;
}
.side__item svg { width: 18px; height: 18px; flex: none; }
.side__item:hover { background: var(--side-2); color: #fff; }
.side__item.is-on { background: #fff; color: var(--side); }
.side__badge { margin-inline-start: auto; background: var(--warn); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 0 7px; line-height: 18px; }

.side__me { margin-top: auto; padding: 10px 12px; border-radius: 10px; background: var(--side-2); font-size: 12px; color: var(--side-mute); display: flex; flex-direction: column; gap: 6px; }
.side__me b { color: #fff; font-size: 13px; }
.side__me a { color: var(--side-ink); }
.side__me form { margin: 0; }
.side__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.side__link { background: none; border: 0; padding: 0; color: var(--side-ink); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--card); border-block-end: 1px solid var(--line);
  position: sticky; inset-block-start: 0; z-index: 20;
}
.topbar__where { color: var(--ink-mute); font-size: 13px; }
.topbar__where b { color: var(--ink); font-size: 14px; }
.topbar .spacer { flex: 1; }

.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 20px 24px 64px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }   /* a short page does not stretch the menu bar */
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; overflow-x: auto; }
  .side__brand small, .side__grp, .side__me { display: none; }
  .side__nav { flex-direction: row; }
  .side__item { white-space: nowrap; }
  .topbar { position: static; padding: 10px 16px; }
  .page { padding: 16px 16px 48px; }
}

/* ---------------------------------------------------------- headings */

.page-head { margin: 0 0 16px; }
.page-head h1 { margin: 0 0 2px; font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.page-head p  { margin: 0; color: var(--ink-soft); }

.actionbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.actionbar__title h1 { margin: 0 0 2px; font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.actionbar__title p  { margin: 0; color: var(--ink-soft); }
.actionbar__buttons  { display: flex; gap: .5rem; flex-wrap: wrap; }
.actionbar__buttons form { margin: 0; }

/* ------------------------------------------------------------- cards */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; overflow: hidden;
}
.card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.card--flush { padding: 0; }
.card--note { background: var(--brand-tint); border-color: #BFDCCD; }
.card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px 0; }
.card__head h3 { margin: 0; }
.card__head .spacer { flex: 1; }
.card__body { padding: 12px 16px 16px; }

.hint     { color: var(--ink-mute); font-size: 13px; margin: 4px 0 0; }
.progress { color: var(--ink-soft); margin: 10px 0 0; }
.muted    { color: var(--ink-mute); }
.empty    { padding: 1rem; margin: 0; color: var(--ink-mute); }

/* ------------------------------------------------------------ fields */

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 13px; color: var(--ink-soft); }
.field--split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .field--split { grid-template-columns: 1fr; } }

input[type=text], input[type=tel], input[type=search], input[type=password],
input[type=number], input[type=date], input[type=month], input[type=email], select, textarea {
  width: 100%; min-height: var(--tap); padding: 9px 12px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 9px;
}
select { min-height: 44px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 1px;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border: 1px solid var(--brand); border-radius: 10px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--quiet { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--bg); border-color: #BFCAC4; }
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn--ghost:hover { background: var(--panel); border-color: var(--panel); }
.btn--sm    { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--big   { min-height: 54px; font-size: 16px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------- lists */

.gaps__list { display: flex; flex-wrap: wrap; gap: 6px; }
.gaps__head { display: flex; align-items: baseline; gap: 10px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t1 { font-weight: 700; }
.list .t2, .t2 { display: block; color: var(--ink-mute); font-size: 12.5px; }
.sev { width: 4px; align-self: stretch; border-radius: 2px; flex: none; background: var(--line); }
.sev--bad { background: var(--bad); } .sev--warn { background: var(--warn); } .sev--info { background: var(--info); }

.picker-results { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 0 16px 12px; background: #fff; }
.picker__row { display: block; width: 100%; min-height: var(--tap); padding: 10px 12px; text-align: start; background: #fff; border: 0; border-bottom: 1px solid var(--line); font: inherit; cursor: pointer; }
.picker__row:last-child { border-bottom: 0; }
.picker__row:hover { background: var(--brand-tint); }
.picker__row small { color: var(--ink-mute); margin-inline-start: 8px; }

/* ------------------------------------------------------------ tables */

.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 11px 14px; text-align: start; }
table.data thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--ink-mute); border-bottom: 1px solid var(--line); background: #FAFCFB; white-space: nowrap;
}
table.data tbody td { border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.is-link { cursor: pointer; }
table.data tr.is-link:hover td { background: var(--bg); }
table.data tr.is-off td, table.data tr.is-off th { color: var(--ink-mute); }
table.data td.end { text-align: end; white-space: nowrap; }
.num { text-align: end; white-space: nowrap; }

table.totals { width: min(24rem, 100%); margin-inline-start: auto; }
table.totals th { font-weight: 400; color: var(--ink-soft); }
table.totals tr:last-child th, table.totals tr:last-child td { font-weight: 800; color: var(--ink); }

.nowrap, .pill { white-space: nowrap; }

/* A table with six columns cannot be squeezed into 390 pixels. Below
   900px a stacking table stops being a table: every row becomes a small
   card and every cell carries its own label. */
@media (max-width: 900px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: 12px 16px; }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 3px 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  table.stack td::before { content: attr(data-label); flex: 0 0 7.5rem; color: var(--ink-mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
  table.stack td:empty { display: none; }
  table.stack td.num { text-align: start; }
  table.stack td.wide { display: block; padding-top: 8px; }
  table.stack td.wide::before { content: none; }
  .card > table.data:not(.stack) { display: block; overflow-x: auto; }
}

/* The money card: what it means on one side, what it comes to on the other. */
.money { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.money__say   { flex: 1 1 18rem; min-width: 0; order: 1; }
.money__sums  { flex: 0 0 auto; min-width: 16rem; order: 2; }
.money__sums table.totals { width: 100%; margin: 0; }

/* The board's move controls: compact, so ten tickets fit on a screen. */
.movebar { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; margin: 0; }
.movebar select { min-height: 36px; padding: 4px 8px; font-size: 13px; width: auto; min-width: 7rem; }
.movebar .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 760px) { .movebar { flex-wrap: wrap; } .movebar select { min-width: 0; flex: 1 1 6rem; } }

/* ------------------------------------------------------------- pills */

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--panel); color: var(--ink-soft); border: 0;
}
.pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--done    { background: var(--good-tint); color: var(--good); }
.pill--draft, .pill--part { background: var(--warn-tint); color: var(--warn); }
.pill--overdue { background: var(--bad-tint); color: var(--bad); }
.pill--info    { background: var(--info-tint); color: var(--info); }

/* One colour per stage, the same on every screen. */
.st-awaiting_count, .st-received { background: var(--info-tint); color: var(--info); }
.st-sorting, .st-washing         { background: var(--violet-tint); color: var(--violet); }
.st-ironing, .st-qc              { background: var(--warn-tint); color: var(--warn); }
.st-ready                        { background: var(--good-tint); color: var(--good); }
.st-delivered                    { background: var(--panel); color: var(--ink-mute); }

.paid { color: var(--good); font-weight: 700; }
.due  { color: var(--bad); font-weight: 700; }
.late { color: var(--bad); font-weight: 700; }

/* ----------------------------------------------------------- messages */

.msg { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.msg--success { background: var(--good-tint); border-color: #BFDCCD; color: var(--good); }
.msg--error   { background: var(--bad-tint);  border-color: #EFC9C9; color: var(--bad); }
.msg--warning { background: var(--warn-tint); border-color: #EBD9AC; color: var(--warn); }

/* ============================================================ DASHBOARD */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
a.kpi:hover { border-color: #BFCAC4; }
.kpi__l { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.kpi__v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.kpi__v small { font-size: 12px; font-weight: 700; color: var(--ink-mute); margin-inline-start: 4px; }
.kpi__n { font-size: 12.5px; color: var(--ink-mute); }
.kpi--good .kpi__v { color: var(--good); }
.kpi--bad  .kpi__v { color: var(--bad); }
.kpi .spark { position: absolute; inset-inline-end: 12px; inset-block-end: 12px; width: 84px; height: 28px; }
.kpi:has(.spark) .kpi__n { padding-inline-end: 92px; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark polygon  { fill: var(--brand); opacity: .12; }
.spark circle   { fill: var(--brand); }

.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); padding: 14px 16px 16px; }
.pipe a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
}
.pipe a + a { border-inline-start: 0; }
.pipe a:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.pipe a:last-child  { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.pipe a:hover { background: var(--brand-tint); }
.pipe b { font-size: 26px; font-weight: 800; }
.pipe span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.pipe i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi__v { font-size: 22px; }
  .kpi .spark { display: none; }
  .kpi:has(.spark) .kpi__n { padding-inline-end: 0; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pipe a, .pipe a + a { border: 1px solid var(--line); border-radius: 10px !important; }
}

.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .grid2, .split { grid-template-columns: minmax(0, 1fr); } }

.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-mute); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--brand); opacity: .32; }
.chart .bar.on { opacity: 1; }
.chart .grid { stroke: var(--line); }
.chart .val { fill: var(--ink); font-weight: 700; }

/* ========================================================= NEW ORDER */

.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.pos__left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pos .card { margin-bottom: 0; }
@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr); } }

.custbar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; flex-wrap: wrap; }
.custbar__search { flex: 1; min-width: 220px; position: relative; }
.custbar__search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-mute); }
.custbar__search input { padding-inline-start: 38px; background: var(--panel); }
.custchip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--brand-tint); min-width: 0; }
.custchip b { display: block; }
.custchip small { color: var(--ink-soft); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.custnote { flex: 1; min-width: 160px; font-size: 13px; color: var(--ink-soft); }
.sugg { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0 16px 12px; }
.sugg button { border: 1px dashed var(--line); background: transparent; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.sugg button:hover { border-color: var(--brand); color: var(--brand-dark); }
.walkin { padding: 0 16px 4px; }

.chipbar { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbar button, .chipbar a {
  display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--card); padding: 8px 15px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; min-height: 40px; text-decoration: none;
}
.chipbar button.is-on, .chipbar a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chipbar .c { opacity: .6; margin-inline-start: 6px; }
.catbar { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.catbar button { border: 0; background: transparent; padding: 7px 11px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink-mute); cursor: pointer; }
.catbar button.is-on { background: var(--panel); color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; margin-top: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 108px; padding: 12px;
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; text-align: start;
  font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .06s;
}
.tile:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tile:active { transform: scale(.98); }
.tile__ic { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 12px; letter-spacing: .03em; }
.tile__nm { font-weight: 700; line-height: 1.2; }
.tile__pr { margin-top: auto; font-weight: 800; font-size: 15px; }
.tile__pr small { font-size: 11px; color: var(--ink-mute); font-weight: 600; }
.tile__q { position: absolute; top: 8px; inset-inline-end: 8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }

.cart { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 92px); padding: 0; }
@media (max-width: 1100px) { .cart { position: static; max-height: none; } }
.cart__lines { overflow: auto; padding: 4px 16px; flex: 0 0 auto; min-height: 80px; max-height: 34vh; }
/* V39: on a short screen the options scroll between the lines and the totals, so the
   Paid cash / Paid card / Pay later buttons are always on screen. */
.cart__mid { flex: 1 1 auto; min-height: 56px; overflow-y: auto; border-top: 1px solid var(--line); }
.cart__mid > .cart__opts { border-top: 0; }
.cart__foot { flex: none; border-top: 1px solid var(--line); box-shadow: 0 -6px 12px -10px rgba(0,0,0,.25); }
.cart__foot > .cart__tot { border-top: 0; }
@media (max-width: 1100px) { .cart__mid { overflow: visible; } .cart__lines { max-height: none; } }
.cart__empty { padding: 28px 8px; text-align: center; color: var(--ink-mute); }
.line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line__nm { font-weight: 700; }
.line__sv { font-size: 12px; color: var(--ink-mute); }
.line__amt { min-width: 64px; text-align: end; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty button { border: 0; background: var(--panel); width: 32px; height: 32px; font: inherit; font-weight: 800; cursor: pointer; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.cart__opts { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart__row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cart__row > label, .cart__lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.cart__opts input[type=text] { min-height: 40px; background: var(--panel); }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 11px; border-radius: 8px; font: inherit; font-weight: 700; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.seg button.is-on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.notechips { display: flex; gap: 6px; flex-wrap: wrap; }
.notechips button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.notechips button.is-on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.cart__tot { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel); display: grid; gap: 4px; }
.cart__tot div { display: flex; justify-content: space-between; gap: 10px; }
.cart__tot .cart__offer { color: var(--good); font-weight: 700; }
.cart__grand { font-size: 21px; font-weight: 800; margin-top: 4px; }
.cart__pay { padding: 12px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cart__pay .wide { grid-column: 1 / -1; }

/* ============================================================== TICKET */

.steps { display: flex; gap: 4px; margin: 10px 0 0; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--brand); }
.steps__names { display: flex; gap: 4px; font-size: 11px; color: var(--ink-mute); margin-top: 4px; }
.steps__names span { flex: 1; }

.done { display: flex; gap: 14px; align-items: center; }
.done__tick { width: 44px; height: 44px; border-radius: 50%; background: var(--good-tint); color: var(--good); display: grid; place-items: center; flex: none; }
.done h2 { margin: 0; font-size: 20px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acts form { margin: 0; }

.handover { background: var(--panel); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.handover__due { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.handover__due b { font-size: 24px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; font-weight: 600; text-align: end; }

/* ============================================================== SIGN IN */

.signin {
  display: grid; place-items: center; min-height: 100vh; padding: 1.5rem;
  background: radial-gradient(1200px 600px at 50% -10%, var(--brand-tint), transparent 70%), var(--bg);
}
.signin__card { width: min(24rem, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; box-shadow: var(--shadow); }
.signin__mark { font-size: 1.3rem; font-weight: 800; }
.signin__lede { margin: .1rem 0 1.2rem; color: var(--ink-soft); }
.signin__title { font-size: 1.15rem; margin: 0 0 .4rem; }
.signin__alt { margin-top: .6rem; }
.signin__note { margin: 0 0 1.1rem; }

/* ============================================================== SETUP */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 16px; padding-block-end: 10px; border-block-end: 1px solid var(--line); }
.tabs__item { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 9px; color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 14px; }
.tabs__item:hover { background: var(--card); color: var(--ink); }
.tabs__item.is-on { background: var(--brand-tint); color: var(--brand-dark); }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; padding: 1px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
.input--code { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-width: 14rem; }
.fixed { margin: 0; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }

.form { max-width: 52rem; }
.form h3 { margin-top: 0; }
.form fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.form legend { font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; padding: 0; }
.form__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 6px; }

.check, .field label.check { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); font-weight: 400 !important; color: var(--ink); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: 0 0 auto; }

.setting { padding-block-end: 14px; border-block-end: 1px solid var(--line); }
.setting:last-of-type { border-block-end: 0; }
.setting.is-locked { opacity: .8; }
.hint--lock { color: var(--warn); }

.check--role, .field label.check--role { align-items: flex-start; padding: .3rem 0; min-height: 0; }
.check--role input { margin-top: .2rem; }
.check--role > span { display: flex; flex-direction: column; }
.check--role .hint { margin: 0; }

.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .kinds { grid-template-columns: 1fr; } }
.field label.kind, .kind { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-weight: 400; background: #fff; margin: 0; color: var(--ink); }
.kind input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--brand); flex: 0 0 auto; }
.kind > span { display: flex; flex-direction: column; }
.kind .hint { margin: 0; }
.kind:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

.perms[hidden], .check[hidden], .field[hidden] { display: none !important; }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .8rem; }
.presets .hint { margin: 0; }
.perms__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .4rem 1.5rem; }
.perms__group h4 { margin: .4rem 0 .1rem; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.perms__group .check { min-height: 40px; }

.todo { list-style: none; margin: 0; padding: 0; }
.todo__item { display: flex; align-items: center; gap: .8rem; padding: 12px 16px; border-block-end: 1px solid var(--line); }
.todo__item:last-child { border-block-end: 0; }
.todo__mark { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--warn-tint); color: var(--warn); }
.todo__item.is-ok .todo__mark { background: var(--good-tint); color: var(--good); }
.todo__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.todo__text .hint { margin: 0; }

table.matrix th[scope=row] { font-weight: 700; text-align: start; }
table.matrix tr.matrix__group th { background: var(--panel); color: var(--ink-mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; text-align: start; }
table.matrix td { padding: 6px 8px; }
input.price { width: 6.2rem; min-height: 42px; text-align: end; padding: 6px 8px; font-variant-numeric: tabular-nums; }
input.price::placeholder { color: #A7B0B6; font-size: .8rem; }
input.price.is-changed { border-color: var(--warn); background: var(--warn-tint); }

.savebar { position: sticky; inset-block-end: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; box-shadow: 0 -4px 14px rgba(20,24,28,.06); }
.savebar .hint { flex: 1 1 18rem; margin: 0; }
.savebar__count { color: var(--warn); font-weight: 700; }

@media (max-width: 900px) {
  table.matrix tr.matrix__group th { display: block; padding: .5rem 1rem; }
  table.matrix th[scope=row] { display: block; padding: 0 0 .3rem; font-size: 1.02rem; }
  table.matrix td { display: flex; align-items: center; justify-content: space-between; padding: .2rem 0; }
  table.matrix td::before { flex: 1 1 auto; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink); }
  input.price { width: 7.5rem; }
  table.data td.end { text-align: start; }
}
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__item { flex: 0 0 auto; white-space: nowrap; }
  .savebar .hint { display: none; }
  .savebar { padding: 8px 12px; }
  .savebar .btn { margin-inline-start: auto; }
}
.lead-note { display: none; }
@media (max-width: 760px) { .lead-note { display: block; margin-top: .5rem; } }

/* ============================================================== MONEY OUT */

.flow4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.flow4 > div { padding: 10px 12px; border-inline-end: 1px solid var(--line); }
.flow4 > div:last-child { border-inline-end: 0; }
.flow4 small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }
.flow4 b { display: block; font-size: 13.5px; }
.flow4 span { font-size: 12px; color: var(--ink-mute); }
@media (max-width: 760px) { .flow4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow4 > div { border-block-end: 1px solid var(--line); } }

.picks { display: flex; gap: 6px; flex-wrap: wrap; }
.picks label { position: relative; margin: 0; }
.picks input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.picks span { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.picks input:checked + span { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.picks input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.segr { display: inline-flex; flex-wrap: wrap; background: var(--panel, var(--bg)); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.segr label { position: relative; margin: 0; }
.segr input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segr span { display: inline-block; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.segr input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.segr input:focus-visible + span { outline: 2px solid var(--brand); }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--ink-mute); font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; }
.drop:hover { border-color: var(--brand); color: var(--brand-dark); }
.drop input { max-width: 100%; font-size: 12px; }

.totals { background: var(--bg); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 2px 0; }
.totals div.big { font-size: 20px; font-weight: 800; padding-top: 6px; }

.pline { display: grid; grid-template-columns: minmax(0, 1fr) 4.2rem 6rem 2.6rem; gap: 6px; align-items: center; }
.pline input { text-align: end; }
.pline .x { min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; font-size: 16px; }
.pline__hint { font-size: 12px; color: var(--ink-mute); margin: 4px 0 10px; min-height: 1em; }

.req { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.req__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.req__head b { font-size: 15px; }
.req__head .meta { font-size: 12.5px; color: var(--ink-mute); }
.req__head .amt { margin-inline-start: auto; font-weight: 800; }
.req__line { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.req__line .grow { flex: 1; min-width: 0; }
.req__line .t2 { display: inline; }
.req__line input { width: 5rem; min-height: 38px; text-align: end; }
.req__line .x { font-weight: 800; white-space: nowrap; }
.req__acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.req__acts input[type=text] { max-width: 16rem; min-height: 40px; }
.req--mine { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

input.qty { width: 5.5rem; min-height: 40px; text-align: end; }
.lowdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-inline-end: 6px; vertical-align: middle; }
.decl { display: none; gap: 6px; align-items: center; margin-top: 6px; }
.decl.is-open { display: flex; flex-wrap: wrap; }

/* ============================================================== REPORTS */

.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.good-t { color: var(--good); }
table.data tr.tot td { border-top: 2px solid var(--line); background: var(--bg); }
table.data th.num, table.data td.num { text-align: end; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar__t { height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.hbar__t i { display: block; height: 100%; background: #15805A; border-radius: 0 4px 4px 0; min-width: 2px; }
[dir="rtl"] .hbar__t i { border-radius: 4px 0 0 4px; }
.hbar__v { font-variant-numeric: tabular-nums; }
.kv dt .t2 { display: block; }

/* ============================================================== CUSTOMER APP */

body.my { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.my__top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
           padding-top: max(10px, env(safe-area-inset-top)); background: var(--side, #0F3B2B); color: #fff; }
.my__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 16px; min-width: 0; }
.my__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my__lang { margin-inline-start: auto; color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; border: 1px solid rgba(255,255,255,.35);
            border-radius: 999px; padding: 5px 12px; }
.my__main { max-width: 32rem; margin: 0 auto; padding: 16px 16px 24px; }
body.my--in .my__main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.my__tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
            background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.my__tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; color: var(--ink-mute);
              text-decoration: none; font-size: 11.5px; font-weight: 700; min-height: 56px; }
.my__tabs svg { width: 24px; height: 24px; }
.my__tabs a.is-on { color: var(--brand); }
.my h1 { font-size: 22px; margin: 4px 0 4px; }
.my .lede { color: var(--ink-soft); margin: 0 0 16px; }
.my .card { border-radius: 16px; }
.my .big-input { font-size: 22px; letter-spacing: .08em; text-align: center; min-height: 56px; }
.my .pin-input { font-size: 30px; letter-spacing: .6em; text-align: center; min-height: 60px; padding-inline-start: .6em; }
.my .hero { background: linear-gradient(160deg, #176B4A, #0F3B2B); color: #fff; border-radius: 18px; padding: 20px; margin-bottom: 16px; }
.my .hero h1 { color: #fff; margin: 0 0 4px; }
.my .hero p { margin: 0; opacity: .85; }
.my .order { display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
             color: inherit; text-decoration: none; }
.my .order__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.my .order__top b { font-size: 16px; }
.my .order__top .pill { margin-inline-start: auto; }
.my .order__meta { color: var(--ink-mute); font-size: 13px; }
.my .order__due { font-weight: 800; color: var(--bad); }
.my .stagebar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0 4px; }
.my .stagebar i { height: 6px; border-radius: 3px; background: var(--line); }
.my .stagebar i.on { background: var(--brand); }
.my .stagebar__names { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 10.5px; color: var(--ink-mute); text-align: center; }
.my .ready { background: var(--good-tint); border-color: #BFDCCD; }
.my .pricegrp h3 { margin: 18px 0 8px; }
.my .price { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my .price:last-child { border-bottom: 0; }
.my .price__s { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.my .price__s span { background: var(--panel); border-radius: 8px; padding: 3px 8px; font-size: 13px; white-space: nowrap; }
.my .price__s b { font-variant-numeric: tabular-nums; }
.my .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 8px; }
.my .days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.my .days label { flex: 0 0 auto; }
.my .days span { display: flex; flex-direction: column; align-items: center; min-width: 4.2rem; padding: 8px 10px; border: 1px solid var(--line);
                 border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; }
.my .days small { font-weight: 600; color: var(--ink-mute); font-size: 11px; }
.my .days input, .my .slots input { position: absolute; opacity: 0; }
.my .days label, .my .slots label { position: relative; margin: 0; }
.my .days input:checked + span, .my .slots input:checked + span { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.my .slots span { display: block; text-align: center; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; }
.my .days input:focus-visible + span, .my .slots input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.my .linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.my .steps4 { display: flex; gap: 6px; margin: 0 0 16px; }
.my .steps4 i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.my .steps4 i.on { background: var(--brand); }

/* ============================================================== RUNS AND DRAWER */

.pickrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; margin: 0; font-weight: 400; }
.pickrow input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.pickrow .grow { flex: 1; min-width: 0; }
.pickrow .t2 { display: block; }
.bags { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.bagrow { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 6px; }
.bagrow input.qty { width: 100%; }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 6px; }
.coins label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-size: 13px; }
.coins span { min-width: 2.6rem; text-align: end; color: var(--ink-soft); }
.coins input { min-height: 38px; text-align: end; padding: 6px 8px; }
.big-input { font-size: 20px; min-height: 52px; font-variant-numeric: tabular-nums; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ============================================================== PRINT */

@media print {
  .side, .topbar, .actionbar__buttons, .msg, .noprint { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.moverow { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line, #e5e7eb); }
.moverow:first-of-type { border-top: 0; }

/* ============================================================ INSTALL THE APP */
.install { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 10px;
           background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 28px rgba(15,59,43,.18); }
.install[hidden] { display: none; }
.install__icon img { display: block; border-radius: 9px; }
.install__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install__txt b { font-size: 14px; }
.install__txt small { font-size: 12.5px; color: var(--ink-soft); }
.install__x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 4px 6px; }
body.my--in .install { bottom: 76px; }

/* V21 - the one price list page */
.pl-show { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.pl-pen { border: 0; background: transparent; color: var(--ink-mute); cursor: pointer; font-size: 15px; padding: 4px 6px; border-radius: 6px; min-width: 32px; min-height: 32px; }
.pl-pen:hover, .pl-pen:focus-visible { background: var(--panel); color: var(--ink); }
.pl-same { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.pl-same input { width: 18px; height: 18px; accent-color: var(--brand); }
table.pl tr.pl-branch th, table.pl tr.pl-branch td { background: var(--bg); }
table.pl tr.pl-branch th { font-weight: 600; font-size: 13px; color: var(--ink-soft); padding-inline-start: 22px; }
.pl-arrow { color: var(--ink-mute); }
table.pl tr.pl-editrow td { background: var(--brand-tint); }
.pl-fields { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 6px; }
.pl-fields > label:not(.check) { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-soft); flex: 1 1 11rem; }
.pl-fields input[type=text], .pl-fields input[type=number], .pl-fields select { min-height: 40px; }
.pl-fields .check { min-height: 40px; }
.pl-btns { display: flex; gap: 6px; }
.pl-group select { margin-bottom: 4px; }
.pl-newgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-newgroup[hidden] { display: none; }
.pl-newgroup input { flex: 1 1 8rem; }
.pl-newprices { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-newprices label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.pl-panel { border-color: var(--brand); }
.pl-hidden { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pl-hiddenrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 0; }
#speeds input[type=text]:not(.price) { min-width: 8rem; }
#speeds select { min-height: 42px; }
@media (max-width: 900px) {
  table.pl tr.pl-branch { padding-inline-start: 26px; }
  table.pl tr.pl-editrow td.wide { display: block; }
}
/* V21 - settings in short sections */
.setgroup { border-bottom: 1px solid var(--line); padding: 4px 0 8px; margin-bottom: 8px; }
.setgroup > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); padding: 10px 0; min-height: var(--tap); display: flex; align-items: center; gap: 8px; }
.setgroup > summary::-webkit-details-marker { display: none; }
.setgroup > summary::before { content: '\25B8'; color: var(--ink-mute); transition: transform .15s; }
.setgroup[open] > summary::before { transform: rotate(90deg); }
.set-more { font-size: 15px; margin: 18px 0 4px; color: var(--ink-mute); }
.settest { background: var(--bg); border-radius: 10px; padding: 10px 12px; }

/* V23 - the developer's control panel */
.sa-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sa-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sa-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; min-height: 112px; box-sizing: border-box; }
.sa-tile:hover { filter: brightness(.98); }
.sa-tile--ok   { background: var(--good-tint); border-color: #BFDCCD; color: var(--good); }
.sa-tile--warn { background: var(--warn-tint); border-color: #EBD9AC; color: #6B3A04; }
.sa-tile--bad  { background: var(--bad-tint); border-color: #EFC9C9; color: #7A2016; }
.sa-tile.is-on { box-shadow: 0 0 0 3px var(--ink); }
.sa-tile__n { font-size: 30px; font-weight: 800; line-height: 1.05; }
.sa-tile__label { font-size: 14px; font-weight: 700; }
.sa-tile__hint { font-size: 12.5px; opacity: .9; }
.sa-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sa-cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sa-stack { display: flex; flex-direction: column; gap: 0; }
.sa-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sa-stat { display: flex; flex-direction: column; gap: 2px; }
.sa-stat b { font-size: 24px; font-weight: 800; }
.sa-h2 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.sa-h2row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sa-h2row .sa-h2 { margin: 0; flex: 1; }
.sa-bar { height: 8px; border-radius: 99px; background: var(--panel); overflow: hidden; margin-bottom: 8px; }
.sa-bar span { display: block; height: 8px; background: var(--brand); border-radius: 99px; }
.sa-check, .sa-act, .sa-item, .sa-kv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sa-check .grow, .sa-item .grow, .sa-kv .grow, .sa-act .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sa-check .hint, .sa-item .hint { margin: 0; }
.sa-item { flex-wrap: wrap; }
.sa-item--warn { background: var(--warn-tint); border-radius: 10px; padding: 10px 12px; border: 1px solid #EBD9AC; margin-bottom: 8px; }
.sa-mark { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; color: #fff; }
.sa-mark--ok { background: var(--brand); } .sa-mark--warn { background: #D98A1E; } .sa-mark--off { background: var(--panel); color: var(--ink-soft); }
.sa-act__when { width: 118px; flex: 0 0 auto; margin: 0; }
.sa-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.sa-dot--ok { background: #1E8A5C; } .sa-dot--warn { background: #D98A1E; } .sa-dot--bad { background: #C2412D; }
.sa-err { padding: 12px 16px; border-top: 1px solid var(--line); }
.sa-err__top { display: flex; gap: 12px; align-items: baseline; }
.sa-err__when { width: 118px; flex: 0 0 auto; margin: 0; }
.sa-err__count { font-size: 12.5px; font-weight: 700; color: var(--bad); white-space: nowrap; }
.sa-err__detail { padding-inline-start: 130px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink-soft); word-break: break-word; margin-top: 3px; }
.sa-group { padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.sa-kv { padding: 11px 16px; }
.sa-note { margin-bottom: 14px; }
.msg--info { background: var(--info-tint); border-color: #C9D7E6; color: var(--info); }
.sa-rights { overflow-x: auto; }
table.sa-matrix th[scope=row] { font-weight: 600; min-width: 15rem; }
table.sa-matrix .sa-matrix__who { text-align: center; font-size: 13px; min-width: 7rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
table.sa-matrix .sa-matrix__who .hint { display: block; margin: 0; font-weight: 400; }
table.sa-matrix .sa-matrix__cell { text-align: center; }
table.sa-matrix .sa-matrix__cell input { width: 22px; height: 22px; accent-color: var(--brand); }
table.sa-matrix tr.sa-matrix__group th { background: var(--panel); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); text-align: start; }
@media (max-width: 1100px) {
  .sa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-cols, .sa-cols--even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sa-stats { grid-template-columns: minmax(0, 1fr); }
  .sa-err__detail { padding-inline-start: 0; }
  .sa-act__when, .sa-err__when { width: auto; }
}

/* V24: deactivate / reactivate on the Users page */
.btn.sa-off { color: var(--bad); }
.btn.sa-off:hover { background: var(--bad-tint); }

/* V26: subscription */
.sub-hero { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 16px; }
.sub-hero--ok   { background: var(--good-tint); border-color: #BFDCCD; color: var(--good); }
.sub-hero--warn { background: var(--warn-tint); border-color: #EBD9AC; color: #6B3A04; }
.sub-hero--bad  { background: var(--bad-tint);  border-color: #EFC9C9; color: #7A2016; }
.sub-hero--off  { background: var(--card, #fff); color: var(--ink); }
.sub-hero__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sub-hero__label { font-size: 22px; font-weight: 800; }
.sub-hero__line { font-size: 15px; }
.sub-hero__apps { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sub-hero__side b { font-size: 18px; }
.sub-end { margin: -4px 0 12px; }
.sub-apps { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.sub-apps legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.sub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.sub-grace { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px;
  border-radius: 10px; background: var(--bad-tint); }
.sub-grace .grow { display: flex; flex-direction: column; }
.sub-remind { border-top: 1px solid var(--line); padding: 10px 0; }
.sub-remind > summary { cursor: pointer; list-style-position: inside; padding: 4px 0; }
.sub-plan { list-style: none; margin: 0; padding: 0; }
.sub-plan li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sub-plan li.is-past { color: var(--ink-mute); text-decoration: line-through; }
.sub-cancelled td { text-decoration: line-through; }
.sub-msgs > summary { cursor: pointer; }
.wa-box textarea { width: 100%; box-sizing: border-box; }
.wa-box > label { display: block; font-weight: 700; margin-bottom: 4px; }
.wa-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wa-help { margin-top: 6px; }
.paused { max-width: 640px; }
.paused h1 { margin-top: 0; }
@media (max-width: 860px) {
  .sub-grid { grid-template-columns: minmax(0, 1fr); }
  .sub-hero__side { align-items: flex-start; }
}
.sub-hero--link { text-decoration: none; padding: 12px 16px; }
.paused .acts { margin-top: 14px; }

.sub-remind-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 14px; align-items: start; }
@media (max-width: 860px) { .sub-remind-set { grid-template-columns: minmax(0, 1fr); } }

/* V29: the driver finds or registers a customer */
.drv-find { display: flex; gap: 8px; }
.drv-find input { flex: 1; min-width: 0; }
.drv-found { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.drv-new { margin-top: 6px; }

/* V30: home address at the counter */
.cart__addr { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.cart__addr label { font-weight: 700; font-size: 13px; }

/* V31: the driver's view of a customer */
.drv-h { margin: 14px 0 6px; font-size: 14px; }
.drv-list { list-style: none; margin: 0; padding: 0; }
.drv-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.drv-list li .hint { flex-basis: 100%; }
.drv-collect { margin-top: 14px; }
.drv-collect > summary { list-style: none; cursor: pointer; }
.drv-collect > summary::-webkit-details-marker { display: none; }
.drv-collect[open] > summary { display: none; }

/* ============================================================== BRAND (V33) */
.brand-logo { display: inline-block; flex: none; object-fit: contain; border-radius: 8px; background: #fff; }
.brand-logo--sm { width: 32px; height: 32px; }
.brand-logo--md { width: 44px; height: 44px; }
.brand-logo--lg { width: 72px; height: 72px; border-radius: 14px; display: block; margin: 0 auto 10px; }
.brand-logo--none { display: inline-flex; align-items: center; justify-content: center; background: transparent;
  border: 1.5px dashed rgba(255,255,255,.55); color: rgba(255,255,255,.8); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; }
.signin .brand-logo--none, .card .brand-logo--none { border-color: var(--line); color: var(--ink-mute); }

/* ============================================================== PAPER BILL (V33) */
.cart__paper { border-top: 1px solid var(--line); padding: 12px 16px; background: var(--paper-bg, #FBFAF4); }
.paper__fields { display: grid; gap: 8px; margin-top: 8px; opacity: .45; }
.paper__fields:not(.is-on) { display: none; }     /* V39: shown (and active) once ticked */
.paper__fields.is-on { opacity: 1; }
.paper__fields .field { margin: 0; }

/* ============================================================== OFFLINE (V34) */
.off-chip { border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  background: #E7F1EC; color: #0F3B2B; }
.off-chip--off { background: #B3261E; color: #fff; }
.off-chip--busy { background: #FFF1CC; color: #6B4E00; }
.off-chip--bad { background: #FDE2E0; color: #8A1C14; }
.off-panel { position: fixed; top: 64px; inset-inline-end: 16px; z-index: 50; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.off-panel__head { display: flex; align-items: center; justify-content: space-between; }
.off-list { list-style: none; margin: 6px 0 10px; padding: 0; }
.off-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.off-banner { background: #B3261E; color: #fff; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; }

/* ============================================================== V35 OFFERS */
.offers .offer { display: grid; gap: 2px; padding: 10px 12px; border: 1px dashed #BFDCCD; border-radius: 12px; background: var(--good-tint); margin-bottom: 8px; }
.offers .offer b { color: var(--good); }
.offers .offer--locked { background: var(--panel); border-color: var(--line); }
.offers .offer--locked b { color: var(--ink-soft); }
.offer__stamp, .offer__lock { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.loyal { margin-bottom: 12px; }
.loyal__badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-soft); }
.loyal__badge--silver { background: #E6E9EC; color: #3E4A55; }
.loyal__badge--gold { background: #F6E7B8; color: #6B4E00; }
.loyal__bar { height: 8px; border-radius: 99px; background: var(--panel); overflow: hidden; margin: 8px 0 4px; }
.loyal__bar i { display: block; height: 100%; background: var(--good); }
.order__saved, .saved-banner { color: var(--good); font-weight: 700; font-size: 13px; }
.saved-banner { background: var(--good-tint); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
dd.saved { color: var(--good); }
.offer-line { font-weight: 400; color: var(--good); }
.offer-form h3 { margin-top: 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.checks .check { min-height: 40px; }
.field .label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }

/* ============================================================== V35 NOTIFICATIONS */
.push-ask { position: fixed; inset: 0; z-index: 90; background: rgba(15, 59, 43, .55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.push-ask[hidden] { display: none; }
.push-ask__card { background: #fff; border-radius: 20px; padding: 22px 20px 16px; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 10px; }
.push-ask__card h2 { margin: 0; font-size: 20px; }
.push-ask__bell { width: 58px; height: 58px; border-radius: 50%; background: var(--good-tint); color: var(--good); display: grid; place-items: center; }
.push-ask__list { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-weight: 600; }
.push-ask__steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.privacy { margin: 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--panel); font-size: 13px; color: var(--ink-soft); display: grid; gap: 4px; }
[dir="rtl"] .privacy { padding: 12px 32px 12px 14px; }
body.push-asking { overflow: hidden; }
.install__safe { display: block; color: var(--good); font-weight: 700; }
.push-staff { display: grid; gap: 4px; }
.push-staff[hidden], .push-staff-on[hidden] { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }

/* ============================================================== V35 BUSINESS AI */
.ai-range { display: inline-flex; align-items: baseline; gap: 8px; }
.ai-range small { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.ai-range small:first-child::after { content: " ·"; }
.ai-range small:last-child::before { content: "· "; }
.ai-alert, .ai-tip { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; background: var(--panel); }
.ai-alert--bad { background: #FBE9E7; } .ai-alert--warn { background: #FDF3E1; } .ai-alert--good { background: var(--good-tint); }
.ai-tip { background: var(--brand-tint, #E6F2EC); }
.ai-chart { width: 100%; height: auto; }
.ai-chart text { font-size: 11px; fill: var(--ink-soft); }
.ai-chart__bar { fill: var(--good); opacity: .8; }
.ai-chart__band { fill: var(--good); opacity: .22; }
.ai-chart__likely { stroke: var(--good); stroke-width: 3; }
.ai-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.ai-key--bar { background: var(--good); opacity: .8; } .ai-key--band { background: var(--good); opacity: .25; }
.ai-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.ai-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.ai-day__bar { width: 70%; min-height: 3px; border-radius: 6px 6px 0 0; background: var(--good); opacity: .75; }
.ai-day small { color: var(--ink-soft); font-size: 12px; }
.ai-kpis .kpi__v { font-size: 20px; }
@media (max-width: 640px) { .ai-alert, .ai-tip { flex-direction: column; align-items: flex-start; } }
.offer-form input[type=time] { width: 100%; max-width: 12rem; min-height: 44px; }
.cart__issue { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
