:root {
  --apple-font-text:
    "SF Pro SC",
    "SF Pro Text",
    "SF Pro Icons",
    "PingFang SC",
    "Helvetica Neue",
    Helvetica,
    Arial,
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    sans-serif;
  --apple-font-display:
    "SF Pro SC",
    "SF Pro Display",
    "SF Pro Icons",
    "PingFang SC",
    "Helvetica Neue",
    Helvetica,
    Arial,
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    sans-serif;
  font-family: var(--apple-font-text);
  color: #0f172a;
  background: #eaf2fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  font-family: var(--apple-font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 8%, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at 88% 90%, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(145deg, #f8fbff 0%, #edf4fc 48%, #e6eef8 100%);
}

button,
input,
select,
textarea,
option,
dialog { font: inherit; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--apple-font-display);
}

.login-page {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px);
  width: min(1040px, 100%);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(30, 64, 105, 0.16);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 82px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, #0f2d55 0%, #164b8f 58%, #2563eb 100%);
}

.login-intro::after {
  position: absolute;
  right: -92px;
  bottom: -118px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.05), 0 0 0 84px rgba(255, 255, 255, 0.035);
  content: "";
}

.login-brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 6px;
  width: max-content;
  margin-bottom: 42px;
}

.login-brand-mark span {
  width: 10px;
  border-radius: 999px;
  background: #fff;
}

.login-brand-mark span:nth-child(1) { height: 26px; opacity: 0.65; }
.login-brand-mark span:nth-child(2) { height: 38px; }
.login-brand-mark span:nth-child(3) { height: 18px; opacity: 0.78; }

.login-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-intro .login-eyebrow { color: #bfdbfe; }

.login-intro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.login-description {
  max-width: 520px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.8;
}

.login-security-note {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 38px;
  color: #dbeafe;
}

.login-security-note strong { color: #fff; font-size: 14px; }
.login-security-note span { font-size: 13px; line-height: 1.6; }

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 58px);
  background: #fff;
}

.login-card-heading { margin-bottom: 32px; }
.login-card-heading .login-eyebrow { color: #2563eb; }

.login-card-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.25;
}

.login-card-heading > p:last-child {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.login-form { display: grid; gap: 22px; }
.login-field { display: grid; gap: 8px; }

.login-field label {
  color: #27364b;
  font-size: 14px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field input:hover { border-color: #94a3b8; }

.login-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.login-password-field { position: relative; }
.login-password-field input { padding-right: 70px; }

.login-password-field button {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 58px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.login-password-field button:hover { background: #eff6ff; }

.login-password-field button:focus-visible,
.login-submit:focus-visible,
.login-register-link a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  margin-top: -6px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
}

.login-remember input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.login-message {
  display: none;
  min-height: 44px;
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #b4232c;
  font-size: 13px;
  line-height: 1.6;
}

.login-message.is-visible { display: block; }

.login-submit {
  min-height: 50px;
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
  transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.login-submit:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.28);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  box-shadow: none;
}

.login-register-link {
  margin: -6px 0 0;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.login-register-link a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.login-register-link a:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .login-page { align-items: start; padding: 16px; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 16px; }
  .login-intro { padding: 32px 28px; }
  .login-brand-mark { margin-bottom: 24px; }
  .login-intro h1 { font-size: 32px; }
  .login-description { margin-top: 14px; font-size: 15px; }
  .login-security-note { margin-top: 24px; padding-top: 0; }
  .login-card { padding: 34px 28px 40px; }
}

@media (max-width: 390px) {
  .login-page { padding: 0; }
  .login-shell { min-height: 100dvh; border: 0; border-radius: 0; }
  .login-intro,
  .login-card { padding-inline: 22px; }
}

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