:root {
  color-scheme: light;
  --login-bg: #f5f5f7;
  --login-text: #1d1d1f;
  --login-accent: #0071e3;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--login-text);
  background: var(--login-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon-sprite,
.app-shell {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.is-authenticated .login-screen {
  display: none;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 20% 18%, rgba(250, 250, 255, 0.92), rgba(250, 250, 255, 0) 32%),
    radial-gradient(circle at 78% 68%, rgba(202, 232, 220, 0.54), rgba(202, 232, 220, 0) 34%),
    linear-gradient(145deg, #edf2f6 0%, #dfe8ee 42%, #f5f1ee 100%);
}

.login-screen::before {
  position: absolute;
  inset: -12%;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 36%),
    linear-gradient(295deg, rgba(0, 77, 63, 0.12), rgba(0, 77, 63, 0) 48%);
  filter: blur(22px);
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(320px, 100%);
  justify-items: center;
  gap: 12px;
}

.login-logo {
  width: 116px;
  margin-bottom: 12px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(67, 82, 101, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.login-field {
  width: 100%;
}

.login-field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 18px;
  color: var(--login-text);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 34px rgba(67, 82, 101, 0.11);
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  backdrop-filter: saturate(180%) blur(22px);
}

.login-field input:focus {
  border-color: rgba(10, 132, 255, 0.48);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12), 0 14px 38px rgba(67, 82, 101, 0.12);
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(29, 29, 31, 0.62);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.login-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--login-accent);
}

.login-button {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  color: #fff;
  border: 1px solid var(--login-accent);
  border-radius: 50%;
  background: var(--login-accent);
}

.login-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.login-button svg {
  width: 18px;
  height: 18px;
}

.login-button:hover,
.login-button:focus-visible {
  border-color: #0066cc;
  background: #0066cc;
}

.login-button:focus-visible {
  outline: 4px solid rgba(10, 132, 255, 0.16);
  outline-offset: 4px;
}

.login-note {
  min-height: 22px;
  margin: 2px 0 0;
  color: rgba(29, 29, 31, 0.64);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

body.is-entering-system .app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #f5f5f7;
}

body.is-entering-system .app-shell > * {
  display: none;
}

body.is-entering-system .app-shell::before {
  content: "正在进入系统…";
  padding-top: 54px;
  color: #515154;
  font-size: 15px;
  font-weight: 700;
  background: radial-gradient(circle, var(--login-accent) 0 6px, transparent 7px) center 18px / 36px 36px no-repeat;
}

@media (max-width: 760px) {
  .login-screen {
    padding: 18px;
  }

  .login-card {
    width: min(300px, 100%);
  }

  .login-logo {
    width: 104px;
  }
}

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