/* Scale Xpert v0.4.32: one-screen auth fit + professional full-width shell */
/* Auth page: fit common desktop viewports without vertical scrolling or a trailing white strip. */
@media (min-width:961px){
  html,body,#app{height:100%!important;min-height:100%!important;overflow:hidden!important}
  #app .auth-page{height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;align-items:stretch!important}
  #app .auth-left{height:100dvh!important;min-height:0!important;max-height:100dvh!important;grid-template-rows:62px minmax(0,1fr) 66px!important;padding:0 26px!important;overflow:hidden!important}
  #app .auth-logo{height:62px!important;min-height:62px!important}
  #app .auth-logo>.sx-brandmark{width:31px!important;height:31px!important;max-width:31px!important;max-height:31px!important}
  #app .auth-language-menu{font-size:13px!important}
  #app .auth-language-menu>summary{padding:7px 2px!important;gap:8px!important}
  #app .auth-language-menu svg.auth-language-icon{width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important}
  #app .auth-language-menu svg.auth-language-chevron{width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important}
  #app .auth-language-popover{top:34px!important}
  #app .auth-stack{min-height:0!important;padding:6px 0 8px!important;overflow:hidden!important}
  #app .auth-card{width:min(430px,100%)!important;padding:25px 31px 20px!important;border-radius:10px!important}
  #app .auth-card h2{font-size:26px!important;line-height:1.08!important;margin:0 0 22px!important;letter-spacing:-.7px!important}
  #app .auth-provider{height:44px!important;min-height:44px!important;font-size:13px!important}
  #app .auth-provider img{width:21px!important;height:21px!important;max-width:21px!important;max-height:21px!important}
  #app .sx-auth-divider{margin:20px 0 17px!important;font-size:11px!important}
  #app .auth-form{gap:7px!important}
  #app .auth-form>label{font-size:11px!important}
  #app .auth-email-input{height:41px!important;min-height:41px!important;padding:0 12px!important}
  #app .auth-email-input input{height:39px!important;min-height:39px!important;line-height:39px!important;font-size:12px!important}
  #app .auth-email-input svg{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important}
  #app .auth-submit{height:44px!important;min-height:44px!important;line-height:44px!important;margin-top:8px!important;font-size:13px!important}
  #app .auth-password-help{margin-top:9px!important;font-size:10px!important}
  #app .auth-card-rule{margin:16px 0 14px!important}
  #app .auth-switch{font-size:11px!important}
  #app .auth-terms{margin-top:17px!important;font-size:9px!important;line-height:1.45!important}
  #app .auth-bottom-inner{height:66px!important;min-height:66px!important;grid-template-columns:31px minmax(0,1fr)!important;gap:15px!important}
  #app .auth-bottom .sx-brandmark{width:29px!important;height:29px!important;max-width:29px!important;max-height:29px!important}
  #app .auth-bottom .auth-legal{font-size:8.5px!important}
  #app .auth-bottom .auth-legal a{padding:0 8px!important}
  #app .auth-bottom .auth-legal>span{height:11px!important}
  #app .auth-right{height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important}
  #app .auth-right-image{height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;object-fit:fill!important}
}

