:root {
  color-scheme: light;
  font: 14px/1.6 "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #242c29;
  background: #f1f6f5;
  --login-accent: #23715a;
  --login-border: #d5e0db;
  --login-muted: #5d6d65;
}
:root:has(.registration-dialog[open]) { overflow: hidden; padding-inline-end: var(--login-scrollbar, 0px); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; isolation: isolate; }
.login-background { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #f1f6f5; }
:root:has(.registration-dialog[open]) .login-background { inset-inline-end: var(--login-scrollbar, 0px); }
.login-background canvas, .login-background-fallback { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.login-background[data-state="running"] .login-background-fallback,
.login-background[data-state="paused"] .login-background-fallback { visibility: hidden; }
.login-background[data-state="fallback"] canvas { visibility: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: #d6ebe2; color: #184b3c; }
:focus-visible { outline: 2px solid var(--login-accent); outline-offset: 3px; }
.login-brand { width: min(1280px, 100%); margin: 0 auto; padding: 32px 48px; display: flex; align-items: center; gap: 24px; }
.login-brand .login-brand-logo { width: 224px; }
.login-brand-copy { display: grid; gap: 3px; padding-left: 24px; border-left: 1px solid #dce3df; }
.login-brand-copy strong { display: block; font-size: 15px; font-weight: 650; }
.login-brand-copy span { display: block; font-size: 12px; color: #64716a; }
.login-view { display: grid; place-items: center; padding: 32px 24px 72px; }
.login-panel { width: min(460px, 100%); padding: 34px 38px 20px; border: 1px solid var(--login-border); border-radius: 8px; background: #fff; box-shadow: 0 12px 36px rgba(27, 61, 52, .1); }
.login-panel h1 { margin: 0 0 28px; font-size: 26px; font-weight: 650; line-height: 1.35; }
.login-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.login-field { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.login-field label { font-size: 13px; font-weight: 600; }
.login-field input { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid #becbc4; border-radius: 6px; background: #fff; color: #242c29; caret-color: var(--login-accent); transition: border-color 150ms ease, box-shadow 150ms ease; }
.login-field input::placeholder { color: var(--login-muted); }
.login-field input:hover { border-color: #82978a; }
.login-field input:focus { outline: none; border-color: var(--login-accent); box-shadow: 0 0 0 3px rgba(35, 113, 90, .14); }
.login-password { position: relative; }
.login-password input { padding-right: 48px; }
.login-visibility { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 4px; color: #637168; background: transparent; }
.login-visibility:hover { background: #eef3f0; color: var(--login-accent); }
.login-visibility svg { width: 18px; height: 18px; }
.login-caps { position: absolute; inset: 0 0 auto auto; color: #865416; font-size: 12px; margin: 0; }
.form-error { margin: 0; padding: 8px 11px; border: 1px solid #eed8da; border-radius: 6px; background: #fdf5f5; color: #962b34; font-size: 13px; overflow-wrap: anywhere; }
.form-error:empty, [hidden] { display: none !important; }
.login-submit { position: relative; display: grid; place-items: center; width: 100%; min-height: 46px; padding: 6px 40px; border: 1px solid var(--login-accent); border-radius: 6px; background: var(--login-accent); color: #fff; font-weight: 650; transition: background-color 150ms ease; }
.login-form .login-submit { margin-top: 4px; }
.login-submit svg { position: absolute; top: calc(50% - 8px); right: 14px; width: 16px; height: 16px; }
.login-submit:hover:not(:disabled) { background: #1b5b48; }
.login-submit:disabled { cursor: wait; background: #526d60; border-color: #526d60; }
.login-help { display: flex; justify-content: center; margin-top: 20px; padding-top: 10px; border-top: 1px solid #e6ece8; }
.login-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 4px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--login-accent); font-size: 13px; font-weight: 600; }
.login-link svg, .registration-close svg { width: 16px; height: 16px; flex: none; }
.login-link:hover:not(:disabled) { background: #edf5f0; }
.login-registration-notice { margin: 16px 0 0; padding: 9px 11px; border: 1px solid #d4e7dc; border-radius: 6px; background: #edf5f0; color: #185a46; font-size: 13px; }

.registration-dialog { width: min(540px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--login-border); border-radius: 8px; background: #fff; box-shadow: 0 18px 56px rgba(23, 48, 42, .24); color: inherit; }
.registration-dialog::backdrop { background: rgba(26, 43, 39, .38); }
.registration-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 34px); }
.registration-header, .registration-actions { display: flex; align-items: center; gap: 10px; padding: 14px 24px; background: #f8faf9; }
.registration-header { justify-content: space-between; border-bottom: 1px solid #e4ebe7; }
.registration-header h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.registration-close, .registration-back { border: 1px solid var(--login-border); border-radius: 6px; background: #fff; color: #40544b; }
.registration-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; flex: none; }
.registration-close:hover:not(:disabled), .registration-back:hover:not(:disabled) { background: #edf5f0; border-color: #a4b9ae; }
.registration-close:disabled, .registration-back:disabled, .login-link:disabled { opacity: .55; cursor: not-allowed; }
.registration-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.registration-fields input { height: 42px; }
.registration-wide { grid-column: 1 / -1; }
.login-optional { color: var(--login-muted); font-weight: 400; }
.registration-actions { justify-content: flex-end; border-top: 1px solid #e4ebe7; }
.registration-back { min-height: 42px; padding: 6px 14px; font-weight: 600; }
.registration-actions .login-submit { min-height: 42px; width: auto; min-width: 134px; }
.login-footer { width: min(1184px, calc(100% - 96px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto; padding: 12px 0; border-top: 1px solid #c5d8d2; color: #485e57; font-size: 12px; }
.login-footer-tools { display: flex; align-items: center; gap: 20px; min-height: 36px; }
.login-motion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; min-height: 36px; padding: 0 4px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 12px; white-space: nowrap; }
.login-motion-toggle:hover:not(:disabled) { color: var(--login-accent); }
.login-motion-toggle:disabled { opacity: .6; cursor: default; }
.login-motion-track { position: relative; display: block; flex: 0 0 28px; width: 28px; height: 16px; border: 1px solid #6e837a; border-radius: 8px; background: #6e837a; transition: background-color 150ms ease, border-color 150ms ease; }
.login-motion-track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform 150ms ease; }
.login-motion-toggle[aria-checked="true"] .login-motion-track { border-color: var(--login-accent); background: var(--login-accent); }
.login-motion-toggle[aria-checked="true"] .login-motion-track::after { transform: translateX(12px); }
@media (max-width: 560px) {
  .login-brand { padding: 24px 20px; gap: 12px; }
  .login-brand .login-brand-logo { width: 166px; }
  .login-brand-copy { padding-left: 12px; }
  .login-brand-copy strong { font-size: 13px; }
  .login-brand-copy span { display: none; }
  .login-view { padding: 24px 20px 48px; }
  .login-panel { padding: 28px 24px 16px; }
  .login-panel h1 { font-size: 24px; margin-bottom: 24px; }
  .login-link { min-height: 44px; }
  .login-footer { width: calc(100% - 40px); flex-wrap: wrap; gap: 4px 16px; }
  .login-footer-description { display: none; }
  .login-footer-tools, .login-motion-toggle { min-height: 44px; }
}
@media (max-width: 520px) {
  .registration-header, .registration-actions { padding: 12px 16px; }
  .registration-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 16px 20px; }
  .registration-fields input { height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .login-field input, .login-submit, .login-motion-track, .login-motion-track::after { transition: none; } }
