/* 商业化登录页 — 平台蓝 / 租户绿双主题 */
html, body.admin-login-page {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.admin-login-page {
  --login-accent: #2563eb;
  --login-accent-dark: #1d4ed8;
  --login-accent-soft: rgba(37, 99, 235, 0.12);
  --login-brand-bg: linear-gradient(145deg, #0f172a 0%, #1e3a8a 45%, #2563eb 100%);
  --login-glow: rgba(96, 165, 250, 0.35);
}

.admin-login-page.login-theme-tenant {
  --login-accent: #059669;
  --login-accent-dark: #047857;
  --login-accent-soft: rgba(5, 150, 105, 0.12);
  --login-brand-bg: linear-gradient(145deg, #022c22 0%, #065f46 45%, #059669 100%);
  --login-glow: rgba(52, 211, 153, 0.35);
}

/* 动态背景 */
.login-bg {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  overflow: hidden;
  z-index: 0;
}

.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: loginFloat 18s ease-in-out infinite;
}

.login-bg-shape.shape-1 {
  width: 480px; height: 480px;
  background: var(--login-glow);
  top: -120px; right: 10%;
}

.login-bg-shape.shape-2 {
  width: 360px; height: 360px;
  background: rgba(148, 163, 184, 0.25);
  bottom: -80px; left: 15%;
  animation-delay: -6s;
}

.login-bg-shape.shape-3 {
  width: 280px; height: 280px;
  background: var(--login-accent-soft);
  top: 40%; left: 45%;
  animation-delay: -12s;
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

@keyframes loginFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* 主布局 — 全屏左右分栏 */
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
  position: relative;
  background: var(--login-brand-bg);
  overflow: hidden;
}

.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  color: #fff;
  width: 100%;
  max-width: 520px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.login-logo-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.login-logo strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.login-logo small {
  display: block;
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

.login-brand-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.login-brand-desc {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.88;
  margin: 0 0 36px;
}

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}

.login-features li:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.login-feat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  color: #fff;
}

.login-features span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-feat-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.login-features strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.login-features li > div > span {
  display: block;
  font-size: 12px;
  opacity: 0.78;
  line-height: 1.5;
}

.login-brand-footer {
  margin-top: 40px;
  font-size: 12px;
  opacity: 0.65;
}

.login-brand-footer span {
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 登录表单区 */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 32px;
  background: #f8fafc;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 44px 40px 36px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 16px 40px rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.login-card-head {
  margin-bottom: 28px;
}

.login-greeting {
  font-size: 13px;
  color: var(--login-accent);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.3px;
}

.login-card-head h2 {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.login-card-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* 错误提示 */
.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  animation: loginShake 0.4s ease;
}

.login-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.login-alert-error .layui-icon {
  font-size: 18px;
  flex-shrink: 0;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* 表单字段 */
.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap > .layui-icon:first-child {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
}

.login-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
  outline: none;
}

.login-input-wrap input:focus {
  border-color: var(--login-accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--login-accent-soft);
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
}

.login-toggle-pwd {
  position: absolute;
  right: 8px;
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.login-toggle-pwd:hover {
  color: var(--login-accent);
  background: var(--login-accent-soft);
}

/* 验证码 */
.login-captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.login-captcha-input {
  flex: 1;
}

.login-captcha-img {
  flex-shrink: 0;
  padding: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-captcha-img:hover {
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px var(--login-accent-soft);
}

.login-captcha-img img {
  display: block;
  vertical-align: top;
}

/* 记住用户名 */
.login-options {
  margin-bottom: 24px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 16px; height: 16px;
  accent-color: var(--login-accent);
}

/* 提交按钮 */
.login-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--login-accent) 0%, var(--login-accent-dark) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.login-theme-tenant .login-submit {
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-theme-tenant .login-submit:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.login-submit .layui-icon {
  font-size: 16px;
  transition: transform 0.2s;
}

.login-submit:hover .layui-icon {
  transform: translateX(3px);
}

.login-demo-hint {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
}

.login-copyright {
  margin-top: 24px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

/* 响应式 */
@media screen and (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 36px 28px 32px;
    min-height: auto;
  }

  .login-brand-inner {
    max-width: none;
  }

  .login-logo {
    margin-bottom: 20px;
  }

  .login-features,
  .login-brand-footer {
    display: none;
  }

  .login-brand-title {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .login-brand-desc {
    font-size: 13px;
    margin-bottom: 0;
  }

  .login-panel {
    padding: 32px 20px 40px;
  }

  .login-card {
    padding: 32px 24px 24px;
    border-radius: 14px;
  }
}

@media screen and (max-width: 480px) {
  .login-captcha-row {
    flex-direction: column;
  }

  .login-captcha-img {
    align-self: flex-start;
  }
}
