/* The UI round of 10 Nov 2026 (the screenshot sweep D:\ui-audit-20261110, both brands, every theme), linked last on every
   app and sign-in page (app.css and layout.css keep their byte budgets). Refines, never redesigns: the brand tokens only,
   logical properties only (Arabic and Urdu first). */

/* 1. a phone-width window gets the touch targets of layout.css §5 too (the sweep and a phone that reports a mouse) */
@media (max-width:767px){
  :root{--nav-gap:var(--gap-tap)}
  .btn{min-height:var(--tap);min-width:var(--tap)}
  .btn.sm{min-height:var(--tap);padding:.45em 1em;font-size:14px}
  .btn.primary:not(.sm){min-height:var(--tap-main)}
  .burger{width:var(--tap);height:var(--tap)}
  .top .brand{min-height:var(--tap);display:inline-flex;align-items:center}
  .lang,a.pill,.top .pal-open{min-height:var(--tap);display:inline-flex;align-items:center}
  .top .pal-open{min-width:var(--tap);justify-content:center}
  .chip{min-height:var(--tap);display:inline-flex;align-items:center;padding-inline:14px}
  .tabs a{min-height:var(--tap);padding-inline:14px}
  .nav a{min-height:var(--tap)}
  .foot-links a{display:inline-flex;align-items:center;min-height:var(--tap);padding-inline:4px}
  .datepick{width:var(--tap);height:var(--tap)}
  .check{min-height:var(--tap)}.check input,.choice input{width:24px;height:24px}
  td>input[type=checkbox],td>label>input[type=checkbox]{width:24px;height:24px}
  .tw td>a:only-child:not(.btn){display:inline-block;padding-block:10px}
  td>input:not([type=checkbox],[type=radio],[type=hidden]),td>select{min-width:64px}
  .context-help a{display:inline-flex;align-items:center;min-height:var(--tap)}
  .prod-i{width:var(--tap);height:var(--tap)}.prod-i::before{inset:9px}
  /* the F-key line is for a keyboard; a phone has none */
  #keys-hint{display:none}
}

/* 2. type: body text on a phone is 14 px (the .small help lines under fields and pages read as body text) */
@media (max-width:599px){
  main p.small,main p.muted.small,main .small.context-help,main li.small,.range-filter .small{font-size:14px}
}

/* 3. the "with the selected" bar sits on the page's own colour, so the table under it never shows through its words */
.sticky-actions{background:var(--bg);box-shadow:0 -10px 14px -10px rgba(13,38,71,.28);border-top:1px solid var(--line);padding:10px 0 calc(6px + env(safe-area-inset-bottom,0px));z-index:5}

/* 4. charts on a phone: the plot keeps a readable width and scrolls inside its card, its labels at 12 px or more */
.ch-scroll{overflow-x:auto;overscroll-behavior-x:contain;direction:ltr}
@media (max-width:599px){
  .chart .ch-scroll svg.ch{min-width:560px}
  .ch .ch-tick,.ch .ch-axis-t{font-size:16px}
}

/* 5. a table's name column does not break a two-word product name one word per line on a phone */
@media (max-width:599px){
  .tw td>b:first-child:not(:only-child),.tw td>a[href*="/products/"]:first-child:not(.btn){display:inline-block;min-width:8em}
}

/* 6. the sign-up's plan list: the price line reads in the page's direction ("أساسي 499 ج.م شهرياً", not the number after
   the words); the numbers themselves stay digits in their own island */
.plan-pick .num{direction:inherit}
@media (max-width:599px){.tw td.rc-lines{min-width:10em}}

/* 7. a <small> inside a 14 px line was 11.7 px: never under the 12 px floor */
small{font-size:max(12px,.8333em)}

/* 8. pass 2 (10 Nov 2026): Today's latest receipts under 900 px (a tablet upright, where the card is half the page) read
   as a list: the number and its kind, the time and the cashier, the total and its tender on the first line; what was sold
   across the second. Logical properties only (RTL mirrors) */
@media (max-width:899.98px){
  .rc-today thead{display:none}
  .rc-today tbody tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:4px 12px;padding:10px 6px;border-bottom:1px solid var(--line)}
  .rc-today tbody td{display:block;border:0;padding:0;min-width:0}
  .rc-today tbody td:nth-child(3){grid-column:1/-1;grid-row:2;font-size:14px;color:var(--muted);overflow-wrap:anywhere}
  .rc-today tbody td:nth-child(4){text-align:end;white-space:nowrap}
  .rc-today tbody td:nth-child(4) .badge{display:block;width:max-content;margin-inline-start:auto;margin-top:4px}
  .rc-today tbody td[colspan]{grid-column:1/-1}
}

