
*{box-sizing:border-box}body{margin:0;font-family:Tahoma,Arial,sans-serif;background:#f5f7fa;color:#172333}
header{height:68px;background:#12385d;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 4%;box-shadow:0 2px 8px #0002;position:sticky;top:0;z-index:1200}
.brand{font-size:25px;font-weight:800}.brand small{font-size:13px;font-weight:400;opacity:.8;margin-right:7px}
nav button{border:0;background:transparent;color:#dbe7f3;padding:23px 16px;font-size:13px;cursor:pointer}
nav button.active{color:#fff;border-bottom:3px solid #fff}.wrap{width:min(1750px,96%);margin:24px auto}
.card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:18px;box-shadow:0 3px 12px #0000000a}
.title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}h1{font-size:22px;margin:0}.sub{font-size:12px;color:#718096;margin-top:5px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}.field label{display:block;font-size:13px;font-weight:bold;margin-bottom:6px;color:#425466}
.field input,.field select,.field textarea{width:100%;padding:10px 11px;border:1px solid #ccd6e0;border-radius:7px;background:#fff;font:inherit;min-height:41px}
.field input[readonly]{background:#f7f9fb}.field textarea{height:76px;resize:vertical}.wide{grid-column:span 2}.full{grid-column:1/-1}
.section{grid-column:1/-1;font-size:13px;font-weight:700;color:#12385d;border-bottom:1px solid #e5ebf1;padding:5px 0 8px;margin-top:4px}
.req:after{content:' *';color:#b42318}.hint{font-size:11px;color:#718096;margin-top:4px}.actions{margin-top:18px;display:flex;gap:10px}
.btn{border:0;border-radius:7px;padding:10px 18px;font-weight:bold;cursor:pointer}.primary{background:#1769aa;color:#fff}.secondary{background:#e9eef4;color:#24364b}
.hide{display:none!important}.filters{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1.5fr auto 1fr auto auto;gap:10px;margin-bottom:14px}.filters input,.filters select{padding:10px;border:1px solid #ccd6e0;border-radius:7px;background:#fff}
.report-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0;padding:10px 13px;background:#f8fafc;border:1px solid #e5ebf1;border-radius:8px}.tablebox{overflow-x:hidden;overflow-y:visible;border:1px solid #e5eaf0;border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:11px;table-layout:fixed;min-width:0}th{background:#12385d;color:white;padding:9px 5px;white-space:normal;line-height:1.35}td{padding:9px 5px;border-bottom:1px solid #dfe7ef;text-align:center;background:#fff;white-space:normal;overflow-wrap:anywhere}tbody tr:nth-child(even) td{background:#f8fafc}tbody tr:hover td{background:#f1f7fc}
.status{display:inline-block;padding:5px 9px;border-radius:14px;background:#eaf3fb;color:#1769aa;max-width:250px;line-height:1.45}.done{background:#e7f6ec;color:#19723b}.money{direction:ltr;text-align:left;white-space:nowrap}
.link{color:#1769aa;font-weight:bold;cursor:pointer}.progress{min-width:70px}.userbox{font-size:12px;text-align:left}.loginwrap{min-height:100vh;display:grid;place-items:center;background:#eef3f8}
.login{width:min(420px,92%)}.login h1{text-align:center;color:#12385d;font-size:28px}.login .brandline{text-align:center;color:#6b7b8c;margin:7px 0 22px}.login .field{margin-bottom:13px}
.err{color:#b42318;font-size:12px;margin-top:8px}.toast{position:fixed;left:20px;bottom:20px;background:#173b5f;color:#fff;padding:11px 16px;border-radius:8px;display:none;z-index:30}
.modalback{position:fixed;inset:0;background:#0007;display:grid;place-items:center;z-index:25;padding:18px}.modal{width:min(560px,96%);background:#fff;border-radius:14px;padding:20px;box-shadow:0 16px 45px #0004}.modal h2{margin:0 0 6px;font-size:20px}.modal .meta{font-size:12px;color:#66788a;margin-bottom:16px}.modal .field{margin-bottom:12px}.modalactions{display:flex;gap:10px;margin-top:14px}.badge{display:inline-block;padding:4px 8px;border-radius:12px;background:#eef3f8;color:#35506b;white-space:nowrap}.badge.ok{background:#e7f6ec;color:#19723b}.badge.part{background:#fff5df;color:#9a6700}.historylist{max-height:420px;overflow:auto;border:1px solid #e5ebf1;border-radius:8px}.historyrow{padding:12px;border-bottom:1px solid #edf1f5}.historyrow:last-child{border-bottom:0}.historyrow .top{display:flex;justify-content:space-between;gap:12px;font-weight:bold}.historyrow .note{margin-top:6px;color:#586b7d;font-size:12px}.historyrow .who{margin-top:5px;color:#8291a0;font-size:11px}.smalllinks{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.orgtree{border:1px solid #e2e8f0;border-radius:9px;padding:12px;background:#fafcfe}.orgnode{padding:7px 10px;border-right:3px solid #c7d5e3;margin:5px 0}.lvl1{margin-right:0}.lvl2{margin-right:18px}.lvl3{margin-right:36px}.lvl4{margin-right:54px}.off{opacity:.55;text-decoration:line-through}
@media(max-width:1000px){.grid{grid-template-columns:1fr 1fr}.filters{grid-template-columns:1fr 1fr}}@media(max-width:600px){.grid{grid-template-columns:1fr}.wide{grid-column:span 1}.filters{grid-template-columns:1fr}}
html,body{max-width:100%;overflow-x:hidden}#report{width:100%;max-width:100%;box-sizing:border-box}#report .card{width:100%;max-width:100%;box-sizing:border-box}
header nav{display:flex;align-items:center;gap:10px}
header nav button{border:1px solid rgba(255,255,255,.25)!important;border-radius:8px!important;padding:10px 18px!important;min-width:120px;background:rgba(255,255,255,.07)!important;color:#fff!important;font-weight:700;cursor:pointer;transition:.15s}
header nav button:hover{background:rgba(255,255,255,.14)!important}
header nav button.active{background:#fff!important;color:#12385d!important;border-color:#fff!important;box-shadow:0 2px 7px rgba(0,0,0,.12)}
header nav button.active:after{display:none!important}
.navicon{font-size:13px;margin-left:5px}
.userbox{line-height:1.35}
.userbox .username{font-weight:700;color:#fff}
.userbox .roleline{font-size:12px;color:#d7e6f4;margin-top:2px}
.userbox .logoutlink{font-size:12px;color:#55b5f0;cursor:pointer;margin-top:3px;display:inline-block}

.report-toolbar{display:flex;flex-direction:column;gap:10px;margin-bottom:6px;width:100%;max-width:100%}
.report-filter-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;width:100%}
.report-filter-row select,.report-action-row input,.export-group select{min-width:0;width:100%;height:42px;border:1px solid #ccd6e0;border-radius:7px;background:#fff;padding:0 10px;color:#172333}
.report-action-row{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
.report-action-row>input{flex:1 1 360px;min-width:220px}
.report-action-row>.btn{flex:0 0 auto;height:42px}
.export-group{margin-right:auto;display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:6px 8px;border:1px solid #dbe4ec;border-radius:9px;background:#f8fafc}
.export-label{font-size:12px;font-weight:700;color:#4d6275;white-space:nowrap}
.export-group select{width:145px;height:38px}
.export-group .btn{height:38px;min-width:76px;padding:7px 13px;font-weight:700}
.export-pdf{background:#fff!important;color:#a42b2b!important;border:1px solid #dfb4b4!important}
.export-pdf:hover{background:#fff5f5!important}
.export-excel{background:#fff!important;color:#24713c!important;border:1px solid #b9d7c2!important}
.export-excel:hover{background:#f3fbf5!important}
@media(max-width:1200px){
 .report-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .report-action-row{flex-wrap:wrap}
 .report-action-row>input{flex:1 1 100%}
 .export-group{margin-right:0}
}

.field-error{border-color:#c43d3d!important;box-shadow:0 0 0 2px rgba(196,61,61,.08)!important}
.save-state{opacity:.65;cursor:wait!important}

/* FLOWIX compact entry workspace */
#entry{
  width:100%;max-width:100%;box-sizing:border-box;
}
#entry .title{
  margin:0 0 8px;
}
#entry .title h1{
  font-size:18px;line-height:1.2;
}
#entry .title .sub{
  font-size:10.5px;margin-top:0;
}
#entry .card{
  padding:11px 13px 10px;border-radius:10px;
}
#entry .entry-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  column-gap:9px;
  row-gap:7px;
}
#entry .entry-grid .section{
  grid-column:1/-1;
  font-size:11.5px;
  padding:2px 0 4px;
  margin:0;
  line-height:1.25;
}
#entry .field{
  min-width:0;
}
#entry .pr-field{min-width:0}
#entry .supplier-entry-field{min-width:0}
#entry .supplier-entry-field input{font-size:12px}

#entry .field label{
  font-size:11.5px;
  margin-bottom:3px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#entry .field input,
#entry .field select,
#entry .field textarea{
  min-height:34px;
  height:34px;
  padding:6px 8px;
  font-size:12px;
  border-radius:6px;
}
#entry .field textarea{
  height:42px;
  min-height:42px;
  resize:none;
}
#entry .half{grid-column:span 3}
#entry .span3{grid-column:span 3}
#entry .full{grid-column:1/-1}
#entry .wide{grid-column:span 2}
#entry .hint{
  font-size:9px;margin-top:0;line-height:1.15;
}
#entry .actions{
  margin-top:8px;
  gap:8px;
}
#entry .actions .btn{
  padding:7px 18px;
  min-height:34px;
}
body.entry-page{
  overflow-y:hidden;
}
body.entry-page main.wrap{
  margin-top:12px;
  margin-bottom:0;
}

/* Extra compaction for ordinary laptop-height screens */
@media (max-height:800px) and (min-width:1001px){
  #entry .title{margin-bottom:5px}
  #entry .title .sub{display:none}
  #entry .card{padding:8px 11px}
  #entry .entry-grid{column-gap:8px;row-gap:5px}
  #entry .entry-grid .section{font-size:11px;padding:1px 0 3px}
  #entry .field label{font-size:10.5px;margin-bottom:2px}
  #entry .field input,
  #entry .field select{height:31px;min-height:31px;padding:4px 7px;font-size:11.5px}
  #entry .field textarea{height:34px;min-height:34px;padding:4px 7px}
  #entry .actions{margin-top:5px}
  #entry .actions .btn{min-height:31px;padding:5px 16px}
  body.entry-page main.wrap{margin-top:8px}
}

/* Preserve usability on narrower screens; scrolling is allowed only there because six columns cannot fit */
@media (max-width:1000px){
  body.entry-page{overflow-y:auto}
  #entry .entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #entry .half,#entry .span3,#entry .wide{grid-column:span 1}
  #entry .full{grid-column:1/-1}
}

/* v2.9.6 - balanced full-height entry page */
body.entry-page main.wrap{
  height:calc(100vh - 168px);
  min-height:560px;
  display:flex;
  flex-direction:column;
}
#entry{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#entry .title{
  flex:0 0 auto;
}
#entry .card{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#entry form{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#entry .entry-grid{
  flex:1 1 auto;
  min-height:0;
  grid-template-rows:
    auto
    minmax(44px,1fr)
    minmax(44px,1fr)
    auto
    minmax(44px,1fr)
    minmax(44px,1fr)
    auto
    minmax(44px,1fr)
    minmax(44px,1fr);
  align-content:stretch;
}
#entry .field{
  display:flex;
  flex-direction:column;
  justify-content:center;
}
#entry .field input,
#entry .field select{
  height:38px;
  min-height:38px;
}
#entry .field textarea{
  height:52px;
  min-height:52px;
}
#entry .actions{
  flex:0 0 auto;
  padding-top:5px;
  margin-top:5px;
}
#entry .actions .btn{
  min-height:36px;
}

/* Laptop-height screens: still no scroll, but less compressed than v2.9.5 */
@media (max-height:800px) and (min-width:1001px){
  body.entry-page main.wrap{
    height:calc(100vh - 158px);
    min-height:520px;
  }
  #entry .entry-grid{
    grid-template-rows:
      auto
      minmax(38px,1fr)
      minmax(38px,1fr)
      auto
      minmax(38px,1fr)
      minmax(38px,1fr)
      auto
      minmax(38px,1fr)
      minmax(38px,1fr);
  }
  #entry .field input,
  #entry .field select{
    height:34px;
    min-height:34px;
  }
  #entry .field textarea{
    height:42px;
    min-height:42px;
  }
}

/* On very tall screens, gently increase breathing room instead of leaving a large empty block */
@media (min-height:900px) and (min-width:1001px){
  #entry .field input,
  #entry .field select{
    height:42px;
    min-height:42px;
  }
  #entry .field textarea{
    height:60px;
    min-height:60px;
  }
  #entry .entry-grid{
    row-gap:10px;
  }
}

/* v2.9.7 final entry layout */
body.entry-page main.wrap{
  height:calc(100vh - 154px);
  min-height:560px;
  margin-top:8px;
  margin-bottom:0;
  display:flex;
  flex-direction:column;
}
#entry{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#entry .title{
  flex:0 0 auto;
  margin:0 0 6px;
}
#entry .title h1{font-size:18px}
#entry .title .sub{font-size:10px;margin-top:1px}
#entry .entry-card{
  flex:1 1 auto;
  min-height:0;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
}
#entry form{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#entry .entry-layout{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:5px;
}
#entry .entry-section{
  font-size:11px;
  font-weight:800;
  color:#12385d;
  border-bottom:1px solid #dfe7ef;
  padding:1px 0 3px;
  margin:0;
  line-height:1.2;
}
#entry .entry-row{
  display:grid;
  gap:9px;
  align-items:end;
}
#entry .project-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
#entry .request-row{
  /* القسم | نوع الشراء | نوع المعاملة | رقم الطلب | المورد | البيان */
  grid-template-columns:.9fr 1.15fr 1.1fr .72fr 1.65fr 1.55fr;
}
#entry .finance-row{
  grid-template-columns:1.35fr .8fr 1fr 1fr .8fr 1fr 1.25fr;
}
#entry .follow-row{
  grid-template-columns:2.2fr 1fr 1fr;
}
#entry .notes-row{
  grid-template-columns:1fr;
}
#entry .field{
  min-width:0;
}
#entry .field label{
  display:block;
  font-size:10.5px;
  font-weight:700;
  color:#425466;
  margin:0 0 2px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#entry .field input,
#entry .field select,
#entry .field textarea{
  width:100%;
  min-width:0;
  height:33px;
  min-height:33px;
  padding:4px 7px;
  border:1px solid #ccd6e0;
  border-radius:6px;
  background:#fff;
  font-size:11.5px;
}
#entry .calc-field input{
  background:#f6f8fa;
  color:#334a5e;
  font-weight:700;
}
#entry .total-field input{
  background:#edf4fa;
  color:#12385d;
}
#entry .full-note textarea{
  height:42px;
  min-height:42px;
  resize:none;
}
#entry .notes-section-title{
  margin-top:1px;
}
#entry .entry-actions{
  flex:0 0 auto;
  margin-top:6px;
  padding-top:4px;
  display:flex;
  gap:8px;
}
#entry .entry-actions .btn{
  min-height:32px;
  padding:5px 18px;
  font-size:12px;
}

/* Prevent vertical page scroll on desktop entry screen */
@media (min-width:1001px){
  body.entry-page{overflow-y:hidden}
}

/* Slightly more breathing room on taller monitors */
@media (min-height:900px) and (min-width:1001px){
  #entry .entry-layout{gap:8px}
  #entry .field input,
  #entry .field select{height:38px;min-height:38px;font-size:12px}
  #entry .full-note textarea{height:52px;min-height:52px}
  #entry .entry-section{font-size:11.5px;padding-bottom:4px}
}

/* Compact mode for shorter laptop screens */
@media (max-height:760px) and (min-width:1001px){
  body.entry-page main.wrap{height:calc(100vh - 148px);min-height:500px}
  #entry .title .sub{display:none}
  #entry .entry-card{padding:7px 10px}
  #entry .entry-layout{gap:3px}
  #entry .entry-section{font-size:10px;padding:0 0 2px}
  #entry .field label{font-size:9.5px;margin-bottom:1px}
  #entry .field input,
  #entry .field select{height:29px;min-height:29px;padding:3px 6px;font-size:10.5px}
  #entry .full-note textarea{height:32px;min-height:32px}
  #entry .entry-actions{margin-top:3px;padding-top:2px}
  #entry .entry-actions .btn{min-height:29px;padding:4px 15px}
}

/* Responsive fallback for narrower screens */
@media (max-width:1000px){
  body.entry-page{overflow-y:auto}
  body.entry-page main.wrap{height:auto;min-height:0}
  #entry .project-row,
  #entry .request-row,
  #entry .finance-row,
  #entry .follow-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #entry .description-field,
  #entry .status-field,
  #entry .total-field{
    grid-column:span 2;
  }
}

/* v2.9.8 compact entry card - content height only */
body.entry-page main.wrap{
  height:auto!important;
  min-height:0!important;
  display:block!important;
  margin-top:10px!important;
  margin-bottom:0!important;
}
#entry{
  display:block!important;
  min-height:0!important;
}
#entry .entry-card{
  height:auto!important;
  min-height:0!important;
  display:block!important;
  padding:12px 14px 10px!important;
}
#entry form{
  display:block!important;
  min-height:0!important;
}
#entry .entry-layout{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  min-height:0!important;
}
#entry .entry-row{
  min-height:0!important;
}
#entry .entry-section{
  margin-top:1px!important;
  padding:2px 0 4px!important;
}
#entry .field input,
#entry .field select{
  height:35px!important;
  min-height:35px!important;
}
#entry .full-note textarea{
  height:44px!important;
  min-height:44px!important;
}
#entry .entry-actions{
  margin-top:7px!important;
  padding-top:2px!important;
  justify-content:flex-start!important;
}
body.entry-page{
  overflow-y:hidden!important;
}

/* Short screens: stay compact without stretching card */
@media (max-height:760px) and (min-width:1001px){
  #entry .entry-card{padding:8px 11px 7px!important}
  #entry .entry-layout{gap:4px!important}
  #entry .field input,
  #entry .field select{height:30px!important;min-height:30px!important}
  #entry .full-note textarea{height:34px!important;min-height:34px!important}
  #entry .entry-section{padding:1px 0 3px!important}
  #entry .entry-actions{margin-top:4px!important}
}

/* Narrow screens may scroll vertically */
@media (max-width:1000px){
  body.entry-page{overflow-y:auto!important}
}

/* v2.9.9 - visibility and entry layout correction */
#entry.hide,
#report.hide,
#settings.hide{
  display:none!important;
}

/* Exactly one workspace section is visible */
#entry:not(.hide){
  display:block!important;
}

/* Entry page: use the screen better without a huge blank area */
body.entry-page main.wrap{
  width:min(1750px,96%)!important;
  height:auto!important;
  min-height:0!important;
  margin:10px auto 0!important;
  display:block!important;
}
#entry .title{
  margin:0 0 8px!important;
}
#entry .entry-card{
  height:auto!important;
  min-height:calc(100vh - 270px)!important;
  padding:15px 16px 12px!important;
  display:flex!important;
  flex-direction:column!important;
}
#entry form{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
}
#entry .entry-layout{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  gap:8px!important;
}
#entry .entry-section{
  margin:0!important;
  padding:3px 0 5px!important;
  font-size:11.5px!important;
}
#entry .entry-row{
  gap:10px!important;
}
#entry .field label{
  font-size:11px!important;
  margin-bottom:3px!important;
}
#entry .field input,
#entry .field select{
  height:39px!important;
  min-height:39px!important;
  padding:6px 8px!important;
  font-size:12px!important;
}
#entry .full-note textarea{
  height:54px!important;
  min-height:54px!important;
  padding:7px 9px!important;
  font-size:12px!important;
}
#entry .entry-actions{
  margin-top:10px!important;
  padding-top:0!important;
  flex:0 0 auto!important;
}
#entry .entry-actions .btn{
  min-height:36px!important;
  padding:7px 20px!important;
}

/* Prevent page scrolling on ordinary desktop sizes */
@media (min-width:1001px){
  body.entry-page{
    overflow-y:hidden!important;
  }
}

/* Short laptop screens: compact just enough to stay within one screen */
@media (max-height:820px) and (min-width:1001px){
  #entry .entry-card{
    min-height:calc(100vh - 250px)!important;
    padding:10px 13px 9px!important;
  }
  #entry .entry-layout{
    gap:5px!important;
  }
  #entry .entry-section{
    padding:2px 0 3px!important;
    font-size:10.5px!important;
  }
  #entry .field label{
    font-size:10px!important;
    margin-bottom:2px!important;
  }
  #entry .field input,
  #entry .field select{
    height:33px!important;
    min-height:33px!important;
    padding:4px 7px!important;
    font-size:11px!important;
  }
  #entry .full-note textarea{
    height:40px!important;
    min-height:40px!important;
  }
  #entry .entry-actions{
    margin-top:6px!important;
  }
}

/* Smaller widths: allow normal vertical scrolling */
@media (max-width:1000px){
  body.entry-page{
    overflow-y:auto!important;
  }
  #entry .entry-card{
    min-height:0!important;
  }
}

/* v2.10.0 final entry refinements */
#entry .follow-row{
  grid-template-columns:1.75fr .95fr 1.15fr!important;
}
#entry .calc-field input[readonly]{
  background:#f3f6f8!important;
  color:#334a5e!important;
  font-weight:700!important;
  border-color:#d8e1e8!important;
}
#entry .total-field input[readonly]{
  background:#eaf2f8!important;
  color:#12385d!important;
  font-weight:800!important;
  border-color:#c8d8e6!important;
}
#entry .entry-actions{
  align-items:center!important;
}
#entry .entry-actions .btn{
  height:38px!important;
  min-height:38px!important;
  min-width:76px!important;
  padding:7px 20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
#entry .entry-actions .primary{
  box-shadow:0 2px 5px rgba(23,105,170,.18);
}
#entry .entry-actions .secondary{
  border:1px solid #d5dee7;
}

/* v2.11.0 report workspace */
#report .card{padding:12px 14px}
#report .report-toolbar{display:flex;flex-direction:column;gap:9px;margin-bottom:9px}
#report .report-filter-row{
 display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px
}
#report .report-action-row{
 display:grid;grid-template-columns:minmax(280px,1fr) auto auto;gap:8px;align-items:center
}
#report .report-action-row>input{min-width:0}
#report .export-group{display:flex;align-items:center;gap:6px;white-space:nowrap}
#report .export-label{font-size:11px;color:#607487}
#report #reportType{width:118px}
#report .report-head{
 display:flex;align-items:center;justify-content:space-between;
 padding:7px 2px 8px;border-bottom:1px solid #dce5ed;margin-bottom:0
}
#report .report-head b{font-size:12px;color:#263b4d;font-weight:700}
#report .report-head span{font-size:11px;color:#65788a;white-space:nowrap}
#report .report-tablebox{overflow-x:hidden!important;width:100%}
#report .report-summary-table{
 width:100%!important;table-layout:fixed!important;border-collapse:collapse
}
#report .report-summary-table th{
 position:sticky;top:0;z-index:1;
 font-size:10.5px;padding:8px 6px;white-space:normal;line-height:1.25
}
#report .report-summary-table td{
 font-size:11px;padding:8px 6px;vertical-align:middle;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
#report .report-summary-table tbody tr{height:44px}
#report .report-summary-table tbody tr+tr td{border-top:1px solid #edf1f4}
#report .supplier-cell{max-width:0}
#report .report-total{font-weight:700;direction:rtl}
#report .report-status{
 display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;vertical-align:middle
}
#report .pr-link{
 border:0;background:transparent;padding:0;color:#1769aa;font:inherit;
 font-weight:800;cursor:pointer;text-decoration:none
}
#report .pr-link:hover{text-decoration:underline}
@media(max-width:1150px){
 #report .report-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 #report .report-action-row{grid-template-columns:1fr auto}
 #report .export-group{grid-column:1/-1;justify-content:flex-start}
}

/* v2.12.0 final report polish */
#report .report-filter-row select{
  height:39px!important;
  min-height:39px!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
}
#report .report-action-row{
  grid-template-columns:minmax(360px,1fr) auto auto!important;
  gap:7px!important;
}
#report .report-action-row>input{
  height:39px!important;
  min-height:39px!important;
}
#report .export-group{
  gap:6px!important;
  padding:0!important;
}
#report .export-group .btn,
#report .export-group select{
  height:39px!important;
  min-height:39px!important;
}
#report .report-head{
  justify-content:flex-start!important;
  gap:12px!important;
  padding:8px 3px!important;
}
#report .report-head b{
  flex:1 1 auto!important;
}
#report .report-head span{
  flex:0 0 auto!important;
  padding:3px 9px!important;
  border:1px solid #dce5ed!important;
  border-radius:12px!important;
  background:#f7f9fb!important;
  color:#4f6578!important;
  font-weight:700!important;
}
#report .report-summary-table th:nth-child(5),
#report .report-summary-table td:nth-child(5){
  width:20%!important;
}
#report .report-summary-table th:nth-child(7),
#report .report-summary-table td:nth-child(7){
  width:22%!important;
}
#report .report-total{
  direction:rtl!important;
  unicode-bidi:plaintext!important;
  text-align:center!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums!important;
}


/* v3.0.4: FLOWIX does not force browser zoom.
   The interface uses the browser's normal 100% scale. */

/* v3.1.0 user management */
#users .users-card{padding:14px}
#users .user-form-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr .7fr;gap:9px}
#users .user-scope-note{font-size:11px;color:#667b8e;margin:5px 0 8px}
#users .project-choices{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
 max-height:210px;overflow-y:auto;padding:3px
}
#users .project-choice{
 display:flex;gap:8px;align-items:flex-start;border:1px solid #dce5ed;border-radius:7px;
 padding:8px;background:#fbfcfd;cursor:pointer
}
#users .project-choice input{margin-top:3px}
#users .project-choice span{min-width:0;display:flex;flex-direction:column}
#users .project-choice b{font-size:11.5px;color:#263b4d}
#users .project-choice small{font-size:9.5px;color:#758797;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#users .user-actions{margin-top:10px}
#users .users-table{width:100%;table-layout:fixed}
#users .users-table th,#users .users-table td{font-size:11px;padding:7px}
#users .scope-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#users .user-edit-btn{padding:4px 10px;min-height:28px}
#users .muted{color:#8b99a6;font-size:10px}
#users .empty-scope{color:#718096;padding:12px}
@media(max-width:1100px){
 #users .user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #users .project-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v3.2.0 - clear company/project settings */
#settings .settings-company{padding:12px 14px;margin-bottom:12px}
#settings .settings-company-row{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:10px;align-items:end}
#settings .settings-hierarchy{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#settings .settings-level-card{background:#fff;border:1px solid #dbe4eb;border-radius:9px;padding:11px;min-width:0}
#settings .settings-level-head{min-height:42px;border-bottom:1px solid #edf1f4;margin-bottom:9px}
#settings .settings-level-head b{display:block;font-size:13px;color:#173a52}
#settings .settings-level-head small{display:block;color:#718596;font-size:9.5px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings .quick-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;margin-bottom:9px}
#settings .quick-add input{min-width:0;height:34px}
#settings .quick-add .btn{padding:6px 9px;min-height:34px;font-size:10px;white-space:nowrap}
#settings .quick-add .btn:disabled,#settings .quick-add input:disabled{opacity:.5;cursor:not-allowed}
#settings .settings-list{display:flex;flex-direction:column;gap:5px;max-height:340px;overflow-y:auto}
#settings .settings-item{display:flex;align-items:center;justify-content:space-between;gap:5px;border:1px solid #e1e7ec;border-radius:6px;padding:7px;background:#fafcfd;cursor:pointer}
#settings .settings-item.selected{border-color:#6f9fbe;background:#edf6fb}
#settings .settings-item.inactive{opacity:.55}
#settings .settings-item-name{font-size:10.5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#settings .settings-item-actions{display:flex;gap:3px;flex-shrink:0}
#settings .mini-action{border:0;background:#eaf0f4;color:#36566d;border-radius:4px;padding:3px 5px;font:inherit;font-size:8.5px;cursor:pointer}
#settings .settings-empty{padding:15px 5px;text-align:center;color:#8999a6;font-size:10px}
@media(max-width:1200px){#settings .settings-hierarchy{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v3.2.1 - stronger hierarchy selection context */
#settings .settings-path{
 margin:0 0 10px;padding:9px 12px;border:1px solid #cfe0eb;border-radius:7px;
 background:#f3f8fb;color:#31546c;font-size:11px;font-weight:700
}
#settings .settings-item.selected{
 border-width:2px;font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,.06)
}

/* v3.3.0 - My Account / password */
.accountlink{font-size:10px;color:#d8e8f3;cursor:pointer;margin-left:9px;padding-left:9px;border-left:1px solid rgba(255,255,255,.22)}
.accountlink:hover{color:#fff}
.password-card{max-width:430px}
.password-user{display:flex;flex-direction:column;margin-bottom:12px;padding:9px 10px;background:#f4f8fb;border-radius:6px}
.password-user span{font-weight:700;color:#294b63}
.password-user small{font-size:9.5px;color:#718392;margin-top:2px}
.password-card .field{margin-bottom:9px}
.password-rules{font-size:9.5px;color:#718392;margin-top:2px}

/* v3.3.1 - centered account modal */
body.modal-open{overflow:hidden!important}
.account-modal-backdrop{
 position:fixed;inset:0;z-index:9999;
 display:flex;align-items:center;justify-content:center;
 padding:24px;background:rgba(13,35,53,.42);
 backdrop-filter:blur(1px);
}
.account-modal-backdrop.hide{display:none!important}
.account-modal{
 width:min(430px,calc(100vw - 40px));
 background:#fff;border:1px solid #d9e2e9;border-radius:12px;
 box-shadow:0 20px 60px rgba(18,44,65,.24);
 overflow:hidden;direction:rtl
}
.account-modal-head{
 display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
 padding:16px 18px 12px;border-bottom:1px solid #e8edf1
}
.account-modal-head h2{margin:0;font-size:18px;color:#173a52}
.account-modal-sub{margin-top:4px;font-size:11px;color:#6e8191}
.account-modal-close{
 width:30px;height:30px;display:flex;align-items:center;justify-content:center;
 border:0;border-radius:6px;background:#f1f4f6;color:#435a6b;
 font-size:20px;line-height:1;cursor:pointer
}
.account-modal-close:hover{background:#e6ecef}
.account-modal-body{padding:16px 18px 8px}
.account-modal-body .field{margin-bottom:11px}
.account-modal-body .field input{height:38px}
.password-rules{font-size:10px;color:#718392;margin-top:2px}
.account-modal-actions{
 display:flex;gap:8px;justify-content:flex-start;
 padding:12px 18px 16px;border-top:1px solid #eef2f5;background:#fbfcfd
}
.account-modal-actions .btn{min-height:36px}

/* v3.4.0 workflow actions */
.pr-readonly{color:#334b5d;font-weight:800}
.workflow-action-col{text-align:center}
.workflow-btn{
 border:1px solid #ccd9e3;background:#f4f8fb;color:#285777;border-radius:6px;
 padding:5px 8px;font-size:9.5px;font-weight:700;cursor:pointer;white-space:nowrap
}
.workflow-btn:hover{background:#eaf3f8}
.purchasing-btn{border-color:#bfd6e7;background:#eef7fc;color:#176696}
.warehouse-btn{border-color:#c9ddcf;background:#f0f8f2;color:#2b7040}
.history-btn{background:#f7f8f9;color:#5d6f7e}
.workflow-admin-actions{display:flex;gap:3px;justify-content:center;flex-wrap:wrap}
.workflow-mini-status{
 margin-top:3px;font-size:8.5px;color:#728493;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.ops-help{
 margin:-2px 0 10px;padding:7px 9px;background:#f4f8fb;border-radius:6px;
 color:#587084;font-size:10px;line-height:1.5
}

/* v3.4.3 requester workflow */
.requester-btn{
 border-color:#c8d9eb;
 background:#f1f7fc;
 color:#245f8d;
}

/* v3.5.0 read-only roles */
.readonly-notice{
 margin:0 0 9px;padding:8px 11px;border:1px solid #d8e4ec;border-radius:7px;
 background:#f6f9fb;color:#536b7c;font-size:10.5px;font-weight:700
}

/* v3.5.1 FLOWIX branding */
.flowix-flow{color:#fff}
.flowix-ix{color:#079AF3}

/* v3.5.2 - FLOWIX screen branding */
.flowix-flow{color:#fff!important}
.flowix-ix{color:#079AF3!important}
.flowix-tracking{color:#dbe5ec!important;font-weight:400!important}

#entry .title,
#report .title,
#users .title,
#settings .title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
#entry .title::before,
#report .title::before,
#users .title::before,
#settings .title::before{
  content:"";
  display:block;
  width:78px;
  height:52px;
  flex:0 0 78px;
  background:url('/assets/flowix-logo.png') center/contain no-repeat;
  opacity:.96;
}
@media(max-width:900px){
  #entry .title::before,
  #report .title::before,
  #users .title::before,
  #settings .title::before{
    width:58px;height:40px;flex-basis:58px;
  }
}

/* v3.5.3 - stronger FLOWIX visual identity */
#entry .title::before,
#report .title::before,
#users .title::before,
#settings .title::before{
  width:112px!important;
  height:72px!important;
  flex:0 0 112px!important;
  background-size:contain!important;
  opacity:1!important;
}

/* Login screen branding */
.loginwrap{
  background:#eef3f7!important;
}
.login.card{
  background:#ffffff!important;
  border:1px solid #dbe3e9!important;
  box-shadow:0 12px 34px rgba(24,53,75,.10)!important;
}
.login-brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:0 0 18px;
  text-align:center;
}
.login-logo{
  width:148px;
  height:102px;
  object-fit:contain;
  display:block;
  margin:0 auto 4px;
}
.login-product-name{
  direction:ltr;
  font-size:27px;
  line-height:1.05;
  font-weight:800;
  letter-spacing:.2px;
}
.login-flow{color:#123a5b}
.login-ix{color:#079AF3}
.login-tracking{
  color:#607688;
  font-size:16px;
  font-weight:500;
  margin-left:5px;
}
.login-product-sub{
  margin-top:5px;
  color:#557083;
  font-size:11px;
  font-weight:700;
}
.login .field label{
  color:#243f54!important;
}
.login .field input{
  background:#fff!important;
  color:#183247!important;
  border-color:#cbd9e3!important;
}
.login .field input:focus{
  border-color:#2b78ad!important;
  box-shadow:0 0 0 2px rgba(43,120,173,.10)!important;
}
@media(max-width:900px){
  #entry .title::before,
  #report .title::before,
  #users .title::before,
  #settings .title::before{
    width:86px!important;
    height:56px!important;
    flex-basis:86px!important;
  }
  .login-logo{width:126px;height:88px}
}

/* v3.5.4 - screen logo positioned under FLOWIX Tracking on the right */
#entry,#report,#users,#settings{position:relative}
#entry .title::before,
#report .title::before,
#users .title::before,
#settings .title::before{
  display:none!important;
}
#entry::before,
#report::before,
#users::before,
#settings::before{
  content:"";
  position:absolute;
  top:10px;
  right:44px;
  width:96px;
  height:66px;
  background:url('/assets/flowix-logo.png') center/contain no-repeat;
  z-index:2;
  pointer-events:none;
}
#entry .title,
#report .title,
#users .title,
#settings .title{
  padding-right:0!important;
}
@media(max-width:1100px){
  #entry::before,#report::before,#users::before,#settings::before{
    right:28px;width:82px;height:56px;
  }
}

/* v3.5.4 - user management without page vertical scrolling */
body:has(#users:not(.hide)){overflow-y:hidden}
#users{
  min-height:calc(100vh - 96px);
  max-height:calc(100vh - 96px);
  overflow:hidden;
  padding-bottom:0!important;
}
#users .title{margin-bottom:8px!important}
#users .users-card{
  padding:10px 12px!important;
  max-height:calc(100vh - 150px);
  overflow:hidden;
}
#users .user-form-grid{gap:6px!important}
#users .user-form-grid .field label{font-size:10px}
#users .user-form-grid input,
#users .user-form-grid select{height:32px!important}
#users .user-scope-note{margin:3px 0 5px!important;font-size:9.5px!important}
#users .project-choices{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
  max-height:112px!important;
  overflow:hidden!important;
}
#users .project-choice{padding:5px!important}
#users .project-choice b{font-size:10px!important}
#users .project-choice small{font-size:8.5px!important}
#users .user-actions{margin-top:6px!important}
#users .section{margin-top:8px!important}
#users .users-tablebox{
  max-height:none!important;
  overflow:hidden!important;
}
#users .users-table th,#users .users-table td{
  padding:5px 6px!important;
  font-size:10px!important;
  height:34px;
}
.users-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:7px;
  direction:ltr;
}
.page-arrow{
  width:32px;height:30px;border:1px solid #ccd8e1;border-radius:6px;
  background:#f5f8fa;color:#244c68;font-size:19px;font-weight:700;cursor:pointer;
}
.page-arrow:disabled{opacity:.4;cursor:not-allowed}
#usersPageInfo{font-size:10px;color:#5f7382;min-width:50px;text-align:center}
@media(max-width:1200px){
  #users .project-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}


/* v3.5.5 - corrected screen logo position, no overlap with titles */
#entry,#report,#users,#settings{
  position:relative;
  padding-top:22px!important;
}
#entry::before,#report::before,#users::before,#settings::before{
  top:8px!important;
  right:54px!important;
  width:88px!important;
  height:60px!important;
  transform:none!important;
}
#entry .title,#report .title,#users .title,#settings .title{
  min-height:72px!important;
  box-sizing:border-box;
  padding-top:10px!important;
  padding-right:170px!important;
  margin-bottom:8px!important;
}
#entry .title > *,
#report .title > *,
#users .title > *,
#settings .title > *{
  max-width:calc(100% - 10px);
}
/* Keep the logo visually below and centered under the right-side FLOWIX Tracking brand,
   while reserving its own horizontal space so it cannot cover title/subtitle text. */
@media(max-width:1100px){
  #entry::before,#report::before,#users::before,#settings::before{
    right:34px!important;width:76px!important;height:52px!important;
  }
  #entry .title,#report .title,#users .title,#settings .title{
    padding-right:135px!important;
    min-height:64px!important;
  }
}

/* v3.5.6 - absolutely no vertical scrollbar on User Management */
html:has(#users:not(.hide)),
body:has(#users:not(.hide)){
  height:100vh!important;
  max-height:100vh!important;
  overflow-y:hidden!important;
  overscroll-behavior:none;
}
body:has(#users:not(.hide)) main{
  height:calc(100vh - 76px)!important;
  max-height:calc(100vh - 76px)!important;
  overflow:hidden!important;
}
#users:not(.hide){
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
  padding-top:8px!important;
  padding-bottom:4px!important;
}
#users:not(.hide) .title{
  min-height:58px!important;
  height:58px!important;
  margin:0 0 4px!important;
  padding-top:4px!important;
}
#users:not(.hide)::before{
  top:0!important;
  width:72px!important;
  height:50px!important;
}
#users:not(.hide) .users-card{
  height:calc(100% - 62px)!important;
  max-height:calc(100% - 62px)!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:7px 10px!important;
}
#users:not(.hide) .user-form-grid{gap:4px!important}
#users:not(.hide) .user-form-grid input,
#users:not(.hide) .user-form-grid select{height:29px!important}
#users:not(.hide) .user-scope-note{margin:1px 0 3px!important}
#users:not(.hide) .project-choices{
  max-height:72px!important;
  gap:3px!important;
}
#users:not(.hide) .project-choice{padding:3px 5px!important}
#users:not(.hide) .user-actions{margin-top:3px!important}
#users:not(.hide) .section{margin-top:4px!important}
#users:not(.hide) .section h3{margin:2px 0 4px!important}
#users:not(.hide) .users-table th,
#users:not(.hide) .users-table td{
  padding:3px 5px!important;
  height:29px!important;
  line-height:1.15!important;
}
#users:not(.hide) .users-pagination{margin-top:4px!important}
#users:not(.hide) .page-arrow{height:26px!important;width:30px!important}

/* v3.5.7 - English digits for all numeric/financial fields */
input[type="number"],
input[inputmode="decimal"],
input[inputmode="numeric"],
.money,
.report-total,
#quoteValue,
#companyRate,
#companyProfit,
#actualCost,
#vatRate,
#vat,
#total{
  direction:ltr!important;
  unicode-bidi:embed;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
  text-align:right;
}

/* v3.5.8 - true Latin digit rendering in Arabic UI */
#quoteValue,#companyRate,#companyProfit,#actualCost,#vatRate,#vat,#total{
  direction:ltr!important;
  text-align:right!important;
  font-family:Arial, "Segoe UI", sans-serif!important;
  font-variant-numeric:tabular-nums!important;
}

/* v3.5.9 - FLOWIX unified brand color */
.flowix-ix,
.login-ix{
  color:#079AF3!important;
}

/* Stage 6.2 - login/password usability */
.password-input-wrap{position:relative;display:flex;align-items:center}
.password-input-wrap input{width:100%;padding-left:42px}
.password-toggle{position:absolute;left:6px;border:0;background:transparent;cursor:pointer;font-size:16px;padding:5px 7px;color:#506b7c}
.remember-login{display:flex;align-items:center;gap:7px;margin:9px 0 12px;font-size:11px;color:#526b7a;cursor:pointer}
.remember-login input{width:auto;margin:0}
.login-credit{text-align:center;margin-top:13px;font-size:10px;color:#718392;font-weight:600;letter-spacing:.15px}
.users-search-panel{margin:10px 0 12px;padding:10px 12px;background:#f4f8fb;border:1px solid #d6e2eb;border-radius:8px}
.users-search-panel>label{display:block;margin-bottom:7px;font-size:11px;font-weight:800;color:#244c68}
.users-searchbar{display:flex;align-items:center;gap:12px}
.users-searchbar input{flex:1;min-width:250px;border:2px solid #9eb8ca!important;background:#fff!important}
.users-result-count{white-space:nowrap;font-size:10px;font-weight:800;color:#526b7a;min-width:75px;text-align:center}
.user-row-actions{display:flex;align-items:center;justify-content:center;gap:5px}
.btn.danger,.mini-action.danger{background:#fff1f1!important;color:#a92828!important;border:1px solid #e7bcbc!important}
.btn.danger:hover,.mini-action.danger:hover{background:#ffe3e3!important}

/* Stage 7.0 - PR request creation */
.pr-create-card{max-width:1450px;margin:auto}
.pr-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0 18px}
.pr-item-entry{display:grid;grid-template-columns:minmax(300px,2.3fr) 130px 170px auto;gap:10px;align-items:end;margin:12px 0}
.pr-add-item-btn{height:41px;white-space:nowrap}
.pr-items-tablebox{margin-top:10px}
.pr-items-table{font-size:12px}
.pr-items-table th,.pr-items-table td{padding:8px}
.pr-items-empty{text-align:center;color:#718096;padding:20px}
.pr-create-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}
.pr-saved-info{margin-top:12px;padding:10px 12px;background:#eef7ff;border:1px solid #c8ddec;border-radius:8px;color:#244c68;font-weight:700}
.pr-remove-item{padding:5px 9px!important;font-size:10px!important}
@media(max-width:1000px){.pr-form-grid{grid-template-columns:repeat(2,1fr)}.pr-item-entry{grid-template-columns:1fr 120px 140px}.pr-add-item-btn{grid-column:1/-1}}

/* Stage 7.2 — Login UI Refresh (visual only) */
.loginwrap{
  position:relative!important;
  min-height:100vh!important;
  display:grid!important;
  place-items:center!important;
  padding:34px 18px!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 22% 20%,rgba(7,154,243,.08),transparent 32%),
    radial-gradient(circle at 82% 77%,rgba(18,58,91,.06),transparent 34%),
    linear-gradient(135deg,#f8fbfe 0%,#edf5fb 48%,#f7fbfe 100%)!important;
}
.loginwrap::before,
.loginwrap::after{
  content:"";
  position:absolute;
  width:64vw;
  height:180px;
  opacity:.34;
  pointer-events:none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 5px,
      rgba(7,154,243,.23) 5.5px 6px
    );
  border-radius:50%;
  filter:blur(.1px);
}
.loginwrap::before{top:-72px;right:-15vw;transform:rotate(8deg)}
.loginwrap::after{bottom:-78px;left:-18vw;transform:rotate(-8deg)}

.login-bg-dots{
  position:absolute;
  width:110px;height:110px;
  opacity:.5;
  pointer-events:none;
  background-image:radial-gradient(circle,#079AF3 2.4px,transparent 2.6px);
  background-size:18px 18px;
}
.login-bg-dots-a{top:28px;left:28px}
.login-bg-dots-b{right:38px;bottom:30px}

.login.card.login-modern{
  position:relative;
  z-index:2;
  width:min(520px,94vw)!important;
  padding:34px 38px 25px!important;
  border:1px solid rgba(183,204,220,.82)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 25px 70px rgba(39,82,116,.15)!important;
  backdrop-filter:blur(5px);
}
.login-brand-modern{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  margin-bottom:28px;
}
.login-logo-modern{
  display:block;
  width:188px;
  height:122px;
  object-fit:contain;
  margin:0 auto 3px;
}
.login-title-ar{
  color:#123a5b;
  font-size:22px;
  font-weight:900;
  line-height:1.4;
  margin-top:1px;
}
.login-title-en{
  direction:ltr;
  color:#667d91;
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:13px;
  font-weight:500;
  margin-top:5px;
  letter-spacing:.08px;
}
.login-fields-modern{display:grid;gap:15px}
.login-field-modern{margin:0!important}
.login-field-modern>label{
  display:block;
  margin:0 0 7px!important;
  color:#183f60!important;
  font-size:12px!important;
  font-weight:800!important;
}
.login-input-shell{
  position:relative;
  display:flex;
  align-items:center;
}
.login-input-shell>input{
  width:100%!important;
  height:52px!important;
  padding:0 46px 0 44px!important;
  border:1.5px solid #c6d8e6!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#17364f!important;
  font-size:14px!important;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.login-input-shell>input:focus{
  outline:none!important;
  border-color:#079AF3!important;
  box-shadow:0 0 0 4px rgba(7,154,243,.09)!important;
}
.login-input-icon{
  position:absolute;
  right:14px;
  width:21px;height:21px;
  display:grid;place-items:center;
  color:#68839a;
  pointer-events:none;
  z-index:2;
}
.login-input-icon svg{
  width:21px;height:21px;
  fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
}
.login-eye-modern{
  left:10px!important;
  right:auto!important;
  width:30px!important;height:30px!important;
  display:grid!important;place-items:center!important;
  padding:0!important;
  color:#68839a!important;
}
.remember-modern{
  width:max-content;
  margin:13px 0 13px auto!important;
  gap:8px!important;
  color:#60768a!important;
  font-size:11px!important;
}
.remember-modern input{accent-color:#1777b9}
.login-submit-modern{
  display:block!important;
  width:100%!important;
  height:48px!important;
  border:0!important;
  border-radius:9px!important;
  background:linear-gradient(180deg,#2181c3,#1268a8)!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:800!important;
  box-shadow:0 8px 20px rgba(18,104,168,.17)!important;
  transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;
}
.login-submit-modern:hover{filter:brightness(1.04);box-shadow:0 10px 24px rgba(18,104,168,.22)!important}
.login-submit-modern:active{transform:translateY(1px)}
.login-error-modern{min-height:16px;text-align:center;margin-top:8px!important}
.login-secure-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:12px 0 10px;
  color:#a9bbc9;
}
.login-secure-divider::before,.login-secure-divider::after{
  content:"";height:1px;background:#dce6ed;flex:1;
}
.login-secure-divider span{
  width:24px;height:24px;display:grid;place-items:center;
  border:1px solid #d2dee7;border-radius:50%;
  font-size:13px;color:#8ca4b7;
}
.login-meta{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:9px;
  direction:ltr;
  color:#61788c;
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:10px;
  font-weight:600;
}
.login-meta i{
  width:1px;height:12px;background:#d3dee7;display:inline-block;
}
.login-credit-modern{
  margin-top:7px!important;
  color:#6c8192!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:10px!important;
  font-weight:500!important;
}
.login-credit-modern strong{color:#496579;font-weight:700}
@media(max-width:600px){
  .login.card.login-modern{padding:26px 20px 20px!important;border-radius:16px!important}
  .login-logo-modern{width:160px;height:104px}
  .login-title-ar{font-size:19px}
  .login-title-en{font-size:11px}
  .login-input-shell>input{height:49px!important}
  .login-bg-dots{opacity:.28}
}

/* Stage 7.2.2 — Login visual polish only */
.login-logo-modern{
  width:226px!important;
  height:146px!important;
  margin-bottom:2px!important;
}
.login-meta{
  font-size:12px!important;
  color:#5a7185!important;
  gap:10px!important;
}
.login-credit-modern{
  margin-top:9px!important;
  font-size:12px!important;
  color:#6a7d8d!important;
}
.login-credit-modern strong{
  color:#123a5b!important;
  font-weight:800!important;
}
@media(max-width:600px){
  .login-logo-modern{
    width:190px!important;
    height:123px!important;
  }
  .login-meta{font-size:11px!important}
  .login-credit-modern{font-size:11px!important}
}

/* Stage 7.2.3 — Login visibility fix */
.loginwrap.hide{
  display:none!important;
}

/* Stage 7.3 — User management and reporting */
.users-title-actions{display:flex;gap:8px;align-items:center}
.user-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 12px}
.user-kpi{background:#fff;border:1px solid #dce6ee;border-radius:10px;padding:12px 14px;box-shadow:0 5px 15px rgba(33,69,96,.05)}
.user-kpi span{display:block;color:#718393;font-size:10px;font-weight:700;margin-bottom:5px}
.user-kpi b{font-size:21px;color:#123a5b}
.users-list-card{padding:12px!important}
.users-list-toolbar{display:flex;align-items:end;gap:10px;margin-bottom:10px}
.users-search-panel-inline{flex:1;margin:0!important;padding:8px 10px!important}
.users-clear-filter-btn{height:38px;white-space:nowrap}
.users-table th,.users-table td{vertical-align:middle}
.users-table .department-cell{white-space:nowrap}
.users-table .scope-cell{max-width:300px}
.user-report-panel{margin-bottom:12px;padding:13px!important}
.user-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.user-panel-head h2,.user-panel-head b{margin:0;color:#123a5b}
.user-panel-head small{display:block;color:#718393;font-size:10px;margin-top:3px}
.user-panel-actions{display:flex;gap:6px;align-items:center}
.user-report-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.user-report-filters .field label{font-size:9px}
.user-report-filters select{height:34px}
.user-form-modal{width:min(980px,96vw)!important;max-height:92vh;overflow:auto}
#userFormPanel{z-index:40}
.user-scope-summary{display:inline-flex;align-items:center;gap:5px}
.user-scope-count{display:inline-block;padding:3px 7px;border-radius:12px;background:#edf5fb;color:#245d85;font-size:10px;font-weight:800}
@media(max-width:1100px){.user-report-filters{grid-template-columns:repeat(3,1fr)}.user-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.user-report-filters{grid-template-columns:1fr}.user-kpis{grid-template-columns:1fr 1fr}.users-title-actions{flex-wrap:wrap}.users-list-toolbar{flex-direction:column;align-items:stretch}}

/* Stage 7.3.1 — reporting, branding, pagination */
.pr-register-actions{display:flex;flex-direction:column;align-items:center;gap:4px}
.pr-print-mini{border:0;background:transparent;color:#1769aa;font-size:9px;font-weight:800;cursor:pointer;padding:2px 5px}
.pr-print-mini:hover{text-decoration:underline}
.users-pagination{display:flex!important;justify-content:center;align-items:center;gap:14px;margin-top:10px}
.users-pagination .page-arrow{width:38px!important;height:32px!important;font-size:21px!important;font-weight:800!important}
#usersPageInfo{min-width:110px;text-align:center;font-weight:800;color:#36566f}
.company-branding-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr auto;gap:12px;align-items:end}
.company-logo-setting{display:flex;align-items:center;gap:12px;border:1px solid #dce6ee;border-radius:9px;padding:7px 10px;background:#f8fbfd}
.company-logo-setting img{width:92px;height:54px;object-fit:contain;background:#fff;border-radius:6px}
.company-logo-setting small{display:block;font-size:9px;color:#718393;margin-top:5px}
.company-logo-upload-btn{display:inline-block;cursor:pointer}
.company-brand-save{height:39px;white-space:nowrap}
.system-maintenance-card{margin-top:12px}
.maintenance-row{display:flex;justify-content:space-between;align-items:center;gap:18px}
.maintenance-row b{display:block;color:#8b2525;margin-bottom:4px}
.maintenance-row small{display:block;color:#718393;max-width:720px}
@media(max-width:1000px){.company-branding-grid{grid-template-columns:1fr 1fr}.maintenance-row{align-items:flex-start;flex-direction:column}}

/* Stage 7.4 — Procurement processing & PR consolidation */
.procurement-modal{width:min(1040px,97vw)!important;max-height:92vh;overflow:auto}
.proc-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.proc-modal-head h2{margin:0 0 4px;color:#123a5b}
.proc-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}
.proc-info-box{border:1px solid #d9e5ee;border-radius:9px;background:#f7fbfe;padding:9px 12px}
.proc-info-box span{display:block;font-size:9px;color:#708393}.proc-info-box b{display:block;margin-top:3px;color:#244c68}
.proc-note{font-size:10px;color:#687d8e;margin:6px 0 10px}
.proc-request-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:230px;overflow:auto;padding:4px}
.proc-request-choice{display:flex;align-items:flex-start;gap:9px;border:1px solid #dce6ed;background:#fff;border-radius:8px;padding:9px;cursor:pointer}
.proc-request-choice:hover{background:#f5faff}.proc-request-choice input{margin-top:4px}
.proc-request-choice b{display:block;color:#1d4968;font-size:11px}.proc-request-choice small{display:block;color:#748695;font-size:9px;margin-top:3px}
.proc-items-box{max-height:230px;overflow:auto;margin-bottom:12px}
.proc-items-box table{font-size:11px}
.proc-group-prs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.proc-group-prs span{background:#eef6fb;border:1px solid #cfe0ec;border-radius:15px;padding:5px 9px;color:#285978;font-size:10px;font-weight:800}
.proc-quote-rows{display:grid;gap:8px}
.proc-quote-row{display:grid;grid-template-columns:55px 1fr 220px;gap:9px;align-items:end;border:1px solid #dce6ed;border-radius:9px;padding:9px;background:#fafcfe}
.proc-quote-no{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eaf4fb;color:#1769aa;font-weight:900;margin:auto}
@media(max-width:700px){.proc-grid,.proc-request-choices{grid-template-columns:1fr}.proc-quote-row{grid-template-columns:45px 1fr}.proc-quote-row .quote-value-field{grid-column:2}}

/* Stage 7.4.1 — configurable workflow, transactions, header, maintenance */
.userbox-modern{display:grid!important;grid-template-columns:34px auto;grid-template-areas:"avatar identity" "quick quick";column-gap:8px;row-gap:4px;align-items:center;min-width:220px}
.user-avatar{grid-area:avatar;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);font-weight:900;font-size:14px}
.user-identity{grid-area:identity;min-width:0}.user-identity .username{font-size:12px;font-weight:900}.user-identity .roleline{font-size:9px;opacity:.8;margin-top:1px}
.user-quick{grid-area:quick;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.server-chip,.account-chip,.logout-chip{font-size:9px!important;padding:2px 7px;border-radius:10px;background:rgba(255,255,255,.08);margin:0!important}
.account-chip,.logout-chip{cursor:pointer}.logout-chip{color:#ffd6d6!important}
.workflow-config-card{margin-bottom:12px}.workflow-config-note{font-size:10px;color:#718393;margin-bottom:10px}
.workflow-config-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.workflow-config-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #dce6ee;border-radius:9px;padding:9px 11px;background:#fafcfe}
.workflow-config-row span b{display:block;color:#244d69;font-size:11px}.workflow-config-row span small{display:block;color:#718393;font-size:9px;margin-top:2px}
.workflow-config-row select{width:135px;height:34px}
.maintenance-sequence{background:#fff7e8;border:1px solid #efd8ab;color:#795a20;border-radius:8px;padding:8px 10px;font-size:10px;font-weight:800;margin-bottom:10px}
.maintenance-actions{display:grid;gap:8px}.maintenance-actions .maintenance-row{border-bottom:1px solid #e6edf2;padding:8px 0}.maintenance-actions .maintenance-row:last-child{border-bottom:0}
.transactions-modal{width:min(720px,95vw)!important}.transaction-current{background:#eef6fb;border:1px solid #cfdfeb;border-radius:8px;padding:10px;color:#285978;font-weight:800;margin-bottom:10px}
.users-page-size-label{display:inline-flex;align-items:center;gap:5px;font-size:9px;color:#607789}.users-page-size-label select{height:28px;border:1px solid #ccd9e3;border-radius:6px}
@media(max-width:850px){.workflow-config-grid{grid-template-columns:1fr}.userbox-modern{min-width:190px}}

/* Stage 7.4.2 */
.purchasing-new-box{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#eef7fd;border:1px solid #c8e1f2;border-radius:9px;padding:9px 12px;margin-bottom:5px;color:#245a7b;font-size:10px;font-weight:800;cursor:pointer}
.purchasing-new-box b{min-width:34px;height:28px;border-radius:14px;background:#fff;display:grid;place-items:center;font-size:13px}
.quote-calc-row{display:grid!important;grid-template-columns:42px minmax(180px,2fr) repeat(7,minmax(115px,1fr));gap:8px;align-items:end}
.quote-calc-row .proc-quote-no{align-self:center}.quote-calc-row .field{min-width:0}.quote-calc-row input{width:100%}
.quote-calc-row .auto-field input,.quote-calc-row .quote-total-field input{background:#f3f7fa;font-weight:800}.quote-calc-row .quote-total-field input{font-size:13px}
.delivery-modal{width:min(1100px,96vw)!important}.delivery-po-card{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:8px 12px;background:#eef6fb;border:1px solid #cfdfeb;border-radius:8px;padding:10px;margin-bottom:12px}
.delivery-po-card span{color:#607789;font-size:10px}.delivery-po-card b{color:#173f5b;font-size:11px}
.delivery-table input{width:95px;text-align:center;padding:7px;border:1px solid #cbd9e3;border-radius:6px}
@media(max-width:1100px){.quote-calc-row{grid-template-columns:42px repeat(2,minmax(160px,1fr))}.delivery-po-card{grid-template-columns:1fr 1fr}}

/* Stage 7.4.2.1 — workflow/users/header usability */
.users-list-toolbar{align-items:center!important;justify-content:flex-start!important;gap:12px!important}
.users-search-panel-inline{flex:0 1 520px!important;width:min(520px,100%)!important;margin:0!important;padding:10px 12px!important}
.users-searchbar input{height:46px!important;min-height:46px!important;max-width:430px!important;flex:1 1 430px!important;padding:10px 13px!important;font-size:12px!important}
.users-pagination{display:flex!important;visibility:visible!important;opacity:1!important;min-height:54px!important;padding:10px 12px!important;margin:12px 0 2px!important;border-top:1px solid #d7e3ec!important;background:#f7fafc!important;border-radius:0 0 8px 8px!important;position:relative!important;z-index:2!important}
.users-pagination .page-nav-btn{display:inline-flex!important;visibility:visible!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:auto!important;min-width:105px!important;height:38px!important;padding:0 13px!important;border:1px solid #9fb8ca!important;background:#fff!important;color:#173f5b!important;border-radius:7px!important;font-size:11px!important;font-weight:900!important}
.users-pagination .page-nav-btn span{font-size:20px!important;line-height:1!important}
.users-pagination .page-nav-btn:disabled{display:inline-flex!important;visibility:visible!important;opacity:.42!important;cursor:not-allowed!important}
#usersPageInfo{font-size:11px!important;min-width:125px!important}
.users-page-size-label{font-size:10px!important;font-weight:800!important}.users-page-size-label select{height:34px!important}
.userbox-modern .username{font-size:14px!important;font-weight:900!important;line-height:1.35!important}
.userbox-modern .roleline{font-size:11px!important;font-weight:700!important;line-height:1.35!important}
.userbox-modern .server-chip,.userbox-modern .account-chip,.userbox-modern .logout-chip{font-size:10.5px!important;font-weight:800!important}
.userbox-modern .user-quick{gap:8px!important}
@media(max-width:760px){.users-search-panel-inline{flex:1 1 100%!important;width:100%!important}.users-searchbar input{max-width:none!important}.users-pagination{flex-wrap:wrap!important}}

/* Stage 7.4.2.2 — quotation layout + purchasing focus filter */
#procurementQuotesModal .modal{width:min(1180px,96vw)!important;max-width:1180px!important;overflow-x:hidden!important}
#procurementQuotesModal .tablebox{overflow-x:auto}
#procQuoteRows{display:flex!important;flex-direction:column!important;gap:12px!important}
#procQuoteRows .quote-calc-row{
 display:grid!important;
 grid-template-columns:44px minmax(240px,2fr) minmax(150px,1fr) minmax(130px,.85fr) minmax(155px,1fr)!important;
 grid-template-areas:
   "no supplier base companyrate companyvalue"
   "no supplier beforevat vatrate vatvalue"
   "no supplier total total total"!important;
 gap:9px 11px!important;align-items:end!important;
 padding:14px!important;border:1px solid #d5e3ed!important;border-radius:11px!important;background:#fbfdff!important
}
#procQuoteRows .proc-quote-no{grid-area:no!important;align-self:stretch!important;display:grid!important;place-items:center!important;background:#eaf4fb!important;border-radius:9px!important;font-size:16px!important;font-weight:900!important;color:#17689b!important}
#procQuoteRows .quote-supplier-field{grid-area:supplier!important}
#procQuoteRows .proc-quote-base{grid-area:auto}
#procQuoteRows .field:has(.proc-quote-base){grid-area:base!important}
#procQuoteRows .field:has(.proc-quote-company-rate){grid-area:companyrate!important}
#procQuoteRows .field:has(.proc-quote-company-value){grid-area:companyvalue!important}
#procQuoteRows .field:has(.proc-quote-before-vat){grid-area:beforevat!important}
#procQuoteRows .field:has(.proc-quote-vat-rate){grid-area:vatrate!important}
#procQuoteRows .field:has(.proc-quote-vat-value){grid-area:vatvalue!important}
#procQuoteRows .quote-total-field{grid-area:total!important}
#procQuoteRows .field{min-width:0!important;margin:0!important}
#procQuoteRows .field label{display:block!important;white-space:normal!important;line-height:1.35!important;margin-bottom:5px!important;font-size:10.5px!important}
#procQuoteRows input{height:42px!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
#procQuoteRows .quote-total-field{background:#eef7fd!important;border:1px solid #c6e0f1!important;border-radius:8px!important;padding:8px 10px!important}
#procQuoteRows .quote-total-field label{font-weight:900!important;color:#15577f!important}
#procQuoteRows .quote-total-field input{font-size:16px!important;font-weight:900!important;color:#123f5d!important;background:#fff!important}
#procurementQuotesModal .proc-note{white-space:normal!important;line-height:1.6!important}
#procurementQuotesModal .modalactions{position:sticky!important;bottom:0!important;background:#fff!important;padding-top:10px!important;z-index:3!important}

/* Main purchasing work filter: intentionally prominent because it is the daily operational filter. */
#filterProcurementWork{
 border:2px solid #d89b1d!important;
 background:#fff8df!important;
 color:#6d4b00!important;
 font-weight:900!important;
 box-shadow:0 0 0 3px rgba(216,155,29,.10)!important;
}
#filterProcurementWork:focus{outline:none!important;box-shadow:0 0 0 4px rgba(216,155,29,.20)!important}
#filterProcurementWork option{background:#fff!important;color:#173f5b!important}
@media(max-width:900px){
 #procQuoteRows .quote-calc-row{
  grid-template-columns:40px 1fr 1fr!important;
  grid-template-areas:
   "no supplier supplier"
   "no base companyrate"
   "no companyvalue beforevat"
   "no vatrate vatvalue"
   "no total total"!important;
 }
}
@media(max-width:600px){
 #procQuoteRows .quote-calc-row{
  grid-template-columns:38px 1fr!important;
  grid-template-areas:
   "no supplier"
   "no base"
   "no companyrate"
   "no companyvalue"
   "no beforevat"
   "no vatrate"
   "no vatvalue"
   "no total"!important;
 }
}

/* Stage 7.4.2.3 — QT reference + warehouse receipt UX */
.qt-cell{font-family:Arial,"Segoe UI",sans-serif!important;font-weight:800!important;color:#17689b!important;direction:ltr!important}
.transaction-ref-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f4f9fc;border:1px solid #d4e5ef;border-radius:8px;padding:8px 11px;margin:8px 0 12px}
.transaction-ref-row span{font-size:10px;color:#647b8c}.transaction-ref-row b{font-family:Arial,"Segoe UI",sans-serif;color:#17689b;direction:ltr}
#receiptModal .delivery-modal{width:min(1120px,96vw)!important;max-height:92vh!important;overflow:auto!important}
.receipt-reference-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:8px 0 14px}
.receipt-reference-card>div{background:#f5f9fc;border:1px solid #d8e5ed;border-radius:9px;padding:9px 11px}
.receipt-reference-card span{display:block;font-size:9px;color:#6c8190;margin-bottom:4px}.receipt-reference-card b{display:block;font-size:12px;color:#173f5b;word-break:break-word}
#receiptQT,#receiptPO{direction:ltr;font-family:Arial,"Segoe UI",sans-serif!important;color:#17689b!important}
#receiptModal .tablebox{overflow-x:auto!important;border:1px solid #d8e4ec!important;border-radius:9px!important}
#receiptModal .delivery-table{min-width:880px!important;width:100%!important;border-collapse:separate!important;border-spacing:0!important}
#receiptModal .delivery-table thead th{position:sticky!important;top:0!important;background:#edf5fa!important;color:#244d68!important;z-index:1!important;padding:10px 8px!important;font-size:10px!important}
#receiptModal .delivery-table tbody td{padding:10px 8px!important;vertical-align:middle!important;border-bottom:1px solid #e6edf2!important}
#receiptModal .delivery-table tbody tr:nth-child(even){background:#fafcfe!important}
#receiptModal .delivery-table tbody tr:hover{background:#f2f8fc!important}
#receiptModal .receipt-now{height:40px!important;width:110px!important;border:2px solid #92b8d1!important;background:#fff!important;font-size:13px!important;font-weight:800!important}
#receiptModal .receipt-now:focus{outline:none!important;border-color:#1688cc!important;box-shadow:0 0 0 3px rgba(22,136,204,.12)!important}
#receiptModal .receipt-now:disabled{background:#edf1f4!important;border-color:#d8e0e5!important}
#receiptModal .receipt-remaining{font-weight:900!important;color:#9b6410!important}
#receiptModal #receiptNotes{min-height:72px!important}
#receiptModal .modalactions{position:sticky!important;bottom:0!important;background:#fff!important;padding:10px 0 2px!important;border-top:1px solid #e2eaf0!important}
@media(max-width:720px){.receipt-reference-card{grid-template-columns:1fr!important}}

/* Stage 7.4.2.4 — role-focused operational filters */
#filterProcurementWork{border:1px solid #ccd6e0!important;background:#fff!important;color:#172333!important;font-weight:400!important;box-shadow:none!important}
.role-filter-primary,#filterProcurementWork.role-filter-primary{
 border:2px solid #d89b1d!important;background:#fff8df!important;color:#6d4b00!important;font-weight:900!important;
 box-shadow:0 0 0 3px rgba(216,155,29,.10)!important
}
.role-filter-primary:focus,#filterProcurementWork.role-filter-primary:focus{outline:none!important;box-shadow:0 0 0 4px rgba(216,155,29,.20)!important}
.role-action-box{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f7f4e8;border:1px solid #e5d69c;border-radius:9px;padding:9px 12px;margin-bottom:5px;color:#69581c;font-size:10px;font-weight:800;cursor:pointer}
.role-action-box b{min-width:34px;height:28px;border-radius:14px;background:#fff;display:grid;place-items:center;font-size:13px}

/* Stage 7.4.3.0 — Sticky FLOWIX header + Item Master */
header .brand{flex:0 0 auto}
table thead th{position:sticky;top:68px;z-index:30}
.modal table thead th{top:0}
.pr-stock-actions{display:flex;align-items:center;gap:12px;margin:8px 0 12px;flex-wrap:wrap}
.item-master-filters{grid-template-columns:2fr 1fr 1fr 1fr!important}
.item-import-label{display:inline-flex;align-items:center}
.item-code{font-family:Arial,"Segoe UI",sans-serif;direction:ltr;color:#1769aa;font-size:9px;font-weight:800;margin-bottom:3px}
.item-picker-box{width:min(1150px,96vw)!important;max-height:92vh!important;overflow:auto!important}
.item-picker-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:8px;margin:10px 0}
.item-picker-filters input,.item-picker-filters select{width:100%;padding:9px;border:1px solid #ccd6e0;border-radius:7px}
.item-picker-table{max-height:55vh;overflow:auto!important}
.item-picker-table .pick-qty{width:90px;min-height:36px;border:1px solid #b8c8d5;border-radius:6px;padding:6px}
.item-import-box{width:min(1050px,96vw)!important;max-height:92vh!important;overflow:auto!important}
@media(max-width:850px){.item-picker-filters,.item-master-filters{grid-template-columns:1fr 1fr!important}header{padding:0 2%}}

/* Stage 7.4.3.1 — User Management redesign */
html:has(#users:not(.hide)),body:has(#users:not(.hide)){height:auto!important;max-height:none!important;overflow-y:auto!important}
body:has(#users:not(.hide)) main{height:auto!important;max-height:none!important;overflow:visible!important}
#users:not(.hide){height:auto!important;max-height:none!important;overflow:visible!important;padding:18px 0 28px!important}
#users:not(.hide)::before{display:none!important}
#users .users-page-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
#users .users-heading{display:flex;align-items:center;gap:12px}
#users .users-heading h1{font-size:23px;color:#143d5c;margin:0}
#users .users-heading-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#edf6ff;color:#1378c7;font-size:24px;border:1px solid #d2e8f8}
#users .users-title-actions{display:flex;gap:9px;flex-wrap:wrap}
#users .users-title-actions .btn{height:40px;padding:0 17px}
#users .user-kpis-modern{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;margin-bottom:14px!important}
#users .user-kpis-modern .user-kpi{min-height:86px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:14px!important;padding:14px 16px!important;border:1px solid #d9e5ee!important;border-radius:12px!important;background:#fff!important}
#users .user-kpi-icon{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:23px;font-weight:800}
#users .user-kpi-icon.total{background:#edf6ff;color:#1672c4}.user-kpi-icon.admin{background:#f3edff;color:#7655ce}.user-kpi-icon.active{background:#eefaf2;color:#249b58}.user-kpi-icon.inactive{background:#fff1f1;color:#d34b4b}
#users .user-kpi span{display:block!important;font-size:10px!important;color:#637789!important;margin:0 0 4px!important}
#users .user-kpi b{display:inline-block!important;font-family:Arial,"Segoe UI",sans-serif!important;font-size:23px!important;color:#123e60!important;line-height:1!important}
#users .user-kpi small{font-size:9px;color:#8292a0;margin-right:5px}
#users .user-filter-card{display:block!important;margin-bottom:14px!important;padding:13px!important}
#users .users-search-row{display:flex;align-items:end;gap:12px;margin-bottom:11px}
#users .users-search-panel-inline{flex:1!important;max-width:none!important;width:auto!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important}
#users .users-search-panel-inline>label{font-size:10px;font-weight:800;color:#37546b;margin-bottom:5px;display:block}
#users .users-searchbar input{max-width:none!important;width:100%!important;height:44px!important;background:#fff!important}
#users .users-result-count{min-width:80px!important;text-align:center!important}
#users .users-clear-filter-btn{height:44px!important;min-width:120px!important}
#users .user-report-filters-main{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:9px!important}
#users .user-report-filters-main .field{margin:0!important}
#users .user-report-filters-main label{font-size:9.5px!important;margin-bottom:4px!important}
#users .user-report-filters-main select{height:38px!important;min-height:38px!important}
#users .users-list-card{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:0!important;border-radius:12px!important}
#users .users-tablebox{max-height:none!important;overflow:auto!important;border:0!important;border-radius:12px 12px 0 0!important}
#users .users-table-modern{min-width:1180px!important;font-size:10px!important}
#users .users-table-modern thead th{position:sticky!important;top:68px!important;z-index:8!important;padding:11px 8px!important;background:#123f63!important}
#users .users-table-modern tbody td{padding:9px 8px!important;height:52px!important;vertical-align:middle!important;line-height:1.3!important}
#users .user-account-cell{display:flex!important;align-items:center!important;gap:8px!important;text-align:right!important}
#users .user-account-cell b{display:block;color:#1267aa;font-size:10.5px}
#users .user-account-cell small{display:block;color:#8a9aa7;font-size:8.5px;margin-top:2px}
#users .user-mini-avatar{width:28px;height:28px;flex:0 0 28px;border-radius:50%;display:grid;place-items:center;background:#edf6ff;border:1px solid #cfe4f5;color:#1769aa;font-weight:900;font-size:11px}
#users .user-fullname{text-align:right!important;font-weight:700;color:#344f63}
#users .user-role-badge{display:inline-block;padding:5px 9px;border-radius:5px;color:#fff;font-size:9px;font-weight:800;white-space:nowrap;background:#60758a}
#users .role-admin{background:#174a75}.role-program_manager{background:#345e84}.role-site_manager{background:#7b4dcc}.role-purchasing{background:#1684d6}.role-transactions{background:#516f8d}.role-warehouse{background:#239357}.role-requester{background:#df7d16}.role-region{background:#586ab5}.role-finance{background:#5f7382}.role-viewer{background:#778899}
#users .user-status-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:12px;font-size:9px;font-weight:800}
#users .user-status-pill i{width:6px;height:6px;border-radius:50%}.user-status-pill.active{background:#edf9f0;color:#238448}.user-status-pill.active i{background:#27ad59}.user-status-pill.inactive{background:#fff0f0;color:#c74343}.user-status-pill.inactive i{background:#df4d4d}
#users .last-login-cell{font-family:Arial,"Segoe UI",sans-serif!important;font-size:9px!important;color:#5b7080;direction:ltr!important}
#users .user-row-actions-modern{display:flex;align-items:center;justify-content:center;gap:6px}
#users .user-icon-btn{width:32px;height:30px;border:1px solid #b7d6ee;border-radius:6px;background:#fff;color:#1773b8;cursor:pointer;font-size:16px}
#users .user-more-menu{position:relative}.user-more-menu summary{list-style:none;width:32px;height:30px;border:1px solid #d4dee6;border-radius:6px;background:#fff;display:grid;place-items:center;cursor:pointer;font-size:18px}.user-more-menu summary::-webkit-details-marker{display:none}
#users .user-more-pop{position:absolute;left:0;top:34px;z-index:50;min-width:145px;background:#fff;border:1px solid #d6e1e9;border-radius:7px;box-shadow:0 8px 22px #0002;padding:5px}
#users .user-more-pop button,#users .user-more-pop span{display:block;width:100%;border:0;background:transparent;text-align:right;padding:7px 8px;font-size:9px;cursor:pointer;color:#334f62}.user-more-pop button:hover{background:#f3f7fa}.user-more-pop .danger-text{color:#c23c3c!important}
#users .users-pagination-modern{display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center!important;gap:12px!important;padding:11px 13px!important;margin:0!important;background:#fbfcfd!important;border-top:1px solid #e0e8ee!important;direction:rtl!important;min-height:58px!important}
#users .users-page-size-wrap{display:flex;align-items:center;gap:12px;justify-self:start;color:#617786;font-size:9.5px}.users-page-size-wrap label{display:flex;align-items:center;gap:6px}.users-page-size-wrap select{height:32px;border:1px solid #ccd9e3;border-radius:6px;background:#fff}
#users .users-page-controls{display:flex;align-items:center;gap:6px;direction:rtl}.users-page-controls .page-nav-btn{height:34px!important;min-width:92px!important;width:auto!important;padding:0 10px!important}
#users .users-page-numbers{display:flex;gap:5px;direction:ltr}.users-page-numbers button{width:34px;height:34px;border:1px solid #d1dde6;background:#fff;border-radius:6px;color:#456277;cursor:pointer;font-weight:800}.users-page-numbers button.active{background:#1774bc;color:#fff;border-color:#1774bc}
#users #usersPageInfo{justify-self:end;min-width:90px!important;font-size:9.5px!important}
#users .users-protected-note{padding:8px 12px;background:#edf7ff;color:#28638d;font-size:9px;border-top:1px solid #dbeaf5}
@media(max-width:1250px){#users .user-report-filters-main{grid-template-columns:repeat(3,1fr)!important}#users .user-kpis-modern{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:760px){#users .users-page-head{align-items:flex-start;flex-direction:column}#users .user-kpis-modern{grid-template-columns:1fr!important}#users .user-report-filters-main{grid-template-columns:1fr 1fr!important}#users .users-pagination-modern{grid-template-columns:1fr!important}.users-page-controls{justify-self:center}#users #usersPageInfo{justify-self:center}}

/* Stage 7.4.3.2 — production UI fixes */
:root{--flowix-header-h:68px}
body{padding-top:var(--flowix-header-h)!important}
body>header,header{
 position:fixed!important;
 top:0!important;right:0!important;left:0!important;
 width:100%!important;height:var(--flowix-header-h)!important;
 z-index:5000!important;
 box-sizing:border-box!important;
}
main{position:relative!important}
table thead th{top:var(--flowix-header-h)!important}
.modal table thead th{top:0!important}

/* User table: prevent first row/header overlap and improve readability */
#users .users-tablebox{position:relative!important;overflow:auto!important}
#users .users-table-modern{border-collapse:separate!important;border-spacing:0!important}
#users .users-table-modern thead{position:relative!important;z-index:20!important}
#users .users-table-modern thead th{
 position:sticky!important;top:0!important;z-index:25!important;
 background:#123f63!important;box-shadow:0 1px 0 #dce6ed!important;
}
#users .users-table-modern tbody td{
 min-height:56px!important;height:56px!important;
 padding:11px 9px!important;font-size:10.5px!important;
}
#users .user-fullname,#users .department-cell,#users .scope-cell{font-size:10.5px!important}
#users .user-account-cell b{font-size:11px!important}
#users .user-role-badge,#users .user-status-pill{font-size:9.5px!important}
#users .last-login-cell{font-size:9.5px!important}


.report-date-card{margin-bottom:12px!important;padding:12px 14px!important}
.report-date-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;color:#294b64}
.report-date-title span{font-size:9px;color:#788c9b}
.report-date-filters{display:grid;grid-template-columns:1.2fr 1fr 1fr 2.5fr;gap:9px;align-items:end}
.report-date-quick{display:flex;gap:5px;flex-wrap:wrap;align-items:end;padding-bottom:1px}
.report-date-quick .btn{height:36px!important;padding:0 10px!important;font-size:9px!important}
@media(max-width:1000px){.report-date-filters{grid-template-columns:1fr 1fr!important}.report-date-quick{grid-column:1/-1}}

/* Stage 7.4.3.3 UI Polish */
.header-brand{display:flex!important;align-items:center!important;gap:9px!important;white-space:nowrap}.header-flowix-logo{width:46px!important;height:42px!important;object-fit:contain!important;display:block!important}.header-brand-text{display:flex!important;align-items:baseline!important}
#entry .title::before,#report .title::before,#users .title::before,#settings .title::before,#entry::before,#report::before,#users::before,#settings::before{display:none!important;background:none!important;content:none!important}
.report-date-card{padding:12px 16px!important}.report-date-title{justify-content:flex-start!important;margin-bottom:8px!important}.report-date-filters{grid-template-columns:minmax(220px,1.15fr) minmax(180px,.9fr) minmax(180px,.9fr) minmax(420px,1.9fr)!important;gap:10px!important}.report-date-filters .field label{font-size:11px!important;margin-bottom:5px!important}.report-date-filters select,.report-date-filters input[type=date]{height:46px!important;min-height:46px!important;font-size:14px!important;padding:8px 12px!important}.report-date-filters input[type=date]::-webkit-datetime-edit,.report-date-filters input[type=date]::-webkit-datetime-edit-day-field,.report-date-filters input[type=date]::-webkit-datetime-edit-month-field,.report-date-filters input[type=date]::-webkit-datetime-edit-year-field{font-size:14px!important}.report-date-quick{gap:7px!important;flex-wrap:nowrap!important}.report-date-quick .btn{height:42px!important;min-height:42px!important;padding:0 12px!important;font-size:11px!important;white-space:nowrap!important}
#users .user-report-filters-main select{height:46px!important;min-height:46px!important;font-size:12px!important;padding:8px 11px!important}#users .user-report-filters-main label{font-size:10.5px!important;margin-bottom:5px!important}#users .users-searchbar input,#users .users-clear-filter-btn{height:46px!important;min-height:46px!important}
#prItemUnit{height:46px!important;min-height:46px!important}.pr-unit-field #prItemUnitOther{margin-top:6px!important;height:40px!important}
@media(max-width:1200px){.report-date-filters{grid-template-columns:1fr 1fr 1fr!important}.report-date-quick{grid-column:1/-1!important;flex-wrap:wrap!important}}
\n/* Stage 7.4.3.4 — Header / page title / date RTL / report table fixes */
:root{--flowix-header-h:68px;--flowix-title-h:54px;--flowix-teal:#075b66;--flowix-teal-deep:#064e59}
/* Preserve the established header structure and controls; change only identity treatment/background. */
body>header,header{background:linear-gradient(90deg,var(--flowix-teal-deep),var(--flowix-teal))!important}
.header-brand{height:var(--flowix-header-h)!important;min-width:150px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;overflow:hidden!important;direction:ltr!important}
.header-flowix-logo{width:142px!important;height:62px!important;max-height:62px!important;object-fit:contain!important;object-position:center!important;display:block!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.12))}
.header-brand-text{display:none!important}
header nav button.active{color:var(--flowix-teal-deep)!important}
/* Remove legacy page-logo reservation that created the large blank area. */
#entry,#report,#users,#settings,#prCreate,#items{padding-top:8px!important}
#entry .title,#report .title,#settings .title,#prCreate .title,#items .title{padding-right:0!important;min-height:var(--flowix-title-h)!important;height:var(--flowix-title-h)!important;margin:0 0 10px!important;padding-top:0!important;display:flex!important;align-items:center!important;background:#f5f7fa!important}
#entry .title h1,#report .title h1,#settings .title h1,#prCreate .title h1,#items .title h1{font-family:Tahoma,Arial,sans-serif!important;font-size:24px!important;line-height:1.15!important;font-weight:800!important;color:#102f49!important;letter-spacing:0!important}
#entry .title .sub,#prCreate .title .sub,#settings .title .sub,#items .title .sub{margin-top:3px!important;font-size:10.5px!important}
/* Page function remains visible immediately below the fixed main header while scrolling. */
#entry:not(.hide)>.title,#report:not(.hide)>.title,#prCreate:not(.hide)>.title,#items:not(.hide)>.title,#settings:not(.hide)>.title{position:sticky!important;top:var(--flowix-header-h)!important;z-index:210!important;box-shadow:0 1px 0 rgba(18,56,93,.08)!important}
/* Correct Arabic labels and make the native date value visually predictable. */
.report-date-field{direction:rtl!important;text-align:right!important}.report-date-field label{direction:rtl!important;unicode-bidi:isolate!important;text-align:right!important;width:100%!important}.report-date-field label bdi{direction:rtl!important;unicode-bidi:isolate!important}.report-date-field input[type=date]{direction:ltr!important;text-align:center!important;font-family:Arial,Tahoma,sans-serif!important;font-size:15px!important;font-weight:600!important}
/* Report table header: never float in the middle of the viewport. It sticks only within its table box. */
#report .report-tablebox{position:relative!important;overflow-x:hidden!important;overflow-y:visible!important}
#report .report-summary-table{border-collapse:separate!important;border-spacing:0!important}
#report .report-summary-table thead{position:relative!important;z-index:3!important}
#report .report-summary-table thead th{position:sticky!important;top:calc(var(--flowix-header-h) + var(--flowix-title-h))!important;z-index:35!important;background:var(--flowix-teal)!important;box-shadow:0 1px 0 rgba(0,0,0,.12)!important}
#report .report-summary-table tbody td{position:relative!important;z-index:1!important}
/* Other generic tables retain normal behavior; modal tables stay local to their modal. */
#report .report-summary-table tbody tr:first-child td{padding-top:10px!important}
@media(max-width:900px){.header-flowix-logo{width:116px!important;height:58px!important}.header-brand{min-width:120px!important}#entry .title h1,#report .title h1,#prCreate .title h1,#items .title h1,#settings .title h1{font-size:20px!important}}

/* Stage 7.4.3.5 — UI regression hotfix */
:root{--flowix-header-h:68px;--flowix-teal:#075b66;--flowix-teal-deep:#064e59}
body>header,header{background:#075b66!important;color:#fff!important;opacity:1!important;filter:none!important;backdrop-filter:none!important}
header .userbox,header .username,header .roleline,header .accountlink,header .logoutlink,header .server-chip,header nav button{opacity:1!important}
.header-brand{width:176px!important;min-width:176px!important;height:68px!important;overflow:visible!important;display:flex!important;align-items:center!important;justify-content:center!important;direction:ltr!important}
.header-flowix-logo{width:166px!important;height:64px!important;max-height:64px!important;object-fit:contain!important;object-position:center!important;display:block!important;opacity:1!important;filter:none!important}
/* Keep page function title close to the content, readable and stable. */
#report,#prCreate,#entry,#items,#settings{padding-top:4px!important}
#report>.title,#prCreate>.title,#entry>.title,#items>.title,#settings>.title{height:46px!important;min-height:46px!important;margin:0 0 8px!important;padding:0 2px!important;background:#f5f7fa!important;border:0!important;box-shadow:none!important;display:flex!important;align-items:center!important}
#report>.title h1,#prCreate>.title h1,#entry>.title h1,#items>.title h1,#settings>.title h1{font-size:23px!important;font-weight:800!important;line-height:1.15!important;color:#102f49!important;margin:0!important;border:0!important;text-decoration:none!important}
#report:not(.hide)>.title,#prCreate:not(.hide)>.title,#entry:not(.hide)>.title,#items:not(.hide)>.title,#settings:not(.hide)>.title{position:sticky!important;top:68px!important;z-index:120!important}
/* Deterministic Arabic date UI: visible DD/MM/YYYY text, hidden native picker. */
.report-date-field{direction:rtl!important;text-align:right!important}.report-date-field>label{direction:rtl!important;unicode-bidi:isolate!important;text-align:right!important;display:block!important;font-size:11px!important}
.flowix-date-shell{position:relative!important;height:46px!important;display:flex!important;align-items:center!important;border:1px solid #cbd8e2!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important;direction:ltr!important}
.flowix-date-display{border:0!important;outline:0!important;box-shadow:none!important;height:44px!important;min-height:44px!important;flex:1!important;text-align:center!important;direction:ltr!important;font-family:Arial,Tahoma,sans-serif!important;font-size:15px!important;font-weight:700!important;background:#fff!important;padding:0 8px!important}
.flowix-date-btn{width:44px!important;height:44px!important;border:0!important;border-left:1px solid #e0e7ed!important;background:#fff!important;color:#173b56!important;cursor:pointer!important;font-size:15px!important}
.flowix-native-date{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;left:0!important;bottom:0!important}
/* Restore table header to its real place. Do not pin it to viewport coordinates. */
#report .report-tablebox{position:relative!important;overflow-x:hidden!important;overflow-y:visible!important}
#report .report-summary-table{border-collapse:separate!important;border-spacing:0!important;width:100%!important}
#report .report-summary-table thead{display:table-header-group!important;position:static!important;visibility:visible!important;opacity:1!important}
#report .report-summary-table thead tr{display:table-row!important;visibility:visible!important}
#report .report-summary-table thead th{display:table-cell!important;position:static!important;top:auto!important;z-index:auto!important;visibility:visible!important;opacity:1!important;background:#075b66!important;color:#fff!important;padding:9px 6px!important;box-shadow:none!important}
#report .report-summary-table tbody td{position:static!important;z-index:auto!important}
@media(max-width:900px){.header-brand{width:140px!important;min-width:140px!important}.header-flowix-logo{width:134px!important;height:62px!important}#report>.title h1,#prCreate>.title h1{font-size:20px!important}}


/* Stage 7.4.3.6 — Restored blue header + sticky page identity */
:root{
 --flowix-header-h:68px;
 --flowix-page-identity-h:112px;
 --flowix-header-blue:#12385d;
}
/* Original header color and wording — no logo image inside header */
body>header,header{
 background:#12385d!important;
 color:#fff!important;
 opacity:1!important;
 filter:none!important;
 backdrop-filter:none!important;
}
.header-brand-textual{
 width:auto!important;
 min-width:190px!important;
 height:68px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:0!important;
 overflow:visible!important;
 direction:ltr!important;
 font-size:25px!important;
 font-weight:800!important;
 white-space:nowrap!important;
}
.header-brand-textual .flowix-flow{color:#fff!important}
.header-brand-textual .flowix-ix{color:#079AF3!important}
.header-brand-textual .flowix-tracking{
 color:#dbe5ec!important;
 font-size:13px!important;
 font-weight:400!important;
 margin-left:7px!important;
 margin-right:0!important;
 opacity:1!important;
}
/* The full supplied logo is now below the header, centered.
   Page function/title is directly below the logo.
   This entire identity strip stays fixed via sticky positioning. */
#report>.title,
#prCreate>.title,
#entry>.title,
#items>.title,
#settings>.title{
 position:sticky!important;
 top:var(--flowix-header-h)!important;
 z-index:220!important;
 width:100%!important;
 height:var(--flowix-page-identity-h)!important;
 min-height:var(--flowix-page-identity-h)!important;
 margin:0 0 10px!important;
 padding:5px 0 7px!important;
 background:#f5f7fa!important;
 border:0!important;
 box-shadow:0 1px 0 rgba(18,56,93,.08)!important;
 display:flex!important;
 flex-direction:column!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:1px!important;
 text-align:center!important;
}
#report>.title::before,
#prCreate>.title::before,
#entry>.title::before,
#items>.title::before,
#settings>.title::before{
 content:""!important;
 display:block!important;
 width:94px!important;
 height:67px!important;
 flex:0 0 67px!important;
 background:url('/assets/flowix-logo.png') center/contain no-repeat!important;
 opacity:1!important;
 margin:0 auto 1px!important;
}
#report>.title>div,
#prCreate>.title>div,
#entry>.title>div,
#items>.title>div,
#settings>.title>div{
 display:flex!important;
 flex-direction:column!important;
 align-items:center!important;
 justify-content:center!important;
 width:100%!important;
}
#report>.title h1,
#prCreate>.title h1,
#entry>.title h1,
#items>.title h1,
#settings>.title h1{
 margin:0!important;
 padding:0!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:22px!important;
 line-height:1.15!important;
 font-weight:800!important;
 color:#102f49!important;
 text-align:center!important;
 border:0!important;
 text-decoration:none!important;
}
#report>.title .sub,
#prCreate>.title .sub,
#entry>.title .sub,
#items>.title .sub,
#settings>.title .sub{
 display:none!important;
}
/* Prevent legacy screen-logo pseudo elements from duplicating the centered logo */
#report::before,#prCreate::before,#entry::before,#items::before,#settings::before{
 display:none!important;
 content:none!important;
 background:none!important;
}
/* Content starts directly below the sticky page identity, without legacy top gap */
#report,#prCreate,#entry,#items,#settings{padding-top:0!important}

/* Keep report table column headings in their actual table position */
#report .report-summary-table thead{
 display:table-header-group!important;
 position:static!important;
 visibility:visible!important;
 opacity:1!important;
}
#report .report-summary-table thead th{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 z-index:auto!important;
 background:#12385d!important;
 color:#fff!important;
 visibility:visible!important;
 opacity:1!important;
}
/* Date UI from 7.4.3.5 remains deterministic DD/MM/YYYY */
.report-date-field>label{
 direction:rtl!important;
 unicode-bidi:isolate!important;
 text-align:right!important;
}
@media(max-width:900px){
 .header-brand-textual{min-width:150px!important;font-size:21px!important}
 .header-brand-textual .flowix-tracking{font-size:11px!important}
 #report>.title,#prCreate>.title,#entry>.title,#items>.title,#settings>.title{
  --flowix-page-identity-h:104px;
 }
 #report>.title::before,#prCreate>.title::before,#entry>.title::before,#items>.title::before,#settings>.title::before{
  width:84px!important;height:60px!important;flex-basis:60px!important;
 }
 #report>.title h1,#prCreate>.title h1,#entry>.title h1,#items>.title h1,#settings>.title h1{
  font-size:19px!important;
 }
}


/* Stage 7.4.3.7 — Final approved header/page-identity alignment */
:root{
 --flowix-header-h:68px;
 --flowix-header-blue:#12385d;
 --flowix-brand-axis:90%;
 --flowix-page-identity-h:100px;
}
/* Preserve original approved blue fixed header */
body>header,header{
 background:#12385d!important;
 color:#fff!important;
 opacity:1!important;
 filter:none!important;
 backdrop-filter:none!important;
}
/* Header stays text-only: FLOWIX Tracking, no image logo */
.header-brand-textual{
 position:relative!important;
 width:auto!important;
 min-width:190px!important;
 height:68px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 direction:ltr!important;
 white-space:nowrap!important;
}
.header-brand-textual .flowix-flow{color:#fff!important}
.header-brand-textual .flowix-ix{color:#079AF3!important}
.header-brand-textual .flowix-tracking{color:#dbe5ec!important}

/* Page identity is directly below header and aligned with FLOWIX Tracking axis */
#report>.title,
#prCreate>.title,
#entry>.title,
#items>.title,
#settings>.title{
 position:sticky!important;
 top:var(--flowix-header-h)!important;
 z-index:220!important;
 width:100%!important;
 height:var(--flowix-page-identity-h)!important;
 min-height:var(--flowix-page-identity-h)!important;
 margin:0 0 8px!important;
 padding:2px 0 5px!important;
 background:#f5f7fa!important;
 border:0!important;
 box-shadow:0 1px 0 rgba(18,56,93,.08)!important;
 display:block!important;
 text-align:initial!important;
}

/* Full logo: larger, clearer, and close to the header */
#report>.title::before,
#prCreate>.title::before,
#entry>.title::before,
#items>.title::before,
#settings>.title::before{
 content:""!important;
 position:absolute!important;
 top:2px!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 display:block!important;
 width:116px!important;
 height:70px!important;
 background:url('/assets/flowix-logo.png') center/contain no-repeat!important;
 opacity:1!important;
 margin:0!important;
}

/* Page function/title directly under the logo on the same FLOWIX Tracking axis */
#report>.title>div,
#prCreate>.title>div,
#entry>.title>div,
#items>.title>div,
#settings>.title>div{
 position:absolute!important;
 top:72px!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 width:300px!important;
 display:block!important;
 text-align:center!important;
}
#report>.title h1,
#prCreate>.title h1,
#entry>.title h1,
#items>.title h1,
#settings>.title h1{
 margin:0!important;
 padding:0!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:21px!important;
 line-height:1.15!important;
 font-weight:800!important;
 color:#102f49!important;
 text-align:center!important;
 white-space:nowrap!important;
 border:0!important;
 text-decoration:none!important;
}
/* Old explanatory subtitle remains removed */
#report>.title .sub,
#prCreate>.title .sub,
#entry>.title .sub,
#items>.title .sub,
#settings>.title .sub{
 display:none!important;
}
/* No duplicate screen logo */
#report::before,#prCreate::before,#entry::before,#items::before,#settings::before{
 display:none!important;
 content:none!important;
 background:none!important;
}
#report,#prCreate,#entry,#items,#settings{padding-top:0!important}

/* Preserve report fixes */
#report .report-summary-table thead{
 display:table-header-group!important;
 position:static!important;
 visibility:visible!important;
 opacity:1!important;
}
#report .report-summary-table thead th{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 z-index:auto!important;
 background:#12385d!important;
 color:#fff!important;
 visibility:visible!important;
 opacity:1!important;
}
.report-date-field>label{
 direction:rtl!important;
 unicode-bidi:isolate!important;
 text-align:right!important;
}

/* Responsive: center identity on smaller screens to avoid clipping */
@media(max-width:1100px){
 :root{--flowix-brand-axis:50%}
}
@media(max-width:900px){
 :root{--flowix-page-identity-h:96px}
 #report>.title::before,#prCreate>.title::before,#entry>.title::before,#items>.title::before,#settings>.title::before{
  width:104px!important;height:64px!important;
 }
 #report>.title>div,#prCreate>.title>div,#entry>.title>div,#items>.title>div,#settings>.title>div{
  top:67px!important;width:270px!important;
 }
 #report>.title h1,#prCreate>.title h1,#entry>.title h1,#items>.title h1,#settings>.title h1{
  font-size:19px!important;
 }
}


/* Stage 7.4.3.8 — Final sticky identity refinement (UI only) */
:root{
 --flowix-header-h:68px;
 --flowix-header-blue:#12385d;
 --flowix-brand-axis:90%;
 --flowix-page-identity-h:108px;
}
/* Preserve approved original blue header and its exact content */
body>header,header{
 background:#12385d!important;
 color:#fff!important;
 opacity:1!important;
 filter:none!important;
 backdrop-filter:none!important;
}
.header-brand-textual{
 width:auto!important;
 min-width:190px!important;
 height:68px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 direction:ltr!important;
 white-space:nowrap!important;
}
.header-brand-textual .flowix-flow{color:#fff!important}
.header-brand-textual .flowix-ix{color:#079AF3!important}
.header-brand-textual .flowix-tracking{color:#dbe5ec!important}

/* Logo + page function stay sticky directly below fixed header */
#report>.title,
#prCreate>.title,
#entry>.title,
#items>.title,
#settings>.title{
 position:sticky!important;
 top:var(--flowix-header-h)!important;
 z-index:220!important;
 width:100%!important;
 height:var(--flowix-page-identity-h)!important;
 min-height:var(--flowix-page-identity-h)!important;
 margin:0 0 7px!important;
 padding:0!important;
 background:#f5f7fa!important;
 border:0!important;
 box-shadow:0 1px 0 rgba(18,56,93,.08)!important;
 display:block!important;
 text-align:initial!important;
}
/* Full logo: 20–25% larger than prior release and much closer to header */
#report>.title::before,
#prCreate>.title::before,
#entry>.title::before,
#items>.title::before,
#settings>.title::before{
 content:""!important;
 position:absolute!important;
 top:0!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 display:block!important;
 width:142px!important;
 height:82px!important;
 background:url('/assets/flowix-logo.png') center/contain no-repeat!important;
 opacity:1!important;
 margin:0!important;
}
/* Page function directly below logo, same vertical axis as FLOWIX Tracking */
#report>.title>div,
#prCreate>.title>div,
#entry>.title>div,
#items>.title>div,
#settings>.title>div{
 position:absolute!important;
 top:80px!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 width:340px!important;
 display:block!important;
 text-align:center!important;
}
#report>.title h1,
#prCreate>.title h1,
#entry>.title h1,
#items>.title h1,
#settings>.title h1{
 margin:0!important;
 padding:0!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:22px!important;
 line-height:1.15!important;
 font-weight:800!important;
 color:#102f49!important;
 text-align:center!important;
 white-space:nowrap!important;
 border:0!important;
 text-decoration:none!important;
}
/* Never restore the old explanatory subtitle */
#report>.title .sub,
#prCreate>.title .sub,
#entry>.title .sub,
#items>.title .sub,
#settings>.title .sub{display:none!important}

/* Never duplicate the logo elsewhere */
#report::before,#prCreate::before,#entry::before,#items::before,#settings::before{
 display:none!important;
 content:none!important;
 background:none!important;
}
#report,#prCreate,#entry,#items,#settings{padding-top:0!important}

/* Preserve approved report/date fixes */
#report .report-summary-table thead{
 display:table-header-group!important;
 position:static!important;
 visibility:visible!important;
 opacity:1!important;
}
#report .report-summary-table thead th{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 z-index:auto!important;
 background:#12385d!important;
 color:#fff!important;
 visibility:visible!important;
 opacity:1!important;
}
.report-date-field>label{
 direction:rtl!important;
 unicode-bidi:isolate!important;
 text-align:right!important;
}
/* On narrower screens avoid clipping while keeping sticky behavior */
@media(max-width:1100px){
 :root{--flowix-brand-axis:50%}
}
@media(max-width:900px){
 :root{--flowix-page-identity-h:102px}
 #report>.title::before,#prCreate>.title::before,#entry>.title::before,#items>.title::before,#settings>.title::before{
  width:126px!important;height:75px!important;
 }
 #report>.title>div,#prCreate>.title>div,#entry>.title>div,#items>.title>div,#settings>.title>div{
  top:74px!important;width:290px!important;
 }
 #report>.title h1,#prCreate>.title h1,#entry>.title h1,#items>.title h1,#settings>.title h1{
  font-size:19px!important;
 }
}


/* Stage 7.4.3.9 — Structural fixed identity fix (no stacked legacy spacing) */
:root{
 --flowix-header-h:68px;
 --flowix-identity-h:112px;
 --flowix-brand-axis:90vw;
}
/* Header: unchanged approved original blue */
body>header,header{
 position:fixed!important;
 top:0!important;right:0!important;left:0!important;
 width:100%!important;height:var(--flowix-header-h)!important;
 background:#12385d!important;color:#fff!important;
 z-index:5000!important;
}
.header-brand-textual{
 direction:ltr!important;
 display:flex!important;align-items:center!important;
 height:68px!important;min-width:190px!important;
 white-space:nowrap!important;
}
.header-brand-textual .flowix-flow{color:#fff!important}
.header-brand-textual .flowix-ix{color:#079AF3!important}
.header-brand-textual .flowix-tracking{color:#dbe5ec!important}

/* Remove ALL legacy top-space behavior from the main workspace. */
body{padding-top:var(--flowix-header-h)!important}
main.wrap{
 margin-top:0!important;
 padding-top:0!important;
}
#report,#prCreate,#entry,#items,#settings{
 position:relative!important;
 padding-top:var(--flowix-identity-h)!important;
 margin-top:0!important;
}

/* TRUE fixed page identity strip directly under the header.
   It no longer participates in the section flow, so old title/padding rules cannot push it down. */
#report>.title,
#prCreate>.title,
#entry>.title,
#items>.title,
#settings>.title{
 position:fixed!important;
 top:var(--flowix-header-h)!important;
 left:0!important;right:0!important;
 width:100vw!important;
 height:var(--flowix-identity-h)!important;
 min-height:var(--flowix-identity-h)!important;
 margin:0!important;
 padding:0!important;
 background:#f5f7fa!important;
 border:0!important;
 box-shadow:0 1px 0 rgba(18,56,93,.08)!important;
 z-index:4500!important;
 display:block!important;
 overflow:hidden!important;
}

/* Full logo: larger and only 4px below header. */
#report>.title::before,
#prCreate>.title::before,
#entry>.title::before,
#items>.title::before,
#settings>.title::before{
 content:""!important;
 position:absolute!important;
 top:4px!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 width:150px!important;
 height:78px!important;
 display:block!important;
 background:url('/assets/flowix-logo.png') center/contain no-repeat!important;
 opacity:1!important;
 margin:0!important;
}

/* Page function directly below the logo, same axis. */
#report>.title>div,
#prCreate>.title>div,
#entry>.title>div,
#items>.title>div,
#settings>.title>div{
 position:absolute!important;
 top:80px!important;
 left:var(--flowix-brand-axis)!important;
 transform:translateX(-50%)!important;
 width:360px!important;
 max-width:360px!important;
 margin:0!important;
 padding:0!important;
 text-align:center!important;
 display:block!important;
}
#report>.title h1,
#prCreate>.title h1,
#entry>.title h1,
#items>.title h1,
#settings>.title h1{
 margin:0!important;padding:0!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:22px!important;line-height:1.15!important;
 font-weight:800!important;color:#102f49!important;
 text-align:center!important;white-space:nowrap!important;
}
#report>.title .sub,
#prCreate>.title .sub,
#entry>.title .sub,
#items>.title .sub,
#settings>.title .sub{display:none!important}

/* Kill all old decorative page logos/pseudo-elements. */
#report::before,#prCreate::before,#entry::before,#items::before,#settings::before{
 display:none!important;content:none!important;background:none!important;
}

/* Report table headings stay where they belong. */
#report .report-summary-table thead{
 display:table-header-group!important;
 position:static!important;
 visibility:visible!important;opacity:1!important;
}
#report .report-summary-table thead th{
 display:table-cell!important;
 position:static!important;top:auto!important;z-index:auto!important;
 background:#12385d!important;color:#fff!important;
 visibility:visible!important;opacity:1!important;
}
/* Preserve deterministic date UI */
.report-date-field>label{
 direction:rtl!important;unicode-bidi:isolate!important;text-align:right!important;
}

@media(max-width:1100px){
 :root{--flowix-brand-axis:50vw}
}
@media(max-width:900px){
 :root{--flowix-identity-h:104px}
 #report>.title::before,#prCreate>.title::before,#entry>.title::before,#items>.title::before,#settings>.title::before{
  width:132px!important;height:70px!important;top:3px!important;
 }
 #report>.title>div,#prCreate>.title>div,#entry>.title>div,#items>.title>div,#settings>.title>div{
  top:73px!important;width:300px!important;
 }
 #report>.title h1,#prCreate>.title h1,#entry>.title h1,#items>.title h1,#settings>.title h1{
  font-size:19px!important;
 }
}


/* Stage 7.4.4.0 — Dedicated fixed page identity bar */
:root{
 --flowix-header-h:68px;
 --flowix-logo-gap:0.5cm;
 --flowix-logo-w:188px; /* +25% from 150px */
 --flowix-logo-h:98px;  /* +25% from 78px */
 --flowix-identity-h:145px;
}
/* Keep approved blue header exactly as-is */
body>header,header{
 position:fixed!important;
 top:0!important;right:0!important;left:0!important;
 height:var(--flowix-header-h)!important;
 background:#12385d!important;
 z-index:5000!important;
}
/* Dedicated identity strip is a sibling of main, so old section CSS cannot push it down. */
.flowix-page-identity{
 position:fixed!important;
 top:var(--flowix-header-h)!important;
 left:0!important;right:0!important;
 height:var(--flowix-identity-h)!important;
 background:#f5f7fa!important;
 z-index:4600!important;
 pointer-events:none!important;
}
.flowix-page-logo{
 position:absolute!important;
 top:var(--flowix-logo-gap)!important;
 left:90%!important;
 transform:translateX(-50%)!important;
 width:var(--flowix-logo-w)!important;
 height:var(--flowix-logo-h)!important;
 object-fit:contain!important;
 display:block!important;
}
.flowix-page-title{
 position:absolute!important;
 top:calc(var(--flowix-logo-gap) + var(--flowix-logo-h) - 5px)!important;
 left:90%!important;
 transform:translateX(-50%)!important;
 width:380px!important;
 text-align:center!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:22px!important;
 line-height:1.2!important;
 font-weight:800!important;
 color:#102f49!important;
 white-space:nowrap!important;
}
/* Workspace begins immediately after fixed header + identity strip. */
body{padding-top:calc(var(--flowix-header-h) + var(--flowix-identity-h))!important}
main.wrap{
 margin-top:8px!important;
 padding-top:0!important;
}
/* Hide the old in-section title blocks completely; the dedicated bar now owns logo/title. */
#report>.title,
#prCreate>.title,
#entry>.title,
#items>.title,
#settings>.title{
 display:none!important;
}
#report,#prCreate,#entry,#items,#settings{
 padding-top:0!important;
 margin-top:0!important;
}
/* Remove every legacy decorative page logo. */
#report::before,#prCreate::before,#entry::before,#items::before,#settings::before,
#report>.title::before,#prCreate>.title::before,#entry>.title::before,#items>.title::before,#settings>.title::before{
 display:none!important;
 content:none!important;
 background:none!important;
}
/* Preserve table/date fixes. */
#report .report-summary-table thead{
 display:table-header-group!important;
 position:static!important;
 visibility:visible!important;
 opacity:1!important;
}
#report .report-summary-table thead th{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 background:#12385d!important;
 color:#fff!important;
}
.report-date-field>label{
 direction:rtl!important;
 unicode-bidi:isolate!important;
 text-align:right!important;
}
@media(max-width:1100px){
 .flowix-page-logo,.flowix-page-title{left:50%!important}
}
@media(max-width:900px){
 :root{
  --flowix-logo-w:164px;
  --flowix-logo-h:86px;
  --flowix-identity-h:132px;
 }
 .flowix-page-title{
  top:calc(var(--flowix-logo-gap) + var(--flowix-logo-h) - 4px)!important;
  width:300px!important;
  font-size:19px!important;
 }
}


/* Stage 7.4.4.1 — Approved UI corrections */
:root{
 --flowix-header-h:68px;
 --flowix-logo-gap:4px;
 --flowix-logo-w:188px;
 --flowix-logo-h:98px;
 --flowix-identity-h:88px;
}
/* Fixed identity now contains the logo only. Page function is already represented by active header navigation. */
.flowix-page-identity{
 height:var(--flowix-identity-h)!important;
}
.flowix-page-logo{
 top:var(--flowix-logo-gap)!important;
 width:var(--flowix-logo-w)!important;
 height:var(--flowix-logo-h)!important;
}
.flowix-page-title{display:none!important}
body{padding-top:calc(var(--flowix-header-h) + var(--flowix-identity-h))!important}

/* Restore Item Master controls hidden by the previous broad title rule.
   Keep only its duplicate heading/subtitle hidden. */
#items>.title{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-end!important;
 margin:0 0 10px!important;
 padding:0!important;
 min-height:44px!important;
}
#items>.title>div:first-child{display:none!important}
#items>.title>.actions{
 display:flex!important;
 gap:8px!important;
 align-items:center!important;
 flex-wrap:wrap!important;
}
#items>.title>.actions .btn,
#items>.title>.actions .item-import-label{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 visibility:visible!important;
 opacity:1!important;
}

/* Login: fill the viewport without producing an unnecessary desktop scrollbar.
   Use border-box so padding is included in the 100dvh height. */
body:has(#loginScreen:not(.hide)){
 padding-top:0!important;
 overflow:hidden!important;
}
#loginScreen.loginwrap{
 box-sizing:border-box!important;
 width:100%!important;
 height:100dvh!important;
 min-height:0!important;
 max-height:100dvh!important;
 padding:18px!important;
 overflow:hidden!important;
}
@media(max-height:760px){
 body:has(#loginScreen:not(.hide)){overflow:auto!important}
 #loginScreen.loginwrap{
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow:visible!important;
  padding:12px 18px!important;
 }
 .login.card.login-modern{padding-top:20px!important;padding-bottom:18px!important}
 .login-logo-modern{width:190px!important;height:118px!important}
}


/* Stage 7.4.4.2 — verified structural UI fixes */
body.login-active{
 padding-top:0!important;
 margin:0!important;
 height:100vh!important;
 height:100dvh!important;
 min-height:0!important;
 max-height:100dvh!important;
 overflow:hidden!important;
}
body.login-active #loginScreen.loginwrap{
 box-sizing:border-box!important;
 position:fixed!important;
 inset:0!important;
 width:100vw!important;
 height:100vh!important;
 height:100dvh!important;
 min-height:0!important;
 max-height:none!important;
 padding:12px 18px!important;
 margin:0!important;
 overflow:hidden!important;
}
body.login-active #loginScreen .login.card.login-modern{
 box-sizing:border-box!important;
 max-height:calc(100dvh - 24px)!important;
 padding:22px 34px 18px!important;
}
body.login-active #loginScreen .login-brand-modern{margin-bottom:16px!important}
body.login-active #loginScreen .login-logo-modern{width:200px!important;height:124px!important}
body.login-active #loginScreen .login-input-shell>input{height:48px!important}
body.login-active #loginScreen .login-meta{margin-top:10px!important}
body.login-active #loginScreen .login-credit-modern{margin-top:5px!important}

/* User page: no duplicate page heading; compact KPI cards and actions share one horizontal band. */
.users-summary-row{
 display:flex!important;
 align-items:stretch!important;
 gap:12px!important;
 margin:0 0 12px!important;
 direction:rtl;
}
.users-summary-row .user-kpis-modern{
 flex:1 1 auto!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:10px!important;
 margin:0!important;
}
.users-summary-row .user-kpis-modern .user-kpi{
 min-height:70px!important;
 padding:9px 12px!important;
 gap:10px!important;
}
.users-summary-row .user-kpi-icon{
 width:44px!important;height:44px!important;min-width:44px!important;
}
.users-summary-row .user-kpi b{font-size:22px!important}
.users-summary-actions{
 flex:0 0 auto!important;
 display:flex!important;
 align-items:stretch!important;
 gap:8px!important;
 margin:0!important;
 direction:rtl;
}
.users-summary-actions .btn{
 min-height:70px!important;
 padding:8px 14px!important;
 white-space:nowrap!important;
}

/* Item Master: explicit toolbar independent of legacy title rules. */
.item-master-toolbar{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:8px!important;
 margin:0 0 10px!important;
 direction:rtl!important;
}
.item-master-toolbar .btn,
.item-master-toolbar .item-import-label{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 visibility:visible!important;
 opacity:1!important;
 margin:0!important;
 min-height:40px!important;
 cursor:pointer!important;
}
@media(max-width:1100px){
 .users-summary-row{flex-direction:column!important}
 .users-summary-actions .btn{min-height:40px!important}
 .users-summary-row .user-kpis-modern{grid-template-columns:repeat(2,1fr)!important}
}


/* Stage 7.4.4.3 — Item editor redesign, UI only */
#itemEditorModal.item-editor-overlay{
 align-items:center!important;
 justify-content:center!important;
 padding:22px!important;
 overflow:auto!important;
}
#itemEditorModal .item-editor-box{
 width:min(1120px,96vw)!important;
 max-width:1120px!important;
 max-height:calc(100dvh - 44px)!important;
 overflow:auto!important;
 border-radius:18px!important;
 padding:0!important;
 direction:rtl!important;
 text-align:right!important;
 box-shadow:0 22px 65px rgba(15,45,75,.22)!important;
}
.item-editor-head{
 position:sticky!important;top:0!important;z-index:3!important;
 padding:18px 22px!important;background:#fff!important;
 border-bottom:1px solid #dbe5ef!important;
}
.item-editor-head b{font-size:22px!important;color:#12385d!important}
.item-editor-sub{font-size:12px;color:#718399;margin-top:4px}
.item-form-section{padding:16px 22px 4px!important}
.item-form-section+.item-form-section{border-top:1px solid #e2eaf2}
.item-section-title{
 color:#0d6fbd;font-weight:800;font-size:16px;
 border-right:4px solid #1686d9;padding-right:9px;margin-bottom:6px;
}
.item-section-help{font-size:12px;color:#718399;margin:-6px 0 12px}
.item-form-grid{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:14px!important;align-items:start!important;
}
.item-form-grid .field{margin:0!important;min-width:0!important}
.item-form-grid .span2{grid-column:span 2!important}
.item-form-grid label{display:block!important;margin-bottom:6px!important;font-weight:700!important}
.item-form-grid input,.item-form-grid select,.item-form-grid textarea{
 width:100%!important;box-sizing:border-box!important;
}
.item-code-preview input{
 background:#f0f3f6!important;color:#5f6e7c!important;cursor:not-allowed!important;
}
.item-inventory-note{
 grid-column:1/-1!important;
 display:flex;flex-direction:column;gap:5px;
 padding:12px 14px;border:1px solid #cfe2f3;background:#f4f9fd;
 border-radius:10px;color:#31546f;font-size:12px;
}
.item-inventory-note b{color:#0d6fbd;font-size:14px}
.item-editor-actions{
 position:sticky!important;bottom:0!important;z-index:3!important;
 background:#fff!important;border-top:1px solid #dbe5ef!important;
 padding:14px 22px 18px!important;margin-top:14px!important;
 display:flex!important;gap:9px!important;justify-content:flex-start!important;
}
.item-editor-actions .btn{min-width:140px!important}
@media(max-width:900px){
 #itemEditorModal.item-editor-overlay{padding:10px!important}
 #itemEditorModal .item-editor-box{width:98vw!important;max-height:calc(100dvh - 20px)!important}
 .item-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:600px){
 .item-form-grid{grid-template-columns:1fr!important}
 .item-form-grid .span2{grid-column:span 1!important}
 .item-editor-actions{flex-wrap:wrap!important}
 .item-editor-actions .btn{flex:1 1 100%!important}
}


/* Stage 7.4.4.4 — Item editor viewport/modal positioning fix only */
#itemEditorModal.item-editor-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:10000!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  margin:0!important;
  padding:18px!important;
  box-sizing:border-box!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  direction:rtl!important;
}
#itemEditorModal.item-editor-overlay:not(.hide){
  display:flex!important;
}
#itemEditorModal .item-editor-box{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  float:none!important;
  margin:auto!important;
  width:min(1100px,calc(100vw - 36px))!important;
  max-width:calc(100vw - 36px)!important;
  min-width:0!important;
  height:auto!important;
  max-height:calc(100dvh - 36px)!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
}
#itemEditorModal .item-form-section,
#itemEditorModal .item-form-grid,
#itemEditorModal .field,
#itemEditorModal input,
#itemEditorModal select,
#itemEditorModal textarea{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#itemEditorModal .item-form-grid{
  width:100%!important;
}
#itemEditorModal .item-editor-head,
#itemEditorModal .item-editor-actions{
  width:100%!important;
  box-sizing:border-box!important;
}
@media(max-width:900px){
  #itemEditorModal.item-editor-overlay{padding:10px!important}
  #itemEditorModal .item-editor-box{
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
    max-height:calc(100dvh - 20px)!important;
  }
}


/* Stage 7.4.4.5 — Central Item Master finalization */
.item-legacy-hidden{display:none!important}
.item-code-preview input{font-weight:800!important;letter-spacing:.3px}


/* Stage 7.4.5.0 — Inventory Management */
.item-master-filters{grid-template-columns:2fr 1fr 1fr!important}
.inventory-toolbar{display:flex;align-items:center;gap:10px;margin:0 0 10px;flex-wrap:wrap}
.inventory-scope-note{font-size:11px;color:#5e7386;background:#eef6fb;border:1px solid #d8e7f2;border-radius:18px;padding:7px 11px}
.inventory-card{padding:14px!important}
.inventory-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.inventory-kpi{border:1px solid #dce6ee;border-radius:10px;background:#fff;padding:10px 13px;display:flex;align-items:center;justify-content:space-between}
.inventory-kpi span{font-size:10px;font-weight:700;color:#708394}
.inventory-kpi b{font-size:22px;color:#12385d}
.inventory-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:9px;margin-bottom:10px}
.inventory-filters input,.inventory-filters select{width:100%;min-height:40px;padding:8px 10px;border:1px solid #ccd6e0;border-radius:7px;background:#fff}
.inventory-tablebox{overflow:auto!important}
.inventory-state{display:inline-block;padding:5px 10px;border-radius:14px;font-weight:800;font-size:10px}
.inv-ok{background:#e8f7ee;color:#18743b}.inv-low{background:#fff4d8;color:#966300}.inv-zero{background:#fdebea;color:#a52d27}
.inventory-empty{text-align:center;padding:22px;color:#718096}
#inventoryEditorModal.inventory-editor-overlay{position:fixed!important;inset:0!important;z-index:10000!important;display:flex;align-items:center;justify-content:center;padding:18px;overflow:hidden}
#inventoryEditorModal.inventory-editor-overlay.hide{display:none!important}
.inventory-editor-box{width:min(900px,calc(100vw - 36px))!important;max-height:calc(100dvh - 36px)!important;overflow:auto!important;border-radius:16px!important}
.inventory-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:16px 18px}
.inventory-editor-grid .span2{grid-column:span 2}
.inventory-editor-hint{margin:0 18px 8px;padding:10px 12px;background:#f4f9fd;border:1px solid #d5e5f1;border-radius:8px;color:#526d82;font-size:11px}
@media(max-width:1000px){.inventory-kpis{grid-template-columns:repeat(2,1fr)}.inventory-filters{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.inventory-kpis,.inventory-filters,.inventory-editor-grid{grid-template-columns:1fr}.inventory-editor-grid .span2{grid-column:span 1}}


/* Stage 7.4.5.1 — Inventory retrieval/search fixes */
.inventory-item-picker-field{position:relative!important}
.inventory-item-matches{
 position:absolute;z-index:30;top:calc(100% - 2px);right:0;left:0;
 max-height:260px;overflow:auto;background:#fff;border:1px solid #c9d8e5;
 border-radius:0 0 10px 10px;box-shadow:0 12px 28px rgba(18,56,93,.16);
}
.inventory-item-option{
 width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;
 padding:9px 11px;display:grid;grid-template-columns:120px 1fr auto;gap:9px;
 align-items:center;text-align:right;cursor:pointer;color:#263c4f;
}
.inventory-item-option:hover{background:#f3f8fc}
.inventory-item-option b{color:#1266a5;text-align:left}
.inventory-item-option small{color:#718399;white-space:nowrap}
.inventory-item-no-match{padding:14px;text-align:center;color:#718399}
.inventory-item-selected{
 margin-top:7px;padding:8px 10px;border:1px solid #d7e7f2;background:#f5faff;
 border-radius:8px;display:flex;gap:10px;align-items:center;
}
.inventory-item-selected b{color:#1266a5}.inventory-item-selected span{font-weight:700}.inventory-item-selected small{color:#718399}
.inventory-row-flash{animation:inventoryFlash 2.2s ease}
@keyframes inventoryFlash{0%,100%{background:transparent}20%,70%{background:#fff7cf}}


/* Stage 7.4.5.2 — Item/Inventory/PR selection presentation */
#items .item-master-tablebox,#inventory .inventory-tablebox{min-height:120px!important}
#items .item-master-table tbody tr,#inventory .inventory-tablebox tbody tr{height:52px!important;background:#fff!important}
#items .item-master-table tbody td,#inventory .inventory-tablebox tbody td{padding:10px 9px!important;vertical-align:middle!important;border-bottom:1px solid #e7eef4!important;color:#243f55!important}
#items .item-master-table tbody tr:hover,#inventory .inventory-tablebox tbody tr:hover{background:#f6fafe!important}
#items .item-master-table tbody td:nth-child(2),#inventory .inventory-tablebox tbody td:nth-child(4){font-weight:800!important;color:#153e5e!important}

#itemPickerModal.item-picker-overlay{
 position:fixed!important;inset:0!important;z-index:10050!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 padding:22px!important;background:rgba(13,35,53,.42)!important;overflow:hidden!important;
}
#itemPickerModal.item-picker-overlay.hide{display:none!important}
#itemPickerModal .item-picker-box{
 width:min(1180px,calc(100vw - 44px))!important;max-height:calc(100dvh - 44px)!important;
 margin:0!important;position:relative!important;overflow:hidden!important;border-radius:16px!important;
 display:flex!important;flex-direction:column!important;background:#fff!important;
 box-shadow:0 24px 70px rgba(0,0,0,.24)!important;
}
#itemPickerModal .item-picker-head{padding:16px 18px!important;border-bottom:1px solid #e2eaf0}
#itemPickerModal .picker-project-context{margin:12px 18px 0;padding:9px 12px;border-radius:8px;background:#edf7ff;border:1px solid #cfe4f4;color:#45677e;font-size:11px}
#itemPickerModal .item-picker-filters{padding:0 18px!important;margin:12px 0!important}
#itemPickerModal .item-picker-table{margin:0 18px!important;max-height:none!important;overflow:auto!important;flex:1!important;min-height:220px}
#itemPickerModal .item-picker-table table{min-width:900px!important}
#itemPickerModal .item-picker-table tbody td{height:50px!important;padding:9px!important;vertical-align:middle!important}
#itemPickerModal .picker-item-name{text-align:right!important;font-weight:800;color:#173f5f}
#itemPickerModal .picker-unit{display:inline-block;background:#f1f5f8;border-radius:12px;padding:4px 9px;font-weight:700}
#itemPickerModal .picker-stock{display:inline-grid;place-items:center;min-width:40px;padding:5px 8px;border-radius:14px;font-weight:900}
#itemPickerModal .picker-stock.has-stock{background:#e9f8ef;color:#18763d}
#itemPickerModal .picker-stock.no-stock{background:#f2f4f6;color:#6f7d88}
#itemPickerModal .picker-empty{padding:28px!important;text-align:center!important;color:#718399!important}
#itemPickerModal .modalactions{padding:13px 18px!important;margin:0!important;border-top:1px solid #e2eaf0;background:#fafcfd}

.pr-items-tablebox{border:1px solid #dce6ee!important;border-radius:10px!important;overflow:auto!important}
.pr-items-table tbody tr{height:58px!important}
.pr-items-table tbody td{vertical-align:middle!important;border-bottom:1px solid #e6edf3!important}
.pr-item-description-cell{text-align:right!important}
.pr-item-description-cell>b{display:block;color:#173f5f;font-size:12px}
.pr-item-description-cell>small{display:block;margin-top:3px;color:#7a8d9d;font-size:9px}
.pr-master-code{display:inline-block;margin-bottom:4px;padding:2px 6px;border-radius:5px;background:#eef7ff;color:#1269a8;font-weight:900;font-size:9px}
.pr-fixed-unit{display:inline-block;padding:5px 9px;border-radius:14px;background:#edf6fb;color:#315d78;font-weight:800;white-space:nowrap}
.pr-qty-value{font-weight:900;font-size:13px;color:#183e5d}
.pr-master-item-row{background:#fbfdff}
@media(max-width:700px){
 #itemPickerModal.item-picker-overlay{padding:8px!important}
 #itemPickerModal .item-picker-box{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
}


/* Stage 7.4.5.3 — table layout stabilization
   The global sticky TH rule is intentionally disabled for these three data tables.
   It was visually moving THEAD over TBODY and hiding the first data row. */
#items .item-master-tablebox,
#inventory .inventory-tablebox,
#prCreate .pr-items-tablebox{
  position:relative!important;
  overflow:auto!important;
  max-height:none!important;
}

#items .item-master-table,
#inventory .inventory-table,
#prCreate .pr-items-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
}

#items .item-master-table thead,
#inventory .inventory-table thead,
#prCreate .pr-items-table thead{
  display:table-header-group!important;
  position:static!important;
}

#items .item-master-table thead th,
#inventory .inventory-table thead th,
#prCreate .pr-items-table thead th{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  transform:none!important;
  vertical-align:middle!important;
  height:42px!important;
  padding:9px 8px!important;
  background:#123f63!important;
  color:#fff!important;
  white-space:normal!important;
}

#items .item-master-table tbody,
#inventory .inventory-table tbody,
#prCreate .pr-items-table tbody{
  display:table-row-group!important;
  position:static!important;
}

#items .item-master-table tbody tr,
#inventory .inventory-table tbody tr,
#prCreate .pr-items-table tbody tr{
  display:table-row!important;
  position:static!important;
  height:auto!important;
  min-height:52px!important;
}

#items .item-master-table tbody td,
#inventory .inventory-table tbody td,
#prCreate .pr-items-table tbody td{
  display:table-cell!important;
  position:static!important;
  height:52px!important;
  padding:9px 8px!important;
  vertical-align:middle!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  line-height:1.45!important;
  border-bottom:1px solid #e4ebf1!important;
  background:inherit!important;
}

#items .item-master-table tbody tr:nth-child(even),
#inventory .inventory-table tbody tr:nth-child(even),
#prCreate .pr-items-table tbody tr:nth-child(even){background:#f8fafc!important}
#items .item-master-table tbody tr:nth-child(odd),
#inventory .inventory-table tbody tr:nth-child(odd),
#prCreate .pr-items-table tbody tr:nth-child(odd){background:#fff!important}

#items .item-master-tablebox{min-height:96px!important}
#inventory .inventory-tablebox{min-height:96px!important}
#inventory .inventory-table{min-width:1180px!important}
#items .item-master-table{min-width:980px!important}
#prCreate .pr-items-table{min-width:820px!important}

/* PR selected items — clear row model, no code floating above the header. */
#prCreate .pr-code-cell{text-align:center!important}
#prCreate .pr-master-code{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:88px!important;padding:4px 7px!important;border-radius:6px!important;
  background:#edf7ff!important;color:#1269a8!important;font-weight:900!important;
  font-size:10px!important;direction:ltr!important;
}
#prCreate .pr-manual-code{color:#9aa7b1!important}
#prCreate .pr-item-description-cell{text-align:right!important}
#prCreate .pr-item-description-cell b{
  display:block!important;color:#153e5e!important;font-size:12px!important;
  line-height:1.45!important;word-break:break-word!important;
}
#prCreate .pr-item-description-cell small{
  display:block!important;margin-top:3px!important;color:#7d8e9c!important;font-size:9px!important;
}
#prCreate .pr-fixed-unit{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;
  min-width:72px!important;padding:5px 9px!important;border-radius:14px!important;
  background:#edf6fb!important;color:#315d78!important;font-weight:800!important;white-space:nowrap!important;
}
#prCreate .unit-lock{font-size:9px!important}
#prCreate .pr-manual-unit{font-weight:700!important}
#prCreate .pr-qty-value{font-size:13px!important;font-weight:900!important;color:#183e5d!important}
#prCreate .pr-line-no{font-weight:800!important}

/* Make true empty-state messaging appear only under the table, never on top of a real row. */
#items #itemMasterEmpty.hide,
#inventory #inventoryEmpty.hide,
#prCreate #prItemsEmpty.hide{display:none!important}
#items #itemMasterEmpty,
#inventory #inventoryEmpty,
#prCreate #prItemsEmpty{
  position:static!important;
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
}

/* Keep the picker modal's internal header sticky only inside its own scrolling table. */
#itemPickerModal .item-picker-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
}


/* Stage 7.4.5.4 — PR item picker full-width landscape + inventory visibility */

/* The picker OUTER element also carries the generic .modal class.
   Reset every generic modal dimension so it fills the viewport instead of becoming a 560px side panel. */
#itemPickerModal.item-picker-overlay{
  position:fixed!important;
  inset:0!important;
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100vw!important;
  min-width:100vw!important;
  max-width:none!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:18px 28px!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(14,37,56,.42)!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
#itemPickerModal.item-picker-overlay.hide{display:none!important}

#itemPickerModal > .item-picker-box{
  position:relative!important;
  inset:auto!important;
  float:none!important;
  transform:none!important;
  width:min(1500px,calc(100vw - 56px))!important;
  min-width:0!important;
  max-width:1500px!important;
  height:auto!important;
  max-height:calc(100dvh - 36px)!important;
  margin:0 auto!important;
  padding:0!important;
  border:1px solid #d3e0e9!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 24px 70px rgba(0,0,0,.25)!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

#itemPickerModal .item-picker-head{
  flex:0 0 auto!important;
  min-height:58px!important;
  padding:13px 18px!important;
  box-sizing:border-box!important;
}
#itemPickerModal .picker-project-context{
  flex:0 0 auto!important;
  margin:10px 18px 0!important;
}
#itemPickerModal .item-picker-filters{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(300px,2.4fr) repeat(3,minmax(170px,1fr))!important;
  gap:9px!important;
  margin:10px 18px!important;
  padding:0!important;
}
#itemPickerModal .item-picker-table{
  flex:0 1 auto!important;
  width:auto!important;
  margin:0 18px!important;
  max-height:46dvh!important;
  min-height:150px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:1px solid #d9e5ed!important;
  border-radius:9px!important;
}
#itemPickerModal .item-picker-table table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
#itemPickerModal .item-picker-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  height:40px!important;
  padding:8px 6px!important;
  white-space:normal!important;
}
#itemPickerModal .item-picker-table tbody td{
  height:46px!important;
  padding:7px 6px!important;
  white-space:normal!important;
  overflow:visible!important;
}
#itemPickerModal .item-picker-table th:nth-child(1),
#itemPickerModal .item-picker-table td:nth-child(1){width:7%!important}
#itemPickerModal .item-picker-table th:nth-child(2),
#itemPickerModal .item-picker-table td:nth-child(2){width:14%!important}
#itemPickerModal .item-picker-table th:nth-child(3),
#itemPickerModal .item-picker-table td:nth-child(3){width:28%!important}
#itemPickerModal .item-picker-table th:nth-child(4),
#itemPickerModal .item-picker-table td:nth-child(4){width:15%!important}
#itemPickerModal .item-picker-table th:nth-child(5),
#itemPickerModal .item-picker-table td:nth-child(5){width:11%!important}
#itemPickerModal .item-picker-table th:nth-child(6),
#itemPickerModal .item-picker-table td:nth-child(6){width:12%!important}
#itemPickerModal .item-picker-table th:nth-child(7),
#itemPickerModal .item-picker-table td:nth-child(7){width:13%!important}
#itemPickerModal .pick-qty{
  width:82px!important;
  max-width:100%!important;
  min-height:34px!important;
  box-sizing:border-box!important;
}
#itemPickerModal .modalactions{
  flex:0 0 auto!important;
  position:static!important;
  margin:10px 0 0!important;
  padding:11px 18px 14px!important;
  background:#fff!important;
}

/* With a small item list (the normal case), the modal itself has no scrollbar.
   Only the item grid scrolls when the number of rows exceeds the available viewport. */
#itemPickerModal .item-picker-box::-webkit-scrollbar{display:none!important}

/* Inventory table: force a visible table body and readable rows. */
#inventory .inventory-table{
  display:table!important;
  width:100%!important;
  min-width:1180px!important;
}
#inventory .inventory-table tbody{
  display:table-row-group!important;
  visibility:visible!important;
  opacity:1!important;
  height:auto!important;
}
#inventory .inventory-table tbody tr{
  display:table-row!important;
  visibility:visible!important;
  opacity:1!important;
}
#inventory .inventory-table tbody td{
  display:table-cell!important;
  visibility:visible!important;
  opacity:1!important;
  color:#233f55!important;
}
#inventory .inventory-item-name{font-weight:800!important;color:#153e5e!important;text-align:right!important}

@media(max-width:900px){
 #itemPickerModal.item-picker-overlay{padding:8px!important}
 #itemPickerModal > .item-picker-box{
   width:calc(100vw - 16px)!important;
   max-height:calc(100dvh - 16px)!important;
 }
 #itemPickerModal .item-picker-filters{grid-template-columns:1fr 1fr!important}
 #itemPickerModal .item-picker-table{overflow-x:auto!important}
 #itemPickerModal .item-picker-table table{min-width:900px!important}
}


/* FLOWIX 7.5.0.0 — Material Issue Requests */
.mi-page-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}.mi-page-head h1{margin:0;color:#143d5c;font-size:23px}.mi-page-head .sub{margin-top:4px;color:#718496;font-size:11px}
.mi-form-card{margin-bottom:14px}.mi-form-top{display:grid;grid-template-columns:1.1fr repeat(4,minmax(0,1fr));gap:10px;align-items:end}.mi-number-card{height:66px;border:1px solid #d7e4ed;border-radius:9px;padding:9px 12px;background:#f8fbfd}.mi-number-card span{display:block;font-size:9px;color:#748797;margin-bottom:7px}.mi-number-card b{font-family:Arial,"Segoe UI",sans-serif;color:#1769aa;font-size:16px;direction:ltr}
.mi-form-grid{display:grid;grid-template-columns:1fr 1fr 2fr;gap:10px;margin:12px 0}.mi-form-grid .span2{grid-column:auto}.mi-stock-toolbar{display:flex;align-items:center;gap:12px;margin:9px 0}.mi-stock-toolbar span{font-size:10px;color:#718496}
.mi-items-table{min-width:1150px!important;width:100%!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important}.mi-items-table thead th{position:static!important;top:auto!important}.mi-items-table tbody td{height:58px!important;vertical-align:middle!important;padding:8px!important}.mi-item-name{text-align:right!important;font-weight:800!important;color:#153e5e!important}.mi-inline-input{width:76px!important;min-height:34px!important;border:1px solid #c7d5df!important;border-radius:6px!important;padding:5px!important;text-align:center!important}.mi-inline-select{min-width:105px;height:34px;border:1px solid #c7d5df;border-radius:6px;background:#fff}.mi-return-cell{display:grid;grid-template-columns:auto 90px minmax(130px,1fr);align-items:center;gap:5px}.mi-return-cell span{font-size:9px;color:#8a6414;font-weight:800}.mi-return-note{height:34px;border:1px solid #d8e1e8;border-radius:6px;padding:5px}.mi-no-return{display:inline-block;padding:5px 9px;background:#f1f4f6;color:#6e7d88;border-radius:12px;font-size:9px}.mi-empty{text-align:center;padding:20px;color:#718496}.mi-notes{margin-top:12px}.mi-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:12px}
.mi-list-filters{display:grid;grid-template-columns:2fr 1fr;gap:9px;margin-bottom:10px}.mi-list-filters input,.mi-list-filters select{height:40px;border:1px solid #ccd8e2;border-radius:7px;padding:7px 10px;background:#fff}.mi-list-table{min-width:980px!important}.mi-list-table thead th{position:static!important;top:auto!important}.mi-status{display:inline-block;padding:5px 9px;border-radius:13px;font-size:9px;font-weight:800}.mi-status.draft{background:#eef2f5;color:#5f707d}.mi-status.pending{background:#fff3d9;color:#8c6100}

#miItemPickerModal.mi-picker-overlay{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:18px 28px!important;border:0!important;border-radius:0!important;background:rgba(14,37,56,.42)!important;box-shadow:none!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:10060!important;overflow:hidden!important}
#miItemPickerModal.mi-picker-overlay.hide{display:none!important}
#miItemPickerModal>.mi-picker-box{width:calc(100vw - 28px)!important;max-width:none!important;height:calc(100dvh - 28px)!important;max-height:none!important;padding:0!important;overflow:hidden!important;border-radius:14px!important;display:flex!important;flex-direction:column!important}
#miItemPickerModal .modalhead{padding:14px 18px;border-bottom:1px solid #e1e9ef}.mi-picker-tools{display:grid;grid-template-columns:2fr 1fr;gap:9px;padding:11px 18px}.mi-picker-tools input,.mi-picker-tools select{height:40px;border:1px solid #cbd8e2;border-radius:7px;padding:7px 10px;background:#fff}.mi-picker-table{margin:0 18px;flex:1;max-height:none;overflow:auto!important;border:1px solid #d9e4ec;border-radius:8px}.mi-picker-table table{width:100%!important;min-width:950px!important;table-layout:fixed!important}.mi-picker-table thead th{position:sticky!important;top:0!important;z-index:2!important}.mi-picker-table tbody td{height:48px!important;vertical-align:middle!important}.mi-picker-table .mi-pick-qty{width:80px;height:34px;border:1px solid #c7d5df;border-radius:6px;text-align:center}.mi-picker-box .modalactions{padding:11px 18px 14px;margin:0;border-top:1px solid #e1e9ef;background:#fff}
@media(max-width:1000px){.mi-form-top{grid-template-columns:1fr 1fr}.mi-form-grid{grid-template-columns:1fr 1fr}.mi-form-grid .span2{grid-column:1/-1}}@media(max-width:650px){.mi-form-top,.mi-form-grid,.mi-list-filters{grid-template-columns:1fr}}


/* FLOWIX 7.5.0.1 — Material Issue UI refinement */
#materialIssue{padding-top:4px!important}
#materialIssue .mi-page-head{margin:0 0 8px!important}
#materialIssue .mi-form-card{padding:14px 16px!important;margin-bottom:12px!important}
#materialIssue .mi-form-top{
 grid-template-columns:1.05fr 1.7fr 1.25fr 1.25fr .9fr!important;
 gap:9px!important;
}
#materialIssue .mi-number-card{height:58px!important;padding:7px 11px!important}
#materialIssue .field label{margin-bottom:4px!important}
#materialIssue .field input,#materialIssue .field select{height:38px!important;min-height:38px!important}
#materialIssue .mi-form-grid{grid-template-columns:1fr 1.2fr 2.2fr!important;gap:9px!important;margin:9px 0!important}
#materialIssue .section{margin:8px 0 5px!important;padding-top:7px!important}
#materialIssue .mi-stock-toolbar{margin:5px 0 7px!important}
#materialIssue .mi-items-tablebox{max-height:265px!important;overflow:auto!important}
#materialIssue .mi-items-table tbody td{height:48px!important;padding:5px 7px!important}
#materialIssue .mi-empty{padding:13px!important}
#materialIssue .mi-notes{margin-top:8px!important}
#materialIssue .mi-notes textarea{min-height:58px!important;max-height:72px!important}
#materialIssue .mi-actions{margin-top:8px!important}
#materialIssue .mi-list-card{padding:12px 16px!important}
#materialIssue .mi-list-filters{margin-bottom:7px!important}
#materialIssue .mi-row-actions{display:flex;gap:5px;justify-content:center;align-items:center}

/* Keep native select menus visually aligned with FLOWIX fields. */
#materialIssue select{
 appearance:auto!important;
 background-color:#fff!important;
 border:1px solid #cbd8e2!important;
 border-radius:7px!important;
 padding-inline:10px!important;
 font-family:inherit!important;
 color:#173d59!important;
}

/* PDF rendering sheet — off-screen, not visible to user. */
.mi-pdf-sheet{position:fixed;left:-20000px;top:0;width:1400px;background:#fff;color:#18384f;font-family:Tahoma,Arial,sans-serif;padding:32px;box-sizing:border-box;direction:rtl}
.mi-pdf-brand{display:grid;grid-template-columns:170px 1fr 220px;align-items:center;border-bottom:4px solid #15476c;padding-bottom:14px;margin-bottom:16px}.mi-pdf-brand img{max-width:130px;max-height:80px;object-fit:contain}.mi-pdf-brand h2{margin:0 0 5px;font-size:27px;color:#15476c}.mi-pdf-brand>div:nth-child(2)>div{font-size:13px;color:#718596}.mi-pdf-no{border:1px solid #cddbe5;border-radius:8px;padding:10px 14px;text-align:center}.mi-pdf-no span,.mi-pdf-meta span,.mi-pdf-notes span,.mi-pdf-approval span{display:block;font-size:11px;color:#728596;margin-bottom:5px}.mi-pdf-no b{font-size:19px;color:#1472b6}
.mi-pdf-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:15px}.mi-pdf-meta>div{border:1px solid #d7e2ea;border-radius:7px;padding:8px 10px;min-height:50px}.mi-pdf-meta .wide{grid-column:span 2}.mi-pdf-meta b{font-size:13px}
.mi-pdf-sheet table{width:100%;border-collapse:collapse;margin:10px 0 15px}.mi-pdf-sheet th{background:#15476c;color:#fff;padding:9px 7px;font-size:12px}.mi-pdf-sheet td{border:1px solid #d7e2ea;padding:9px 7px;text-align:center;font-size:12px}.mi-pdf-notes{border:1px solid #d7e2ea;border-radius:7px;padding:9px 11px;min-height:55px;margin-bottom:14px}.mi-pdf-approval{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mi-pdf-approval>div{border:1px solid #cbd9e3;border-radius:7px;padding:9px 11px;text-align:center;min-height:52px}.mi-pdf-footer{text-align:center;border-top:1px solid #d7e2ea;margin-top:18px;padding-top:9px;color:#7b8c98;font-size:10px;direction:ltr}

@media(min-width:1200px){
 #materialIssue .mi-page-head h1{font-size:21px!important}
 #materialIssue .mi-page-head .sub{font-size:10px!important}
}

.project-profile-launch{display:grid;grid-template-columns:1fr auto;gap:9px;max-width:760px}.project-profile-overlay{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:18px!important;background:rgba(14,37,56,.45)!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:10100!important}.project-profile-overlay.hide{display:none!important}.project-profile-box{width:min(1250px,calc(100vw - 40px))!important;max-width:1250px!important;max-height:calc(100dvh - 36px)!important;padding:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}.project-profile-body{padding:14px 18px;overflow:auto}.project-profile-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.project-logo-row{display:flex;gap:14px;align-items:center;margin:10px 0}.project-logo-preview{width:160px;height:90px;border:1px dashed #bdccd7;display:flex;align-items:center;justify-content:center}.project-logo-preview img{max-width:145px;max-height:78px;object-fit:contain}#materialIssue .mi-list-table tbody{display:table-row-group!important;visibility:visible!important}#materialIssue .mi-list-table tbody tr{display:table-row!important;visibility:visible!important}#materialIssue .mi-list-table tbody td{display:table-cell!important;visibility:visible!important}.mi-return-auto{grid-template-columns:auto 55px minmax(140px,1fr)!important}.mi-pdf-brand-v2{grid-template-columns:180px 1fr 180px!important;text-align:center}.mi-pdf-logo-company,.mi-pdf-owner-logo{height:95px;display:flex;align-items:center;justify-content:center}.mi-pdf-logo-company img,.mi-pdf-owner-logo img{max-width:155px!important;max-height:85px!important;object-fit:contain}.mi-pdf-project-head{font-weight:700;line-height:1.7}.mi-pdf-no-row{width:220px;margin:0 0 12px auto}.mi-pdf-return-section h3{color:#15476c}.mi-pdf-signatures{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:18px}.mi-pdf-signatures>div{min-height:115px;border-top:2px solid #486c85;padding:10px;text-align:center}.mi-pdf-signatures b,.mi-pdf-signatures span{display:block;margin:8px 0}
/* FLOWIX 7.5.1.1 — Inventory exports + clean MI print */
.inventory-toolbar{flex-wrap:wrap}.inventory-export-btn{min-width:112px}
.inventory-pdf-sheet{position:fixed;left:-20000px;top:0;width:1500px;background:#fff;color:#173b55;padding:34px 42px;font-family:Tahoma,Arial,sans-serif;direction:rtl}
.inventory-pdf-head{display:grid;grid-template-columns:180px 1fr 120px;align-items:center;border-bottom:4px solid #164f76;padding-bottom:18px;margin-bottom:20px;text-align:center}.inventory-pdf-head img{max-width:150px;max-height:80px;object-fit:contain}.inventory-pdf-head h2{font-size:28px;margin:0 0 4px}.inventory-pdf-head small{display:block;margin-top:8px;color:#607b8e}.inventory-pdf-head>div:last-child b{display:block;font-size:28px}.inventory-pdf-head>div:last-child span{font-size:12px}.inventory-pdf-sheet table{width:100%;border-collapse:collapse;font-size:13px}.inventory-pdf-sheet th{background:#164f76;color:#fff;padding:10px 6px}.inventory-pdf-sheet td{border:1px solid #cbd7df;padding:9px 6px;text-align:center}.inventory-pdf-footer{text-align:center;border-top:1px solid #d7e0e6;margin-top:22px;padding-top:10px;font-size:10px;color:#82929e}
.mi-pdf-signatures{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:26px!important;margin:28px 12px 6px!important;page-break-inside:avoid!important}
.mi-pdf-signatures>.mi-signature-block{border:1px solid #d7e1e8!important;border-radius:8px!important;min-height:155px!important;padding:0 16px 16px!important;text-align:right!important;background:#fff!important;overflow:hidden}
.mi-signature-block>b{display:block!important;text-align:center!important;background:#f3f7fa!important;color:#174b70!important;font-size:15px!important;margin:0 -16px 18px!important;padding:10px 6px!important;border-bottom:1px solid #d7e1e8!important}
.mi-signature-fields{display:grid;gap:15px}.mi-signature-fields>span{display:grid!important;grid-template-columns:54px 1fr!important;align-items:end!important;gap:8px!important;margin:0!important}.mi-signature-fields em{font-style:normal;font-size:12px;color:#405d70;font-weight:700}.mi-signature-fields i{display:block;border-bottom:1px solid #536f82;height:18px}.mi-signature-fields .date-line{max-width:150px}


/* FLOWIX 7.5.1.2 — Maintenance Mode */
.maintenance-admin-card{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:6px;border:1px solid #d8e2e9;background:linear-gradient(135deg,#fff,#f8fbfd)}.maintenance-admin-card.hide{display:none!important}.maintenance-admin-copy{display:flex;align-items:center;gap:13px}.maintenance-admin-copy b{display:block;font-size:16px;color:#183f5a}.maintenance-admin-copy span{display:block;margin-top:5px;font-size:12px;color:#687f90}.maintenance-admin-icon{width:42px;height:42px;border-radius:10px;background:#edf4f8;display:grid;place-items:center;font-size:21px}.maintenance-admin-action{display:flex;align-items:center;gap:10px}.maintenance-state{padding:6px 11px;border-radius:20px;font-size:11px;font-weight:800}.maintenance-state.off{background:#edf5ef;color:#39714a}.maintenance-state.on{background:#fff0e8;color:#a14a21}.maintenance-toggle.danger{background:#a9472f!important;color:#fff!important;border-color:#a9472f!important}
.maintenance-overlay{position:fixed;inset:0;z-index:30000;background:rgba(12,31,46,.72);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:20px}.maintenance-overlay.hide{display:none!important}.maintenance-dialog{width:min(570px,calc(100vw - 32px));background:#fff;border-radius:20px;padding:30px 42px 24px;text-align:center;box-shadow:0 28px 80px rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.7)}.maintenance-logo{width:190px;max-height:88px;object-fit:contain;margin-bottom:10px}.maintenance-tool-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:#f0f5f8;margin:4px auto 12px;font-size:25px}.maintenance-dialog h2{margin:0;color:#174b70;font-size:22px}.maintenance-dialog h3{margin:0;color:#174b70;font-size:19px}.maintenance-dialog p{color:#607789;line-height:1.9;font-size:13px;margin:9px 0}.maintenance-divider{height:1px;background:#e2e9ee;margin:18px auto;width:80%}.maintenance-footer{margin-top:20px;padding-top:13px;border-top:1px solid #e4eaee;color:#8a9aa5;font-size:10px;direction:ltr}.maintenance-close-btn{margin-top:15px;min-width:130px}.maintenance-banner{position:fixed;z-index:20000;top:0;left:0;right:0;background:#9a4b27;color:#fff;text-align:center;padding:7px 12px;font-size:12px;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.18)}.maintenance-banner.hide{display:none!important}.maintenance-banner span{opacity:.9}


/* FLOWIX 7.5.1.4 — Multi-department Item Master */
.item-departments-field{align-self:start}.item-departments-tools{display:flex;justify-content:space-between;align-items:center;margin:3px 0 8px;padding:7px 9px;background:#f5f8fa;border:1px solid #dce5eb;border-radius:7px}.item-departments-tools label{font-size:12px;font-weight:700}.item-departments-tools small{color:#738796}.item-departments-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:180px;overflow:auto;border:1px solid #cbd8e2;border-radius:8px;padding:9px;background:#fff}.item-department-choice{display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid #e1e8ed;border-radius:6px;background:#fbfcfd;font-size:12px;cursor:pointer}.item-department-choice:hover{background:#f2f7fa}.item-department-choice input{width:15px;height:15px}.item-dept-chip{display:inline-block;padding:3px 7px;margin:2px;border-radius:12px;background:#edf4f8;color:#245572;font-size:10px;white-space:nowrap}
@media(max-width:800px){.item-departments-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* FLOWIX 7.5.2.0 — Approved warehouse/report refinements */
.item-departments-tools>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.item-dept-count{padding:5px 10px;border-radius:16px;background:#e8f2f8;color:#1f5879;font-size:11px;font-weight:800}.item-departments-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:220px;padding:10px}.item-department-choice{min-height:38px}.item-department-choice:has(input:checked){background:#edf6fb;border-color:#80b5d5;color:#174e70;font-weight:800}.item-departments-summary{margin-top:7px;min-height:34px;padding:7px 9px;border-radius:7px;background:#fafcfd;border:1px dashed #d2dee6;font-size:11px;color:#61798a}.mi-picker-box{width:min(1180px,calc(100vw - 32px))!important;max-width:1180px!important}.mi-picker-tools{display:grid!important;grid-template-columns:minmax(280px,1fr) 190px auto;gap:10px;align-items:center}.mi-picker-search-wrap{display:flex;align-items:center;border:1px solid #cad8e2;border-radius:8px;background:#fff;padding:0 10px}.mi-picker-search-wrap input{border:0!important;outline:0!important;width:100%;min-height:38px}.mi-picker-count{font-size:11px;font-weight:800;color:#567184;white-space:nowrap}.mi-picker-table{overflow-x:hidden!important}.mi-picker-table table{width:100%!important;min-width:0!important;table-layout:fixed}.mi-picker-table th:nth-child(1){width:7%}.mi-picker-table th:nth-child(2){width:14%}.mi-picker-table th:nth-child(3){width:28%}.mi-picker-table th:nth-child(4){width:10%}.mi-picker-table th:nth-child(5){width:18%}.mi-picker-table th:nth-child(6){width:11%}.mi-picker-table th:nth-child(7){width:12%}.mi-picker-table td{white-space:normal!important;overflow-wrap:anywhere}.mi-picker-table .mi-pick-qty{width:74px;max-width:100%}.warehouse-report-tabs{display:flex;gap:8px;margin:0 0 12px;flex-wrap:wrap}.warehouse-report-tabs button{border:1px solid #cbd9e3;background:#fff;border-radius:8px;padding:9px 16px;color:#496779;font-weight:800;cursor:pointer}.warehouse-report-tabs button.active{background:#174f74;color:#fff;border-color:#174f74}.warehouse-report-toolbar{display:grid;grid-template-columns:minmax(230px,1.45fr) repeat(5,minmax(150px,.8fr)) auto auto auto;gap:8px;align-items:center;margin-bottom:12px}.warehouse-report-toolbar input,.warehouse-report-toolbar select{min-height:38px}.warehouse-report-table{width:100%;border-collapse:collapse}.warehouse-report-table th{background:#edf4f8;color:#274f68;padding:9px 7px;font-size:11px}.warehouse-report-table td{padding:8px 7px;border-bottom:1px solid #e2e9ee;font-size:11px;text-align:center}.warehouse-report-tablebox{max-height:560px;overflow:auto}.wr-return-pill{display:inline-block;padding:4px 8px;border-radius:12px;font-weight:800;font-size:10px}.wr-return-pill.returned{background:#e9f5ed;color:#34734a}.wr-return-pill.pending{background:#fff3df;color:#9a6518}.mi-row-actions{display:flex;gap:5px;flex-wrap:wrap}.mi-status.closed{background:#e7f4eb;color:#357348}.mi-return-manager{width:min(900px,calc(100vw - 40px))!important}.mi-return-manager-body{display:grid;gap:9px;padding:12px 0}.mi-return-row{display:grid;grid-template-columns:1fr 120px 160px;gap:10px;align-items:center;border:1px solid #dce6ec;border-radius:8px;padding:10px}.mi-return-row b{display:block}.mi-return-row small{color:#6d8290}.mi-return-state{font-size:11px;font-weight:800}.mi-return-state.returned{color:#39764b}.mi-return-state.pending{color:#9c691d}.mi-pdf-manual-return{margin:12px 0 16px;border:1px solid #bccbd6;border-radius:7px;padding:11px 14px;font-size:13px;font-weight:800}.warehouse-pdf-sheet{position:fixed;left:-20000px;top:0;width:1500px;background:#fff;padding:34px 42px;color:#173b55;font-family:Tahoma,Arial,sans-serif;direction:rtl}.warehouse-pdf-sheet h2{text-align:center;color:#174f74}.warehouse-pdf-sheet table{width:100%;border-collapse:collapse;font-size:12px}.warehouse-pdf-sheet th{background:#174f74;color:#fff;padding:9px}.warehouse-pdf-sheet td{border:1px solid #ccd8e0;padding:7px;text-align:center}
@media(max-width:1050px){.item-departments-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.warehouse-report-toolbar{grid-template-columns:1fr 1fr 1fr}.mi-picker-tools{grid-template-columns:1fr 180px}.mi-picker-count{grid-column:1/-1}}


/* Stage 7.5.147.0 review refinements */
.project-profile-box{width:min(1180px,calc(100vw - 40px))!important;max-height:calc(100dvh - 32px)!important}.project-profile-body{overflow:auto!important;padding:16px 20px!important}.project-profile-body>.section{margin-top:18px!important;padding:10px 12px!important;background:#eef5fa!important;border-radius:8px!important;color:#174d70!important}.project-profile-grid{gap:12px!important}.project-logo-row{padding:14px!important;border:1px solid #dce7ef!important;border-radius:10px!important;background:#fbfdff!important}

.mi-view-box{width:min(1100px,calc(100vw - 40px))!important}.mi-view-body{padding:16px;display:grid;gap:16px}.mi-view-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.mi-view-grid>div{border:1px solid #dce7ef;border-radius:8px;padding:10px;background:#f8fbfd}.mi-view-grid span{display:block;font-size:12px;color:#667}.mi-view-grid b{display:block;margin-top:4px}@media(max-width:850px){.mi-view-grid{grid-template-columns:1fr 1fr}}

.mi-link-button{border:0;background:transparent;color:#0b68a6;cursor:pointer;text-decoration:underline;font:inherit;padding:2px 4px}
.mi-link-button:hover{color:#084d79}
body[data-flowix-page="materialIssue"] #miListBody tr:has(.btn.primary){background:#fffdf2}

body[data-flowix-page="materialIssue"] .mi-list-card{margin-top:14px}
body[data-flowix-page="materialIssue"].mi-operational-mode .mi-list-card{margin-top:0}
.mi-operational-banner{display:none}

/* Stage 7.5.147.0 — MI review modal + warehouse report usability */
#miViewModal{position:fixed!important;inset:0!important;z-index:12000!important;background:rgba(8,25,39,.62)!important;padding:14px!important;align-items:center!important;justify-content:center!important}
#miViewModal:not(.hide){display:flex!important}
#miViewModal .mi-view-box{width:min(1460px,calc(100vw - 28px))!important;height:min(900px,calc(100dvh - 28px))!important;max-width:none!important;max-height:none!important;margin:0!important;background:#fff!important;border-radius:14px!important;box-shadow:0 24px 70px rgba(0,0,0,.3)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#miViewModal .modalhead{flex:0 0 auto;padding:14px 18px!important;border-bottom:1px solid #dce6ed!important;background:#f8fbfd!important}
#miViewTitle{display:flex!important;align-items:center!important;gap:12px!important;font-size:18px!important}#miViewTitle>b{color:#0e5b8c!important}#miViewTitle>small{font-size:12px!important;background:#fff3cd!important;padding:5px 9px!important;border-radius:999px!important}
#miViewModal .mi-view-body{flex:1 1 auto!important;overflow:auto!important;padding:16px 18px!important;background:#f5f8fa!important}
#miViewModal #miViewActions{flex:0 0 auto!important;margin:0!important;padding:12px 18px!important;border-top:1px solid #dce6ed!important;background:#fff!important;display:flex!important;gap:9px!important;justify-content:flex-start!important;position:sticky!important;bottom:0!important}
.mi-detail-section{background:#fff;border:1px solid #dce6ed;border-radius:11px;padding:13px;margin-bottom:12px}.mi-detail-section-title{font-weight:800;color:#15476c;margin-bottom:5px;display:flex;justify-content:space-between}.mi-detail-section-title span{font-size:12px;font-weight:600;color:#687b89}.mi-detail-tablebox{max-height:none!important;overflow:auto!important}.mi-detail-notes>div:last-child{min-height:44px;white-space:pre-wrap}.mi-close-final{font-weight:800!important}
body.mi-view-open{overflow:hidden!important}
.warehouse-report-toolbar{grid-template-columns:minmax(260px,1.8fr) repeat(6,minmax(130px,1fr)) auto auto auto!important;align-items:end!important}
.wr-date-field{display:flex!important;flex-direction:column!important;gap:4px!important}.wr-date-field.hide{display:none!important}.wr-date-field span{font-size:11px;color:#607383;font-weight:700}.wr-date-field input{height:42px}
#itemPickerModal > .item-picker-box{width:min(1450px,calc(100vw - 24px))!important;max-width:none!important;height:min(900px,calc(100dvh - 24px))!important;max-height:none!important}
#itemPickerModal .item-picker-table{flex:1 1 auto!important;overflow:auto!important}
.project-profile-box{width:min(1400px,calc(100vw - 28px))!important;max-width:none!important}
@media(max-width:1200px){.warehouse-report-toolbar{grid-template-columns:repeat(3,minmax(160px,1fr))!important}}

/* Stage 7.5.147.0 — warehouse MI/returns final operational separation */
#miViewModal.modal{display:none!important;position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;padding:2.5vh 2.5vw!important;box-sizing:border-box!important;background:rgba(7,24,38,.66)!important;z-index:30000!important}
#miViewModal.modal:not(.hide){display:flex!important;align-items:center!important;justify-content:center!important}
#miViewModal.modal>.mi-view-box{position:relative!important;inset:auto!important;float:none!important;width:95vw!important;min-width:95vw!important;max-width:95vw!important;height:92dvh!important;min-height:80dvh!important;max-height:92dvh!important;margin:auto!important;transform:none!important;border-radius:14px!important}
#miViewModal .mi-view-body{width:100%!important;min-width:0!important;box-sizing:border-box!important}
#miViewModal .mi-view-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#miViewModal .mi-detail-tablebox{width:100%!important;overflow-x:hidden!important}
#miViewModal .mi-list-table{width:100%!important;table-layout:fixed!important}
#miViewModal .mi-list-table th,#miViewModal .mi-list-table td{white-space:normal!important;overflow-wrap:anywhere!important}
.mi-row-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;align-items:center!important;justify-content:center!important}
.mi-row-actions .btn{white-space:nowrap!important;margin:0!important}
#returns .returns-operational-card{padding:16px!important}.returns-summary{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:10px 12px;background:#f5f9fc;border:1px solid #dce6ed;border-radius:9px;margin-bottom:10px}.returns-summary span{font-size:12px;color:#647887}.returns-filters{display:grid;grid-template-columns:minmax(300px,1fr) 240px;gap:9px;margin-bottom:10px}.returns-tablebox{max-height:620px;overflow:auto}.return-done-label{font-weight:800;color:#3a7650}
@media(max-width:900px){#miViewModal .mi-view-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.returns-filters{grid-template-columns:1fr}.mi-row-actions{flex-wrap:wrap!important}}

/* Stage 7.5.147.0 — returns request-level queue and item-level receipt */
.wr-return-pill.partial{background:#fff3cd!important;color:#8a6200!important;border-color:#f1dda0!important}
.return-progress-text{font-size:11px;color:#6a7c89;margin-top:3px;white-space:nowrap}
#returnDetailModal.modal{display:none!important;position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;margin:0!important;padding:3vh 3vw!important;box-sizing:border-box!important;background:rgba(7,24,38,.66)!important;z-index:31000!important}
#returnDetailModal.modal:not(.hide){display:flex!important;align-items:center!important;justify-content:center!important}
#returnDetailModal>.return-detail-box{width:94vw!important;max-width:1450px!important;height:min(88dvh,860px)!important;max-height:88dvh!important;margin:auto!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:14px!important}
.return-detail-body{flex:1 1 auto;overflow:auto;padding:16px;background:#f5f8fa}
.return-detail-footer{flex:0 0 auto;padding:12px 16px;border-top:1px solid #dce6ed;background:#fff;display:flex;justify-content:flex-start}
.return-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:12px}.return-detail-summary>div{background:#fff;border:1px solid #dce6ed;border-radius:9px;padding:10px}.return-detail-summary span{display:block;font-size:11px;color:#6b7e8d;margin-bottom:4px}.return-detail-summary b{font-size:13px}
.return-progress-card{background:#fff;border:1px solid #dce6ed;border-radius:10px;padding:12px 14px;margin-bottom:12px}.return-progress-card>div{display:flex;justify-content:space-between;align-items:center}.return-progress-card p{margin:7px 0 0;color:#607483;font-size:12px}
.return-detail-tablebox{background:#fff;max-height:none!important;overflow:auto}.return-detail-tablebox table{width:100%;table-layout:auto}
body.return-detail-open{overflow:hidden!important}
@media(max-width:900px){.return-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.return-progress-text{white-space:normal}}

/* Stage 7.5.147.0 — unified warehouse table/date/quantity fixes */
.returns-tablebox,.warehouse-report-tablebox,.return-detail-tablebox{position:relative!important;overflow:auto!important}
.returns-tablebox .warehouse-report-table,.warehouse-report-tablebox .warehouse-report-table,.return-detail-tablebox .warehouse-report-table{border-collapse:separate!important;border-spacing:0!important}
.returns-tablebox .warehouse-report-table thead,.warehouse-report-tablebox .warehouse-report-table thead,.return-detail-tablebox .warehouse-report-table thead{position:relative!important;z-index:3!important}
.returns-tablebox .warehouse-report-table thead th,.warehouse-report-tablebox .warehouse-report-table thead th,.return-detail-tablebox .warehouse-report-table thead th{position:sticky!important;top:0!important;z-index:4!important;background:#edf4f8!important;box-shadow:0 1px 0 #d6e2e9!important;height:38px!important;vertical-align:middle!important}
.returns-tablebox .warehouse-report-table tbody td,.warehouse-report-tablebox .warehouse-report-table tbody td,.return-detail-tablebox .warehouse-report-table tbody td{position:relative!important;z-index:1!important;background:#fff!important;min-height:38px!important;vertical-align:middle!important}
.returns-tablebox .warehouse-report-table tbody tr:nth-child(even) td,.warehouse-report-tablebox .warehouse-report-table tbody tr:nth-child(even) td,.return-detail-tablebox .warehouse-report-table tbody tr:nth-child(even) td{background:#f9fbfc!important}
.wr-date-field{position:relative}.wr-date-field input[type=date]{direction:ltr!important;text-align:left!important;padding-bottom:16px!important}.wr-date-format{position:absolute;left:8px;bottom:2px;font-size:9px;color:#728594;pointer-events:none;direction:ltr}
.mi-quantity-table{min-width:1050px!important}.mi-qty-input{width:92px!important;min-width:78px!important;text-align:center!important}.mi-reason-input{width:180px!important;min-width:140px!important}

/* Stage 7.5.147.0 — partial return quantities, unavailable settlement, compact MI PDF */
.wr-return-pill.shortage{background:#fde9e7!important;color:#a13b31!important;border-color:#efc2bd!important}
.mi-pdf-sheet.mi-pdf-compact{padding:20px 28px!important}
.mi-pdf-compact .mi-pdf-brand{padding-bottom:8px!important;margin-bottom:8px!important}
.mi-pdf-compact .mi-pdf-brand img{max-height:60px!important}.mi-pdf-compact .mi-pdf-brand h2{font-size:23px!important}
.mi-pdf-compact .mi-pdf-meta{gap:6px!important;margin-bottom:8px!important}.mi-pdf-compact .mi-pdf-meta>div{padding:5px 8px!important;min-height:38px!important}
.mi-pdf-compact table{margin:6px 0 8px!important}.mi-pdf-compact th,.mi-pdf-compact td{padding:5px 5px!important;font-size:11px!important}
.mi-pdf-compact .mi-pdf-notes{padding:6px 8px!important;min-height:35px!important;margin-bottom:7px!important}
.mi-pdf-compact .mi-pdf-return-section h3{margin:6px 0!important;font-size:14px!important}.mi-pdf-compact .mi-pdf-manual-return{margin:6px 0!important}
.mi-pdf-compact .mi-pdf-signatures{margin:10px 8px 3px!important;gap:16px!important}.mi-pdf-compact .mi-pdf-signatures>.mi-signature-block{min-height:105px!important;padding:0 12px 8px!important}.mi-pdf-compact .mi-signature-block>b{font-size:12px!important;margin:0 -12px 8px!important;padding:6px!important}.mi-pdf-compact .mi-signature-fields{gap:7px!important}.mi-pdf-compact .mi-signature-fields i{height:12px!important}
.mi-pdf-compact .mi-pdf-footer{margin-top:6px!important;padding-top:5px!important}

/* Stage 7.5.147.0 — date presentation, strict project scope, UOM cleanup */
.wr-date-field{min-width:150px!important}
.wr-date-field input[type=text]{direction:ltr!important;text-align:center!important;font-family:Arial,Tahoma,sans-serif!important;font-size:13px!important;font-weight:700!important;letter-spacing:.3px!important;padding:8px 8px 18px!important}
.wr-date-field .wr-date-format{left:0!important;right:0!important;bottom:2px!important;text-align:center!important;font-size:9px!important;color:#8293a0!important}

/* Stage 7.5.147.0 — unified modal/UI readability fixes */
.modalback{
 position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
 padding:18px 24px!important;box-sizing:border-box!important;background:rgba(7,24,38,.68)!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 overflow:auto!important;z-index:32000!important;
}
.modalback.hide{display:none!important}
.modalback>.modal{
 position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;
 width:min(1180px,calc(100vw - 48px))!important;max-width:1180px!important;
 max-height:calc(100dvh - 36px)!important;margin:auto!important;transform:none!important;
 background:#fff!important;opacity:1!important;border-radius:14px!important;
 box-shadow:0 24px 70px rgba(0,0,0,.35)!important;overflow:auto!important;
}
.modalback>.modal.procurement-modal,.modalback>.modal.delivery-modal,.modalback>.modal.transactions-modal{
 width:min(1220px,calc(100vw - 48px))!important;max-width:1220px!important;
}
.modalback .proc-modal-head{
 position:sticky!important;top:0!important;z-index:8!important;background:#fff!important;
 padding-top:4px!important;border-bottom:1px solid #dde7ee!important;
}
.modalback .proc-modal-head h2{margin:0!important;color:#163f5d!important;font-size:20px!important}
.modalback .proc-modal-head .meta{
 color:#244e6b!important;font-weight:800!important;font-size:13px!important;line-height:1.45!important;
}
.modalback .proc-modal-head .meta,.modalback .proc-group-prs,.receipt-reference-card b,
.transaction-ref-row b{font-variant-numeric:tabular-nums!important}
.modalback .proc-group-prs span,.receipt-reference-card b,.transaction-ref-row b{
 direction:ltr!important;unicode-bidi:isolate!important;color:#0b5f94!important;font-weight:900!important;
}

/* Standalone FLOWIX modals: opaque white box + strong overlay + always-visible title. */
#miItemPickerModal.mi-picker-overlay,#miReturnModal.mi-picker-overlay,
#returnDetailModal.modal,#miViewModal.modal,
.item-picker-overlay,.item-editor-overlay,.inventory-editor-overlay,.project-profile-overlay{
 background:rgba(7,24,38,.68)!important;
}
#miItemPickerModal>.mi-picker-box,#miReturnModal>.mi-return-manager,
#returnDetailModal>.return-detail-box,#miViewModal>.mi-view-box,
.item-picker-box,.item-editor-box,.inventory-editor-box,.project-profile-box{
 background:#fff!important;opacity:1!important;
}
#returnDetailModal .modalhead,#miItemPickerModal .modalhead,#miReturnModal .modalhead,
#miViewModal .modalhead,.item-picker-head,.item-editor-head,.inventory-editor-box>.modalhead,
.project-profile-box>.modalhead{
 position:sticky!important;top:0!important;z-index:12!important;background:#fff!important;
}
#returnDetailTitle,#miViewTitle,#miReturnModal .modalhead b,#miItemPickerModal .modalhead b{
 color:#163f5d!important;font-size:18px!important;font-weight:900!important;
}

/* Material issue form: give project/department enough room and keep visible text readable. */
#materialIssue .mi-form-top{
 grid-template-columns:1fr 2.35fr 1.35fr 1.45fr .9fr!important;
}
#materialIssue #miProject,#materialIssue #miDepartment{
 font-size:13px!important;font-weight:700!important;text-overflow:ellipsis!important;
}
#materialIssue #miProject{min-width:0!important}
#materialIssue .mi-items-table{min-width:1180px!important;table-layout:auto!important}
#materialIssue .mi-items-table th,#materialIssue .mi-items-table td{
 white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;
}
#materialIssue .mi-items-table th:nth-child(8),#materialIssue .mi-items-table td:nth-child(8){min-width:270px!important}
#materialIssue .mi-return-cell{
 display:grid!important;grid-template-columns:82px 42px minmax(150px,1fr)!important;
 align-items:center!important;gap:7px!important;min-width:255px!important;
}
#materialIssue .mi-return-cell span{white-space:nowrap!important;writing-mode:horizontal-tb!important}
#materialIssue .mi-return-note{min-width:150px!important;width:100%!important}

/* Consistent Latin digits for visible numeric fields and reference codes. */
input[inputmode="decimal"],input[type="number"],[dir="ltr"],.mi-number-card b,
#receiptQT,#receiptPO,#transactionsQT,.proc-group-prs span{
 font-family:Arial,Tahoma,sans-serif!important;font-variant-numeric:tabular-nums!important;
}

.proc-pr-ref{display:inline-block;color:#0b5f94!important;font-size:15px!important;font-weight:900!important;direction:ltr!important;unicode-bidi:isolate!important}

/* Stage 7.5.147.0 — warehouse inventory report filters */
.warehouse-report-toolbar #wrWarehouse,.warehouse-report-toolbar #wrInventoryStatus{min-width:160px}
@media(max-width:1250px){.warehouse-report-toolbar{grid-template-columns:repeat(3,minmax(180px,1fr))}}
@media(max-width:760px){.warehouse-report-toolbar{grid-template-columns:1fr}}

/* Stage 7.5.147.0 — receipts report correction */
#warehouseReports .warehouse-report-toolbar{
 grid-template-columns:minmax(240px,1.4fr) repeat(6,minmax(145px,.8fr)) auto auto auto!important;
 align-items:end!important;
}
#warehouseReports .warehouse-report-toolbar>.btn{width:auto!important;min-width:92px!important;white-space:nowrap!important}
#warehouseReports .warehouse-report-toolbar #wrReceiptView{min-width:185px!important}
#warehouseReports .warehouse-report-toolbar #wrReceiptStatus{min-width:165px!important}
@media(max-width:1450px){
 #warehouseReports .warehouse-report-toolbar{grid-template-columns:repeat(4,minmax(170px,1fr))!important}
 #warehouseReports .warehouse-report-toolbar>.btn{width:100%!important}
}
@media(max-width:850px){
 #warehouseReports .warehouse-report-toolbar{grid-template-columns:repeat(2,minmax(160px,1fr))!important}
}
@media(max-width:520px){
 #warehouseReports .warehouse-report-toolbar{grid-template-columns:1fr!important}
}

/* Stage 7.5.147.0 — receipts report presentation */
#warehouseReports .warehouse-report-toolbar{
  display:grid!important;
  grid-template-columns:minmax(250px,1.6fr) repeat(5,minmax(150px,1fr))!important;
  gap:8px!important;
  align-items:end!important;
}
#warehouseReports .warehouse-report-toolbar>input,
#warehouseReports .warehouse-report-toolbar>select,
#warehouseReports .warehouse-report-toolbar>label,
#warehouseReports .warehouse-report-toolbar>.btn{
  min-width:0!important;width:100%!important;box-sizing:border-box!important;
}
#warehouseReports .warehouse-report-toolbar>.btn{min-height:40px!important;white-space:nowrap!important}
#warehouseReports .warehouse-report-tablebox{overflow:auto!important}
#warehouseReports .warehouse-receipts-table{
  min-width:1850px!important;
  table-layout:auto!important;
}
#warehouseReports .warehouse-receipts-table th,
#warehouseReports .warehouse-receipts-table td{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  vertical-align:middle!important;
}
#warehouseReports .warehouse-receipts-table th:nth-child(1),
#warehouseReports .warehouse-receipts-table td:nth-child(1){min-width:145px!important}
#warehouseReports .warehouse-receipts-table th:nth-child(2),
#warehouseReports .warehouse-receipts-table td:nth-child(2){min-width:135px!important}
#warehouseReports .warehouse-receipts-table th:nth-child(3),
#warehouseReports .warehouse-receipts-table td:nth-child(3){min-width:125px!important}
#warehouseReports .warehouse-receipts-table th:nth-child(4),
#warehouseReports .warehouse-receipts-table td:nth-child(4){min-width:220px!important;white-space:normal!important}
#warehouseReports .warehouse-receipts-table th:nth-child(8),
#warehouseReports .warehouse-receipts-table td:nth-child(8){min-width:180px!important;white-space:normal!important}
#warehouseReports .warehouse-receipts-table th:nth-child(16),
#warehouseReports .warehouse-receipts-table td:nth-child(16){min-width:155px!important}
#warehouseReports .warehouse-receipts-table .wr-ref{
  direction:ltr!important;unicode-bidi:isolate!important;font-family:Arial,Tahoma,sans-serif!important;font-weight:800!important;
}
#warehouseReports .warehouse-receipts-table .wr-date{
  direction:ltr!important;unicode-bidi:isolate!important;font-family:Arial,Tahoma,sans-serif!important;
}
@media(max-width:1200px){
  #warehouseReports .warehouse-report-toolbar{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
}
@media(max-width:720px){
  #warehouseReports .warehouse-report-toolbar{grid-template-columns:1fr!important}
}

/* Stage 7.5.147.0 — receipts summary/detail */
#warehouseReports .warehouse-receipts-table.wr-summary{min-width:1350px!important}
#warehouseReports .warehouse-receipts-table.wr-detail{min-width:1850px!important}

/* Stage 7.5.147.0 — receipt report by quotation */
#warehouseReports .warehouse-receipts-table.wr-summary{min-width:1050px!important}
#warehouseReports .warehouse-receipts-table.wr-items{min-width:1450px!important}
#warehouseReports .warehouse-receipts-table.wr-summary th:first-child,
#warehouseReports .warehouse-receipts-table.wr-summary td:first-child{
  min-width:170px!important;font-weight:800!important;direction:ltr!important;unicode-bidi:isolate!important;
}

/* Stage 7.5.147.0 — header navigation, PDF logo hierarchy, maintenance layout */
header{padding-inline:2.2%!important;gap:14px!important}
header nav{flex:1 1 auto!important;min-width:0!important;justify-content:center!important;gap:8px!important}
header nav>button,header nav>.nav-more-wrap>button{min-width:108px!important;padding:10px 13px!important}
header .userbox-modern{flex:0 0 220px!important;min-width:220px!important;position:relative!important;z-index:1305!important}
.header-brand-textual{flex:0 0 168px!important;min-width:168px!important}
.nav-more-wrap{position:relative!important;display:block}.nav-more-wrap.hide{display:none!important}
.nav-more-menu{position:absolute!important;top:calc(100% + 8px)!important;left:0!important;width:210px!important;padding:7px!important;background:#fff!important;border:1px solid #d5e0e8!important;border-radius:10px!important;box-shadow:0 14px 32px rgba(10,35,55,.22)!important;z-index:5000!important;direction:rtl!important}
.nav-more-menu.hide{display:none!important}.nav-more-menu button{display:flex!important;width:100%!important;min-width:0!important;justify-content:flex-start!important;gap:8px!important;margin:2px 0!important;padding:10px 12px!important;background:#fff!important;color:#12385d!important;border:0!important;border-radius:7px!important;text-align:right!important}.nav-more-menu button:hover{background:#eef5fa!important}.nav-more-menu button.active{background:#e6f1f8!important;color:#0d547d!important;box-shadow:none!important}.nav-more-menu button.hide{display:none!important}
.maintenance-sequence{line-height:1.7!important}.maintenance-row{gap:14px!important;padding:12px 0!important}.maintenance-row-operational{display:block!important}.maintenance-copy{margin-bottom:10px!important}.maintenance-reset-list{display:grid!important;gap:7px!important;max-width:920px!important}.maintenance-reset-list>div{display:grid!important;grid-template-columns:minmax(0,1fr) 92px!important;align-items:center!important;gap:14px!important;padding:9px 11px!important;border:1px solid #e2e9ee!important;border-radius:8px!important;background:#fbfdfe!important}.maintenance-reset-list strong{display:block!important;color:#294b62!important;font-size:12px!important}.maintenance-reset-list small{display:block!important;margin-top:3px!important;color:#718393!important}.maintenance-reset-list .btn{min-width:82px!important}.maintenance-actions>.maintenance-row:not(.maintenance-row-operational){display:grid!important;grid-template-columns:minmax(0,1fr) 120px!important;align-items:center!important}
.mi-pdf-brand-v2{direction:rtl!important;grid-template-columns:190px 1fr 190px!important}.mi-pdf-logo-company,.mi-pdf-owner-logo{width:190px!important;height:100px!important;display:flex!important;align-items:center!important;justify-content:center!important}.mi-pdf-logo-company img{max-width:155px!important;max-height:82px!important;width:auto!important;height:auto!important;object-fit:contain!important}.mi-pdf-owner-logo img{max-width:178px!important;max-height:94px!important;width:auto!important;height:auto!important;object-fit:contain!important}
@media(max-width:1250px){header nav>button,header nav>.nav-more-wrap>button{min-width:96px!important;padding-inline:10px!important;font-size:11px!important}.header-brand-textual{flex-basis:150px!important;min-width:150px!important}header .userbox-modern{flex-basis:205px!important;min-width:205px!important}}
@media(max-width:900px){header nav>button{display:none!important}.nav-more-wrap{display:block!important}.nav-more-wrap.hide{display:block!important}header .userbox-modern{flex-basis:190px!important;min-width:190px!important}.maintenance-actions>.maintenance-row:not(.maintenance-row-operational),.maintenance-reset-list>div{grid-template-columns:1fr!important}.maintenance-reset-list .btn{justify-self:start!important}}


/* Stage 7.5.147.0 — header user area correction */
header{
  min-height:74px!important;
  height:74px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  align-items:center!important;
  overflow:visible!important;
}
header .userbox-modern{
  height:74px!important;
  min-height:74px!important;
  max-height:74px!important;
  margin:0!important;
  padding:6px 0!important;
  box-sizing:border-box!important;
  align-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
}
header .userbox-modern .userbox-info,
header .userbox-modern .user-info,
header .userbox-modern>div{
  min-height:0!important;
  margin:0!important;
}
header .userbox-modern h3,
header .userbox-modern .username,
header .userbox-modern .user-name{
  margin:0 0 1px!important;
  line-height:1.15!important;
  font-size:13px!important;
}
header .userbox-modern small,
header .userbox-modern .role,
header .userbox-modern .user-role{
  line-height:1.1!important;
  margin:0!important;
}
header .userbox-modern .user-actions,
header .userbox-modern .userbox-actions{
  margin-top:3px!important;
  gap:5px!important;
  line-height:1!important;
}
header .userbox-modern button,
header .userbox-modern .pill,
header .userbox-modern a{
  line-height:1.15!important;
}
header nav{
  height:74px!important;
  align-items:center!important;
}
header nav>button,
header nav>.nav-more-wrap>button{
  align-self:center!important;
  margin-top:0!important;
  margin-bottom:0!important;
}


/* Stage 7.5.147.0 — final header user block */
header .userbox-modern.userbox-clean{
  flex:0 0 245px!important;
  min-width:245px!important;
  height:74px!important;
  min-height:74px!important;
  max-height:74px!important;
  padding:7px 0!important;
  margin:0!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:5px!important;
  overflow:visible!important;
}
header .userbox-clean .user-name-row{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-height:20px!important;
}
header .userbox-clean .username{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
header .userbox-clean .user-quick{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  white-space:nowrap!important;
  line-height:1!important;
}
header .userbox-clean .server-chip,
header .userbox-clean .account-chip,
header .userbox-clean .logout-chip{
  display:inline-flex!important;
  align-items:center!important;
  min-height:22px!important;
  height:22px!important;
  padding:0 7px!important;
  margin:0!important;
  border-radius:11px!important;
  font-size:10px!important;
  line-height:22px!important;
}
header .userbox-clean .user-divider{
  display:inline-block!important;
  color:rgba(255,255,255,.38)!important;
  font-size:12px!important;
  line-height:1!important;
  margin:0 1px!important;
}
header .userbox-clean .roleline,
header .user-avatar{display:none!important}
@media(max-width:1250px){
  header .userbox-modern.userbox-clean{flex-basis:225px!important;min-width:225px!important}
  header .userbox-clean .username{font-size:13px!important}
  header .userbox-clean .server-chip,
  header .userbox-clean .account-chip,
  header .userbox-clean .logout-chip{font-size:9.5px!important;padding-inline:6px!important}
}


/* Stage 7.5.147.0 — ONLY: keep logout in user second row */
header .userbox-clean .user-quick{
  flex-wrap:nowrap!important;
  overflow:visible!important;
}
header .userbox-clean .logout-chip{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  float:none!important;
  clear:none!important;
  flex:0 0 auto!important;
  margin:0!important;
  align-self:center!important;
}


/* Stage 7.5.147.0 — adaptive navigation layout */
header nav{
  flex-wrap:nowrap!important;
  overflow:visible!important;
  white-space:nowrap!important;
}
header nav>button,
header nav>.nav-more-wrap{
  flex:0 0 auto!important;
}


/* Stage 7.5.147.0 — ONLY: enlarge owner logo in Material Issue PDF */
.mi-pdf-brand-v2 .mi-pdf-owner-logo{
  width:235px!important;
  height:120px!important;
}
.mi-pdf-brand-v2 .mi-pdf-owner-logo img{
  max-width:225px!important;
  max-height:118px!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
}


/* Stage 7.5.147.0 — MI print typography settings */
.mi-pdf-sheet{font-family:var(--mi-form-font,Arial),sans-serif!important}
.mi-pdf-project-head>div{font-size:var(--mi-header-size,10px)!important}
.mi-pdf-footer{font-size:var(--mi-footer-size,8px)!important}


/* Stage 7.5.147.0 — centralized forms/reports print settings */
.print-settings-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 14px}
.print-settings-tabs button{border:1px solid #cddce7;background:#fff;color:#28506d;border-radius:8px;padding:9px 14px;font-weight:800;cursor:pointer}
.print-settings-tabs button.active{background:#174f74;color:#fff;border-color:#174f74}
.project-print-panel{border:1px solid #dce7ef;border-radius:10px;background:#fbfdff;padding:14px;margin-bottom:14px}
.project-print-panel textarea{min-height:210px!important;height:210px!important;resize:vertical!important;line-height:1.65!important}
.warehouse-pdf-preamble{text-align:center;line-height:1.5;margin-bottom:6px}
.warehouse-pdf-footer{text-align:center;margin-top:14px;color:#718096}


/* Stage 7.5.147.0 — complete print-setting linkage */
.return-detail-actions{display:flex;justify-content:flex-start;margin-bottom:10px}
.mr-pdf-sheet{position:fixed;left:-20000px;top:0;width:1500px;background:#fff;padding:32px 40px;color:#173b55;direction:rtl}
.mr-pdf-head{display:grid;grid-template-columns:220px 1fr 220px;align-items:center;border-bottom:3px solid #174f74;padding-bottom:12px;margin-bottom:12px}
.mr-pdf-head img{max-width:200px;max-height:100px;width:auto;height:auto;object-fit:contain}.mr-owner,.mr-company{display:flex;justify-content:center;align-items:center}.mr-preamble{text-align:center;line-height:1.55;font-weight:800}.mr-pdf-no{text-align:center;margin:8px 0 12px}.mr-pdf-no b{margin-inline-start:10px}.mr-pdf-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.mr-pdf-meta>div{border:1px solid #d5e0e8;border-radius:6px;padding:8px}.mr-pdf-meta span{display:block;font-size:10px;color:#657c8f}.mr-pdf-meta b{display:block;margin-top:3px}.mr-pdf-sheet table{width:100%;border-collapse:collapse;font-size:11px}.mr-pdf-sheet th{background:#174f74;color:#fff;padding:8px;border:1px solid #b7c6d2}.mr-pdf-sheet td{border:1px solid #d5dee6;padding:7px;text-align:center}.mr-pdf-footer{text-align:center;margin-top:14px;color:#718096}
.pdf-report-preamble,.inventory-pdf-preamble{text-align:center;line-height:1.5;margin-bottom:5px}


/* Stage 7.5.147.0 — native editable preamble fields */
#ppMiHeader,#ppMrHeader{
  user-select:text!important;
  -webkit-user-select:text!important;
  cursor:text!important;
  pointer-events:auto!important;
  touch-action:manipulation;
  white-space:pre-wrap;
  overflow-y:auto;
}
#ppMiHeader::selection,#ppMrHeader::selection{background:Highlight;color:HighlightText}


/* Stage 7.5.147.0 — clear PDF actions */
.mi-page-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#miTopPdfBtn,.return-pdf-primary{font-weight:900!important;min-height:40px;padding-inline:16px!important}
.return-detail-actions{position:sticky;top:0;z-index:3;background:#fff;padding:8px 0 10px;margin-bottom:5px;border-bottom:1px solid #e4ebf1}


/* Stage 7.5.147.0 — printable numeric consistency */
#prPdfTemp,[class*="pdf-sheet"],#pdfRenderArea{font-variant-numeric:tabular-nums}


/* Stage 7.5.147.0 — English digits throughout UI + PDF */
input[type="number"],input[dir="ltr"],[dir="ltr"]{font-variant-numeric:tabular-nums}
.mi-items-table input,.return-detail-tablebox input,.warehouse-report-table input{font-family:Arial,Tahoma,sans-serif;font-variant-numeric:tabular-nums}


/* Stage 7.5.147.0 — force ASCII rendering in MI/MR numeric edit fields */
input[data-flowix-ascii-numeric="1"]{
 direction:ltr!important;
 text-align:center!important;
 unicode-bidi:isolate!important;
 font-family:Arial,"Segoe UI",Tahoma,sans-serif!important;
 font-variant-numeric:tabular-nums!important;
}


/* Stage 7.5.147.0 — source-level ASCII numeric fields */
.ascii-num-input{
  direction:ltr!important;
  unicode-bidi:plaintext!important;
  text-align:center!important;
  font-family:Arial,"Segoe UI",sans-serif!important;
  font-variant-numeric:lining-nums tabular-nums!important;
  -webkit-locale:"en";
}


/* Stage 7.5.147.0 — exact MI detail modal numeric fix */
#miViewModal .ascii-num-input{
  direction:ltr!important;
  unicode-bidi:isolate!important;
  text-align:center!important;
  font-family:Arial,"Segoe UI",sans-serif!important;
  font-feature-settings:"lnum" 1,"tnum" 1!important;
  font-variant-numeric:lining-nums tabular-nums!important;
}


/* Stage 7.5.147.0 — maintenance user access control */
.maintenance-admin-card{display:block!important}.maintenance-admin-card.hide{display:none!important}
.maintenance-admin-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.maintenance-access-panel{margin-top:14px;padding-top:14px;border-top:1px solid #dce7ef}
.maintenance-access-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto auto auto;gap:8px;align-items:center}
.maintenance-access-toolbar input{height:40px;border:1px solid #cbd9e4;border-radius:8px;padding:8px 11px}
.maintenance-access-hint{font-size:11px;color:#687c8d;margin:9px 0}
.maintenance-users-list{max-height:330px;overflow:auto;border:1px solid #dce7ef;border-radius:9px;background:#fbfdff;padding:6px}
.maintenance-user-row{display:grid;grid-template-columns:28px 1fr 72px;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #edf2f5;cursor:pointer}
.maintenance-user-row:last-child{border-bottom:0}.maintenance-user-row input{width:18px;height:18px}
.maintenance-user-row span b,.maintenance-user-row span small{display:block}.maintenance-user-row span small{color:#718496;margin-top:2px}
.maintenance-user-row em{font-style:normal;text-align:center;font-size:10px;font-weight:800;color:#496478}
.maintenance-access-empty{text-align:center;padding:22px;color:#718496}
@media(max-width:900px){.maintenance-admin-head{align-items:flex-start;flex-direction:column}.maintenance-access-toolbar{grid-template-columns:1fr 1fr}.maintenance-access-toolbar input{grid-column:1/-1}}


/* Stage 7.5.147.0 — verified compact maintenance indicator */
.maintenance-mini-card{
 position:fixed;
 top:184px;
 left:18px;
 width:max-content;
 max-width:300px;
 z-index:15000;
 display:flex;
 align-items:center;
 gap:8px;
 padding:8px 12px;
 border:1px solid #e6b27d;
 border-radius:9px;
 background:#fff8ef;
 color:#8d481e;
 box-shadow:0 3px 12px rgba(35,55,70,.12);
 font-size:10px;
 line-height:1.25;
 direction:rtl;
}
.maintenance-mini-card[hidden]{display:none!important}
.maintenance-mini-card b{font-size:10.5px;white-space:nowrap}
.maintenance-mini-card span{font-size:8.5px;opacity:.72;white-space:nowrap;direction:ltr}
@media(max-width:700px){
 .maintenance-mini-card{top:178px;left:8px;max-width:230px;padding:7px 9px}
 .maintenance-mini-card span{display:none}
}


/* Stage 7.5.147.0 — Item Types administration screen only */
.item-types-toolbar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:10px 0 12px}
.item-types-toolbar input{min-width:260px;max-width:480px;flex:1;height:40px;border:1px solid #cbd9e4;border-radius:8px;padding:8px 10px}
.item-types-table th,.item-types-table td{vertical-align:middle}
@media(max-width:720px){.item-types-toolbar{align-items:stretch;flex-direction:column}.item-types-toolbar input{max-width:none;width:100%}}


#itemTypeAdminModal[hidden],#itemTypeAdminModal.hide{display:none!important}
#itemTypeAdminModal:not([hidden]):not(.hide){display:flex!important}

/* Stage 7.5.147.0 — compact standalone Item Types screen */
body[data-flowix-page="itemTypes"] #flowixPageIdentity{margin-bottom:0}
body[data-flowix-page="itemTypes"] main.wrap{padding-top:8px}
body[data-flowix-page="itemTypes"] #itemTypes .title{margin:4px 0 8px}
body[data-flowix-page="itemTypes"] #itemTypes .title .sub{margin-top:2px}
body[data-flowix-page="itemTypes"] #itemTypes .item-master-toolbar{margin:0 0 8px}
body[data-flowix-page="itemTypes"] #itemTypes .card{margin-top:0}
body[data-flowix-page="itemTypes"] #itemTypes .item-types-toolbar{margin:0 0 8px;justify-content:flex-start}
body[data-flowix-page="itemTypes"] #itemTypes #itemTypeSearch{max-width:420px;min-width:260px}
body[data-flowix-page="itemTypes"] #itemTypes .report-head{padding:8px 10px}
@media(max-width:720px){
 body[data-flowix-page="itemTypes"] #itemTypes #itemTypeSearch{max-width:none;min-width:0;width:100%}
}

/* Stage 7.5.147.0 — Item Types modal DOM fix */
#itemTypeAdminModal[hidden],#itemTypeAdminModal.hide{display:none!important}
#itemTypeAdminModal:not([hidden]):not(.hide){display:flex!important}
#itemTypeAdminModal .item-type-admin-box{width:min(560px,94vw)!important;max-width:560px!important}
#itemTypeAdminModal .item-type-admin-form{display:grid;grid-template-columns:1fr 180px;gap:12px;padding:6px 0 2px}
@media(max-width:640px){#itemTypeAdminModal .item-type-admin-form{grid-template-columns:1fr}}


/* Stage 7.5.147.0 — centered Item Type modal */
#itemTypeAdminModal:not([hidden]):not(.hide){
 position:fixed!important;
 inset:0!important;
 width:100vw!important;
 height:100vh!important;
 z-index:10050!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 padding:20px!important;
 background:rgba(15,23,42,.28)!important;
 box-sizing:border-box!important;
}
#itemTypeAdminModal .item-type-admin-box{
 position:relative!important;
 inset:auto!important;
 margin:0!important;
 transform:none!important;
 width:min(560px,calc(100vw - 40px))!important;
 max-width:560px!important;
 max-height:calc(100vh - 40px)!important;
 overflow:auto!important;
 border-radius:14px!important;
 box-shadow:0 20px 55px rgba(15,23,42,.22)!important;
}


/* Stage 7.5.147.0 — opaque Item Type modal */
#itemTypeAdminModal .item-type-admin-box{
 background:#fff!important;
 opacity:1!important;
 backdrop-filter:none!important;
 -webkit-backdrop-filter:none!important;
}
#itemTypeAdminModal .modalhead,
#itemTypeAdminModal .item-type-admin-form,
#itemTypeAdminModal .modalactions{
 background:#fff!important;
 opacity:1!important;
}


/* Stage 7.5.147.0 — larger Item Type modal + existing types side panel */
#itemTypeAdminModal .item-type-admin-box{width:min(820px,calc(100vw - 40px))!important;max-width:820px!important}
#itemTypeAdminModal .item-type-modal-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:18px;align-items:start;padding:8px 0 4px}
#itemTypeAdminModal .item-type-admin-form{grid-template-columns:1fr!important;gap:14px!important;padding:0!important}
#itemTypeAdminModal .item-type-existing-panel{border:1px solid #dbe5ef;border-radius:10px;background:#f8fafc!important;padding:10px;min-height:150px;max-height:300px;overflow:auto}
#itemTypeAdminModal .item-type-existing-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
#itemTypeAdminModal .item-type-existing-head span{font-size:12px;background:#e8f1f8;border-radius:999px;padding:2px 8px}
#itemTypeAdminModal .item-type-existing-note{font-size:11px;color:#64748b;margin-bottom:8px}
#itemTypeAdminModal .item-type-existing-list{display:flex;flex-direction:column;gap:6px}
#itemTypeAdminModal .item-type-existing-row{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff!important;border:1px solid #e2e8f0;border-radius:8px;padding:7px 9px}
#itemTypeAdminModal .item-type-existing-row small{color:#64748b;white-space:nowrap}
#itemTypeAdminModal .item-type-existing-row.duplicate{border-color:#dc2626!important;background:#fff1f2!important}
#itemTypeAdminModal .item-type-existing-empty{font-size:12px;color:#64748b;padding:12px 4px;text-align:center}
@media(max-width:760px){#itemTypeAdminModal .item-type-modal-layout{grid-template-columns:1fr}#itemTypeAdminModal .item-type-existing-panel{max-height:180px}}

/* Stage 7.5.147.0 — refined Item Type modal layout */
#itemTypeAdminModal .item-type-admin-box{
 width:min(700px,calc(100vw - 40px))!important;
 max-width:700px!important;
 padding:0!important;
}
#itemTypeAdminModal .modalhead{
 padding:14px 16px!important;
 border-bottom:1px solid #e5edf4!important;
}
#itemTypeAdminModal .item-type-modal-layout{
 grid-template-columns:minmax(0,1fr) 220px!important;
 gap:14px!important;
 padding:14px 16px 10px!important;
}
#itemTypeAdminModal .item-type-admin-form{
 gap:12px!important;
}
#itemTypeAdminModal .item-type-existing-panel{
 min-height:0!important;
 max-height:230px!important;
 padding:9px!important;
}
#itemTypeAdminModal .item-type-existing-head{
 margin-bottom:2px!important;
}
#itemTypeAdminModal .item-type-existing-note{
 margin-bottom:6px!important;
 line-height:1.45!important;
}
#itemTypeAdminModal .item-type-existing-empty{
 padding:8px 4px!important;
}
#itemTypeAdminModal .modalactions{
 display:flex!important;
 justify-content:flex-start!important;
 gap:8px!important;
 padding:10px 16px 14px!important;
 border-top:1px solid #edf2f7!important;
}
#itemTypeAdminModal .modalactions .btn{
 min-width:74px!important;
}
@media(max-width:760px){
 #itemTypeAdminModal .item-type-admin-box{
  width:min(94vw,700px)!important;
 }
 #itemTypeAdminModal .item-type-modal-layout{
  grid-template-columns:1fr!important;
 }
 #itemTypeAdminModal .item-type-existing-panel{
  max-height:150px!important;
 }
}


/* Stage 7.5.147.0 — larger Item Type modal */
#itemTypeAdminModal .item-type-admin-box{
 width:min(860px,calc(100vw - 48px))!important;
 max-width:860px!important;
 min-height:440px!important;
}
#itemTypeAdminModal .item-type-modal-layout{
 grid-template-columns:minmax(0,1fr) 250px!important;
 gap:18px!important;
 padding:18px 18px 12px!important;
 min-height:300px!important;
}
#itemTypeAdminModal .item-type-admin-form{
 gap:16px!important;
}
#itemTypeAdminModal .item-type-admin-form .field input,
#itemTypeAdminModal .item-type-admin-form .field select{
 min-height:46px!important;
}
#itemTypeAdminModal .item-type-existing-panel{
 max-height:320px!important;
 min-height:210px!important;
}
#itemTypeAdminModal .modalhead{
 padding:16px 18px!important;
}
#itemTypeAdminModal .modalactions{
 padding:14px 18px 18px!important;
}
@media(max-width:900px){
 #itemTypeAdminModal .item-type-admin-box{
  width:min(94vw,860px)!important;
 }
}
@media(max-width:760px){
 #itemTypeAdminModal .item-type-modal-layout{
  grid-template-columns:1fr!important;
 }
 #itemTypeAdminModal .item-type-existing-panel{
  min-height:120px!important;
  max-height:180px!important;
 }
}


/* Stage 7.5.147.0 — Item Types modal: separate summary card + wider existing list */
#itemTypeAdminModal .item-type-admin-box{
 width:min(1040px,calc(100vw - 48px))!important;
 max-width:1040px!important;
 min-height:500px!important;
}
#itemTypeAdminModal .item-type-modal-layout{
 grid-template-columns:minmax(0,1fr) 390px!important;
 gap:20px!important;
 min-height:350px!important;
}
#itemTypeAdminModal .item-type-existing-panel{
 display:flex!important;
 flex-direction:column!important;
 gap:10px!important;
 min-height:300px!important;
 max-height:none!important;
 padding:0!important;
 border:0!important;
 background:transparent!important;
 overflow:visible!important;
}
#itemTypeAdminModal .item-type-existing-head,
#itemTypeAdminModal .item-type-existing-note{
 background:#f8fafc!important;
}
#itemTypeAdminModal .item-type-existing-head{
 border:1px solid #dbe5ef!important;
 border-bottom:0!important;
 border-radius:10px 10px 0 0!important;
 padding:10px 12px 4px!important;
 margin:0!important;
}
#itemTypeAdminModal .item-type-existing-note{
 border:1px solid #dbe5ef!important;
 border-top:0!important;
 border-radius:0 0 10px 10px!important;
 padding:2px 12px 10px!important;
 margin-top:-10px!important;
 margin-bottom:0!important;
}
#itemTypeAdminModal .item-type-existing-list{
 border:1px solid #dbe5ef!important;
 border-radius:10px!important;
 background:#fff!important;
 padding:8px!important;
 max-height:285px!important;
 overflow:auto!important;
}
#itemTypeAdminModal .item-type-existing-row{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 align-items:center!important;
 gap:10px!important;
 padding:8px 10px!important;
}
#itemTypeAdminModal .item-type-existing-row>span{
 display:block!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 min-width:0!important;
}
#itemTypeAdminModal .item-type-existing-row>small{
 white-space:nowrap!important;
}
@media(max-width:1050px){
 #itemTypeAdminModal .item-type-admin-box{width:min(96vw,1040px)!important}
 #itemTypeAdminModal .item-type-modal-layout{grid-template-columns:minmax(0,1fr) 340px!important}
}
@media(max-width:800px){
 #itemTypeAdminModal .item-type-modal-layout{grid-template-columns:1fr!important}
 #itemTypeAdminModal .item-type-existing-list{max-height:190px!important}
}


/* Stage 7.5.147.0 — existing Item Types side search */
#itemTypeAdminModal .item-type-existing-search-wrap{
 margin:0!important;
}
#itemTypeAdminModal .item-type-existing-search{
 width:100%!important;
 min-height:40px!important;
 border:1px solid #d7e2ec!important;
 border-radius:9px!important;
 padding:8px 10px!important;
 background:#fff!important;
 box-sizing:border-box!important;
}
#itemTypeAdminModal .item-type-existing-search:focus{
 outline:none!important;
 border-color:#4f8fbd!important;
 box-shadow:0 0 0 3px rgba(79,143,189,.12)!important;
}


/* Stage 7.5.147.0 — guaranteed visible side search + fresh UI shell */
#itemTypeAdminModal .item-type-existing-search-wrap{
 display:block!important;
 width:100%!important;
 flex:0 0 auto!important;
 padding:0!important;
 margin:0!important;
 background:transparent!important;
}
#itemTypeAdminModal #itemTypeExistingSearch{
 display:block!important;
 visibility:visible!important;
 opacity:1!important;
 width:100%!important;
 height:42px!important;
 min-height:42px!important;
 position:relative!important;
 z-index:2!important;
}


/* Stage 7.5.147.0 — structural side-search fix */
#itemTypeAdminModal .item-type-existing-list-card{
 display:flex!important;
 flex-direction:column!important;
 gap:8px!important;
 width:100%!important;
 min-width:0!important;
 min-height:0!important;
 border:1px solid #dbe5ef!important;
 border-radius:10px!important;
 background:#fff!important;
 padding:8px!important;
 box-sizing:border-box!important;
}
#itemTypeAdminModal .item-type-existing-list-card .item-type-existing-search-wrap{
 display:block!important;
 flex:0 0 42px!important;
 width:100%!important;
 height:42px!important;
 min-height:42px!important;
 overflow:visible!important;
}
#itemTypeAdminModal .item-type-existing-list-card #itemTypeExistingSearch{
 display:block!important;
 width:100%!important;
 height:42px!important;
 min-height:42px!important;
 margin:0!important;
 padding:8px 11px!important;
 box-sizing:border-box!important;
 visibility:visible!important;
 opacity:1!important;
 border:1px solid #b9cbd9!important;
 border-radius:8px!important;
 background:#fff!important;
 color:#0f172a!important;
}
#itemTypeAdminModal .item-type-existing-list-card .item-type-existing-list{
 border:0!important;
 border-radius:0!important;
 padding:0!important;
 max-height:235px!important;
 overflow:auto!important;
 flex:1 1 auto!important;
}


/* Stage 7.5.147.0 — definitive Item Types table flow fix */
#itemTypes .tablebox{
 overflow:auto!important;
 position:relative!important;
}
#itemTypes .item-types-table{
 width:100%!important;
 border-collapse:separate!important;
 border-spacing:0!important;
 table-layout:auto!important;
}
#itemTypes .item-types-table thead{
 position:static!important;
 display:table-header-group!important;
}
#itemTypes .item-types-table thead tr{
 position:static!important;
}
#itemTypes .item-types-table thead th{
 position:static!important;
 top:auto!important;
 transform:none!important;
 z-index:auto!important;
}
#itemTypes .item-types-table tbody{
 position:static!important;
 display:table-row-group!important;
}
#itemTypes .item-types-table tbody tr{
 position:static!important;
 transform:none!important;
}
#itemTypes .item-types-table tbody tr:first-child td{
 padding-top:10px!important;
}


/* Stage 7.5.147.0 — Multi-Company foundation at top of Settings */
#settings .company-foundation-card{
 order:-100!important;
 margin-top:0!important;
 border-top:3px solid var(--accent,#1976b9);
}


/* Stage 7.5.147.0 — wider/taller Add/Edit User modal */
#userFormPanel .user-form-modal{
 width:min(1500px,calc(100vw - 64px))!important;
 max-width:1500px!important;
 min-width:0!important;
 max-height:calc(100vh - 48px)!important;
 max-height:calc(100dvh - 48px)!important;
 padding:0!important;
 overflow:hidden!important;
 display:flex!important;
 flex-direction:column!important;
}
#userFormPanel .user-panel-head{
 flex:0 0 auto!important;
 padding:16px 20px!important;
}
#userFormPanel .user-form-grid{
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:12px!important;
 padding:0 20px!important;
}
#userFormPanel #userContractScopeSection,
#userFormPanel #userProjectScopeSection{
 padding:0 20px!important;
}
#userFormPanel #userProjectScopeSection{
 flex:1 1 auto!important;
 min-height:0!important;
 overflow:hidden!important;
}
#userFormPanel #userProjectChoices{
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:8px!important;
 max-height:330px!important;
 overflow:auto!important;
 padding-inline-end:4px!important;
}
#userFormPanel .user-actions{
 flex:0 0 auto!important;
 padding:12px 20px 16px!important;
 margin-top:10px!important;
 border-top:1px solid #e5ebf1!important;
 background:#fff!important;
}
@media(max-width:1200px){
 #userFormPanel .user-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #userFormPanel #userProjectChoices{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:900px){
 #userFormPanel .user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #userFormPanel #userProjectChoices{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
 #userFormPanel .user-form-modal{
  width:calc(100vw - 20px)!important;
  max-height:calc(100dvh - 20px)!important;
 }
 #userFormPanel .user-form-grid,
 #userFormPanel #userProjectChoices{grid-template-columns:1fr!important}
}

/* Stage 7.5.147.0 — company scoped organizational structure */
#settings .org-company-scope-card{border-inline-start:4px solid var(--accent,#1976b9)}
#settings .org-company-select-field{max-width:520px;margin-top:12px}
#settings .org-company-select-field select{font-weight:700}


/* Stage 7.5.147.0 — companies as entry point to each company workspace */
#settings #companiesFoundationList{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:10px!important;
 max-width:none!important;
}
#settings .company-open-card{
 width:100%!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:14px!important;
 padding:13px 15px!important;
 border:1px solid #d9e4ec!important;
 border-radius:10px!important;
 background:#fff!important;
 cursor:pointer!important;
 text-align:right!important;
 color:#24364b!important;
 transition:.15s ease!important;
}
#settings .company-open-card:hover{
 border-color:#6da6ca!important;
 box-shadow:0 4px 14px rgba(23,105,170,.10)!important;
 transform:translateY(-1px)!important;
}
#settings .company-open-card.selected{
 border-color:#1769aa!important;
 background:#f2f8fc!important;
 box-shadow:0 0 0 2px rgba(23,105,170,.08)!important;
}
#settings .company-open-main{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
#settings .company-open-main strong{font-size:13px!important;color:#163b5d!important}
#settings .company-open-main small{font-size:10px!important;color:#718393!important}
#settings .company-open-side{display:flex!important;align-items:center!important;gap:10px!important;white-space:nowrap!important}
#settings .company-open-link{font-size:11px!important;font-weight:700!important;color:#1769aa!important}
#settings .active-company-banner{
 display:flex!important;
 align-items:center!important;
 gap:9px!important;
 flex-wrap:wrap!important;
 margin:12px 0!important;
 padding:11px 14px!important;
 border:1px solid #b8d7ea!important;
 border-radius:9px!important;
 background:#eef7fc!important;
 color:#23445d!important;
}
#settings .active-company-banner.hide{display:none!important}
#settings .active-company-banner strong{font-size:14px!important;color:#0f5f91!important}
#settings .active-company-banner b{font-size:11px!important;background:#fff!important;border:1px solid #cfe0ea!important;border-radius:6px!important;padding:3px 7px!important}
#settings .active-company-banner small{color:#698091!important}
@media(max-width:850px){
 #settings #companiesFoundationList{grid-template-columns:1fr!important}
}


/* Stage 7.5.147.0 — dedicated Company Workspace screen */
#companyWorkspace{
 padding-top:4px!important;
}
#companyWorkspace .company-workspace-head{
 display:flex;
 justify-content:space-between;
 align-items:flex-start;
 gap:18px;
 margin:4px 0 14px;
}
#companyWorkspace .company-workspace-head h1{
 margin:2px 0 4px;
 color:#153b5d;
}
#companyWorkspace .company-workspace-eyebrow{
 font-size:10px;
 font-weight:800;
 letter-spacing:.08em;
 text-transform:uppercase;
 color:#6c8192;
}
#companyWorkspace .company-workspace-identity{
 display:flex;
 align-items:center;
 gap:10px;
 flex-wrap:wrap;
 margin:0 0 14px;
 padding:13px 16px;
 border:1px solid #bed8e8;
 border-radius:10px;
 background:#eef7fc;
 color:#294a62;
}
#companyWorkspace .company-workspace-identity strong{
 font-size:15px;
 color:#0f5f91;
}
#companyWorkspace .company-workspace-identity b{
 padding:4px 8px;
 border:1px solid #cee0ea;
 border-radius:6px;
 background:#fff;
 font-size:11px;
}
#companyWorkspace .org-company-scope-card{
 display:none!important;
}
#companyWorkspace .active-company-banner{
 display:none!important;
}
#companyWorkspace .settings-hierarchy{
 margin-top:0!important;
}
#companyWorkspace #settingsPath{
 margin-bottom:10px!important;
}
@media(max-width:760px){
 #companyWorkspace .company-workspace-head{
  flex-direction:column;
 }
}


/* Stage 7.5.147.0 — strict System Companies / Company Workspace separation */
#settings .legacy-company-setting{display:none!important}
#settings .system-settings-title{margin-top:12px}
#settings .company-foundation-card{margin-bottom:14px}
#companyWorkspace{
 width:100%!important;
 max-width:none!important;
}
#companyWorkspace .company-workspace-head,
#companyWorkspace .company-workspace-identity,
#companyWorkspace .company-workspace-path,
#companyWorkspace .settings-hierarchy{
 width:100%!important;
 max-width:none!important;
 box-sizing:border-box!important;
}
#companyWorkspace .settings-hierarchy{
 display:grid!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:14px!important;
 align-items:start!important;
 direction:rtl!important;
}
#companyWorkspace .settings-level-card{
 min-width:0!important;
 width:100%!important;
 height:auto!important;
 padding:14px!important;
 border:1px solid #dce6ed!important;
 border-radius:10px!important;
 background:#fff!important;
 box-sizing:border-box!important;
}
#companyWorkspace .settings-level-head{
 margin-bottom:10px!important;
}
#companyWorkspace .quick-add{
 display:flex!important;
 gap:7px!important;
 width:100%!important;
}
#companyWorkspace .quick-add input{
 min-width:0!important;
 flex:1 1 auto!important;
}
#companyWorkspace .quick-add .btn{
 flex:0 0 auto!important;
 white-space:nowrap!important;
}
#companyWorkspace .settings-list{
 margin-top:10px!important;
 max-height:430px!important;
 overflow:auto!important;
}
#companyWorkspace .company-workspace-path{
 margin:0 0 12px!important;
 padding:9px 12px!important;
 border-radius:8px!important;
 background:#f6f9fb!important;
 color:#627789!important;
}
@media(max-width:1200px){
 #companyWorkspace .settings-hierarchy{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
 #companyWorkspace .settings-hierarchy{grid-template-columns:1fr!important}
}


/* Stage 7.5.147.0 — company-level maintenance and project profile */
#companyWorkspace .company-workspace-company-tools{
 display:grid;
 grid-template-columns:1fr;
 gap:14px;
 margin-top:16px;
}
#companyWorkspace .company-workspace-company-tools .card{
 margin:0!important;
 width:100%!important;
 box-sizing:border-box!important;
}
#settings .system-maintenance-card,
#settings .project-profile-config-card{
 display:none!important;
}


/* Stage 7.5.147.0 — company-scoped project/profile/forms configuration */
#companyWorkspace .company-scoped-profile-card{
 border-inline-start:4px solid var(--accent,#1976b9)!important;
}
#companyWorkspace .company-scope-badge{
 display:inline-block;
 margin-inline-start:8px;
 padding:3px 7px;
 border-radius:12px;
 background:#eef7fc;
 border:1px solid #c7dfed;
 color:#1769aa;
 font-size:9px;
 font-weight:800;
 vertical-align:middle;
}


/* Stage 7.5.147.0 — company identity & workflow isolation */
#companyWorkspace .company-workspace-config-block{
 display:grid;
 grid-template-columns:1fr;
 gap:14px;
 margin-top:16px;
}
#companyWorkspace .company-workspace-config-block .card{
 margin:0!important;
 width:100%!important;
 box-sizing:border-box!important;
}
#settings .company-branding-card,
#settings .workflow-config-card.legacy-company-setting{
 display:none!important;
}


/* Stage 7.5.286.0 — Desktop Company Workspace organization & persistent company context */
@media (min-width:701px){
 #companyWorkspace .company-workspace-identity285{display:grid!important;grid-template-columns:68px minmax(0,1fr) auto!important;align-items:center!important;gap:14px!important;padding:14px 16px!important}
 #companyWorkspace .company-context-logo285{width:62px;height:62px;border:1px solid #d7e3eb;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 2px 8px rgba(31,70,98,.06)}
 #companyWorkspace .company-context-logo285 img{max-width:54px;max-height:54px;object-fit:contain;display:block}
 #companyWorkspace .company-context-logo285 .company-logo-placeholder285{font-size:18px;font-weight:900;color:#1769aa}
 #companyWorkspace .company-context-main285{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
 #companyWorkspace .company-context-main285>span{font-size:11px;color:#6c8192;font-weight:800}
 #companyWorkspace .company-context-main285 strong{font-size:18px!important}
 #companyWorkspace .company-context-main285 b{font-size:12px!important}
 #companyWorkspace .company-workspace-groups285{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 16px}
 #companyWorkspace .company-workspace-group285{border:1px solid #dce6ed;border-radius:12px;background:#fff;padding:16px;min-height:142px;display:flex;flex-direction:column;gap:10px;box-shadow:0 3px 12px rgba(24,62,89,.04)}
 #companyWorkspace .company-workspace-group285 h3{margin:0;color:#153b5d;font-size:15px}
 #companyWorkspace .company-workspace-group285 p{margin:0;color:#698091;font-size:11px;line-height:1.7;min-height:38px}
 #companyWorkspace .company-workspace-group-actions285{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto}
 #companyWorkspace .company-workspace-group-actions285 .btn{min-height:34px;font-size:11px}
 #companyWorkspace .company-section-anchor285{scroll-margin-top:115px}
 .company-context-bar285{display:grid!important;grid-template-columns:52px minmax(0,1fr) auto!important;align-items:center!important;gap:12px!important;margin:0 0 12px!important;padding:10px 13px!important;border:1px solid #bfd9e8!important;border-radius:10px!important;background:#eef7fc!important;box-sizing:border-box!important}
 .company-context-bar285 .company-context-logo285{width:48px;height:48px;border:1px solid #d5e2ea;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
 .company-context-bar285 .company-context-logo285 img{max-width:42px;max-height:42px;object-fit:contain;display:block}
 .company-context-bar285 .company-logo-placeholder285{font-size:14px;font-weight:900;color:#1769aa}
 .company-context-bar285 .company-context-copy285{min-width:0}
 .company-context-bar285 .company-context-company285{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:3px}
 .company-context-bar285 .company-context-company285 strong{font-size:14px;color:#0f5f91}
 .company-context-bar285 .company-context-company285 b{font-size:10px;background:#fff;border:1px solid #cfe0ea;border-radius:6px;padding:3px 6px;color:#34566e}
 .company-context-bar285 .company-context-path285{font-size:10px;color:#6b8192;font-weight:700}
 .company-context-bar285 .btn{white-space:nowrap;font-size:10px;min-height:32px}
}
@media (max-width:700px){
 #companyWorkspace .company-workspace-groups285,.company-context-bar285{display:none!important}
 #companyWorkspace .company-context-logo285{display:none!important}
}


/* Stage 7.5.286.0 — Desktop persistent company indicator & stronger company navigation */
@media (min-width:701px){
 .desktop-company-indicator286{flex:0 1 190px;min-width:145px;max-width:210px;height:48px;display:flex;align-items:center;gap:9px;padding:6px 10px;border:1px solid rgba(255,255,255,.24);border-radius:10px;background:rgba(255,255,255,.10);box-sizing:border-box;color:#fff;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)}
 .desktop-company-indicator286.hide{display:none!important}
 .desktop-company-indicator286 .company-indicator-logo286{width:36px;height:36px;flex:0 0 36px;border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(255,255,255,.35)}
 .desktop-company-indicator286 .company-indicator-logo286 img{max-width:31px;max-height:31px;object-fit:contain;display:block}
 .desktop-company-indicator286 .company-logo-placeholder285{font-size:10px;font-weight:900;color:#1769aa}
 .desktop-company-indicator286 .company-indicator-copy286{min-width:0;line-height:1.1}
 .desktop-company-indicator286 .company-indicator-label286{display:block;font-size:8px;font-weight:800;color:#cfe5f3;margin-bottom:3px}
 .desktop-company-indicator286 strong{display:block;max-width:128px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#fff}
 .desktop-company-indicator286 b{display:block;margin-top:3px;font-size:8px;color:#d9edf8;font-weight:800;direction:ltr;text-align:right}
 .desktop-company-indicator286.system-context288{min-width:176px;max-width:205px;background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.30)}
 .desktop-company-indicator286.system-context288 .system-context-icon288{width:36px;height:36px;flex:0 0 36px;border-radius:8px;background:rgba(255,255,255,.96);display:grid;place-items:center;color:#174b70;font-size:18px;font-weight:900}
 .desktop-company-indicator286.system-context288 strong{font-size:11px}
 .desktop-company-indicator286.system-context288 b{direction:ltr;text-align:right;letter-spacing:.2px}
 .desktop-company-indicator286.multi-company-context289{min-width:190px;max-width:220px}
 .company-context-bar285 .company-return-workspace286{min-height:44px!important;padding:10px 18px!important;border-radius:10px!important;background:#1769aa!important;border-color:#1769aa!important;color:#fff!important;font-size:12px!important;font-weight:900!important;box-shadow:0 4px 12px rgba(23,105,170,.18)!important}
 .company-context-bar285 .company-return-workspace286:hover{background:#115b93!important;border-color:#115b93!important}
 #companyWorkspace .company-workspace-groups285{padding:4px 0 8px}
 #companyWorkspace .company-workspace-group285{border-top:4px solid #d7e7f1!important;box-shadow:0 5px 16px rgba(24,62,89,.06)!important}
 #companyWorkspace .company-workspace-section-title286{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px;padding:10px 14px;border-radius:10px;background:#f4f8fb;border:1px solid #dce7ee;color:#173f5e}
 #companyWorkspace .company-workspace-section-title286 strong{font-size:14px}
 #companyWorkspace .company-workspace-section-title286 span{font-size:10px;color:#6d8191;font-weight:700}
}
@media (max-width:1100px) and (min-width:701px){
 .desktop-company-indicator286{flex-basis:160px;max-width:165px;padding-inline:8px}
 .desktop-company-indicator286 strong{max-width:104px}
}
@media (min-width:701px){
 #companyWorkspace .company-workspace-head>button[onclick="backToCompanies()"]{min-height:46px;padding:0 22px;font-size:14px;font-weight:900;border:2px solid currentColor;box-shadow:0 4px 12px rgba(18,64,91,.12)}
 #companyWorkspaceIdentity>button[onclick="backToCompanies()"]{min-height:42px;padding:0 18px;font-weight:900}
}
@media (max-width:700px){.desktop-company-indicator286,.company-workspace-section-title286{display:none!important}}

/* Stage 7.5.147.0 — Company/Project Safe Reset */
.company-safe-reset-card{border-inline-start:4px solid #b42318!important}
.safe-reset-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-top:14px}
.safe-reset-hierarchy-grid278{grid-template-columns:repeat(3,minmax(0,1fr))}
.safe-reset-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.safe-reset-preview{margin-top:12px;padding:12px;border:1px solid #e2e8f0;border-radius:10px;background:#fafafa}
.safe-reset-counts{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0}
.safe-reset-counts span{padding:5px 9px;border:1px solid #d9e2ec;border-radius:8px;background:white}
@media(max-width:850px){.safe-reset-grid{grid-template-columns:1fr}}


/* Stage 7.5.147.0 — Company-Level Safe Reset */
.company-level-reset-card{border-inline-start:4px solid #8a3ffc!important;margin-top:14px!important}
.company-level-reset-grid{grid-template-columns:1fr 1fr}
.safe-reset-blocked{margin-top:8px;padding:8px 10px;border:1px solid #f1b5b5;border-radius:8px;background:#fff5f5;font-weight:700}
@media(max-width:850px){.company-level-reset-grid{grid-template-columns:1fr}}


/* Stage 7.5.147.0 — Scoped Workflow Configuration */
.workflow-scope-center{border-inline-start:4px solid #176696!important}
.workflow-scope-toolbar{display:grid;grid-template-columns:1fr 1.2fr 1.2fr;gap:10px;margin:10px 0}
.workflow-editing-banner{padding:10px 12px;border-radius:9px;background:#eef7fc;border:1px solid #c9e0ef;color:#174f72;font-weight:800;margin:8px 0 12px}
.workflow-dual-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:12px}
.workflow-flow-panel{border:1px solid #dbe5ec;border-radius:11px;padding:12px;background:#fbfcfd}
.workflow-flow-title{display:flex;justify-content:space-between;gap:10px;align-items:end;margin-bottom:10px}.workflow-flow-title b{font-size:14px;color:#173a52}.workflow-flow-title small{color:#718392}
.workflow-visual-flow{display:flex;align-items:stretch;gap:5px;direction:rtl;overflow-x:auto;padding-bottom:4px}
.workflow-step{min-width:132px;flex:1;border:1px solid #d7e2ea;border-radius:9px;padding:8px;background:white;display:flex;flex-direction:column;gap:4px}
.workflow-step>span{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#eaf3f8;color:#176696;font-weight:800;font-size:10px}
.workflow-step b{font-size:11px;color:#24485f}.workflow-step small{font-size:9px;color:#738695;min-height:25px}.workflow-step select{height:30px;font-size:10px;margin-top:auto}
.workflow-step.fixed{background:#f5f8fa}.workflow-step em{font-style:normal;font-size:9px;color:#526b7d;margin-top:auto;font-weight:700}
.workflow-arrow{display:flex;align-items:center;color:#9aabba;font-size:18px;font-weight:800}
.workflow-visual-flow.compact .workflow-step{min-width:145px}
@media(max-width:1100px){.workflow-dual-grid{grid-template-columns:1fr}.workflow-scope-toolbar{grid-template-columns:1fr}.workflow-visual-flow{flex-wrap:wrap}.workflow-arrow{display:none}}


/* Stage 7.5.147.0 — Workflow UI Layout Fix */
.workflow-scope-center{overflow:hidden!important}
.workflow-scope-toolbar{
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:12px!important;
 width:100%!important;
 align-items:end!important;
}
.workflow-scope-toolbar .field{min-width:0!important;width:100%!important}
.workflow-scope-toolbar select{width:100%!important;max-width:100%!important;box-sizing:border-box!important}

.workflow-dual-grid{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:14px!important;
 width:100%!important;
}
.workflow-flow-panel{
 width:100%!important;
 min-width:0!important;
 overflow:hidden!important;
 box-sizing:border-box!important;
}
.workflow-visual-flow{
 display:grid!important;
 grid-template-columns:repeat(11,minmax(0,1fr))!important;
 align-items:stretch!important;
 gap:6px!important;
 width:100%!important;
 overflow:visible!important;
 padding-bottom:0!important;
}
.workflow-visual-flow.compact{
 grid-template-columns:1fr auto 1fr auto 1fr!important;
 max-width:860px!important;
 margin-inline:auto!important;
}
.workflow-step{
 min-width:0!important;
 width:100%!important;
 box-sizing:border-box!important;
}
.workflow-arrow{
 min-width:24px!important;
 justify-content:center!important;
}
.workflow-flow-panel:first-child .workflow-step:nth-of-type(1),
.workflow-flow-panel:first-child .workflow-step:nth-of-type(2),
.workflow-flow-panel:first-child .workflow-step:nth-of-type(3),
.workflow-flow-panel:first-child .workflow-step:nth-of-type(4),
.workflow-flow-panel:first-child .workflow-step:nth-of-type(5),
.workflow-flow-panel:first-child .workflow-step:nth-of-type(6){min-width:0!important}

@media(max-width:1350px){
 .workflow-visual-flow{
   display:flex!important;
   flex-wrap:nowrap!important;
   overflow-x:auto!important;
   padding-bottom:6px!important;
 }
 .workflow-step{min-width:150px!important;flex:0 0 150px!important}
 .workflow-arrow{flex:0 0 24px!important}
 .workflow-visual-flow.compact{
   max-width:none!important;
   margin:0!important;
 }
}
@media(max-width:900px){
 .workflow-scope-toolbar{grid-template-columns:1fr!important}
 .workflow-visual-flow{
   display:grid!important;
   grid-template-columns:1fr!important;
   overflow:visible!important;
 }
 .workflow-arrow{display:none!important}
 .workflow-step{min-width:0!important;width:100%!important}
 .workflow-visual-flow.compact{grid-template-columns:1fr!important}
}


/* Stage 7.5.147.0 — Project Profile Launcher activation */
.project-profile-launch{align-items:end!important}
.project-profile-launch select:disabled{background:#f4f6f8!important;color:#8a99a5!important;cursor:not-allowed}
#projectProfileOpenBtn:disabled{opacity:.45!important;cursor:not-allowed!important;filter:grayscale(.15)}
.project-profile-launch-status{margin-top:7px;font-size:10px;color:#60798b;font-weight:700}


/* Stage 7.5.147.0 — Project Profile Functional Open Fix */
#projectProfileModal:not(.hide){display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
body.project-profile-open{overflow:hidden!important}
#projectProfileOpenBtn:not(:disabled){cursor:pointer!important;opacity:1!important}


/* Stage 7.5.147.0 — Project Profile Modal DOM Fix */
#projectProfileModal{
 position:fixed!important;
 inset:0!important;
 z-index:60000!important;
}
#projectProfileModal.hide{display:none!important}
#projectProfileModal:not(.hide){
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 visibility:visible!important;
 opacity:1!important;
 pointer-events:auto!important;
}
#projectProfileModal .project-profile-box{
 position:relative!important;
 z-index:60001!important;
}


/* Stage 7.5.147.0 — Project Form Typography Settings */
.typography-settings{border:1px solid #dce6ed;border-radius:10px;background:#f8fafb;padding:10px;margin:4px 0 12px}
.typography-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.typography-head b{color:#174f72;font-size:12px}.typography-head small{color:#758794;font-size:9px}
.typography-row{display:grid;grid-template-columns:1.1fr 1fr .7fr .7fr;gap:7px;align-items:center;padding:6px 0;border-top:1px solid #e5ebef}.typography-row:first-of-type{border-top:0}
.typography-row>b{font-size:10px;color:#365568}.typography-row select{height:30px;font-size:9px;min-width:0}
@media(max-width:760px){.typography-row{grid-template-columns:1fr}.typography-head{align-items:flex-start;flex-direction:column;gap:2px}}


/* Stage 7.5.147.0 — Company Workspace Layout Polish */
.company-workspace-page{overflow-x:hidden!important}
.company-workspace-page .settings-hierarchy{
 display:grid!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:14px!important;
 align-items:start!important;
 direction:rtl!important;
 width:100%!important;
}
.company-workspace-page .settings-level-card{
 min-width:0!important;
 width:100%!important;
 padding:14px!important;
 box-sizing:border-box!important;
 overflow:hidden!important;
}
.company-workspace-page .settings-level-head{
 min-height:50px!important;
 margin-bottom:10px!important;
}
.company-workspace-page .settings-level-head b{
 display:block!important;
 font-size:14px!important;
 line-height:1.45!important;
 white-space:normal!important;
 overflow-wrap:anywhere!important;
}
.company-workspace-page .settings-level-head small{
 display:block!important;
 margin-top:3px!important;
 line-height:1.45!important;
 white-space:normal!important;
}
.company-workspace-page .quick-add{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 gap:8px!important;
 align-items:stretch!important;
 margin-bottom:10px!important;
}
.company-workspace-page .quick-add input{
 min-width:0!important;
 width:100%!important;
 box-sizing:border-box!important;
}
.company-workspace-page .quick-add .btn{
 white-space:nowrap!important;
 min-width:108px!important;
}
.company-workspace-page .settings-list{
 display:flex!important;
 flex-direction:column!important;
 gap:7px!important;
 min-width:0!important;
}
.company-workspace-page .settings-item,
.company-workspace-page .settings-list>div:not(.settings-empty){
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 gap:6px!important;
 min-width:0!important;
 padding:8px 0!important;
 border-bottom:1px solid #edf1f4!important;
}
.company-workspace-page .settings-item:last-child,
.company-workspace-page .settings-list>div:last-child{border-bottom:0!important}
.company-workspace-page .settings-item-name,
.company-workspace-page .settings-list strong,
.company-workspace-page .settings-list b{
 min-width:0!important;
 white-space:normal!important;
 overflow-wrap:anywhere!important;
 word-break:normal!important;
 line-height:1.55!important;
}
.company-workspace-page .settings-item-actions,
.company-workspace-page .settings-list .actions{
 display:flex!important;
 flex-wrap:wrap!important;
 gap:5px!important;
 align-items:center!important;
 justify-content:flex-start!important;
 margin:0!important;
}
.company-workspace-page .settings-list button{
 flex:0 0 auto!important;
 white-space:nowrap!important;
 margin:0 2px!important;
}
@media(max-width:1450px){
 .company-workspace-page .settings-hierarchy{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:850px){
 .company-workspace-page .settings-hierarchy{grid-template-columns:1fr!important}
 .company-workspace-page .quick-add{grid-template-columns:1fr!important}
 .company-workspace-page .quick-add .btn{width:100%!important}
}


/* Stage 7.5.147.0 — Company Hierarchy Interaction Feedback */
.company-workspace-page .settings-list [onclick*="selectRegion"],
.company-workspace-page .settings-list [onclick*="selectContract"],
.company-workspace-page .settings-list [onclick*="selectEntity"],
.company-workspace-page .settings-list [onclick*="selectProject"]{
 cursor:pointer!important;
 transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease,transform .08s ease!important;
 border-radius:8px!important;
}
.company-workspace-page .settings-list [onclick*="selectRegion"]:hover,
.company-workspace-page .settings-list [onclick*="selectContract"]:hover,
.company-workspace-page .settings-list [onclick*="selectEntity"]:hover,
.company-workspace-page .settings-list [onclick*="selectProject"]:hover{
 background:#f0f7fb!important;
 box-shadow:inset 0 0 0 1px #c9e1ef!important;
}
.company-workspace-page .settings-list [onclick*="selectRegion"]:active,
.company-workspace-page .settings-list [onclick*="selectContract"]:active,
.company-workspace-page .settings-list [onclick*="selectEntity"]:active,
.company-workspace-page .settings-list [onclick*="selectProject"]:active{
 transform:translateY(1px)!important;
}
.company-workspace-page .settings-list .active,
.company-workspace-page .settings-list .selected,
.company-workspace-page .settings-list [aria-selected="true"]{
 background:#e7f3fa!important;
 box-shadow:inset 3px 0 0 #176696,inset 0 0 0 1px #bad9e9!important;
}
.company-workspace-page .settings-list button,
.company-workspace-page .settings-list .btn{
 cursor:pointer!important;
 position:relative!important;
 z-index:2!important;
}
.company-workspace-page .settings-list button:disabled,
.company-workspace-page .settings-list .btn:disabled{cursor:not-allowed!important}


.company-workspace-page .selectable-hierarchy-item{cursor:pointer!important}
.company-workspace-page .selectable-hierarchy-item:hover{background:#f0f7fb!important;box-shadow:inset 0 0 0 1px #c9e1ef!important}


/* Stage 7.5.147.0 — Hierarchy Pointer Definitive Fix */
.company-workspace-page .hierarchy-clickable,
.company-workspace-page [data-setting-select],
.company-workspace-page .settings-list [data-region-index],
.company-workspace-page .settings-list [data-contract-index],
.company-workspace-page .settings-list [data-entity-index],
.company-workspace-page .settings-list [data-project-index]{
 cursor:pointer!important;
}
.company-workspace-page .hierarchy-clickable *,
.company-workspace-page [data-setting-select] *{
 cursor:pointer!important;
}
.company-workspace-page .hierarchy-clickable:hover,
.company-workspace-page [data-setting-select]:hover{
 background:#eef7fc!important;
 box-shadow:inset 0 0 0 1px #bfddeb!important;
 border-radius:8px!important;
}
.company-workspace-page .hierarchy-clickable button,
.company-workspace-page [data-setting-select] button{
 cursor:pointer!important;
}


/* Stage 7.5.147.0 — Definitive hierarchy selection + pointer */
.company-workspace-page .settings-item.hierarchy-clickable{
 cursor:pointer!important;
}
.company-workspace-page .settings-item.hierarchy-clickable *{
 cursor:pointer!important;
}
.company-workspace-page .settings-item.hierarchy-clickable:hover{
 background:#eef7fc!important;
 box-shadow:inset 0 0 0 1px #bfddeb!important;
 border-radius:8px!important;
}
.company-workspace-page .settings-item.hierarchy-clickable.selected{
 background:#e4f2fa!important;
 box-shadow:inset 3px 0 0 #176696,inset 0 0 0 1px #b8d9e9!important;
}
.company-workspace-page .settings-item.hierarchy-clickable .mini-action{
 cursor:pointer!important;
}


/* Stage 7.5.147.0 — Company creation templates + lifecycle */
#settings .company-manage-card{border:1px solid #d9e4ec;border-radius:11px;background:#fff;overflow:hidden}
#settings .company-manage-card .company-open-card{border:0!important;border-radius:0!important}
#settings .company-card-actions{display:flex;gap:7px;justify-content:flex-end;padding:8px 12px;border-top:1px solid #e7edf1;background:#fafcfd}
#settings .company-card-actions .btn{font-size:10px;padding:6px 10px}
.company-create-box{width:min(820px,94vw);max-height:90vh;overflow:auto;background:#fff;border-radius:14px;padding:18px;box-shadow:0 18px 60px rgba(0,0,0,.25)}
.company-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.company-clone-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.company-clone-summary>div{border:1px solid #dce7ed;border-radius:9px;padding:11px;background:#f8fbfc;display:flex;flex-direction:column;gap:5px}
.company-clone-summary b{color:#155f8e}.company-clone-summary span{font-size:10px;line-height:1.7;color:#536b7a}
@media(max-width:720px){.company-create-grid,.company-clone-summary{grid-template-columns:1fr}}


/* Stage 7.5.147.0 — Company Lifecycle UI Polish */
#settings .company-manage-card{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 align-items:stretch!important;
 gap:0!important;
 overflow:hidden!important;
}
#settings .company-manage-card .company-open-card{
 min-width:0!important;
 padding:14px 16px!important;
}
#settings .company-open-side{
 gap:12px!important;
}
#settings .company-open-link{
 display:inline-flex!important;
 align-items:center!important;
 min-height:28px!important;
 padding:4px 8px!important;
 border-radius:7px!important;
 background:#eef6fb!important;
 color:#1769aa!important;
}
#settings .company-card-actions{
 min-width:220px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 flex-wrap:wrap!important;
 gap:8px!important;
 padding:10px 12px!important;
 border-top:0!important;
 border-inline-start:1px solid #e7edf1!important;
 background:#fafcfd!important;
}
#settings .company-card-actions .btn{
 min-width:94px!important;
}
.company-create-box{
 width:min(860px,94vw)!important;
 padding:22px!important;
}
.company-create-head{
 display:flex!important;
 justify-content:space-between!important;
 align-items:flex-start!important;
 gap:18px!important;
 padding-bottom:14px!important;
 margin-bottom:14px!important;
 border-bottom:1px solid #e4ebef!important;
}
.company-create-title{
 display:flex!important;
 flex-direction:column!important;
 gap:5px!important;
 min-width:0!important;
}
.company-create-title b{
 font-size:21px!important;
 line-height:1.35!important;
 color:#173e5d!important;
}
.company-create-title small{
 font-size:11px!important;
 line-height:1.7!important;
 color:#687d8d!important;
}
.company-create-close{
 flex:0 0 auto!important;
 margin:0!important;
}
.company-create-grid{
 align-items:end!important;
}
.company-clone-summary>div{
 min-height:92px!important;
}
.company-clone-summary .clone-copy-box{
 border-color:#c8dfcf!important;
 background:#f7fcf8!important;
}
.company-clone-summary .clone-skip-box{
 border-color:#ead8cf!important;
 background:#fffaf7!important;
}
.company-clone-independence{
 margin:8px 0 2px!important;
 padding:9px 11px!important;
 border:1px solid #c9e0ef!important;
 border-radius:8px!important;
 background:#eef7fc!important;
 color:#365d76!important;
 font-size:10px!important;
 font-weight:700!important;
}
@media(max-width:900px){
 #settings .company-manage-card{grid-template-columns:1fr!important}
 #settings .company-card-actions{
  min-width:0!important;
  border-inline-start:0!important;
  border-top:1px solid #e7edf1!important;
  justify-content:flex-start!important;
 }
}
@media(max-width:620px){
 .company-create-head{flex-direction:column!important}
 .company-create-close{align-self:flex-start!important}
}


/* Stage 7.5.147.0 — Company card status UX */
#settings .company-manage-card.company-active{
 border-color:#b9dec5!important;
 box-shadow:inset 3px 0 0 #38a65a!important;
 background:#fcfffd!important;
}
#settings .company-manage-card.company-inactive{
 border-color:#d8dee3!important;
 background:#f7f8f9!important;
 opacity:.9;
}
#settings .company-name-line{
 display:flex!important;
 align-items:center!important;
 gap:9px!important;
 flex-wrap:wrap!important;
}
#settings .company-status-dot{
 width:10px!important;
 height:10px!important;
 border-radius:50%!important;
 flex:0 0 10px!important;
 background:#2eaa55!important;
 box-shadow:0 0 0 3px rgba(46,170,85,.12)!important;
}
#settings .company-inactive .company-status-dot{
 background:#9aa5ae!important;
 box-shadow:none!important;
}
#settings .company-inactive-label{
 display:inline-flex!important;
 align-items:center!important;
 padding:3px 8px!important;
 border-radius:999px!important;
 background:#e5e9ec!important;
 color:#65717a!important;
 font-size:9px!important;
 font-weight:800!important;
}
#settings .company-open-link{
 min-height:34px!important;
 padding:7px 13px!important;
 font-size:13px!important;
 font-weight:900!important;
 letter-spacing:0!important;
}
#settings .company-active .company-open-link{
 background:#eaf7ee!important;
 color:#17773a!important;
}
#settings .company-open-card:disabled{
 cursor:not-allowed!important;
}
#settings .company-open-card:disabled .company-open-link{
 background:#e8ecef!important;
 color:#7d8992!important;
}
#settings .company-open-card:not(:disabled):hover .company-open-link{
 transform:translateX(-2px);
}


/* Stage 7.5.147.0 — New Item From PR */
.pr-new-item-action{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 14px;margin:10px 0;border:1px dashed #aacbdb;border-radius:10px;background:#f5fbfe}.pr-new-item-action>div{display:flex;flex-direction:column;gap:3px}.pr-new-item-action b{color:#164f72}.pr-new-item-action span{font-size:10px;color:#61798a}.pr-new-item-overlay{z-index:61000!important}.pr-new-item-box{width:min(720px,94vw)!important}.pr-new-item-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.pr-new-item-grid .span2{grid-column:span 2}.pr-new-item-context{padding:8px 10px;background:#eef7fc;border-radius:8px;font-size:10px}.pr-new-item-review-note{padding:9px 11px;border:1px solid #f0d8a8;border-radius:8px;background:#fffaf0;color:#75551d;font-size:10px}.pr-new-item-badge,.item-review-badge{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:800}.pr-new-item-badge,.item-review-badge.pending{background:#fff2cf;color:#8a6010}.item-review-badge.done{background:#eaf7ee;color:#267745}.item-review-note{display:block;color:#9a6b14;font-size:8px}.item-row-actions{display:flex;flex-wrap:wrap;gap:5px}.item-row-actions .btn{font-size:9px;padding:5px 7px}.item-inactive-row{opacity:.72;background:#f4f5f6!important}.item-off-label{display:block;color:#8a4750;font-size:8px}.item-master-filters{grid-template-columns:1.2fr repeat(4,minmax(140px,1fr))!important}@media(max-width:760px){.pr-new-item-action{flex-direction:column;align-items:stretch}.pr-new-item-grid{grid-template-columns:1fr}.pr-new-item-grid .span2{grid-column:auto}.item-master-filters{grid-template-columns:1fr!important}}

/* Stage 7.5.147.0 — PR Item Type linkage + centered opaque new-item modal */
#prNewItemModal.modal{position:fixed!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:24px!important;background:rgba(15,32,45,.58)!important;z-index:65000!important}
#prNewItemModal.modal.hide{display:none!important}
#prNewItemModal .pr-new-item-box{position:relative!important;inset:auto!important;margin:0!important;width:min(900px,92vw)!important;max-width:900px!important;max-height:88vh!important;overflow:auto!important;background:#fff!important;opacity:1!important;border:1px solid #d5e0e7!important;border-radius:14px!important;box-shadow:0 24px 70px rgba(0,0,0,.28)!important;padding:22px!important}
#prNewItemModal .modalhead{position:sticky!important;top:-22px!important;background:#fff!important;z-index:2!important;padding:4px 0 14px!important;margin-bottom:12px!important;border-bottom:1px solid #e5ecef!important}
#prNewItemModal .pr-new-item-grid{gap:14px!important}
#prNewItemModal input,#prNewItemModal select,#prNewItemModal textarea{background:#fff!important;opacity:1!important}
@media(max-width:700px){#prNewItemModal.modal{padding:10px!important;align-items:center!important}#prNewItemModal .pr-new-item-box{width:96vw!important;max-height:92vh!important;padding:16px!important}}

/* Stage 7.5.147.0 — compact centered New Item modal */
#prNewItemModal.modal{padding:18px!important;overflow:hidden!important}
#prNewItemModal .pr-new-item-box{
 width:min(1040px,94vw)!important;max-width:1040px!important;
 max-height:calc(100vh - 36px)!important;overflow:visible!important;
 padding:18px 22px!important;background:#fff!important;opacity:1!important;
}
#prNewItemModal .modalhead{position:relative!important;top:auto!important;padding:0 0 10px!important;margin-bottom:10px!important}
#prNewItemModal .item-editor-sub{margin-top:3px!important;line-height:1.35!important}
#prNewItemModal .pr-new-item-context{padding:7px 10px!important;margin:0!important}
#prNewItemModal .pr-new-item-grid.compact{grid-template-columns:1.35fr 1fr .8fr!important;gap:10px 12px!important;margin:10px 0!important}
#prNewItemModal .pr-new-item-grid.compact .span3{grid-column:1/-1!important}
#prNewItemModal .pr-new-item-grid.compact .field{gap:4px!important;margin:0!important}
#prNewItemModal .pr-new-item-grid.compact input,#prNewItemModal .pr-new-item-grid.compact select{min-height:42px!important;height:42px!important}
#prNewItemModal #prNewItemNotes{height:68px!important;min-height:68px!important;resize:vertical!important}
#prNewItemModal .pr-new-item-review-note{padding:7px 10px!important;margin-top:4px!important;line-height:1.45!important}
#prNewItemModal .modalactions{margin-top:10px!important;padding-top:0!important;display:flex!important;gap:8px!important}
#prNewItemModal .modalactions .btn{min-height:40px!important}
@media(max-width:760px){
 #prNewItemModal.modal{padding:8px!important;overflow:auto!important}
 #prNewItemModal .pr-new-item-box{width:96vw!important;max-height:none!important;overflow:visible!important;padding:14px!important}
 #prNewItemModal .pr-new-item-grid.compact{grid-template-columns:1fr!important}
 #prNewItemModal .pr-new-item-grid.compact .span3{grid-column:auto!important}
}

/* Stage 7.5.147.0 — force PR New Item dialog to true viewport center */
html body #prNewItemModal.modal{
 position:fixed!important;
 top:0!important;right:0!important;bottom:0!important;left:0!important;
 width:100vw!important;height:100vh!important;
 min-width:100vw!important;max-width:none!important;
 margin:0!important;padding:20px!important;
 transform:none!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 overflow:hidden!important;
 box-sizing:border-box!important;
 background:rgba(15,32,45,.58)!important;
 z-index:2147483000!important;
}
html body #prNewItemModal.modal.hide{display:none!important}
html body #prNewItemModal .pr-new-item-box{
 position:relative!important;
 top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
 transform:none!important;float:none!important;
 width:min(1120px,90vw)!important;
 min-width:0!important;max-width:1120px!important;
 height:auto!important;max-height:calc(100vh - 40px)!important;
 margin:auto!important;padding:18px 24px!important;
 overflow:visible!important;
 box-sizing:border-box!important;
 background:#fff!important;opacity:1!important;
 border-radius:14px!important;
}
html body #prNewItemModal .pr-new-item-grid.compact{
 grid-template-columns:minmax(0,1.45fr) minmax(0,1fr) minmax(150px,.75fr)!important;
 gap:10px 14px!important;
}
@media(max-width:760px){
 html body #prNewItemModal.modal{padding:8px!important;overflow:auto!important}
 html body #prNewItemModal .pr-new-item-box{width:96vw!important;max-width:96vw!important;max-height:none!important;overflow:visible!important}
 html body #prNewItemModal .pr-new-item-grid.compact{grid-template-columns:1fr!important}
}
#itemEditorModal.item-editor-overlay{padding:18px!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}#itemEditorModal .item-editor-box{width:min(1180px,94vw)!important;max-width:1180px!important;max-height:calc(100vh - 36px)!important;overflow:hidden!important;padding:18px 22px!important}#itemEditorModal .item-form-section{margin:7px 0!important;padding:8px 0!important}#itemEditorModal .item-form-grid{gap:9px 13px!important}#itemEditorModal .item-departments-grid{max-height:170px!important;overflow-y:auto!important}#itemEditorModal textarea{height:62px!important;min-height:62px!important}
/* Stage 7.5.147.0 — compact Item Master editor */
#itemEditorModal.item-editor-overlay{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:14px!important;overflow:hidden!important;box-sizing:border-box!important}
#itemEditorModal.item-editor-overlay.hide{display:none!important}
#itemEditorModal .item-editor-box{width:min(1180px,95vw)!important;max-width:1180px!important;height:auto!important;max-height:calc(100vh - 28px)!important;margin:auto!important;padding:14px 20px!important;overflow:hidden!important;box-sizing:border-box!important;background:#fff!important}
#itemEditorModal .item-editor-head{margin:0 0 6px!important;padding:0 0 7px!important}
#itemEditorModal .item-editor-sub{margin-top:2px!important;line-height:1.25!important}
#itemEditorModal .item-form-section{margin:5px 0!important;padding:6px 0!important}
#itemEditorModal .item-section-title{margin:0 0 6px!important;padding:0!important}
#itemEditorModal .item-form-grid{display:grid!important;grid-template-columns:minmax(180px,.8fr) minmax(260px,1.25fr) minmax(200px,1fr)!important;gap:7px 12px!important;align-items:start!important}
#itemEditorModal .item-form-grid .span2{grid-column:span 2!important}
#itemEditorModal .field{gap:3px!important;margin:0!important}
#itemEditorModal .field label{margin:0!important;line-height:1.2!important}
#itemEditorModal input,#itemEditorModal select{min-height:38px!important;height:38px!important}
#itemEditorModal .item-departments-field{grid-column:1/-1!important}
#itemEditorModal .item-departments-tools{min-height:28px!important;margin:0 0 4px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important}
#itemEditorModal .item-departments-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:4px 8px!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:4px!important;margin:0!important}
#itemEditorModal .item-departments-grid label{min-height:26px!important;padding:3px 6px!important;margin:0!important;display:flex!important;align-items:center!important;gap:5px!important}
#itemEditorModal .item-departments-summary{margin-top:3px!important;padding:3px 6px!important;min-height:24px!important}
#itemEditorModal textarea{height:54px!important;min-height:54px!important;resize:none!important}
#itemEditorModal .modalactions{position:static!important;margin-top:6px!important;padding:6px 0 0!important;background:#fff!important;display:flex!important;gap:8px!important}
#itemEditorModal .modalactions .btn{min-height:38px!important}
@media(max-width:900px){#itemEditorModal.item-editor-overlay{overflow:auto!important;align-items:flex-start!important}#itemEditorModal .item-editor-box{max-height:none!important;overflow:visible!important}#itemEditorModal .item-form-grid{grid-template-columns:1fr 1fr!important}#itemEditorModal .item-departments-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:600px){#itemEditorModal .item-form-grid{grid-template-columns:1fr!important}#itemEditorModal .item-form-grid .span2{grid-column:auto!important}#itemEditorModal .item-departments-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Stage 7.5.147.0 — final Item Master editor desktop balance */
@media(min-width:901px){
 #itemEditorModal .item-editor-box{
   width:min(1180px,95vw)!important;max-width:1180px!important;
   max-height:calc(100vh - 20px)!important;padding:10px 18px!important;
 }
 #itemEditorModal .item-editor-head{margin-bottom:3px!important;padding-bottom:4px!important}
 #itemEditorModal .item-form-section{margin:2px 0!important;padding:3px 0!important}
 #itemEditorModal .item-section-title{margin-bottom:3px!important;line-height:1.15!important}
 #itemEditorModal .item-form-grid{
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
   gap:5px 12px!important;
 }
 /* Basic data uses the full width; departments are a dedicated compact row. */
 #itemEditorModal .item-departments-field{grid-column:1/-1!important;order:20!important}
 #itemEditorModal .item-departments-tools{min-height:22px!important;margin-bottom:2px!important}
 #itemEditorModal .item-departments-grid{
   grid-template-columns:repeat(6,minmax(0,1fr))!important;
   gap:3px 7px!important;padding:2px!important;
   max-height:none!important;overflow:visible!important;
 }
 #itemEditorModal .item-departments-grid label{
   min-height:23px!important;padding:2px 5px!important;font-size:13px!important;
 }
 #itemEditorModal .item-departments-summary{min-height:20px!important;padding:2px 6px!important;margin-top:2px!important}
 #itemEditorModal input,#itemEditorModal select{height:35px!important;min-height:35px!important}
 #itemEditorModal textarea{height:45px!important;min-height:45px!important}
 #itemEditorModal .item-stock-link-note,
 #itemEditorModal .item-stock-info,
 #itemEditorModal .item-info-box{
   padding:6px 10px!important;margin:3px 0!important;min-height:0!important;line-height:1.25!important;
 }
 #itemEditorModal .modalactions{margin-top:3px!important;padding-top:4px!important}
 #itemEditorModal .modalactions .btn{min-height:35px!important;height:35px!important}
}

/* Stage 7.5.147.0 — reviewed Item Editor refinements */
@media(min-width:901px){
 #itemEditorModal textarea{height:58px!important;min-height:58px!important}
 #itemEditorModal .item-editor-box{padding-bottom:9px!important}
 #itemEditorModal .modalactions{margin-top:2px!important;padding-top:3px!important}
}

/* Stage 7.5.147.0 — full-width Item Editor sections + readable selects */
@media(min-width:901px){
  /* Remove the unused left-side column for the lower editor sections. */
  #itemEditorModal .item-form-section{
    width:100%!important;
    max-width:none!important;
    grid-column:1/-1!important;
    box-sizing:border-box!important;
  }
  #itemEditorModal .item-departments-field,
  #itemEditorModal .item-departments-tools,
  #itemEditorModal .item-departments-grid,
  #itemEditorModal .item-departments-summary{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
  #itemEditorModal .item-departments-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }

  /* Make the three basic cards visually consistent and prevent select text clipping. */
  #itemEditorModal #editItemType,
  #itemEditorModal #editItemUnit,
  #itemEditorModal #editItemCategory{
    height:40px!important;
    min-height:40px!important;
    line-height:22px!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
    box-sizing:border-box!important;
    vertical-align:middle!important;
  }
  #itemEditorModal #editItemType,
  #itemEditorModal #editItemUnit{
    padding-inline-start:34px!important;
    padding-inline-end:12px!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }

  /* Lower blocks should occupy the full available width. */
  #itemEditorModal textarea,
  #itemEditorModal .item-stock-link-note,
  #itemEditorModal .item-stock-info,
  #itemEditorModal .item-info-box{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
}
/* Stage 7.5.147.0 — Units master data */
body[data-flowix-page="units"] main.wrap{padding-top:8px} body[data-flowix-page="units"] #units .title{margin:4px 0 8px} body[data-flowix-page="units"] #units .item-master-toolbar{margin:0 0 8px} body[data-flowix-page="units"] #units .card{margin-top:0} body[data-flowix-page="units"] #unitSearch{max-width:420px;min-width:260px}
#unitAdminModal[hidden],#unitAdminModal.hide{display:none!important} #unitAdminModal:not([hidden]):not(.hide){position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:10050!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:20px!important;background:rgba(15,23,42,.28)!important;box-sizing:border-box!important}
#unitAdminModal .item-type-admin-box{width:min(820px,calc(100vw - 40px))!important;max-width:820px!important;max-height:calc(100vh - 40px)!important;overflow:auto!important;background:#fff!important;border-radius:14px!important;box-shadow:0 20px 55px rgba(15,23,42,.22)!important}
#unitAdminModal .item-type-modal-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:18px;align-items:start;padding:8px 0 4px} #unitAdminModal .item-type-admin-form{display:grid;grid-template-columns:1fr!important;gap:14px!important;padding:0!important} #unitAdminModal .item-type-existing-panel{border:1px solid #dbe5ef;border-radius:10px;background:#f8fafc!important;padding:10px;min-height:150px;max-height:300px;overflow:auto}
@media(max-width:720px){body[data-flowix-page="units"] #unitSearch{max-width:none;min-width:0;width:100%}#unitAdminModal .item-type-modal-layout{grid-template-columns:1fr}}

/* Stage 7.5.147.0 — Units UI refinement only */
body[data-flowix-page="units"] .hero,
body[data-flowix-page="units"] .brandhero{min-height:110px!important;height:110px!important}
body[data-flowix-page="units"] main.wrap{padding-top:6px!important}
body[data-flowix-page="units"] #units .title{margin:0 0 6px!important}
body[data-flowix-page="units"] #units .item-master-toolbar{margin:0 0 8px!important}
body[data-flowix-page="units"] #units .item-types-admin-card{padding:14px 16px!important}
body[data-flowix-page="units"] #units .item-types-toolbar{margin:0 0 8px!important}
body[data-flowix-page="units"] #units .report-head{margin:0 0 8px!important;min-height:38px!important;padding:8px 12px!important}
body[data-flowix-page="units"] #units .tablebox{margin-top:0!important;padding-top:0!important}
body[data-flowix-page="units"] #units table{margin-top:0!important}
body[data-flowix-page="units"] #units thead{display:table-header-group!important}
body[data-flowix-page="units"] #units tbody{display:table-row-group!important}
body[data-flowix-page="units"] #units thead tr{position:static!important;transform:none!important}
body[data-flowix-page="units"] #units tbody tr{position:static!important;transform:none!important}
#unitAdminModal .item-type-admin-box{width:min(900px,calc(100vw - 40px))!important;max-width:900px!important}
#unitAdminModal .item-type-modal-layout{grid-template-columns:minmax(0,1fr) 330px!important;gap:20px!important}
#unitAdminModal .item-type-existing-panel{direction:rtl!important;text-align:right!important;padding:12px!important}
#unitAdminModal .item-type-existing-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:4px!important}
#unitAdminModal .item-type-existing-head b{font-size:18px!important;white-space:nowrap!important}
#unitAdminModal #unitExistingCount{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:34px!important;height:26px!important;padding:0 8px!important;border-radius:14px!important;background:#eaf4fb!important;color:#0f5f8f!important;font-weight:800!important}
#unitAdminModal .item-type-existing-note{line-height:1.55!important;margin:2px 0 8px!important}
#unitAdminModal #unitExistingSearch{box-sizing:border-box!important;width:100%!important;min-height:38px!important;margin:0 0 8px!important}
#unitAdminModal .item-type-existing-list{display:flex!important;flex-direction:column!important;gap:4px!important}
#unitAdminModal .item-type-existing-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;padding:7px 9px!important;border:1px solid #e2e8f0!important;border-radius:7px!important;background:#fff!important;line-height:1.35!important}
#unitAdminModal .item-type-existing-row span{display:block!important;min-width:0!important;overflow-wrap:anywhere!important}
#unitAdminModal .item-type-existing-row small{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:58px!important;padding:3px 7px!important;border-radius:12px!important;background:#e8f7ee!important;color:#18753b!important;font-weight:700!important;white-space:nowrap!important}
@media(max-width:760px){#unitAdminModal .item-type-modal-layout{grid-template-columns:1fr!important}}

/* Stage 7.5.147.0 — unify Units UI with Item Types + fix table header overlap */
body[data-flowix-page="units"] #units{
  margin-top:0!important;
}
body[data-flowix-page="units"] #units .title{
  margin:4px 0 8px!important;
}
body[data-flowix-page="units"] #units .item-master-toolbar{
  margin:0 0 8px!important;
}
body[data-flowix-page="units"] #units .card{
  margin-top:0!important;
}
body[data-flowix-page="units"] #units .item-types-toolbar{
  margin:0 0 8px!important;
  justify-content:flex-start!important;
}
body[data-flowix-page="units"] #units #unitSearch{
  max-width:420px!important;
  min-width:260px!important;
}
body[data-flowix-page="units"] #units .report-head{
  padding:8px 10px!important;
  margin:0 0 8px!important;
}

/* Critical fix: header must occupy normal table flow and never cover row 1. */
body[data-flowix-page="units"] #units .tablebox{
  position:relative!important;
  overflow:auto!important;
  padding:0!important;
  margin:0!important;
}
body[data-flowix-page="units"] #units table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  margin:0!important;
}
body[data-flowix-page="units"] #units thead{
  display:table-header-group!important;
  position:static!important;
}
body[data-flowix-page="units"] #units thead tr{
  display:table-row!important;
  position:static!important;
  transform:none!important;
}
body[data-flowix-page="units"] #units thead th{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
}
body[data-flowix-page="units"] #units tbody{
  display:table-row-group!important;
}
body[data-flowix-page="units"] #units tbody tr{
  display:table-row!important;
  position:static!important;
  transform:none!important;
}
body[data-flowix-page="units"] #units tbody td{
  position:static!important;
}

/* Units modal: same visual language as Item Types modal. */
#unitAdminModal[hidden],#unitAdminModal.hide{display:none!important}
#unitAdminModal:not([hidden]):not(.hide){
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  z-index:10050!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:20px!important;
  background:rgba(15,23,42,.28)!important;
  box-sizing:border-box!important;
}
#unitAdminModal .item-type-admin-box{
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  transform:none!important;
  width:min(820px,calc(100vw - 40px))!important;
  max-width:820px!important;
  max-height:calc(100vh - 40px)!important;
  overflow:auto!important;
  border-radius:14px!important;
  box-shadow:0 20px 55px rgba(15,23,42,.22)!important;
  background:#fff!important;
  opacity:1!important;
}
#unitAdminModal .modalhead,
#unitAdminModal .item-type-admin-form,
#unitAdminModal .modalactions{
  background:#fff!important;
  opacity:1!important;
}
#unitAdminModal .item-type-modal-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 270px!important;
  gap:18px!important;
  align-items:start!important;
  padding:8px 0 4px!important;
}
#unitAdminModal .item-type-admin-form{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
  padding:0!important;
}
#unitAdminModal .item-type-existing-panel{
  border:1px solid #dbe5ef!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  padding:10px!important;
  min-height:150px!important;
  max-height:300px!important;
  overflow:auto!important;
  direction:rtl!important;
  text-align:right!important;
}
#unitAdminModal .item-type-existing-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin-bottom:4px!important;
}
#unitAdminModal .item-type-existing-head span{
  font-size:12px!important;
  background:#e8f1f8!important;
  border-radius:999px!important;
  padding:2px 8px!important;
}
#unitAdminModal .item-type-existing-note{
  font-size:11px!important;
  color:#64748b!important;
  margin-bottom:8px!important;
}
#unitAdminModal #unitExistingSearch{
  width:100%!important;
  box-sizing:border-box!important;
  margin:0 0 8px!important;
}
#unitAdminModal .item-type-existing-list{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
}
#unitAdminModal .item-type-existing-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:7px 9px!important;
  border:1px solid #dbe5ef!important;
  border-radius:8px!important;
  background:#fff!important;
  line-height:1.35!important;
}
#unitAdminModal .item-type-existing-row > span{
  display:block!important;
  min-width:0!important;
  flex:1!important;
  font-size:14px!important;
}
#unitAdminModal .item-type-existing-row > small{
  display:inline-block!important;
  flex:0 0 auto!important;
  font-size:12px!important;
  color:#4b6475!important;
  white-space:nowrap!important;
}
@media(max-width:720px){
  body[data-flowix-page="units"] #units #unitSearch{max-width:none!important;min-width:0!important;width:100%!important}
  #unitAdminModal .item-type-modal-layout{grid-template-columns:1fr!important}
}

/* Stage 7.5.147.0 — dedicated System Maintenance page */
body[data-flowix-page="systemMaintenance"] #systemMaintenance .title{margin:4px 0 10px!important}
body[data-flowix-page="systemMaintenance"] #maintenanceAdminCard{margin-top:0!important}

/* Stage 7.5.147.0 — System Maintenance tabs */
.maintenance-page-tabs{display:flex;align-items:center;gap:8px;margin:0 0 10px;border-bottom:1px solid #dbe5ef;padding:0 2px}
.maintenance-page-tab{border:0;background:transparent;padding:10px 14px;font:inherit;font-weight:800;color:#64748b;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-1px}
.maintenance-page-tab.active{color:#0f5f8f;border-bottom-color:#0f78ad}
.maintenance-page-tab span{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 7px;border-radius:999px;background:#eaf4fb;color:#0f5f8f;font-size:12px;margin-inline-start:5px}
.maintenance-allowed-card{margin-top:0!important}
.maintenance-allowed-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:10px}
.maintenance-allowed-head>div{display:flex;flex-direction:column;gap:4px}.maintenance-allowed-head b{font-size:17px}.maintenance-allowed-head span{font-size:12px;color:#64748b}
#maintenanceAllowedSearch{width:min(390px,100%);min-height:38px}
.maintenance-allowed-table td,.maintenance-allowed-table th{vertical-align:middle}
@media(max-width:760px){.maintenance-page-tabs{overflow:auto}.maintenance-page-tab{white-space:nowrap}.maintenance-allowed-head{align-items:stretch;flex-direction:column}#maintenanceAllowedSearch{width:100%}}

/* Stage 7.5.147.0 — maintenance users grouped by company */
.maintenance-company-selector{display:flex;align-items:center;gap:10px;margin:0 0 10px;max-width:520px}
.maintenance-company-selector label{font-weight:800;white-space:nowrap}.maintenance-company-selector select{min-width:300px}
.maintenance-allowed-table th:nth-child(2),.maintenance-allowed-table td:nth-child(2){min-width:160px}
@media(max-width:700px){.maintenance-company-selector{align-items:stretch;flex-direction:column;max-width:none}.maintenance-company-selector select{min-width:0;width:100%}}

/* Stage 7.5.147.0 — Maintenance company selector + compact user list */
#maintenanceCompanyFilter{
  width:100%;
  min-height:46px;
  padding:8px 12px;
  font-size:15px;
  font-weight:700;
}
.maintenance-company-selector{
  max-width:none;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
}
.maintenance-company-selector label{
  font-size:15px;
  font-weight:800;
}
.maintenance-user-row{
  min-height:46px!important;
  padding:7px 12px!important;
  font-size:13px!important;
}
.maintenance-user-row span b{
  font-size:14px!important;
  line-height:1.35!important;
  font-weight:700!important;
}
.maintenance-user-row span small{
  font-size:11px!important;
  line-height:1.25!important;
}
.maintenance-user-row em{
  font-size:11px!important;
}
.maintenance-user-row input[type="checkbox"]{
  width:18px!important;
  height:18px!important;
}
@media(max-width:700px){
 .maintenance-company-selector{display:flex;flex-direction:column;align-items:stretch}
 #maintenanceCompanyFilter{width:100%}
}

/* Stage 7.5.147.0 — Maintenance layout refinement */
.maintenance-company-selector{
  width:100%!important;
  max-width:none!important;
  display:grid!important;
  grid-template-columns:auto minmax(520px,1fr)!important;
  align-items:center!important;
  gap:14px!important;
  direction:rtl!important;
}
.maintenance-company-selector label{
  grid-column:1!important;
  text-align:right!important;
  font-size:15px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
#maintenanceCompanyFilter{
  grid-column:2!important;
  width:100%!important;
  max-width:none!important;
  min-width:520px!important;
  min-height:46px!important;
  padding:8px 12px!important;
  font-size:15px!important;
  font-weight:700!important;
  direction:rtl!important;
  text-align:right!important;
}

/* Reduce maintenance user typography by two steps from 7.5.147.0 */
.maintenance-user-row{
  min-height:42px!important;
  padding:5px 10px!important;
  font-size:11px!important;
}
.maintenance-user-row span b{
  font-size:12px!important;
  line-height:1.3!important;
  font-weight:700!important;
}
.maintenance-user-row span small{
  font-size:9px!important;
  line-height:1.2!important;
}
.maintenance-user-row em{
  font-size:9px!important;
}
.maintenance-user-row input[type="checkbox"]{
  width:17px!important;
  height:17px!important;
}
@media(max-width:800px){
 .maintenance-company-selector{
   display:flex!important;
   flex-direction:column!important;
   align-items:stretch!important;
 }
 #maintenanceCompanyFilter{
   min-width:0!important;
   width:100%!important;
 }
}

/* Stage 7.5.147.0 — maintenance table isolated from global sticky rules */
.maintenance-users-list{
 overflow:auto!important;
 max-height:360px!important;
 border:1px solid #e1e9ef!important;
 border-radius:9px!important;
 background:#fff!important;
 padding:0!important;
 position:relative!important;
}
.maintenance-users-table-wrap{
 min-width:1080px!important;
 width:100%!important;
 margin:0!important;
 padding:0!important;
 position:relative!important;
}
.maintenance-users-table{
 width:100%!important;
 table-layout:fixed!important;
 border-collapse:collapse!important;
 border-spacing:0!important;
 margin:0!important;
 padding:0!important;
 display:table!important;
 direction:rtl!important;
 position:static!important;
}
.maintenance-users-table colgroup{display:table-column-group!important}
.maintenance-users-table col:nth-child(1){width:44px}
.maintenance-users-table col:nth-child(2){width:180px}
.maintenance-users-table col:nth-child(3){width:135px}
.maintenance-users-table col:nth-child(4){width:120px}
.maintenance-users-table col:nth-child(5){width:145px}
.maintenance-users-table col:nth-child(6){width:190px}
.maintenance-users-table col:nth-child(7){width:80px}
.maintenance-users-table col:nth-child(8){width:145px}

#systemMaintenance .maintenance-users-table thead{
 display:table-header-group!important;
 position:static!important;
 top:auto!important;
 z-index:auto!important;
 transform:none!important;
}
#systemMaintenance .maintenance-users-table thead tr{
 display:table-row!important;
 position:static!important;
 top:auto!important;
 transform:none!important;
}
#systemMaintenance .maintenance-users-table thead th{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 left:auto!important;
 right:auto!important;
 z-index:auto!important;
 transform:none!important;
 background:#15466f!important;
 color:#fff!important;
 font-size:11px!important;
 font-weight:800!important;
 padding:9px 7px!important;
 text-align:center!important;
 vertical-align:middle!important;
 white-space:nowrap!important;
 box-shadow:none!important;
}
#systemMaintenance .maintenance-users-table tbody{
 display:table-row-group!important;
 position:static!important;
 top:auto!important;
 transform:none!important;
}
#systemMaintenance .maintenance-users-table tbody tr{
 display:table-row!important;
 position:static!important;
 top:auto!important;
 transform:none!important;
 height:auto!important;
}
#systemMaintenance .maintenance-users-table tbody td{
 display:table-cell!important;
 position:static!important;
 top:auto!important;
 transform:none!important;
 font-size:11px!important;
 padding:7px 7px!important;
 text-align:center!important;
 vertical-align:middle!important;
 border-bottom:1px solid #e7edf2!important;
 line-height:1.3!important;
 background:inherit!important;
}
#systemMaintenance .maintenance-users-table tbody tr:nth-child(even){background:#f8fafc!important}
#systemMaintenance .maintenance-users-table tbody tr:nth-child(odd){background:#fff!important}
#systemMaintenance .maintenance-users-table tbody td:nth-child(2){
 font-size:12px!important;
 text-align:right!important;
}
.maintenance-project-cell{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.maintenance-access-cell label{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;cursor:pointer!important}
.maintenance-access-cell input{width:17px!important;height:17px!important;margin:0!important}
.maintenance-access-cell span{font-size:10px;font-weight:800;color:#496478}

/* Stage 7.5.147.0 — Users page: selected-company KPI summary */
#users .users-company-summary{margin:10px 0 12px}
#users .users-company-summary.hide{display:none!important}
#users .users-company-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 7px}
#users .users-company-summary-head b{font-size:14px;color:#143f63}
#users .users-company-summary-head span{font-size:11px;color:#718496}
#users .users-company-kpis{width:100%;grid-template-columns:repeat(4,minmax(0,1fr))!important}
#users .users-company-kpis .user-kpi{min-height:86px}
@media(max-width:1000px){#users .users-company-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:620px){#users .users-company-kpis{grid-template-columns:1fr!important}.users-company-summary-head{align-items:flex-start!important;flex-direction:column!important}}

/* Stage 7.5.147.0 — Users page complete pass */
#users .users-search-row-after-company{margin:0 0 10px;align-items:end}
#users .users-search-row-after-company .users-search-panel{flex:1}
#users .users-search-row-after-company .users-searchbar{width:100%}

.item-master-search-wrap{display:flex;align-items:center;gap:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:0 10px;min-width:300px}
.item-master-search-wrap span{font-size:20px;color:#64748b}.item-master-search-wrap input{border:0!important;outline:0!important;box-shadow:none!important;width:100%;min-width:260px;background:transparent}.item-delete-btn{font-weight:700}


/* Stage 7.5.150.0 — Item Master header/actions restoration (superseded by 7.5.151.0 final override) */
body[data-flowix-page="items"] main.wrap{padding-top:8px!important}
body[data-flowix-page="items"] #items>.title.item-master-page-head{
 display:flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:18px!important;
 width:100%!important;
 height:auto!important;
 min-height:72px!important;
 margin:0 0 10px!important;
 padding:12px 16px!important;
 box-sizing:border-box!important;
 position:relative!important;
 top:auto!important;
 z-index:auto!important;
 background:#fff!important;
 border:1px solid #dbe5ee!important;
 border-radius:10px!important;
 box-shadow:0 2px 8px rgba(18,56,93,.05)!important;
 direction:rtl!important;
}
body[data-flowix-page="items"] #items>.title.item-master-page-head::before{display:none!important;content:none!important;background:none!important}
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-page-copy{
 display:block!important;
 flex:1 1 auto!important;
 width:auto!important;
 text-align:right!important;
}
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-page-copy h1{
 display:block!important;
 margin:0!important;
 padding:0!important;
 font-family:Tahoma,Arial,sans-serif!important;
 font-size:22px!important;
 line-height:1.25!important;
 font-weight:800!important;
 color:#102f49!important;
 text-align:right!important;
}
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-page-copy .sub{
 display:block!important;
 margin-top:4px!important;
 font-size:11px!important;
 line-height:1.5!important;
 color:#718096!important;
 text-align:right!important;
}
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-toolbar{
 display:flex!important;
 flex:0 0 auto!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:8px!important;
 margin:0!important;
 padding:0!important;
 position:relative!important;
 visibility:visible!important;
 opacity:1!important;
 direction:rtl!important;
}
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-toolbar .btn,
body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-toolbar .item-import-label{
 display:inline-flex!important;
 visibility:visible!important;
 opacity:1!important;
 align-items:center!important;
 justify-content:center!important;
 min-height:42px!important;
 padding:0 14px!important;
 margin:0!important;
 white-space:nowrap!important;
 cursor:pointer!important;
}
body[data-flowix-page="items"] #items>.card{margin-top:0!important}
body[data-flowix-page="items"] #items .item-master-search-wrap{min-height:40px!important}
@media(max-width:980px){
 body[data-flowix-page="items"] #items>.title.item-master-page-head{align-items:stretch!important;flex-direction:column!important}
 body[data-flowix-page="items"] #items>.title.item-master-page-head>.item-master-toolbar{width:100%!important;flex-wrap:wrap!important;justify-content:flex-start!important}
}

/* FLOWIX 7.5.198.0 — Material Issue mobile-only layout from 7.5.193 stable baseline.
   Desktop is intentionally untouched. */
@media screen and (max-width:760px){
  #materialIssue{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }

  #materialIssue .mi-page-head{
    display:block!important;
    width:100%!important;
    margin-bottom:12px!important;
  }
  #materialIssue .mi-page-head>div:first-child,
  #materialIssue .mi-page-head-actions{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  #materialIssue .mi-page-head-actions .btn{
    display:block!important;
    width:100%!important;
    min-height:46px!important;
    margin:8px 0!important;
  }

  /* Force the top request data into one full-width field per row on mobile only. */
  #materialIssue .mi-form-top,
  #materialIssue .mi-form-grid{
    display:block!important;
    grid-template-columns:none!important;
    grid-auto-flow:row!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:0!important;
  }

  #materialIssue .mi-form-top>.mi-number-card,
  #materialIssue .mi-form-top>.field,
  #materialIssue .mi-form-grid>.field{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin:0 0 12px!important;
    grid-column:auto!important;
    grid-row:auto!important;
  }

  #materialIssue .mi-number-card{
    height:auto!important;
    min-height:66px!important;
    padding:10px 12px!important;
  }
  #materialIssue .mi-number-card span{
    display:block!important;
    font-size:11px!important;
    margin-bottom:5px!important;
  }
  #materialIssue .mi-number-card b{
    display:block!important;
    font-size:16px!important;
    line-height:1.5!important;
    overflow-wrap:anywhere!important;
  }

  #materialIssue .field label{
    display:block!important;
    width:100%!important;
    margin:0 0 6px!important;
    font-size:13px!important;
    line-height:1.4!important;
    text-align:right!important;
  }
  #materialIssue .field input,
  #materialIssue .field select{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:48px!important;
    min-height:48px!important;
    box-sizing:border-box!important;
    font-size:14px!important;
  }

  #materialIssue .mi-stock-toolbar{
    display:block!important;
    width:100%!important;
    margin:7px 0 10px!important;
  }
  #materialIssue .mi-stock-toolbar .btn{
    display:block!important;
    width:100%!important;
    min-height:46px!important;
    margin:0 0 7px!important;
  }
  #materialIssue .mi-stock-toolbar span{
    display:block!important;
    width:100%!important;
    line-height:1.6!important;
    text-align:right!important;
  }

  #materialIssue .mi-items-tablebox,
  #materialIssue .mi-list-card>.tablebox{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  #materialIssue .mi-items-table{
    min-width:1040px!important;
    width:1040px!important;
    table-layout:auto!important;
  }
  #materialIssue .mi-list-table{
    min-width:900px!important;
    width:900px!important;
    table-layout:auto!important;
  }

  #materialIssue .mi-notes textarea{
    width:100%!important;
    min-height:90px!important;
    max-height:none!important;
    box-sizing:border-box!important;
  }

  #materialIssue .mi-actions{
    display:block!important;
    width:100%!important;
  }
  #materialIssue .mi-actions .btn{
    display:block!important;
    width:100%!important;
    min-height:46px!important;
    margin:0 0 8px!important;
  }

  #materialIssue .mi-list-filters{
    display:block!important;
    width:100%!important;
  }
  #materialIssue .mi-list-filters>*{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin:0 0 8px!important;
  }
}

/* FLOWIX 7.5.199.0 — Material Issue stock picker: MOBILE ONLY.
   Desktop layout, HTML, JavaScript, Select behavior and MutationObserver logic are untouched. */
@media screen and (max-width:760px){

  #miItemPickerModal.mi-picker-overlay{
    padding:8px!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }

  #miItemPickerModal>.mi-picker-box{
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }

  #miItemPickerModal .modalhead{
    flex:0 0 auto!important;
    padding:11px 12px!important;
    gap:8px!important;
  }

  #miItemPickerModal .modalhead b{
    font-size:16px!important;
    line-height:1.35!important;
  }

  #miItemPickerModal #miPickerProject{
    font-size:11px!important;
    line-height:1.45!important;
    margin-top:3px!important;
    white-space:normal!important;
  }

  #miItemPickerModal .modalhead .x{
    flex:0 0 40px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }

  /* Mobile toolbar: search, stock filter and result count in a clean vertical flow. */
  #miItemPickerModal .mi-picker-tools{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:10px 12px!important;
    flex:0 0 auto!important;
  }

  #miItemPickerModal .mi-picker-search-wrap{
    width:100%!important;
    min-width:0!important;
  }

  #miItemPickerModal .mi-picker-search-wrap input,
  #miItemPickerModal #miPickerStock{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    font-size:14px!important;
  }

  #miItemPickerModal .mi-picker-count{
    display:block!important;
    width:100%!important;
    padding:1px 2px 0!important;
    text-align:right!important;
    font-size:12px!important;
    font-weight:800!important;
  }

  /* Convert the stock table to native CSS cards on mobile only.
     The original table/DOM stays exactly the same for Desktop. */
  #miItemPickerModal .mi-picker-table{
    flex:1 1 auto!important;
    min-height:0!important;
    margin:0 10px!important;
    border:0!important;
    border-radius:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:#f6f9fb!important;
    padding:0 2px 8px!important;
  }

  #miItemPickerModal .mi-picker-table table,
  #miItemPickerModal .mi-picker-table tbody{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
  }

  #miItemPickerModal .mi-picker-table thead{
    display:none!important;
  }

  #miItemPickerModal .mi-picker-table tbody tr{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0 0 10px!important;
    padding:10px 11px!important;
    box-sizing:border-box!important;
    background:#fff!important;
    border:1px solid #d8e4ec!important;
    border-radius:10px!important;
    box-shadow:0 1px 2px rgba(20,55,80,.04)!important;
  }

  #miItemPickerModal .mi-picker-table tbody td{
    display:grid!important;
    grid-template-columns:105px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:34px!important;
    padding:5px 0!important;
    box-sizing:border-box!important;
    border:0!important;
    border-bottom:1px solid #edf2f5!important;
    text-align:right!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:last-child{
    border-bottom:0!important;
  }

  #miItemPickerModal .mi-picker-table tbody td::before{
    font-size:11px!important;
    font-weight:800!important;
    color:#647c8d!important;
    text-align:right!important;
    line-height:1.35!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(1)::before{content:"اختيار";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(2)::before{content:"كود الصنف";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(3)::before{content:"اسم الصنف";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(4)::before{content:"الوحدة";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(5)::before{content:"المستودع / الموقع";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6)::before{content:"الرصيد المتاح";}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(7)::before{content:"الكمية";}

  #miItemPickerModal .mi-picker-table .mi-item-name{
    text-align:right!important;
    overflow-wrap:anywhere!important;
  }

  #miItemPickerModal .mi-picker-table .mi-pick-check{
    width:22px!important;
    height:22px!important;
    margin:0!important;
    justify-self:start!important;
  }

  #miItemPickerModal .mi-picker-table .mi-pick-qty{
    width:100%!important;
    max-width:130px!important;
    min-width:90px!important;
    height:40px!important;
    box-sizing:border-box!important;
    justify-self:start!important;
    font-size:15px!important;
  }

  /* Empty state must remain a simple message, not a 7-field card. */
  #miItemPickerModal .mi-picker-table tbody tr:has(td.mi-empty){
    min-height:130px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  #miItemPickerModal .mi-picker-table td.mi-empty{
    display:block!important;
    width:100%!important;
    border:0!important;
    text-align:center!important;
    padding:24px 10px!important;
  }

  #miItemPickerModal .mi-picker-table td.mi-empty::before{
    content:none!important;
  }

  /* Keep the action area visible and touch friendly. */
  #miItemPickerModal .mi-picker-box .modalactions{
    flex:0 0 auto!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
    margin:0!important;
    background:#fff!important;
    border-top:1px solid #dce6ed!important;
  }

  #miItemPickerModal .mi-picker-box .modalactions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:50px!important;
    margin:0!important;
    white-space:normal!important;
    line-height:1.35!important;
    font-size:14px!important;
  }
}

/* FLOWIX 7.5.200.0 — Material Issue stock picker quantity emphasis: MOBILE ONLY.
   Desktop / HTML / JavaScript / Select / MutationObserver remain untouched. */
@media screen and (max-width:760px){

  /* Make available balance visually clear. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6){
    grid-template-columns:105px minmax(0,1fr)!important;
    font-weight:800!important;
  }

  /* Make requested quantity the strongest editable field in each mobile card. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(7){
    margin-top:5px!important;
    padding:10px!important;
    border:1px solid #cbdbe5!important;
    border-radius:9px!important;
    background:#f7fafc!important;
    grid-template-columns:105px minmax(0,1fr)!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(7)::before{
    content:"الكمية المطلوبة"!important;
    font-size:12px!important;
    font-weight:900!important;
    color:#263f52!important;
  }

  #miItemPickerModal .mi-picker-table .mi-pick-qty{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    padding:7px 10px!important;
    font-size:16px!important;
    font-weight:800!important;
    text-align:center!important;
    border-width:1px!important;
    border-radius:8px!important;
    background:#fff!important;
  }

  /* Keep checkbox/selection readable but secondary to quantity. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(1){
    min-height:40px!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(1)::before{
    content:"اختيار الصنف"!important;
  }
}

/* FLOWIX 7.5.201.0 — Material Issue item card hierarchy: MOBILE ONLY.
   Item description/specification is visually primary; code remains visible as reference.
   Desktop / HTML / JavaScript / Select / MutationObserver are untouched. */
@media screen and (max-width:760px){

  /* Item description/specification becomes the visual title of each stock card. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(3){
    display:block!important;
    padding:10px 0 12px!important;
    margin:0 0 4px!important;
    border-bottom:1px solid #dbe6ed!important;
    text-align:right!important;
    font-size:16px!important;
    font-weight:900!important;
    line-height:1.55!important;
    color:#18384f!important;
    overflow-wrap:anywhere!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(3)::before{
    content:"اسم الصنف / المواصفات"!important;
    display:block!important;
    margin:0 0 5px!important;
    font-size:11px!important;
    font-weight:800!important;
    line-height:1.3!important;
    color:#718695!important;
  }

  /* Code remains available but secondary. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(2){
    font-size:13px!important;
    font-weight:800!important;
    color:#344e60!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(2)::before{
    content:"كود الصنف"!important;
  }

  /* Keep operational information easy to scan. */
  #miItemPickerModal .mi-picker-table tbody td:nth-child(4)::before{content:"الوحدة"!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(5)::before{content:"المستودع"!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6)::before{content:"الرصيد المتاح"!important;}

  #miItemPickerModal .mi-picker-table tbody td:nth-child(6){
    font-size:16px!important;
    font-weight:900!important;
    color:#18384f!important;
  }

  /* Put selection after the item identity/details visually, without changing DOM. */
  #miItemPickerModal .mi-picker-table tbody tr{
    display:flex!important;
    flex-direction:column!important;
  }

  #miItemPickerModal .mi-picker-table tbody td:nth-child(3){order:1!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(2){order:2!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(4){order:3!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(5){order:4!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6){order:5!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(1){order:6!important;}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(7){order:7!important;}

  /* Preserve empty-state behavior. */
  #miItemPickerModal .mi-picker-table tbody tr:has(td.mi-empty){
    display:flex!important;
  }
}

/* FLOWIX 7.5.202.0 — MI smart browse/search/category: MOBILE ONLY.
   Desktop visual layout remains untouched. */
@media screen and (max-width:760px){
  #miItemPickerModal .mi-mobile-category-bar{
    display:flex!important;
    width:100%!important;
    gap:7px!important;
    padding:0 12px 10px!important;
    box-sizing:border-box!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  #miItemPickerModal .mi-mobile-category-bar::-webkit-scrollbar{display:none!important}
  #miItemPickerModal .mi-mobile-category-chip{
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:7px 12px!important;
    border:1px solid #cbd9e3!important;
    border-radius:999px!important;
    background:#fff!important;
    font:inherit!important;
    font-size:12px!important;
    font-weight:800!important;
    color:#355064!important;
    white-space:nowrap!important;
  }
  #miItemPickerModal .mi-mobile-category-chip.active{
    background:#163f60!important;
    border-color:#163f60!important;
    color:#fff!important;
  }
  #miItemPickerModal .mi-mobile-browse-note{
    display:block!important;
    width:100%!important;
    box-sizing:border-box!important;
    padding:0 14px 8px!important;
    font-size:11px!important;
    line-height:1.5!important;
    color:#6e8291!important;
    text-align:right!important;
  }
}

/* FLOWIX 7.5.203.0 — MI compact picker with 20-row paging: MOBILE ONLY.
   Desktop / Select / MutationObserver remain untouched. */
@media screen and (max-width:760px){
  #miItemPickerModal .mi-mobile-category-bar,
  #miItemPickerModal .mi-mobile-browse-note{display:none!important}

  #miItemPickerModal .mi-picker-table{
    padding:0 8px 8px!important;margin:0!important;background:#fff!important;
    overflow-x:hidden!important;overflow-y:auto!important;
  }
  #miItemPickerModal .mi-picker-table table{
    display:table!important;width:100%!important;min-width:0!important;
    border-collapse:separate!important;border-spacing:0 6px!important;table-layout:fixed!important;
  }
  #miItemPickerModal .mi-picker-table thead{display:table-header-group!important}
  #miItemPickerModal .mi-picker-table thead tr{display:table-row!important}
  #miItemPickerModal .mi-picker-table thead th{display:none!important}

  #miItemPickerModal .mi-picker-table thead th:nth-child(1),
  #miItemPickerModal .mi-picker-table thead th:nth-child(3),
  #miItemPickerModal .mi-picker-table thead th:nth-child(6),
  #miItemPickerModal .mi-picker-table thead th:nth-child(7){
    display:table-cell!important;padding:8px 4px!important;font-size:10px!important;
    line-height:1.2!important;white-space:normal!important;text-align:center!important;
  }
  #miItemPickerModal .mi-picker-table thead th:nth-child(1){width:42px!important}
  #miItemPickerModal .mi-picker-table thead th:nth-child(3){width:auto!important}
  #miItemPickerModal .mi-picker-table thead th:nth-child(6){width:58px!important}
  #miItemPickerModal .mi-picker-table thead th:nth-child(7){width:78px!important}

  #miItemPickerModal .mi-picker-table tbody{display:table-row-group!important;width:100%!important}
  #miItemPickerModal .mi-picker-table tbody tr{
    display:table-row!important;width:auto!important;margin:0!important;padding:0!important;
    background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  }
  #miItemPickerModal .mi-picker-table tbody td{
    display:none!important;width:auto!important;min-width:0!important;height:auto!important;
    padding:8px 4px!important;border-top:1px solid #dbe5ec!important;border-bottom:1px solid #dbe5ec!important;
    background:#f8fbfd!important;vertical-align:middle!important;text-align:center!important;
    white-space:normal!important;overflow-wrap:anywhere!important;font-size:12px!important;line-height:1.35!important;
  }
  #miItemPickerModal .mi-picker-table tbody td::before{content:none!important}
  #miItemPickerModal .mi-picker-table tbody td:nth-child(1),
  #miItemPickerModal .mi-picker-table tbody td:nth-child(3),
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6),
  #miItemPickerModal .mi-picker-table tbody td:nth-child(7){display:table-cell!important}

  #miItemPickerModal .mi-picker-table tbody td:nth-child(1){
    width:42px!important;border-right:1px solid #dbe5ec!important;border-radius:8px 0 0 8px!important;
  }
  #miItemPickerModal .mi-picker-table tbody td:nth-child(3){
    width:auto!important;margin:0!important;padding:8px 6px!important;border-radius:0!important;
    font-size:12px!important;font-weight:800!important;color:#18384f!important;text-align:right!important;
  }
  #miItemPickerModal .mi-picker-table tbody td:nth-child(6){
    width:58px!important;font-size:13px!important;font-weight:900!important;color:#18384f!important;
  }
  #miItemPickerModal .mi-picker-table tbody td:nth-child(7){
    width:78px!important;margin:0!important;padding:6px 3px!important;border-left:1px solid #dbe5ec!important;
    border-radius:0 8px 8px 0!important;background:#f8fbfd!important;
  }
  #miItemPickerModal .mi-picker-table .mi-pick-check{
    width:20px!important;height:20px!important;margin:0 auto!important;
  }
  #miItemPickerModal .mi-picker-table .mi-pick-qty{
    width:66px!important;max-width:66px!important;min-width:66px!important;height:38px!important;min-height:38px!important;
    margin:0 auto!important;padding:4px!important;font-size:14px!important;font-weight:800!important;
    text-align:center!important;border-radius:6px!important;box-sizing:border-box!important;
  }
  #miItemPickerModal .mi-picker-table tbody tr:has(td.mi-empty){display:table-row!important}
  #miItemPickerModal .mi-picker-table tbody td.mi-empty{
    display:table-cell!important;width:100%!important;padding:28px 10px!important;border:1px solid #e0e8ee!important;
    border-radius:8px!important;text-align:center!important;background:#f8fbfd!important;
  }

  #miItemPickerModal .mi-mobile-pager{
    display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center!important;
    gap:8px!important;width:100%!important;box-sizing:border-box!important;padding:8px 12px 4px!important;
  }
  #miItemPickerModal .mi-mobile-pager button{
    min-height:40px!important;border:1px solid #cad8e2!important;border-radius:8px!important;background:#fff!important;
    font:inherit!important;font-size:12px!important;font-weight:800!important;color:#28465b!important;
  }
  #miItemPickerModal .mi-mobile-pager button:disabled{opacity:.45!important}
  #miItemPickerModal .mi-mobile-page-info{
    min-width:78px!important;text-align:center!important;font-size:11px!important;font-weight:800!important;
    color:#627888!important;white-space:nowrap!important;
  }
}



/* Stage 7.5.211.0 — MOBILE ONLY: drawer must sit above its dimmed page overlay.
   The nav z-index is inside the header stacking context, so the header itself
   must be above body.mobile-nav-open::after (12950). */
@media screen and (max-width:760px){
  body.mobile-nav-open #app>header{
    z-index:13000!important;
  }
}


/* Stage 7.5.217.0 — Shift Reports Desktop refinements. Mobile stable baseline is untouched. */
.shift-head-grid{display:grid;grid-template-columns:1fr 1.6fr 1fr 1fr 1fr 2fr;gap:10px;align-items:end}.shift-entry-add{display:grid;grid-template-columns:130px 150px minmax(260px,1fr) 170px minmax(180px,1fr) auto;gap:8px;align-items:end;margin-bottom:10px}.shift-entry-add input,.shift-entry-add select{min-height:38px}.shift-table,.shift-list-table{width:100%;border-collapse:collapse}.shift-table th,.shift-list-table th{background:#edf4f8;color:#274f68;padding:9px 7px;font-size:11px}.shift-table td,.shift-list-table td{padding:8px 7px;border-bottom:1px solid #e2e9ee;font-size:11px;text-align:center}.shift-tablebox{max-height:430px;overflow:auto}.shift-list-tools{display:flex;gap:8px;margin-bottom:10px}.shift-list-tools input{min-width:360px}.sr-pill{display:inline-block;padding:4px 9px;border-radius:14px;font-size:10px;font-weight:800}.sr-pill.done{background:#e9f5ed;color:#34734a}.sr-pill.pending{background:#fff3df;color:#9a6518}.sr-pill.progress{background:#e8f1fb;color:#2f6798}.sr-pill.handover{background:#f4eafa;color:#75469a}.sr-report-final{color:#34734a;font-weight:800}.sr-report-draft{color:#9a6518;font-weight:800}
@media screen and (max-width:760px){#nShiftReports,#shiftReports{display:none!important}}


/* FLOWIX 7.5.217.0 — Shift Reports Desktop only */
@media screen and (min-width:761px){
 #shiftReports{display:block}
 #shiftReports.hide{display:none!important}
 .sr-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:14px}
 .sr-page-head h1{margin:0 0 4px}
 .sr-export-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;width:100%}
 .sr-export-actions .btn{min-width:88px}
 .sr-form-card{padding:18px}
 .sr-meta-grid{display:grid;grid-template-columns:minmax(135px,.9fr) minmax(225px,1.55fr) minmax(88px,.52fr) minmax(210px,1.22fr) minmax(165px,1.02fr) minmax(300px,2.05fr);gap:10px;align-items:end;white-space:nowrap}
@media screen and (min-width:761px){
 .sr-meta-grid{grid-template-columns:minmax(135px,.9fr) minmax(215px,1.42fr) minmax(155px,.88fr) minmax(200px,1.16fr) minmax(160px,.98fr) minmax(285px,1.9fr)}
 #shiftReports #srShift{min-width:180px}
 #shiftReports .sr-meta-grid>div:nth-child(3){min-width:180px}
 #shiftReports .sr-shift-time-237{display:block;min-height:18px;margin-top:5px;text-align:center;direction:rtl;unicode-bidi:isolate;font-size:12px;font-weight:700;color:#64748b;line-height:1.25;white-space:nowrap}
}
@media screen and (max-width:760px){#shiftReports .sr-shift-time-237{display:none!important}}
 #srDateDisplay{font-size:12px;line-height:1.2;white-space:nowrap}
 .sr-number-card{min-height:70px;border:1px solid var(--line,#dfe5ea);border-radius:12px;padding:10px 12px;background:#f8fafb;display:flex;flex-direction:column;justify-content:center}
 .sr-number-card span{font-size:12px;opacity:.7}
 .sr-number-card b{font-size:16px;margin:3px 0}
 .sr-number-card small{font-size:11px;opacity:.65}
 .sr-date-display{font-size:12px;opacity:.72;margin-top:4px;min-height:17px}
 .sr-engineer-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px;min-height:22px}
 .sr-engineer-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line,#dfe5ea);border-radius:999px;padding:3px 8px;background:#f7f9fb;font-size:12px}
 .sr-engineer-chip button{border:0;background:transparent;cursor:pointer;font-size:14px;line-height:1}
 .sr-section-title{margin-top:18px;margin-bottom:10px}
 .sr-entry-grid{display:grid;grid-template-columns:minmax(135px,1fr) minmax(115px,.72fr) minmax(310px,2.45fr) minmax(125px,.78fr) minmax(260px,2fr) auto;gap:9px;align-items:end}
 .sr-add-wrap{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
 .sr-reason-hint-263{display:none;font-size:12px;font-weight:800;color:#b45309;line-height:1.35;max-width:210px}
 .sr-reason-hint-263.show{display:inline-block}
 .sr-add-wrap .btn{white-space:nowrap;min-height:40px}
 .sr-tablebox{margin-top:6px;max-height:390px;overflow:auto}
 .shift-table{min-width:1100px}
 .shift-table th:nth-child(4),.shift-table td:nth-child(4){min-width:300px}
 .shift-table th:nth-child(6),.shift-table td:nth-child(6){min-width:220px}
 .sr-general-notes{margin-top:14px}
 .sr-form-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}
 .sr-list-card{margin-top:16px}
 .sr-list-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:12px}
 .sr-list-tools{display:flex;gap:8px;min-width:430px}
 .sr-list-tools input{flex:1}
 .shift-list-table{min-width:1100px}
 .sr-actions-cell{display:flex;gap:5px;flex-wrap:wrap}
 .sr-actions-cell .btn{font-size:12px;padding:5px 8px}
 .sr-status-draft{display:inline-block;border-radius:999px;padding:4px 9px;background:#fff8e1;color:#7a5a00;font-size:12px;font-weight:700}
 .sr-status-final{display:inline-block;border-radius:999px;padding:4px 9px;background:#e8f5e9;color:#1b5e20;font-size:12px;font-weight:700}
 .sr-resume-note{margin:8px 0 0;padding:8px 10px;border:1px dashed var(--line,#dfe5ea);border-radius:9px;background:#fafcfd;font-size:12px}
 .sr-pdf-sheet{position:fixed;left:-12000px;top:0;width:1120px;background:#fff;color:#111;padding:0;font-family:Arial,Tahoma,sans-serif;direction:rtl}
 .sr-pdf-page{width:1120px;min-height:735px;background:#fff;padding:26px 30px 22px;box-sizing:border-box;display:flex;flex-direction:column}
 .sr-pdf-header{display:grid;grid-template-columns:170px 1fr 170px;align-items:center;gap:14px;border-bottom:2px solid #283744;padding-bottom:10px;margin-bottom:10px}
 .sr-pdf-header-center{text-align:center;font-weight:700;line-height:1.45}
 .sr-pdf-header-center h2{margin:5px 0 0;font-size:24px}
 .sr-pdf-meta{display:grid;grid-template-columns:1.55fr 1.35fr .82fr 1.25fr 1.28fr;gap:6px;margin-bottom:8px}
 .sr-pdf-meta div{border:1px solid #c8ced4;padding:5px 9px;min-height:34px;box-sizing:border-box;font-size:13px;line-height:1.35;display:flex;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden}
 .sr-pdf-meta .sr-pdf-report-no{direction:ltr;font-weight:800}
 .sr-pdf-meta .sr-pdf-creator{font-weight:700}
 .sr-pdf-sheet table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}
 .sr-pdf-sheet th,.sr-pdf-sheet td{border:1px solid #aeb7bf;padding:8px 7px;text-align:right;vertical-align:top;line-height:1.5;word-break:break-word}
 .sr-pdf-sheet th{background:#e9edf1;color:#111!important;font-weight:700;text-align:center;font-size:13px}
 .sr-pdf-sheet td:nth-child(1),.sr-pdf-sheet th:nth-child(1){width:4%;text-align:center}
 .sr-pdf-sheet td:nth-child(2),.sr-pdf-sheet th:nth-child(2){width:13%;text-align:center}
 .sr-pdf-sheet td:nth-child(3),.sr-pdf-sheet th:nth-child(3){width:11%;text-align:center}
 .sr-pdf-sheet td:nth-child(4),.sr-pdf-sheet th:nth-child(4){width:34%}
 .sr-pdf-sheet td:nth-child(5),.sr-pdf-sheet th:nth-child(5){width:11%;text-align:center}
 .sr-pdf-sheet td:nth-child(6),.sr-pdf-sheet th:nth-child(6){width:27%}
 .sr-pdf-notes{margin-top:10px;border:1px solid #c8ced4;padding:9px 10px;font-size:13px;line-height:1.5}
 .sr-pdf-signatures{display:grid;gap:34px;margin-top:56px;padding-top:12px}
 .sr-pdf-signature{text-align:center;border-top:1px solid #707b85;padding-top:7px;font-weight:700;font-size:13px}
 .sr-pdf-continuation{font-size:13px;color:#58636d;text-align:center;margin:-3px 0 8px}
 /* 7.5.224.0 Desktop-only: keep Shift Report table header at the top of its own scroll box. */
 #shiftReports .sr-tablebox .shift-table thead th{position:sticky!important;top:0!important;z-index:4!important;background:#edf4f8!important}
 #shiftReports .sr-form-actions{margin:0 0 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:10px;border-bottom:1px solid var(--line,#dfe5ea)}
 #shiftReports .sr-main-action-buttons,#shiftReports .sr-inline-output-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
 #shiftReports .sr-inline-output-actions{margin-inline-start:auto}
 #shiftReports .sr-export-group{background:#e3f1ff!important;border:1px solid #70aee0!important;box-shadow:inset 0 0 0 1px rgba(44,125,190,.05)}
 #shiftReports .sr-share-group{background:#e2f7e9!important;border:1px solid #55b77b!important;box-shadow:inset 0 0 0 1px rgba(48,145,86,.05)}
 #shiftReports .sr-export-group>span{color:#155d93;opacity:1}
 #shiftReports .sr-share-group>span{color:#267544;opacity:1}
 #shiftReports .sr-export-group .btn{background:#f4f9ff;border-color:#70aee0}
 #shiftReports .sr-share-group .btn{background:#f3fbf6;border-color:#55b77b}
}
/* Mobile protection: Shift Reports stays completely hidden until its dedicated mobile phase. */
@media screen and (max-width:760px){
 #nShiftReports,#shiftReports{display:none!important}
}


@media screen and (min-width:761px){
 .sr-date-card{position:relative;min-height:40px;white-space:nowrap;border:1px solid var(--line,#dfe5ea);border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 11px;cursor:pointer;font-weight:600}
 .sr-date-card #srDate{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
 .sr-calendar-icon{opacity:.65}
 .sr-engineer-picker{display:grid;grid-template-columns:.85fr 1.4fr;gap:6px}
 .sr-action-group{display:flex;gap:6px;align-items:center;border:1px solid var(--line,#dfe5ea);padding:6px 8px;border-radius:10px;background:#fff}.sr-action-group.sr-export-group{background:#eef6ff;border-color:#b9d8f3}.sr-action-group.sr-share-group{background:#eefaf3;border-color:#b9e1c8}.sr-action-group.sr-export-group .btn{border-color:#6ea9d6}.sr-action-group.sr-share-group .btn{border-color:#65b985}
 .sr-action-group>span{font-size:11px;font-weight:700;opacity:.7;margin-inline-end:2px}
 .sr-register-filters{display:grid;grid-template-columns:1fr 1fr 1fr 1.4fr 1.4fr 1fr 2.2fr auto;gap:9px;align-items:end;margin-bottom:14px}
 /* 7.5.226.0 Desktop-only: keep Shift Report Register headers in normal table flow so they never overlap row data. */
 #shiftReportRegister .tablebox .shift-list-table thead,
 #shiftReportRegister .tablebox .shift-list-table thead tr,
 #shiftReportRegister .tablebox .shift-list-table tbody,
 #shiftReportRegister .tablebox .shift-list-table tbody tr{position:static!important;top:auto!important;inset:auto!important;transform:none!important}
 #shiftReportRegister .tablebox .shift-list-table thead th{position:static!important;top:auto!important;inset:auto!important;z-index:auto!important;transform:none!important;background:#edf4f8!important;box-shadow:none!important;vertical-align:middle!important}
 #shiftReportRegister .tablebox .shift-list-table tbody td{position:static!important;top:auto!important;z-index:auto!important;vertical-align:middle!important}
 .sr-clear-filter{padding-bottom:1px}
 .pf-sr-template-modal{width:min(900px,calc(100vw - 50px))}
 .pf-sr-template-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
}
@media screen and (max-width:760px){
 #nShiftReportRegister,#shiftReportRegister,#pfShiftReportTemplateModal{display:none!important}
}

/* Stage 7.5.281.0 — desktop-only settings organization; mobile remains untouched */
@media (min-width:701px){
 /* 7.5.283.0 — Desktop header destinations + balanced project profile card. */
 #settings .settings-main-cards282{display:none!important}
 #companyWorkspace .project-profile-config-card{min-height:218px!important;padding:24px 28px!important;display:block!important}
 #companyWorkspace .project-profile-config-card .section{margin-bottom:10px!important;font-size:17px!important}
 #companyWorkspace .project-profile-config-card .workflow-config-note{margin-bottom:18px!important;line-height:1.75!important;font-size:12px!important}
 #companyWorkspace .project-profile-config-card .project-profile-launch{display:grid!important;grid-template-columns:minmax(0,1fr) 150px!important;gap:12px!important;align-items:center!important;max-width:none!important;width:100%!important;padding:6px 0!important}
 #companyWorkspace .project-profile-config-card .project-profile-launch select{min-height:42px!important;font-size:13px!important}
 #companyWorkspace .project-profile-config-card .project-profile-launch .btn{min-height:42px!important;font-size:12px!important}
 #companyWorkspace .project-profile-config-card .project-profile-launch-status{margin-top:10px!important;font-size:12px!important;font-weight:700!important;color:#547087!important}
 /* 7.5.282.0 — true top-level System Settings cards on Desktop */
 #settings .settings-main-cards282{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:0 0 18px}
 #settings .settings-main-card282{min-height:190px;padding:28px;border:1px solid #d7e4ed;border-radius:14px;background:#fff;display:grid;grid-template-columns:auto 1fr auto;gap:18px;align-items:center;text-align:right;cursor:pointer;color:#20384d;box-shadow:0 5px 18px rgba(24,65,95,.07)}
 #settings .settings-main-card282:hover{border-color:#6da6ca;box-shadow:0 8px 24px rgba(23,105,170,.12);transform:translateY(-1px)}
 #settings .settings-main-card282 strong{display:block;font-size:18px;color:#153b5d;margin-bottom:8px}
 #settings .settings-main-card282 small{display:block;font-size:12px;line-height:1.8;color:#687f91}
 #settings .settings-main-card282>b{font-size:12px;color:#1769aa;white-space:nowrap}
 #settings .settings-main-icon282{width:50px;height:50px;border-radius:12px;background:#eef7fc;color:#1769aa;display:grid;place-items:center;font-size:24px;font-weight:800}
 #settings #brandingSettings281,#settings #companiesSettings282{display:none!important}
 #settings #brandingSettings281.settings-detail-open282,#settings #companiesSettings282.settings-detail-open282{display:block!important}
 #settings .branding-detail-head281,#settings .settings-detail-head282{display:flex;align-items:center;justify-content:space-between;gap:16px}
 #settings .system-settings-title{display:none!important}
 /* Project profile card: Desktop only, deliberately taller and more breathable. */
 /* 7.5.283.0 supersedes the temporary 7.5.282.0 tall-card sizing above. */
 .signature-setting281{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px}
 .mr-signature-settings281{margin-top:16px;padding:14px;border:1px solid #dce6ed;border-radius:10px;background:#fbfdff}
}
@media (min-width:701px) and (max-width:1050px){#settings .settings-main-cards282{grid-template-columns:1fr}}

@media (min-width:701px){
 /* 7.5.296.0 — Desktop-only centered inventory editor. Mobile is intentionally untouched. */
 html body #inventoryEditorModal.inventory-editor-overlay{
  position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:24px!important;box-sizing:border-box!important;background:rgba(7,24,38,.68)!important;
  display:flex!important;align-items:center!important;justify-content:center!important;overflow:auto!important;z-index:65000!important;
 }
 html body #inventoryEditorModal.inventory-editor-overlay.hide{display:none!important}
 html body #inventoryEditorModal .inventory-editor-box{
  width:min(780px,calc(100vw - 48px))!important;max-width:780px!important;max-height:calc(100dvh - 48px)!important;
  margin:auto!important;padding:0!important;border-radius:16px!important;background:#fff!important;overflow:auto!important;
  box-shadow:0 24px 70px rgba(0,0,0,.36)!important;
 }
 html body #inventoryEditorModal .inventory-editor-box>.modalhead{padding:18px 20px 14px!important;border-bottom:1px solid #e1e9ef!important}
 html body #inventoryEditorModal .inventory-editor-grid{padding:18px 20px 8px!important;gap:14px 16px!important}
 html body #inventoryEditorModal .inventory-editor-hint{margin:4px 20px 10px!important;padding:10px 12px!important;line-height:1.65!important}
 html body #inventoryEditorModal .modalactions{padding:0 20px 18px!important;margin-top:10px!important;justify-content:flex-start!important}
}

@media (max-width:700px){
 .desktop-branding-nav283{display:none!important}
 #settings .settings-main-cards282{display:none!important}
 #settings #brandingSettings281{display:block!important}
 #settings .branding-detail-head281>button,#settings .settings-detail-head282>button{display:none!important}
}


@media (min-width:701px){
 .inventory-stock-control294{display:flex;gap:12px;flex-wrap:wrap;width:100%;margin-bottom:2px}
 .inventory-stock-control294 .stock-control-group294{display:flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #dce6ed;border-radius:12px;background:#fff}
 .inventory-stock-control294 .stock-control-group294 b{font-size:13px;color:#24465e;white-space:nowrap}
 .inventory-legacy-import294{display:none!important}
}


/* FLOWIX 612A — USERS DESKTOP COMPACT LAYOUT */
@media (min-width:1251px){

  /* KPI band */
  #users .users-summary-row{
    gap:8px!important;
    margin-bottom:8px!important;
  }

  #users .users-summary-row .user-kpis-modern{
    gap:8px!important;
  }

  #users .users-summary-row .user-kpis-modern .user-kpi{
    min-height:58px!important;
    padding:6px 10px!important;
    gap:8px!important;
  }

  #users .users-summary-row .user-kpi-icon{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    font-size:18px!important;
  }

  #users .users-summary-row .user-kpi b{
    font-size:20px!important;
  }

  #users .users-summary-actions .btn{
    min-height:58px!important;
    height:58px!important;
    padding:6px 13px!important;
  }

  /* Filter panel */
  #users .user-filter-card{
    padding:9px!important;
    margin-bottom:8px!important;
  }

  #users .user-report-filters-main{
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:7px!important;
  }

  #users .user-report-filters-main label{
    font-size:9.5px!important;
    margin-bottom:3px!important;
  }

  #users .user-report-filters-main select{
    height:36px!important;
    min-height:36px!important;
    padding:5px 8px!important;
    font-size:11px!important;
  }

  /* Search row */
  #users .users-search-row-after-company{
    margin-bottom:7px!important;
    gap:8px!important;
  }

  #users .users-search-panel-inline>label{
    margin-bottom:3px!important;
  }

  #users .users-searchbar input,
  #users .users-clear-filter-btn{
    height:38px!important;
    min-height:38px!important;
  }
}


/* FLOWIX 612B — USERS SINGLE COMPACT SUMMARY ROW */
@media (min-width:1251px){

  #users .users-summary-row{
    align-items:stretch!important;
    gap:7px!important;
    margin-bottom:7px!important;
  }

  #users .users-summary-row .user-kpis-modern{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
  }

  #users .users-summary-row .user-kpis-modern .user-kpi{
    min-height:46px!important;
    height:46px!important;
    padding:4px 9px!important;
    gap:7px!important;
    border-radius:9px!important;
  }

  #users .users-summary-row .user-kpi-icon{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    font-size:15px!important;
  }

  #users .users-summary-row .user-kpi span{
    font-size:10px!important;
    margin-bottom:1px!important;
    line-height:1.05!important;
  }

  #users .users-summary-row .user-kpi b{
    font-size:18px!important;
    line-height:1!important;
  }

  #users .users-summary-row .user-kpi small{
    font-size:8.5px!important;
  }

  #users .users-summary-actions{
    align-items:stretch!important;
  }

  #users .users-summary-actions .btn{
    height:46px!important;
    min-height:46px!important;
    padding:0 14px!important;
    border-radius:8px!important;
  }
}


/* FLOWIX 612C — COMPACT COMPANY USER SUMMARY */
@media (min-width:1251px){

  #users .users-company-summary{
    margin-bottom:7px!important;
    padding:7px 9px!important;
  }

  #users .users-company-summary-head{
    min-height:0!important;
    margin-bottom:5px!important;
    padding:0!important;
    align-items:center!important;
  }

  #users .users-company-summary-head b{
    font-size:12px!important;
    line-height:1.2!important;
  }

  #users .users-company-summary-head span{
    font-size:9.5px!important;
    line-height:1.2!important;
  }

  #users .users-company-kpis{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
    margin:0!important;
  }

  #users .users-company-kpis .user-kpi{
    min-height:46px!important;
    height:46px!important;
    padding:4px 9px!important;
    gap:7px!important;
    border-radius:9px!important;
  }

  #users .users-company-kpis .user-kpi-icon{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    font-size:15px!important;
  }

  #users .users-company-kpis .user-kpi span{
    font-size:10px!important;
    margin-bottom:1px!important;
    line-height:1.05!important;
  }

  #users .users-company-kpis .user-kpi b{
    font-size:18px!important;
    line-height:1!important;
  }

  #users .users-company-kpis .user-kpi small{
    font-size:8.5px!important;
  }
}


/* FLOWIX 613B — USERS MANAGEMENT CONSOLE */
@media (min-width:1251px){

  /* =========================================================
     USERS MANAGEMENT — DESKTOP CONSOLE
     8 rows + filters + exports + statistics + pagination
     ========================================================= */

  #users:not(.hide){
    padding-top:4px!important;
    padding-bottom:8px!important;
  }

  /* ---------- MAIN STATISTICS ---------- */

  #users .users-summary-row{
    display:flex!important;
    align-items:stretch!important;
    gap:6px!important;
    margin:0 0 6px!important;
  }

  #users .users-summary-row .user-kpis-modern{
    flex:1 1 auto!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    margin:0!important;
  }

  #users .users-summary-row .user-kpi{
    box-sizing:border-box!important;
    min-height:42px!important;
    height:42px!important;
    padding:3px 8px!important;
    gap:6px!important;
    border-radius:8px!important;
  }

  #users .users-summary-row .user-kpi-icon{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    font-size:14px!important;
  }

  #users .users-summary-row .user-kpi span{
    font-size:9.5px!important;
    line-height:1!important;
    margin:0 0 1px!important;
  }

  #users .users-summary-row .user-kpi b{
    font-size:17px!important;
    line-height:1!important;
  }

  #users .users-summary-row .user-kpi small{
    font-size:8px!important;
  }

  #users .users-summary-actions{
    display:flex!important;
    align-items:stretch!important;
    margin:0!important;
  }

  #users .users-summary-actions .btn{
    height:42px!important;
    min-height:42px!important;
    padding:0 13px!important;
    border-radius:7px!important;
    white-space:nowrap!important;
  }

  /* ---------- FILTERS + EXPORT ---------- */

  #users .user-filter-card{
    box-sizing:border-box!important;
    margin:0 0 6px!important;
    padding:6px 8px!important;
    border-radius:9px!important;
  }

  #users .user-report-filters-main{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:6px!important;
    align-items:end!important;
  }

  #users .user-report-filters-main .field{
    margin:0!important;
    min-width:0!important;
  }

  #users .user-report-filters-main label{
    display:block!important;
    margin:0 0 2px!important;
    font-size:9px!important;
    line-height:1!important;
  }

  #users .user-report-filters-main select{
    box-sizing:border-box!important;
    width:100%!important;
    height:32px!important;
    min-height:32px!important;
    padding:3px 7px!important;
    font-size:10.5px!important;
  }

  #users .users-filter-actions{
    margin-top:5px!important;
    gap:5px!important;
    min-height:0!important;
  }

  #users .users-filter-actions .btn{
    height:30px!important;
    min-height:30px!important;
    padding:0 9px!important;
    font-size:9.5px!important;
  }

  /* ---------- REMOVE DUPLICATE COMPANY KPI BAND ---------- */

  #users .users-company-summary{
    display:none!important;
  }

  /* ---------- SEARCH ---------- */

  #users .users-search-row,
  #users .users-search-row-after-company{
    display:flex!important;
    align-items:end!important;
    gap:6px!important;
    margin:0 0 6px!important;
  }

  #users .users-search-panel-inline{
    flex:1 1 auto!important;
    margin:0!important;
    padding:0!important;
  }

  #users .users-search-panel-inline>label{
    display:block!important;
    margin:0 0 2px!important;
    font-size:9px!important;
    line-height:1!important;
  }

  #users .users-searchbar input{
    box-sizing:border-box!important;
    height:32px!important;
    min-height:32px!important;
    padding:4px 9px!important;
    font-size:10.5px!important;
  }

  #users .users-result-count{
    min-width:72px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }

  #users .users-clear-filter-btn{
    height:32px!important;
    min-height:32px!important;
    min-width:94px!important;
    padding:0 10px!important;
    font-size:9.5px!important;
  }

  /* ---------- TABLE ---------- */

  #users .users-list-card{
    box-sizing:border-box!important;
    margin:0!important;
    padding:0!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    border-radius:9px!important;
  }

  #users .users-tablebox{
    position:relative!important;
    max-height:none!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border-radius:9px 9px 0 0!important;
  }

  #users .users-table-modern{
    border-collapse:separate!important;
    border-spacing:0!important;
    min-width:1180px!important;
    font-size:9.5px!important;
  }

  #users .users-table-modern thead th{
    position:static!important;
    top:auto!important;
    height:32px!important;
    padding:5px 6px!important;
    font-size:9.5px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  #users .users-table-modern tbody td{
    box-sizing:border-box!important;
    height:43px!important;
    min-height:43px!important;
    padding:5px 7px!important;
    font-size:9.5px!important;
    line-height:1.15!important;
    vertical-align:middle!important;
  }

  #users .user-account-cell{
    gap:6px!important;
  }

  #users .user-mini-avatar{
    width:26px!important;
    height:26px!important;
    flex:0 0 26px!important;
    font-size:10px!important;
  }

  #users .user-account-cell b,
  #users .user-fullname,
  #users .department-cell,
  #users .scope-cell{
    font-size:9.5px!important;
  }

  #users .user-account-cell small{
    font-size:8px!important;
    margin-top:1px!important;
  }

  #users .user-role-badge,
  #users .user-status-pill{
    font-size:8.5px!important;
    padding:3px 7px!important;
  }

  #users .last-login-cell{
    font-size:8.5px!important;
  }

  #users .user-row-actions-modern{
    gap:4px!important;
  }

  #users .user-icon-btn,
  #users .user-more-menu summary{
    width:28px!important;
    height:26px!important;
    min-height:26px!important;
    font-size:14px!important;
  }

  /* ---------- PAGINATION ---------- */

  #users .users-pagination-modern{
    display:grid!important;
    grid-template-columns:1fr auto 1fr!important;
    align-items:center!important;
    gap:8px!important;
    box-sizing:border-box!important;
    min-height:42px!important;
    height:42px!important;
    padding:4px 9px!important;
    margin:0!important;
  }

  #users .users-page-size-wrap{
    gap:7px!important;
    font-size:9px!important;
  }

  #users .users-fixed-page-size613{
    font-size:11px!important;
    color:#173f60!important;
  }

  #users .users-page-controls{
    gap:4px!important;
  }

  #users .users-page-controls .page-nav-btn{
    height:28px!important;
    min-height:28px!important;
    min-width:74px!important;
    padding:0 8px!important;
    font-size:9px!important;
  }

  #users .users-page-numbers{
    gap:4px!important;
  }

  #users .users-page-numbers button{
    width:28px!important;
    height:28px!important;
    font-size:9px!important;
  }

  #users #usersPageInfo{
    min-width:80px!important;
    font-size:9px!important;
  }

  #users .users-protected-note{
    padding:4px 9px!important;
    font-size:8.5px!important;
    line-height:1.2!important;
  }
}


/* FLOWIX 614B — SINGLE-LINE USER KPI CARDS */
@media (min-width:1251px){

  #users .users-summary-row{
    gap:6px!important;
    margin-bottom:6px!important;
  }

  #users .users-summary-row .user-kpis-modern{
    gap:6px!important;
  }

  #users .users-summary-row .user-kpi{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:36px!important;
    height:36px!important;
    padding:3px 8px!important;
    gap:7px!important;
  }

  #users .users-summary-row .user-kpi-icon{
    width:25px!important;
    height:25px!important;
    min-width:25px!important;
    flex:0 0 25px!important;
    font-size:12px!important;
  }

  #users .users-summary-row .user-kpi>div:not(.user-kpi-icon){
    display:flex!important;
    flex-direction:row!important;
    align-items:baseline!important;
    gap:7px!important;
    min-width:0!important;
    white-space:nowrap!important;
  }

  #users .users-summary-row .user-kpi span{
    display:inline!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  #users .users-summary-row .user-kpi b{
    display:inline!important;
    margin:0!important;
    font-size:16px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  #users .users-summary-row .user-kpi small{
    display:inline!important;
    margin:0!important;
    font-size:9px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  #users .users-summary-actions .btn{
    height:36px!important;
    min-height:36px!important;
    padding:0 12px!important;
  }
}


/* FLOWIX 614D — KPI + ACTIONS ONE ROW */
@media (min-width:1251px){

  #users .users-summary-row{
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    gap:6px!important;
    margin:0 0 6px!important;
    width:100%!important;
  }

  #users .users-summary-row .user-kpis-modern{
    flex:1 1 0!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    margin:0!important;
    order:1!important;
  }

  #users .users-summary-actions{
    flex:0 0 auto!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    gap:5px!important;
    margin:0!important;
    order:2!important;
    white-space:nowrap!important;
  }

  #users .users-summary-actions .btn{
    box-sizing:border-box!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 9px!important;
    font-size:9.5px!important;
    border-radius:7px!important;
    white-space:nowrap!important;
  }

  #users .users-summary-actions .users-add-main{
    padding-left:12px!important;
    padding-right:12px!important;
  }

  #users .users-summary-row .user-kpi{
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
  }

  #users .users-summary-row .user-kpi>div:not(.user-kpi-icon){
    overflow:hidden!important;
  }
}


/* FLOWIX 614G — USERS COMPANY COLUMN SINGLE LINE */
@media (min-width:1251px){
  #users .users-table-modern .user-company-cell{
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}


/* FLOWIX 614H — USERS PAGINATION VISUAL ORDER */
@media (min-width:1251px){
  #users .users-page-controls{
    direction:ltr!important;
  }
}


/* FLOWIX 614I — USERS PAGE NUMBER ORDER */
@media (min-width:1251px){
  #users .users-page-numbers{
    direction:rtl!important;
  }
}


/* FLOWIX 614J — FINAL ARABIC RTL PAGINATION */
@media (min-width:1251px){

  /* Arabic pagination flows from right to left */
  #users .users-page-controls{
    direction:rtl!important;
    flex-direction:row!important;
  }

  /* Page 1 is nearest Previous, then 2, 3... toward the left */
  #users .users-page-numbers{
    direction:rtl!important;
    flex-direction:row!important;
  }

}


/* FLOWIX 614K — USERS DESKTOP 39PX ROWS */
@media (min-width:1251px){

  #users .users-table-modern tbody td{
    height:39px!important;
    min-height:39px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

}


/* FLOWIX 614L — USERS DESKTOP 36PX ROWS */
@media (min-width:1251px){

  #users .users-table-modern tbody td{
    height:36px!important;
    min-height:36px!important;
    padding-top:2px!important;
    padding-bottom:2px!important;
  }

  #users .user-icon-btn,
  #users .user-more-menu summary{
    height:24px!important;
    min-height:24px!important;
  }

}
