*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #050708;
  --surface: #0b1112;
  --surface-raised: #10191a;
  --line: rgba(123, 153, 150, 0.22);
  --line-strong: rgba(91, 222, 211, 0.48);
  --text: #edf7f4;
  --muted: #81918f;
  --cyan: #38e8dd;
  --lime: #a6ff6f;
  --amber: #ffbd52;
  --danger: #ff6b6b;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body.login-page {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg) !important;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
img {
  -webkit-tap-highlight-color: transparent;
}

.login-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(8, 13, 14, 0.18) 0%, rgba(5, 7, 8, 0.88) 67%),
    radial-gradient(circle at 18% 45%, rgba(25, 111, 106, 0.17), transparent 30%),
    #050708;
}

.perspective-grid {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -42%;
  height: 84%;
  opacity: 0.28;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(56, 232, 221, 0.19) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 232, 221, 0.19) 1px, transparent 1px);
  background-size: 58px 42px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 100%);
}

.noise-field {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.012) 4px),
    linear-gradient(90deg, transparent 49.9%, rgba(56, 232, 221, 0.06) 50%, transparent 50.1%);
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(56, 232, 221, 0.16);
  box-shadow: 0 0 18px rgba(56, 232, 221, 0.18);
  animation: scan 9s linear infinite;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(430px, 1fr) minmax(400px, 520px);
  width: min(1320px, calc(100% - 64px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.system-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  padding: 52px 48px 42px 12px;
  overflow: hidden;
}

.brand-lockup,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 5px);
  align-items: end;
  gap: 3px;
  width: 31px;
  height: 31px;
  padding: 6px;
  border: 1px solid rgba(56, 232, 221, 0.58);
  background: rgba(56, 232, 221, 0.05);
  box-shadow: inset 0 0 12px rgba(56, 232, 221, 0.08);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-color: var(--lime);
}

.brand-mark::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.brand-mark::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.brand-mark i {
  display: block;
  width: 5px;
  background: var(--cyan);
}

.brand-mark i:nth-child(1) { height: 8px; opacity: 0.55; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 12px; opacity: 0.78; }

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 700;
  color: #f6fffc;
}

.brand-copy small {
  font-size: 9px;
  color: #61716f;
}

.system-copy {
  position: relative;
  z-index: 2;
  margin-top: 12vh;
}

.online-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--lime);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.online-status span {
  width: 6px;
  height: 6px;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(166, 255, 111, 0.8);
  animation: pulse 2s ease-in-out infinite;
}

.system-copy h1 {
  margin: 0;
  max-width: 540px;
  color: #eff9f6;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.18;
  font-weight: 650;
}

.system-copy p {
  margin: 22px 0 0;
  color: #788986;
  font-size: 14px;
}

.radar-visual {
  position: absolute;
  right: 7%;
  bottom: 5%;
  width: min(34vw, 460px);
  aspect-ratio: 1;
  opacity: 0.7;
  border: 1px solid rgba(56, 232, 221, 0.08);
  transform: translate(8%, 8%);
}

.radar-visual::before,
.radar-visual::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(166, 255, 111, 0.62);
}

.radar-visual::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.radar-visual::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(56, 232, 221, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one { width: 82%; height: 82%; border-style: dashed; animation: rotate 24s linear infinite; }
.ring-two { width: 56%; height: 56%; border-color: rgba(166, 255, 111, 0.2); }
.ring-three { width: 31%; height: 31%; border-style: dashed; animation: rotate-reverse 14s linear infinite; }

.radar-axis {
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(56, 232, 221, 0.12);
  transform: translate(-50%, -50%);
}

.axis-x { width: 90%; height: 1px; }
.axis-y { width: 1px; height: 90%; }

.radar-sweep {
  position: absolute;
  top: 9%;
  left: 50%;
  width: 41%;
  height: 41%;
  overflow: hidden;
  transform-origin: left bottom;
  animation: sweep 6s linear infinite;
}

.radar-sweep::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(56, 232, 221, 0.62);
  background: linear-gradient(135deg, transparent 48%, rgba(56, 232, 221, 0.14));
}

.radar-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(56, 232, 221, 0.56);
  background: rgba(7, 18, 18, 0.94);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 25px rgba(56, 232, 221, 0.1), inset 0 0 25px rgba(56, 232, 221, 0.06);
}

