:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  background: #071a30;
}

* { box-sizing: border-box; }

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: #071a30 url("/assets/login-winter-v1.webp?v=1") center center / cover no-repeat fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2,16,32,.28), rgba(4,20,38,.2) 42%, rgba(2,14,29,.56)),
    radial-gradient(circle at 50% 36%, rgba(22,65,103,.05), rgba(0,12,26,.25) 78%);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: auto;
  padding: 40px 0;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0,15,32,.65);
}

.login-shell .login-brand .brandmark {
  width: 74px;
  height: 74px;
  margin-bottom: 13px;
  border: 3px solid rgba(255,255,255,.92);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,18,38,.32);
}

.login-brand p { margin: 0; }
.login-brand .brand-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  color: rgba(255,255,255,.82);
}
.login-brand h1 {
  margin: 8px 0 7px;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .18em;
}
.login-brand .brand-subtitle {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  color: rgba(255,255,255,.78);
}

.login-card {
  width: 100%;
  min-width: 0;
  padding: 25px 32px 22px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px;
  background: rgba(7,28,51,.78);
  box-shadow: 0 22px 60px rgba(0,13,28,.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-heading {
  margin: 0 auto 22px;
  text-align: center;
}
.login-card small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: #b9d6f2;
}
.login-card h2 {
  margin: 7px 0 5px;
  font-size: 24px;
  font-weight: 650;
  color: #fff;
}
.login-card p {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(230,241,252,.78);
}
.login-heading p { margin: 0; }

.login-action {
  display: block;
  margin: 24px 0 16px;
  padding: 12px;
  border-radius: 7px;
  background: #3169c7;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

form {
  display: grid;
  min-width: 0;
  gap: 14px;
  margin: 0;
}
label {
  display: grid;
  min-width: 0;
  gap: 6px;
  font-size: 13px;
  color: rgba(244,249,255,.9);
}
input {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 7px;
  background: rgba(255,255,255,.93);
  font: inherit;
  color: #18314e;
  box-shadow: inset 0 1px 2px rgba(11,34,57,.08);
}
input:focus {
  outline: 3px solid rgba(136,190,255,.42);
  border-color: #8ebdff;
  background: #fff;
}

.password-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}
.password-control {
  position: relative;
  display: block;
}
.password-control input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #46627f;
  box-shadow: none;
}
.password-toggle:hover {
  background: rgba(46,103,200,.1);
  color: #234b79;
}
.password-toggle:focus-visible {
  outline: 3px solid rgba(49,105,199,.32);
  outline-offset: 0;
}
.password-eye {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.password-eye-hide { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-show { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-hide { display: block; }

button {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  background: #2e67c8;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,31,77,.24);
}
button:hover { background: #3b75d7; }
button:focus-visible {
  outline: 3px solid rgba(185,218,255,.58);
  outline-offset: 2px;
}
button:disabled {
  opacity: .6;
  cursor: wait;
}

#login-error {
  min-height: 20px;
  color: #ffd1d1;
  font-size: 12px;
}
.login-note {
  margin: 17px 0 0 !important;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 11px !important;
  text-align: center;
}
.legal-footer {
  position: relative;
  z-index: 1;
  padding: 11px 16px 18px !important;
  color: rgba(255,255,255,.72) !important;
  text-shadow: 0 2px 8px rgba(0,14,30,.7);
}

@media (max-width: 700px) {
  body {
    background-position: 58% center;
    background-attachment: scroll;
  }
  .login-shell {
    gap: 18px;
    padding: 24px 0;
  }
  .login-shell .login-brand .brandmark {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }
  .login-brand .brand-kicker {
    font-size: 9px;
    letter-spacing: 3px;
  }
  .login-brand h1 {
    margin: 6px 0;
    font-size: 32px;
  }
  .login-brand .brand-subtitle {
    font-size: 8px;
    letter-spacing: 1.4px;
  }
  .login-card {
    padding: 22px 24px 19px;
    border-radius: 14px;
  }
  .login-heading { margin-bottom: 18px; }
  .login-card h2 { font-size: 22px; }
}

@media (max-height: 760px) and (min-width: 701px) {
  .login-shell {
    gap: 15px;
    padding: 18px 0;
  }
  .login-shell .login-brand .brandmark {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
  }
  .login-brand h1 {
    margin: 5px 0;
    font-size: 34px;
  }
  .login-card { padding: 20px 30px 17px; }
  .login-heading { margin-bottom: 16px; }
  .legal-footer { padding-bottom: 10px !important; }
}
