:root {
  --brand-blue: #0754c9;
  --brand-blue-deep: #0348bd;
  --panel-blue: #2639bb;
  --button-blue: #2096f4;
  --phone-blue: #4d76c6;
  --wechat-green: #70ba84;
  --text: #333333;
  --muted: #8a8a8a;
  --line: #dcdcdc;
  --error: #e04d4f;
  --success: #20a87b;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 44px 70px;
}

.bg-piece {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.bg-left-top {
  top: -18px;
  left: 0;
  width: 264px;
}

.bg-left-mid {
  top: 0;
  left: 0;
  width: 262px;
  height: 100vh;
  object-fit: cover;
}

.bg-left-bottom {
  left: 0;
  bottom: -18px;
  width: 265px;
}

.bg-right-top {
  right: 0;
  top: 198px;
  width: 205px;
}

.bg-right-bottom {
  right: 0;
  bottom: 0;
  width: 338px;
  height: 78vh;
  object-fit: cover;
  object-position: bottom right;
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(1312px, calc(100vw - 88px));
  height: 600px;
  display: grid;
  grid-template-columns: 1fr 660px;
  background: var(--white);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 32px 70px rgba(0, 25, 95, 0.18);
}

.promo-panel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(68, 94, 225, 0.24), rgba(18, 36, 174, 0.08)),
    #253abb;
}

.promo-panel::before,
.promo-panel::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 120px;
  background: rgba(95, 124, 255, 0.13);
  transform: rotate(30deg);
  border-radius: 40px;
}

.promo-panel::before {
  top: 24px;
  left: -90px;
}

.promo-panel::after {
  top: 40px;
  right: -48px;
}

.promo-copy {
  position: absolute;
  z-index: 3;
  top: 42px;
  left: 102px;
}

.promo-copy h1 {
  margin: 0;
  color: #eef5ff;
  font-size: 29px;
  line-height: 1.45;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 20, 90, 0.18);
}

.tech-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 470px;
}

.grid-floor {
  position: absolute;
  inset: 100px 0 0 0;
  background:
    linear-gradient(31deg, transparent 0 48%, rgba(84, 119, 255, 0.26) 49%, transparent 50%) 0 0 / 150px 96px,
    linear-gradient(149deg, transparent 0 48%, rgba(84, 119, 255, 0.2) 49%, transparent 50%) 0 0 / 150px 96px;
  transform: skewY(-29deg) scaleY(0.82);
  transform-origin: bottom left;
  opacity: 0.72;
}

.tower {
  position: absolute;
  left: 310px;
  top: 112px;
  width: 158px;
  height: 196px;
  border-radius: 50% 50% 22px 22px / 16% 16% 22px 22px;
  background: linear-gradient(180deg, rgba(31, 209, 226, 0.38), rgba(31, 209, 226, 0.1));
  border: 2px solid rgba(53, 229, 255, 0.3);
  box-shadow: 0 34px 70px rgba(0, 235, 255, 0.22), inset 0 0 38px rgba(39, 228, 246, 0.25);
}

.tower::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 14px;
  right: 14px;
  height: 38px;
  border: 2px solid rgba(77, 229, 255, 0.35);
  border-radius: 50%;
}

.tower span {
  position: absolute;
  display: block;
  background: rgba(60, 233, 229, 0.72);
}

.tower span:nth-child(1) {
  left: 46px;
  top: 75px;
  width: 34px;
  height: 72px;
  border-radius: 6px;
}

.tower span:nth-child(2) {
  right: 36px;
  top: 98px;
  width: 12px;
  height: 40px;
}

.tower span:nth-child(3) {
  right: 56px;
  top: 112px;
  width: 12px;
  height: 26px;
}

.platform {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at center, #30e2f1 0 34%, #1b9df0 35% 62%, #0c61d4 63% 100%);
  box-shadow: 0 18px 38px rgba(0, 40, 160, 0.35);
}

.platform-main {
  left: 292px;
  top: 244px;
  width: 170px;
  height: 82px;
}

.platform-left {
  left: 176px;
  top: 354px;
  width: 86px;
  height: 42px;
}

.platform-right {
  right: 118px;
  top: 188px;
  width: 76px;
  height: 38px;
}

