/* The visual audit round of 16 Nov 2026 (D:\SimplePOS-BG\handover\audit-20261116\visual\REPORT.md: 441 pages, 6,156 pictures).
   Linked last on every signed-in page, on our admin's pages and on the desk pages (app.css is full at 40,960 bytes, layout.css at
   16 KB). The causes, once, here: one control height in a row, grids that do not stretch cards, tab strips that do not wrap into a
   wall, tiles without an orphan, tables as cards on a phone, controls the base sheet left unstyled, the sticky bar, the floated
   picture, arrows in right-to-left. Brand tokens only; logical properties only (Arabic, Urdu first). The tokens have fallbacks
   because our admin does not link layout.css. */
:root{--tap:44px;--tap-main:48px;--gap-block:14px}

/* 1. ONE control height in a row: every button is as tall as the fields beside it (44 px), the small variant keeps its smaller
   type only. In a table cell a small button is 36 px, unless the row has fields (then it is as tall as they are). */
.btn,.btn.sm{min-height:var(--tap,44px)}
.btn.sm{padding:.4em 1em;font-size:14px}
.btn{text-wrap:balance}
.inline>.btn,.datebar>.btn,.filters>.btn{align-self:flex-end}
/* every single-line field is exactly as tall as a button (44 px): a select was 52, an input 46, a button 44 */
:root{--tap-field:44px;--tap-main:44px}
input:not([type=checkbox],[type=radio],[type=hidden],[type=file],[type=color],[type=range],.code,.sync-code-in,.cq),select{height:var(--tap,44px);min-height:var(--tap,44px)}
/* the camera button next to a barcode field: a plain button, one height with the field */
button.scan-cam,.btn.scan-cam{min-height:var(--tap,44px)}

/* 2. grids do not stretch a short card to the height of its tall neighbour; a form grid lines its fields up at the bottom
   (a two-line label does not push its field lower); a button that is a grid cell keeps its own size */
.grid2,.grid3{align-items:start}
.grid2:has(>.field):not(:has(>.field .help)),.grid3:has(>.field):not(:has(>.field .help)){align-items:end}
.grid2>.btn,.grid3>.btn,.grid2>button,.grid3>button{align-self:end;justify-self:start}
.grid2>.field,.grid3>.field{margin-bottom:12px}

/* 3. tab strips: up to 8 tabs wrap in tidy rows; more than 8 are ONE row that scrolls, with a fade at the cut edge, never a wall
   of pills (the active tab is brought into view by tidy.js) */
@media (min-width:900px){
  .tabs{row-gap:6px}
  .tabs:has(>a:nth-child(n+9)){flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 18px,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 18px,#000 calc(100% - 28px),transparent 100%)}
  .tabs:has(>a:nth-child(n+9))::-webkit-scrollbar{display:block;height:6px}
  .tabs:has(>a:nth-child(n+9))::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}
}
@media (max-width:899px){
  .tabs,.chips:not(.wrap){-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}
  [dir=rtl] .tabs,[dir=rtl] .chips:not(.wrap){-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}
}
.tabs a,.chip{scroll-margin-inline:28px}