.radar-core span,
.radar-core small {
  transform: rotate(-45deg);
  font-family: Consolas, "Courier New", monospace;
}

.radar-core span { color: var(--cyan); font-size: 18px; }
.radar-core small { margin-top: -2px; color: #69807c; font-size: 8px; }

.signal-point {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 189, 82, 0.9);
  animation: signal 2.4s ease-in-out infinite;
}

.point-one { top: 24%; left: 38%; }
.point-two { top: 56%; right: 17%; animation-delay: -0.8s; }
.point-three { bottom: 18%; left: 33%; animation-delay: -1.6s; }

.telemetry {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 130px));
  gap: 1px;
  margin-top: auto;
}

.telemetry div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 57px;
  padding: 11px 13px;
  border-left: 1px solid rgba(56, 232, 221, 0.25);
  background: rgba(8, 14, 15, 0.68);
}

.telemetry span {
  color: #586966;
  font-family: Consolas, "Courier New", monospace;
  font-size: 8px;
}

.telemetry strong {
  color: #a5b7b3;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 500;
}

.auth-panel {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: 470px;
  margin: 44px 0 44px auto;
  padding: 54px 52px 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 17, 18, 0.93);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 52px;
  width: 82px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 15px rgba(56, 232, 221, 0.72);
}

.auth-frame i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(56, 232, 221, 0.72);
}

.auth-frame i:nth-child(1) { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; }
.auth-frame i:nth-child(2) { top: 8px; right: 8px; border-top: 1px solid; border-right: 1px solid; }
.auth-frame i:nth-child(3) { right: 8px; bottom: 8px; border-right: 1px solid; border-bottom: 1px solid; }
.auth-frame i:nth-child(4) { bottom: 8px; left: 8px; border-bottom: 1px solid; border-left: 1px solid; }

.mobile-brand {
  display: none;
}

.auth-header {
  margin-bottom: 34px;
}

.section-index {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 19px;
  color: #61716f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.section-index span {
  color: var(--cyan);
}

.section-index::after {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(56, 232, 221, 0.26);
}

.auth-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 650;
}

.auth-header p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.new-login-form {
  display: block;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #aebdba;
  font-size: 12px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border: 1px solid rgba(117, 143, 140, 0.28);
  border-radius: 4px;
  background: rgba(4, 8, 9, 0.65);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(56, 232, 221, 0.4);
  border-bottom: 1px solid rgba(56, 232, 221, 0.4);
}

.input-shell:focus-within {
  border-color: var(--line-strong);
  background: rgba(7, 14, 14, 0.92);
  box-shadow: 0 0 0 3px rgba(56, 232, 221, 0.07), inset 3px 0 0 rgba(56, 232, 221, 0.82);
}

.input-icon {
  display: grid;
  flex: 0 0 45px;
  height: 100%;
  place-items: center;
  color: #5f716e;
  transition: color 160ms ease;
}

.input-shell:focus-within .input-icon {
  color: var(--cyan);
}

.input-icon svg,
.field-action svg,
.login-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-shell input {
  display: block;
  flex: 1 1 auto;
  width: 0;
  height: 48px;
  padding: 0 10px 0 0;
  border: 0;
  outline: 0;
  color: #edf7f4;
  background: transparent;
  font-size: 14px;
  caret-color: var(--cyan);
}

.input-shell input::placeholder {
  color: #465451;
  opacity: 1;
}

.input-shell input:-webkit-autofill,
.input-shell input:-webkit-autofill:hover,
.input-shell input:-webkit-autofill:focus {
  -webkit-text-fill-color: #edf7f4;
  box-shadow: 0 0 0 1000px #07100f inset;
  transition: background-color 5000s ease-in-out 0s;
}

.field-code {
  flex: 0 0 auto;
  margin-right: 15px;
  color: #40504d;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
}

.field-action {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  place-items: center;
  color: #657572;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease;
}

.field-action:hover,
.field-action:focus-visible {
  color: var(--cyan);
}

.field-action .eye-closed,
.field-action.is-visible .eye-open {
  display: none;
}

.field-action.is-visible .eye-closed {
  display: block;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
}

.captcha-control {
  position: relative;
  display: block;
  width: 128px;
  height: 50px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(117, 143, 140, 0.28);
  border-radius: 4px;
  outline: 0;
  background: #d8e2df;
  cursor: pointer;
}

