/* The dashboard's shared look file (2026-11-04, the UI review — owner: «اعملهم كلهم»). Loaded after every other style of
   admin.html, so a look fix lives here once instead of in another layer inside the page. It changes no layout on a
   laptop; what it does:
   1. touch screens: the small controls (filter tabs, small buttons, name and ticket links) get a tap area of at least
      38 px — the review found 365 of 2,783 tappable things on a phone under 32 px;
   2. phones: the small text is never under 12 px (it was 11–11.5 px for 34 % of the words);
   3. light mode: status chips, the red «إلغاء» and the grey text get the contrast to read (2,055 words were under WCAG's
      4.5:1 in light mode, «انتهى العرض» at 2.2): the same hue, darker. Dark mode keeps its own colours.
   4. phones: a window's dates on their own row;
   5. the buttons (2026-11-05, «نظام شكل واحد» — the start): four kinds and two sizes for every action button;
   7. the fields (2026-11-05, stage 2): one look and two sizes for every text box, list and notes box;
   8. states that must show through 5 and 7: a button saving or saved, a field edited or wrong;
   9. the cards (2026-11-05, stage 3): one surface and three corner sizes for every card, row and figure;
   10. the tabs and filters (2026-11-06, stage 4): one track and two sizes for every group of tabs;
   11. the tones (2026-11-06, stage 5): the colours that were written inside the elements, as classes with a dark look.
   New screens use these tokens and the existing families (win.css) rather than new one-off styles. */