/* 4. tiles: no orphan on the last row. Few tiles share one row; six are 3 and 3; seven and eight are 4 columns */
.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
.tiles>:last-child:nth-child(odd){grid-column:1/-1}
@media (min-width:640px){
  .tiles{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
  .tiles>:last-child:nth-child(odd){grid-column:auto}
  .tiles:has(>:nth-child(6):last-child),.tiles:has(>:nth-child(9):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
  .tiles:has(>:nth-child(7)),.tiles:has(>:nth-child(8):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
  .tiles:has(>:nth-child(10):last-child){grid-template-columns:repeat(5,minmax(0,1fr))}
}
.tile .v{overflow-wrap:anywhere}

/* 5. controls the base sheet left in the browser's own look: an input with no type, url, month, time, week, datetime-local, colour */
input:not([type]),input[type=url],input[type=month],input[type=time],input[type=week],input[type=datetime-local],input[type=color]{width:100%;font:inherit;font-size:16px;padding:9px 12px;border:1px solid var(--field,#C5CDD8);border-radius:var(--radius-sm,10px);background:#fff;color:var(--ink,#1B2430);min-height:44px}
input[type=url]{direction:ltr;text-align:start}
input[type=color]{width:64px;padding:4px}
input[type=checkbox],input[type=radio]{accent-color:var(--navy,#12325B)}
/* the file picker: its button gets room from the words beside it */
input[type=file]::file-selector-button{margin-inline-end:12px;padding:6px 14px;border:1px solid var(--field,#C5CDD8);border-radius:999px;background:var(--navy-soft,#E8EEF6);color:var(--navy,#12325B);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
input[type=file]{padding-block:5px}

/* 6. checkboxes and radios the size of the .check ones, on a desktop too, on the line of their words */
main input[type=checkbox],main input[type=radio]{width:20px;height:20px;flex:none;vertical-align:-.28em;margin-block:0;margin-inline:0 6px}
.check input[type=checkbox],.check input[type=radio]{width:22px;height:22px;margin:3px 0 0}
td>input[type=checkbox],td>label>input[type=checkbox]{vertical-align:middle;margin:0}
/* a checkbox row: the help text sits under its label, never beside it in a narrow column */
.check{flex-wrap:nowrap}
.check:has(>small,>.help){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;align-items:start}
.check:has(>small,>.help)>input{grid-row:1/span 2}
.check>small,.check>.help{grid-column:2;margin:-2px 0 0}
.check>span{flex:1 1 0;min-width:0}

/* 7. table cells: a row that holds fields is centred on them (names, checkboxes and badges no longer sit above the field's middle) */
tr:has(input:not([type=hidden]),select,textarea)>td{vertical-align:middle}

/* 8. .feat rows (Settings > online, workspace): the title keeps its width, the control wraps under it on a phone, the selects share one width */
.feat>select{flex:0 0 auto;width:16em;max-width:45%;min-width:9em}
@media (max-width:599px){.feat{flex-wrap:wrap}.feat>.grow{flex:1 1 60%}.feat>select{flex:1 1 100%;width:100%;max-width:none}}

/* 9. the sticky bar: on a phone it is an ordinary row at the end of the form (it covered the rows above it); on a desk it stays
   at the window's foot with room left under the form */
@media (max-width:639px){.sticky-actions{position:static;box-shadow:none;border-top:0;padding:10px 0 0;background:none}}
@media (min-width:640px){form:has(>.sticky-actions){padding-bottom:12px}}

/* 10. the page picture floats beside a card on a desk only; a phone form keeps its full width */
@media (max-width:599px){.art.side,.plan-art{float:none;display:block;margin:0 auto 10px;margin-inline-start:auto}}

/* 11. rows of buttons: a page's title keeps its line and its buttons go under it on a phone, equal-width and never touching */
@media (max-width:599px){
  main.wrap>.row.between:has(>h1){flex-direction:column;align-items:stretch}
  main.wrap>.row.between:has(>h1)>.actions{width:100%;justify-content:stretch}
  main.wrap>.row.between:has(>h1)>.actions>.btn,main.wrap>.row.between:has(>h1)>.actions>form{flex:1 1 calc(50% - 8px)}
  main.wrap>.row.between:has(>h1)>.actions>form>.btn{width:100%}
  .actions>.btn:only-child{flex:1 1 100%}
}
.actions>form{margin:0}
form+form,.actions+form,form+.actions{margin-top:var(--gap-block)}
.card>.actions:not(:first-child),.card>form>.actions:not(:first-child){margin-top:12px}

/* 12. charts on a phone scroll inside their card: a shadow at the cut edge says so */
.ch-scroll{background:linear-gradient(to right,var(--card,#fff) 30%,rgba(255,255,255,0)) left center/28px 100% no-repeat local,linear-gradient(to left,var(--card,#fff) 30%,rgba(255,255,255,0)) right center/28px 100% no-repeat local,linear-gradient(to right,rgba(13,38,71,.18),rgba(13,38,71,0)) left center/10px 100% no-repeat scroll,linear-gradient(to left,rgba(13,38,71,.18),rgba(13,38,71,0)) right center/10px 100% no-repeat scroll}

/* 13. right-to-left: a left-to-right value (an e-mail, an id) in a label/value list sits next to its label, not at the far edge;
   long LTR values wrap inside the card */
[dir=rtl] .kv>dd.ltr,[dir=rtl] dd.ltr{text-align:right}
.kv>dd,.kv>dt{min-width:0}
.kv>dd.ltr,.kv>dd .ltr{overflow-wrap:anywhere}

/* 15. long words in cells do not break in the middle of a header; a header may wrap between words only */
th{overflow-wrap:normal;word-break:normal;hyphens:none}
@media (max-width:639px){.tax-t th,.tax-t td{overflow-wrap:break-word}.tax-t th{hyphens:none;word-break:normal}}

/* 16. tables as cards on a phone (tidy.js gives a wide table the class .cards and each cell its header as data-l): the row's
   fields and buttons stay visible, nothing scrolls sideways */
@media (max-width:639px){
  .tw table.cards th,.tw table.cards td,table.cards td{width:100%!important;min-width:0}
  table.cards td.cell-act{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px}
  table.cards td.cell-act::before{content:none}
  table.cards td>input:not([type=checkbox],[type=radio]),table.cards td>select{max-width:62%;min-width:0}
  table.cards td.empty{display:block}
  table.cards tfoot td{font-weight:800}
  table.cards tr{border-bottom:1px solid var(--line)}
  table.cards .badge{white-space:normal}
}

/* 17. one empty state (Pages\Shared\_Empty.cshtml): a sentence, and the one button that fills the table */
.empty-state{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:22px 14px;color:var(--muted,#5B6676)}
.empty-state>p{margin:0;max-width:46ch}
.empty-state .actions{justify-content:center}
td.empty .empty-state{padding:10px 0}
td.empty .empty-state:only-child{display:flex}

/* 18. our admin pages: the page's own spacing and tap rules of the signed-in app (refine.css is not linked there) */
.admin main.wrap>.tabs,.admin main.wrap>.row.between:has(>h1),.admin main.wrap>h1{margin-block:0 var(--gap-block)}
.admin .card,.admin .banner{margin-bottom:var(--gap-block)}
.admin main.wrap>.row.between:has(>h1){align-items:center;gap:8px 16px}
.admin main.wrap>.row.between>h1{margin:0}
.admin .actions{gap:8px}


/* visual audit C1 (G31): a closed Technical details box inside a table cell (Pages\TeamActivity.cshtml activity log) stays one quiet line */
td details.tech{margin:4px 0 0;padding:2px 8px;font-size:12.5px}
td details.tech summary{font-weight:600}

/* visual audit D3 (G21, G13, G24, G29): page-shared leftovers
   G21: the floated page picture (.art.side) no longer hangs over the card under the title: the card starts below it (Setup, Help > Support, Two-step, Download) */
.art.side~.card,.art.side~.grid2,.art.side~.tw{clear:both}
/* G13: a field in a number column (td.n) sits at the column's end, under its end-aligned header */
@media (min-width:640px){td.n>input:not([type=checkbox],[type=radio],[type=hidden]),td.n>select{display:block;margin-inline-start:auto}}
/* G24: a folded card whose summary is a heading: the marker sits on the heading's line (Reports > Service) */
details>summary>h2,details>summary>h3{display:inline-block;margin:0;vertical-align:middle}
/* G24: the service chart's bucket labels (0–5, 5–10) read left to right on an Arabic page, like the axis they sit on */
svg.bars text:not(.axis-label){direction:ltr;unicode-bidi:embed}
/* G29: the table page's visit actions are one height: Mark clean (task-orange, 48 px) is as tall as Take / I'll clean (refine.css .svc-card --ctl) */
.svc-card .btn.btn.task-orange{min-height:var(--ctl,46px);height:var(--ctl,46px)}
/* G37 our admin (/admin customers, /admin/leads): the contact cell is one line for the number and one row of its buttons
   (Call / WhatsApp / Copy were stacked one under another); a word in a cell is never cut in half (Restaura|nt) */
@media (min-width:640px){
  .admin td .contact{min-width:190px}
  .admin td .c-line>.c-val{flex:1 0 100%}
  .admin td .c-line:first-child>.c-val{white-space:nowrap}
  .leads-t td{overflow-wrap:break-word;word-break:normal}
  .leads-t td.lastnote{min-width:200px}
}
.admin .card>table.kv{width:100%}
.admin .card>h2:first-child{margin-top:0}
/* G37 Settings > Stock replenishment (/settings/stock-rst): the supplier terms table keeps each field readable and scrolls
   sideways in its frame (.tw) instead of squeezing ten fields into the card ("The sl", "Ta") */
@media (min-width:640px){
  .rst-terms td:first-child{min-width:140px}
  .rst-terms td>input.num{min-width:76px}
  .rst-terms td>input[type=email]{min-width:210px}
  .rst-terms td>input[type=tel]{min-width:150px}
  .rst-terms td>select{min-width:140px}
}
/* G37 bare fields in a filter row (.row.inline / .inline, e.g. /assets search, status, category, branch): they share the row
   instead of each taking a full line (an input or select is width:100% in the base sheet) */
.inline>input:not([type=hidden],[type=checkbox],[type=radio]),.inline>select{width:auto;flex:1 1 160px;min-width:0}
.inline>input[type=search]{flex:2 1 220px}
/* G37 Bookings (/bookings: its own sheet, /bookings/assets/style.css, is linked in the page body): Today / Calendar / New booking
   are pills like every other button row; its buttons are pills too; the day field and the staff select share the filter row */
main .apt-nav>a{border-radius:999px;padding-inline:1em;font-weight:700;border-color:var(--line,#D8DCE2);color:var(--navy,#12325B);background:var(--card,#fff)}
main .apt-nav button,main .apt-form button{border-radius:999px}
main form.apt-nav{align-items:flex-end}
main form.apt-nav>select{flex:1 1 180px;max-width:320px}
/* G37 Settings > Bookings (/settings/bookings, the bookings module's own form): in a card, short fields share a row (labels
   over their fields), the long ones (texts, groups, the switch) take the row; a day's opening hours are one line; the Save
   button keeps its own width */
main form.apt-settings{max-width:none;margin:0 0 var(--gap-block);padding:16px;background:var(--card,#fff);border:1px solid var(--line,#D8DCE2);border-radius:var(--radius,14px);grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px 16px;align-items:end}
main form.apt-settings>fieldset,main form.apt-settings>details,main form.apt-settings>label:has(textarea),main form.apt-settings>.apt-switch,main form.apt-settings>button,main form.apt-settings>label.apt-check{grid-column:1/-1}
main form.apt-settings>button{justify-self:start;border-radius:999px;padding-inline:1.6em}
main .apt-settings .apt-hours{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:6px 0}
main .apt-settings .apt-hours>label.apt-check{min-width:9em}
main .apt-settings .apt-hours>input[type=time]{width:auto;flex:0 1 9em}
main .apt-settings .apt-hours:has(>label input[type=checkbox]:not(:checked))>input[type=time]{visibility:hidden}
/* G37 Team > a person's rights (/team/{u}/rights): about 45 rights in columns across the card, not one long column */
.rights-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:2px 20px;margin-block:8px 12px}
.rights-grid>.check{margin:0}
/* G37 the home's "Your suite" card on a phone (Index.cshtml [data-suite]): its 17-18 module chips are one row that scrolls
   (like a tab strip) instead of filling the first screen before the day's numbers */
@media (max-width:599px){
  [data-suite]>.chips.wrap{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}
  [dir=rtl] [data-suite]>.chips.wrap{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}
  [data-suite]>.chips.wrap>.chip{flex:none}
}
/* G37 a notice written as a paragraph (p.banner) is as wide as the cards beside it: the reading measure of layout.css:14
   (main.wrap>p max 90ch) is for text, not for a banner (/front-desk "WhatsApp is not connected") */
main.wrap>p.banner,.card>p.banner{max-width:none}
/* G37 a field with a unit after it (a recipe's "These quantities make [ 1 ] unit(s) of this product"): the label over the field,
   the unit on the field's line (it fell under the field) */
label.field.inline:has(>input+span){display:grid;grid-template-columns:minmax(6em,10em) auto;justify-content:start;align-items:center;gap:4px 10px}
label.field.inline:has(>input+span)>span:first-child{grid-column:1/-1}
/* G37 Purchase orders: the filter row with its print button is not printed (the tab strip never was) */
@media print{.po-filter-row{display:none!important}}
/* G37 two small tables side by side in a grid (Reports > Ingredients, Waste: by reason / the rows) each fill their column */
.grid2>table,.grid3>table{width:100%}
/* G37 the menu's "Signed in as" block: the language link is navy like Account (only Log out is red, app.css:65) */
.nav-foot a.nav-lang{color:var(--navy,#12325B)}
/* G37 a row of a few checkboxes (Settings > Kitchen stations, the categories a station cooks): side by side with an even gap,
   not spread over a three-column grid */
.check-row{gap:6px 24px;align-items:center}
.check-row>.check{margin:0}
/* G37 the welcome tour's "Show me around" (/suite, /me/start, /, /setup): a pill like the page's other buttons; on /suite (a
   desk) it sits at the end of the title's line instead of a third row above the title */
[data-welcome-tour]>button[data-tour-start]{border-radius:999px;padding-inline:1.2em}
[data-welcome-tour]{margin:0 0 10px}
@media (min-width:600px){[data-welcome-tour]:has(+.page-head),[data-welcome-tour]:has(+link+.page-head){float:inline-end;margin:0;margin-inline-start:12px}}

/* visual audit D2 (page layouts part 2, 16 Nov 2026) */
/* Pages\Team.cshtml: a user's Rights and Deactivate side by side on one centre line (the toggle form was a block row: it went
   under Rights on a desk and sat a few px lower on a phone) */
table.team-users td.act>form{display:inline-flex;margin:0;margin-inline-start:8px;vertical-align:middle}
table.team-users td.act>.btn,table.team-users td.act>form>.btn{margin:0;vertical-align:middle}
@media (min-width:640px){table.team-users td.act{white-space:nowrap}}
@media (max-width:639px){table.team-users td.act{display:flex;flex-wrap:wrap;gap:8px;align-items:center}table.team-users td.act>form{margin-inline-start:0}}
/* Pages\AdminDevices.cshtml: a tile label that shares its words with a lower-case badge ("online now") starts with a capital */
.tile .k.cap::first-letter{text-transform:uppercase}
/* visual audit D1 (16 Nov 2026, G37 / G39 / G40 / G41): page layouts, part 1
   a two-column key/value TABLE (table.kv: /admin/email-health counts, the plan cards' limits, /admin/leads/<id> campaign) is a
   table again; .kv is the label/value grid of a <dl>, which split a table's header row from its rows */
table.kv{display:table;width:100%;border-collapse:collapse}
/* radios / checks in a row of choices (Billing > Change the plan: Monthly / Yearly) keep the row's gap only */
.row>.check{margin-block:0}
/* a notice inside a card is as wide as the card (Waiter coverage "Nobody is on duty"); a paragraph keeps its 90ch measure */
.card>p.banner{max-width:none}
/* a filter card holding a field grid (Reports > Preparation & service time): the grid, then the button under it, not beside it; its selects as wide and tall as its fields */
form.filters:has(>.grid2,>.grid3){display:block}
.filters .field>select,.filters .field>input{width:100%;min-height:44px}
/* a button beside fields with labels sits on the fields' line, not in the middle of label + field (/assets/depreciation Show) */
.inline:has(>.field):not(:has(>.field .help))>.btn,.inline:has(>.field):not(:has(>.field .help))>.btn.sm{align-self:flex-end}
/* a typed text that is longer than its field ends in an ellipsis instead of a cut letter */
input[type=text],input[type=search],input:not([type]){text-overflow:ellipsis}
/* on a phone a search / ask field takes its own line and its button goes under it (placeholders were cut: "Receipt #, customer, cashier or",
   "who owes me, rec", "e.g. refun"); the branch picker's label sits over its select */
@media (max-width:599px){
  .inline>.field:has(>input[type=search]),[data-own-ask-box]>.field,.searchbar>input[type=search]{flex:1 1 100%}
  .searchbar>.btn{flex:1 1 100%}
  [data-branch-chooser]{flex-wrap:wrap}
  [data-branch-chooser]>label{flex:1 1 100%;margin:0}
  [data-branch-chooser]>select{flex:1 1 0;min-width:0}
}
/* G40: the "Add a line" button of a form that shows one empty row (tidy.js 4) */
.more-add{margin-block:8px 12px}
/* the order arrows of Products > Categories: every row has two arrow places, so a lone arrow sits in its own column */
td.act>.btn.arr,td.act>.arr-gap{width:44px;min-width:44px;padding-inline:0;justify-content:center}
td.act>.arr-gap{display:inline-block;height:1px;vertical-align:middle}
td.act>.btn.arr+.btn.arr,td.act>.arr-gap+.btn.arr,td.act>.btn.arr+.arr-gap{margin-inline-start:6px}
/* a centred row of buttons (Receipt: WhatsApp / Print under the receipt) is centred, like the receipt above it */
.actions.center{justify-content:center}
/* the receipt preview beside a form (Settings > Shop "Receipt look") starts under its own heading, not floating in the column */
.grid2>section>h2+.receipt{margin-inline:0}
/* the nightly report preview (Settings > E-mail) fills its card; Arabic text is not set in a typewriter face */
.card>pre.receipt.pre,section>pre.receipt.pre{max-width:none;margin:0}
pre.receipt.pre:lang(ar){font-family:inherit;line-height:1.75}
/* Settings > Promotions: the list block above the form keeps the page's gap */
.promo-stack>div{margin-bottom:var(--gap-block)}
/* Legal pages' contents in two columns: a number stays in its own column (item 20 read as the end of item 10 in Arabic) */
.legal .toc ol{padding-inline-start:0;column-gap:36px}
.legal .toc li{margin-inline-start:1.8em}
/* Settings > Weight: a container's "holds" is its number and its unit on one line, at the column's end under its header */
.wgt-hold{display:flex;gap:6px;align-items:center;justify-content:flex-end}
.wgt-hold>input{flex:0 1 6em;width:auto;min-width:4em}
.wgt-hold>select{flex:0 0 auto;width:auto;min-width:4.5em}
/* a tile whose value is a badge and a name (our admin's shop page: Plan and state) wraps the name instead of cutting it */
.tile .v>small:has(>.badge){white-space:normal}
/* our admin: a form grid inside one of two side-by-side cards is one field per line (Desktop sales "Send a licence e-mail",
   a lead's "Send a message": the package and language selects were cut); the one-time sign-in e-mail keeps its line, its button under it */
@media (min-width:640px){.admin .grid2>.card .grid2{grid-template-columns:minmax(0,1fr)}}
.admin form.inline:has(>.field>input[type=email])>.field{flex:1 1 100%}
/* our admin tables: three or more row buttons are a tidy two-column block of equal buttons (Desktop sales licences) */
.admin td.act>.row:has(>:nth-child(3)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.admin td.act>.row:has(>:nth-child(3))>form,.admin td.act>.row:has(>:nth-child(3)) .btn{width:100%;margin:0}
/* CRM > a customer, consent on a phone: the channel, its state and its form are one under the other, the select full width */
@media (max-width:599px){
  [data-crm-consent] tr{display:block;padding-block:8px;border-bottom:1px solid var(--line)}
  [data-crm-consent] tr>th,[data-crm-consent] tr>td{display:block;width:auto;padding-inline:0;border:0}
  [data-crm-consent] .row.inline>select{flex:1 1 100%}
}
/* Pages\AdminRetention.cshtml: the Switch table is a table, not the .kv grid (the grid put its one tbody in the first, auto column:
   60 % of the card) */
table.kv.rt-switch{display:table}
/* visual audit D1 (G39), continued: on a phone, cards in a three-column grid are one per line (Inventory > Stock: the two half-width
   forms cut their product names at the start); our admin's lead search keeps its own line so its words show whole */
@media (max-width:599px){.grid3:has(>.card){grid-template-columns:minmax(0,1fr)}}
.admin form.filters>input[type=search][name=q]{flex:1 1 100%}
/* Pages\Billing.cshtml: the plan's price is one line ("1,249 EGP / month" broke after the slash on a phone); a trial limit's
   "20 of 20 left" never leaves its last number alone on a line */
p.big.bill-price{white-space:nowrap}
@media (max-width:599px){p.big.bill-price{font-size:clamp(20px,6.4vw,28px)}}
li[data-trial-cap]>b{white-space:nowrap}
/* Pages\PurchaseOrder.cshtml: the printed order is as wide as the cards under it (its 1000 px cap left it narrower, edges off) */
.receipt.po-sheet{max-width:none}
/* Pages\ReportsReceipts.cshtml and every pair of tiles with a big one: on a phone the big tile takes a whole row, so its partner
   does too (a half-width tile over a full-width one) */
@media (max-width:639px){.tiles:has(>.tile.big):not(:has(>:nth-child(3)))>.tile{grid-column:1/-1}}
/* Pages\SettingsDevices.cshtml: the "set these in the app" card is as wide as the About card under it, and its six device pictures
   share one row (they wrapped 4 + 2) */
#dev-noshell.card.msg{max-width:none}
#dev-noshell .dev-strip{justify-content:center}
@media (min-width:900px){#dev-noshell .dev-strip{flex-wrap:nowrap}}
/* Pages\SettingsOnlineWizard.cshtml: "Seats from - to" is two fields side by side in one cell (they stacked: that column was twice
   as tall); the step you are on is ringed and a done step carries a tick, so two green pills never both look current */
.field>.seat-range{display:flex;gap:8px;flex-wrap:nowrap}
.field>.seat-range>input{flex:1 1 0;min-width:0;width:auto}
.wiz-steps li.now a{box-shadow:0 0 0 2px var(--navy,#12325B);font-weight:800}
.wiz-steps li.done a::before{content:"\2713\00a0"}
/* Pages\SettingsStaff.cshtml: the three rate tables share one shape: the whole card wide, the name / category / target field fills
   its column, the % box is a 120 px column right beside it, headers over their fields */
table.stf-rates{width:100%;table-layout:fixed}
table.stf-rates th,table.stf-rates td{text-align:start}
table.stf-rates th:last-child,table.stf-rates td:last-child{width:120px}
table.stf-rates td>input:not([type=hidden]),table.stf-rates td>select{width:100%;max-width:none;min-width:0}
/* Pages\AccountDisplay.cshtml: its one narrow card starts at the page's start edge like the other account pages (it sat centred) */
main.wrap>section.card.narrow:has(>form.density-pick){margin-inline:0 auto}
/* Pages\SettingsScreenOffer.cshtml: the seven day boxes are chips that wrap in rows (one per line on a phone took about 450 px) */
.scr-checks{display:flex;flex-wrap:wrap;gap:8px 18px}
.scr-checks>.check{flex:0 0 auto;margin:0;min-height:44px;align-items:center}
@media (max-width:599px){.scr-checks>.check{min-width:0}}
/* Pages\Setup.cshtml: a done step is struck through only (its link underline drew a second line through the words) */
.steps li.done .t a{text-decoration:none;color:inherit}
/* Pages\Stock.cshtml: Low is orange as the page's legend says (orange = low, red = out); Out stays red */
.tile.warn.low .v{color:var(--warn,#9A5205)}
/* a banner written as a paragraph in a card (Pages\WaiterSpot.cshtml "Left at 11:06") is as wide as the card: the 90ch reading
   cap is for prose, not for a coloured box */
.card>p.banner,.card>p.note{max-width:none}
/* Pages\WeighBatch.cshtml: on a phone the carcass box is a plain group inside its card (its own card padding made its fields
   narrower than the ones above; its legend sat on the border line in Arabic) */
@media (max-width:599px){fieldset.card[data-wgt-carcass]{border:0;box-shadow:none;background:none;padding-inline:0;margin-inline:0}fieldset.card[data-wgt-carcass]>legend{padding:0;font-weight:700}}

/* coordinator: a loss is never green; a field the server named empty is marked */
.tile.big.bad .v{color:var(--bad)}
input.invalid,select.invalid,textarea.invalid{border-color:var(--bad);box-shadow:0 0 0 2px var(--bad-bg)}

/* coordinator, after the first re-render: long paths in a table wrap; the camera button on a phone is the camera sign (its words stay for a reader of the screen); the kitchen's small button is the ticket's height */
.tw code,td code{overflow-wrap:anywhere;word-break:break-all}
@media (max-width:767px){td .scan-cam{font-size:0;min-width:var(--tap,44px)}td .scan-cam::before{content:"\1F4F7";font-size:18px}}
.kds-btn.sm{min-height:52px}

.kv .badge,dd .badge{white-space:normal;max-width:100%}

/* coordinator: radio rows look like checkbox rows (same type size, the circle on the first line, help under the words) */
label:not(.choice,.check,.tender,.pick,.chip):has(>input[type=radio]){position:relative;display:block;padding-inline-start:32px;margin:8px 0;font-size:16px;font-weight:600;line-height:1.45;cursor:pointer}
label:not(.choice,.check,.tender,.pick,.chip)>input[type=radio]{position:absolute;inset-inline-start:0;top:2px;margin:0;width:22px;height:22px}
label:not(.choice,.check,.tender,.pick,.chip)>input[type=radio]~small,label:not(.choice,.check,.tender,.pick,.chip)>input[type=radio]~.help{display:block;font-weight:400;font-size:13px}

/* visual fix E2 (looked-3/4/5, 16 Nov 2026) */
/* the page-language file picker (app.js B7: span.filepick inside label.field): app.css:136 '.field>span{display:block}' beat
   layout.css:187 '.filepick{display:flex;gap}', so "Choose a file" touched "No file chosen" (/settings/import, /products/new,
   /products/<id>, /bookings/import) */
.field>span.filepick,.field span.filepick{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap-tap,8px) 12px;margin:0;font-weight:400;font-size:inherit;color:inherit}
.field span.filepick>.filepick-n{display:inline;margin:0;font-weight:400;color:var(--muted,#5B6676)}
.field span.filepick>.btn{display:inline-flex;margin:0}
/* an empty table read as a card (tidy.js 1): its one sentence across the columns is a plain line, never cut at the edge */
@media (max-width:639px){table.cards td[colspan]:only-child{display:block;text-align:start;white-space:normal}table.cards td[colspan]:only-child::before{content:none}}
/* our admin's trial extensions (/admin/trial-extensions): a key fingerprint wraps in even lines (a short piece fell alone on the last line) */
.tx-key dd.ltr,.tx-key dd .ltr{font-family:ui-monospace,Consolas,monospace;font-size:13px;word-break:break-all;text-wrap:balance}
/* the welcome tour's "Show me around" on /suite: the partial writes its script after the box, so the float rule above (box +
   link + .page-head) never matched and the button stood on a row of its own above the title */
@media (min-width:600px){[data-welcome-tour]:has(+script+link+.page-head),[data-welcome-tour]:has(+script+.page-head){float:inline-end;margin:0;margin-inline-start:12px}}
/* two button forms side by side in a .row-actions group share one line: 'form+form{margin-top}' (section 11) put the second
   (Settings > Tills: Revoke beside Sign out this till) 14 px lower */
.row-actions>form{margin:0}
/* Pages\BillingPlan.cshtml: the cycle's Save takes its own row under Monthly / Yearly; the Free card's price box sits beside the
   floated medal picture instead of running under it (a box with its own formatting context keeps clear of a float) */
.cycle form.row>.cycle-save{flex:1 1 100%;margin-top:4px}
.card>.plan-art~.tile{display:flow-root}
/* Pages\CreditReport.cshtml on a phone: the period form is a two-column grid: From / To, the days on their own line, then Apply,
   Print, Excel, CSV two by two (CSV wrapped alone onto its own row above the tiles) */
@media (max-width:599px){form[data-rem-period]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;align-items:end}form[data-rem-period]>*{min-width:0;margin:0}form[data-rem-period]>.field:nth-of-type(3){grid-column:1/-1}form[data-rem-period]>.btn{width:100%}}
/* Pages\SettingsBranches.cshtml: the branch's tills and users start a clear block under the form's buttons (the Tills heading sat
   a few px under Save / Deactivate) */
.grid2.br-people{margin-top:calc(var(--gap-block,14px) + 4px);padding-top:var(--gap-block,14px);border-top:1px solid var(--line,#D8DCE2)}
/* Pages\SettingsStockRst.cshtml supplier terms: the language select and the WhatsApp number show their whole value ("The shop's
   lar", "010000000" were cut); the table scrolls in its frame as before */
@media (min-width:640px){.rst-terms td>select[name=s_lang]{min-width:200px}.rst-terms td>input[type=tel]{min-width:175px}.rst-terms td>select[name=s_rmode]{min-width:170px}}
/* Pages\AdminAccount.cshtml: "Set the password" on the line of its field, the help under both */
form.aa-pw{flex-wrap:wrap}
form.aa-pw>.aa-pw-help{flex:1 1 100%;margin-top:-4px}
/* Pages\Bookings.cshtml: the seven state boxes are four and three on a desk (Cancelled sat alone on a third row); the filter's
   Show is a pill like Today / Calendar / New booking beside it (it was the module sheet's dark navy button) */
@media (min-width:900px){main .apt-grid:has(>.apt-card:nth-child(7):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}}
main form.apt-nav>button{min-height:var(--tap,44px);padding-inline:1.2em;background:var(--card,#fff);color:var(--navy,#12325B);border:1px solid var(--line,#D8DCE2);font-weight:700;cursor:pointer}
/* a table read as cards on a phone: a name picker (an input with a datalist: a recipe's ingredient, a receive line's product)
   takes the card's whole width under its label instead of 62 % of it (the name was cut: "...o beef ingredient") */
@media (max-width:639px){table.cards td:has(>input[list]){flex-wrap:wrap}table.cards td>input[list]{max-width:none;flex:1 1 100%;min-width:0}}
/* Pages\Receipt.cshtml: WhatsApp / Print keep the page's gap under the receipt (a hairline before); the customer's e-receipt
   address is one line ending in an ellipsis (it wrapped as two lines of raw text); the whole address stays in the link */
.receipt+.actions{margin-top:var(--gap-block,14px)}
p[data-ereceipt-link]>a{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
/* a card that is itself a form grid (section.card.grid2: Settings > Credit book): its heading spans the card, the fields start
   under it (the heading took the first cell and the first field sat beside it) */
.card.grid2>h2,.card.grid3>h2,.card.grid2>h3,.card.grid3>h3{grid-column:1/-1}
/* two fields on one line inside a field (a span.row of "from – to" times): app.css:136 '.field>span{display:block}' stacked them
   with the dash alone on its own line (Settings > Credit book quiet hours) */
.field>span.row{display:flex;align-items:center;gap:8px;margin:0;font-weight:400;font-size:inherit;color:inherit}
.field>span.row>input{flex:1 1 0;min-width:0;width:auto}
/* Pages\Waiter.cshtml: the chosen view (My tables / Choose tables / All tables) is a ringed pill, never the green of an action */
.svc-head .actions>.btn.ghost.on{background:var(--navy-soft,#E8EEF6);border-color:var(--navy,#12325B);color:var(--navy,#12325B);box-shadow:0 0 0 1px var(--navy,#12325B) inset;font-weight:800}
/* Pages\StockLow.cshtml on a phone: "Threshold:" on its own line, the five % buttons one even row under it (50% fell alone onto a second row) */
@media (max-width:599px){form.thr-row{flex-wrap:wrap;gap:8px}form.thr-row>span{flex:1 1 100%}form.thr-row>.btn{flex:1 1 0;min-width:0;padding-inline:.4em}}
/* Pages\SetupTeam.cshtml: Invite and the accounts list stacked in the column beside the add form */
.team-side{display:flex;flex-direction:column;gap:var(--gap-block,14px);min-width:0}
.team-side>.card{margin:0}
/* a three-column form grid is two columns on a phone (app.css): its last field alone takes the whole row instead of half of it
   (Settings > Shop "VAT %", Settings > Stock replenishment "Order budget") */
@media (max-width:639px){.grid3>.field:last-child:nth-child(odd){grid-column:1/-1}}
/* Pages\Product.cshtml (/products/new, /products/<id>) on a phone: the barcode field takes its own line and Generate / the camera
   share the line under it (the field was squeezed to about 50 px beside the two buttons) */
@media (max-width:599px){
  .row:has(>input[name=barcode]+#bcgen){flex-wrap:wrap;gap:8px}
  .row:has(>input[name=barcode]+#bcgen)>input[name=barcode]{flex:1 1 100%;min-width:0}
  .row:has(>input[name=barcode]+#bcgen)>.btn{flex:1 1 0;min-width:0}
}

/* visual audit E3a (second look, looked-6/7): our admin, billing, help, suite */
/* a phone card cell whose value has a second line (.sub: "26 min ago" under a date, a tier under the interest): the value sits at
   the cell's end like every other value, its second line under it (space-between had put the value in the middle) */
@media (max-width:639px){table.cards td:not(.main,.act):has(>.sub){flex-wrap:wrap}table.cards td:not(.main,.act)>.sub{flex:1 0 100%;text-align:end}}
/* our admin's contact cell on a phone (/admin, /admin/leads): the label over the cell, the number on its line, its Call / WhatsApp /
   Copy on one row under it at the tap size of the signed-in app (layout.css:135 is not linked here) */
@media (max-width:639px){
  .admin table.cards td:has(>.contact){display:block;text-align:start}
  .admin table.cards td:has(>.contact)::before{display:block;max-width:none;margin-bottom:4px}
  .admin table.cards td>.contact{align-items:stretch}
  .admin table.cards td .c-line>.c-val{flex:1 0 100%}
  .admin .c-btn{min-height:36px;display:inline-flex;align-items:center;padding-inline:12px}
}
/* /admin/leads on a desk: the table fits its card (Latest was cut at the edge): Source wraps between words, Latest is narrower; a
   tier word under the interest is never cut in half (Restaura|nt: td .sub breaks anywhere, app.css:183); a state pill is one line */
@media (min-width:640px){
  .leads-t td.lastnote{min-width:160px}
  .leads-t td.source .nowrap{white-space:normal}
  .leads-t td.interest .sub{overflow-wrap:normal}
  .leads-t .badge{white-space:nowrap}
}
/* /admin customers: the phone column is narrower (the table ran past its card in Arabic, the row buttons cut); Details and Help
   them are one column of equal one-line buttons */
.admin .home-list td .contact{min-width:150px}
.home-list td.act .row-actions{display:grid;gap:6px}
.home-list td.act .row-actions>form{display:block;margin:0}
.home-list td.act .row-actions .btn{width:100%;margin:0;white-space:nowrap}
/* /admin/email-health on a desk: the address and Reactivate stay on one line each */
@media (min-width:640px){.eh-t td.main{white-space:nowrap}.eh-t td.act .btn{white-space:nowrap}}
/* our admin: a button row that is also .row.wrap is not indented by the page wrapper's padding (layout.css:20 is not linked here;
   /admin/assistant switches) */
.admin .row.wrap{padding:0}
/* /admin/desktop: the licence form takes three fifths beside Prices today and its short fields share a row again (one long column
   left a large empty area under the prices) */
@media (min-width:900px){.admin .grid2:has(>#send){grid-template-columns:minmax(0,3fr) minmax(0,2fr)}.admin #send .grid2{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Account > Language: its one narrow card starts at the page's start edge (it sat centred), like Account > Display */
main.wrap>section.card.narrow:has(>form.lang-pick){margin-inline:0 auto}
/* /help: the topic cards fill two columns top to bottom (in a grid, cards of their own height left holes and a lone last card) */
@media (min-width:640px){.grid2.help-groups{display:block;columns:2;column-gap:var(--gap-block)}.grid2.help-groups>.card{break-inside:avoid;margin:0 0 var(--gap-block)}}
/* /suite: Show me around sits at the end of the title's line (a script and the page's sheet come between it and the title); every
   card's Open sits at the card's foot, one line across a row; the button is a pill, not a round blob */
@media (min-width:600px){[data-welcome-tour]:has(+script+link+.page-head){float:inline-end;margin:0;margin-inline-start:12px}}
.suite-grid .card>.actions{margin-top:auto;padding-top:12px}
.suite-grid .card>.actions>.btn{padding-inline:1.4em}
/* end E3a */

/* visual audit E3b (second look, looked-6/7): purchase orders, reports, HR, suppliers, products, categories */
/* a phone: a table whose only row is the empty-state sentence shows the sentence without its column headers (narrow headers
   broke inside their words: "Docu|ment", "Acco|u|nt", "Ear|ne|d"; a filled table is cards there, which show no header row either) */
@media (max-width:639px){table:has(>tbody>tr:only-child>td.empty:only-child)>thead{display:none}}
/* /hr/leave team calendar on a phone: a weekday name that is wider than its day column ends in "…" instead of running into the next one */
.hr-cal>div.small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:599px){.hr-cal>div.small{font-size:11px}}
/* Reports > Accounting export on a phone: the three tiles are the big one, then two side by side (the orphan rule left Net VAT
   alone in a half row and Debit = Credit on a row of its own); a big first tile counts as a whole row */
@media (max-width:639px){.tiles>.tile.big:first-child~:last-child:nth-child(odd){grid-column:auto}.tiles>.tile.big:first-child~:last-child:nth-child(even){grid-column:1/-1}}
/* ... and its file buttons are one per line, each as wide as the card (long Arabic names broke onto two lines at random widths) */
@media (max-width:599px){[data-acc-files] .row>.btn{flex:1 1 100%}}
/* Reports > Export: each data set's CSV / Excel / JSON buttons are one group with a frame (they were one long row of equal pills) */
.export-formats{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;padding:4px;border:1px solid var(--line,#D8DCE2);border-radius:999px;margin-block:0 6px;margin-inline-end:8px;vertical-align:middle}
.export-formats>.btn{margin:0}
/* a row of one checkbox and its button (Reports > Export, Accountant feed: Feed on + Save): both on the row's centre line */
.inline:has(>.check):not(:has(>.field))>.btn{align-self:center}
.inline:has(>.check):not(:has(>.field))>.check{margin-block:0;align-items:center}
/* three small tiles in a half-width card (Reports > Job orders "Ready but not collected": 30+ / 60+ / 90+ days) share one row */
@media (min-width:640px){.grid2 .tiles:has(>:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}}
/* a chart of a few bars (Charts.cs data-few) fits a phone's card whole: no 560 px scroll width, so the last bar stays in view;
   its labels are drawn larger to stay readable at the smaller scale, the axis titles are in its table ("The numbers") */
@media (max-width:599px){
  .chart .ch-scroll svg.ch[data-few]{min-width:0}
  .ch[data-few] .ch-tick{font-size:22px}
  .ch[data-few]>text.ch-axis-t{display:none}
}
/* Purchase order on a phone: each order line is a small card (name, then ordered / unit cost / total / received / outstanding
   with their words), instead of a table cut at the card's edge after Unit cost */
@media screen and (max-width:639px){
  .po-lines thead{display:none}
  .po-lines tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 10px;padding-block:8px;border-bottom:1px dashed var(--line,#D8DCE2)}
  .po-lines td{display:block;padding:0;border:0;text-align:start}
  .po-sheet .po-lines td:first-child{grid-column:1/-1;min-width:0;font-weight:700}
  .po-lines td[data-l]::before{content:attr(data-l);display:block;font-size:12px;font-weight:700;color:var(--muted,#5B6676)}
}
/* Suppliers: a supplier's buttons are a tidy block of two columns, Delete (red) in it, not alone on a line under the others */
@media (min-width:640px){
  table.sup-t td.act{display:grid;grid-template-columns:repeat(2,max-content);gap:6px;justify-content:start}
  table.sup-t td.act>.btn,table.sup-t td.act>form>.btn{width:100%;margin:0}
  table.sup-t td.act>form{margin:0}
}
/* a required field the server named empty says so under itself (tidy.js 5) */
.field-err{display:block;margin-top:4px;color:var(--bad,#B42318);font-size:13px;font-weight:600}
/* Products with only a few rows: "With the selected" is an ordinary row under the table (sticky at the window's foot it covered
   the last rows of a short list); a long list keeps it at the foot */
@media (min-width:640px){form:has(>.tw tbody):not(:has(tbody>tr:nth-child(13)))>.sticky-actions{position:static;box-shadow:none;margin-top:var(--gap-block)}}
/* tables as cards on a phone: a cell's second line (.sub: "from the ingredients", a sale price, an amount) goes under its value at
   the end, not into the middle of the row; the label of a monospace cell (barcode) is in the page's font (Arabic letters stayed
   apart); an empty picture cell is not shown; Categories: no hole where the first row's ▲ would be, the checkbox row is one line */
@media (max-width:639px){
  table.cards td:has(>.sub){flex-wrap:wrap}
  table.cards td>.sub{flex:1 1 100%;text-align:end}
  table.cards td.mono::before{font-family:var(--font,inherit)}
  table.cards td.thumb-col:has(>.thumb.none){display:none}
  table.cards td.act>.arr-gap{display:none}
  table.cards td:has(>label.check){align-items:center}
  table.cards td>label.check{margin:0;min-height:0}
}
/* end E3b */

/* visual audit E3c (second look, looked-6/7): settings pages, waiter pages, kiosk, shop */
/* Pages\WaiterSpot.cshtml on a phone: Seat guests is a full-width button like I'll clean it / Mark clean above it */
@media (max-width:599px){.svc-card form.inline>.btn{flex:1 1 100%}}
/* Settings > Bookings (BookingsSettings.cshtml): the date field's calendar button is the plain icon of every other date field (the
   bookings sheet's "button" rule drew it as a navy blob); Save is the page's main button, coloured like Save on the other settings pages */
main .apt-form button.datepick{background:none;color:var(--muted,#5B6676);padding:0;min-height:0;border-radius:var(--radius-sm,10px)}
main form.apt-settings>button:not([name]){background:var(--gold);color:var(--navy-2);font-weight:800}
/* Settings > Promotions: the days of the week and the categories are rows of boxes that wrap (a tall column of 7 left an empty
   block beside it); "Hours (from - to)" is two fields on one line with the dash between them (the dash sat alone on a line) */
.field.promo-checks{display:flex;flex-wrap:wrap;align-items:center;gap:0 18px}
.field.promo-checks>span:first-child{flex:1 1 100%}
.field.promo-checks>.check{flex:0 0 auto;margin:0;min-height:var(--tap,44px);align-items:center}
.field>span.hr-range{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
.field>span.hr-range>input{flex:1 1 0;min-width:0;width:auto}
/* a table of fields on a desk (Settings > Delivery desk: Commission %, Usual float, Delivery fee, Minimum order): a number
   column's field fills its column, so its header starts where the field starts (the header sat at the column's other end) */
@media (min-width:640px){form table:has(td.n>input:not([type=hidden])) th.n{text-align:start}form table:has(td.n>input:not([type=hidden])) td.n>input{margin-inline-start:0}}
/* a table read as cards on a phone: a cell with nothing in it (Counter's "App collects the money") is not shown as an empty label */
@media (max-width:639px){table.cards td:empty{display:none}}
/* Settings > Job orders, Steps: each step's name over its field, the fields one width under each other (inline labels of different
   lengths started the four fields at different places); an optional step's switch sits on the field's line */
.job-steps>.row.inline{align-items:flex-end;flex-wrap:nowrap;gap:8px 14px;margin-bottom:12px}
.job-steps>.row.inline>label.field.inline{display:block;flex:1 1 0;min-width:0;margin:0}
.job-steps>.row.inline>label.field.inline>span{display:block;margin-bottom:4px}
.job-steps>.row.inline>.check{flex:none;order:2;min-height:var(--tap,44px);align-items:center;margin:0}
/* Settings > Warehouses, "Add a location" on a phone: one field per line (two half-width selects cut the branch name at its start) */
@media (max-width:599px){form.grid3.wh-add{grid-template-columns:minmax(0,1fr)}}
/* end E3c */

/* visual fix E1 (second look, looked-1/2, 16 Nov 2026) */
/* a table read as a card on a phone: the label at the start, every value of the cell together at the end (an amount sat in the
   middle of its row with its payment badge at the edge: /receipts Total, /waiter/coverage Action and Delivery) */
@media (max-width:639px){
  table.cards td:not(.main,.act,.cell-act,.empty){justify-content:flex-end;column-gap:8px}
  table.cards td:not(.main,.act,.cell-act,.empty)::before{margin-inline-end:auto}
}
/* the tiles with one big tile on a phone: the big one takes a row, so the orphan rule counts from the other parity (Home: "Month"
   sat alone in the last row with an empty half beside it) */
@media (max-width:639px){
  .tiles:has(>.tile.big):not(:has(>.tile.big~.tile.big))>:last-child:nth-child(odd):not(.big){grid-column:auto}
  .tiles:has(>.tile.big):not(:has(>.tile.big~.tile.big))>:last-child:nth-child(even):not(.big){grid-column:1/-1}
}
/* a form grid whose fields line up row by row (class .lined: a label that wraps to two lines, or a field with a help line under
   it, no longer moves the field beside it up or down): each field's label, control and help share the grid's rows */
.grid2.lined,.grid3.lined{align-items:start}
.grid2.lined>.field,.grid3.lined>.field{display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:0;align-content:start}
.grid2.lined>.field>span:first-child,.grid3.lined>.field>span:first-child{align-self:end}
/* the CSV / Excel / JSON links app.js groups beside an old CSV link: an even gap (they touched on our admin, which does not link
   restaurant.css) */
.export-formats{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%}
/* a row button in a table on a desk keeps its words on one line ("Turn off" broke into a tall two-line pill: /admin/coupons) */
@media (min-width:640px){td.act .btn{white-space:nowrap}}
/* Pages\Index.cshtml: the day picker and the branch picker share one line on a desk; the branch label stays on one line */
.dash-bar{gap:8px 24px;align-items:center;margin-bottom:var(--gap-block)}
.dash-bar>form{margin:0;flex:1 1 320px;max-width:560px}
.dash-bar>form+form{margin-top:0}
.dash-bar>[data-branch-chooser]>label{white-space:nowrap}
/* Pages\Instalments.cshtml: the sub-tabs and Print / Excel / CSV are one bar (two tight rows), with the page's gap under it */
.ins-bar{gap:8px 16px;margin-block:0 var(--gap-block)}
.ins-bar>.row{gap:8px}
/* Pages\Jobs.cshtml on a phone: the filter chips wrap as tall as the buttons; Board / List / Excel / CSV are one row of four under
   them (List was cut by the strip's fade at the screen edge) */
nav.chips[data-job-filters]>.chip{min-height:var(--tap,44px);display:inline-flex;align-items:center}
@media (max-width:899px){
  nav.chips[data-job-filters]{flex-wrap:wrap;overflow:visible;-webkit-mask-image:none;mask-image:none}
  nav.chips[data-job-filters]>.grow{flex:1 1 100%;height:0}
  nav.chips[data-job-filters]>.btn{flex:1 1 0;min-width:0;padding-inline:.6em}
}
/* Pages\Waiter.cshtml: Sound sits at the end of the "My alerts" line, its box on the line of its word; on a phone My tables /
   Choose tables / All tables are one width each */
.svc-inbox summary>.check.svc-sound{margin-inline-start:auto;align-items:center;min-height:var(--tap,44px)}
.svc-inbox summary>.check.svc-sound>input{margin:0}
@media (max-width:599px){
  .svc-head>.row>.actions:first-child{width:100%}
  .svc-head>.row>.actions:first-child>.btn{flex:1 1 100%;justify-content:space-between}
}
/* a choice strip of up to four tabs inside a card wraps on a phone instead of being cut at the card's edge (/assets New asset:
   "From a Bo...") */
@media (max-width:599px){
  .card>nav.tabs:not(:has(>a:nth-child(5))){flex-wrap:wrap;overflow:visible;-webkit-mask-image:none;mask-image:none}
  .card>nav.tabs:not(:has(>a:nth-child(5)))>a{white-space:normal}
}
/* the page picture floated beside a title on a desk is the title's height: the cards under it start below it (D3) without an
   empty band of about 50 px under the title (/help/support, /setup/till, /setup/products) */
@media (min-width:600px){.art.side:has(+h1){width:56px;height:auto;margin-block:0;margin-inline-start:12px}}
/* Pages\SetupProducts.cshtml: the three ways are one row of cards of one height, their buttons on one line at the foot */
.way-cards{align-items:stretch;row-gap:var(--gap-block)}
.way-cards>.card{display:flex;flex-direction:column;margin-bottom:0}
.way-cards>.card>:last-child{margin-top:auto;align-self:flex-start}
.way-cards>.card>form:last-child{align-self:stretch}
.way-cards+p{margin-top:var(--gap-block)}
/* an empty table's picture and sentence (Art.Empty: td.empty) are centred in the card on a phone, as on a desk (/stock/lots
   Arabic: they sat at the left edge) */
@media (max-width:639px){table.cards td.empty[colspan]:only-child{text-align:center}}
/* Pages\SettingsFrontDesk.cshtml: the webhook address is its own line (it broke after "front-" with Copy wedged between its halves) */
span.mono[data-fd-webhook]{display:block;margin-block:4px 8px;word-break:break-all;unicode-bidi:isolate}
[dir=rtl] span.mono[data-fd-webhook]{text-align:right}
/* Pages\Shared\_HrLinks.cshtml on a phone: the HR menus are two equal columns (they stacked into six rows of uneven pills before the
   page started); an open menu takes the whole row */
@media (max-width:599px){
  nav.hr-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  nav.hr-links>.btn,nav.hr-links>.hr-menu>summary.btn{width:100%;justify-content:center;margin:0}
  nav.hr-links>.hr-menu[open]{grid-column:1/-1}
  nav.hr-links>:last-child:nth-child(odd){grid-column:1/-1}
}
/* an empty list of HR cards (Settings > Attendance devices) starts at the page's edge like the text above it, across both columns */
.hr-list>.empty-state{grid-column:1/-1;align-items:flex-start;text-align:start;padding-inline:0}
.hr-list>.empty-state .actions{justify-content:flex-start}
/* Pages\Sell.cshtml on a phone: the cart's tools (Hold, Tables, Retail, Order board ... whichever the till shows) are a grid of
   equal buttons instead of ragged rows of pills of different widths */
@media (max-width:599px){
  .sell-cart>#sell-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
  .sell-cart>#sell-tools>.btn{width:100%;margin:0;justify-content:center}
}
/* a field in a table read as a card fills the row beside its label (it was capped at 62 %: a recipe's ingredient name read
   "...o beef ingredient" on an Arabic phone) */
@media (max-width:639px){
  table.cards td:not(.cell-act)>input:not([type=checkbox],[type=radio],[type=hidden]),table.cards td:not(.cell-act)>select{flex:1 1 0;width:auto;max-width:none;min-width:0}
}
/* the report range fields (Pages\Shared\_RangeFilter.cshtml): From / To (a date picker box) and From time / To time start on one
   line (bottom-aligned, From sat about 4 px higher than From time: /money/net) */
.range-filter .inline:has(>.field){align-items:flex-start}
.range-filter .inline>.field>.datewrap{margin:0}
/* a field with buttons on its line (Products > a product: Barcode [Generate] [Scan]): on a phone the field takes the line and its
   buttons go under it (the barcode box was squeezed to a third of the row) */
@media (max-width:599px){.field>.row>input.grow{flex:1 1 100%}}
/* the page-language file picker (app.js B7) also in a drop box (Suppliers > a price list: the browser's English "Choose File" on
   an Arabic page) and in a row of a form (Settings > Screens > Team photos) */
label.ivp-drop:has(.file-native){position:relative}
label.ivp-drop>span.filepick{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.inline>label.field:has(>.file-native){margin:0}
/* end E1 */
/* coordinator, second pass after the looking: a select shows its Arabic text whole (the fixed 44 px left a 24 px box for a 25 px line); a checkbox label inside .field is one line; the camera button is a sign on a phone everywhere; module cards stay one height */
select{padding-block:0;line-height:1.3}
.field:has(>input[type=checkbox],>input[type=radio]){display:flex;align-items:flex-start;gap:10px}
.field:has(>input[type=checkbox],>input[type=radio])>span{display:block;flex:1 1 0;min-width:0;margin:0}
@media (max-width:767px){.scan-cam{font-size:0!important;min-width:var(--tap,44px);padding-inline:.6em}.scan-cam::before{content:"\1F4F7";font-size:18px}}
.grid2[data-modules]{align-items:stretch}
