/* MH Office — simplified ChatGPT-style responsive workspace. Identity remains MH. */
html { -webkit-text-size-adjust:100%; }
body.mh-chat-ui { background:#fff !important; color:#202123 !important; }
body.mh-chat-ui #office { background:#fff!important; color:#202123!important; }
body.mh-chat-ui #office .side {
  background:#f9f9f9!important; color:#303030!important;
  border-left:1px solid #ededed!important;
  box-shadow:none!important; width:260px!important;
  padding:18px 13px!important;
  transition:width .18s ease, transform .18s ease!important;
  z-index:1200!important;
}
body.mh-chat-ui #office .side .brand {
 border-bottom:1px solid #e8e8e8!important;
 margin-bottom:12px!important;
 padding-bottom:16px!important;
 color:#252525!important;
}
body.mh-chat-ui #office .side .brand small,
body.mh-chat-ui #office .side .online { color:#747474!important; }
body.mh-chat-ui #office .side .brand .logo {
 color:#fff!important;background:#b52229!important;
 box-shadow:none!important;
}
body.mh-chat-ui #office .side .nav {
 margin:0!important;display:flex!important;
 flex-direction:column!important;gap:4px!important;
}
body.mh-chat-ui #office .side .nav button {
 min-height:43px!important;height:auto!important;
 justify-content:flex-start!important;
 display:flex!important;
 width:100%!important;
 border:0!important;border-radius:10px!important;
 margin:0!important;padding:9px 12px!important;
 background:transparent!important;color:#303030!important;
 text-align:start!important;
 gap:12px!important;
 font-size:14px!important;font-weight:500!important;
 transition:background .15s ease!important;
}
body.mh-chat-ui #office .side .nav button:hover {
 background:#ececec!important;color:#202020!important;
}
body.mh-chat-ui #office .side .nav button.active {
 background:#e7e7e7!important;color:#161616!important;
 font-weight:700!important;
}
body.mh-chat-ui #office .side .nav button span {
 display:inline!important;white-space:normal!important;
 color:inherit!important;
}
body.mh-chat-ui #office .main {
 width:calc(100% - 260px)!important;max-width:calc(100% - 260px)!important;
 margin-right:260px!important;margin-left:0!important;
 background:#fff!important;min-width:0!important;
 transition:width .18s ease,margin .18s ease!important;
}
body.mh-chat-ui #office .main > header {
 min-height:67px!important;height:auto!important;
 background:rgba(255,255,255,.97)!important;
 color:#222!important;border-bottom:1px solid #ececec!important;
 box-shadow:none!important;
 display:flex!important;flex-wrap:wrap!important;
 justify-content:flex-start!important;
 align-items:center!important;gap:12px!important;
 padding:10px clamp(14px,2.7vw,27px)!important;
}
body.mh-chat-ui #office .main > header .who {
 flex:1 1 130px!important;min-width:0!important;
}
body.mh-chat-ui #office .main > header .who b {
 font-size:clamp(13px,1.25vw,17px)!important;
 line-height:1.3!important;white-space:normal!important;
 overflow-wrap:anywhere!important;
 color:#252525!important;
}
body.mh-chat-ui #office .main > header .who small {font-size:12px!important;color:#737373!important;}
body.mh-chat-ui #office .main > header button {
 border:1px solid #e4e4e4!important;background:#fff!important;
 color:#333!important;box-shadow:none!important;
 border-radius:11px!important;min-height:40px!important;
 font-weight:500!important;
}
body.mh-chat-ui #office .main > header button:hover {background:#f6f6f6!important;}
body.mh-chat-ui #office .main > header button.mh-chat-toggle {
 display:inline-flex!important;order:-2!important;
 align-items:center;justify-content:center;
 font-size:23px!important;font-weight:400!important;
 width:43px!important;min-width:43px!important;
 height:43px!important;padding:0!important;
}
body.mh-chat-ui #office .main .content {
 width:min(100%,1090px)!important;max-width:1090px!important;
 min-width:0!important;
 margin-inline:auto!important;
 padding:clamp(18px,3.2vw,40px)!important;
}
body.mh-chat-ui #office .content .welcome h1,
body.mh-chat-ui #office #mh135HomeQuick > h1 {
 font-size:clamp(25px,3.2vw,34px)!important;
 font-weight:650!important;line-height:1.35!important;
 color:#202123!important;letter-spacing:-.015em!important;
 overflow-wrap:anywhere!important;
}
body.mh-chat-ui #office .content .welcome p,
body.mh-chat-ui #office .mh-v9-home-lead {
 font-size:clamp(14px,1.4vw,16px)!important;
 line-height:1.65!important;color:#707070!important;
}
body.mh-chat-ui #office #mh135HomeGrid {
 display:grid!important;
 grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr))!important;
 gap:14px!important;
 max-width:100%!important;
}
body.mh-chat-ui #office .mh-v9-company-card {
 width:100%!important;max-width:100%!important;min-width:0!important;
 border:1px solid #e7e7e7!important;
 border-radius:16px!important;
 background:#fff!important;
 box-shadow:none!important;
 transform:none!important;transform-style:flat!important;
 display:grid!important;grid-template-rows:126px auto auto!important;
 min-height:0!important;gap:12px!important;
 padding:16px!important;
 text-align:start!important;
 transition:border-color .16s ease,background .16s ease!important;
 will-change:auto!important;
}
body.mh-chat-ui #office .mh-v9-company-card:hover,
body.mh-chat-ui #office .mh-v9-company-card:focus-visible {
 border-color:#b6b6b6!important;background:#fafafa!important;
 box-shadow:none!important;outline:2px solid transparent!important;
 transform:none!important;
}
body.mh-chat-ui #office .mh-v9-company-logo {
 height:126px!important;width:100%!important;
 padding:10px!important;box-shadow:none!important;
 border:1px solid #f0f0f0!important;border-radius:12px!important;
 background:#fff!important;
 transform:none!important;box-sizing:border-box!important;
 overflow:hidden!important;
}
body.mh-chat-ui #office .mh-v9-company-logo img,
body.mh-chat-ui #office .mh-v9-company-logo img[src*="nadia-legal-uae.webp"]{
 width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;
 max-width:100%!important;max-height:100%!important;
 object-fit:contain!important;object-position:center!important;
 transform:none!important;
}
body.mh-chat-ui #office .mh-v9-company-card strong {
 display:block!important;color:#303030!important;
 font-size:clamp(15px,1.7vw,18px)!important;
 font-weight:650!important;line-height:1.45!important;
 transform:none!important;overflow-wrap:anywhere!important;
}
body.mh-chat-ui #office .mh-v9-company-card small {
 display:block!important;color:#737373!important;
 font-size:13px!important;transform:none!important;
}
body.mh-chat-ui #office .mh-v9-workspace {
 background:#fff!important;border:1px solid #e7e7e7!important;
 border-radius:16px!important;box-shadow:none!important;
 max-width:100%!important;
}
body.mh-chat-ui #office .mh-v9-module {
 background:#fff!important;border:1px solid #e7e7e7!important;
 color:#262626!important;box-shadow:none!important;
 border-radius:13px!important;
}
body.mh-chat-ui #office .content .card,
body.mh-chat-ui #office .panel,
body.mh-chat-ui #office .mh-v1820-page {
 border:1px solid #ececec!important;
 background:#fff!important;
 box-shadow:none!important;border-radius:15px!important;
}
body.mh-chat-ui #office button:focus-visible,
body.mh-chat-ui #office a:focus-visible {
 outline:2px solid #484848!important;outline-offset:2px!important;
}
body.mh-chat-ui #office .mh-chat-overlay {display:none;}
@media(min-width:1101px){
 body.mh-chat-ui.mh-chat-collapsed #office .side {width:70px!important;padding:15px 8px!important;}
 body.mh-chat-ui.mh-chat-collapsed #office .side .brand div,
 body.mh-chat-ui.mh-chat-collapsed #office .side .nav button span,
 body.mh-chat-ui.mh-chat-collapsed #office .side .online {display:none!important;}
 body.mh-chat-ui.mh-chat-collapsed #office .side .nav button {
  justify-content:center!important;padding:9px 3px!important;
 }
 body.mh-chat-ui.mh-chat-collapsed #office .main{
  width:calc(100% - 70px)!important;max-width:calc(100% - 70px)!important;
  margin-right:70px!important;
 }
}
@media(max-width:1100px){
 body.mh-chat-ui #office {display:block!important;min-width:0!important;max-width:100%!important;}
 body.mh-chat-ui #office .side {
  position:fixed!important;
  top:0!important;right:0!important;bottom:0!important;left:auto!important;
  inset:auto 0 0 auto!important;
  width:min(250px,80vw)!important;max-width:80vw!important;
  height:100vh!important;height:100dvh!important;
  padding:20px 14px!important;
  border:0!important;border-left:1px solid #e8e8e8!important;
  transform:translateX(105%)!important;
  opacity:1!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  z-index:1200!important;
 }
 body.mh-chat-ui.mh-chat-open #office .side {transform:translateX(0)!important;}
 body.mh-chat-ui #office .side .nav button span {display:inline!important;}
 body.mh-chat-ui #office .side .brand div {display:grid!important;}
 body.mh-chat-ui #office .main {
  width:100%!important;max-width:100%!important;
  margin:0!important;min-width:0!important;
 }
 body.mh-chat-ui #office .main > header {
  display:flex!important;gap:8px!important;
  min-height:58px!important;
  padding:9px 12px!important;
 }
 body.mh-chat-ui #office .main > header button:not(.mh-chat-toggle) {
  font-size:13px!important;min-height:40px!important;
  padding:7px 10px!important;
  max-width:100%!important;overflow-wrap:anywhere!important;
 }
 body.mh-chat-ui #office .main .content {
  width:100%!important;max-width:100%!important;
  padding:clamp(14px,4vw,23px)!important;
 }
 body.mh-chat-ui #office #mh135HomeGrid{
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
 }
 body.mh-chat-ui #office .mh-v9-company-card {
  grid-template-rows:108px auto auto!important;
  padding:14px!important;
 }
 body.mh-chat-ui #office .mh-v9-company-logo {height:108px!important;}
 body.mh-chat-ui #office .mh-v9-workspace-head {
  grid-template-columns:74px minmax(0,1fr)!important;
  gap:10px!important;
 }
 body.mh-chat-ui #office .mh-v9-workspace-head img {width:74px!important;height:64px!important;}
 body.mh-chat-ui #office .mh-v9-back {grid-column:1/-1!important;width:100%!important;}
 body.mh-chat-ui #office .content .stats,
 body.mh-chat-ui #office .content .grid {grid-template-columns:minmax(0,1fr)!important;}
 body.mh-chat-ui #office .mh-chat-overlay {
  position:fixed!important;inset:0!important;
  display:block!important;
  background:rgba(0,0,0,.35)!important;
  z-index:1199!important;opacity:0!important;
  visibility:hidden!important;pointer-events:none!important;
  transition:opacity .18s ease,visibility .18s!important;
 }
 body.mh-chat-ui.mh-chat-open #office .mh-chat-overlay {
  opacity:1!important;visibility:visible!important;pointer-events:auto!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.mh-chat-ui #office .side,
 body.mh-chat-ui #office .main,
 body.mh-chat-ui #office .mh-chat-overlay {transition:none!important;}
}