/* the order of the layers: for !important rules the first layer wins, so the states (8) beat the looks (5, 7) */
@layer ui-state,look,ui; /* look = look.css, the clay look (2026-11-10): beats ui, loses to the states */
:root{
  --ui-tap:38px;           /* the least tap area on a touch screen */
  --ui-text-min:12px;      /* the least text size on a phone */
  --ui-ink:#141a3a;        /* what a chip's colour is mixed toward in light mode */
  --ui-muted-light:#545b74;
  /* the buttons: kinds */
  --ui-primary:#2B3484;    /* the one main action of a place: filled navy */
  --ui-danger:#c4302b;     /* reject, delete, cancel something that was done: red words (5.9:1 on white) */
  /* the buttons: sizes — md for a window's own actions, sm for the actions on a row of a list */
  --ui-h:38px;--ui-px:14px;--ui-r:11px;--ui-fs:13px;
  --ui-h-sm:32px;--ui-px-sm:11px;--ui-r-sm:10px;--ui-fs-sm:12.5px;
  /* the fields: md for a form or a tool row, sm for a number typed on a row of a list; the ring shows where you type */
  --ui-f-h:38px;--ui-f-px:10px;--ui-f-r:10px;--ui-f-fs:13px;
  --ui-f-h-sm:32px;--ui-f-px-sm:6px;--ui-f-r-sm:8px;
  --ui-ring:#2B3484;
  /* the cards: lg for a card of a page, md for a card, row or figure in a window, sm for a small row, a card inside a
     card or a note; a card in a window lifts by a hair, a card of a page by the home's soft shadow */
  --ui-card-r-lg:16px;--ui-card-r:14px;--ui-card-r-sm:12px;
  --ui-card-sh:0 1px 2px rgba(15,20,48,.04);
  /* the tabs: md for the main views of a window or a page (a 42 px track), sm for a filter in a tool row (a 38 px track,
     the height of the fields and buttons beside it) */
  --ui-tab-r:12px;--ui-tab-r-in:9px;--ui-tab-p:3px;--ui-tab-gap:2px;
  --ui-tab-h:34px;--ui-tab-px:16px;--ui-tab-fs:13px;
  --ui-tab-h-sm:30px;--ui-tab-px-sm:12px;
}
html.desk-dark,:root[data-theme="dark"]{--ui-primary:#4553c4;--ui-danger:#ff7b7b;--ui-ring:#8592ff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ui-primary:#4553c4;--ui-danger:#ff7b7b;--ui-ring:#8592ff}}
@media (pointer:coarse){:root{--ui-h-sm:var(--ui-tap);--ui-f-h-sm:var(--ui-tap);--ui-tab-h:var(--ui-tap);--ui-tab-h-sm:var(--ui-tap)}}
/* Safari zooms the page into a field whose text is under 16 px (the phone rule of admin.html, kept) */
@media (max-width:760px),(max-height:500px) and (max-width:1000px){:root{--ui-f-fs:16px}}
/* a phone: the main tabs keep the width of the filter tabs, so the old home's seven sections still fit in two rows */
@media (max-width:760px){:root{--ui-tab-px:12px;--ui-tab-fs:12.5px}}

/* 1. tap areas — touch screens only; nothing moves on a laptop with a mouse */
@media (pointer:coarse){
  .wn-seg button,.dh-seg button{min-height:var(--ui-tap);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
  #usersModal .wn-b,#usersModal .wn-x,.er-acts .wn-b,.ac-acts .wn-b,.mt-acts .wn-b,.cr-pz .wn-tog{min-height:var(--ui-tap);min-width:var(--ui-tap)}
  .er-row select,.mt-row select{min-height:var(--ui-tap)}
  /* links inside a line keep their look; an invisible frame round them takes the finger */
  .ed-link,.er-a,.dh-link{position:relative}
  .ed-link::after,.er-a::after,.dh-link::after{content:"";position:absolute;inset:-9px -6px}
}

/* 2. the least text size — phones */
@media (max-width:760px){
  body small,body .wn-nm small,body td small,body .au-what small,body label.bl-f small,body .au-row time,body .au-who,
  body .fl-pill,body .badge,body .pu-tag,body .wn-gl span,body .mini-count,body .bl-in em{font-size:var(--ui-text-min)!important}
}

/* 3. contrast — light mode only: the theme switch set to light, or no choice and the phone in light mode (never under the
   home's night look, html.desk-dark). The chips and tags keep their colour, mixed toward the ink. */
:root[data-theme="light"]:not(.desk-dark){--muted:var(--ui-muted-light)}
:root[data-theme="light"]:not(.desk-dark) :is(.wn-chip,.pu-tag,.fl-pill,.sl-bal em,.badge,.rq-s,.bl-st,.us-pin,.mt-st,.pending-badge){color:color-mix(in srgb,var(--c,currentColor) 62%,var(--ui-ink))}
@media (prefers-color-scheme:light){
  :root:not([data-theme]):not(.desk-dark){--muted:var(--ui-muted-light)}
  :root:not([data-theme]):not(.desk-dark) :is(.wn-chip,.pu-tag,.fl-pill,.sl-bal em,.badge,.rq-s,.bl-st,.us-pin,.mt-st,.pending-badge){color:color-mix(in srgb,var(--c,currentColor) 62%,var(--ui-ink))}
}

/* 4. phones: a window's date fields on their own row (the movement log opens with a date in it since 2026-11-04, and two
   dates beside the building tabs were squeezed to a few pixels) */
@media (max-width:760px){
  .wn-tools .fl-date{flex:1 1 calc(50% - 8px);min-width:140px}
  .wn-tools .fl-date input{width:100%;min-width:0}
}

/* 6 (before 5, so 5 can stay last). phones: a list shown as cards (table.m-cards) — the buttons of a row keep the width of
   their words and go to the next line when the row is full. They were squeezed to 40 px, and «تعديل» broke into «تع/دي/ل»,
   by «table.m-cards td>*{min-width:0}». */
table.m-cards td:has(>button){flex-wrap:wrap;row-gap:8px}
table.m-cards td>button{flex-shrink:0}

/* 5. the buttons — four kinds, two sizes (2026-11-05, «نظام شكل واحد», the start). The review counted 69 different button
   looks on a laptop: the same «تعديل» was 23, 30, 32, 36 or 39 px, navy-outlined in one window and grey in the next.
   Kinds: secondary (white, ink words, grey line) is every action's default; primary (navy) the one main action; danger
   (red words) rejects, deletes or cancels something that was done; quiet (no fill) is win.css's .wn-x and .wn-tog, untouched.
   Sizes: md for a window's own actions, sm for the actions on a row of a list; on a touch screen both are 38 px.
   Which buttons: the .wn-b family, the home's .dh-btn and task buttons, and .alt or plain buttons only inside the action
   rows named below. A tab, a segment, the menu, a filter chip, a card or an icon square keeps its own look — tab groups
   mark the chosen tab by having no class and the others .alt, so .alt alone never means «a button».
   The rules sit in a cascade layer with !important: an important rule in a layer wins over every unlayered important
   rule (the page has 744), so one place decides without a race of selectors. Never set display, visibility or width
   here: those hide and lay out buttons, and a layered !important would beat «.hidden{display:none!important}». */
@layer ui{
/* secondary — the default */
  .wn-b,
  .dh-btn,
  .dh-al .go,
  :is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),
  :is(.v45-cov-line,.dx-bar) button.alt:not(.on),
  :is(.po-footer,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions)>button:not([class]){
  box-sizing:border-box!important;min-height:var(--ui-h)!important;padding-block:4px!important;padding-inline:var(--ui-px)!important;
  border-radius:var(--ui-r)!important;border:1px solid var(--line)!important;background:var(--card-bg)!important;color:var(--text)!important;
  font-size:var(--ui-fs)!important;font-weight:600!important;line-height:1.25!important;box-shadow:0 1px 2px rgba(15,20,48,.05)!important;
  /* a word never breaks inside a button (the item table on a phone showed «تع/دي/ل»): lines break between words only */
  word-break:normal!important;overflow-wrap:normal!important;
  cursor:pointer;transition:border-color .15s,background-color .15s,transform .15s}
/* the .wn-b family keeps a fixed height (its rows are laid out on it); the others grow when their words wrap */
.wn-b{height:var(--ui-h)!important}
  .dh-btn,
  .dh-al .go,
  :is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),
  :is(.v45-cov-line,.dx-bar) button.alt:not(.on),
  :is(.po-footer,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions)>button:not([class]){height:auto!important}
/* sm — the actions on a row of a list */
  .po-act .wn-b,
  .ac-acts .wn-b,
  .mt-acts .wn-b,
  .er-acts .wn-b,
  .us-card .wn-b,
  .us-acts .wn-b,
  .us-pinrow .wn-b,
  .zb-fx .wn-b,
  .cal-a .wn-b,
  .dh-al .go,
  :is(td,.po-actions,.muted)>button.alt:not(.on),
  :is(.v45-cov-line,.dx-bar) button.alt:not(.on){
  min-height:var(--ui-h-sm)!important;padding-inline:var(--ui-px-sm)!important;border-radius:var(--ui-r-sm)!important;font-size:var(--ui-fs-sm)!important}
  .po-act .wn-b,
  .ac-acts .wn-b,
  .mt-acts .wn-b,
  .er-acts .wn-b,
  .us-card .wn-b,
  .us-acts .wn-b,
  .us-pinrow .wn-b,
  .zb-fx .wn-b{height:var(--ui-h-sm)!important}
  .cal-a .wn-b{height:var(--ui-h-sm)!important}
/* primary — navy */
  .wn-b.p,
  .dh-btn.p,
  :is(.po-footer,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions)>button:not([class]){
  background:var(--ui-primary)!important;border-color:var(--ui-primary)!important;color:#fff!important;box-shadow:0 8px 18px -10px rgba(43,52,132,.7)!important}
/* danger — red words on the same white button */
  :is(.wn-b,
  :is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),
  :is(.v45-cov-line,.dx-bar) button.alt:not(.on)):is(.er-no,.us-no,.mt-no,.ac-no,.ui-no),
  :is(:is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),
  :is(.v45-cov-line,.dx-bar) button.alt:not(.on))[style*="#c62828"]{color:var(--ui-danger)!important}
