/* Approved Galaxy login layout. Scope everything to login surfaces. */
html:has(.auth-root){color-scheme:light;background:#fff;scrollbar-width:none}
html[data-theme=dark]:has(.auth-root){color-scheme:dark;background:#182232}
html:has(.auth-root)::-webkit-scrollbar{display:none}
.auth-root{--auth-bg:#f3f5f9;--auth-surface:#fff;--auth-text:#202e44;--auth-muted:#52637c;--auth-line:#cdd7e5;--auth-link:#365bc5;--auth-button:#365bc5;--auth-input:#f3f5f9;font-family:"Segoe UI","Microsoft YaHei",system-ui,sans-serif;color:var(--auth-text);background:var(--auth-surface);font-size:15px;line-height:1.6;min-height:100vh}
:root[data-theme=dark] .auth-root{--auth-bg:#101722;--auth-surface:#182232;--auth-text:#e8eef8;--auth-muted:#b0bed1;--auth-line:#344358;--auth-link:#91b0ff;--auth-button:#3b5db8;--auth-input:#101722;color-scheme:dark}
.auth-root *{box-sizing:border-box}.auth-root [hidden]{display:none!important}.auth-root h1,.auth-root h2,.auth-root h3,.auth-root p{margin:0}.auth-root button,.auth-root input,.auth-root select{font:inherit}.auth-root button,.auth-root .button{cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 17px;border-radius:8px;border:1px solid var(--auth-line);background:var(--auth-surface);color:var(--auth-text)}.auth-root button:disabled{opacity:.55;cursor:wait}.auth-root :focus-visible{outline:3px solid var(--auth-link);outline-offset:3px}.auth-root a{color:var(--auth-link)}
.auth-top{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 42px;border-bottom:1px solid var(--auth-line);font-size:12px;color:var(--auth-muted)}.auth-tools{display:flex;align-items:center;gap:15px}.auth-tools button{border:0;background:transparent;padding:8px}.auth-tools svg{width:20px;height:20px}.auth-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#249579;margin-right:8px}
.auth-shell{min-height:calc(100vh - 64px);display:grid;grid-template-columns:1.05fr 1fr}.auth-story{background:#14253e;color:#e9f0fd;display:flex;flex-direction:column;justify-content:center;padding:55px clamp(35px,6.5vw,110px);position:relative;overflow:hidden;isolation:isolate}.auth-story::before{content:"";position:absolute;inset:0;z-index:-1;background-image:var(--auth-custom-image,none);background-size:cover;background-position:center;opacity:var(--auth-custom-opacity,.24)}
.auth-brand{display:flex;gap:16px;align-items:center}.auth-brand img{width:56px;height:56px;border-radius:12px}.auth-brand h1{font-size:30px;letter-spacing:-.02em}.auth-flow{position:relative;height:190px;margin:35px -20px 28px}.auth-flow>svg{width:100%;height:100%;display:block;overflow:visible}.auth-flow path{stroke:#3d70ca;stroke-width:2.2;fill:none}.auth-flow path:nth-child(2){stroke:#3da8bd}.auth-flow path:nth-child(3){stroke:#858fdc}
.auth-form-area{margin:0;max-width:none;border:0;border-radius:0;background:var(--auth-surface);display:flex;align-items:center;justify-content:center;padding:48px 40px}.auth-form{width:100%;max-width:400px}.auth-form h2{font-size:28px;font-weight:650;letter-spacing:-.025em}.auth-form>p{font-size:14px;color:var(--auth-muted);margin:12px 0 30px}.auth-form label{display:block;font-size:14px;font-weight:600;color:var(--auth-text);margin:22px 0}.auth-form input:not([type=checkbox]),.auth-form select{display:block;width:100%;height:48px;padding:12px 14px;border:1px solid var(--auth-line);border-radius:9px;background:var(--auth-input);color:var(--auth-text);font-size:14px;min-width:0}.auth-form input::placeholder{color:var(--auth-muted)}.auth-input{position:relative;margin-top:8px}.auth-input>svg{position:absolute;left:14px;top:15px;width:18px;height:18px;fill:none;stroke:var(--auth-muted);stroke-width:1.8}.auth-input input:not([type=checkbox]){padding-left:42px}.auth-form small{display:block;color:var(--auth-muted);font-weight:400;font-size:12px;margin-top:7px}.auth-form summary{cursor:pointer;color:var(--auth-muted);font-size:13px}.auth-root .auth-submit{width:100%;height:48px;background:var(--auth-button);border-color:var(--auth-button);color:#fff;font-weight:600}.auth-root .auth-submit:hover{filter:brightness(1.08)}.auth-form .auth-options{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0}.auth-options label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:400;margin:0;color:var(--auth-muted)}.auth-options button{border:0;padding:0;font-size:12px;color:var(--auth-link);font-weight:600}.auth-form .auth-message{font-size:13px;color:var(--auth-link);white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0;min-height:1.6em}.auth-device{margin-top:30px;padding-top:24px;border-top:1px solid var(--auth-line);font-size:14px;color:var(--auth-muted)}.auth-device small{font-size:12px}
.auth-appearance{width:min(430px,calc(100vw - 32px));padding:26px;background:var(--auth-surface);color:var(--auth-text);border:1px solid var(--auth-line);border-radius:14px}.auth-appearance::backdrop{background:#08111eb0}.auth-appearance form{display:grid;gap:16px}.auth-appearance h2{font-size:22px}.auth-appearance label{display:grid;gap:8px;font-size:14px}.auth-appearance select,.auth-appearance input{max-width:100%;color:inherit;background:var(--auth-input);border:1px solid var(--auth-line);padding:8px;border-radius:8px}.auth-appearance .auth-actions{display:flex;justify-content:space-between;gap:10px}.auth-appearance p{font-size:13px;color:var(--auth-muted)}
/* Fit the sign-in task to the viewport; reflow short windows instead of clipping controls. */
.auth-root{--auth-top-height:clamp(40px,7vh,64px);--auth-control-height:clamp(36px,5.9vh,48px);--auth-field-gap:clamp(8px,1.7vh,22px);margin:0;min-height:100dvh}
.auth-top{height:var(--auth-top-height);padding-inline:clamp(20px,3vw,42px)}
.auth-shell{min-height:calc(100dvh - var(--auth-top-height));grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
.auth-story{padding:clamp(18px,3.5vh,55px) clamp(28px,5vw,110px);min-width:0}
.auth-brand{gap:clamp(10px,1.2vw,16px)}.auth-brand img{width:clamp(40px,5.8vh,56px);height:clamp(40px,5.8vh,56px)}.auth-brand h1{font-size:clamp(24px,2.4vw,30px)}

.auth-flow{height:clamp(85px,19vh,190px);margin:clamp(12px,2.8vh,35px) -12px clamp(12px,2.4vh,28px)}
.auth-form-area{padding:clamp(12px,2.2vh,36px) clamp(24px,3.2vw,64px);min-width:0}
.auth-form{max-width:clamp(360px,31vw,460px)}.auth-form h2{font-size:clamp(22px,2.4vw,28px);line-height:1.35;text-wrap:balance}
.auth-form>p{margin:8px 0 clamp(12px,2vh,22px);font-size:clamp(12px,1.2vw,14px);line-height:1.5}
.auth-form label{margin:var(--auth-field-gap) 0;font-size:clamp(12px,1.1vw,14px);line-height:1.5;min-width:0}
.auth-form input:not([type=checkbox]),.auth-form select{height:var(--auth-control-height);padding-block:8px;font-size:clamp(13px,1.1vw,14px)}
.auth-input{margin-top:5px}.auth-input>svg{top:50%;transform:translateY(-50%)}.auth-form small{margin-top:5px;line-height:1.45}
.auth-form .auth-options{margin:clamp(8px,1.6vh,18px) 0}.auth-form .auth-options label{margin:0}
.auth-root .auth-submit{height:var(--auth-control-height);padding-block:7px}
.auth-form .auth-message{margin:8px 0;min-height:0;line-height:1.4}.auth-form .auth-message:empty{display:none}
.auth-device{margin-top:clamp(10px,1.8vh,24px);padding-top:clamp(8px,1.5vh,18px);font-size:12px;line-height:1.4}.auth-device small{font-size:11px;line-height:1.4;margin-top:4px}
.auth-appearance{max-height:calc(100dvh - 32px);overflow:auto}
.auth-form form:has(input[name=company]){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}
.auth-form form:has(input[name=company])>*{grid-column:1/-1}
.auth-form form:has(input[name=company])>label:has(input[name=company]),.auth-form form:has(input[name=company])>label:has(input[name=name]){grid-column:auto}
@media(max-width:760px){.auth-top{padding:0 18px}.auth-top>span{font-size:11px}.auth-tools{gap:6px}.auth-shell{display:block}.auth-story{padding:16px 24px}.auth-brand img{width:36px;height:36px}.auth-brand h1{font-size:24px}.auth-flow{display:none}.auth-form-area{padding:18px 24px}.auth-form{max-width:450px}.auth-form input:not([type=checkbox]){font-size:16px;min-height:44px}.auth-root .auth-submit{min-height:44px}}
@media(max-height:560px) and (min-width:560px){.auth-root{--auth-top-height:40px;--auth-field-gap:7px;--auth-control-height:36px}.auth-form-area{padding-block:10px}.auth-form h2{font-size:22px}.auth-form>p{margin:5px 0 10px}.auth-form form:has(input[name=password]){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}.auth-form form:has(input[name=password])>*{grid-column:1/-1}.auth-form form:has(input[name=password])>label:has(input[name=username]),.auth-form form:has(input[name=password])>label:has(input[name=password]){grid-column:auto}.auth-form .auth-options{margin:7px 0}.auth-device{margin-top:8px;padding-top:8px}.auth-flow{margin-block:12px;height:90px}}
@media(max-height:560px) and (max-width:760px){.auth-story{display:none}.auth-form{max-width:520px}.auth-form-area{min-height:calc(100dvh - var(--auth-top-height))}}
@media(max-height:450px){.auth-root{--auth-field-gap:4px}.auth-device{display:none}.auth-form-area{padding-block:8px}.auth-form>p{margin:4px 0 6px}.auth-form small{font-size:11px;line-height:1.3;margin-top:2px}.auth-form .auth-message{margin:4px 0}.auth-form label:has(input[readonly]){display:flex;align-items:center;gap:10px;flex-wrap:wrap}.auth-form label:has(input[readonly])>.auth-input{flex:1;margin-top:0}.auth-form label:has(input[readonly])>small{display:none}}
