/* The app's look since 2026-11-10: the sign-in screens' clay (owner: «عايزين نطبّق الستايل الجديد ده على الـ app»,
   then on the samples: the light side menu «ده», the font «رقم 8» = Noto Kufi Arabic, «Yes, apply it»).
   The page is the sign-in's blue-grey; a card is the same colour lifted by a soft shadow under it, with no line and
   nothing white round it (owner, 2026-11-07: «الحدود البيضا» / «الـ curves البيضا»); a field or a tab track is pressed
   in; a small button and the chosen tab stand out in clay (a little white light on their top side is kept, as on the
   sign-in's buttons); the one main action of a place stays navy. Dark mode is the sign-in's navy night.
   Loaded last on the dashboard (admin.html) and the staff pages (mobile, driver, it, maint, scan). The engineers' page
   (request.html, body.si-eng) and the sign-in screens (signin.css) have had this look since 2026-11-07 and are left out.
   - The colours are written unlayered, on the names each page already uses (--bg, --card-bg, --surface, …), so every
     existing rule that reads them turns clay at once.
   - The shapes sit in the layer «look», which ui.css declares between ui-state and ui: its !important rules beat ui's
     (the buttons, fields, cards and tabs families) and lose to ui-state's (a button saving / saved, a field wrong).
     On the staff pages it is the only layer, so it beats their unlayered rules.
   - Never set display, visibility or width here: a layered !important would beat «.hidden{display:none!important}». */
@layer look;

/* ---------- 1. the colours ---------- */
:root:root{
  --lk-bg:#e9edf5;--lk-hi:#ffffff;--lk-sh:#c4cbdf;--lk-ink:#1b2350;--lk-mut:#5d6685;--lk-brand:#2B3484;
  --lk-line:rgba(43,52,132,.09);--lk-line2:rgba(43,52,132,.06);
  --lk-raise:0 10px 26px rgba(27,35,80,.10),0 2px 6px rgba(27,35,80,.05);   /* a card */
  --lk-row:0 4px 14px rgba(27,35,80,.07),0 1px 3px rgba(27,35,80,.04);       /* a row inside a card */
  --lk-btn:4px 4px 10px var(--lk-sh),-4px -4px 10px var(--lk-hi);              /* a small button, the chosen tab */
  --lk-in:inset 3px 3px 7px var(--lk-sh),inset -3px -3px 7px var(--lk-hi);      /* a field, a tab track */
  --lk-font:'Noto Kufi Arabic',Tahoma,Arial,sans-serif;
  /* the pages' own names */
  --bg:var(--lk-bg);--card-bg:var(--lk-bg);--card:var(--lk-bg);--surface:var(--lk-bg);--surface-2:var(--lk-bg);
  --input-bg:var(--lk-bg);--panel-bg:var(--lk-bg);--th-bg:var(--lk-bg);--line:var(--lk-line);--card-line:transparent;
}
/* --th-bg is the card colour, not transparent (owner, 2026-11-12, a screenshot of «الجرد» with the column names over
   a row): every table header stays on top while its list scrolls (th is sticky), so a see-through one let the rows
   show through it. On the clay every surface is --lk-bg, so at rest nothing changes. */
/* the count list («الجرد») scrolls inside its own card, whose 20px top padding left a strip above the stuck header for
   the rows to show through: the 20px moves to the card's title, so it looks the same at rest. Not on a phone,
   where the list is cards and doesn't scroll in the card. */