/* Restore official MH maroon / charcoal visual identity; keep new responsive layout. */
body.mh-chat-ui {background:#f7f6f4!important;color:#202020!important;}
body.mh-chat-ui #office {background:#f7f6f4!important;color:#202020!important;}
body.mh-chat-ui #office .side {
 background:#171515!important;color:#f8f4f4!important;
 border-left:1px solid #392628!important;
}
body.mh-chat-ui #office .side .brand {
 border-bottom:1px solid #3a3030!important;color:#fff!important;
}
body.mh-chat-ui #office .side .brand small,
body.mh-chat-ui #office .side .online {color:#d2bbbf!important;}
body.mh-chat-ui #office .side .nav button {
 color:#f6f2f3!important;background:transparent!important;
}
body.mh-chat-ui #office .side .nav button:hover {background:#452b30!important;color:#fff!important;}
body.mh-chat-ui #office .side .nav button.active {background:#941922!important;color:#fff!important;}
body.mh-chat-ui #office .main {background:#f7f6f4!important;}
body.mh-chat-ui #office .main > header {background:#fff!important;border-bottom:1px solid #eadadc!important;}
body.mh-chat-ui #office .main > header .who b {color:#2b2022!important;}
body.mh-chat-ui #office .main > header button:not(.mh-chat-toggle) {
 border-color:#eadadc!important;background:#fff!important;color:#7f1921!important;
}
body.mh-chat-ui #office .main > header button.mh-chat-toggle {
 color:#941922!important;border-color:#eadadc!important;
}
body.mh-chat-ui #office .main > header button:hover {background:#f9f0f1!important;}
body.mh-chat-ui #office #mh135HomeQuick > h1,
body.mh-chat-ui #office .content .welcome h1 {color:#8f1119!important;}
body.mh-chat-ui #office .mh-v9-company-card {
 border-color:#e8d6d8!important;background:#fff!important;
}
body.mh-chat-ui #office .mh-v9-company-card:hover {border-color:#a6323a!important;background:#fffafa!important;}
body.mh-chat-ui #office .mh-v9-company-card strong {color:#811921!important;}
body.mh-chat-ui #office .mh-v9-company-card small {color:#806366!important;}
body.mh-chat-ui #office .mh-v9-module {
 border-color:#eadcde!important;background:#fff!important;color:#8f1119!important;
}
body.mh-chat-ui #office .mh-v9-workspace {border-color:#eadcde!important;}
body.mh-chat-ui #office .content .card,
body.mh-chat-ui #office .panel {border-color:#ebdfe0!important;}
@media(max-width:800px) {
 html[dir="rtl"] body.mh-chat-ui #office .side {
  right:0!important;left:auto!important;transform:translateX(105%)!important;
  border-left:1px solid #392628!important;border-right:0!important;
 }
 html[dir="ltr"] body.mh-chat-ui #office .side {
  left:0!important;right:auto!important;
  transform:translateX(-105%)!important;
  border-right:1px solid #392628!important;border-left:0!important;
 }
 html[dir="rtl"] body.mh-chat-ui.mh-chat-open #office .side,
 html[dir="ltr"] body.mh-chat-ui.mh-chat-open #office .side {
  transform:translateX(0)!important;
 }
}