/* hover and keyboard focus */
:is(.wn-b,.dh-btn,.dh-al .go,:is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),:is(.v45-cov-line,.dx-bar) button.alt:not(.on)):not(.p):not([disabled]):hover{border-color:color-mix(in srgb,var(--ui-primary) 45%,var(--line))!important}
:is(.wn-b.p,.dh-btn.p,:is(.po-footer,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions)>button:not([class])):not([disabled]):hover{background:color-mix(in srgb,var(--ui-primary) 88%,#fff)!important}
:is(.wn-b,.dh-btn,.dh-al .go,:is(td,.po-footer,.po-actions,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions,.sp-tools,.muted)>button.alt:not(.on),:is(.v45-cov-line,.dx-bar) button.alt:not(.on),:is(.po-footer,.limits-footer,.v65-actions,.v65-footer,.v70-actions,.v70-footer,.v70-toolbar,.v61-footer,.v62-footer,.v63-footer,.rep-footer,.modal-footer,.user-actions,.mt-ph-actions,.workflow-actions,.water-actions,.fl-actions)>button:not([class])):focus-visible{outline:2px solid var(--ui-primary)!important;outline-offset:2px!important}
}

/* 7. the fields — one look, two sizes (2026-11-05, «نظام شكل واحد», stage 2). The windows of win.css already had one look
   (38 px, a grey line, a navy ring while typing); the older windows each had their own (radius 7 to 12, lines #ccd3e3 to
   #ddd, heights 26 to 44) and the maintenance notes box had the browser's own (square, black, a monospace face).
   Look: the card's colour, the window's grey line, ink words, the page's own typeface; a navy ring while typing; a softer
   fill when it cannot be changed. Sizes: md for a form or a tool row; sm for a number typed on a row of a list (a count,
   a target, a building's limits); on a touch screen both are 38 px. A textarea keeps the height of its rows.
   Not touched: the search pills (.wn-search, the Ctrl+K box), the sign-in screen, the status lists that look like chips
   (.mt-st, .eng-st-pick), a list dressed as a button (.wn-b) and the IT inventory (#mon, monitors.css has its own family).
   Same rules as 5: never display, visibility or width. */
@layer ui{
  :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select,textarea):not(.wn-b,.mt-st,.eng-st-pick):not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *){
  box-sizing:border-box!important;border:1px solid var(--line)!important;border-radius:var(--ui-f-r)!important;
  background-color:var(--card-bg)!important;color:var(--text)!important;font-family:inherit!important;font-size:var(--ui-f-fs)!important;
  padding-inline:var(--ui-f-px)!important;box-shadow:none!important;transition:border-color .15s,box-shadow .15s}
