/* 登录页 — 简洁白底 */

.login-page {
  min-height: calc(100vh - var(--header-total));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg-page);
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  max-width: 880px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
}

.login-promo {
  position: relative;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.login-promo-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.login-promo-img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  object-fit: cover;
  object-position: center 42%;
}

.login-promo-copy {
  position: absolute;
  top: 28px;
  right: 24px;
  left: auto;
  bottom: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  max-width: 88%;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
  background: none;
}

.login-promo-copy h2 {
  width: 268px;
  max-width: 100%;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.login-promo-copy p {
  width: 268px;
  max-width: 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: #fff;
  text-align: left;
  text-indent: 2em;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.login-promo .qr-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  background: var(--primary-bg);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
}

.login-promo .login-promo-img[hidden] ~ .qr-placeholder {
  display: flex;
}

.login-form-wrap {
  padding: 36px 28px;
}

.login-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.login-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.login-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row-code {
  display: flex;
  gap: 8px;
}

.form-row-code input {
  flex: 1;
  border-radius: 6px;
}

.btn-code {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.form-options a {
  color: var(--primary);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.login-agreement {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.login-agreement a {
  color: var(--primary);
}

.login-form-wrap {
  position: relative;
  padding-bottom: 52px;
}

.login-qr-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.login-qr-entry:hover {
  color: var(--primary);
}

.login-qr-entry__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  transition: filter 0.2s ease;
  filter: brightness(0) saturate(100%) invert(68%) sepia(0%) saturate(0%) hue-rotate(173deg) brightness(92%) contrast(86%);
}

.login-qr-entry:hover .login-qr-entry__icon,
.login-qr-entry:focus-visible .login-qr-entry__icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(89%) saturate(2477%) hue-rotate(347deg) brightness(102%) contrast(101%);
}

.login-panel--scan {
  text-align: center;
  padding: 8px 0 4px;
}

.login-scan-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.login-scan-subtitle {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-scan-qr {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.login-scan-qr-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-scan-qr-img[hidden] + .login-scan-qr-placeholder {
  display: block;
}

.login-scan-qr-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  background: #e5e5e5;
}

.login-scan-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

.login-scan-hint + .login-scan-hint {
  margin-bottom: 28px;
}

.login-scan-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.login-scan-btn {
  min-width: 112px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s;
}

.login-scan-btn:hover {
  background: var(--primary-dark);
}

.login-form-wrap.is-register .login-tabs--account,
.login-form-wrap.is-forgot .login-tabs--account,
.login-form-wrap.is-scan .login-tabs--account,
.login-form-wrap.is-scan .login-qr-entry,
.login-form-wrap.is-scan .login-switch,
.login-form-wrap.is-scan .login-agreement {
  display: none;
}

.login-switch {
  position: absolute;
  right: 28px;
  bottom: 20px;
  margin: 0;
  text-align: right;
  font-size: 14px;
}

.login-tabs.login-tabs--account {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  border-bottom: none;
}

.login-panel-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

.login-tabs--account {
  gap: 40px;
}

.login-tabs--account button {
  flex: 0 0 auto;
  padding: 12px 4px;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: 0;
}

.login-tabs--account button.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.login-switch--back {
  position: absolute;
  right: 28px;
  bottom: 20px;
  margin: 0;
  text-align: right;
}

.form-options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0 6px 0 0;
  vertical-align: middle;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.form-options input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-options input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.login-switch a {
  color: var(--primary);
}

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

  .login-promo {
    display: none;
  }
}
