:root {
  --lm-bg: #071827;
  --lm-bg-soft: #0d2c3e;
  --lm-card: #ffffff;
  --lm-text: #152033;
  --lm-muted: #687385;
  --lm-line: #e6ebf2;
  --lm-primary: #f97316;
  --lm-primary-dark: #ea580c;
  --lm-accent: #10a8c4;
  --lm-danger: #c2410c;
}

* {
  box-sizing: border-box;
}

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

body.unified-login {
  margin: 0;
  min-height: 100vh;
  color: var(--lm-text);
  background: var(--lm-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(460px, 0.96fr);
  background:
    radial-gradient(circle at 18% 18%, rgba(16, 168, 196, 0.2), transparent 32%),
    linear-gradient(135deg, #061522 0%, #09283a 55%, #0b3440 100%);
}

.login-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 56px 64px;
  display: flex;
  align-items: center;
}

.login-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 18, 30, 0.92) 0%, rgba(5, 18, 30, 0.72) 46%, rgba(5, 18, 30, 0.22) 100%),
    url("../image/login-bg.jpg?v=20260624150000") center right / cover no-repeat;
}

.login-hero:after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(5, 18, 30, 0.7), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  color: #fff;
}

.brand-mark {
  margin-bottom: 48px;
}

.hero-logo {
  display: block;
  width: 220px;
  height: auto;
  filter: brightness(0) invert(1);
}

.hero-kicker {
  color: #75e3f2;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-size: 48px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy {
  margin: 24px 0 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.system-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
}

.system-chip {
  position: relative;
  min-height: 22px;
  padding-left: 14px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.system-chip:before {
  content: "";
  position: absolute;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(117, 227, 242, 0.78);
}

.login-panel {
  min-height: 100vh;
  padding: 48px 7vw 48px 5.5vw;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #f4f7fb;
}

.login-card {
  width: min(100%, 460px);
  background: var(--lm-card);
  border: 1px solid rgba(14, 42, 71, 0.06);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(9, 31, 54, 0.16);
  padding: 42px;
}

.login-card-header {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-heading {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.home-link {
  flex-shrink: 0;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #344054;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.home-link:hover {
  border-color: var(--lm-accent);
  color: var(--lm-accent);
  background: #f0fbfd;
}

.login-subtitle {
  margin: 10px 0 28px;
  color: var(--lm-muted);
  line-height: 1.7;
  font-size: 14px;
}

.login-alert {
  display: none;
  margin-bottom: 18px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--lm-danger);
  border: 1px solid #fed7aa;
  font-size: 13px;
  line-height: 1.5;
}

.login-alert.is-visible {
  display: block;
}

.login-form {
  margin: 0;
}

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 46px;
  margin: 0;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--lm-text);
  background: #fff;
  font-size: 15px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-wrap input:focus {
  border-color: var(--lm-accent);
  box-shadow: 0 0 0 4px rgba(16, 168, 196, 0.12);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 72px;
  gap: 10px;
  align-items: center;
}

.captcha-img {
  width: 112px;
  height: 46px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: cover;
  cursor: pointer;
}

.refresh-captcha {
  height: 46px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  color: #475467;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.refresh-captcha:hover {
  border-color: var(--lm-accent);
  color: #08798d;
  background: #f0fbfd;
}

.login-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--lm-primary);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.24);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.login-submit:hover {
  background: var(--lm-primary-dark);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.3);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit[disabled] {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.login-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--lm-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--lm-muted);
  font-size: 12px;
  line-height: 1.6;
}

.target-hint {
  color: #08798d;
  font-weight: 700;
}

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

  .login-hero {
    min-height: auto;
    padding: 34px 28px 30px;
  }

  .login-hero:before {
    background:
      linear-gradient(90deg, rgba(5, 18, 30, 0.92), rgba(5, 18, 30, 0.62)),
      url("../image/login-bg.jpg?v=20260624150000") center / cover no-repeat;
  }

  .brand-mark {
    margin-bottom: 24px;
  }

  .hero-logo {
    width: 172px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-copy {
    font-size: 14px;
    margin-top: 14px;
  }

  .system-list {
    margin-top: 20px;
  }

  .login-panel {
    min-height: auto;
    padding: 24px;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .login-hero {
    padding: 26px 18px 24px;
  }

  .hero-title {
    font-size: 29px;
  }

  .login-panel {
    padding: 18px;
  }

  .login-card {
    padding: 26px 20px;
  }

  .captcha-row {
    grid-template-columns: 1fr 104px;
  }

  .refresh-captcha {
    grid-column: 1 / -1;
    width: 100%;
  }

  .login-meta {
    flex-direction: column;
    gap: 6px;
  }
}
