/* HR 360 8.79.0 — the program's frame: the page layout, the side menu, the bar of open pages.
 * The ONE place for these rules (they were spread over app.css, written over each other since 5.x; the old rules were removed).
 * The bug of 8.77.2 (a page opened in a top tab squeezed into a 72 px column, its text one word per line): «html.side-mini .shell»
 * (72 px + the rest) came after «html.framed .shell» (one column) with the same weight, so inside a tab — where the side menu is
 * hidden — the page fell into the 72 px column. Now a page inside a tab has no grid at all, and the folded menu applies only to
 * the main window.
 * Sizes: phone ≤ 640 · tablet 641–1024 (the side menu is a drawer up to 900) · desktop > 900.
 * © Al-Zuhdi General Industry & Trading Co. All rights reserved. */
:root{--side-w:260px;--side-mini:72px;--bar-h:48px}   /* the side menu: 260 open, 72 folded (decision 11/11/2026) */

/* ---------------------------------------------------------------- layout */
.shell{display:grid;grid-template-columns:var(--side-w) minmax(0,1fr);min-height:100vh;min-height:100dvh}
.main{min-width:0;display:flex;flex-direction:column}
.content{min-width:0}
html.side-mini:not(.framed) .shell{grid-template-columns:var(--side-mini) minmax(0,1fr)}
/* a page inside a top tab: the window around it has the menu and the bar */
html.framed .shell{display:block}
html.framed .side,html.framed .burger,html.framed .gtool,html.framed .tabbar,html.framed .lunch-pill{display:none!important}
html.framed .top{position:static;padding:10px 22px}
html.framed .content{padding-top:16px}
.burger{display:none;background:none;border:0;padding:6px;color:var(--text);cursor:pointer;border-radius:8px}

/* ---------------------------------------------------------------- the side menu */
.side{background:var(--ink);color:var(--ink-text);position:sticky;top:0;height:100vh;height:100dvh;overflow-y:auto;overflow-x:hidden;
  padding:16px 12px 28px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent;overscroll-behavior:contain}
