:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #10203d;
  background: #f3f6fb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; min-height: 100vh; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(36, 99, 235, 0.14), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(14, 165, 233, 0.12), transparent 32%),
    #f6f8fc;
}

.login-card {
  width: min(420px, 100%);
  padding: 42px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce4f0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(25, 49, 89, 0.14);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(40, 58, 28, 0.18));
}

.eyebrow {
  margin: 26px 0 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.intro { margin: 10px 0 28px; color: #64748b; }
form { display: grid; gap: 10px; }
label { margin-top: 8px; font-size: 14px; font-weight: 700; }

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font: inherit;
  outline: none;
}

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

button {
  min-height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: #1d4ed8;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:disabled { opacity: 0.65; cursor: wait; }
.error { margin: 8px 0 0; color: #b42318; font-size: 14px; }

.email-hint { color: #64748b; font-size: 13px; line-height: 1.65; }
#account-message { font-size: 14px; line-height: 1.65; }
#account-message:empty { display: none; }
.password-sign-in { margin-top: 26px; padding-top: 20px; border-top: 1px solid #e5eaf3; }
.password-sign-in summary { color: #475569; font-size: 14px; cursor: pointer; }
.password-sign-in form { margin-top: 16px; }
#link-confirm { width: 100%; }
#link-confirmation p { line-height: 1.65; }
.link-email { font-weight: 700; overflow-wrap: anywhere; }
.link-retry { display: inline-block; margin-top: 20px; color: #1d4ed8; line-height: 1.5; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 22px; font-size: 14px; }
.auth-links a, .field-hint a { color: #1d4ed8; text-underline-offset: 3px; }
.field-hint { margin: 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.form-message { margin: 16px 0 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.register-referral { display: grid; gap: 10px; }
#link-password-fields { display: grid; gap: 10px; }
#link-password-form button { width: 100%; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #2563eb; outline-offset: 4px; }
@media (max-width: 480px) { .login-card { padding: 28px; } }

.external-signin { display: grid; gap: 10px; }
.google-button { min-height: 44px; display: flex; justify-content: center; }
/* Microsoft identity branding: light theme, 21px logo, Segoe UI semibold, #5e5e5e on white with a #8c8c8c border. */
.microsoft-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  min-height: 44px;
  margin: 0 auto;
  padding: 0 12px;
  border: 1px solid #8c8c8c;
  border-radius: 4px;
  color: #5e5e5e;
  background: #fff;
  font-family: "Segoe UI", Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.microsoft-button:hover { background: #f5f5f5; }
.microsoft-button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 2px; }
/* Sign in with Apple human interface guidelines: black button, white Apple logo and title. */
.apple-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  min-height: 44px;
  margin: 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.apple-button:hover { background: #1f1f1f; }
.apple-button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 2px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  color: #64748b;
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid #dce4f0; }

/* Desktop sign-in confirmation (account-native.html). */
#native-confirm button { width: 100%; }
#native-confirm button.secondary { margin-top: 10px; color: #1f2937; background: white; border: 1px solid #d1d5db; }