@media (min-width:761px) and (min-height:501px),(min-width:1001px){#inv .panel.table{padding-top:0}#inv .panel.table>.section-title{margin-top:20px}}
/* the dark look: the sign-in's navy night — the dashboard's switch (html.desk-dark), the system's on the pages that follow it */
html.desk-dark:root,html.desk-dark:root body{
  --lk-bg:#161d40;--lk-hi:#222b5a;--lk-sh:#0b1029;--lk-ink:#eef1ff;--lk-mut:#a8b2d9;--lk-brand:#9fcfff;
  --lk-line:rgba(159,207,255,.10);--lk-line2:rgba(159,207,255,.07);
  --lk-raise:0 14px 30px rgba(4,7,24,.55),0 2px 6px rgba(4,7,24,.35);--lk-row:0 6px 16px rgba(4,7,24,.45)}
@media (prefers-color-scheme:dark){:root:root:not([data-theme="light"]):not(.desk-light){
  --lk-bg:#161d40;--lk-hi:#222b5a;--lk-sh:#0b1029;--lk-ink:#eef1ff;--lk-mut:#a8b2d9;--lk-brand:#9fcfff;
  --lk-line:rgba(159,207,255,.10);--lk-line2:rgba(159,207,255,.07);
  --lk-raise:0 14px 30px rgba(4,7,24,.55),0 2px 6px rgba(4,7,24,.35);--lk-row:0 6px 16px rgba(4,7,24,.45);
  --bg:var(--lk-bg);--card-bg:var(--lk-bg);--card:var(--lk-bg);--surface:var(--lk-bg);--surface-2:var(--lk-bg);
  --input-bg:var(--lk-bg);--panel-bg:var(--lk-bg);--line:var(--lk-line)}}
/* the dashboard writes its colours on body.desk-on (desk.css): the same, one step stronger */
html body.desk-on,html.desk-dark:root body.desk-on{
  --bg:var(--lk-bg);--card-bg:var(--lk-bg);--panel-bg:var(--lk-bg);--input-bg:var(--lk-bg);--th-bg:var(--lk-bg);
  --line:var(--lk-line);--d-line2:var(--lk-line2);--text:var(--lk-ink);--muted:var(--lk-mut);--d-sh:var(--lk-raise)}
html.desk-dark:root body.desk-on{--d-ink2:#cdd2ee}
html body{background:var(--bg)}
html body.desk-on #appContent,[dir] body.desk-on #appContent{background:var(--bg)!important}

@layer look{
/* ---------- 2. the font: Noto Kufi Arabic everywhere (owner: «رقم 8»), code and numbers typed as code excepted ---------- */
  html body,html body :not(svg,svg *,code,kbd,pre,samp,.mono){font-family:var(--lk-font)!important}

/* ---------- 3. cards: raised on the page, no line, no white edge ---------- */
  :is(.dh-card,.dh-kpi,.panel,.workflow,.v40-panel,.v45-coverage,.at-card,.wn-card,.us-card,.wa-card,.sup-card,.pe-card,.ov-bld,.ov-kpi,.rq-card,.po-kpi,.rep-kpi,.v61-kpi,.v62-kpi,.v63-kpi,.it-card,.mt-card):not(:is(#loginOverlay,#pinScreen,#pin) *){
    background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-raise)!important}
  .dh-card{border-radius:22px!important}
  :is(.wn-row,.au-row,.pa-row,.dh-mini,.dh-s3,.v45-cov-card,.v40-building,.it-rb){background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-row)!important}
  /* the windows: the page's clay, a deeper shadow; the header and footer on the same colour, a hair between */
  .wn{background:var(--lk-bg)!important;box-shadow:0 40px 80px -30px rgba(15,20,60,.45)!important}
  :is(.wn-h,.wn-f,.wn-body){background:var(--lk-bg)!important;border-color:var(--lk-line)!important}
  .wn-st{background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-btn)!important}
  .wn-st.on{box-shadow:var(--lk-in)!important}
  .wn-tog{border-style:solid!important;border-color:var(--lk-line)!important}
  /* the staff pages' cards (ui-base.css) */
  body:not(.si-eng) .card:not(:is(#pinScreen,#pin,.pin-card) *,.pin-card){background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-raise)!important;border-radius:22px!important}
  body:not(.si-eng) .card .card{box-shadow:var(--lk-row)!important;border-radius:16px!important}
  body:not(.si-eng) :is(.item-row,.bld-opt,.menu-btn,.install-card,.qc-card){background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-row)!important}

/* ---------- 4. buttons: clay like the sign-in's; the one main action stays navy ---------- */
  :is(.wn-b,.dh-btn,.wn-x,.wn-rf,.dh-al .go):not(.p){background:var(--lk-bg)!important;border:0!important;color:var(--text)!important;box-shadow:var(--lk-btn)!important}
  :is(.wn-b,.dh-btn,.wn-x,.wn-rf,.dh-al .go):not(.p):not([disabled]):hover{color:var(--lk-brand)!important}
  :is(.wn-b,.dh-btn,.wn-x,.wn-rf,.dh-al .go):not(.p):not([disabled]):active{box-shadow:var(--lk-in)!important}
  :is(.wn-b.p,.dh-btn.p){border:0!important;box-shadow:0 10px 20px -10px rgba(43,52,132,.8)!important}
  body:not(.si-eng) :is(.big-btn,.btn).alt,body:not(.si-eng) .quick-grid>*{background:var(--lk-bg)!important;border:0!important;color:var(--lk-brand)!important;box-shadow:var(--lk-btn)!important}
  body:not(.si-eng) .quick-grid>*{border-radius:18px!important}

/* ---------- 5. fields: pressed in, no line ---------- */
  :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,.text-input):not(.wn-b,.pin-in,.desk-in,.qc-input,[class*="pin"]):not(:is(#loginOverlay,#pinScreen,#pin,.it-pin,.wn-search,.money,.it-srch,#mon,.mo-rf,.mo-rv,.mo-srch,.cmdk) *),
  :is(.wn-search,.desk-search,.it-srch){background-color:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-in)!important}
  :is(input,select,textarea):not(:is(#loginOverlay,#pinScreen,#pin,.it-pin,#mon) *):focus{box-shadow:var(--lk-in),0 0 0 3px color-mix(in srgb,var(--lk-brand) 22%,transparent)!important}

/* ---------- 6. tabs: a pressed-in track, the chosen tab raised in clay with navy words (as on the engineers' page) ---------- */
  :is(.wn-seg,.dh-seg,.seg,.spf-seg,.dash-cat-tabs,.v70-tabs):not(:is(#loginOverlay,#pinScreen,#pin) *){background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-in)!important}
  :is(.wn-seg,.dh-seg,.seg)>button.on,:is(.spf-seg,.dash-cat-tabs,.v70-tabs)>button:not(.alt){background:var(--lk-bg)!important;color:var(--lk-brand)!important;box-shadow:var(--lk-btn)!important}

/* ---------- 7. the dashboard's top bar and side menu in clay (owner's pick, sample «ب») ---------- */
  /* the laptop's top bar only: on a phone the bar sits on the navy sky of the home and keeps its colour */
  @media (min-width:761px) and (min-height:501px),(min-width:1001px){.desk-top{background:color-mix(in srgb,var(--lk-bg) 88%,transparent)!important;border-color:var(--lk-line)!important;box-shadow:none!important}}
  .desk-side{background:var(--lk-bg)!important;color:var(--d-ink2,#2f3760)!important;box-shadow:0 0 34px rgba(27,35,80,.10)!important}
  html.desk-dark .desk-side{box-shadow:0 0 34px rgba(4,7,24,.5)!important}
  .desk-brand{border-bottom-color:var(--lk-line)!important}
  .desk-brand img{filter:none!important}
  html.desk-dark .desk-brand img{filter:brightness(0) invert(1)!important}
  .desk-brand span{color:var(--lk-mut)!important}
  .desk-nav{color:var(--d-ink2,#2f3760)!important;white-space:nowrap!important}
  /* Kufi is wider (10/11): «النقل بين المباني» and «المهندسين في المباني» were longer than the menu, more so when chosen
     (bold: the owner saw «المهندسين في المبا…»), and in English «Transfers between buil» lost its count. Less room
     around the icon and under a group's line, so every name fits whole, chosen or not; a name never ends in «…»: one
     that is still too long goes on a second line, and the count stays */
  .desk-nav{gap:8px!important;padding-inline:10px!important}
  .desk-grp-b>div{margin-inline-start:18px!important;padding-inline-start:8px!important}
  .desk-grp .desk-nav.on::before{inset-inline-start:-8.5px!important}
  /* the old dark menu's bar beside a chosen item outside a group stood alone at the screen's edge (owner, 2026-11-10: a
     lilac stub beside «لوحة التحكم»); the raised pill says it. A group's own bar, on its line, stays */
  .desk-nav.on::before{content:none!important}
  .desk-grp .desk-nav.on::before{content:""!important}
  .desk-nav>span:not(.desk-c){min-width:0;white-space:normal;line-height:1.35}
  .desk-nav>.desk-c{flex:none}
  .desk-nav:hover{background:transparent!important;color:var(--lk-brand)!important}
  .desk-nav.on{background:var(--lk-bg)!important;color:var(--lk-brand)!important;box-shadow:var(--lk-btn)!important}
  .desk-grp-h{color:var(--lk-ink)!important;background:var(--lk-bg)!important;border:0!important;box-shadow:var(--lk-btn)!important}
  .desk-grp.open .desk-grp-h{box-shadow:var(--lk-in)!important}
  .desk-c:not(.r){color:var(--d-ink2,#2f3760)!important;background:rgba(43,52,132,.08)!important}
  html.desk-dark .desk-c:not(.r){background:rgba(159,207,255,.12)!important}
  /* the scene at the foot of the menu: the towers and the street stand on the menu's clay. Its full-height sky (drawn
     behind the whole menu, for the old navy menu) would sit behind the menu's words, so it goes; and with no room under a
     long menu (.bare) the scene goes too */
  .desk-side .bec-sky svg>:is(rect,ellipse){opacity:0!important}
  .desk-side .bec-sky.bare{opacity:0!important}

/* ---------- 8. words that the wider font would break onto two lines ---------- */
  .dh-legend>*{white-space:nowrap!important}
}
