@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  --login-canvas: #f3f5f8;
  --login-surface: #fff;
  --login-panel: #eef1f5;
  --login-panel-muted: #5b6574;
  --login-border: #dfe5ec;
  --login-control: #c8d1dc;
  --login-text: #18202b;
  --login-muted: #667085;
  --login-accent: #0a67e8;
  --login-accent-dark: #075acb;
  --login-focus: rgba(10, 103, 232, .22);
  --login-danger: #b42318;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --duration-press: 120ms;
  --duration-fast: 160ms;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--login-text); background: var(--login-canvas); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 2px; }
::selection { color: #fff; background: var(--login-accent); }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(390px, 1.1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(100%, 1040px);
  min-height: 620px;
  background: var(--login-surface);
  border: 1px solid var(--login-border);
  border-radius: 16px;
  overflow: hidden;
}
.login-intro, .login-form { display: flex; flex-direction: column; justify-content: center; }
.login-intro, .login-form { grid-row: 1; }
.login-intro { position: relative; padding: 46px; color: var(--login-text); background: var(--login-panel); border-right: 1px solid var(--login-border); }
.login-form { padding: 66px 64px; }
.site-legal-footer {
  grid-column: 1 / -1; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  color: var(--login-muted); text-align: center; font-size: 12px;
  border-top: 1px solid var(--login-border);
}
.site-legal-footer a { color: inherit; text-underline-offset: 3px; }

.worker-brand { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.worker-brand > span:last-child small { display: block; margin-top: 1px; color: var(--login-panel-muted); font-size: 10px; font-weight: 400; }
.worker-mark { width: 36px; height: 36px; display: grid; align-content: center; gap: 4px; padding: 8px 6px; background: var(--login-accent); border-radius: 9px; }
.worker-mark i { display: block; height: 2px; border-radius: 2px; background: #fff; }
.worker-mark i:nth-child(2) { width: 78%; margin-left: auto; }
.worker-mark i:nth-child(3) { width: 56%; margin-left: auto; }

.login-copy { margin-block: auto; }
.login-copy > span { color: var(--login-accent); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.login-card h1 { margin: 10px 0 8px; font-size: clamp(28px, 3vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.login-card p { max-width: 32ch; margin: 0; color: var(--login-panel-muted); font-size: 13px; }

.language-switch { align-self: flex-start; margin: 0 0 26px; }
.language-switch button { min-height: 36px; padding: 0 12px; color: var(--login-accent); background: #fff; border: 1px solid var(--login-border); border-radius: 8px; font-weight: 600; }
.login-form > form:not(.language-switch) { display: grid; gap: 7px; }
.login-card label { margin-top: 12px; color: #344054; font-size: 12px; font-weight: 600; }
.login-card input:not([type="hidden"]) {
  width: 100%; min-height: 44px; padding: 9px 11px; color: var(--login-text); background: #fff;
  border: 1px solid var(--login-control); border-radius: 9px; caret-color: var(--login-accent);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.login-card input:not([type="hidden"]):focus { border-color: var(--login-accent); box-shadow: 0 0 0 3px var(--login-focus); outline: 0; }
.worker-primary {
  width: 100%; min-height: 44px; margin-top: 20px; padding: 10px 18px; color: #fff; background: var(--login-accent);
  border: 1px solid var(--login-accent); border-radius: 9px; font-weight: 600;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out), transform var(--duration-press) var(--ease-out);
}
.worker-primary.is-pressed { transform: scale(.97); }
.worker-primary.is-submitting { opacity: .68; cursor: progress; pointer-events: none; }
.worker-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.worker-alert.error { color: var(--login-danger); background: #fff2f0; border: 1px solid #efc5c4; }
.demo-notice { margin: 22px 0 0; padding: 11px 13px; color: #684613; background: rgba(255, 255, 255, .72); border: 1px solid #ead9ad; border-radius: 8px; font-size: 12px; font-weight: 500; }

@media (max-width: 700px) {
  body { background: #fff; }
  .login-page { display: block; padding: 0; }
  .login-card { display: block; width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .login-intro { display: block; padding: 24px 20px 22px; border-right: 0; border-bottom: 1px solid var(--login-border); }
  .login-copy { margin-top: 30px; }
  .login-card h1 { font-size: 27px; }
  .login-form { display: block; padding: 24px 20px 42px; }
  .language-switch { margin-bottom: 20px; }
  .demo-notice { margin-top: 18px; }
}

@media (hover: hover) and (pointer: fine) {
  .language-switch button:hover { border-color: #a9c9f5; background: #edf5ff; }
  .login-card input:not([type="hidden"]):hover { border-color: #aeb9c6; }
  .worker-primary:hover { background: var(--login-accent-dark); border-color: var(--login-accent-dark); }
}

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