/* 9. pass 2 (10 Nov 2026): "More from BytesGlue" on Help (Shared/_MoreFromUs.cshtml): quiet, one line a product */
.more-bg h2{font-size:16px}
.more-bg-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.more-bg-list li{line-height:1.45}
.more-bg-list a{font-weight:700;margin-inline-end:6px;display:inline-flex;align-items:center;min-height:var(--tap,44px)}
@media (hover:hover) and (pointer:fine){.more-bg-list a{min-height:0}}

/* 10. the identity in the top bar (16 Nov 2026, owner's demo: a manager did not know he was not the owner): which shop, who,
   in which role. Two short lines at 768 px and up (long names end in an ellipsis; the full text is the title); on a phone a
   third strip under the bar, one line, so the bar itself keeps its items on one row. Logical properties only. */
.top .who{display:flex;flex-direction:column;justify-content:center;min-width:0;max-width:210px;flex:0 1 auto;line-height:1.25;border-inline-start:1px solid var(--top-line);padding-inline-start:10px}
.top .who>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .who-n{font-weight:800;font-size:13px;color:var(--ink)}
.top .who-r{font-size:12px;color:var(--top-muted,var(--muted))}
.top .who-role{font-weight:700}
@media (max-width:1279px) and (min-width:768px){.top .who{max-width:140px}.top .who-shop{display:none}}
@media (max-width:767px){
  .top-in{flex-wrap:wrap;row-gap:0}
  .top .who{order:99;flex:1 1 100%;max-width:none;flex-direction:row;gap:6px;align-items:baseline;border:0;padding:0 0 4px;min-height:0}
  .top .who-n{flex:0 1 auto}.top .who-r{flex:1 1 0;min-width:0}
}

/* 11. one page rhythm and one page grid (16 Nov 2026, owner's demo of /products at 2000 px: buttons of two heights floating
   far from the title, cards of three widths, gaps of 0 / 12 / 25 px between the tab row, the help link, the title and the
   cards). ONE gap between the blocks at the top of every page and between cards and banners (14 px, the card's own), ONE
   header row (title, then its buttons, all the same height), ONE column: a page with a header row stops at 1440 px and
   everything in it (banners, filter bars, cards, tables) shares that width. Logical properties only. */
:root{--gap-block:14px;--page-max:1440px}
main.wrap>.page-way,main.wrap>.tabs,main.wrap>.context-help,main.wrap>.row.between:has(>h1){margin-block:0 var(--gap-block)}
main.wrap>.tabs{padding-block:2px}
main.wrap>.context-help{line-height:1.4}
.banner{margin-bottom:var(--gap-block)}
.card{margin-bottom:var(--gap-block)}
main.wrap>.row.between:has(>h1){align-items:center;gap:8px 16px}
main.wrap>.row.between>h1{margin:0}
main.wrap>.row.between:has(>h1) .btn{min-height:var(--tap);padding:.45em 1.1em;font-size:14px;font-weight:800}
main.wrap>.row.between:has(>h1)>.actions{justify-content:flex-end;gap:var(--gap-tap)}
main.wrap:not(.read):has(>.row.between>h1){max-width:var(--page-max);margin-inline:auto}
main.wrap>form.card.tight,main.wrap>form:has(>.tw,>.card){max-width:none}
/* the filter bar (Search, Category, Filters, Apply): labels on one line, boxes and the button one height */
main.wrap>form.card.tight>.inline{align-items:flex-end}
main.wrap>form.card.tight>.inline>.field{align-self:flex-end}
main.wrap>form.card.tight>.inline :is(input[type=search],select){height:var(--tap-field,46px);min-height:var(--tap-field,46px);box-sizing:border-box}
main.wrap>form.card.tight>.inline>.btn{min-height:var(--tap-field,46px)}

/* 12. "Continue with Google / Facebook" (Shared/_SocialButton.cshtml, Login and Free): the vendors' marks at the start side
   (mirrors in right-to-left), the label centred, one height, one radius, the vendors' colours kept on hover too */
