:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #17211d;
  background: #f2f4f1;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: #f2f4f1; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgb(35 104 76 / 17%); outline-offset: 2px; }
[hidden] { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.login-panel {
  width: min(390px, 100%);
  padding: 34px;
  border: 1px solid #dce2de;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 55px rgb(27 43 35 / 10%);
}

.login-icon {
  width: 64px;
  height: 64px;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 7px 18px rgb(35 43 39 / 15%);
}

.login-heading { margin: 25px 0 30px; }
.login-heading h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.login-heading p { margin: 7px 0 0; color: #77807b; font-size: 12px; }

#login-form, .recovery-form { display: grid; }
#login-form label, .recovery-form label { margin-bottom: 8px; color: #52605a; font-size: 11px; font-weight: 700; }
#passcode, #recovery-code {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #cfd7d2;
  border-radius: 6px;
  outline: 0;
  background: #fafbfa;
  color: #17211d;
  font-size: 17px;
}
#passcode:focus, #recovery-code:focus { border-color: #23684c; box-shadow: 0 0 0 3px rgb(35 104 76 / 12%); }
.login-error { min-height: 18px; margin: 9px 0 0; color: #aa413f; font-size: 11px; }
#login-submit, .passkey-button, .recovery-form button {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px solid #173f32;
  border-radius: 6px;
  background: #173f32;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
#login-submit:hover, .passkey-button:hover, .recovery-form button:hover { background: #10362a; }
#login-submit:disabled, .passkey-button:disabled, .recovery-form button:disabled { cursor: wait; opacity: .65; }
#login-submit { margin-top: 11px; }
#login-submit b { font-size: 18px; font-weight: 400; }
.passkey-button { width: 100%; justify-content: center; gap: 9px; }
.passkey-button svg { width: 19px; height: 19px; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #98a09c; font-size: 10px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: #e2e7e4; }
.recovery-toggle { display: block; margin: 13px auto 0; padding: 4px; border: 0; background: transparent; color: #567067; font-size: 11px; }
.recovery-toggle:hover { color: #173f32; }
.recovery-form { margin-top: 14px; padding-top: 16px; border-top: 1px solid #e4e8e5; }
.recovery-form button { height: 40px; margin-top: 10px; justify-content: center; }
.privacy-note { display: flex; align-items: center; gap: 7px; margin: 24px 0 0; color: #87908b; font-size: 10px; }
.privacy-note span { width: 7px; height: 7px; border-radius: 50%; background: #2f7b59; }
.privacy-note b { font-weight: 500; }

.pending-panel { display: grid; justify-items: center; padding: 8px 0 2px; text-align: center; }
.pending-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: #e9f1ed; color: #23684c; }
.pending-icon svg { width: 23px; height: 23px; }
.pending-panel h2 { margin: 16px 0 6px; font-size: 16px; }
.pending-panel p { max-width: 280px; margin: 0; color: #6e7973; font-size: 11px; line-height: 1.65; }
.pending-panel small { margin-top: 8px; color: #8a938e; font-size: 9px; }
.pending-panel button { margin-top: 18px; padding: 7px 10px; border: 0; background: transparent; color: #567067; font-size: 10px; }

@media (max-width: 520px) {
  .login-shell { align-items: start; padding-top: max(13vh, env(safe-area-inset-top)); }
  .login-panel { padding: 26px 22px; box-shadow: 0 12px 35px rgb(27 43 35 / 8%); }
}
