:root {
  --primary: #3154f6;
  --text-main: #2e3138;
  --text-sub: #777;
  --border: #d8dce4;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-bg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  background: url("./assets/login-bg.png") center / cover no-repeat;
  padding: 20px;
}

.page-logo {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 100px;
  height: auto;
  object-fit: contain;
}

.login-container {
  width: 368px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  padding: 40px 25px 34px;
  box-shadow: 0 10px 32px rgba(61, 80, 138, 0.1);
}

.login-header {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.login-title {
  margin: 0;
  font-size: 44px;
  line-height: 1.2;
  transform: scale(0.5);
  transform-origin: center;
  white-space: nowrap;
  color: var(--text-main);
  font-weight: 700;
}

.form-content {
  width: 100%;
}

.field-wrap + .field-wrap,
.captcha-row {
  margin-top: 16px;
}

.input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 14px;
  font-size: 16px;
  color: #222;
  outline: none;
  background: #fff;
}

.input::placeholder {
  color: #b2b2b2;
}

.input:focus {
  border-color: #8ea1ff;
}

.captcha-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.captcha-input {
  flex: 1;
}

.captcha-canvas {
  width: 120px;
  height: 42px;
  border: 1px solid #edf0f5;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}

.login-btn {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 4px;
  margin-top: 30px;
  background: #3550e7;
  color: #fff;
  font-size: 18px;
  line-height: 40px;
  font-weight: 600;
  cursor: pointer;
}

.login-btn:hover {
  background: #3550e7;
}

.error-text {
  min-height: 20px;
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  color: #e14444;
}

@media (max-width: 768px) {
  .page-logo {
    top: 14px;
    left: 14px;
    width: 130px;
  }

  .login-container {
    width: min(368px, calc(100vw - 32px));
    padding: 32px 18px 28px;
  }
}
