/* Login-only visual layer. Kept separate so the ERP workspace styles stay stable. */
.login-body,
.login-body * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.login-body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #e9f0f3;
  color: #15202b;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-body .login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-body .login-panel {
  display: grid;
  width: min(1120px, 100%);
  min-height: 660px;
  grid-template-columns: minmax(360px, 0.84fr) minmax(560px, 1.16fr);
  overflow: hidden;
  border: 1px solid #cfdae0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(31, 51, 64, 0.16);
  padding: 0;
}

.login-body .login-panel::before {
  display: none;
}

.login-visual {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #0b5d53;
  color: #ffffff;
  padding: 40px;
}

.login-visual::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
}

.login-visual::after {
  position: absolute;
  right: -72px;
  bottom: 62px;
  width: 230px;
  height: 164px;
  border: 28px solid rgba(245, 171, 53, 0.28);
  border-radius: 8px;
  content: "";
  transform: rotate(-8deg);
}

.login-visual-brand,
.login-visual-copy,
.login-project-map,
.login-visual-footer {
  position: relative;
  z-index: 1;
}

.login-visual-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-visual-mark,
.login-mobile-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #0b5d53;
  box-shadow: 0 12px 24px rgba(0, 34, 30, 0.2);
  font-size: 17px;
  font-weight: 900;
}

.login-visual-name {
  font-size: 21px;
  font-weight: 850;
}

.login-visual-version {
  margin-top: 3px;
  color: #bfe4dc;
  font-size: 12px;
  font-weight: 750;
}

.login-visual-copy {
  margin-top: 82px;
}

.login-visual-eyebrow {
  display: block;
  margin-bottom: 17px;
  color: #f3bd65;
  font-size: 12px;
  font-weight: 800;
}

.login-visual-copy h2 {
  margin: 0;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.25;
}

.login-visual-copy p {
  margin: 18px 0 0;
  color: #cce7e1;
  font-size: 16px;
  line-height: 1.7;
}

.login-project-map {
  display: grid;
  width: min(300px, 100%);
  grid-template-columns: 82px 44px minmax(0, 1fr);
  align-items: center;
  margin-top: auto;
  padding: 32px 0 28px;
}

.login-map-platforms {
  display: grid;
  gap: 12px;
}

.login-map-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.36);
}

.login-map-node {
  display: flex;
  min-width: 0;
  height: 54px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  padding: 8px 11px;
}

.login-map-node.is-main {
  height: 82px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: #ffffff;
  color: #0b5d53;
}

.login-map-node span {
  font-size: 14px;
  font-weight: 900;
}

.login-map-node small {
  overflow: hidden;
  color: #d5ebe6;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-map-node.is-main small {
  color: #5c7c77;
}

.login-map-node.is-wb span {
  color: #dfd0ff;
  font-size: 11px;
}

.login-visual-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 18px;
  color: #a9d4cb;
  font-size: 12px;
  font-weight: 650;
}

.login-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #ffffff;
  padding: 52px 58px 36px;
}

.login-mobile-brand {
  display: none;
}

.login-body .login-heading {
  margin: 0 0 26px;
}

.login-heading-kicker {
  display: block;
  margin-bottom: 10px;
  color: #167864;
  font-size: 13px;
  font-weight: 850;
}

.login-body .login-heading h1 {
  margin: 0 0 10px;
  color: #14202a;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.2;
}

.login-body .login-heading p {
  margin: 0;
  color: #687989;
  font-size: 15px;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 24px;
}

.login-body .form-error {
  display: flex;
  min-height: 24px;
  align-items: center;
  margin: 0 0 -10px;
  color: #c53d3d;
  font-size: 13px;
  font-weight: 700;
}

.login-body .form-error:empty {
  visibility: hidden;
}

