:root {
  --ink: #172d3d;
  --muted: #71828b;
  --line: #dce2df;
  --paper: #f4f1e9;
  --primary: #245d82;
  --primary-deep: #173f5d;
  --copper: #c78c45;
  --green: #2c8069;
  --red: #bd5149;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(36, 93, 130, 0.2);
  outline-offset: 2px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(460px, 1.16fr) minmax(420px, 0.84fr);
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 32px 46px 28px;
  overflow: hidden;
  color: #eaf4f7;
  background:
    linear-gradient(110deg, rgba(14, 41, 57, 0.96), rgba(16, 47, 65, 0.82) 58%, rgba(18, 50, 67, 0.58)),
    url("/images/enterprise-building.jpg") center / cover no-repeat;
}

.login-visual::before {
  position: absolute;
  top: 8%;
  right: -160px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(255, 255, 255, 0.022),
    0 0 0 114px rgba(255, 255, 255, 0.016);
}

.login-visual::after {
  position: absolute;
  right: 12%;
  bottom: 5%;
  width: 1px;
  height: 220px;
  content: "";
  background: linear-gradient(transparent, rgba(205, 162, 88, 0.6), transparent);
  transform: rotate(32deg);
}

.visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.visual-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #8dd4c0;
}

.visual-logo svg {
  width: 100%;
}

.visual-brand-copy {
  display: flex;
  flex-direction: column;
}

.visual-brand-copy strong {
  color: #f5fbf9;
  font-size: 25px;
  letter-spacing: 0.1em;
}

.visual-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: auto 0 34px;
}

.visual-content h1 {
  margin: 18px 0 14px;
  color: #f8fcfb;
  font-size: clamp(34px, 3.5vw, 54px);
  line-height: 1.35;
  letter-spacing: -0.045em;
}

.visual-content > p {
  max-width: 620px;
  margin: 0;
  color: #b0c5c6;
  font-size: 16px;
  line-height: 1.95;
}

.visual-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.visual-pills span {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  color: #c0d2d4;
  background: rgba(255, 255, 255, 0.045);
  font-size: 14px;
}

.visual-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 660px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.visual-metrics > div {
  padding: 19px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.visual-metrics > div:first-child {
  padding-left: 0;
}

.visual-metrics > div:last-child {
  border-right: 0;
}

.visual-metrics small {
  display: block;
  color: #86a8a0;
  font-size: 14px;
}

.visual-metrics strong {
  display: block;
  margin-top: 3px;
  color: #f3faf8;
  font-size: 28px;
  line-height: 1.3;
}

.visual-metrics em {
  margin-left: 3px;
  color: #9eb5b2;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
}

.visual-metrics span {
  display: block;
  color: #819f99;
  font-size: 14px;
}

.visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  color: #819d97;
  font-size: 14px;
}

.visual-footer small {
  font-size: 14px;
}

.login-panel {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 38px 48px;
  background:
    radial-gradient(circle at 100% 0, rgba(191, 141, 67, 0.08), transparent 27%),
    linear-gradient(180deg, #f8f6f0, #f3f1ea);
}

.login-card {
  width: min(100%, 440px);
}

.login-header h2 {
  margin: 0;
  color: #162f40;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.login-header p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-notice {
  display: none;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid #e9d8b9;
  border-radius: 9px;
  color: #8a6326;
  background: #fff8ea;
  font-size: 14px;
  line-height: 1.65;
}

.login-notice.show {
  display: block;
}

.login-notice.error {
  border-color: #efd2cf;
  color: #a9443d;
  background: #fff4f2;
}

.login-notice.success {
  border-color: #cce3da;
  color: #2e735f;
  background: #f0f9f5;
}

.login-field {
  margin-top: 19px;
}

.login-field > label,
.captcha-label-row label {
  display: block;
  margin-bottom: 7px;
  color: #52646d;
  font-size: 14px;
  font-weight: 550;
}

.input-shell {
  position: relative;
}

.input-shell input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  border: 1px solid #d8dfdc;
  border-radius: 10px;
  color: #213641;
  background: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  transition: 0.18s ease;
}

.input-shell input::placeholder {
  color: #a5afac;
}

.input-shell input:hover {
  border-color: #c3cec9;
}

.input-shell input:focus {
  border-color: #8fb8a9;
  background: #fff;
  outline: 3px solid rgba(36, 93, 130, 0.08);
}

