:root {
  --login-primary: #4f46e5;
  --login-primary-dark: #3730a3;
  --login-surface: #ffffff;
  --login-muted: #6b7280;
  --login-border: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

body.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(30, 64, 175, 0.85));
  position: relative;
  overflow: hidden;
}

body.login-body::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-size: cover;
  background-position: center;
  filter: blur(4px);
}

.login-outer {
  width: min(520px, 92vw);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  overflow: hidden;
  display: block;
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.35);
  position: relative;
  z-index: 1;
}

.intro-brand h1 {
  font-size: 36px;
  margin: 18px 0 12px;
  line-height: 1.2;
  color: #f3f4ff;
}

.intro-brand p {
  margin: 0;
  color: rgba(229, 231, 235, 0.8);
  font-size: 15px;
  max-width: 280px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-highlights {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  gap: 18px;
}

.intro-highlights li {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: rgba(243, 244, 246, 0.9);
}

.intro-highlights .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(244, 244, 255, 0.7);
  margin-right: 12px;
}

.intro-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: rgba(209, 213, 219, 0.8);
  font-size: 12px;
}

.intro-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intro-meta strong {
  font-size: 24px;
  letter-spacing: 0.1em;
}

.login-panel {
  background: var(--login-surface);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-panel.solo {
  width: 100%;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
}

.panel-title h2 {
  margin: 0;
  font-size: 26px;
  color: #111827;
}

.panel-title p {
  margin: 6px 0 0;
  color: var(--login-muted);
  font-size: 14px;
}

.panel-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.form-field {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 14px;
  padding: 0 16px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  position: relative;
}

.form-field:focus-within {
  background: #ffffff;
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.form-field .icon {
  font-size: 18px;
  color: rgba(79, 70, 229, 0.9);
  margin-right: 12px;
}

.form-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 15px;
  padding: 16px 0;
  outline: none;
  color: #111827;
}

.form-input::placeholder {
  color: rgba(107, 114, 128, 0.6);
}

.captcha-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-field .form-input {
  padding: 16px 0;
}

.captcha-field .captcha-img {
  height: 44px;
  width: 120px;
  border-radius: 12px;
  border: 1px solid rgba(79, 70, 229, 0.35);
  cursor: pointer;
  object-fit: cover;
}

.keep-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--login-muted);
  cursor: pointer;
}

.keep-login input {
  width: 16px;
  height: 16px;
}

.submit-btn {
  margin-top: 12px;
  padding: 16px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.35);
}

.panel-footer {
  margin-top: 28px;
  color: var(--login-muted);
  font-size: 12px;
  text-align: center;
}

.alert.hide {
  display: none;
}

.d-none {
  display: none !important;
}

@media (max-width: 640px) {
  .login-panel {
    padding: 32px 24px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-title h2 {
    font-size: 22px;
  }
}