/* Desktop application shell: compact icon rail that expands on hover without shrinking content. */
@media (min-width:801px){
  #app .sx-dashboard-layout{display:block!important;min-height:100vh!important;background:#f3f6fa!important}
  #app .sx-dashboard-layout .sidebar{position:fixed!important;z-index:60!important;left:0!important;top:0!important;bottom:0!important;width:58px!important;min-width:58px!important;height:100vh!important;background:#fff!important;border-right:1px solid #e2e7ef!important;overflow:hidden!important;transition:width .18s ease,box-shadow .18s ease!important;box-shadow:none!important}
  #app .sx-dashboard-layout .sidebar:hover,#app .sx-dashboard-layout .sidebar:focus-within{width:196px!important;box-shadow:10px 0 30px rgba(24,35,55,.08)!important}
  #app .sx-sidebar-head{height:64px!important;min-height:64px!important;padding:0!important;display:grid!important;place-items:center!important;border-bottom:1px solid #e7ebf1!important}
  #app .sx-sidebar-head .sx-brandmark{width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;object-fit:contain!important}
  #app .sx-main-nav{display:grid!important;gap:7px!important;padding:14px 8px!important}
  #app .sx-main-nav>a{height:40px!important;display:flex!important;align-items:center!important;gap:12px!important;padding:0 11px!important;border-radius:8px!important;white-space:nowrap!important;overflow:hidden!important;color:#596375!important;text-decoration:none!important}
  #app .sx-main-nav .nav-icon{width:20px!important;min-width:20px!important;text-align:center!important;font-size:14px!important}
  #app .sx-main-nav .nav-label{display:block!important;opacity:0!important;transform:translateX(-5px)!important;transition:opacity .12s ease,transform .12s ease!important;font-size:11px!important}
  #app .sidebar:hover .nav-label,#app .sidebar:focus-within .nav-label{opacity:1!important;transform:none!important}
  #app .sx-main-nav>a.active{background:#f0edff!important;color:#5742ed!important}
  #app .main-shell{margin-left:58px!important;min-width:0!important;width:calc(100% - 58px)!important;background:#f3f6fa!important}
  #app .sx-topbar{position:sticky!important;top:0!important;z-index:45!important;height:64px!important;min-height:64px!important;width:100%!important;padding:0 18px!important;display:flex!important;align-items:center!important;gap:12px!important;background:#fff!important;border-bottom:1px solid #e2e7ef!important;box-sizing:border-box!important}
  #app .sx-header-workspace{display:flex!important;align-items:center!important;gap:7px!important;height:34px!important;max-width:210px!important;padding:0 9px!important;border:1px solid #dfe5ed!important;border-radius:6px!important;background:#fff!important;color:#3f4b61!important;flex:0 1 210px!important}
  #app .sx-workspace-globe{display:block!important;width:16px!important;height:16px!important;min-width:16px!important;color:#536077!important}
  #app .sx-header-workspace select{appearance:auto!important;min-width:0!important;width:100%!important;height:30px!important;border:0!important;outline:0!important;background:transparent!important;color:#1a2437!important;font-size:10px!important;font-weight:600!important;padding:0 2px!important;box-shadow:none!important;text-overflow:ellipsis!important}
  #app .sx-header-divider{width:1px!important;height:22px!important;background:#e5e9ef!important;flex:0 0 1px!important}
  #app .sx-top-group{height:64px!important;display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important}
  #app .sx-top-group>strong{font-size:12px!important;color:#151d2f!important;white-space:nowrap!important}
  #app .sx-top-tabs{height:64px!important;display:flex!important;align-items:stretch!important;gap:5px!important}
  #app .sx-top-tabs a{display:flex!important;align-items:center!important;padding:0 8px!important;font-size:10px!important;white-space:nowrap!important}
  #app .sx-dashboard-head-actions{margin-left:auto!important;display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
  #app .sx-dashboard-head-actions select{height:32px!important;min-width:120px!important}
  #app .sx-dashboard-head-actions span{max-width:150px!important;white-space:normal!important;line-height:1.25!important}
  #app .sx-profile-menu{margin-left:auto!important;flex:0 0 auto!important}
  #app .sx-dashboard-head-actions + .sx-profile-menu{margin-left:0!important}
  #app .sx-dashboard-content{max-width:none!important;width:100%!important;margin:0!important;padding:16px 16px 34px!important;box-sizing:border-box!important;background:#f3f6fa!important}
  #app .sx-kpi-grid,#app .sx-domain-panel,#app .sx-pages-panel,#app .sx-dashboard-lower{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important}
  #app .sx-dashboard-lower{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:14px!important}
  #app .sx-dashboard-lower>.sx-panel{min-width:0!important;width:100%!important}
}

@media (max-width:800px){
  html,body,#app{overflow:auto!important}
  #app .sx-header-workspace{display:none!important}
  #app .sx-header-divider{display:none!important}
}