.captcha-control:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 232, 221, 0.12);
}

.captcha-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-control:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 232, 221, 0.08);
}

.login-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  margin-top: 9px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid #59f2e8;
  border-radius: 4px;
  outline: 0;
  color: #031010;
  background: var(--cyan);
  box-shadow: 0 9px 28px rgba(56, 232, 221, 0.14);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -36%;
  width: 24%;
  background: rgba(255, 255, 255, 0.24);
  transform: skewX(-22deg);
  transition: left 360ms ease;
}

.login-btn:hover:not(:disabled) {
  background: #6ff5ec;
  box-shadow: 0 12px 34px rgba(56, 232, 221, 0.23);
  transform: translateY(-1px);
}

.login-btn:hover:not(:disabled)::before {
  left: 116%;
}

.login-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 232, 221, 0.18), 0 12px 34px rgba(56, 232, 221, 0.23);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-btn:disabled {
  cursor: wait;
  opacity: 0.76;
}

.login-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.login-btn:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.btn-loader {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(3, 16, 16, 0.25);
  border-top-color: #031010;
  border-radius: 50%;
  animation: rotate 700ms linear infinite;
}

.login-btn.is-loading .btn-loader { display: block; }
.login-btn.is-loading > svg { display: none; }

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(117, 143, 140, 0.14);
  color: #4d5c59;
  font-family: Consolas, "Courier New", monospace;
  font-size: 8px;
}

.auth-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-footer span i {
  width: 5px;
  height: 5px;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(166, 255, 111, 0.65);
}

.auth-footer small {
  font: inherit;
}

.login-page .layui-layer.login-toast {
  border: 1px solid rgba(56, 232, 221, 0.46);
  border-radius: 4px;
  color: #edf7f4;
  background: rgba(11, 23, 23, 0.98);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.46), inset 3px 0 0 var(--cyan);
}

.login-page .layui-layer.login-toast .layui-layer-content {
  color: #edf7f4;
  font-size: 14px;
}

@keyframes scan {
  from { top: -2%; }
  to { top: 102%; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes rotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate-reverse {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

@keyframes signal {
  0%, 100% { opacity: 0.32; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 1050px) {
  .login-shell {
    grid-template-columns: minmax(330px, 1fr) minmax(390px, 450px);
    width: min(980px, calc(100% - 40px));
  }

  .system-panel {
    padding-right: 28px;
  }

  .system-copy h1 {
    font-size: 40px;
  }

  .radar-visual {
    width: 390px;
    right: 1%;
  }

  .auth-panel {
    padding-right: 40px;
    padding-left: 40px;
  }
}

@media (max-width: 780px) {
  .login-shell {
    display: flex;
    align-items: center;
    width: min(100% - 32px, 470px);
    padding: 28px 0;
  }

  .system-panel {
    display: none;
  }

  .login-background {
    background:
      linear-gradient(150deg, rgba(5, 7, 8, 0.42), rgba(5, 7, 8, 0.94)),
      radial-gradient(circle at 18% 15%, rgba(25, 111, 106, 0.18), transparent 35%),
      #050708;
  }

  .perspective-grid {
    bottom: -12%;
    height: 65%;
  }

  .auth-panel {
    margin: 0;
    padding: 38px 30px 26px;
  }

  .mobile-brand {
    display: flex;
    margin-bottom: 40px;
  }

  .mobile-brand strong {
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  .login-shell {
    width: calc(100% - 20px);
    padding: 10px 0;
  }

  .auth-panel {
    padding: 30px 20px 22px;
  }

  .auth-panel::before {
    left: 20px;
  }

  .mobile-brand {
    margin-bottom: 32px;
  }

  .auth-header {
    margin-bottom: 28px;
  }

  .auth-header h2 {
    font-size: 25px;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .captcha-control {
    width: 112px;
  }

  .auth-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-height: 720px) and (min-width: 781px) {
  .login-shell {
    min-height: 720px;
  }

  .auth-panel {
    margin-top: 24px;
    margin-bottom: 24px;
    padding-top: 38px;
    padding-bottom: 24px;
  }

  .auth-header {
    margin-bottom: 26px;
  }

  .form-field {
    margin-bottom: 16px;
  }

  .auth-footer {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
