/* ==========================================================================
   2Z OS — Wave 1 shell stylesheet (single shared source for the new UI)
   THEME — Wave 2 (owner order 2026-11-07 ~17:39 AST): the ChatGPT demo's
   green is REPLACED by the 2Z Bid Lab production theme. Values verified
   from the production-mirrored Bid Lab code (portal.css :root):
   primary navy #0b3d91, dark navy #072a66, accent red #d42b2b,
   ink #17233a, muted #5b6b85, line #e3e9f2, page bg #f2f5fa, white cards.
   Brand areas use the navy gradient (180deg, #0b3d91 -> #072a66).
   Active states are NAVY, primary buttons NAVY, the main CTA is RED.
   Green #1c7a3d survives ONLY as a small success/status accent
   (badges/dots/flash), exactly as Bid Lab itself uses it.
   Font: "Noto Kufi Arabic" self-hosted (Bid Lab @font-face rules below).
   Arabic RTL internal shell. All selectors are namespaced under
   body.z2-shell so this file can load BEFORE the legacy stylesheets
   without breaking page styles, while the shell's own layout rules win
   by specificity where they must.
   NOTE: the legacy variable NAMES --z2-green* are kept (every wave's
   markup references them) but are RE-POINTED at the navy palette;
   --z2-success* carries the surviving status green.
   ========================================================================== */