/* MH full-width office content fix: preserve current MH color identity and drawer. */
@media (min-width:801px) {
 body.mh-chat-ui #office .main .content {
   width:100%!important;
   max-width:none!important;
   margin-inline:0!important;
   box-sizing:border-box!important;
   padding-inline:clamp(20px,2.2vw,34px)!important;
 }
 body.mh-chat-ui #office #mh135HomeQuick {
   width:100%!important;max-width:none!important;margin-inline:0!important;
 }
 body.mh-chat-ui #office .content > .grid,
 body.mh-chat-ui #office .content > .stats {width:100%!important;max-width:none!important;}
}
@media (max-width:800px) {
 body.mh-chat-ui #office .main .content {
   box-sizing:border-box!important;width:100%!important;max-width:100%!important;
   margin-inline:0!important;
 }
}


/* 2026-10-18 MH: legible logo gallery. Preserve original MH company art and aspect ratio. */
body.mh-chat-ui #office #mh135HomeGrid {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))!important;
  gap:16px!important;
  align-items:stretch!important;
}
body.mh-chat-ui #office .mh-v9-company-card {
  display:grid!important;
  grid-template-rows:196px minmax(0,auto) auto!important;
  gap:9px!important;
  min-height:0!important;
  padding:14px!important;
  border-radius:16px!important;
}
body.mh-chat-ui #office .mh-v9-company-logo {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:196px!important;
  width:100%!important;
  min-height:196px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:2px!important;
  border:1px solid #eee7e8!important;
  border-radius:11px!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.mh-chat-ui #office .mh-v9-company-logo img,
