/* SADAF V28 — Universal overlay workspace */
.cb-overlay-root{position:fixed;inset:0;z-index:500;display:none;font-family:Inter,"Noto Sans Arabic",sans-serif}
.cb-overlay-root.is-open{display:block}
.cb-overlay-backdrop{position:absolute;inset:0;background:rgba(8,20,17,.72);backdrop-filter:blur(10px)}
.cb-overlay-panel{position:absolute;inset:2vh 2vw;display:flex;flex-direction:column;overflow:hidden;background:#f7faf8;border:1px solid rgba(255,255,255,.55);border-radius:20px;box-shadow:0 30px 100px rgba(0,0,0,.30);animation:cbOverlayIn .18s ease-out}
.cb-overlay-head{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:12px 18px;background:#fff;border-bottom:1px solid #dfe8e4}
.cb-overlay-title{min-width:0}.cb-overlay-eyebrow{font-size:9px;font-weight:900;letter-spacing:.13em;text-transform:uppercase;color:#8a9893}.cb-overlay-title h2{margin:3px 0 0;font-size:18px;line-height:1.2;color:#17352d;font-weight:900;letter-spacing:-.025em}.cb-overlay-close{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border:1px solid #dce6e2;border-radius:10px;background:#fff;color:#50645d;cursor:pointer}.cb-overlay-close:hover{background:#eef5f2;color:#173f36}
.cb-overlay-body{position:relative;flex:1 1 auto;min-height:0;overflow:auto;overflow-x:hidden;padding:20px;scrollbar-gutter:stable both-edges}.cb-overlay-body>form{margin:0!important;width:100%!important;max-width:none!important;box-sizing:border-box!important}.cb-overlay-body iframe{width:100%;height:100%;min-height:520px;border:0;background:#fff;border-radius:12px}
.cb-overlay-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:12px 18px;background:rgba(255,255,255,.98);border-top:1px solid #dfe8e4}.cb-overlay-actions .btn{min-width:110px}
.cb-overlay-launch{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:10px 0;padding:9px 12px;border:1px solid #d5e2dd;border-radius:10px;background:#fff;color:#21443a;font-size:10px;font-weight:900;cursor:pointer;box-shadow:0 2px 8px rgba(17,39,34,.04)}.cb-overlay-launch:hover{border-color:#a9c9bf;background:#f1f7f4}.cb-overlay-launch i{font-size:11px}
.cb-overlay-hosted{display:none!important}
.cb-confirm-box{max-width:560px!important;inset:50% auto auto 50%;width:min(92vw,560px);height:auto;max-height:calc(100vh - 40px);transform:translate(-50%,-50%)}
.cb-confirm-content{padding:22px}.cb-confirm-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:#eef5f2;color:#1d604f;margin-bottom:12px}.cb-confirm-message{font-size:13px;font-weight:700;color:#253a34;line-height:1.6}.cb-confirm-meta{margin-top:10px;padding:10px 12px;border:1px solid #dfe8e4;background:#fff;border-radius:10px;font-size:10px;color:#64756f;max-height:150px;overflow:auto}.cb-confirm-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid #dfe8e4;background:#fff}
body.cb-overlay-lock{overflow:hidden!important}
@keyframes cbOverlayIn{from{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:none}}
@media(max-width:800px){.cb-overlay-panel{inset:0;border-radius:0}.cb-overlay-head{min-height:58px;padding:11px 13px}.cb-overlay-body{padding:13px}.cb-overlay-actions{padding:10px 13px}.cb-overlay-actions .btn{flex:1}.cb-overlay-launch{width:100%;margin:8px 0}.cb-confirm-box{inset:50% auto auto 50%;width:calc(100vw - 24px)}}
@media print{.cb-overlay-root{display:none!important}}

/* V28.1 stability layer */
.cb-login-page{min-height:100dvh!important;width:100%!important;box-sizing:border-box!important;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;display:grid!important;place-items:center!important;overflow:auto!important}
.cb-login-page .cb-login-wrap{width:min(100%,520px)!important;margin:0 auto!important}
.cb-login-page .cb-login-card{width:100%!important;max-width:520px!important;box-sizing:border-box!important;margin:0!important;padding:clamp(22px,4vw,34px)!important}
.cb-login-page .form{width:100%!important;box-sizing:border-box!important}
.cb-login-page .field{width:100%!important;min-width:0!important}
.cb-login-page input{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
.cb-login-page .btn{width:100%!important;min-height:46px!important}
.cb-overlay-panel{max-width:none!important;width:auto!important;max-height:none!important}
.cb-overlay-body{min-width:0!important}.cb-overlay-body iframe{display:block!important;width:100%!important;min-height:620px!important}
.cb-confirm-content{text-align:center;padding:24px}.cb-confirm-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;margin:0 auto 14px;background:#fff3e8;color:#a15c00;font-size:20px}.cb-confirm-message{font-size:13px;font-weight:800;color:#263b35}.cb-confirm-actions{display:flex;justify-content:flex-end;gap:9px;padding:12px 18px}.cb-confirm-actions .btn{min-width:110px}
@media(max-width:800px){.cb-overlay-panel{max-width:none!important}.cb-overlay-body iframe{min-height:calc(100dvh - 130px)!important}.cb-confirm-actions{display:grid;grid-template-columns:1fr 1fr}.cb-confirm-actions .btn{width:100%!important}}

/* V28.2 — portal source blocks: once opened, the complete source block is moved
   into the fixed overlay. The placeholder stays invisible in the page flow. */
.cb-overlay-placeholder{display:none!important;width:0!important;height:0!important;margin:0!important;padding:0!important;border:0!important}
.cb-overlay-body>.card,
.cb-overlay-body>.form,
.cb-overlay-body>.inspection-studio{width:100%!important;max-width:none!important;box-sizing:border-box;margin:0!important}
.cb-overlay-body>.form{background:#fff;border-radius:14px;padding:18px;box-shadow:0 1px 0 rgba(23,53,45,.04)}
.cb-overlay-body form{max-width:none}

/* Action-form source cards stay out of the page workspace until opened in the overlay. */
.cb-overlay-source-hidden{display:none!important}


/* V28.3 — full workspace sizing: overlays use almost the entire viewport and never clip the hosted source. */
.cb-overlay-panel{left:1.2vw!important;right:1.2vw!important;top:1.2vh!important;bottom:1.2vh!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;}
.cb-overlay-body{width:100%!important;box-sizing:border-box!important;overflow:auto!important;overflow-x:hidden!important;}
.cb-overlay-body:has(>iframe){overflow:hidden!important;padding:0!important;}
.cb-overlay-body>iframe{height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;display:block!important;}
.cb-overlay-body>*{box-sizing:border-box!important;max-width:100%!important;}
.cb-overlay-body .inspection-studio{min-width:0!important;}
.cb-overlay-body .inspection-studio-head{min-width:0!important;}
.cb-overlay-body input,.cb-overlay-body select,.cb-overlay-body textarea{max-width:100%!important;box-sizing:border-box!important;}
@media(max-width:800px){.cb-overlay-panel{left:0!important;right:0!important;top:0!important;bottom:0!important;border-radius:0!important}.cb-overlay-body{padding:12px!important}.cb-overlay-head{padding:10px 12px!important;min-height:56px!important}}
/* V28.5 official SADAF brand mark */
.cb-brandbar{overflow:hidden}
.cb-brand-logo{line-height:0;display:flex;align-items:center;min-width:0}
.cb-brand-logo img{height:58px!important;width:auto!important;max-width:190px!important;object-fit:contain;object-position:left center}
@media(max-width:1023px){.cb-brandbar{height:76px!important}.cb-brand-logo img{height:52px!important;max-width:180px!important}}

/* V40.8 — single-scroll iframe overlay hardening */
html:has(#cb-overlay-root.is-open),
html:has(#cb-overlay-root.is-open) body,
body.cb-overlay-lock {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
}
.cb-overlay-root.is-open .cb-overlay-panel {
  overflow: hidden !important;
}
.cb-overlay-root.is-open .cb-overlay-body {
  overflow: hidden !important;
  min-height: 0 !important;
  height: auto !important;
}
.cb-overlay-root.is-open .cb-overlay-body > iframe.cb-person-edit-frame {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  border: 0 !important;
  margin: 0 !important;
}


/* V40.9 — Employee Information overlay: one title, one close, one scroll */
html:has(#cb-overlay-root.is-open),
html:has(#cb-overlay-root.is-open) body,
body.cb-overlay-lock { overflow:hidden !important; height:100dvh !important; max-height:100dvh !important; }
.cb-overlay-root.is-open .cb-overlay-panel { overflow:hidden !important; height:calc(100dvh - 2.4vh) !important; }
.cb-overlay-root.is-open .cb-overlay-body { flex:1 1 0 !important; min-height:0 !important; height:0 !important; overflow:hidden !important; padding:0 !important; }
.cb-overlay-root.is-open .cb-overlay-body > iframe.cb-person-edit-frame { width:100% !important; height:100% !important; min-height:0 !important; max-height:none !important; overflow:auto !important; display:block !important; border:0 !important; margin:0 !important; }
.cb-overlay-root.is-open .cb-overlay-actions:empty { display:none !important; }
@media(max-width:800px){
  .cb-overlay-root.is-open .cb-overlay-panel { height:100dvh !important; }
}
