:root {
  --login-bg: #040912;
  --login-bg-soft: #0a111d;
  --login-surface: rgba(10, 18, 30, 0.88);
  --login-line: rgba(112, 196, 255, 0.14);
  --login-line-strong: rgba(112, 196, 255, 0.28);
  --login-text: #edf6ff;
  --login-muted: rgba(190, 209, 226, 0.64);
  --login-accent: #7ad2ff;
  --login-accent-soft: rgba(122, 210, 255, 0.12);
  --login-shadow: 0 26px 70px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html,
body.login-page {
  min-height: 100%;
}

body.login-page {
  margin: 0;
  color: var(--login-text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 20%, rgba(51, 118, 194, 0.18), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(122, 210, 255, 0.08), transparent 18%),
    linear-gradient(145deg, #02060d 0%, #08111c 46%, #030812 100%);
  overflow: hidden;
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(122, 210, 255, 0.028) 10% 10.06%, transparent 10.06% 20%),
    linear-gradient(0deg, transparent 0 10%, rgba(122, 210, 255, 0.022) 10% 10.06%, transparent 10.06% 20%);
  background-size: 180px 180px;
  opacity: 0.78;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 44px;
  align-items: center;
  padding: 36px 48px;
}

.login-hero {
  display: grid;
  gap: 18px;
  align-content: center;
  max-width: 760px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--login-line);
  background: rgba(10, 18, 30, 0.54);
  color: var(--login-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-title {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -1px;
  max-width: none;
  white-space: nowrap;
}

.login-lead {
  margin: 0;
  max-width: 480px;
  color: var(--login-muted);
  font-size: 15px;
  line-height: 1.75;
}

.login-stage {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  margin-top: 10px;
  border-radius: 28px;
  border: 1px solid var(--login-line);
  background:
    linear-gradient(180deg, rgba(7, 14, 24, 0.86), rgba(4, 10, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    var(--login-shadow);
}

.login-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.018), transparent 26%, transparent 74%, rgba(255,255,255,0.012));
  pointer-events: none;
}

.login-stage-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(122,210,255,0.03) 12% 12.08%, transparent 12.08% 24%),
    linear-gradient(0deg, transparent 0 12%, rgba(122,210,255,0.022) 12% 12.08%, transparent 12.08% 24%);
  background-size: 140px 140px;
}

.login-stage-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122,210,255,0.14), transparent 66%);
  filter: blur(22px);
}

.login-stage-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.stage-center-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(122, 210, 255, 0.14);
}

.stage-center-ring.ring-a {
  width: 214px;
  height: 214px;
}

.stage-center-ring.ring-b {
  width: 156px;
  height: 156px;
}

.stage-center-ring.ring-c {
  width: 104px;
  height: 104px;
}

.stage-center-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 1px solid var(--login-line-strong);
  background:
    radial-gradient(circle at 50% 38%, rgba(19, 45, 76, 0.96), rgba(4, 10, 19, 0.98));
  color: #f5fbff;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 3px;
  box-shadow:
    0 0 24px rgba(122, 210, 255, 0.08),
    inset 0 0 24px rgba(122, 210, 255, 0.04);
}

.login-stage-lines {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 10px;
  width: 156px;
}

.login-stage-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122,210,255,0.0), rgba(122,210,255,0.82), rgba(122,210,255,0.0));
}

.login-stage-lines span:nth-child(1) { width: 100%; }
.login-stage-lines span:nth-child(2) { width: 72%; }
.login-stage-lines span:nth-child(3) { width: 88%; }

.login-panel {
  position: relative;
}

.login-panel-shell {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 24px;
  border-radius: 28px;
  border: 1px solid var(--login-line);
  background:
    linear-gradient(180deg, rgba(7, 14, 24, 0.96), rgba(8, 16, 27, 0.88));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    var(--login-shadow);
  backdrop-filter: blur(14px);
}

.login-panel-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(122,210,255,0.08), transparent 24%);
  pointer-events: none;
}

.login-panel-shell::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(122,210,255,0.26), rgba(122,210,255,0.04), transparent);
  pointer-events: none;
}

.login-panel-topline {
  width: 78px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--login-accent), rgba(122,210,255,0.32));
  margin-bottom: 22px;
  box-shadow: 0 0 18px rgba(122, 210, 255, 0.22);
}

.login-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.login-panel-kicker {
  color: var(--login-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-panel-head h2 {
  margin: 8px 0 0;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.4px;
}

.login-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--login-line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--login-accent);
  font-size: 12px;
  font-weight: 700;
}

.login-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

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

.login-field span,
.remember-row {
  color: var(--login-muted);
  font-size: 14px;
}

.login-field input {
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(122, 210, 255, 0.12);
  border-radius: 16px;
  background: rgba(2, 8, 16, 0.72);
  color: var(--login-text);
  font-size: 15px;
  outline: none;
  caret-color: var(--login-accent);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-field input::placeholder {
  color: rgba(190, 209, 226, 0.32);
}

.login-field input:hover {
  border-color: rgba(122, 210, 255, 0.20);
  background: rgba(3, 10, 18, 0.84);
}

.login-field input:focus {
  border-color: rgba(122, 210, 255, 0.40);
  box-shadow: 0 0 0 4px rgba(122, 210, 255, 0.08);
}

.login-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember-row input {
  accent-color: #63bfff;
}

.login-btn {
  position: relative;
  overflow: hidden;
  height: 54px;
  border: 0;
  border-radius: 16px;
  color: #f5fbff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.2px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(103, 187, 255, 0.96), rgba(86, 145, 220, 0.94));
  box-shadow: 0 18px 34px rgba(31, 86, 152, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.login-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 44%);
  pointer-events: none;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(31, 86, 152, 0.28);
}

.login-btn:disabled {
  cursor: wait;
  opacity: 0.82;
}

.login-error {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 118, 118, 0.14);
  background: rgba(69, 17, 23, 0.74);
  color: #ffd8d8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 28px 20px 34px;
  }

  .login-hero {
    max-width: none;
  }

  .login-title,
  .login-lead {
    max-width: none;
  }

  .login-panel {
    width: min(100%, 460px);
    justify-self: center;
  }
}

@media (max-width: 720px) {
  body.login-page {
    overflow: auto;
  }

  .login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: calc(22px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  }

  .login-hero {
    gap: 8px;
  }

  .login-kicker {
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 1.4px;
  }

  .login-title {
    font-size: 28px;
    white-space: normal;
  }

  .login-lead {
    font-size: 12px;
    line-height: 1.5;
  }

  .login-stage {
    display: none;
  }

  .login-panel {
    width: 100%;
  }

  .login-panel-shell {
    padding: 20px 18px 18px;
    border-radius: 8px;
  }

  .login-panel-topline {
    width: 56px;
    height: 3px;
    margin-bottom: 14px;
  }

  .login-panel-head {
    margin-bottom: 18px;
  }

  .login-panel-kicker {
    font-size: 9px;
    letter-spacing: 1.4px;
  }

  .login-panel-head h2 {
    margin-top: 5px;
    font-size: 24px;
  }

  .login-panel-badge {
    width: 32px;
    height: 32px;
  }

  .login-form {
    gap: 14px;
  }

  .login-field {
    gap: 6px;
  }

  .login-field span,
  .remember-row {
    font-size: 12px;
  }

  .login-field input,
  .login-btn {
    height: 48px;
    border-radius: 6px;
  }

  .login-error {
    border-radius: 6px;
    font-size: 12px;
  }
}
