/* XM-Mail R12.7.25.2 authoritative control module. Loaded last by design. */
:root{--xm-btn-nav:#506985;--xm-btn-page:#397863;--xm-btn-bottom:#3d719e;--xm-domain-active:#397863;--xm-domain-active-rgb:57,120,99;--xm-surface-light:#f8fafc;--xm-surface-dark:#111a2b}
/* Login: light mode uses the exact same three-border geometry and active color language as dark mode. */
html body.theme-light #login #emailPrefix,html body.theme-light #login #password,html body.theme-light #login #xmDomainButton,
html body.theme-dark #login #emailPrefix,html body.theme-dark #login #password,html body.theme-dark #login #xmDomainButton{height:46px!important;min-height:46px!important;border-width:1.5px!important;border-style:solid!important;border-color:var(--xm-domain-active)!important;border-radius:13px!important;background:transparent!important;background-color:transparent!important;background-image:none!important;color:var(--xm-domain-active)!important;-webkit-text-fill-color:var(--xm-domain-active)!important;caret-color:var(--xm-domain-active)!important;box-shadow:none!important;text-shadow:none!important;transform:none!important}
html body #login #emailPrefix:focus,html body #login #password:focus,html body #login #xmDomainButton:focus-visible,html body #login .xmDomainControl.open #xmDomainButton{border-color:var(--xm-domain-active)!important;background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:inset 3px 0 0 var(--xm-domain-active),0 0 0 2px color-mix(in srgb,var(--xm-domain-active) 22%,transparent)!important;outline:0!important;transform:none!important}
/* Registration is a true transparent layer in both modes. */
html body #registerModal,html body #registerModal .registerBox,html body #registerModal .registerBox>.top,html body #registerModal .modalHeader,html body #registerModal .modalFormGrid,html body #registerModal .modalActionFooter{background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html body #registerModal .registerBox{border-color:var(--xm-btn-page)!important}
/* Backend island and its buttons follow the current theme; there is no floating transform or click fill. */
html body.theme-light.appMode #app>.side,html body.theme-light.appMode #mobileOverflow,html body.theme-light.appMode #appMailboxPanel{background:var(--xm-surface-light)!important;background-color:var(--xm-surface-light)!important;background-image:none!important;color:#132238!important;border-color:var(--xm-btn-nav)!important}
html body.theme-dark.appMode #app>.side,html body.theme-dark.appMode #mobileOverflow,html body.theme-dark.appMode #appMailboxPanel{background:var(--xm-surface-dark)!important;background-color:var(--xm-surface-dark)!important;background-image:none!important;color:#eef4ff!important;border-color:var(--xm-btn-nav)!important}
html body.appMode #app>.side,html body.appMode #mobileMore,html body.appMode #appLogo,html body.appMode #mobileOverflow,html body.appMode #mobileOverflow button{transform:none!important;translate:none!important;filter:none!important}
html body.appMode #mobileMore,html body.appMode #appLogo{background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;border-color:transparent!important}
html body.appMode #mobileMore:hover,html body.appMode #mobileMore:focus-visible,html body.appMode #mobileMore:active,html body.appMode #appLogo:hover,html body.appMode #appLogo:focus-visible,html body.appMode #appLogo:active{background:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;transform:none!important;filter:none!important}
html body.appMode #mobileOverflow button,html body.appMode #mobileOverflow button:hover,html body.appMode #mobileOverflow button:focus-visible,html body.appMode #mobileOverflow button:active,html body.appMode #mobileOverflow button.current{--xm-zone:var(--xm-btn-page)!important;background:transparent!important;background-color:transparent!important;background-image:none!important;color:inherit!important;-webkit-text-fill-color:currentColor!important;border:1px solid var(--xm-btn-page)!important;box-shadow:none!important;transform:none!important}
html body.appMode #mobileOverflow button:focus-visible,html body.appMode #mobileOverflow button:active,html body.appMode #mobileOverflow button.current{box-shadow:inset 3px 0 0 var(--xm-btn-page),0 0 0 2px color-mix(in srgb,var(--xm-btn-page) 22%,transparent)!important}
/* Management and settings navigation are normal-flow rails, never floating. */
html body.appMode #adminView .adminTabs,html body.appMode #systemSettingsView .settingsMenu,html body.appMode #settingsMenuButtons{position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;z-index:auto!important;transform:none!important;translate:none!important;filter:none!important;background:transparent!important;background-color:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html body.appMode #adminView .adminTabs>.btn,html body.appMode #settingsMenuButtons>.settingsMenuBtn{--xm-zone:var(--xm-btn-page)!important;border:1px solid var(--xm-btn-page)!important;background:transparent!important;background-color:transparent!important;background-image:none!important;color:inherit!important;box-shadow:none!important;transform:none!important}
html body.appMode #adminView .adminTabs>.btn.active,html body.appMode #adminView .adminTabs>.btn:focus-visible,html body.appMode #adminView .adminTabs>.btn:active,html body.appMode #settingsMenuButtons>.settingsMenuBtn.active,html body.appMode #settingsMenuButtons>.settingsMenuBtn:focus-visible,html body.appMode #settingsMenuButtons>.settingsMenuBtn:active{background:transparent!important;background-image:none!important;box-shadow:inset 3px 0 0 var(--xm-btn-page),0 0 0 2px color-mix(in srgb,var(--xm-btn-page) 22%,transparent)!important;transform:none!important}
/* Every management function button, including create user and add domain, uses page color. */
html body.appMode #adminView button,html body.appMode #adminContent button,html body.appMode #adminView .btn,html body.appMode #adminContent .btn,
html body.appMode #adminContent #newUser,html body.appMode #adminContent #newDomain,html body.appMode #adminContent #newProvider,html body.appMode #adminContent #newMailbox,html body.appMode #adminContent #newRole,html body.appMode #adminContent #resetSuperadmin{--xm-zone:var(--xm-btn-page)!important;border:1px solid var(--xm-btn-page)!important;background:transparent!important;background-color:transparent!important;background-image:none!important;color:inherit!important;-webkit-text-fill-color:currentColor!important;box-shadow:none!important;filter:none!important;transform:none!important}
html body.appMode #adminView button:hover,html body.appMode #adminContent button:hover{background:transparent!important;background-image:none!important;box-shadow:none!important;transform:none!important}
html body.appMode #adminView button:focus-visible,html body.appMode #adminContent button:focus-visible,html body.appMode #adminView button:active,html body.appMode #adminContent button:active{background:transparent!important;background-image:none!important;box-shadow:inset 3px 0 0 var(--xm-btn-page),0 0 0 2px color-mix(in srgb,var(--xm-btn-page) 22%,transparent)!important;transform:none!important}
/* Settings controls and security actions inherit the configured page color. */
html body.appMode #systemSettingsView button,html body.appMode #systemSettingsView .btn,html body.appMode #systemSettingsView select,
html body #loginButton,html body #retryTurnstile,html body #registerSubmit,html body #sendMailButton{--xm-zone:var(--xm-btn-page)!important;border-color:var(--xm-btn-page)!important;background:color-mix(in srgb,var(--xm-btn-page) 12%,transparent)!important;background-image:none!important;color:inherit!important;box-shadow:none!important}
html body.appMode #systemSettingsView button:focus-visible,html body.appMode #systemSettingsView button:active,html body #loginButton:focus-visible,html body #loginButton:active,html body #retryTurnstile:focus-visible,html body #retryTurnstile:active{box-shadow:inset 3px 0 0 var(--xm-btn-page),0 0 0 2px color-mix(in srgb,var(--xm-btn-page) 22%,transparent)!important;transform:none!important}
/* Keep compose scrolling repair authoritative. */
html.xm-active-layer-scroll #composeModal:not(.hidden)[data-xm-scroll-owner=true]{overflow-y:auto!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important}
html.xm-active-layer-scroll #composeModal:not(.hidden)[data-xm-scroll-owner=true] #richText{max-height:none!important;overflow:visible!important;touch-action:pan-y!important;overscroll-behavior:auto!important}
