:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: #202832;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.svg-definitions { position: absolute; pointer-events: none; }

.site-header { flex-shrink: 0; border-bottom: 1px solid #eceef0; }
.header-inner { width: 100%; min-height: 88px; padding: 22px 32px; display: flex; align-items: center; gap: 26px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-logo { display: block; width: 44px; height: 44px; object-fit: contain; filter: url(#brand-paper-removal); }
.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name-zh { font-size: 17px; line-height: 23px; font-weight: 600; letter-spacing: .5px; }
.brand-name-en { color: #68717c; font-size: 12px; line-height: 17px; }
.site-name { border-left: 1px solid #d8dce0; padding-left: 22px; color: #68717c; font-size: 13px; line-height: 20px; }
.language-switcher { position: relative; margin-left: auto; flex-shrink: 0; width: 44px; }
.language-switcher summary { display: grid; place-items: center; width: 44px; height: 40px; list-style: none; border-radius: 4px; cursor: pointer; }
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary:hover, .language-switcher[open] summary { background: #f3f5f7; }
.language-icon { width: 20px; height: 20px; fill: none; stroke: #596572; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.language-options { position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; width: 148px; padding: 4px; border: 1px solid #d8dce0; border-radius: 4px; background: #fff; box-shadow: 0 4px 12px rgb(32 40 50 / 8%); }
.language-option { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border: 0; border-radius: 2px; background: transparent; color: #202832; font-size: 14px; line-height: 22px; text-align: left; cursor: pointer; }
.language-option:hover, .language-option:focus-visible { background: #f3f5f7; }
.language-option svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.language-option[aria-pressed="true"] svg { visibility: visible; }

main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 24px 80px; }
.login { width: 100%; max-width: 360px; }
h1 { margin: 0; font-size: 27px; line-height: 36px; font-weight: 600; letter-spacing: -.5px; }
#login-form { margin-top: 28px; }
.field { margin-bottom: 22px; }
label { display: block; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
input { width: 100%; min-width: 0; height: 46px; padding: 10px 12px; border: 1px solid #89939f; border-radius: 4px; outline: none; background: #fff; color: #202832; font-size: 16px; line-height: 24px; transition: border-color .12s ease; }
input:hover { border-color: #687584; }
input:focus { border-color: #294d70; outline: 2px solid #294d70; outline-offset: 1px; }
input[aria-invalid="true"] { border-color: #b43737; }
input[readonly] { color: #68717c; }
.password-control { position: relative; }
.password-control input { padding-right: 56px; }
input[type="password"]::-ms-reveal { display: none; }
.password-toggle { position: absolute; top: 1px; bottom: 1px; right: 1px; width: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #596572; cursor: pointer; }
.password-toggle:hover { color: #202832; background: #f3f5f7; }
.password-toggle:disabled { cursor: default; color: #8a919a; }
.eye-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field-error, .form-error { margin: 7px 0 0; color: #a72f2f; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.form-error { margin: -4px 0 16px; }
.submit-button { display: block; width: 100%; min-height: 46px; padding: 11px 16px; border: 1px solid #253e58; border-radius: 4px; background: #253e58; color: #fff; cursor: pointer; font-size: 15px; line-height: 22px; font-weight: 500; }
.submit-button:hover { background: #1c3045; border-color: #1c3045; }
.submit-button:disabled { background: #526579; border-color: #526579; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #294d70; outline-offset: 4px; }
.site-footer { flex-shrink: 0; padding: 20px 24px 24px; text-align: center; color: #68717c; font-size: 12px; line-height: 20px; }
.account-note { margin: 12px 0 28px; color: #68717c; font-size: 14px; line-height: 23px; }
.field-hint { margin: 8px 0 0; color: #68717c; font-size: 12px; line-height: 18px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 28px; font-size: 14px; line-height: 22px; }
.account-actions a { text-underline-offset: 4px; }
.text-button { padding: 0; min-height: 40px; border: 0; background: transparent; color: #253e58; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.text-button:disabled { color: #68717c; cursor: wait; }
.workspace-main { align-items: flex-start; padding-top: 64px; }
.workspace { width: 100%; max-width: 800px; }
.account-details { margin: 36px 0 0; border-top: 1px solid #eceef0; border-bottom: 1px solid #eceef0; padding: 20px 0; font-size: 14px; line-height: 24px; }
.account-details div { display: flex; gap: 20px; margin: 8px 0; }
.account-details dt { flex: 0 0 90px; color: #68717c; }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.account-error { margin: 16px 0 0; }
.spinner { display: inline-block; width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.loading-status { display: flex; justify-content: center; align-items: center; gap: 10px; color: #68717c; font-size: 14px; }
.button-spinner { width: 0; height: 15px; flex-basis: 0; border-width: 0; opacity: 0; margin-right: 0; transition: opacity .15s ease, width .15s ease, margin-right .15s ease; vertical-align: -2px; }
.is-busy .button-spinner { width: 15px; flex-basis: 15px; border-width: 2px; opacity: 1; margin-right: 8px; }
.button-label { vertical-align: baseline; }
.account-content:not([hidden]), .view-enter { animation: content-in .18s ease-out both; }
.submit-button, .text-button { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes content-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .site-name { display: none; }
}

@media (max-width: 480px) {
  .header-inner { min-height: 72px; padding: 18px 24px; gap: 16px; }
  .brand-logo { width: 40px; height: 40px; }
  .site-name { padding-left: 16px; font-size: 12px; }
  main { padding: 44px 28px 56px; }
}

@media (max-width: 350px) {
  .header-inner { padding-right: 20px; padding-left: 20px; gap: 12px; }
  .site-name { padding-left: 12px; }
  main { padding-right: 24px; padding-left: 24px; }
}

@media (max-height: 650px) {
  main { align-items: flex-start; padding-top: 36px; padding-bottom: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