.device {
  position: absolute;
  width: 52px;
  height: 42px;
  background: linear-gradient(135deg, #22d8ef, #0b7edc);
  box-shadow: 0 12px 26px rgba(0, 40, 120, 0.35);
  transform: skewY(25deg) rotate(-24deg);
  border-radius: 6px;
}

.device-a {
  left: 218px;
  top: 178px;
}

.device-b {
  left: 420px;
  top: 390px;
}

.beam {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, transparent, #35f1da, transparent);
  transform: rotate(31deg);
  opacity: 0.95;
}

.beam-a {
  left: 255px;
  top: 226px;
  width: 112px;
}

.beam-b {
  left: 452px;
  top: 348px;
  width: 126px;
}

.form-panel {
  height: 600px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 40px;
}

.login-card {
  width: 352px;
}

.logo {
  display: block;
  width: 136px;
  height: auto;
  margin: 0 auto 38px;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 24px;
}

.title-row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.title-row span {
  color: #929292;
  font-size: 16px;
}

.field-label {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  color: #555;
}

.input-wrap {
  position: relative;
  height: 34px;
  margin-bottom: 18px;
}

.input-wrap input {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 42px 0 12px;
  color: #333;
  outline: none;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-wrap input::placeholder {
  color: #b9b9b9;
}

.input-wrap input:focus {
  border-color: #2498f2;
  box-shadow: 0 0 0 2px rgba(36, 152, 242, 0.11);
}

.input-wrap > img {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  opacity: 0.46;
}

.icon-btn {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b8b8b8;
  transform: translateY(-50%);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-visible .slash {
  display: none;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin: -6px 0 10px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #777;
  font-size: 13px;
}

.remember input {
  width: 14px;
  height: 14px;
}

.link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #1394ff;
  font-size: 13px;
}

.message {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--error);
  font-size: 13px;
  line-height: 18px;
}

.message.success {
  color: var(--success);
}

.primary-btn {
  position: relative;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--button-blue);
  font-size: 14px;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.primary-btn:hover {
  background: #168ce8;
}

.primary-btn:active {
  transform: translateY(1px);
}

.primary-btn.loading {
  opacity: 0.78;
  cursor: wait;
}

.spinner {
  display: none;
  position: absolute;
  left: calc(50% - 42px);
  top: 9px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.primary-btn.loading .spinner {
  display: block;
}

.primary-btn.loading .btn-text {
  padding-left: 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.divider {
  margin: 34px 0 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.alt-actions {
  display: grid;
  gap: 12px;
}

.phone-btn,
.wechat-btn {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
}

.phone-btn {
  background: var(--phone-blue);
}

.wechat-btn {
  background: var(--wechat-green);
}

.phone-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.wechat-btn img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.register-row {
  margin-top: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.auth-details {
  margin-top: 12px;
  border-top: 1px solid #ececec;
  padding-top: 14px;
  color: #777;
  font-size: 12px;
}

.auth-details summary {
  color: #666;
  cursor: pointer;
}

.auth-box {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.auth-box input {
  width: 100%;
  font-size: 12px;
}

.auth-box p {
  margin: 0;
  line-height: 1.5;
}

.copyright {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  color: #fff;
  font-size: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px 1fr;
  background: #f3f5f8;
}

.sidebar {
  background: #18233a;
  color: #d9e3f0;
  padding: 22px 14px;
}

.side-logo {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 22px;
}

.side-logo img {
  width: 112px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0 14px;
}

.sidebar button.active,
.sidebar button:hover {
  background: #208ef0;
  color: #fff;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid #e7ebf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.app-topbar strong,
.app-topbar span {
  display: block;
}

.app-topbar span {
  margin-top: 4px;
  color: #6d7480;
  font-size: 13px;
}

.app-topbar button {
  border: 1px solid #d7dce4;
  background: #fff;
  height: 34px;
  border-radius: 4px;
  padding: 0 14px;
}

.welcome-card {
  margin: 22px;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(24, 35, 58, 0.05);
}

.welcome-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.welcome-card p {
  margin: 0;
  color: #657282;
}

@media (max-width: 1120px) {
  .login-shell {
    grid-template-columns: 1fr 560px;
  }

  .promo-copy {
    left: 58px;
  }
}

@media (max-width: 900px) {
  .login-page {
    padding: 28px 18px 58px;
  }

  .login-shell {
    width: min(540px, calc(100vw - 36px));
    grid-template-columns: 1fr;
    height: auto;
  }

  .promo-panel {
    display: none;
  }

  .form-panel {
    min-height: 610px;
    height: auto;
  }

  .bg-right-bottom {
    width: 230px;
  }

  .copyright {
    font-size: 12px;
    padding: 0 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 460px) {
  .form-panel {
    padding: 28px 22px;
  }

  .login-card {
    width: 100%;
  }

  .logo {
    margin-bottom: 34px;
  }
}