.login-field.has-error .input-shell input {
  border-color: #d8867e;
  background: #fffafa;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #86969a;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #85949a;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #f1f5f3;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.field-error {
  min-height: 0;
  margin: 0;
  color: var(--red);
  font-size: 14px;
  line-height: 1.55;
}

.field-error:not(:empty) {
  min-height: 22px;
  margin-top: 5px;
}

.captcha-field {
  margin-top: 4px;
}

.captcha-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-label-row label {
  margin: 0;
  margin-right: auto;
}

.captcha-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.captcha-refresh svg {
  width: 16px;
  height: 16px;
}

.captcha-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid #cfd9d5;
  border-radius: 11px;
  background: #183c49;
  box-shadow: 0 8px 20px rgba(24, 55, 65, 0.08);
  touch-action: none;
}

.captcha-background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.captcha-piece {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: block;
  width: 19.4%;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.3));
  user-select: none;
  pointer-events: none;
}

.captcha-piece.matched {
  filter:
    drop-shadow(0 0 2px rgba(218, 255, 246, 0.95))
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.captcha-badge {
  display: inline-flex;
  min-width: 64px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #d6dfdb;
  border-radius: 12px;
  color: #70817c;
  background: #f5f8f6;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.captcha-badge.success {
  border-color: #c7e2d7;
  color: #2f735f;
  background: #edf8f3;
}

.captcha-badge.failed {
  border-color: #efd3cf;
  color: #a84a42;
  background: #fff4f2;
}

.captcha-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #dbece7;
  background: rgba(14, 42, 52, 0.7);
  font-size: 14px;
}

.captcha-loading.hide {
  display: none;
}

.captcha-slider {
  position: relative;
  height: 46px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #d5ded9;
  border-radius: 9px;
  color: #81908d;
  background: #f3f6f4;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.captcha-slider:active {
  cursor: grabbing;
}

.captcha-slider.verified {
  border-color: #b9dbcf;
  color: #30735f;
  background: #edf8f3;
  cursor: default;
}

.captcha-slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 46px;
  background: linear-gradient(90deg, #d8e9e4, #e7f3ef);
}

.captcha-slider-text {
  position: absolute;
  top: 50%;
  right: 19px;
  left: 61px;
  overflow: hidden;
  color: #7e8d89;
  font-size: 14px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.captcha-thumb {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: grid;
  width: 46px;
  height: 44px;
  place-items: center;
  border-right: 1px solid rgba(31, 84, 69, 0.08);
  border-radius: 8px;
  color: #eef8f5;
  background: linear-gradient(145deg, #2a6b8f, #194764);
  box-shadow: 3px 0 10px rgba(24, 62, 79, 0.15);
}

.captcha-thumb svg {
  width: 18px;
  height: 18px;
}

.captcha-slider.verified .captcha-thumb {
  background: linear-gradient(145deg, #3a9a7d, #24735c);
}

.login-button {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 15px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #28668b, #184767);
  box-shadow: 0 9px 22px rgba(28, 75, 102, 0.18);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
}

.login-button:hover {
  background: linear-gradient(135deg, #215b7d, #123c58);
  transform: translateY(-1px);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.login-button svg {
  width: 18px;
  height: 18px;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: #96a19e;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .login-shell {
    grid-template-columns: minmax(320px, 0.8fr) minmax(430px, 1.2fr);
  }

  .login-visual {
    padding: 27px;
  }

  .visual-content h1 {
    font-size: 34px;
  }

  .visual-metrics {
    grid-template-columns: 1fr;
  }

  .visual-metrics > div {
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .visual-metrics > div:last-child {
    border-bottom: 0;
  }

  .visual-metrics span,
  .visual-metrics small {
    display: inline;
    margin-right: 6px;
  }

  .visual-metrics strong {
    display: inline;
    font-size: 21px;
  }
}

@media (max-width: 760px) {
  .login-shell {
    display: block;
    min-height: 100vh;
  }

  .login-visual {
    min-height: auto;
    padding: 22px 20px 19px;
  }

  .visual-content {
    margin: 31px 0 17px;
  }

  .visual-content h1 {
    margin: 12px 0 8px;
    font-size: 25px;
  }

  .visual-content > p {
    font-size: 14px;
    line-height: 1.75;
  }

  .visual-pills,
  .visual-metrics,
  .visual-footer {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 28px 20px 38px;
  }

  .login-card {
    max-width: 480px;
  }

  .login-header h2 {
    font-size: 26px;
  }

  .login-footer {
    flex-direction: column;
    gap: 5px;
  }
}