.btn.social-btn{position:relative;display:flex;align-items:center;justify-content:center;min-height:48px;padding-block:.45em;padding-inline:12px;gap:10px;font-size:14px;font-weight:500;line-height:20px}
.btn.social-btn .social-mark{width:20px;height:20px;flex:none}
.btn.social-btn>span{text-align:start}
.btn.social-btn.lg{min-height:52px}
.btn.social-google,.btn.social-google:hover{background:#fff;color:#1f1f1f;border:1px solid #747775}
.btn.social-google:hover{background:#f8f9fa}
.btn.social-facebook,.btn.social-facebook:hover{background:#1877F2;color:#fff;border:1px solid #1877F2}
.btn.social-facebook:hover{background:#166FE5;border-color:#166FE5}
/* a note shown as a card ("pick a product first") is as wide as the cards around it, not the 90-character measure of a paragraph */
main.wrap>p.card{max-width:none}
/* a form card on a page that also has other full-width blocks (a banner, a table, a note) is as wide as them */
main.wrap:not(.read):has(>:is(.banner,.tw,p.card,.card:not(form)))>form.card{max-width:none}

/* 16 Nov 2026, the restaurant screens (waiter, table visit, review order): ONE control height (46px, the filter-control height) for
   every button, select and field inside a .svc-card; a form with a label above its select keeps its button on the select's baseline
   (flex-end); the primary action of a state is distinct by colour only, never by size; the groups wrap on a phone and mirror in
   right-to-left (logical properties only). */
.svc-card{--ctl:var(--tap-field,46px)}
.svc-card .btn,.svc-card .btn.sm,.svc-card .btn.lg,.svc-card .btn.primary:not(.sm),.svc-card .btn.primary.lg{box-sizing:border-box;height:var(--ctl);min-height:var(--ctl);padding-block:0;padding-inline:1.2em;font-size:15px;white-space:normal;line-height:1.15}
.svc-card summary.btn{display:inline-flex;height:var(--ctl)}
.svc-card select,.svc-card input:not([type=checkbox],[type=hidden],[type=radio]){box-sizing:border-box;height:var(--ctl);min-height:var(--ctl)}
.svc-card .field{margin:0}
.svc-card form.inline,.svc-card form.grid2{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end;margin-block:0}
.svc-card form.inline>.field,.svc-card form.grid2>.field{flex:1 1 150px;min-width:0}
.svc-card form.inline>.btn,.svc-card form.grid2>.btn{flex:none}
.svc-card form.inline>.check{display:flex;align-items:center;min-height:var(--ctl);margin:0}
.svc-card details{margin-block-start:12px}
.svc-card details>summary:not(.btn){display:flex;align-items:center;min-height:var(--tap)}
.svc-card details>form,.svc-card details>p,.svc-card details>label{margin-block-start:10px}
.svc-card details>form>.check{display:flex;align-items:center;min-height:var(--ctl)}
.svc-card .actions{gap:10px 12px}
.act-row{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.act-row>form{margin:0}
.act-row>form.inline{flex:1 1 300px;min-width:0}
.act-row>.act-note{flex:1 1 220px;align-self:center;margin:0;font-size:14px}
.act-main{margin-block-start:14px}
.act-sec{margin-block-start:16px;padding-block-start:16px;border-block-start:1px solid var(--line)}
.act-row.banner{align-items:center;margin-block:12px 0}
.svc-card .svc-who{margin-block:4px 0}
.svc-card>.row.between>h2{margin:0}
.svc-card .btn[disabled]{opacity:.55;cursor:not-allowed}
.wo-table>.btn,.wo-table input{min-height:var(--tap-field,46px);box-sizing:border-box}
.wo-gate p{margin-block:6px 14px}
@media(max-width:599px){.act-row>form:not(.inline),.act-row>.btn,.act-row>form:not(.inline)>.btn{flex:1 1 100%;width:100%}.act-row>form.inline{flex-basis:100%}}
.wo-enhanced .wo-catalog>.row,.wo-enhanced .wo-basket>.row{flex:none}
.wo-table .field>span{margin:0}
.svc-assign{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center;justify-content:space-between;padding-block:12px;border-block-start:1px solid var(--line)}
.svc-assign:first-of-type{border-block-start:0}
.svc-assign-name{flex:1 1 200px}
.svc-assign-ctl{display:flex;flex-wrap:wrap;gap:10px;flex:2 1 460px;align-items:center}
.svc-assign-ctl>select,.svc-assign-ctl>input{flex:1 1 180px;min-width:0}
.svc-assign-ctl>.btn{flex:none}
@media(max-width:599px){.svc-assign-ctl>.btn{flex:1 1 100%}}
.svc-assign>.btn{flex:none}
@media(max-width:599px){.svc-assign>.btn{flex:1 1 100%}}

/* 13. Plan prices with an offer (PriceView.cs, 16 Nov 2026): the old price small and struck through, the price to pay large and bold,
   the offer's name and end date in normal size, the yearly sum written out. Never fine print. */
.pricebox{display:flex;flex-direction:column;gap:4px;margin-block:6px 10px}
.pricebox .pv-was{font-size:17px;color:var(--muted)}
.pricebox .pv-was s{text-decoration-thickness:2px;font-weight:600}
.pricebox .pv-now{font-size:16px;color:var(--navy-2);display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.pricebox .pv-now b{font-size:34px;line-height:1.15;font-weight:900}
.pricebox.has-offer .pv-now b{color:var(--ok)}
.pricebox .pv-offer{font-size:15px;font-weight:600;line-height:1.5;color:var(--ink,inherit)}
.pv-code{display:inline-block;background:var(--gold-soft,#fdf3dc);color:var(--gold-ink,#8A5A0C);border:1px solid var(--gold,#e0b24a);border-radius:6px;padding:0 8px;font-weight:800;letter-spacing:.02em;direction:ltr}
.pricebox .pv-then,.pricebox .pv-year{font-size:15px;line-height:1.5}
.pricebox .pv-year{font-weight:600}
.pricebox .pv-extra,.pricebox .pv-vat{font-size:13px;color:var(--muted)}
.pv-apply{margin-block:4px 8px}
.pv-limits{font-size:15px;font-weight:700;margin-block:4px 2px;line-height:1.5}
details.lim-help{font-size:14px;color:var(--muted);margin-bottom:8px}
details.lim-help summary{cursor:pointer;font-weight:700;color:var(--navy-2)}
details.lim-help p{margin:6px 0 0;line-height:1.5}
.pv-offer-note{font-size:16px;font-weight:600;line-height:1.6;margin-block:6px}
.pv-code-inline{display:inline-block;background:var(--gold-soft,#fdf3dc);color:var(--gold-ink,#8A5A0C);border:1px solid var(--gold,#e0b24a);border-radius:6px;padding:0 8px;direction:ltr;margin-inline-end:6px}
.banner.next-offer{font-size:16px;line-height:1.55}.banner.next-offer .pv-type{display:block;font-weight:700;margin-top:2px}
.reg-plans .plan-pick .reg-price .reg-now{font-size:20px;font-weight:900}.reg-plans .plan-pick .reg-price s.was{font-size:16px}
.reg-plans .plan-pick .pv-reg-line{display:block;color:var(--muted);font-size:13px;margin-top:2px}

/* 16 Nov 2026: moved here from app.css (its 40,960-byte budget): Settings parts and pages rows (audit finding 6) */
.tabs-parts,.tabs-sub{flex-wrap:wrap;overflow-x:visible}.tabs-parts{margin-bottom:2px}.tabs-sub{padding-top:0}.tabs-sub a{font-size:12.5px;font-weight:600;background:transparent}.tabs-sub a.on,.tabs.tabs-sub a.on{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:700}html[data-theme=dark] .tabs.tabs-sub a.on{color:var(--bg)}

/* charges.md: Settings > Selling, the charges list and the worked example. One control height (42px), logical sides for right-to-left. */
.chg-entry,.chg-list{border:0;padding:0;margin:0 0 14px;min-width:0}
.chg-entry>legend,.chg-list>legend{font-weight:700;font-size:14px;color:var(--navy-2);padding:0;margin-bottom:4px}
.chg-help{display:block;margin-bottom:8px}
.chg-head{display:none}
.chg-row{display:grid;grid-template-columns:minmax(0,1fr) 6em auto auto;gap:8px;align-items:center;margin-bottom:12px}
.chg-row>input:first-child{grid-column:1/-1}
.chg-row[hidden]{display:none}
.chg-row .check{margin:0;align-items:center}
.chg-row .check input{margin-top:0}
.chg-row .btn,.chg-list .actions .btn{min-height:42px}
.chg-example{margin:0 0 14px;padding:8px 12px;border-inline-start:3px solid var(--gold);background:var(--navy-soft);border-radius:var(--radius-sm)}
.chg-example p{margin:2px 0;font-size:14px}
/* Printers for kitchen stations (16 Nov 2026): the table's order ticket lists each station, Settings > Devices chooses its printer, the till's
   Hold lists a ticket that did not print. Logical properties only. */
.kot-stations{list-style:none;margin:8px 0;padding:0;display:grid;gap:8px}
.kot-stations li{border:1px solid var(--line);border-radius:8px;padding:8px 12px;display:grid;gap:4px}
.kot-fails{display:grid;gap:6px;margin-block:6px}
.stp-rows{display:grid;gap:12px;margin-block:12px}
.stp-row{display:grid;gap:8px;grid-template-columns:minmax(0,1fr);border:1px solid var(--line);border-radius:8px;padding:12px}
.stp-row .field,.stp-row .actions{margin:0}
.stp-name{display:grid;gap:2px}
@media(min-width:720px){.stp-row{grid-template-columns:minmax(0,1.1fr) minmax(0,1.5fr) auto;align-items:end}}
/* integration c (16 Nov): the unit of a number box (days, %, AED) never sits on the value; a charge row reads name wide, percent narrow */
.o-num input:has(+i){padding-inline-end:52px;width:132px}
@media(max-width:560px){.chg-row{grid-template-columns:6em auto minmax(0,1fr)}.chg-row>input[name$="_name"],.chg-row>input[data-tour="chg-name"]{grid-column:1/-1}}