@font-face{font-family:"Noto Kufi Arabic";src:url("/static/fonts/NotoKufiArabic-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:optional;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Noto Kufi Arabic";src:url("/static/fonts/NotoKufiArabic-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:optional;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}

body.z2-shell{
  --z2-bg:#f2f5fa;
  --z2-card:#ffffff;
  --z2-ink:#17233a;
  --z2-muted:#5b6b85;
  --z2-line:#e3e9f2;
  --z2-navy:#0b3d91;
  --z2-navy-dark:#072a66;
  --z2-navy-soft:#e8eff9;
  --z2-accent:#d42b2b;
  --z2-accent-dark:#b02222;
  --z2-green:#0b3d91;
  --z2-green-dark:#072a66;
  --z2-green-soft:#e8eff9;
  --z2-success:#1c7a3d;
  --z2-success-soft:#e6f4ec;
  --z2-amber:#b7791f;
  --z2-amber-bg:#fdf1d7;
  --z2-red:#d42b2b;
  --z2-red-bg:#fdecea;
  --z2-radius:14px;
  --z2-radius-ctl:8px;
  /* WALK-01 (owner walk, adopted 2026-11-10): sidebar colour
     hierarchy — ONE token set consumed by the three sidebar level
     rules below and nothing else. Level 1 = workspace rows (navy
     ink on a pale band), level 2 = section labels (steel ink on a
     whisper tint), level 3 = page leaves (plain ink, regular
     weight). Red (--z2-accent) stays reserved for action buttons;
     it is never a level colour. OWNER CORRECTION 2026-11-11: the
     colours stand exactly as adopted, but the font SIZES are the
     pre-WALK-01 sizes (15 / 11.5 / 14) — the owner reverted the
     enlargement from his phone («رجّع حجم الخط السابق»). The
     hierarchy is carried by colour, not by type size. */
  --z2-nav1-ink:#16283f;
  --z2-nav1-band:#e9eff5;
  --z2-nav1-size:15px;
  --z2-nav2-ink:#5b7a99;
  --z2-nav2-tint:#f0f4f8;
  --z2-nav2-size:11.5px;
  --z2-nav3-ink:#26292f;
  --z2-nav3-size:14px;
  background:var(--z2-bg);
  color:var(--z2-ink);
  font-family:"Noto Kufi Arabic",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

/* ---------- overall layout: right sidebar + wide content ---------- */
body.z2-shell .z2-layout{display:flex;align-items:stretch;min-height:100vh}
body.z2-shell main.z2-main{
  flex:1 1 auto;min-width:0;width:auto;max-width:none;margin:0;
  padding:18px 28px 72px;background:transparent;
}
body.z2-shell .z2-skip{
  position:absolute;inset-inline-start:12px;top:-48px;z-index:60;
  background:var(--z2-navy);color:#fff;padding:8px 14px;border-radius:var(--z2-radius-ctl);
  text-decoration:none;font-size:14px;transition:top .15s ease;
}
body.z2-shell .z2-skip:focus{top:10px}

/* ---------- sidebar ---------- */
body.z2-shell .z2-sidebar{
  flex:0 0 272px;width:272px;position:sticky;top:0;height:100vh;overflow-y:auto;
  background:var(--z2-card);border-inline-end:1px solid var(--z2-line);
  display:flex;flex-direction:column;padding:16px 12px 12px;
  scrollbar-width:thin;scrollbar-color:#c4d0e0 transparent;
}
body.z2-shell .z2-sidebar::-webkit-scrollbar{width:8px}
body.z2-shell .z2-sidebar::-webkit-scrollbar-thumb{background:#c4d0e0;border-radius:8px}
body.z2-shell .z2-sidebar::-webkit-scrollbar-track{background:transparent}
body.z2-shell .z2-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--z2-ink);padding:2px 6px 14px}
body.z2-shell .z2-logo{
  flex:0 0 42px;width:42px;height:42px;border-radius:11px;
  background:linear-gradient(180deg,var(--z2-navy),var(--z2-navy-dark));
  color:#fff;font-weight:800;font-size:17px;display:flex;align-items:center;justify-content:center;letter-spacing:.3px;
}
body.z2-shell .z2-brand-name{font-weight:800;font-size:16px;line-height:1.25}
body.z2-shell .z2-brand-sub{font-size:11px;color:var(--z2-muted);letter-spacing:.6px}
body.z2-shell .z2-nav{flex:1 1 auto}
body.z2-shell .z2-nav-label{font-size:11px;color:var(--z2-muted);padding:8px 8px 6px;letter-spacing:.4px}

/* workspace (collapsible, native <details>) */
body.z2-shell details.z2-ws{margin:0 0 2px;border-radius:12px}
body.z2-shell details.z2-ws>summary{
  list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;
  padding:9px 10px;border-radius:12px;font-weight:700;
  font-size:var(--z2-nav1-size);color:var(--z2-nav1-ink);
  background:var(--z2-nav1-band);
}
body.z2-shell details.z2-ws>summary::-webkit-details-marker{display:none}
body.z2-shell details.z2-ws>summary::after{
  content:"";margin-inline-start:auto;width:8px;height:8px;flex:0 0 8px;
  border-inline-end:2px solid var(--z2-muted);border-bottom:2px solid var(--z2-muted);
  transform:rotate(-45deg);transition:transform .15s ease;
}
body.z2-shell details.z2-ws[open ]>summary::after{transform:rotate(45deg)}
body.z2-shell details.z2-ws>summary:hover{background:var(--z2-navy-soft)}
body.z2-shell details.z2-ws.active>summary{background:var(--z2-nav1-band);color:var(--z2-nav1-ink)}
body.z2-shell .z2-ws-body{padding:2px 0 8px}
body.z2-shell .z2-sec{
  font-size:var(--z2-nav2-size);color:var(--z2-nav2-ink);font-weight:700;letter-spacing:.3px;
  background:var(--z2-nav2-tint);border-radius:9px;
  padding:8px 12px;margin:8px 2px 2px;
}
body.z2-shell a.z2-page{
  display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--z2-nav3-ink);
  font-size:var(--z2-nav3-size);font-weight:500;padding:7px 12px;margin:0 2px;border-radius:9px;
  border-inline-start:3px solid transparent;
}
body.z2-shell a.z2-page:hover{background:var(--z2-navy-soft)}
body.z2-shell a.z2-page.active{
  background:var(--z2-navy-soft);color:var(--z2-navy-dark);font-weight:700;
  border-inline-start-color:var(--z2-navy);
}
body.z2-shell a.z2-page:focus-visible,body.z2-shell details.z2-ws>summary:focus-visible{
  outline:2px solid var(--z2-navy);outline-offset:1px;
}
body.z2-shell .z2-badge{
  margin-inline-start:auto;background:var(--z2-red);color:#fff;font-size:11px;font-weight:700;
  min-width:20px;height:20px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;
}
body.z2-shell .z2-badge.amber{background:var(--z2-amber-bg);color:var(--z2-amber)}

/* sidebar user / utility block */
body.z2-shell .z2-userbox{border-top:1px solid var(--z2-line);padding:12px 6px 2px;margin-top:10px}
body.z2-shell .z2-userrow{display:flex;align-items:center;gap:10px;padding:0 4px 8px}
body.z2-shell .z2-avatar{
  flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:var(--z2-navy-soft);
  color:var(--z2-navy-dark);display:flex;align-items:center;justify-content:center;
}
body.z2-shell .z2-avatar svg{width:20px;height:20px}
body.z2-shell .z2-user-name{font-weight:700;font-size:14px;line-height:1.3}
body.z2-shell .z2-user-sub{font-size:12px;color:var(--z2-muted)}
body.z2-shell .z2-userlinks{display:flex;flex-wrap:wrap;gap:4px}
body.z2-shell .z2-userlinks a{
  text-decoration:none;color:var(--z2-ink);font-size:13px;padding:6px 9px;border-radius:8px;
}
body.z2-shell .z2-userlinks a:hover{background:var(--z2-navy-soft)}
body.z2-shell .z2-userlinks a.z2-logout{color:var(--z2-red)}

/* ---------- content top strip ---------- */
body.z2-shell .z2-topstrip{
  position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  background:rgba(242,245,250,.92);backdrop-filter:blur(10px);
  padding:10px 0 12px;margin:-18px 0 14px;
}
body.z2-shell .z2-crumb{font-size:13px;color:var(--z2-muted);white-space:nowrap}
body.z2-shell .z2-crumb b{color:var(--z2-ink);font-weight:700}
/* (Wave 11: the .z2-search strip rules were removed with the box itself.) */
body.z2-shell .z2-topbtn{
  display:inline-flex;align-items:center;gap:7px;text-decoration:none;cursor:pointer;
  background:#fff;color:var(--z2-ink);border:1px solid var(--z2-line);border-radius:999px;
  font-size:13.5px;font-weight:600;padding:8px 14px;font-family:inherit;
}
body.z2-shell .z2-topbtn:hover{border-color:#b9c8de;background:var(--z2-navy-soft)}
body.z2-shell .z2-topbtn:focus-visible{outline:2px solid var(--z2-navy);outline-offset:1px}
body.z2-shell .z2-topbtn svg{width:16px;height:16px;flex:0 0 16px}
body.z2-shell .z2-topbtn .z2-badge{margin:0}
/* the shell's main call-to-action carries the Bid Lab accent red */
body.z2-shell .z2-create-btn{background:var(--z2-accent);border-color:var(--z2-accent);color:#fff}
body.z2-shell .z2-create-btn:hover{background:var(--z2-accent-dark);border-color:var(--z2-accent-dark)}

/* create / purpose popovers (native <details>) */
body.z2-shell details.z2-menu{position:relative}
body.z2-shell details.z2-menu>summary{list-style:none}
body.z2-shell details.z2-menu>summary::-webkit-details-marker{display:none}
body.z2-shell .z2-menu-pop{
  position:absolute;top:calc(100% + 8px);inset-inline-end:0;z-index:50;min-width:230px;
  background:#fff;border:1px solid var(--z2-line);border-radius:12px;
  box-shadow:0 12px 32px rgba(16,32,48,.14);padding:6px;
}
body.z2-shell .z2-menu-pop a{
  display:block;text-decoration:none;color:var(--z2-ink);font-size:14px;
  padding:9px 12px;border-radius:8px;
}
body.z2-shell .z2-menu-pop a:hover{background:var(--z2-navy-soft)}
body.z2-shell .z2-menu-pop p{margin:6px 12px;font-size:13.5px;color:var(--z2-muted);max-width:300px;line-height:1.6}

/* flash messages (same rendering contract as the legacy shell) — a
   success/status surface, so this is one of the few places the Bid Lab
   status green survives */
body.z2-shell .flash p{
  background:var(--z2-success-soft);color:var(--z2-success);border:1px solid #cfe6d8;
  border-radius:10px;padding:10px 14px;margin:0 0 8px;font-size:14px;
}
body.z2-shell .flash p.flash-err{
  background:#fdecea;color:#b3261e;border:1px solid #f0c6c2;
}

/* ---------- shared components (one source — used by every wave) ---------- */
body.z2-shell .z2-card{
  background:var(--z2-card);border:1px solid var(--z2-line);border-radius:var(--z2-radius);
  padding:16px;margin-bottom:12px;box-shadow:0 1px 3px rgba(16,32,48,.05);
}
body.z2-shell .z2-btn{
  display:inline-block;width:auto;border:0;border-radius:var(--z2-radius-ctl);cursor:pointer;text-decoration:none;
  background:var(--z2-navy);color:#fff;font-size:14.5px;font-weight:700;
  padding:10px 18px;margin:0;font-family:inherit;
}
body.z2-shell .z2-btn:hover{background:var(--z2-navy-dark)}
body.z2-shell .z2-btn:focus-visible{outline:2px solid var(--z2-navy);outline-offset:2px}
body.z2-shell .z2-btn.ghost{background:#eef2f5;color:var(--z2-ink)}
body.z2-shell .z2-btn.ghost:hover{background:var(--z2-navy-soft)}
body.z2-shell .z2-btn.danger{background:var(--z2-red)}
body.z2-shell .z2-table{width:100%;border-collapse:collapse;font-size:14px;background:#fff}
body.z2-shell .z2-table th{
  text-align:start;color:var(--z2-muted);font-size:12.5px;font-weight:700;
  padding:10px 12px;border-bottom:1px solid var(--z2-line);white-space:nowrap;
}
body.z2-shell .z2-table td{padding:10px 12px;border-bottom:1px solid #eaf0f6;vertical-align:middle}
body.z2-shell .z2-table tbody tr:hover td{background:#f7fafd}
body.z2-shell .z2-table tr:last-child td{border-bottom:0}
body.z2-shell .z2-pill{
  display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;
  padding:3px 10px;border-radius:999px;background:#eef2f5;color:var(--z2-ink);white-space:nowrap;
}
/* .green here means a success STATUS — the surviving Bid Lab status
   green, small accents only (never a primary/active fill) */
body.z2-shell .z2-pill.green{background:var(--z2-success-soft);color:var(--z2-success)}
body.z2-shell .z2-pill.amber{background:var(--z2-amber-bg);color:var(--z2-amber)}
body.z2-shell .z2-pill.red{background:var(--z2-red-bg);color:var(--z2-red)}
body.z2-shell .z2-pill .cnt{font-weight:400;opacity:.75}
body.z2-shell .z2-stagepills{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
body.z2-shell .z2-stagepills a,body.z2-shell .z2-stagepills>span{
  text-decoration:none;color:var(--z2-ink);background:#fff;border:1px solid var(--z2-line);
  border-radius:999px;padding:7px 14px;font-size:13.5px;font-weight:600;
}
body.z2-shell .z2-stagepills a.active,body.z2-shell .z2-stagepills>span.active{
  background:var(--z2-navy);border-color:var(--z2-navy);color:#fff;
}
body.z2-shell .z2-stagepills a:hover{border-color:var(--z2-navy);color:var(--z2-navy-dark)}
body.z2-shell .z2-stagepills a:focus-visible{outline:2px solid var(--z2-navy);outline-offset:1px}
body.z2-shell .z2-tabs{
  display:flex;gap:2px;flex-wrap:wrap;border-bottom:1px solid var(--z2-line);margin:0 0 14px;
}
body.z2-shell .z2-tabs a,body.z2-shell .z2-tabs>span{
  text-decoration:none;color:var(--z2-muted);font-size:14px;font-weight:600;
  padding:9px 13px;border-bottom:3px solid transparent;margin-bottom:-1px;
}
body.z2-shell .z2-tabs a:hover{color:var(--z2-ink)}
body.z2-shell .z2-tabs a.active,body.z2-shell .z2-tabs>span.active{
  color:var(--z2-navy-dark);border-bottom-color:var(--z2-navy);
}
body.z2-shell .z2-warnbar{
  background:var(--z2-amber-bg);color:var(--z2-amber);border-radius:11px;
  padding:10px 14px;font-size:14px;font-weight:600;margin:0 0 12px;
}

/* ---------- responsive: sidebar stacks on small screens ---------- */
@media (max-width:900px){
  body.z2-shell .z2-layout{flex-direction:column}
  body.z2-shell .z2-sidebar{
    flex:0 0 auto;width:auto;height:auto;position:static;max-height:none;
    border-inline-end:0;border-bottom:1px solid var(--z2-line);
  }
  body.z2-shell main.z2-main{padding:14px 14px 60px}
  body.z2-shell .z2-topstrip{margin-top:-14px}
}

/* ---------- Wave 3: parts & sales pages (legacy component classes,
   one shared restyle — pages wrap their content in .z2w3) ----------
   The legacy class NAMES (.card/.btn/.tbl/.badge/.flag/.car-row/.stat)
   are kept — every Wave 3 template already uses them — but they are
   re-dressed here, scoped to body.z2-shell .z2w3, in the shell's own
   components language: white cards with the shell line/radius, navy
   primary buttons (never the old Apple blue #0071e3, never green),
   red reserved for danger, green only as a small success accent. */
body.z2-shell .z2w3 h1{font-size:24px;font-weight:700;margin:2px 0 12px}
body.z2-shell .z2w3 h2{font-size:18px;font-weight:700;margin:0 0 10px}
body.z2-shell .z2w3 h3{font-size:15.5px;font-weight:700;margin:0 0 8px}
body.z2-shell .z2w3 .muted{color:var(--z2-muted);font-size:13.5px}
body.z2-shell .z2w3 .card{
  background:var(--z2-card);border:1px solid var(--z2-line);
  border-radius:var(--z2-radius);padding:16px;margin-bottom:12px;
  box-shadow:0 1px 3px rgba(16,32,48,.05);
}
body.z2-shell .z2w3 .btn{
  display:inline-block;width:auto;border:0;cursor:pointer;text-decoration:none;
  background:var(--z2-navy);color:#fff;font-size:14.5px;font-weight:700;
  padding:10px 18px;margin:10px 0 0;border-radius:var(--z2-radius-ctl);
  font-family:inherit;text-align:center;
}
body.z2-shell .z2w3 .btn:hover{background:var(--z2-navy-dark)}
body.z2-shell .z2w3 .btn:focus-visible{outline:2px solid var(--z2-navy);outline-offset:2px}
body.z2-shell .z2w3 .btn.ghost{background:#eef2f7;color:var(--z2-ink)}
body.z2-shell .z2w3 .btn.ghost:hover{background:var(--z2-navy-soft)}
body.z2-shell .z2w3 .btn.small{padding:7px 12px;font-size:13.5px;margin-top:0}
body.z2-shell .z2w3 .btn.danger{background:var(--z2-red)}
body.z2-shell .z2w3 input,body.z2-shell .z2w3 select,body.z2-shell .z2w3 textarea{
  font-size:15px;padding:10px 12px;border:1px solid var(--z2-line);
  border-radius:var(--z2-radius-ctl);background:#fff;font-family:inherit;color:var(--z2-ink);
}
body.z2-shell .z2w3 input:focus,body.z2-shell .z2w3 select:focus,body.z2-shell .z2w3 textarea:focus{
  outline:none;border-color:var(--z2-navy);box-shadow:0 0 0 3px rgba(11,61,145,.12);
}
body.z2-shell .z2w3 label{font-size:13.5px;color:var(--z2-muted);margin-top:12px}
body.z2-shell .z2w3 .tbl,body.z2-shell .z2w3 table{
  width:100%;border-collapse:collapse;font-size:14px;background:#fff;margin-top:0;
}
body.z2-shell .z2w3 .tbl th,body.z2-shell .z2w3 table th{
  text-align:start;color:var(--z2-muted);font-size:12.5px;font-weight:700;
  padding:10px 12px;border-bottom:1px solid var(--z2-line);white-space:nowrap;
}
body.z2-shell .z2w3 .tbl td,body.z2-shell .z2w3 table td{
  padding:10px 12px;border-bottom:1px solid #eaf0f6;vertical-align:middle;
}
body.z2-shell .z2w3 .tbl tr:hover td,body.z2-shell .z2w3 table tr:hover td{background:#f7fafd}
body.z2-shell .z2w3 .tbl tr:last-child td,body.z2-shell .z2w3 table tr:last-child td{border-bottom:0}
body.z2-shell .z2w3 .stat-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;margin-bottom:12px;
}
body.z2-shell .z2w3 .stat{
  background:var(--z2-card);border:1px solid var(--z2-line);
  border-radius:var(--z2-radius);padding:14px 10px;text-align:center;
  box-shadow:0 1px 3px rgba(16,32,48,.05);text-decoration:none;color:var(--z2-ink);
}
body.z2-shell .z2w3 .stat b{display:block;font-size:24px;font-weight:700}
body.z2-shell .z2w3 .stat span{font-size:12px;color:var(--z2-muted)}
body.z2-shell .z2w3 a.stat:hover{border-color:var(--z2-navy)}
body.z2-shell .z2w3 .car-row{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  text-decoration:none;color:var(--z2-ink);background:var(--z2-card);
  border:1px solid var(--z2-line);border-radius:var(--z2-radius);
  padding:12px 14px;margin-bottom:8px;box-shadow:0 1px 3px rgba(16,32,48,.05);
}
body.z2-shell .z2w3 .car-row:hover{border-color:var(--z2-navy)}
body.z2-shell .z2w3 .car-row .nm{font-weight:700}
body.z2-shell .z2w3 .car-row .sub{font-size:13px;color:var(--z2-muted)}
body.z2-shell .z2w3 .badge,body.z2-shell .z2w3 .flag{
  display:inline-block;font-size:12px;font-weight:700;padding:3px 10px;
  border-radius:999px;background:var(--z2-navy-soft);color:var(--z2-navy-dark);
  text-decoration:none;white-space:nowrap;
}
body.z2-shell .z2w3 .badge.done,body.z2-shell .z2w3 .badge.ok,body.z2-shell .z2w3 .flag.ok{
  background:var(--z2-success-soft);color:var(--z2-success);
}
body.z2-shell .z2w3 .badge.warn,body.z2-shell .z2w3 .badge.work,body.z2-shell .z2w3 .flag.dup{
  background:var(--z2-amber-bg);color:var(--z2-amber);
}
body.z2-shell .z2w3 .badge.bad,body.z2-shell .z2w3 .badge.danger,body.z2-shell .z2w3 .flag.err{
  background:var(--z2-red-bg);color:var(--z2-red);
}
body.z2-shell .z2w3 .flag.nophoto{background:#eef2f7;color:var(--z2-muted)}
body.z2-shell .z2w3 .flag.loc{background:var(--z2-navy-soft);color:var(--z2-navy-dark)}
body.z2-shell .z2w3 .kv{grid-template-columns:130px 1fr;font-size:14.5px}
body.z2-shell .z2w3 .kv dt{color:var(--z2-muted)}
body.z2-shell .z2w3 .seg label:has(input:checked),
body.z2-shell .z2w3 .radio-row label:has(input:checked){
  border-color:var(--z2-navy);background:var(--z2-navy-soft);
}
body.z2-shell .z2w3 input[type=range].slider{accent-color:var(--z2-navy)}
body.z2-shell .z2w3 .filters .btn,body.z2-shell .z2w3 .inline-form .btn{margin-top:0}
body.z2-shell .z2w3 .barcode-box{text-align:center;margin-top:10px}

/* ---------- Wave 4: customers / finance / payroll / tasks-admin /
   users / reports / dashboard pages (same .z2w3 wrap, same language).
   Only the component classes those pages add on top of the Wave 3 set
   are dressed here — one shared source, no per-page copies. ---------- */
body.z2-shell .z2w3 .btn.primary{background:var(--z2-navy-dark)}
body.z2-shell .z2w3 .chip{
  display:inline-block;font-size:12px;font-weight:700;padding:3px 10px;
  border-radius:999px;background:#eef2f7;color:var(--z2-ink);
  text-decoration:none;white-space:nowrap;
}
body.z2-shell .z2w3 .chip.on{background:var(--z2-navy);color:#fff}
body.z2-shell .z2w3 details.c-details{
  background:var(--z2-card);border:1px solid var(--z2-line);
  border-radius:var(--z2-radius);padding:14px 16px;margin-bottom:12px;
  box-shadow:0 1px 3px rgba(16,32,48,.05);
}
body.z2-shell .z2w3 details.c-details>summary{cursor:pointer;font-weight:700}
body.z2-shell .z2w3 .rep-cards{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:12px;margin-top:12px;
}
body.z2-shell .z2w3 .rep-card{
  display:block;background:var(--z2-card);border:1px solid var(--z2-line);
  border-radius:var(--z2-radius);padding:16px;text-decoration:none;
  color:var(--z2-ink);box-shadow:0 1px 3px rgba(16,32,48,.05);
}
body.z2-shell .z2w3 .rep-card:hover{border-color:var(--z2-navy)}
body.z2-shell .z2w3 .rep-card b{display:block;font-size:16px;margin-bottom:4px}
body.z2-shell .z2w3 .rep-card span{color:var(--z2-muted);font-size:13px}
body.z2-shell .z2w3 table.rep th,body.z2-shell .z2w3 table.rep td{
  border:1px solid var(--z2-line);
}
body.z2-shell .z2w3 table.rep th{background:#f7fafd}
body.z2-shell .z2w3 .perm-matrix{border-collapse:collapse;width:100%;font-size:13px}
body.z2-shell .z2w3 .perm-matrix th,body.z2-shell .z2w3 .perm-matrix td{
  border:1px solid var(--z2-line);padding:6px 8px;text-align:center;
}
body.z2-shell .z2w3 .perm-matrix th{background:var(--z2-navy-soft);color:var(--z2-navy-dark)}
body.z2-shell .z2w3 .perm-matrix td.res{text-align:start;font-weight:600;white-space:nowrap}
body.z2-shell .z2w3 .perm-matrix input[type=checkbox]{
  width:20px;height:20px;accent-color:var(--z2-navy);
}
body.z2-shell .z2w3 input[type=checkbox]{accent-color:var(--z2-navy)}

/* ================================================================
   Wave 6 (2026-11-07) — PAGE PATTERN components: the demo/fleet
   layout language as ONE shared source for every rebuilt page.
   Append-only block; pages opt in by wrapping content in .z2pg and
   composing: .z2pg-head (title + purpose + actions), .z2pg-kpis,
   .z2pg-filter (filter panel card), .z2pg-grid/.z2pg-item (cards),
   .z2-card.z2pg-tablecard (table in card), .z2pg-empty.
   ================================================================ */
body.z2-shell .z2pg-head { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; margin-bottom:12px; }
body.z2-shell .z2pg-title { font-size:26px; font-weight:800; color:var(--z2-navy-dark); margin:0; line-height:1.25; }
body.z2-shell .z2pg-sub { color:var(--z2-muted); font-size:13.5px; margin:4px 0 0; }
body.z2-shell .z2pg-actions { margin-inline-start:auto; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
body.z2-shell .z2pg-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:12px; }
body.z2-shell .z2pg-kpi { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:14px 16px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell a.z2pg-kpi { text-decoration:none; display:block; }
body.z2-shell a.z2pg-kpi:hover { border-color:var(--z2-navy); }
body.z2-shell .z2pg-kpi b { display:block; font-size:26px; font-weight:800; color:var(--z2-navy-dark); line-height:1.15; }
body.z2-shell .z2pg-kpi.warn b { color:var(--z2-amber); }
body.z2-shell .z2pg-kpi.bad b { color:var(--z2-red); }
body.z2-shell .z2pg-kpi span { color:var(--z2-muted); font-size:13px; }
body.z2-shell .z2pg-kpi small { display:block; color:var(--z2-muted); font-size:12px; margin-top:2px; }
body.z2-shell .z2pg-filter { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:16px; margin-bottom:12px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell .z2pg-frow { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
body.z2-shell .z2pg-fld { display:flex; flex-direction:column; gap:5px; }
body.z2-shell .z2pg-fld.grow { flex:1 1 200px; }
body.z2-shell .z2pg-fld label, body.z2-shell .z2pg-group label { font-size:12.5px; color:var(--z2-muted); font-weight:700; }
body.z2-shell .z2pg-fld input, body.z2-shell .z2pg-fld select, body.z2-shell .z2pg-group input,
body.z2-shell .z2pg-group select, body.z2-shell .z2pg-group textarea {
  font:inherit; font-size:13.5px; padding:7px 10px; border:1px solid var(--z2-line);
  border-radius:var(--z2-radius-ctl); background:#fff; color:var(--z2-ink); }
body.z2-shell .z2pg-fld input:focus, body.z2-shell .z2pg-fld select:focus, body.z2-shell .z2pg-group input:focus,
body.z2-shell .z2pg-group select:focus, body.z2-shell .z2pg-group textarea:focus {
  outline:none; border-color:var(--z2-navy); box-shadow:0 0 0 3px rgba(11,61,145,.25); }
body.z2-shell .z2pg-fld input[type="checkbox"], body.z2-shell .z2pg-group input[type="checkbox"] {
  width:17px; height:17px; padding:0; accent-color:var(--z2-navy); box-shadow:none; }
body.z2-shell .z2pg-clear { color:var(--z2-accent); font-weight:700; font-size:13.5px; text-decoration:none; }
body.z2-shell .z2pg-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
body.z2-shell .z2pg-item { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:14px; display:flex; flex-direction:column; gap:8px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell a.z2pg-item { text-decoration:none; color:inherit; }
body.z2-shell a.z2pg-item:hover { border-color:var(--z2-navy); }
body.z2-shell .z2pg-item-title { font-size:16px; font-weight:800; color:var(--z2-navy-dark); line-height:1.35; }
body.z2-shell .z2pg-item-title a { color:inherit; text-decoration:none; }
body.z2-shell .z2pg-item-meta { color:var(--z2-muted); font-size:12.5px; }
body.z2-shell .z2pg-facts { display:grid; grid-template-columns:1fr 1fr; gap:5px 12px; font-size:13px; margin:0; }
body.z2-shell .z2pg-facts dt { color:var(--z2-muted); font-size:11.5px; }
body.z2-shell .z2pg-facts dd { margin:0; font-weight:600; }
body.z2-shell .z2pg-chips { display:flex; flex-wrap:wrap; gap:6px; }
body.z2-shell .z2pg-item-foot { margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; padding-top:8px; }
body.z2-shell .z2-card.z2pg-tablecard { padding:0; overflow-x:auto; }
body.z2-shell .z2pg-sechead { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
body.z2-shell .z2pg-sechead h2, body.z2-shell .z2pg-sechead h3 { margin:0; }
body.z2-shell .z2pg-empty { padding:36px 18px; text-align:center; }
body.z2-shell .z2pg-empty h3 { margin:0 0 6px; font-size:16px; font-weight:700; color:var(--z2-navy-dark); }
body.z2-shell .z2pg-empty p { margin:0 0 12px; color:var(--z2-muted); font-size:13.5px; }
body.z2-shell .z2pg-row { display:flex; align-items:center; gap:12px; padding:10px 2px; border-top:1px solid #eef2f8; text-decoration:none; color:inherit; }
body.z2-shell .z2pg-row:first-of-type { border-top:none; }
body.z2-shell a.z2pg-row:hover .nm { color:var(--z2-navy); }
body.z2-shell .z2pg-row .nm { font-weight:700; color:var(--z2-navy-dark); }
body.z2-shell .z2pg-row .sub { color:var(--z2-muted); font-size:12.5px; }
body.z2-shell .z2pg-row .end { margin-inline-start:auto; display:flex; gap:8px; align-items:center; }
body.z2-shell .z2pg-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px 16px; }
body.z2-shell .z2pg-group { display:flex; flex-direction:column; gap:5px; }
body.z2-shell .z2pg-group.wide { grid-column:1 / -1; }
body.z2-shell .z2pg-formfoot { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }

/* ================================================================
   WALK-02/03 (owner walk, adopted 2026-11-10) — party-file
   components: the tab strip (the car file's data-tab pattern in
   the shell language; active tab = solid navy pill), the details
   pair grid (short fields two to a row, name/address/notes full
   width — the pairs hold at phone width, per the adopted mock),
   and the section head row that carries WALK-03's «تعديل» unlock.
   Append-only; the customer file is the first consumer.
   ================================================================ */
body.z2-shell .z2pg-tabs { display:flex; gap:4px; flex-wrap:wrap; background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:6px; margin-bottom:12px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell .z2pg-tabs a { text-decoration:none; color:var(--z2-ink); font-weight:700; font-size:14.5px; padding:8px 14px; border-radius:9px; }
body.z2-shell .z2pg-tabs a:hover { background:var(--z2-nav2-tint); }
body.z2-shell .z2pg-tabs a[aria-pressed="true"] { background:var(--z2-nav1-ink); color:#fff; }
body.z2-shell .z2pf-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 28px; }
body.z2-shell .z2pf-cell { padding:10px 0; border-bottom:1px solid #eef2f8; min-width:0; }
body.z2-shell .z2pf-cell.wide { grid-column:1 / -1; }
body.z2-shell .z2pf-cell .k { color:var(--z2-muted); font-size:12.5px; margin-bottom:2px; }
body.z2-shell .z2pf-cell .v { font-weight:700; color:var(--z2-ink); overflow-wrap:anywhere; }
body.z2-shell .z2pf-cell .v .none { color:var(--z2-muted); font-weight:400; }
body.z2-shell .z2pf-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--z2-success); margin-inline-end:5px; vertical-align:middle; }
body.z2-shell .z2pf-cell input:not([type=checkbox]), body.z2-shell .z2pf-cell select { width:100%; margin-top:4px; }
body.z2-shell .z2pg-kpi.textval b { font-size:17px; }
/* WALK-04: the customers list's «جهة جديدة» affordance in the
   theme red (--z2-accent, the action colour), per the owner's
   one change to the adopted preview. */
body.z2-shell details.c-details.z2-newparty > summary { color:var(--z2-accent); }

/* ================================================================
   Wave 7 (2026-11-07) — MOBILE SHELL: fixed bottom navigation bar
   + the sidebar as an off-canvas drawer (owner order: phone-first,
   the global-app pattern modelled on his own Bid Lab bottom bar —
   الرئيسية/المزيد style: icon + label, white bar, navy active).
   Desktop ≥1024px is pixel-unchanged: every new element is
   display:none there, and ALL transform/layout rules live inside
   the ≤1023px query, gated on body.z2-authed (logged-in) so the
   login/2FA pages keep today's stacked sidebar exactly.
   The offline sync bar (.zq-syncbar) is styled in legacy style.css
   (not edited); its lift above the bottom bar is the namespaced
   override below — body.z2-shell.z2-authed .zq-syncbar (0,3,1)
   outranks the legacy .zq-syncbar rule (0,1,0).
   ================================================================ */
body.z2-shell{--z2-bb-h:58px}
body.z2-shell .z2-bottombar,
body.z2-shell .z2-menubtn,
body.z2-shell .z2-drawer-close,
body.z2-shell .z2-backdrop{display:none}

@media (max-width:1023px){
  /* ---------- bottom navigation bar ---------- */
  body.z2-shell .z2-bottombar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:64;
    background:#fff;border-top:1px solid var(--z2-line);
    padding-bottom:env(safe-area-inset-bottom);
    box-shadow:0 -2px 14px rgba(16,32,48,.07);
  }
  body.z2-shell .z2-bb-item{
    flex:1 1 0;min-width:0;min-height:var(--z2-bb-h);
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    padding:6px 2px 5px;background:none;border:0;cursor:pointer;position:relative;
    color:var(--z2-muted);text-decoration:none;font-family:inherit;
    font-size:11px;font-weight:600;line-height:1.25;
    -webkit-tap-highlight-color:transparent;
  }
  body.z2-shell .z2-bb-item svg{width:24px;height:24px;flex:0 0 24px}
  body.z2-shell .z2-bb-item.active{color:var(--z2-navy)}
  body.z2-shell .z2-bb-item:active{background:var(--z2-navy-soft)}
  body.z2-shell .z2-bb-item:focus-visible{outline:2px solid var(--z2-navy);outline-offset:-2px}
  body.z2-shell .z2-bb-item .z2-badge.z2-bb-badge{
    position:absolute;margin:0;top:5px;inset-inline-end:calc(50% - 23px);
  }

  /* ---------- content clearance: the bar never covers content;
     the offline sync bar stacks directly ABOVE the bottom bar --- */
  body.z2-shell.z2-authed main.z2-main{
    padding-bottom:calc(var(--z2-bb-h) + env(safe-area-inset-bottom) + 28px);
  }
  body.z2-shell.z2-authed .zq-syncbar{
    bottom:calc(var(--z2-bb-h) + env(safe-area-inset-bottom));
  }

  /* ---------- drawer: the SAME .z2-sidebar, off-canvas ---------- */
  body.z2-shell.z2-authed .z2-sidebar{
    position:fixed;top:0;inset-inline-start:0;z-index:90;
    width:min(320px,86vw);height:100vh;height:100dvh;max-height:none;flex:none;
    box-shadow:0 0 44px rgba(16,32,48,.28);
    transition:transform .26s ease;
  }
  [dir="rtl"] body.z2-shell.z2-authed .z2-sidebar{transform:translateX(110%)}
  [dir="ltr"] body.z2-shell.z2-authed .z2-sidebar{transform:translateX(-110%)}
  body.z2-shell.z2-authed.z2-drawer-open .z2-sidebar{transform:translateX(0)}
  body.z2-shell.z2-authed .z2-backdrop{
    display:block;position:fixed;inset:0;z-index:85;background:rgba(10,22,40,.46);
    opacity:0;visibility:hidden;transition:opacity .26s ease,visibility 0s linear .26s;
  }
  body.z2-shell.z2-authed.z2-drawer-open .z2-backdrop{
    opacity:1;visibility:visible;transition:opacity .26s ease;
  }
  body.z2-shell.z2-authed.z2-drawer-open{overflow:hidden}
  body.z2-shell.z2-authed .z2-drawer-close{
    display:flex;align-items:center;justify-content:center;
    position:absolute;top:12px;inset-inline-end:10px;z-index:3;
    width:40px;height:40px;padding:0;border:0;border-radius:11px;cursor:pointer;
    background:var(--z2-navy-soft);color:var(--z2-navy-dark);
  }
  body.z2-shell .z2-drawer-close svg{width:20px;height:20px}
  body.z2-shell.z2-authed .z2-brand{padding-inline-end:54px}

  /* ---------- top strip compaction ---------- */
  body.z2-shell .z2-menubtn{
    display:inline-flex;align-items:center;justify-content:center;
    width:44px;height:44px;flex:0 0 44px;padding:0;cursor:pointer;
    border:1px solid var(--z2-line);border-radius:12px;background:#fff;color:var(--z2-ink);
  }
  body.z2-shell .z2-menubtn svg{width:22px;height:22px}
  body.z2-shell .z2-menubtn:active{background:var(--z2-navy-soft)}
  body.z2-shell .z2-menubtn:focus-visible{outline:2px solid var(--z2-navy);outline-offset:1px}
  body.z2-shell.z2-authed .z2-topstrip{gap:8px}
  body.z2-shell.z2-authed .z2-crumb{
    max-width:32vw;overflow:hidden;text-overflow:ellipsis;
  }
  body.z2-shell.z2-authed .z2-topbtn{min-height:44px;padding:8px 12px}
}

/* ================================================================
   Wave 10 (2026-11-07) — MOBILE TOP-STRIP POPOVERS stay on-screen.
   .z2-menu-pop anchors with inset-inline-end:0 to its <details>;
   for the «غرض هذه الصفحة» menu that parks the popover past the
   phone's left edge (measured left:-73px at 390px wide, owner's
   screenshot). On ≤1023px the menu <details> stops being the
   anchor: the popover positions against the top strip itself
   (sticky = positioned ancestor), pinned to the strip's
   inline-start edge and width-capped, so BOTH menus (purpose +
   إنشاء) always land fully inside the viewport with text wrapped.
   Desktop ≥1024px is untouched.
   ================================================================ */
@media (max-width:1023px){
  body.z2-shell .z2-topstrip details.z2-menu{position:static}
  body.z2-shell .z2-topstrip .z2-menu-pop{
    top:calc(100% + 6px);inset-inline-start:0;inset-inline-end:auto;
    width:max-content;min-width:0;max-width:min(92vw,340px);
  }
  body.z2-shell .z2-topstrip .z2-menu-pop p{max-width:100%}
}

/* ================================================================
   Wave 11 (2026-11-08) — STRIP CLEANUP (owner's annotated screenshot).
   The strip's global-search box is deleted above (the fleet page keeps
   its own search), and the التنبيهات link + غرض هذه الصفحة summary are
   now small ICON-ONLY round buttons — same targets, same unread badge,
   same popovers, no text. The إنشاء button keeps its text + red fill.
   On phones the icon buttons grow to a 44px touch target and the
   breadcrumb may shrink (ellipsis already set) so the strip holds
   ONE tidy row: menu · crumb · purpose · alerts · create.
   ================================================================ */
body.z2-shell .z2-topbtn.z2-iconbtn{
  position:relative;width:38px;height:38px;min-height:38px;padding:0;
  border-radius:50%;align-items:center;justify-content:center;
}
body.z2-shell .z2-topbtn.z2-iconbtn svg{width:18px;height:18px;flex:0 0 18px}
body.z2-shell .z2-topbtn.z2-iconbtn .z2-badge{
  position:absolute;top:-5px;inset-inline-end:-5px;margin:0;
  min-width:19px;height:19px;font-size:10.5px;padding:0 5px;
  border:2px solid #f2f5fa;
}
@media (max-width:1023px){
  body.z2-shell .z2-topbtn.z2-iconbtn{width:44px;height:44px;min-height:44px;padding:0}
  body.z2-shell.z2-authed .z2-crumb{flex:0 1 auto;min-width:0}
}

/* ================================================================
   Wave 12 (2026-11-08) — icon-only search submit for .z2pg filter
   panels (same component language as the fleet's .c-search-go:
   navy square, white magnifier; text kept in aria-label/title).
   ================================================================ */
body.z2-shell .z2-iconbtn { display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; padding:0; flex:none; }
body.z2-shell .z2-iconbtn svg { width:18px; height:18px; }
@media (max-width:1023px){ body.z2-shell .z2-iconbtn { width:44px; height:44px; } }

/* ================================================================
   List-search component family (TF-01 + TF-02 + TF-04) — the ONE
   geometry for every list page's search row, rendered through
   templates/_list_search.html. --ls-h is the single height the
   search field, the filter select and the submit button share
   (TF-02: one height, one baseline); .ls-go is the customers
   pattern the owner adopted for every list (TF-04: navy button,
   WHITE magnifier); .ls-clear is the × inside the field, shown
   only while the field holds text (TF-01).
   ================================================================ */
body.z2-shell .ls-row { --ls-h:44px; align-items:center; }
body.z2-shell .ls-row .z2pg-fld input,
body.z2-shell .ls-row .z2pg-fld select {
  height:var(--ls-h); box-sizing:border-box; margin:0; }
body.z2-shell .ls-field { position:relative; display:flex; align-items:center; }
body.z2-shell .ls-field input { flex:1; min-width:0; width:100%; }
body.z2-shell .ls-field input.ls-has-clear { padding-inline-end:42px; }
body.z2-shell .ls-clear { position:absolute; inset-inline-end:7px; top:50%;
  transform:translateY(-50%); display:inline-flex; align-items:center;
  justify-content:center; width:30px; height:30px; border-radius:50%;
  background:#eef2f5; color:var(--z2-muted); text-decoration:none; flex:none; }
body.z2-shell .ls-clear:hover { background:var(--z2-red-bg); color:var(--z2-accent); }
body.z2-shell .ls-clear svg { width:13px; height:13px; }
body.z2-shell .ls-go { display:inline-flex; align-items:center;
  justify-content:center; width:44px; height:var(--ls-h, 44px);
  box-sizing:border-box; border:0; border-radius:var(--z2-radius-ctl);
  background:var(--z2-navy); color:#fff; cursor:pointer; flex:none; padding:0; margin:0; }
body.z2-shell .ls-go:hover { background:var(--z2-navy-dark); }
body.z2-shell .ls-go svg { width:18px; height:18px; }
/* The cars box carries its own padding, so its .ls-go/.ls-clear sit
   inside .c-search-box exactly as .c-search-go/.c-search-clear did —
   the shared classes only restate the same geometry there. */
body.z2-shell .c-search-box .ls-clear { position:static; transform:none; }
body.z2-shell .c-search-box .ls-go { border-radius:10px; }
/* View toggle for z2pg list pages (TF-05) — the cars page's
   w2-viewtoggle geometry, shared: two small icon buttons, the
   active one navy. */
body.z2-shell .ls-viewtoggle { display:inline-flex; gap:4px; flex:0 0 auto; }
body.z2-shell .ls-viewtoggle a { display:inline-flex; align-items:center;
  justify-content:center; width:36px; height:36px; border:1px solid var(--z2-line);
  border-radius:9px; background:#fff; color:var(--z2-muted); text-decoration:none; }
body.z2-shell .ls-viewtoggle a svg { width:18px; height:18px; }
body.z2-shell .ls-viewtoggle a:hover { border-color:var(--z2-navy); color:var(--z2-navy-dark); }
body.z2-shell .ls-viewtoggle a:focus-visible { outline:2px solid var(--z2-navy); outline-offset:1px; }
body.z2-shell .ls-viewtoggle a.active { background:var(--z2-navy); border-color:var(--z2-navy); color:#fff; }

/* ================================================================
   WALK-09 (2026-11-10) — /accounts balances page: section heads,
   the standard party link, credit-balance rows (money we hold
   FOR a party — amber, never netted into the receivables
   totals), totals bands, and the phone stacking of the aging
   tables (each party becomes a block: name, balance, the five
   buckets as a labelled mini-grid, last activity — the adopted
   phone preview). Scoped under .w09- so nothing else moves.
   ================================================================ */
body.z2-shell .w09-sec { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; padding:14px 16px 4px; }
body.z2-shell .w09-sec h2 { font-size:19px; font-weight:800; color:var(--z2-navy-dark); margin:0; }
body.z2-shell .w09-sec .sub { color:var(--z2-muted); font-size:13px; }
body.z2-shell .w09-plink { color:var(--z2-navy-dark); font-weight:800; text-decoration:none; }
body.z2-shell .w09-plink:hover { text-decoration:underline; }
body.z2-shell .w09-table td.num, body.z2-shell .w09-table th.num { text-align:end; font-variant-numeric:tabular-nums; }
body.z2-shell .w09-table tr.w09-credit td { background:#fdf6e3; }
body.z2-shell .w09-table tr.w09-credit:hover td { background:#fbf0cd; }
body.z2-shell .chip.w09-creditchip { background:#f3e2ae; color:#7a5b00; font-weight:700; }
body.z2-shell .w09-table tfoot td { background:#f2f7fb; font-weight:800; color:var(--z2-navy-dark); border-top:2px solid var(--z2-line); }
body.z2-shell .w09-note { padding:10px 16px 14px; color:var(--z2-muted); font-size:13px; }
body.z2-shell .w09-note b { color:#7a5b00; }
body.z2-shell .w09-note.warn { color:var(--z2-red); font-weight:700; }
body.z2-shell .w09-titleinfo { display:inline-flex; vertical-align:middle; margin-inline-start:8px; }
@media (max-width:760px){
  body.z2-shell .w09-table thead { display:none; }
  body.z2-shell .w09-table, body.z2-shell .w09-table tbody,
  body.z2-shell .w09-table tr, body.z2-shell .w09-table td { display:block; width:100%; }
  body.z2-shell .w09-table tr { padding:10px 0 12px; border-bottom:1px solid #eaf0f6; }
  body.z2-shell .w09-table td { border-bottom:0; padding:3px 16px; }
  body.z2-shell .w09-table td.w09-bk { display:inline-block; width:19.5%; text-align:center; padding:8px 0 2px; vertical-align:top; }
  body.z2-shell .w09-table td.w09-bk::before { content:attr(data-l); display:block; font-size:11px; color:var(--z2-muted); font-weight:700; margin-bottom:2px; }
  body.z2-shell .w09-table tfoot tr { background:#f2f7fb; }
  body.z2-shell .w09-table tfoot td.w09-bk { background:transparent; }
}

/* ================================================================
   Train #6 (owner walk, 2026-11-11) — customer/balances surfaces:
   sticky filter bars, the rebuilt create-party grid, typographic
   roles, the register table's phone stacking, vehicles-tab kind
   heads. Append-only; scoped under .z2pg-/.z2pf2-/.z2plist- so
   nothing else moves.
   ================================================================ */
body.z2-shell .z2pg-sticky { position:sticky; top:64px; z-index:25;
  box-shadow:0 6px 18px rgba(16,42,86,.10); }
body.z2-shell .z2pf2-sechead { font-size:13px; font-weight:800;
  color:var(--z2-navy-dark); margin:14px 0 8px; }
body.z2-shell .z2pf2-sechead:first-of-type { margin-top:2px; }
body.z2-shell .z2pf2-grid { display:grid; gap:12px 16px;
  grid-template-columns:1fr; }
@media (min-width:701px){
  body.z2-shell .z2pf2-grid { grid-template-columns:repeat(2,1fr); }
  body.z2-shell .z2pf2-grid .span2 { grid-column:span 2; }
}
@media (min-width:1100px){
  body.z2-shell .z2pf2-grid { grid-template-columns:repeat(4,1fr); }
  body.z2-shell .z2pf2-grid .wide { grid-column:1 / -1; }
  body.z2-shell .z2pf2-grid .span2 { grid-column:span 2; }
}
body.z2-shell .z2pf2-taxrow { display:flex; gap:10px; align-items:center; }
body.z2-shell .z2pf2-taxrow input[name="hst_number"] { flex:1 1 auto; }
body.z2-shell .z2pf2-check { display:inline-flex; align-items:center;
  gap:6px; font-size:13.5px; font-weight:600; color:var(--z2-ink);
  white-space:nowrap; min-height:38px; }
body.z2-shell .z2pf2-roles { display:flex; flex-wrap:wrap; gap:4px 18px; }
body.z2-shell .z2pf2-info { display:inline-flex; vertical-align:middle;
  margin-inline-start:6px; }
body.z2-shell .z2pf2-info .z2-iconbtn { width:20px; height:20px;
  min-height:20px; padding:0; }
body.z2-shell .z2pf2-info .z2-iconbtn svg { width:13px; height:13px; }
body.z2-shell .z2plist-roles { font-size:13px; color:var(--z2-ink); }
body.z2-shell .z2-table td.num, body.z2-shell .z2-table th.num {
  text-align:end; font-variant-numeric:tabular-nums; }
/* F1b (register E-137): the shared table's total-row rule — a
   generic z2-table utility (bold row under a navy rule), added
   when the GL island's .gl-total retired onto this system. */
body.z2-shell .z2-table tr.total td {
  font-weight:700; border-top:2px solid var(--z2-navy); }
@media (max-width:700px){
  body.z2-shell .z2plist-table thead { display:none; }
  body.z2-shell .z2plist-table, body.z2-shell .z2plist-table tbody,
  body.z2-shell .z2plist-table tr, body.z2-shell .z2plist-table td {
    display:block; width:100%; }
  body.z2-shell .z2plist-table tr { padding:8px 0 10px;
    border-bottom:1px solid #eaf0f6; }
  body.z2-shell .z2plist-table td { border-bottom:0; padding:3px 12px; }
  body.z2-shell .z2plist-table td.num { text-align:start; }
}
body.z2-shell .z2veh-kind { font-size:14.5px; font-weight:800;
  color:var(--z2-navy-dark); margin:16px 0 4px; }
body.z2-shell .z2file-sticky { position:sticky; top:0; z-index:24;
  background:rgba(242,245,250,.97); padding-top:6px; }

/* ================================================================
   Workshop W2 (2026-11-16) — the Job Board rebuilt INSIDE the
   shared design system (TF-18, board half): page pattern above
   (.z2pg-head/.z2pg-kpis) + this board section. --z2-* tokens
   only; no parallel workshop styling for this surface. Desktop:
   three stage columns side by side. Phone (<= 860px): stage
   tabs (.zb-tabs) switch the ONE visible column — never a
   vertical stack of all columns (approved preview v2).
   ================================================================ */
body.z2-shell .zb-board { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; align-items:start; }
body.z2-shell .zb-col { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:12px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell .zb-col-head { display:flex; align-items:center; gap:8px; margin:2px 2px 10px; }
body.z2-shell .zb-col-head h3 { margin:0; font-size:15.5px; font-weight:800; color:var(--z2-navy-dark); }
body.z2-shell .zb-card { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:12px 14px; margin-bottom:10px; cursor:pointer; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell .zb-card:hover { border-color:var(--z2-navy); }
body.z2-shell .zb-card:last-child { margin-bottom:0; }
body.z2-shell .zb-top { display:flex; align-items:center; gap:8px; }
body.z2-shell .zb-card .ro-num { font-size:16px; font-weight:800; color:var(--z2-navy-dark); }
body.z2-shell .zb-cust { font-weight:700; margin-top:7px; color:var(--z2-ink); }
body.z2-shell .zb-veh { color:var(--z2-muted); font-size:13.5px; }
body.z2-shell .zb-clip { margin-inline-start:auto; font-size:11.5px; font-weight:700; color:var(--z2-muted); background:var(--z2-navy-soft); border-radius:99px; padding:2px 9px; }
body.z2-shell .zb-clip.done { color:var(--z2-success); background:var(--z2-success-soft); }
body.z2-shell .zb-badges { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
body.z2-shell .zb-badge { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; border-radius:99px; padding:2.5px 10px; background:color-mix(in srgb, var(--zb, #5b6b85) 12%, #fff); color:var(--zb, #5b6b85); }
body.z2-shell .zb-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--zb, #5b6b85); flex:none; }
body.z2-shell .zb-block { margin-top:9px; background:var(--z2-red-bg); color:var(--z2-red); border-radius:var(--z2-radius-ctl); padding:7px 10px; font-size:12.5px; display:flex; flex-direction:column; gap:1px; }
body.z2-shell .zb-block .zb-blab { font-weight:800; }
body.z2-shell .zb-block .zb-btxt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.z2-shell .zb-facts { display:grid; grid-template-columns:1fr 1fr; gap:5px 12px; font-size:13px; margin:9px 0 0; }
body.z2-shell .zb-facts dt { color:var(--z2-muted); font-size:11.5px; }
body.z2-shell .zb-facts dd { margin:0; font-weight:600; color:var(--z2-ink); }
body.z2-shell .zb-facts .wide { grid-column:1 / -1; }
body.z2-shell .zb-facts .z-ltr { direction:ltr; unicode-bidi:isolate; }
body.z2-shell .zb-prog { height:8px; background:var(--z2-line); border-radius:99px; margin:10px 0 7px; overflow:hidden; }
body.z2-shell .zb-prog i { display:block; height:100%; background:var(--z2-navy); border-radius:99px; }
body.z2-shell .zb-meta { color:var(--z2-muted); font-size:13px; }
body.z2-shell .zb-empty { text-align:center; color:var(--z2-muted); padding:18px 10px; }
body.z2-shell .zb-empty .zb-empty-t { font-weight:800; color:var(--z2-ink); margin-bottom:4px; }
body.z2-shell .zb-tabs { display:none; }
@media (max-width:860px){
  body.z2-shell .zb-tabs { display:flex; gap:8px; margin-bottom:12px; overflow-x:auto; padding-bottom:2px; }
  body.z2-shell .zb-tab { flex:1 0 auto; display:inline-flex; align-items:center; gap:7px; font:inherit; font-size:13.5px; font-weight:700; color:var(--z2-muted); background:#fff; border:1px solid var(--z2-line); border-radius:99px; padding:7px 14px; cursor:pointer; }
  body.z2-shell .zb-tab.zb-on { color:#fff; background:var(--z2-navy); border-color:var(--z2-navy); }
  body.z2-shell .zb-tab .zb-cnt { font-size:12px; font-weight:800; background:var(--z2-navy-soft); color:var(--z2-navy-dark); border-radius:99px; padding:1px 8px; }
  body.z2-shell .zb-tab.zb-on .zb-cnt { background:rgba(255,255,255,.22); color:#fff; }
  body.z2-shell .zb-board { grid-template-columns:1fr; }
  body.z2-shell .zb-col { display:none; }
  body.z2-shell .zb-col.zb-on { display:block; }
}

/* ================================================================
   Workshop merge screen #2 (2026-11-16) — Job Board alignment to
   the guard-approved model: column money totals + info marks,
   the أعمدة/قائمة view toggle, the card total footer, and the
   list view. Same --z2-* tokens, same section as W2 above.
   ================================================================ */
body.z2-shell .zb-col-total { margin-inline-start:auto; font-weight:800; color:var(--z2-navy-dark); font-variant-numeric:tabular-nums; white-space:nowrap; }
body.z2-shell .zb-viewseg { display:inline-flex; background:#fff; border:1px solid var(--z2-line); border-radius:99px; padding:3px; gap:2px; margin-top:10px; }
body.z2-shell .zb-viewseg-btn { display:inline-flex; align-items:center; min-height:38px; padding:4px 18px; border-radius:99px; font-size:13.5px; font-weight:700; color:var(--z2-muted); text-decoration:none; }
body.z2-shell .zb-viewseg-btn.on { background:var(--z2-navy); color:#fff; }
body.z2-shell .zb-total { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; padding-top:9px; border-top:1px solid var(--z2-line); font-size:13px; color:var(--z2-muted); }
body.z2-shell .zb-total b { font-size:15.5px; font-weight:800; color:var(--z2-navy-dark); font-variant-numeric:tabular-nums; }
body.z2-shell .zb-listwrap { background:#fff; border:1px solid var(--z2-line); border-radius:var(--z2-radius); padding:4px 16px 8px; box-shadow:0 1px 2px rgba(16,42,86,.05); }
body.z2-shell table.zb-list td.num, body.z2-shell table.zb-list th.num { text-align:end; direction:ltr; font-variant-numeric:tabular-nums; white-space:nowrap; }
body.z2-shell table.zb-list tbody tr[data-row-total] { cursor:pointer; }
body.z2-shell .zb-st { display:inline-flex; align-items:center; gap:7px; font-weight:600; white-space:nowrap; }
body.z2-shell .zb-st i { width:9px; height:9px; border-radius:3px; display:inline-block; flex:none; }
body.z2-shell table.zb-list .zb-badge { margin-inline-start:6px; }
body.z2-shell .zb-late { color:var(--z2-red); font-weight:800; white-space:nowrap; }
body.z2-shell table.zb-list tr.zb-totrow td { font-weight:800; color:var(--z2-navy-dark); border-top:2px solid var(--z2-navy); background:#f7faff; }
/* The list stacks at the widths the full table does not fit —
   the shared table pattern (no page-level horizontal scroll). */
@media (max-width:900px){
  body.z2-shell .zb-listwrap { padding:4px 10px 6px; }
  body.z2-shell table.zb-list thead { display:none; }
  body.z2-shell table.zb-list tr { display:flex; flex-wrap:wrap; column-gap:16px; row-gap:3px; padding:9px 2px; border-bottom:1px solid var(--z2-line); }
  body.z2-shell table.zb-list td { display:block; border-bottom:none; padding:1px 0; }
  body.z2-shell table.zb-list td.num { text-align:start; }
  body.z2-shell table.zb-list td.num::before { content:attr(data-label); display:block; font-size:10.5px; color:var(--z2-muted); font-weight:700; margin-bottom:1px; }
  body.z2-shell table.zb-list tr.zb-totrow { border-top:2px solid var(--z2-navy); }
}

/* ================================================================
   Job Board (merge screen #2) — guard fix round 2026-11-17
   (defect E1): the board's column info marks adopt the SHARED
   info-mark component (.z2info), built once in the Customers
   build prep (screen #8) as the class-E root fix — the rules
   below are imported verbatim from that prep's shell block
   (contract R1–R8 in templates/_info_mark.html). The ONE line
   added for this screen is the R4 consumer wrap
   (.zb-board.z2info-clip), mirroring .z2-card.z2info-clip: the
   board grid clips an open tip's overflow area, so a tip can
   never widen the document. The Customers marks-bar band rules
   are not imported: this screen's marks live in the column
   heads, one copy per width by construction (R5).
   ================================================================ */
body.z2-shell .z2info { position:relative; width:44px; height:44px;
  background:transparent; border:none; cursor:pointer; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center;
  font-family:inherit; padding:0; vertical-align:middle; }
body.z2-shell .z2info-dot { width:26px; height:26px; border-radius:50%;
  border:1.5px solid var(--z2-navy); color:var(--z2-navy); background:#fff;
  font-weight:800; font-size:15px; line-height:1; display:flex;
  align-items:center; justify-content:center; }
body.z2-shell .z2info:hover .z2info-dot,
body.z2-shell .z2info:focus-visible .z2info-dot { background:var(--z2-navy-soft); }
body.z2-shell .z2info:focus-visible { outline:none; }
body.z2-shell .z2info-tip { position:absolute; top:calc(100% + 2px);
  inset-inline-start:0; width:264px; background:var(--z2-navy-dark);
  color:#eaf1fc; font-size:12px; font-weight:500; line-height:1.8;
  text-align:start; white-space:normal; border-radius:10px;
  padding:10px 12px; box-shadow:0 10px 26px rgba(7,42,102,.28);
  display:none; z-index:60; cursor:default; }
body.z2-shell .z2info:hover .z2info-tip,
body.z2-shell .z2info:focus-visible .z2info-tip,
body.z2-shell .z2info.open .z2info-tip { display:block; }
body.z2-shell .z2info-end .z2info-tip { inset-inline-start:auto;
  inset-inline-end:0; }
body.z2-shell .z2-card.z2info-clip { overflow:hidden; }
body.z2-shell .zb-board.z2info-clip { overflow:hidden; }
body.z2-shell .z2th-wrap { display:inline-flex; align-items:center; gap:2px; }
body.z2-shell .z2info-bar { display:none; }
body.z2-shell .z2info-mi { display:inline-flex; align-items:center;
  font-size:12px; font-weight:700; color:var(--z2-muted); }
/* Phone: ONE sheet rule for every mark (component rule R6) —
   fixed between the physical 12px insets, above the shell's
   bottom bar (--z2-bb-h:58px). */
@media (max-width:760px){
  body.z2-shell .z2info .z2info-tip,
  body.z2-shell .z2info-end .z2info-tip { position:fixed; top:auto;
    bottom:70px; inset-inline-start:auto; inset-inline-end:auto;
    left:12px; right:12px; width:auto; z-index:80; }
}