body.mh-chat-ui #office .mh-v9-company-logo img[src*="nadia-legal-uae.webp"] {
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
  transform:none!important;
  margin:0!important;
  image-rendering:auto!important;
}
body.mh-chat-ui #office .mh-v9-company-card strong {
  min-width:0!important;
  font-size:clamp(15px,1.45vw,18px)!important;
  line-height:1.45!important;
  text-align:center!important;
  overflow-wrap:anywhere!important;
}
body.mh-chat-ui #office .mh-v9-company-card small {
  text-align:center!important;
  font-size:12px!important;
  line-height:1.4!important;
}
@media(max-width:800px) {
 body.mh-chat-ui #office #mh135HomeGrid {
   grid-template-columns:minmax(0,1fr)!important;
   gap:12px!important;
 }
 body.mh-chat-ui #office .mh-v9-company-card {
   grid-template-rows:190px minmax(0,auto) auto!important;
   padding:12px!important;
 }
 body.mh-chat-ui #office .mh-v9-company-logo {
   min-height:190px!important;
   height:190px!important;
 }
}
@media(max-width:380px) {
 body.mh-chat-ui #office .mh-v9-company-card {grid-template-rows:170px minmax(0,auto) auto!important;}
 body.mh-chat-ui #office .mh-v9-company-logo {height:170px!important;min-height:170px!important;}
}


