:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1E232D;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 18% 18%, rgba(217, 119, 87, 0.045) 0%, transparent 45%),
              radial-gradient(circle at 82% 80%, rgba(79, 70, 229, 0.04) 0%, transparent 45%),
              #FAF8F5;
  overflow-x: hidden;
}

/* Header: Pinned to Left & Right Edges */
.brand {
  width: 100%;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand-identity > span {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  padding-left: 14px;
  border-left: 1px solid #cbd5e1;
  letter-spacing: -0.01em;
}
.access-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 5px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.access-label svg {
  width: 13px;
  height: 13px;
  color: #4f46e5;
}

/* Main Layout: Balanced Two-Column Proportion */
.login-layout {
  flex: 1;
  width: min(1080px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.15fr 390px;
  align-items: center;
  gap: 64px;
  padding: 20px 0 50px;
}

/* Left Hero Section (纯色、工整、清爽) */
.welcome {
  display: flex;
  align-items: center;
}
.welcome-copy {
  max-width: 540px;
}
.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f46e5;
}
h1 {
  margin: 0 0 14px;
  font-size: 46px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.welcome-description {
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 26px;
}

/* Feature Cards (温润白底卡片 + 柔和阴影过渡) */
.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #E8E5DF;
  border-radius: 13px;
  box-shadow: 0 2px 6px rgba(35, 30, 20, 0.03);
  transition: border-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.feature-item:hover {
  border-color: #D8D4CC;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(35, 30, 20, 0.06);
}
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 17px;
  height: 17px;
}
.icon-indigo {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}
.icon-sky {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.icon-amber {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  color: #d97706;
  border: 1px solid #fde68a;
}
.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E232D;
  letter-spacing: -0.01em;
}
.feature-desc {
  font-size: 11px;
  color: #64748b;
}

/* Right Login Card (高质感卡片 + 顶边微光) */
.login {
  width: 100%;
  border-radius: 18px;
  padding: 34px 32px 28px;
  background: #ffffff;
  border: 1px solid #E8E5DF;
  box-shadow: 0 12px 32px -6px rgba(35, 30, 20, 0.06), 0 4px 12px -2px rgba(35, 30, 20, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 9px;
  border-radius: 6px;
  background: #FAF8F5;
  border: 1px solid #E8E5DF;
  color: #57534E;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}
.login-chip svg {
  width: 12px;
  height: 12px;
  color: #64748b;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.subtitle {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 20px;
  color: #64748b;
}

.fields {
  display: grid;
  gap: 15px;
}
label {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 5px;
  color: #334155;
  font-weight: 600;
}
input {
  appearance: none;
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}
input:hover {
  border-color: #94a3b8;
}
input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.password-control {
  position: relative;
}
.password input {
  padding-right: 54px;
}
#toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  height: 34px;
  padding: 0 8px;
  color: #4f46e5;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
#toggle:hover {
  background: #f1f5f9;
}

.captcha-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
}
.captcha-control input {
  min-width: 0;
  padding: 0 12px;
}
#captcha-refresh {
  height: 42px;
  min-height: 42px;
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}
#captcha-refresh:hover {
  border-color: #4f46e5;
}
#captcha-refresh:disabled {
  cursor: wait;
  opacity: 0.7;
}
#captcha-image {
  display: block;
  width: 100%;
  height: 40px;
  object-fit: contain;
}
#captcha-image[hidden], #captcha-state[hidden] {
  display: none;
}
.captcha-help {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.error {
  min-height: 18px;
  line-height: 1.5;
  font-size: 12px;
  color: #e11d48;
  margin: 6px 0 8px;
}

/* Submit Button (纯色 Indigo，无渐变) */
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 1px solid #4338ca;
  border-radius: 8px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.submit:hover {
  background: #4338ca;
}
.submit:active {
  background: #3730a3;
}
.submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.submit svg {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}
.submit:hover svg {
  transform: translateX(3px);
}

.help {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
  margin: 16px 0 0;
  text-align: center;
}

/* Responsive */
@media(max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr 360px;
    gap: 36px;
  }
  h1 {
    font-size: 38px;
  }
  .login {
    padding: 28px 24px;
  }
}

@media(max-width: 768px) {
  .brand {
    padding: 16px 20px;
  }
  .brand img {
    height: 24px;
  }
  .access-label {
    display: none;
  }
  .login-layout {
    width: 100%;
    display: block;
    padding: 16px 20px 40px;
  }
  .welcome {
    display: none;
  }
  .login {
    max-width: 400px;
    margin: 0 auto;
    padding: 28px 22px;
  }
}