/* md: one height for a text box and a list */
  :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select:not([multiple],[size])):not(.wn-b,.mt-st,.eng-st-pick):not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *){
  height:var(--ui-f-h)!important;min-height:0!important;padding-block:0!important}
  textarea:not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *){padding-block:8px!important;line-height:1.5!important}
/* sm: a number on a row of a list */
  :is(td,.wn-gl,.bl-f,.bla,.cnt-split,.pe-staff,.rq-ir,.rq-ph) :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select:not([multiple],[size])):not(.wn-b,.mt-st,.eng-st-pick):not(:is(#mon,.mo-rf,.mo-rv) *){
  height:var(--ui-f-h-sm)!important;padding-inline:var(--ui-f-px-sm)!important;border-radius:var(--ui-f-r-sm)!important}
/* the mouse over it, typing in it, and a field that cannot be changed */
  :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select,textarea):not(.wn-b,.mt-st,.eng-st-pick):not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *):hover:not(:focus,:disabled){
  border-color:color-mix(in srgb,var(--ui-ring) 35%,var(--line))!important}
  :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select,textarea):not(.wn-b,.mt-st,.eng-st-pick):not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *):focus{
  outline:none!important;border-color:var(--ui-ring)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-ring) 18%,transparent)!important}
  :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=button],[type=submit],[type=reset],[type=image]),select,textarea):not(.wn-b,.mt-st,.eng-st-pick):not(:is(.wn-search,.cmdk-input,.login-field,#loginOverlay,#mon,.mo-rf,.mo-rv) *):disabled{
  background-color:color-mix(in srgb,var(--line) 45%,var(--card-bg))!important;color:var(--muted)!important;cursor:not-allowed}
}

/* 8. states that must show through 5 and 7 — this layer comes first, so its !important rules win over theirs.
   - a button saving (a spinner, no words) and saved (green, a tick): admin.html's bec-busy and bec-ok. Stage 1 (5) had
     hidden them on the buttons it covers from 09:03 to the next upload on 2026-11-05: the words stayed under the spinner
     and the button never turned green;
   - a field edited but not saved yet (orange) or wrong (red): building limits, and a row that fails its check. */
