:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #092c2c;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-height: 100svh; background: #092c2c; }
button, input { font: inherit; }

.login-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  color: #f8f4e8;
  isolation: isolate;
}

.login-scene, .login-shade { position: fixed; inset: 0; width: 100%; height: 100%; }
.login-scene { z-index: -3; object-fit: cover; object-position: 56% center; }
.login-shade {
  z-index: -2;
  background: linear-gradient(90deg, rgba(3, 24, 25, .94) 0%, rgba(7, 43, 42, .79) 42%, rgba(6, 31, 32, .16) 76%),
              linear-gradient(0deg, rgba(2, 19, 21, .72) 0%, transparent 42%);
}

.login-back {
  position: fixed;
  z-index: 2;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(223, 238, 225, .32);
  border-radius: 50%;
  color: #f8f4e8;
  background: rgba(10, 57, 54, .48);
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.login-content {
  width: min(430px, calc(100% - 40px));
  align-self: center;
  margin: max(82px, calc(env(safe-area-inset-top) + 64px)) 0 36px clamp(42px, 8vw, 138px);
}

.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: clamp(44px, 9vh, 90px); }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(226, 193, 132, .7); border-radius: 50%; color: #f1c47f; }
.login-brand div { display: grid; gap: 2px; }
.login-brand b { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; letter-spacing: 0; }
.login-brand small { color: rgba(223, 238, 225, .64); font-size: 9px; letter-spacing: 0; }
.login-copy > span { color: #e9ba78; font-size: 12px; font-weight: 700; }
.login-copy h1 { margin: 8px 0 24px; font-family: "STKaiti", "KaiTi", serif; font-size: 36px; font-weight: 600; line-height: 1.2; letter-spacing: 0; }

.login-form {
  padding: 23px;
  border: 1px solid rgba(191, 221, 209, .25);
  border-radius: 8px;
  background: rgba(18, 71, 65, .58);
  box-shadow: 0 22px 60px rgba(0, 13, 14, .28);
  backdrop-filter: blur(18px) saturate(120%);
}
.login-form label { display: grid; gap: 7px; margin-bottom: 14px; }
.login-form label > span { color: rgba(232, 241, 232, .74); font-size: 11px; }
.login-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(205, 225, 216, .25);
  border-radius: 6px;
  outline: 0;
  color: #fffaf0;
  background: rgba(2, 34, 34, .46);
  transition: border-color .2s, background .2s;
}
.login-form input:focus { border-color: #dfaa65; background: rgba(2, 34, 34, .7); }
.login-form input::placeholder { color: rgba(218, 232, 224, .4); }
.login-error { min-height: 18px; margin: -3px 0 8px; color: #ffbaa9; font-size: 11px; }
.login-form button {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  color: #153a35;
  background: #efc07c;
  font-weight: 700;
  cursor: pointer;
}
.login-form button i { font-style: normal; font-size: 18px; }
.login-form button:disabled { cursor: wait; opacity: .72; }
.login-form button.is-loading span::after { content: "..."; }
.login-shell > footer { padding: 0 32px max(23px, env(safe-area-inset-bottom)); color: rgba(225, 238, 227, .5); font-size: 10px; }

@media (max-width: 640px) {
  .login-shell { align-items: end; }
  .login-scene { object-position: 62% 18%; }
  .login-shade { background: linear-gradient(0deg, rgba(3, 27, 28, .98) 0%, rgba(5, 45, 43, .86) 47%, rgba(4, 31, 32, .18) 82%); }
  .login-content { width: min(100% - 28px, 430px); align-self: end; margin: 0 auto max(20px, env(safe-area-inset-bottom)); }
  .login-brand { margin-bottom: clamp(72px, 22vh, 178px); }
  .login-copy h1 { margin-bottom: 18px; font-size: 30px; }
  .login-form { padding: 18px; }
  .login-shell > footer { display: none; }
}

@media (max-height: 690px) and (max-width: 640px) {
  .login-content { padding-top: 72px; }
  .login-brand { display: none; }
  .login-copy > span { display: none; }
  .login-copy h1 { margin-bottom: 13px; font-size: 25px; }
  .login-form { padding: 15px; }
  .login-form input, .login-form button { min-height: 46px; height: 46px; }
  .login-form label { margin-bottom: 10px; }
}