/* MH Office: zoom ONLY the US and UAE logo artworks (retain full originals).
   Measurements checked: US ink bbox [83,174,1171,1069] / 1254²,
   UAE ink bbox [63,179,692,626] / 768². Safe square-art magnification. */
body.mh-chat-ui #office .mh-v9-company-logo img[src*="/assets/company/mh-it-us.png"] {
  transform:scale(1.30)!important;
  transform-origin:center center!important;
  object-fit:contain!important;
  object-position:center center!important;
}
body.mh-chat-ui #office .mh-v9-company-logo img[src*="/assets/company/nadia-legal-uae.webp"] {
  transform:scale(1.40)!important;
  transform-origin:center center!important;
  object-fit:contain!important;
  object-position:center center!important;
}
@media(prefers-reduced-motion:reduce) {
 body.mh-chat-ui #office .mh-v9-company-logo img[src*="/assets/company/mh-it-us.png"],
 body.mh-chat-ui #office .mh-v9-company-logo img[src*="/assets/company/nadia-legal-uae.webp"] {
   transition:none!important;
 }
}


/* MH Office: Only Dar Tahfiz company logo: widen horizontally with no text or artwork cropping. */
body.mh-chat-ui #office .mh-v9-company-card[data-company-id="8b5b41a7-e04d-448f-8452-cd8d803cb399"] .mh-v9-company-logo img[src*="dar-tahfiz-logo.jpeg"] {
  transform: scaleX(1.30) scaleY(1.08) !important;
  transform-origin:center center !important;
  object-fit:contain !important;
  object-position:center center !important;
  image-rendering:auto!important;
}

/* 2026-10-20: Preserve Office ACL-hidden nav items against the workspace flex rule.
   Scoped to direct sidebar buttons only; do not affect HR submenu or business modules. */
body.mh-chat-ui #office .side .nav > button.hidden,
body.mh-chat-ui #office .side .nav > button[aria-hidden="true"],
body.mh-chat-ui #office .side .nav > button[hidden] {
  display: none !important;
}

/* SUP66: restore readable customer-link dropdown; do not alter form data or events */
body #office #mh22CustomerResults.mh22-customer-results{background:#fff!important;color:#252525!important;border:1px solid #ddd1cf!important;box-shadow:0 12px 28px #0002!important}
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result,
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result *{background:#fff!important;color:#242424!important;text-shadow:none!important;opacity:1!important}
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result{border-bottom:1px solid #e6e4e4!important;text-align:start!important;line-height:1.6!important;min-height:44px!important;cursor:pointer!important}
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result:hover,
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result:focus-visible{background:#fff4f5!important;color:#8a1420!important;outline:2px solid #9f2030!important;outline-offset:-2px}
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result:hover *,
body #office #mh22CustomerResults.mh22-customer-results .mh22-customer-result:focus-visible *{background:transparent!important;color:#8a1420!important}
/* SUP66: download controls within office attachment lists match Customer's outlined action */
body #office button.mh-file-action[onclick*="'download'"],body #office a.mh-file-action[download],body #office button[onclick*="downloadAttachment"],body #office button[onclick*="downloadOfficeAttachment"]{background:#fff!important;color:#8d1522!important;border:1px solid #ad1d30!important;border-radius:9px!important;min-height:38px!important;padding:7px 13px!important;box-shadow:none!important;font-weight:650!important;cursor:pointer!important;text-shadow:none!important}
body #office button.mh-file-action[onclick*="'download'"]:hover,body #office a.mh-file-action[download]:hover,body #office button[onclick*="downloadAttachment"]:hover{background:#9f1d2a!important;color:#fff!important}
