/* Scoped staff bot settings; no global dialog/button overrides. */
.staffMaxHeader{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 10px;border:1px solid #c5dad5;border-radius:9px;background:#fff;color:#176e66;font-family:inherit;font-size:12px;font-weight:600;line-height:1.1;cursor:pointer}
.staffMaxHeader svg{display:block;width:18px;height:18px;flex:none}
.staffMaxHeader[hidden],.staffMaxPanel [hidden]{display:none!important}
.staffMaxPanel{min-width:0;color:#183632}
#companyMaxPanel>.staffMaxPanel{margin-top:24px;padding-top:22px;border-top:1px solid #d9e5e1}
/* Keep the bounded Company viewport, with both MAX forms inside one scroll area. */
.crmCompanyViewport #companyScreen #companyMaxPanel:has(>.staffMaxPanel){overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scroll-padding-block:12px;touch-action:pan-y}
.crmCompanyViewport #companyScreen #companyMaxPanel:has(>.staffMaxPanel)>.ccSettings,.crmCompanyViewport #companyScreen #companyMaxPanel:has(>.staffMaxPanel)>.staffMaxPanel{flex:0 0 auto}
.staffMaxPanel h3{margin:0 0 7px;font-size:19px;line-height:1.3}
.staffMaxMuted,.staffMaxPolicy{color:#66827e;font-size:13px;line-height:1.5}
.staffMaxMuted{margin:0 0 12px}.staffMaxPolicy{margin:14px 0 0;max-width:720px}
.staffMaxStatus{min-height:20px;margin:8px 0;font-size:14px;font-weight:600}
.staffMaxError{margin:10px 0;padding:10px 12px;border:1px solid #f0d0cb;border-radius:8px;background:#fff2f0;color:#963d32;font-size:13px;line-height:1.45}
.staffMaxBinding{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px 14px;margin:12px 0}
.staffMaxBinding p{width:100%;margin:0;line-height:1.5;font-size:14px;overflow-wrap:anywhere}
.staffMaxActions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.staffMaxActions button,.staffMaxBinding button,.staffMaxLink{min-height:36px;padding:8px 12px;border-radius:8px;font-size:13px;line-height:1.3}
.staffMaxLink{display:inline-flex;align-items:center;text-decoration:none;background:#147e70;color:#fff;font-weight:600}
.staffMaxOpenNotice{position:fixed;z-index:100020;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;flex-wrap:wrap;gap:10px;max-width:calc(100vw - 32px);box-sizing:border-box;padding:12px 15px;border:1px solid #d6e3de;border-radius:11px;background:#fcfdfc;color:#183632;box-shadow:0 6px 25px #12332c26;font-size:13px}
.staffMaxConfig{display:flex;flex-direction:column;gap:10px;margin-top:18px;max-width:640px}
.staffMaxConfig label{display:flex;flex-direction:column;gap:7px;font-size:13px;line-height:1.4;color:#4c6d67}
.staffMaxConfig input{box-sizing:border-box;width:100%;min-height:40px;border:1px solid #c6dad4;border-radius:9px;padding:9px 11px;background:#fff;color:#183632;font-size:16px}
.staffMaxHeader:focus-visible,.staffMaxClose:focus-visible,.staffMaxPanel button:focus-visible,.staffMaxLink:focus-visible,.staffMaxConfig input:focus-visible{outline:3px solid #59aa9c;outline-offset:3px}
#staffMaxDialog{position:fixed!important;inset:0!important;margin:auto!important;transform:none!important;box-sizing:border-box!important;width:min(560px,calc(100% - 32px))!important;max-width:calc(100% - 32px)!important;height:fit-content!important;min-height:0!important;max-height:calc(100vh - 32px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;padding:22px!important;border:1px solid #d5e4df!important;border-radius:16px!important;background:#fcfdfc!important;background-color:#fcfdfc!important;color:#183632!important;box-shadow:0 18px 70px #082b2838!important;backdrop-filter:none!important;opacity:1!important;animation:none!important;transition:none!important}
#staffMaxDialog:not([open]){display:none!important}
#staffMaxDialog::backdrop{background:rgba(9,28,26,.52);backdrop-filter:blur(3px)}
#staffMaxDialog .staffMaxDialogHead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}
#staffMaxDialog .staffMaxDialogHead h3{margin:0;font-size:20px;line-height:1.3}
#staffMaxDialog .staffMaxClose{display:flex!important;align-items:center!important;justify-content:center!important;flex:none;width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;border:1px solid #cadcd5;border-radius:9px;background:#fff;color:#426e65;cursor:pointer;transform:none!important}
#staffMaxDialog .staffMaxClose svg{display:block!important;width:18px!important;height:18px!important;flex:none;transform:none!important}
#staffMaxDialog .staffMaxPanel>h3{font-size:16px}
@media(max-width:600px){#staffMaxDialog{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:17px!important;border-radius:13px!important}.staffMaxHeader{min-width:36px;padding:7px}.staffMaxHeader span{display:none}.staffMaxConfig .staffMaxActions button{flex:1}.staffMaxActions{gap:7px}}
@media(prefers-reduced-motion:reduce){#staffMaxDialog,.staffMaxPanel,.staffMaxHeader{animation:none!important;transition:none!important}}
/* Employee invitations stay inside existing account actions; no user-grid changes. */
#companyScreen .crmEmployeeFooter .accountManagementActions:has(>.staffMaxEmployeeButton){flex-direction:column;align-items:stretch!important;gap:7px}
#companyScreen .staffMaxEmployeeButton{min-height:36px!important;height:auto!important;padding:7px 12px!important;border:1px solid #c5dad5;border-radius:8px;background:#fff;color:#176e66;font-size:12px;font-weight:600;line-height:1.3}
#staffMaxEmployeeDialog{position:fixed!important;inset:0!important;margin:auto!important;transform:none!important;box-sizing:border-box!important;width:min(540px,calc(100% - 32px))!important;max-width:calc(100% - 32px)!important;height:fit-content!important;min-height:0!important;max-height:calc(100vh - 32px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;padding:22px!important;border:1px solid #d5e4df!important;border-radius:16px!important;background:#fcfdfc!important;background-color:#fcfdfc!important;color:#183632!important;box-shadow:0 18px 70px #082b2838!important;backdrop-filter:none!important;opacity:1!important;animation:none!important;transition:none!important}
#staffMaxEmployeeDialog:not([open]),#staffMaxEmployeeDialog [hidden]{display:none!important}
#staffMaxEmployeeDialog::backdrop{background:rgba(9,28,26,.52);backdrop-filter:blur(3px)}
#staffMaxEmployeeDialog .staffMaxDialogHead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}
#staffMaxEmployeeDialog .staffMaxDialogHead h3{margin:0;font-size:20px;line-height:1.3}
#staffMaxEmployeeDialog .staffMaxClose{display:flex!important;align-items:center!important;justify-content:center!important;flex:none;width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;border:1px solid #cadcd5;border-radius:9px;background:#fff;color:#426e65;font-size:24px;line-height:1;cursor:pointer;transform:none!important}
#staffMaxEmployeeDialog .staffMaxEmployeeIdentity{margin:0 0 12px;font-size:15px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
#staffMaxEmployeeDialog .staffMaxEmployeePending{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
#staffMaxEmployeeDialog .staffMaxInviteLink{display:grid;gap:9px;margin:16px 0}
#staffMaxEmployeeDialog .staffMaxInviteLink label{display:grid;gap:7px;font-size:13px;line-height:1.5}
#staffMaxEmployeeDialog .staffMaxInviteLink input{width:100%;min-width:0;box-sizing:border-box;height:42px;padding:9px 11px;border:1px solid #c6dad4;border-radius:9px;background:#fff;color:#183632;font-size:16px}
#staffMaxEmployeeDialog .staffMaxInviteLink button{justify-self:start;min-height:36px;padding:8px 12px;border-radius:8px;font-size:13px;line-height:1.3}
#staffMaxEmployeeDialog button:focus-visible,#staffMaxEmployeeDialog input:focus-visible,#companyScreen .staffMaxEmployeeButton:focus-visible{outline:3px solid #59aa9c;outline-offset:3px}
@media(max-width:600px){#staffMaxEmployeeDialog{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:17px!important;border-radius:13px!important}}