.login-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.login-field > span:first-child {
  color: #415362;
  font-size: 13px;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  height: 58px;
  min-width: 0;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  background: #f9fbfc;
  color: #15202b;
  padding: 0 16px;
  outline: 0;
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-field input::placeholder {
  color: #97a5b1;
}

.login-field input:hover {
  border-color: #aebfc9;
}

.login-field input:focus {
  border-color: #167864;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 120, 100, 0.12);
}

.login-password-control {
  position: relative;
  display: block;
}

.login-password-control input {
  padding-right: 68px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 48px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #167864;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #e9f5f1;
  outline: 0;
}

.login-projects {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.login-projects legend {
  margin-bottom: 10px;
  color: #415362;
  font-size: 13px;
  font-weight: 800;
}

.login-body .project-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-body .project-choice {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 104px;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 13px;
  border: 1px solid #cfdae0;
  border-radius: 8px;
  background: #f7fafb;
  color: #15202b;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-body .project-choice:hover,
.login-body .project-choice:focus-visible {
  border-color: #167864;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 65, 58, 0.12);
  outline: 0;
  transform: translateY(-2px);
}

.login-body .project-choice.wb:hover,
.login-body .project-choice.wb:focus-visible {
  border-color: #7658aa;
}

.login-body .project-choice:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.login-body .project-choice.is-loading::after {
  position: absolute;
  right: 16px;
  bottom: 10px;
  color: #687989;
  content: "正在登录";
  font-size: 10px;
  font-weight: 700;
}

.login-body .project-choice-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: #146fa1;
  color: #ffffff;
  box-shadow: 0 9px 18px rgba(20, 111, 161, 0.2);
  font-size: 14px;
  font-weight: 900;
}

.login-body .project-choice.wb .project-choice-mark {
  width: 88px;
  background: #6f50a4;
  box-shadow: 0 9px 18px rgba(111, 80, 164, 0.2);
  font-size: 10px;
}

.login-body .project-choice.wb {
  grid-template-columns: 88px minmax(0, 1fr) 28px;
}

.project-choice-copy {
  min-width: 0;
}

.login-body .project-choice strong,
.login-body .project-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-body .project-choice strong {
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
}

.login-body .project-choice small {
  margin-top: 6px;
  color: #718191;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.project-choice-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e5eef3;
  color: #315366;
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.project-choice:hover .project-choice-arrow,
.project-choice:focus-visible .project-choice-arrow {
  background: #167864;
  color: #ffffff;
  transform: translateX(2px);
}

.project-choice.wb:hover .project-choice-arrow,
.project-choice.wb:focus-visible .project-choice-arrow {
  background: #6f50a4;
}

.login-content-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #e3eaee;
  color: #7b8995;
  padding-top: 24px;
  font-size: 12px;
  font-weight: 650;
}

.login-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #26936e;
  box-shadow: 0 0 0 4px #e3f4ed;
}

@media (max-width: 940px) {
  .login-body .login-panel {
    grid-template-columns: minmax(300px, 0.72fr) minmax(500px, 1.28fr);
  }

  .login-visual {
    padding: 34px 30px;
  }

  .login-content {
    padding: 46px 38px 32px;
  }
}

@media (max-width: 820px) {
  .login-body .login-shell {
    padding: 18px;
  }

  .login-body .login-panel {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 190px;
    padding: 28px 32px;
  }

  .login-visual-copy {
    margin-top: 34px;
  }

  .login-visual-copy h2 {
    font-size: 31px;
  }

  .login-project-map,
  .login-visual-footer {
    display: none;
  }

  .login-content {
    padding: 36px 32px 30px;
  }
}

@media (max-width: 600px) {
  .login-body .login-shell {
    display: block;
    padding: 0;
  }

  .login-body .login-panel {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-visual {
    display: none;
  }

  .login-content {
    min-height: 100vh;
    padding: 28px 20px 24px;
  }

  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 54px;
  }

  .login-mobile-mark {
    width: 42px;
    height: 42px;
    background: #0b5d53;
    color: #ffffff;
    box-shadow: none;
    font-size: 13px;
  }

  .login-mobile-brand strong {
    font-size: 16px;
  }

  .login-mobile-brand span {
    margin-left: auto;
    border: 1px solid #cfe3dc;
    border-radius: 999px;
    background: #eff8f5;
    color: #167864;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 800;
  }

  .login-body .login-heading h1 {
    font-size: 32px;
  }

  .login-fields,
  .login-body .project-choice-grid {
    grid-template-columns: 1fr;
  }

  .login-body .project-choice {
    min-height: 90px;
  }

  .login-content-footer {
    margin-top: 42px;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  .login-body .login-panel {
    min-height: 610px;
  }

  .login-visual-copy {
    margin-top: 50px;
  }

  .login-content {
    padding-top: 36px;
    padding-bottom: 28px;
  }

  .login-body .login-heading {
    margin-bottom: 18px;
  }

  .login-form {
    gap: 17px;
  }

  .login-field input {
    height: 52px;
  }

  .login-body .project-choice {
    min-height: 88px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-body *,
  .login-body *::before,
  .login-body *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