.side .brand{display:flex;align-items:center;gap:10px;padding:2px 8px 14px;padding-inline-end:44px;color:#fff;text-decoration:none;min-width:0}
.side .brand .mark{width:36px;height:36px;border-radius:9px;background:var(--amber);display:grid;place-items:center;font-weight:700;font-size:18px;color:#fff;flex:none;overflow:hidden}
.side .brand .mark img{max-width:100%;max-height:100%}
.side .brand>span:not(.mark){min-width:0}
.side .brand b{display:block;font-size:15px;font-weight:600}
.side .brand small{display:block;font-size:12px;color:#8FA2B3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-fold{position:absolute;top:16px;inset-inline-end:12px;width:32px;height:32px;border-radius:8px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);color:#B9C7D3;display:grid;place-items:center;cursor:pointer;z-index:2}
.side-fold:hover{background:rgba(255,255,255,.12);color:#fff}
.side-fold .ico{width:18px;height:18px}
[dir=rtl] .side-fold svg{transform:scaleX(-1)}

/* items: an icon, the name, a count */
.side a.it{display:flex;align-items:center;gap:10px;min-height:38px;padding:8px 10px;border-radius:9px;color:var(--ink-text);text-decoration:none;font-size:14px;line-height:1.35}
.side a.it>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side a.it:hover{background:var(--ink-2);color:#fff}
.side a.it.on{background:#fff;color:var(--ink);font-weight:600}
.side a.it.on .ico{color:var(--amber)}
.side a.it .cnt{margin-inline-start:auto;background:var(--amber);color:#fff;border-radius:10px;font-size:11px;padding:0 7px;line-height:18px;flex:none}
.side a.it.owner{background:var(--amber);color:#fff;margin-bottom:6px}
/* sections: icon + name + arrow; the pages of the section under it */
.side .grp-b{margin-top:2px}
.side button.grp{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:40px;cursor:pointer;
  font-size:14px;font-weight:600;color:#DCE6EE;padding:8px 10px;border-radius:9px}
.side button.grp>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side button.grp:hover{background:var(--ink-2);color:#fff}
.side button.grp:focus-visible,.side a.it:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
.side .grp .chev{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .15s;flex:none;opacity:.8}
.side .grp-b:not(.open) .chev{transform:rotate(90deg)}
[dir=ltr] .side .grp-b:not(.open) .chev{transform:rotate(-90deg)}
/* the section of the page on the screen is marked, but it does not open by itself */
.side .grp-b.has-on>button.grp{color:#fff}
.side .grp-b.has-on>button.grp .gico{color:var(--amber)}
.side .grp-b.has-on:not(.open)>button.grp::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--amber);flex:none}
.side .grp-items{display:none;padding:2px 0 6px;padding-inline-start:14px;margin-inline-start:18px;border-inline-start:1px solid rgba(255,255,255,.1)}
.side .grp-b.open>.grp-items{display:block}
.side .grp-items a.it{font-size:13.5px;min-height:36px;padding:7px 10px}
.side .grp-items a.it .ico{width:16px;height:16px;opacity:.85}
.side.filtering .grp-items{display:block!important}
.side.filtering .chev{display:none}
.side-sep{height:1px;background:rgba(255,255,255,.07);margin:8px 6px}
.side-none{color:#9DB0C2;font-size:13px;margin:10px;line-height:1.7}
.side-none a{color:var(--amber)}
.side .ver{margin:20px 10px 0;font-size:12px;color:#7E93A6}
.side .ver .copy{display:inline-block;margin-top:6px;font-size:10.5px;line-height:1.5;color:#6F8597}
/* search */
.side-search{position:relative;margin:0 2px 10px}
.side-search .ico{position:absolute;inset-inline-start:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#8FA2B3}
.side-search input{width:100%;background:var(--ink-2);border:1px solid rgba(255,255,255,.08);color:#fff;border-radius:9px;padding:9px 12px;padding-inline-start:34px;font:inherit;font-size:14px}
.side-search input::placeholder{color:#8FA2B3}
.side-search input:focus{outline:2px solid var(--amber);outline-offset:0;background:#1b3550}
/* the clock with the requests and messages */
.side-clock{background:var(--ink-2);border-radius:12px;padding:10px 12px;margin:0 2px 12px;color:#fff}
.side-clock .sc-time{font-size:26px;font-weight:700;letter-spacing:1px;text-align:center;font-variant-numeric:tabular-nums;line-height:1.2}
.side-clock .sc-date{font-size:12px;color:#B9C7D3;text-align:center;margin-top:2px}
.side-clock .sc-cnt{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.side-clock .sc-cnt a{flex:1 1 auto;min-width:0;white-space:nowrap;display:flex;align-items:center;gap:4px;justify-content:center;padding:6px 5px;border-radius:8px;
  background:rgba(255,255,255,.07);color:#DCE6EE;text-decoration:none;font-size:12.5px}
.side-clock .sc-cnt a svg{width:15px;height:15px}
.side-clock .sc-cnt a b{background:rgba(255,255,255,.15);border-radius:9px;padding:0 7px;line-height:18px;font-size:11.5px}
.side-clock .sc-cnt a.hot b{background:var(--amber);color:#fff}
.side-clock .sc-cnt a:hover{background:rgba(255,255,255,.14);color:#fff}

/* ---------------------------------------------------------------- the folded menu (icons only), desktop */
@media (min-width:901px){
  html.side-mini .side{padding:12px 8px 24px}
  html.side-mini .side-fold{position:static;margin:0 auto 10px}
  html.side-mini[dir=ltr] .side-fold svg{transform:scaleX(-1)}
  html.side-mini[dir=rtl] .side-fold svg{transform:none}
  html.side-mini .side .brand{padding:0 0 10px;justify-content:center}
  html.side-mini .side .brand>span:not(.mark),html.side-mini .side-search,html.side-mini .side .ver,html.side-mini .side-none,
  html.side-mini .sc-date,html.side-mini .sc-cnt span,html.side-mini .sc-lunch .scl-t,html.side-mini .sc-lunch .scl-bar{display:none}
  html.side-mini .side-clock{padding:8px 4px;margin:0 0 10px}
  html.side-mini .side-clock .sc-time{font-size:12px;letter-spacing:0;font-weight:600}
  html.side-mini .side-clock .sc-cnt{flex-direction:column;gap:4px}
  html.side-mini .side-clock .sc-cnt a{padding:5px 2px;flex:none;gap:3px}
  html.side-mini .sc-lunch{padding:5px 2px}html.side-mini .sc-lunch b{font-size:11px}
  html.side-mini .side a.it,html.side-mini .side button.grp{justify-content:center;padding:10px 0;position:relative}
  html.side-mini .side>a.it>span:not(.cnt),html.side-mini .side button.grp>span,html.side-mini .side button.grp .chev{display:none}
  html.side-mini .side a.it .cnt{position:absolute;top:2px;inset-inline-end:4px;font-size:10px;padding:0 5px;line-height:16px}
  html.side-mini .side .grp-b.has-on:not(.open)>button.grp::after{position:absolute;top:6px;inset-inline-end:10px}
  html.side-mini .side .grp-b>.grp-items,html.side-mini .side .grp-b.open>.grp-items{display:none}
  /* a section opens beside the folded menu (its pages with their names) */
  html.side-mini .side .grp-b.fly>.grp-items{display:block;position:fixed;inset-inline-start:calc(var(--side-mini) + 6px);z-index:80;width:250px;max-height:70vh;overflow-y:auto;
    margin:0;padding:6px;border:0;border-radius:12px;background:var(--ink);box-shadow:0 12px 32px rgba(0,0,0,.32)}
  html.side-mini .side .grp-b.fly>.grp-items::before{content:attr(data-label);display:block;padding:6px 10px 8px;color:#9DB0C2;font-size:12.5px;font-weight:600}
  html.side-mini .side .grp-b.fly>.grp-items a.it{justify-content:flex-start;padding:8px 10px}
  html.side-mini .side .grp-b.fly>.grp-items a.it>span{display:inline}
}

/* ---------------------------------------------------------------- the page header */
.top{display:flex;align-items:center;gap:12px;padding:12px 28px;background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;min-height:60px}
body.has-ztabs .shell>.main>.top{top:var(--bar-h)}

/* ---------------------------------------------------------------- the bar of open pages (static/tabs.js) */
.ztabs{position:sticky;top:0;z-index:30;display:flex;align-items:flex-end;gap:8px;background:#1F5FA8;padding:0 10px;height:var(--bar-h);flex:none;min-width:0}
.ztabs-strip{display:flex;align-items:flex-end;gap:3px;overflow-x:auto;overflow-y:hidden;flex:1 1 auto;min-width:0;height:100%;scrollbar-width:none;padding-top:8px}
.ztabs-strip::-webkit-scrollbar{display:none}
.ztab{display:flex;align-items:center;gap:7px;padding:0 10px;height:40px;border-radius:9px 9px 0 0;background:rgba(255,255,255,.14);color:#fff;font-size:13px;white-space:nowrap;
  cursor:pointer;user-select:none;flex:0 1 auto;min-width:96px;max-width:210px}
.ztab:hover{background:rgba(255,255,255,.24)}
.ztab.on{background:var(--paper);color:var(--ink);font-weight:700;flex-shrink:0}
.ztab.fixed{background:rgba(255,255,255,.26);min-width:0;flex-shrink:0}.ztab.fixed.on{background:var(--paper)}
.ztab .zt{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.ztab .zi{display:inline-flex;flex:none}.ztab .zi svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2}
.ztab .zx{border:0;background:transparent;color:inherit;opacity:.6;cursor:pointer;font-size:12px;width:22px;height:22px;border-radius:5px;flex:none;display:grid;place-items:center}
.ztab .zx:hover{opacity:1;background:rgba(0,0,0,.12)}
.ztab.dirty .zt::after{content:" •";color:var(--amber)}
.ztab.drag{opacity:.5}
.ztabs-tools{display:flex;align-items:center;gap:6px;height:100%;flex:none}   /* its buttons keep their width; the tabs share the rest */
.ztabs-tools .chip{background:rgba(255,255,255,.16);color:#fff;border-color:transparent;flex:none}
.ztabs-tools .chip select{color:#fff;background:transparent}.ztabs-tools .chip select option{color:var(--text)}
.ztabs-tools .chip svg{stroke:#fff}
.ztabs-tools .chip .lbl{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ztool{border:0;background:rgba(255,255,255,.16);color:#fff;border-radius:8px;height:34px;padding:0 10px;font:inherit;font-size:12.5px;cursor:pointer;white-space:nowrap;flex:none;display:inline-flex;align-items:center;gap:5px}
.ztool:hover{background:rgba(255,255,255,.28)}.zfav.on{color:#FFD45C}
.zopen .num{font-variant-numeric:tabular-nums}
/* the company and the messages in the bar */
.g-co{gap:7px;max-width:240px}.g-co .lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.g-co-logo{width:22px;height:22px;border-radius:5px;object-fit:contain;background:#fff;flex:none}
.g-msg{position:relative}.g-msg .g-n{position:absolute;top:-6px;inset-inline-end:-6px;background:var(--bad);color:#fff;border-radius:999px;font-size:11px;line-height:18px;min-width:18px;padding:0 5px;text-align:center}   /* as the bell's count */
.top .g-co{display:none}   /* a page without the bar (employees' pages, a page alone): the company is in the side menu */
.ztabs .g-co{display:inline-flex}
.zburger{display:none}
/* an open page fills the window under the bar (the bar has one fixed height: it never wraps over the page) */
.zframes{display:none}
.zframe{display:block;width:100%;height:calc(var(--app-h,100vh) - var(--bar-h));border:0;background:var(--paper)}   /* --app-h: the window's real height (tabs.js) */
/* the list of open pages and the menu of a page */
.zmenu{position:fixed;z-index:90;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.16);padding:6px;min-width:240px;max-width:min(360px,calc(100vw - 12px));max-height:70vh;overflow:auto}
.zmenu .zm-h{padding:6px 10px 4px;color:var(--muted);font-size:12px;font-weight:600}
.zmenu button{display:block;width:100%;text-align:start;border:0;background:none;padding:8px 10px;border-radius:7px;font:inherit;font-size:13px;cursor:pointer;color:var(--text)}
.zmenu button:hover{background:var(--line-2)}.zmenu button:disabled{opacity:.4;cursor:default}
.zmenu .zrow{display:flex;align-items:center;gap:2px}
.zmenu .zrow .zgo{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.zmenu .zrow.on .zgo{font-weight:700;color:var(--info)}
.zmenu .zrow .zx{width:30px;flex:none;color:var(--muted);text-align:center}
.zmenu hr{border:0;border-top:1px solid var(--line-2);margin:4px 0}
.zdlg{position:fixed;inset:0;z-index:95;background:rgba(16,38,59,.45);display:grid;place-items:center}
.zdlg[hidden]{display:none}
.zdlg-box{background:#fff;border-radius:14px;padding:20px;max-width:420px;width:calc(100% - 32px);box-shadow:0 20px 50px rgba(0,0,0,.25)}
.zdlg-box p{margin:0 0 16px;font-size:15px;line-height:1.7}.zdlg-b{display:flex;gap:8px;flex-wrap:wrap}

/* ---------------------------------------------------------------- tablet and laptop */
@media (max-width:1280px){
  .ztabs-tools .chip .lbl{display:none}
  .ztabs-tools .zopen .lbl{display:none}
}
@media (max-width:1100px){.ztabs-tools .g-lang span,.ztabs-tools .g-sec{display:none}.ztabs-tools .g-co{max-width:44px}}
/* ---------------------------------------------------------------- the menu as a drawer (tablet portrait, phone) */
@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)}
  html.side-mini:not(.framed) .shell{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;inset-block:0;inset-inline-start:0;width:min(300px,86vw);z-index:85;transform:translateX(110%);transition:transform .2s;box-shadow:0 0 40px rgba(0,0,0,.3);visibility:hidden}
  [dir=ltr] .side{transform:translateX(-110%)}
  body.nav-open .side{transform:none;visibility:visible}
  body.nav-open::after{content:"";position:fixed;inset:0;background:rgba(16,38,59,.4);z-index:84}
  .side-fold{display:none}
  .side .brand{padding-inline-end:8px}
  .burger,.zburger{display:inline-flex}
  .top{padding:10px 14px;gap:8px;min-height:56px}
  .top .chip .lbl{display:none}
  html,body{overflow-x:clip}
}
/* ---------------------------------------------------------------- phone: the tabs become the «open pages» list */
@media (max-width:640px){
  :root{--bar-h:52px}
  .ztabs{align-items:center;padding:0 8px;gap:6px}
  .ztabs-strip{display:none}
  .ztabs-tools{flex:1;justify-content:space-between;gap:4px}
  .ztabs-tools .chip{padding:4px 7px}
  .ztabs-tools .chip .avatar{width:24px;height:24px}
  .ztabs-tools .g-sec,.ztabs-tools .g-co{display:none}   /* the language stays: a phone must be able to change it */
  .ztabs-tools .g-lang span{display:none}
  .zopen .lbl{display:none}
}
/* a small phone (375 – 420): every button of the bar fits; the star (favourites) moves into «الشاشات المفتوحة» */
@media (max-width:420px){
  .ztabs{padding:0 6px}
  .ztabs-tools{gap:3px}
  .ztabs-tools .zfav{display:none}
  .ztabs .ztool,.ztabs .chip{min-width:36px!important;min-height:38px!important;padding:0 7px}
  .ztabs-tools .chip .avatar{width:22px;height:22px}
}
/* the bar has its own menu button: the page header does not show a second one */
body.has-ztabs .top .burger{display:none!important}
@media (pointer:coarse){
  .side a.it{min-height:44px}
  .side button.grp{min-height:44px}
  .top .burger,.top .back-btn,.top .chip,.ztabs .ztool,.ztabs .chip{min-height:40px;min-width:40px}
  .ztab .zx{width:28px;height:28px}
}
@media print{
  .side,.ztabs,.zmenu,.zdlg,.burger{display:none!important}
  .shell{display:block}
}
@media (prefers-reduced-motion:reduce){.side{transition:none}}

/* 8.98.1 (decision 16/11/2026): the inner groups of «الورشة» in the side menu — open / close like the sections */
.side .sgrp-b{margin:1px 0}
.side button.sgrp{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;min-height:36px;padding:6px 10px;cursor:pointer;
  border-radius:8px;color:#C5D2DE;font-size:13px;font-weight:700}
.side button.sgrp>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side button.sgrp .ico{width:15px;height:15px;opacity:.85}
.side button.sgrp:hover{background:var(--ink-2);color:#fff}
.side button.sgrp:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
.side .sgrp .chev{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .15s;flex:none;opacity:.8}
.side .sgrp-b:not(.open) .chev{transform:rotate(90deg)}
[dir=ltr] .side .sgrp-b:not(.open) .chev{transform:rotate(-90deg)}
.side .sgrp-b.has-on>button.sgrp{color:#fff}
.side .sgrp-b.has-on:not(.open)>button.sgrp::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--amber);flex:none}
.side .sgrp-items{display:none;padding:1px 0 4px;padding-inline-start:8px;margin-inline-start:10px;border-inline-start:1px solid rgba(255,255,255,.08)}
.side .sgrp-b.open>.sgrp-items,.side.filtering .sgrp-items{display:block}
.side .sgrp-items a.it{font-size:13.5px;min-height:36px}
@media (pointer:coarse){.side button.sgrp{min-height:44px}.side .sgrp-items a.it{min-height:44px}}