@layer ui-state{
  button.bec-busy{color:transparent!important}
  button.bec-ok{background:#16834a!important;border-color:#16834a!important;color:transparent!important}
  .wn-row.bl-row.bad .bl-f input{border-color:#e5484d!important}
  #buildingLimitsModal .bla .bla-in.edited{border-color:#e8890c!important;background-color:rgba(232,137,12,.07)!important;box-shadow:0 0 0 2px rgba(232,137,12,.22)!important}
  #buildingLimitsModal .bla .bla-in.bad{border-color:#e5484d!important;box-shadow:0 0 0 2px rgba(229,72,77,.2)!important}
}

/* 9. the cards — one surface, three corner sizes (2026-11-05, «نظام شكل واحد», stage 3). The review counted 2,426 cards
   in 28 looks with 8 corner sizes (10 to 18 px): the figure tiles 15, the user cards 16, the price-document cards 14, a
   note 10 in one window and 12 in the next. Most already shared one surface (the card colour, the window's grey line).
   Corners: lg 16 for a card of a page (the home, the attendance page, the old count pages), md 14 for a card, a row or a
   figure in a window, sm 12 for a small row, a card inside a card or a note.
   Only the corners are set for every card: a card's states (picked, the best price, a warning, a figure chosen as the
   filter) live in their fills, lines and rings, so those stay with each card. The few lines and fills written by hand
   are fixed by name: the coverage cards' fixed light line (bright on the dark look), the suppliers' grey fill on the grey
   canvas, the heavy shadow of the old count pages, and the cards in a window that had no lift. */
@layer ui{
/* lg — a card of a page */
  .dh-card,.dh-kpi,.v40-panel,.v45-coverage,.at-card,.at-k>div,.panel,.workflow{border-radius:var(--ui-card-r-lg)!important}
/* md — a card, a row or a figure in a window */
  .wn-card,.wn-row,.wn-st,.mt-formbox,.us-card,.wa-card,.sup-card,.pds-card,.pe-card,.ov-bld,.ov-kpi,.er-pf,.spf-kpi,.rq-card,.rq-ir,
  .v61-kpi,.v62-kpi,.v63-kpi,.po-kpi,.rep-kpi{border-radius:var(--ui-card-r)!important}
/* sm — a small row, a card inside a card, a note */
  .au-row,.pa-row,.cp-r,.dh-mini,.dh-s3,.ac-det,.adj-prev,.at-month,.v45-cov-card,.v40-building,.im-subunit,.pds-best,.rq-note,.rq-sp,.v65-box,
  .limits-note,.v61-note,.v63-note,.v70-note,.pu-note,.v41-import-help{border-radius:var(--ui-card-r-sm)!important}
/* the lines, fills and lifts written by hand */
  .v45-cov-card,.v65-box{border-color:var(--line)!important}
  .sup-card{background:var(--card-bg)!important}
  .wa-card,.sup-card,.pe-card,.er-pf{box-shadow:var(--ui-card-sh)!important}
  .panel,.workflow{box-shadow:var(--d-sh,0 1px 1px rgba(15,20,48,.04),0 2px 6px rgba(15,20,48,.04))!important}
}

/* 10. the tabs and filters — one track, two sizes (2026-11-06, «نظام شكل واحد», stage 4). Before it every group of tabs had
   its own look: the windows' track (white, a grey line, the chosen tab navy), the home's chart switch (grey, the chosen
   tab white), the old home's sections and the logistics centre (separate buttons, 8 to 18 px apart), the price filter
   (separate grey buttons), the purchases periods (separate buttons beside the dates).
   Look: the windows' track — the card's colour, the window's grey line; the other tabs grey words on no fill; the chosen
   tab navy with white words. Sizes: md for the main views of a window or a page, sm for a filter in a tool row (its
   track is as tall as the fields and buttons beside it); on a touch screen both tabs are 38 px.
   The chosen tab: .on in the windows' groups; no class in the older groups, which mark the others .alt.
   Not touched: the IT inventory's own track (#mon .mo-seg) and the maintenance technician's page (maint.css).
   Same rules as 5: never display, visibility or width. */
@layer ui{
  :is(.wn-seg,.dh-seg,.seg,.spf-seg,.dash-cat-tabs,.v70-tabs){
  background:var(--card-bg)!important;border:1px solid var(--line)!important;border-radius:var(--ui-tab-r)!important;
  padding:var(--ui-tab-p)!important;gap:var(--ui-tab-gap)!important;box-shadow:none!important}
/* sm — a filter in a tool row */
  :is(.wn-seg,.dh-seg,.seg,.spf-seg,.dash-cat-tabs,.v70-tabs)>button{
  box-sizing:border-box!important;min-height:var(--ui-tab-h-sm)!important;height:auto!important;margin:0!important;
  padding-block:0!important;padding-inline:var(--ui-tab-px-sm)!important;border:0!important;border-radius:var(--ui-tab-r-in)!important;
  background:transparent!important;color:var(--muted)!important;font-family:inherit!important;font-size:var(--ui-fs-sm)!important;
  font-weight:600!important;line-height:1.25!important;box-shadow:none!important;transform:none!important;
  word-break:normal!important;overflow-wrap:normal!important;cursor:pointer;transition:background-color .15s,color .15s}
/* the windows' track scrolls sideways when its tabs don't fit: a tab keeps its words instead of shrinking under them
   (2026-11-06: on a 360 phone «الدور الأرضي … القائمة حسب القسم» ran into each other) */
  .wn-seg>button{flex-shrink:0!important}
/* md — the main views of a window or a page */
  :is(.wn-seg.fl-tabs,.wn-seg.ed-tabs,.dash-cat-tabs,.v70-tabs)>button{
  min-height:var(--ui-tab-h)!important;padding-inline:var(--ui-tab-px)!important;font-size:var(--ui-tab-fs)!important}
/* the mouse over a tab that is not chosen, and the chosen tab */
  :is(:is(.wn-seg,.dh-seg,.seg)>button:not(.on),:is(.spf-seg,.dash-cat-tabs,.v70-tabs)>button.alt):not([disabled]):hover{
  color:var(--text)!important;background:color-mix(in srgb,var(--line) 55%,transparent)!important}
  :is(.wn-seg,.dh-seg,.seg)>button.on,
  :is(.spf-seg,.dash-cat-tabs,.v70-tabs)>button:not(.alt){
  background:var(--ui-primary)!important;color:#fff!important;box-shadow:0 4px 10px -6px rgba(43,52,132,.75)!important}
  :is(.wn-seg,.dh-seg,.seg,.spf-seg,.dash-cat-tabs,.v70-tabs)>button:focus-visible{outline:2px solid var(--ui-ring)!important;outline-offset:1px!important}
/* a filter that is on or off (the open-orders filter, the automatic requests): the ring's colour, the same in both looks */
  .wn-tog.on{border-style:solid!important;border-color:var(--ui-ring)!important;color:var(--ui-ring)!important;
  background:color-mix(in srgb,var(--ui-ring) 9%,transparent)!important}
}

/* 11. the tones — the colours that were written inside the elements (2026-11-06, «نظام شكل واحد», stage 5). admin.html had
   109 colours in style="…": the same «تعذر التحميل» red in four shades (#c62828, #b91c1c, #b42318, #e5484d), five
   oranges, badges with a light fill that glared on the dark look, and navy chips (#2B3484) that could hardly be read on
   it. They are classes now, each with its dark-look colour:
   - words: .ui-bad (an error, a shortage, «متأخر»), .ui-ok (a saving, «PIN مفعّل»), .ui-warn (a warning, «بدون رقم وظيفي»);
   - a badge (a fill and its words): .ui-fill-ok, .ui-fill-warn, .ui-fill-bad;
   - a row's tint: .ui-bg-info, .ui-bg-warn, .ui-bg-bad; a note with a warning: .limits-note.ui-note-warn;
   - a chip's or a figure's colour pair (--c, --s): .ui-c-navy, .ui-c-blue, .ui-c-violet, .ui-c-ok, .ui-c-warn, .ui-c-bad;
   - a button that rejects or deletes: .ui-no (red words, as in 5).
   They sit in the state layer: a tone says what a thing is, so it shows through every look.
   Left as they were: the colours of a chart or its legend, the overlays on a photo or a print preview (white on dark),
   the local-copy banner, a print window's own page, and a row whose colour comes from its kind (the IT waiting list). */
:root{
  --ui-bad:#c4302b;--ui-ok:#137a4e;--ui-warn:#9a5b00;
  --ui-bad-bg:#fdeceb;--ui-ok-bg:#e8f7ee;--ui-warn-bg:#fff4e0;--ui-info-bg:#eef2ff;
}
html.desk-dark,:root[data-theme="dark"]{
  --ui-bad:#ff8a87;--ui-ok:#5fd08f;--ui-warn:#f5c46b;
  --ui-bad-bg:rgba(229,72,77,.16);--ui-ok-bg:rgba(22,163,74,.16);--ui-warn-bg:rgba(245,166,35,.15);--ui-info-bg:rgba(133,146,255,.12)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --ui-bad:#ff8a87;--ui-ok:#5fd08f;--ui-warn:#f5c46b;
  --ui-bad-bg:rgba(229,72,77,.16);--ui-ok-bg:rgba(22,163,74,.16);--ui-warn-bg:rgba(245,166,35,.15);--ui-info-bg:rgba(133,146,255,.12)}}
@layer ui-state{
  .ui-bad{color:var(--ui-bad)!important}
  .ui-ok{color:var(--ui-ok)!important}
  .ui-warn{color:var(--ui-warn)!important}
  button.ui-no{color:var(--ui-danger)!important}
  .ui-fill-bad{background:var(--ui-bad-bg)!important;color:var(--ui-bad)!important}
  .ui-fill-ok{background:var(--ui-ok-bg)!important;color:var(--ui-ok)!important}
  .ui-fill-warn{background:var(--ui-warn-bg)!important;color:var(--ui-warn)!important}
  :is(.ui-fill-bad,.ui-fill-ok,.ui-fill-warn){border-color:color-mix(in srgb,currentColor 28%,transparent)!important}
  .ui-bg-info{background:var(--ui-info-bg)!important}
  .ui-bg-warn{background:var(--ui-warn-bg)!important}
  .ui-bg-bad{background:var(--ui-bad-bg)!important}
  .limits-note.ui-note-warn{background:var(--ui-warn-bg)!important;color:var(--ui-warn)!important;border:1px solid color-mix(in srgb,var(--ui-warn) 45%,transparent)!important}
  .limits-note.ui-note-warn::before{background:var(--ui-warn)!important}
}
/* a chip's pair (in the state layer too, as the style="…" it replaces beat every rule): the chips mix --c toward the
   ink in light mode (3); on the dark look the navy, blue and violet are lightened, as win.css did for the navy */
@layer ui-state{
  .ui-c-navy{--c:#2B3484!important;--s:rgba(43,52,132,.10)!important}
  .ui-c-blue{--c:#3b5bdb!important;--s:rgba(59,91,219,.10)!important}
  .ui-c-violet{--c:#7c3aed!important;--s:rgba(124,58,237,.11)!important}
  .ui-c-ok{--c:#16a34a!important;--s:rgba(22,163,74,.11)!important}
  .ui-c-warn{--c:#e8890c!important;--s:rgba(232,137,12,.12)!important}
  .ui-c-bad{--c:#e5484d!important;--s:rgba(229,72,77,.10)!important}
  html.desk-dark :is(.ui-c-navy,.ui-c-blue),:root[data-theme="dark"] :is(.ui-c-navy,.ui-c-blue){--c:#a9b3ff!important;--s:rgba(169,179,255,.14)!important}
  html.desk-dark .ui-c-violet,:root[data-theme="dark"] .ui-c-violet{--c:#b69cff!important;--s:rgba(167,139,250,.14)!important}
  html.desk-dark .ui-c-bad,:root[data-theme="dark"] .ui-c-bad{--c:#ff8a87!important;--s:rgba(229,72,77,.16)!important}
}
@media (prefers-color-scheme:dark){@layer ui-state{
  :root:not([data-theme="light"]) :is(.ui-c-navy,.ui-c-blue){--c:#a9b3ff!important;--s:rgba(169,179,255,.14)!important}
  :root:not([data-theme="light"]) .ui-c-violet{--c:#b69cff!important;--s:rgba(167,139,250,.14)!important}
  :root:not([data-theme="light"]) .ui-c-bad{--c:#ff8a87!important;--s:rgba(229,72,77,.16)!important}
}}

/* 12. the phone (2026-11-06, the owner: «check al mshakel di 3la al mop»). A window's footer wraps when its buttons don't
   fit on one line: «تفاصيل الجرد» had «إغلاق» outside the screen on a 360 phone. The rebuilt windows' footer (.wn-fa) wraps
   in win.css; this is for an older frame that win-up.js leaves as it is. */
@media (max-width:760px){
  :is(.po-footer,.limits-footer,.rep-footer,.v61-footer,.v62-footer,.v63-footer,.v65-footer,.v70-footer,.modal-footer){flex-wrap:wrap}
}
@layer ui{
/* the reorder window's two order buttons wrap their words on a phone: they grow with them instead of cutting them */
  @media (max-width:900px){#crPoPanel .wn-fa .wn-b{height:auto!important;min-height:var(--ui-h)!important;padding-block:7px!important}}
}
